Colonial units?

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

Moderators: Slitherine Core, The Lordz

Post Reply
Sabratha
SPM Contributor
SPM Contributor
Posts: 497
Joined: Thu Jan 05, 2012 2:39 am

Colonial units?

Post by Sabratha » Fri Oct 16, 2015 9:30 pm

Well, France and UK ("colonial nations" as the script clals them) can deploy specific units at the bottom of the board, as "in transport" on water. Example in the perisan gulf.

Where does it specify what units can be deployed as "colonial"?

I just found these in the units.lua:

Code: Select all

    --colonial = true,
But as you can see by the -- sign, these are not used. I changed it to colonial=false (without the -- in front of course) to test it out, but it has no effect.

I want to limit what sort of units can be brought in that way, certainly don't want planes and tanks.

Robotron
Lieutenant Colonel - Panther D
Lieutenant Colonel - Panther D
Posts: 1272
Joined: Tue Nov 23, 2010 3:35 pm

Re: Colonial units?

Post by Robotron » Fri Oct 16, 2015 11:47 pm

Probably the colonial tag in units.lua is just some leftover code from earlier versions of the game. All that matters now is whether a faction is tagged as colonial or not.

I'd suggest having a look at deployment.lua and maybe inserting checks for unit.prototype and region, especially "region 5" to prevent deployment of specific units there.

But be aware that by changing rules which alter unit deployment you might cripple the single-player AI even more than it is now. ;)

btw: have you ever seen the AI building cavalry units anywhere? just wondering.

DanielHerr
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Sun Jan 11, 2015 7:51 pm
Contact:

Re: Colonial units?

Post by DanielHerr » Sun Oct 18, 2015 2:25 am

Try searching for unit.colonial. Maybe they left the old code handling the units.lua switch commented out.
danielherr.github.io

Sabratha
SPM Contributor
SPM Contributor
Posts: 497
Joined: Thu Jan 05, 2012 2:39 am

Re: Colonial units?

Post by Sabratha » Sun Oct 18, 2015 12:51 pm

DanielHerr wrote:Try searching for unit.colonial. Maybe they left the old code handling the units.lua switch commented out.
Nope, none found even in game_deployment.lua.

I just wanted to prevent heavy units like tanks etc being spawned in the Persian Gulf tbh.

Post Reply

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