How to edit technologies?

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, The Lordz

Post Reply
Kossatx
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 241
Joined: Wed Nov 27, 2013 3:27 pm

How to edit technologies?

Post 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,
  },
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: How to edit technologies?

Post 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.
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Kossatx
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 241
Joined: Wed Nov 27, 2013 3:27 pm

Re: How to edit technologies?

Post 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.
Post Reply

Return to “Commander the Great War : Mods & Scenario Design”