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

Where the hell this unit gets out?

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

Re: Where the hell this unit gets out?

Post 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?
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: Where the hell this unit gets out?

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

Re: Where the hell this unit gets out?

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

Re: Where the hell this unit gets out?

Post by Robotron »

So, any results?
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: Where the hell this unit gets out?

Post 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 :wink:
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: Where the hell this unit gets out?

Post by Kossatx »

Your advice works, none serbian Army Corps appears :!:
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: Where the hell this unit gets out?

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

Re: Where the hell this unit gets out?

Post by Robotron »

You missed the Spawns in popups.lua
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: Where the hell this unit gets out?

Post 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!
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: Where the hell this unit gets out?

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

Re: Where the hell this unit gets out?

Post 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).
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: Where the hell this unit gets out?

Post by Kossatx »

Ok, undestood Robotron, thanks a lot :D
Post Reply

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