AI incapacity to conquer fortresses

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

AI incapacity to conquer fortresses

Post by Kossatx »

I've finnished a complete 63 tuns game of my variation of POTZBLITZ MOD. The experience has been very good :D The only problem I will have to solve is the AI incapacity to conquer fortifications and key cities, with the exception of overwhelming superiority as Belgium invasion or other bonused situations. I have tried to fix this with this script in "ResolveCombat(attacker, defender)" function, in game_combat.lua file, but don't work. Any idea to make it work?

Code: Select all

if defender.hex.construction ~= nil then
	attackerLosses = attackerLosses * 3
	defenderLosses = defenderLosses * 3
end
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: AI incapacity to conquer fortresses

Post by Kossatx »

Well, this option in function "ResolveCombat(attacker, defender)" works a better way:

Code: Select all

    -- Damage unit hp
if defender.hex.construction ~= nil then
	attacker:Damage(attackerLosses * 2)
    defender:Damage(defenderLosses * 2)
else
	attacker:Damage(attackerLosses)
    defender:Damage(defenderLosses)
end	
I would like the "X2 effect" appeared in prognosis, but I'm not sure how to do it :roll:
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2173
Joined: Tue Nov 23, 2010 3:35 pm

Re: AI incapacity to conquer fortresses

Post by Robotron »

Well, that makes us two. I've no idea either.
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
Post Reply

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