Page 1 of 1
Where the hell this unit gets out?
Posted: Thu Aug 27, 2020 4:38 pm
by Kossatx
Hi! I've moded the game a way Serbia can't build Infantry units, it only can build garrison units. The problem is playing the game as CP a serbian infantry unit appears after a few turns. I have done a "SpawnUnit(1, serbia" search in "game_events" and "game_diplomacy" files, but I find nothing. Any idea about why this serbian Infantry unit appears?
Re: Where the hell this unit gets out?
Posted: Thu Aug 27, 2020 6:23 pm
by Robotron
I've moded the game a way Serbia can't build Infantry units
1. How did you do that?
2. When did the Army Corps appear?
Re: Where the hell this unit gets out?
Posted: Thu Aug 27, 2020 8:00 pm
by Kossatx
Robotron wrote: ↑Thu Aug 27, 2020 6:23 pm
I've moded the game a way Serbia can't build Infantry units
1. How did you do that?
2. When did the Army Corps appear?
I did it editing "units.lua", erasing serbian id for Infantry unit. Moreover, Serbia hasn't Infantry units in its initial deployment. The Army Corps appears in turn 6 or 7, I'm not sure.
Re: Where the hell this unit gets out?
Posted: Thu Aug 27, 2020 8:25 pm
by Robotron
I suspect the AI is placing free "emergency units", because it is unable to build Army Corps the usual way.
Open
Scripts/AI/Economic/ai_economic.lua
look for for the following (ca. line 477)
Code: Select all
local instaDeployMax = 4
local instaDeployType = "infantry"
change that to
Code: Select all
local instaDeployMax = 0
local instaDeployType = "garrison"
If Army Corps still keep appearing: tough luck - but at least we then know that unit type limits don't count for AI.
Re: Where the hell this unit gets out?
Posted: Fri Aug 28, 2020 5:06 pm
by Robotron
So, any results?
Re: Where the hell this unit gets out?
Posted: Fri Aug 28, 2020 5:58 pm
by Kossatx
Today I've been bussy and only I have played a few turns, so I haven't assault Belgrade. For the moment serbian Army Corps haven't appeared, but I want to play a few more turns before confirming

Re: Where the hell this unit gets out?
Posted: Fri Aug 28, 2020 7:41 pm
by Kossatx
Your advice works, none serbian Army Corps appears

Re: Where the hell this unit gets out?
Posted: Sun Aug 30, 2020 2:00 pm
by Kossatx
Let me please a second chapter for "Where the hell this unit gets out?" thread. If I've changed all the "spawns" linked to battlecruiser Goeben from "26" to "6" as you can see below (in "game_events" and "game_diplomacy"), why the unit still appears is a battlecruirser
Code: Select all
if eventname == "GoebenBreslauEscape" then
local luck = math.random(1,3)
GetPlayer(SpawnUnit(6, germany, 79+ math.random(0,8), 46 + math.random(0,7), 0, 80))
Re: Where the hell this unit gets out?
Posted: Sun Aug 30, 2020 2:56 pm
by Robotron
You missed the Spawns in popups.lua
Re: Where the hell this unit gets out?
Posted: Sun Aug 30, 2020 3:42 pm
by Kossatx
Robotron wrote: ↑Sun Aug 30, 2020 2:56 pm
You missed the Spawns in popups.lua
I haven't idea about this file, thanks Robotron!
Re: Where the hell this unit gets out?
Posted: Wed Sep 16, 2020 10:42 am
by Kossatx
And a third chapter for the thread... I'm looking for the script where "GallipoliStraits" event is triggered. I can't find it neither events, diplomacy or popups files. Any idea about it?
Re: Where the hell this unit gets out?
Posted: Wed Sep 16, 2020 12:27 pm
by Robotron
GallipoliStraits is triggered by playing that event in diplomacy.lua but is doesn't do anything besides being a prerequisite for
function GallipoliCampaign()
in events.lua
which deals with all the placing of attackers and destruction of Turkish units too close to Anzak Koyu (Anzac Beach).
Re: Where the hell this unit gets out?
Posted: Wed Sep 16, 2020 4:36 pm
by Kossatx
Ok, undestood Robotron, thanks a lot
