PDA

View Full Version : Disable unit for a faction



Shadow_Wolf33
08-25-2008, 17:55
Greetings folks!

I am trying to fiddle around with the Retrofit mod, and play the good old fashioned campaign. One thing I am curious about, is how can I disable other factions from making a particular unit? I am also looking at units that factions generally start the game with for garrisons.

For example, lets say I wanted to disable the peasant units, so I could have my opponents send more REAL armies at me rather than a peasant noob zerg that gets stomped by my armies without a challenge.

I tried deleting their ownership associations for the factions in the EDU file, but kept giving me a crash without any reason when trying to launch the campaign.

Heck I would even be happy if they kept them as starter units, but just weren't able to build/recruit any more after the game had started. Any help would be much appreciated! :slomo:

CavalryCmdr
08-26-2008, 03:03
I am also looking at units that factions generally start the game with for garrisons.

I tried deleting their ownership associations for the factions in the EDU file, but kept giving me a crash without any reason when trying to launch the campaign.

These both have the same answer,
folder - data\world\maps\campaign\imperial_campaign
file - descr_strat.txt

If the faction starts with a unit (ie it's in the descr_strat) it dose not own, you will get ctd.


Heck I would even be happy if they kept them as starter units, but just weren't able to build/recruit any more after the game had started. In the data directory edit the file export_descr_buildings.txt
take the recruitment lines out, for example remove the line
recruit_pool "Peasants" 1 0.5 4 0 requires factions { england, france, hre, denmark, spain, portugal, milan, venice, papal_states, Normans, Saxons, } or it's equivilent wherever you find it. Then this unit, peasants in this example, would not be available for recruitment. Be aware that this can severely disrupt game balance. An efficient alternative would be to reduce the number of available units and how fast they become available, this is controled by the numbers following the unit name :
1 0.5 4
1 - the number of units available at building completion
0.5 - the respawn time (ie, how quickly they become available for recruitment) in turns, so this means another unit of peasants is available every 2 turns.
4 - the max number of this unit available for recruitment at any single time.
In this example if you edit the line to read
recruit_pool "Peasants" 1 0.25 2 0 requires factions { england, france, hre, denmark, spain, portugal, milan, venice, papal_states, Normans, Saxons, } you would effectively see only half the number of peasants on the map. Reducing the number of low-teir units has proven to effectively allow the AI to recruit higher tier units.