Page 1 of 1
How to edit technologies?
Posted: Mon Jul 09, 2018 2:20 pm
by Kossatx
Hi again! I would like to mod some technologies in order to diferenciate how they affect to different units. For example, I would like "industrial warfare" add +4 base defense to infantry and arabinfantry, but only +3 to garrison, cavalry and arabcavalry. Anyone knows how can I do it?
Code: Select all
industrial_warfare =
{
stats =
{
basedefense = 4,
},
unitTypes = {"infantry", "garrison", "cavalry", "arabinfantry", "arabcavalry"},
cost = 3,
time = 150,
level = true,
},
Re: How to edit technologies?
Posted: Fri Jul 13, 2018 8:43 pm
by Robotron
ANY tech will ALWAYS apply to ANY unit that has been defined to be affected by that tech.
You cannot make any exceptions.
A more easy way would be to just raise or lower the basedefense values for units you'd like to change.
Alternatively you could introduce special rules for specific units in the combat.lua script. but this is a wee bit complicated and a simple +1 or -1 really does not justify the effort, as it is hardly noticeable in the battle-calculation.
If you really want to do this and need any help, please specify what mod (if any) you are using, so I can see what lines will have to be edited, or upload your scripts via "attachments" option in the lower left of the reply box.
Re: How to edit technologies?
Posted: Sat Jul 14, 2018 9:22 pm
by Kossatx
Thanks again for your help and your job Robotron. I'm using your mod for my little modding works. I think the best option is, as you say, to raise or lower the basedefense values for units I want to change.