| 10-04-2009, 01:02 AM | #1 |
Hi, I am figuring out what options I have for setting up upgraded units, but I have not found any really suitable solutions. [Concept] For a footman wars styled map, I have created a building that periodically spawns Black Dragon Whelps. Black Dragon Whelps can be upgraded to Black Drakes, which can also be upgraded to Black Dragons. The units will have different food costs and gold costs, so upgrading will require that the player has enough gold and food to cover each transformation. [Attempts] Here are the attempts I have made for the above concept: 1. Custom Destroyer Form In this case I set up two custom Destroyer Form abilities, one that allows the Whelp to upgrade to the Drake and one that allows the Drake to upgrade to the Dragon. This is the first attempt I made and what gave me the idea to begin with. Unfortunately it seems that custom versions of Destroyer Form will only cover the resource costs for one unit; if I have enough gold and food to upgrade one Whelp to a Drake, and I select the upgrading option across a group of Whelps, all the Whelps will be upgraded. 2. Selling Units and triggers The second attempt I tried was by creating dummy units that would have the difference in resource costs. I created triggers such that if the dummy unit were hired, the hired unit would be removed and the unit which the unit was hired from would be replaced by its respective unit. Example: Normally a Whelp requires 3 food and Drake requires 5 food. I made a dummy Drake unit that costs 200 gold and requires 2 food, and made the unit hired from the Whelp. Whenever the dummy Drake unit is hired, it and the Whelp would be removed and an actual Drake would be created in the Whelp's place. The Whelp disappearing from the current selection could be fixed with a call to select the new unit into the current selection (as if the Whelp actually transformed into the Drake). However this attempt has the nasty side effect of ruining control groups. And now that I think about it, this could also cause shenanigans involving buffs/debuffs on the Whelp (such as escaping out of ensnares or webs, or "dispelling" slow or curse), so I guess this was always a pretty bad idea... 3. Selling Units, triggers and Chaos This attempt was like attempt 2, except instead of removing the Whelp/Drake, I used Chaos to transform the unit into a Drake/Dragon. I was able to make the Whelp transform into a Drake, but it seems that the transformation was not complete; the transformed unit would still be selling dummy Drakes, like a Whelp would, instead of selling dummy Dragons. If possible, I would like to hear if anybody has better ideas on how I can create upgradeable units that also honor requirements for food and gold costs, and also have little to no side effects. Thanks to anyone that reads this topic and replies. |
| 10-04-2009, 02:06 AM | #2 | |
Quote:
This is something that I absolutely hate of the ability. In any case, just use the normal upgrade methods, the same used for buildings. If you are using JGNP, the field Upgrades to should be immediately available ion the Unit Editor. Otherwise, just check temporarily the Is a Building field so the Upgrades to field shows up. Then just uncheck the Is a Building field again and voila. |
| 10-04-2009, 02:06 AM | #3 |
1. How come? Melee games don't do this with Destroyers (obviously), so either it's hardcoded or you have wrong options selected for the spell's values. 2. --- 3. You can either use a dummy spell and detect this (and just putting the gold/lumber/food costs in the tooltip, check it in a trigger), or have the same food/lumber/gold cost/difference between Whelp -> Drake, and Drake -> Dragon (for example, Whelp -> Drake is 300 gold, 200 lumber, 2 food. Drake -> Dragon is 300 gold, 200 lumber, 2 food) and have the tooltip say like Evolve or something, and then change accordingly. Another method; couldn't you have a REAL upgrade that change's X unit's unit types? Such as troll headhunter -> troll berserker (or whatever the name is)? edit: Damn didn't see Alevice. |
| 10-05-2009, 12:33 AM | #4 | |
Quote:
|
| 10-05-2009, 02:38 AM | #5 |
Hey, this is something that I should've used in my race. Then I wouldn't have had that crazy, funky error. |
| 10-05-2009, 04:33 AM | #6 |
you never asked asshole :P |
