HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Morphing units

01-14-2005, 04:21 AM#1
wilbo
I had succesfully (so I thought at first) set up a morphing ability, based on "destroyer form" which changes an un-armed civillian into a marine for 200 gold.
The problem is that if I select 12 civillians and click the upgrade button, they are ALL upgraded even if I only have 200 gold!
01-14-2005, 05:27 AM#2
Panto
That's... interesting. As far as I know, that doesn't work in Warcraft 3 melee.

You're using the Destroyer Form ability... huh. I can't recommend anything. Can you tell us what you changed in the ability to make it customized for your needs?
01-14-2005, 05:43 AM#3
logik
cant you give units "upgrades to" thing... and then they will upgrade to a another unit for the cost of that unit?
01-15-2005, 10:33 PM#4
wilbo
Panto, I didn't change anything except the "original unit" and the "new unit" things, as well as the "takeoff time" but I don't see what that would change...

Logik, I'm afraid that units don't have an "upgrades to" thing, only buildings. And I don't think basing a unit on a building would work all that well.
01-16-2005, 12:37 PM#5
logik
well then it must be upgrades used... and having it a chaos ability (like head hunters?)

im just thinking of what was used in Dark Deeds etc. get urself a unprotected version if u want
01-16-2005, 05:19 PM#6
Panto
Actually, if you want to pursue that route, it's cake to enable the upgrades to field for units in your editor, and then you can just have it upgrade to the new one with 1 second build time. Works just fine.
01-17-2005, 05:37 AM#7
wilbo
Quote:
Originally Posted by Panto
Actually, if you want to pursue that route, it's cake to enable the upgrades to field for units in your editor, and then you can just have it upgrade to the new one with 1 second build time. Works just fine.

Well if you say its cake, how do you enable the "upgrades to" field for unit? I am eager to learn.
01-17-2005, 07:09 AM#8
Panto
It involves putting a .slk file into your Warcraft III\Units\ directory and restarting WE. I forget which one. In the meantime, though, if you change the unit to "Is a Structure: True" and add the second form into the "Upgrades To" field, and then change "Is a Structure" back to False, it'll keep the data regardless.

I think the file you want to extract from war3patch.mpq is UnitMetaData.slk. Look for the field for Upgrades To and put a one in the column for Units. Save it, and put it in your Warcraft III\Units\ directory.
01-17-2005, 08:15 AM#9
logik
panto, im just curious. If you can do that with those fields... what is stopping you from adding another field to spells ie. have one of channel's functions available on other spells?
01-17-2005, 04:38 PM#10
Panto
All units are basically the same, and are treated according to their flags by the game's coding. All spells are not the same at all. They have very different values, and those values occupy the same place in the spell data. For example, a spell that treats DataA1 as life regeneration uses the same location to store that data as the spell that uses DataA1 as damage per second uses to store that.
01-18-2005, 12:37 AM#11
wilbo
Quote:
Originally Posted by Panto
(...) In the meantime, though, if you change the unit to "Is a Structure: True" and add the second form into the "Upgrades To" field, and then change "Is a Structure" back to False, it'll keep the data regardless.

now thats clever! Would it be possible, using the same method to make a unit which can train other units?
01-18-2005, 03:01 AM#12
Panto
Sure! It's more complicated, though, since the unit's "smart" action will become setting the rally point, instead of moving/attacking/picking up items, etc.

'Course, you could have found that out by trying it out.
01-20-2005, 12:39 AM#13
wilbo
Well it doesn't really matter that much, you've helped me out with my original problem and so in future, I won't have to spend half an our creating an "upgrades to" ability that doesn't work.