HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Back on the horse, looking for req. upgrade

06-02-2003, 03:23 AM#1
Panto
Well, I picked up the map again and I'm going strong, but there's a little intricacy which I'm lacking. I want a unit to require an upgrade before it can be built.

Notice, I don't want an upgrade to require a unit, nor a unit to require a unit, but rather a unit to require an upgrade.

The "Requirements" field in the WE unit editor only allows you to select units. And UnitData.slk doesn't have a "Requirements" field. I have the four-letter code for the upgrade, I just need to figure out how to insert it as a requirement for the unit.

The only option I see possibly working is editing the <race>UnitFunc.txt files, which I'm worried about conflicting with ChrydGod's SLK enhancer.
06-02-2003, 03:59 AM#2
Dead-Inside
Else you could get around this by creating an invisible item or something of that sort. Just "Hide" it when it is created.

Regards
06-02-2003, 04:47 PM#3
Panto
So, I'd create a unit when the research is finished? I guess that makes sense. It would have to be non-structure, though, since I'm still relying on killing all a player's structures as the win condition.

And I guess I'm a little apprehensive about introducing a player-owned unit that the player doesn't know about, even if it is modelless and shadowless.
06-02-2003, 05:02 PM#4
Earth-Fury
make a unit. change its button to your upgrades button, and its model to a space. next, make a trigger:
Code:
event - a unit owned by player[#] finishes traning a unit
conditions - trained unit = your unit
actions - hide trained unit
move trained unit to (a recon that is out of the way)
06-02-2003, 05:15 PM#5
Panto
Quote:
make a unit. change its button to your upgrades button, and its model to a space
I've got no problem making an unfindable unit. And I prefer to create a unit as a result of a research than to move it, for reasons that it will still behave as a research behaves and it will automatically be researchable only once.
Still, though, I'd rather have a good way to add researches directly to the units' requirements.
06-02-2003, 05:41 PM#6
Earth-Fury
cant be done.
06-02-2003, 06:30 PM#7
Panto
Might as well not say that. I bet it can be done, if for example the field asked for the four-letter code instead of popping up a chooser window.
06-02-2003, 07:26 PM#8
Earth-Fury
nope, ive explored the posibilitys in unitmetadata.slk (tanks to chyrgod) and it can not be done, as i said above in a short, and easy to reed format =P and of couyurse, unless i eplain it in lengthy detail, you wont beleve me.
06-02-2003, 09:09 PM#9
Panto
Quote:
and of couyurse, unless i eplain it in lengthy detail, you wont beleve me
Earth-Fury, I feel like you're cluttering up my thread.
06-02-2003, 09:29 PM#10
Earth-Fury
sorry, i just feel like everyone must have the long anser ://// ://// :////
06-02-2003, 09:36 PM#11
Panto
Quote:
ive explored the posibilitys in unitmetadata.slk
I've been using the expanded UnitMetaData.slk, which is what makes me think that the field might accept four-letter codes in place of getting them from the chooser screen. Do you have any evidence to specifically say that this wouldn't work?
06-02-2003, 11:48 PM#12
ChrydGod
Well, its easy ^^

Open my unitmetadata.slk, change the type field for Requirements - Units from unitList to stringList.

As you have the codes, it will allow you to have both units , researches or anything that has an Id as a requirement for the unit to be trained.

Don't worry, i tested it for you in case that wouldn't work.

But it does.

Regards
06-03-2003, 12:09 AM#13
Panto
Heh. Now that you told me how it can be done, I think I probably could have figured it out. *sigh* Maybe I should write "Demystifying ChrydGod's Enhancer SLK".

Thanks a lot! :infth:

EDIT: You propose an interesting alternative. If you set an item ID as a requirement, would you be able to build the unit if you had the required item in the possession of one of your heros? Or doesn't it have the right mechanics to work properly?
06-03-2003, 02:56 AM#14
ChrydGod
We ought to give it a try with spells or items

I'll have a try later

Regards