Question about adding units

jkp1187

Unindicted Co-Conspirator
Joined
Aug 29, 2004
Messages
2,496
Location
Pittsburgh, Pennsylvania
Here's the situation:

I want to create a unit that cannot ever be constructed by any civilization, but can only be received via a random event. (And, even if the event is triggered, I don't want the units to be build-able...if the civ is lucky enough to receive the unit via the event, the ones received free are all that they're ever going to get.)

Could this sort of thing be done via XML? Like, perhaps, not setting any enabling tech for the unit?
 
You could just make it it's own class and then not let anyone else get that class (Take a look in Civilizationsinfos.xml under the Barbarians n their Unique Unit Area).
 
Okay, but if I bar a civ from a certain class, won't it be barred from receiving that unit even from an event? I seem to recall this happening when I experimented with giving siege units to barbarians via an event, and it didn't work....
 
Well I would not know about events, but it should. Unless you have to when making the events, designate a UNITCLASS, not a UNIT. I am not too in the know on events..
 
Well, the way I was planning on doing it would be via a Python callback that will require me to specify an individual unit.... There may be a way around that...I'll have to check when I'm done with work this weekend....

I was kind of hoping the starting tech thing would work...although I guess if I don't specify a starting tech, the unit will always be buildable (ala the warrior)....???
 
Yes, I think so. You could always make it require an researchable Tech.. Not sure how to do that though.
 
Back
Top Bottom