Page 1 of 1

Colonial units?

Posted: Fri Oct 16, 2015 9:30 pm
by Sabratha
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.

Re: Colonial units?

Posted: Fri Oct 16, 2015 11:47 pm
by Robotron
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.

Re: Colonial units?

Posted: Sun Oct 18, 2015 2:25 am
by DanielHerr
Try searching for unit.colonial. Maybe they left the old code handling the units.lua switch commented out.

Re: Colonial units?

Posted: Sun Oct 18, 2015 12:51 pm
by Sabratha
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.