Where the hell this unit gets out?

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: 213
Joined: Wed Nov 27, 2013 3:27 pm

Where the hell this unit gets out?

Post by Kossatx » Thu Aug 27, 2020 4:38 pm

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?

Robotron
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1456
Joined: Tue Nov 23, 2010 3:35 pm

Re: Where the hell this unit gets out?

Post by Robotron » 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?
Image
Slitherine's Commander the Great War on steroids: 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: 213
Joined: Wed Nov 27, 2013 3:27 pm

Re: Where the hell this unit gets out?

Post by Kossatx » Thu Aug 27, 2020 8:00 pm

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.

Robotron
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1456
Joined: Tue Nov 23, 2010 3:35 pm

Re: Where the hell this unit gets out?

Post by Robotron » Thu Aug 27, 2020 8:25 pm

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.
Image
Slitherine's Commander the Great War on steroids: POTZBLITZ mod!
Find it here: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610

Robotron
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1456
Joined: Tue Nov 23, 2010 3:35 pm

Re: Where the hell this unit gets out?

Post by Robotron » Fri Aug 28, 2020 5:06 pm

So, any results?
Image
Slitherine's Commander the Great War on steroids: 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: 213
Joined: Wed Nov 27, 2013 3:27 pm

Re: Where the hell this unit gets out?

Post by Kossatx » Fri Aug 28, 2020 5:58 pm

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 :wink:

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

Re: Where the hell this unit gets out?

Post by Kossatx » Fri Aug 28, 2020 7:41 pm

Your advice works, none serbian Army Corps appears :!:

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

Re: Where the hell this unit gets out?

Post by Kossatx » Sun Aug 30, 2020 2:00 pm

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))

Robotron
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1456
Joined: Tue Nov 23, 2010 3:35 pm

Re: Where the hell this unit gets out?

Post by Robotron » Sun Aug 30, 2020 2:56 pm

You missed the Spawns in popups.lua
Image
Slitherine's Commander the Great War on steroids: 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: 213
Joined: Wed Nov 27, 2013 3:27 pm

Re: Where the hell this unit gets out?

Post by Kossatx » Sun Aug 30, 2020 3:42 pm

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!

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

Re: Where the hell this unit gets out?

Post by Kossatx » Wed Sep 16, 2020 10:42 am

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?

Robotron
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1456
Joined: Tue Nov 23, 2010 3:35 pm

Re: Where the hell this unit gets out?

Post by Robotron » Wed Sep 16, 2020 12:27 pm

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).
Image
Slitherine's Commander the Great War on steroids: 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: 213
Joined: Wed Nov 27, 2013 3:27 pm

Re: Where the hell this unit gets out?

Post by Kossatx » Wed Sep 16, 2020 4:36 pm

Ok, undestood Robotron, thanks a lot :D

Post Reply

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