Limiting what units a civ can build.

damionslain

Chieftain
Joined
Aug 19, 2006
Messages
37
Location
Canada
This is probably a dumb question, but if so, it will only require a short answer.

How do i limit what units a civilization can build?
You don't have to go into great detail, once you say a file name (assuming it's in the xml), I should know the rest.
 
damionslain said:
This is probably a dumb question, but if so, it will only require a short answer.

How do i limit what units a civilization can build?
You don't have to go into great detail, once you say a file name (assuming it's in the xml), I should know the rest.


if you are talking about amount of units

that's in the CIV4ClassInfos.xml

(see the spy unit... limited to 3... -1 means unlimited)

but if your talking about the types of units a civ can build

well that's a little more complicated....:mischief:


probably python stuff...

but the "easy" workaround is to make a UU for that civ... therefore only that civ can make that unit :D but if you make each civ have a diff UU ...that can be alot of work :crazyeye:


hope that helps ;)
 
hmmm. yes, i was talking about not letting certain civs make certain units...

that sounds like a good idea. It might work really well, or it might be difficult. I haven't decided yet.

My main goal is to prevent africa from making nukes. (i was also going to limit modern armor and stealth bombers, but those are less important)
So i'll throw in a new unique unit of some kind and try to over write the ICBM. Should work.

I wish myself luck.

thanks for your help.
 
damionslain said:
My main goal is to prevent africa from making nukes. (i was also going to limit modern armor and stealth bombers, but those are less important)
So i'll throw in a new unique unit of some kind and try to over write the ICBM. Should work.


actually that should work....

just copy the ICBM and give it a new name (keeping the same class as ICBM) and assign it to that African Civ....


also make the cost of the UU -1 (I think this stops the civ from actually creating the unit):crazyeye:

therefore the AI will not get confused and still try to build the useless UU (ICBM)

I could be wrong ... but I think that's a workaround answer :goodjob:


Note: An easy way to test it would be to play that African CIV

then us the WB to give you appropriate techs so that you can build an ICBM and then see if you could actually build the unit! :p

there maybe an easier way to do it with python coding but I sux at python :sad: so I dont have an answer there for ya... :blush:




hope that helps ;)



damionslain said:
I wish myself luck.

thanks for your help.


good luck and no problem... just let me know if you got it working.... I am curious about the results :D
 
Couldn't this be done in the Civ4CivilizationInfos.xml file similar to the unit setup for the Barbarian civ by adding the following code to the Unique Units section for the civ you want to limit:

Code:
               <Unit>
                    <UnitClassType>UNITCLASS_ICBM</UnitClassType>
                    <UnitType>NONE</UnitType>
                </Unit>

I've never tried it but I would imagine you could test it pretty quickly in game with an early unit such as a Warrior.

Just a thought.
 
Amra said:
Couldn't this be done in the Civ4CivilizationInfos.xml file similar to the unit setup for the Barbarian civ by adding the following code to the Unique Units section for the civ you want to limit:

Code:
               <Unit>
                    <UnitClassType>UNITCLASS_ICBM</UnitClassType>
                    <UnitType>NONE</UnitType>
                </Unit>

I've never tried it but I would imagine you could test it pretty quickly in game with an early unit such as a Warrior.

Just a thought.



ah that's a good idea... and easier to do :crazyeye:

I forgot about that one!


yeah I think that would work... so ignore my original idea... and use his :p
 
THAT WORKED!
Reene: I was all ready to make myself up a dud ICBM that did nothing and couldn't be produced..... i was looking forward to laughing at them when they tried to use it....

Amra: Genius

Thank you both.
 
damionslain said:
THAT WORKED!
Reene: I was all ready to make myself up a dud ICBM that did nothing and couldn't be produced..... i was looking forward to laughing at them when they tried to use it....

Amra: Genius

Thank you both.


No Problem... glad you got it working:goodjob:

*kicks himself* for not thinking of Amra's idea first! :crazyeye:
 
Back
Top Bottom