Page 1 of 1

Bug Wareffort for CP 1.5.1

Posted: Fri Aug 01, 2014 8:34 am
by jrone
Hi,

Just started playing a game as CentralPowers when I noticed that my wareffort was not increasing the wasy that i does for Entente. I took a look in 1914.lua and noticed that there are 2 functions named "PhaseStart(alliance)" see below. It seems to me that they need to be combined since only Entente are getting wareffort increases.

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 2 then
if turn == 2 then
SetWarEffort(2, 80)
SetWarEffort(3, 79)
end
if turn == 4 then
SetWarEffort(2, 85)
SetWarEffort(3, 83)
end
if turn == 6 then
SetWarEffort(2, 90)
SetWarEffort(3, 87)
SetWarEffort(5, 76)
end
if turn == 8 then
SetWarEffort(2, 95)
SetWarEffort(3, 90)
SetWarEffort(5, 77)
end
if turn == 10 then
SetWarEffort(2, 100)
SetWarEffort(3, 93)
SetWarEffort(5, 78)
end
if turn == 12 then
SetWarEffort(3, 96)
SetWarEffort(5, 81)
end
if turn == 14 then
SetWarEffort(3, 100)
SetWarEffort(5, 84)
end
if turn == 16 then
SetWarEffort(5, 87)
end
if turn == 18 then
SetWarEffort(5, 90)
end
if turn == 20 then
SetWarEffort(5, 93)
end
if turn == 22 then
SetWarEffort(5, 96)
end
if turn == 24 then
SetWarEffort(5, 100)
end
end
end

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 1 then
if turn == 2 then
SetWarEffort(0, 78)
SetWarEffort(1, 80)
SetWarEffort(4, 76)
SetWarEffort(7, 77)
end
if turn == 4 then
SetWarEffort(0, 82)
SetWarEffort(1, 85)
SetWarEffort(4, 78)
SetWarEffort(7, 79)
end
if turn == 6 then
SetWarEffort(0, 86)
SetWarEffort(1, 90)
SetWarEffort(4, 80)
SetWarEffort(7, 81)
end
if turn == 8 then
SetWarEffort(0, 90)
SetWarEffort(1, 95)
SetWarEffort(4, 82)
SetWarEffort(7, 83)
end
if turn == 10 then
SetWarEffort(0, 94)
SetWarEffort(1, 100)
SetWarEffort(4, 84)
SetWarEffort(7, 85)
end
if turn == 12 then
SetWarEffort(0, 98)
SetWarEffort(4, 86)
SetWarEffort(7, 87)
end
if turn == 14 then
SetWarEffort(0, 100)
SetWarEffort(4, 88)
SetWarEffort(7, 89)
end
if turn == 16 then
SetWarEffort(4, 90)
SetWarEffort(7, 91)
end
if turn == 18 then
SetWarEffort(4, 92)
SetWarEffort(7, 93)
end
if turn == 20 then
SetWarEffort(4, 94)
SetWarEffort(7, 95)
end
if turn == 22 then
SetWarEffort(4, 96)
SetWarEffort(7, 97)
end
if turn == 24 then
SetWarEffort(4, 98)
SetWarEffort(7, 100)
end
if turn == 26 then
SetWarEffort(4, 100)
end
end
end


RE: Bug Wareffort for CP 1.5.1

Posted: Fri Aug 01, 2014 9:11 am
by Hellfirejet
ORIGINAL: jrone

Hi,

Just started playing a game as CentralPowers when I noticed that my wareffort was not increasing the wasy that i does for Entente. I took a look in 1914.lua and noticed that there are 2 functions named "PhaseStart(alliance)" see below. It seems to me that they need to be combined since only Entente are getting wareffort increases.

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 2 then
if turn == 2 then
SetWarEffort(2, 80)
SetWarEffort(3, 79)
end
if turn == 4 then
SetWarEffort(2, 85)
SetWarEffort(3, 83)
end
if turn == 6 then
SetWarEffort(2, 90)
SetWarEffort(3, 87)
SetWarEffort(5, 76)
end
if turn == 8 then
SetWarEffort(2, 95)
SetWarEffort(3, 90)
SetWarEffort(5, 77)
end
if turn == 10 then
SetWarEffort(2, 100)
SetWarEffort(3, 93)
SetWarEffort(5, 78)
end
if turn == 12 then
SetWarEffort(3, 96)
SetWarEffort(5, 81)
end
if turn == 14 then
SetWarEffort(3, 100)
SetWarEffort(5, 84)
end
if turn == 16 then
SetWarEffort(5, 87)
end
if turn == 18 then
SetWarEffort(5, 90)
end
if turn == 20 then
SetWarEffort(5, 93)
end
if turn == 22 then
SetWarEffort(5, 96)
end
if turn == 24 then
SetWarEffort(5, 100)
end
end
end

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 1 then
if turn == 2 then
SetWarEffort(0, 78)
SetWarEffort(1, 80)
SetWarEffort(4, 76)
SetWarEffort(7, 77)
end
if turn == 4 then
SetWarEffort(0, 82)
SetWarEffort(1, 85)
SetWarEffort(4, 78)
SetWarEffort(7, 79)
end
if turn == 6 then
SetWarEffort(0, 86)
SetWarEffort(1, 90)
SetWarEffort(4, 80)
SetWarEffort(7, 81)
end
if turn == 8 then
SetWarEffort(0, 90)
SetWarEffort(1, 95)
SetWarEffort(4, 82)
SetWarEffort(7, 83)
end
if turn == 10 then
SetWarEffort(0, 94)
SetWarEffort(1, 100)
SetWarEffort(4, 84)
SetWarEffort(7, 85)
end
if turn == 12 then
SetWarEffort(0, 98)
SetWarEffort(4, 86)
SetWarEffort(7, 87)
end
if turn == 14 then
SetWarEffort(0, 100)
SetWarEffort(4, 88)
SetWarEffort(7, 89)
end
if turn == 16 then
SetWarEffort(4, 90)
SetWarEffort(7, 91)
end
if turn == 18 then
SetWarEffort(4, 92)
SetWarEffort(7, 93)
end
if turn == 20 then
SetWarEffort(4, 94)
SetWarEffort(7, 95)
end
if turn == 22 then
SetWarEffort(4, 96)
SetWarEffort(7, 97)
end
if turn == 24 then
SetWarEffort(4, 98)
SetWarEffort(7, 100)
end
if turn == 26 then
SetWarEffort(4, 100)
end
end
end


Hi its not a bug,the Central Powers are the aggressors,and Countries in the Entente are responding to that aggression,so it is the Entente that you now see building up their war effort.

Both Phasestart ( alliance )
Lists are very different,1 has id 1. While the other is Alliance.id 2

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 1 then ------- Alliance.id == 1 ( Entente )
if turn == 2 then

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 2 then ------- Alliance.id == 2 ( Central Powers )
if turn == 2 then


RE: Bug Wareffort for CP 1.5.1

Posted: Fri Aug 01, 2014 9:21 am
by jrone
So it is intended that Central Powers stay at 75% wareffort ?
Why not reduce the PP from cities so the numbers add up instead and start CP at 100% wareffort ?
Would make the management screen easier to understand imo.

RE: Bug Wareffort for CP 1.5.1

Posted: Fri Aug 01, 2014 9:24 am
by Hellfirejet
Why not just let everyone start at 100% war effort and let them get on with it,I think that is the simpler option.[;)]

RE: Bug Wareffort for CP 1.5.1

Posted: Fri Aug 01, 2014 9:39 am
by jrone
ORIGINAL: kirk23





Hi its not a bug,the Central Powers are the aggressors,and Countries in the Entente are responding to that aggression,so it is the Entente that you now see building up their war effort.

Both Phasestart ( alliance )
Lists are very different,1 has id 1. While the other is Alliance.id 2

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 1 then ------- Alliance.id == 1 ( Entente )
if turn == 2 then

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 2 then ------- Alliance.id == 2 ( Central Powers )
if turn == 2 then



Yes the lists are different but the problem is they both have the same fucntion name "function PhaseStart(alliance)".This results in a conflict for the calling function which is resolved so that only the last function the Entente list is ever called. This leads to CP never having an increase in wareffort and staying at 75% throughout the war. This doesn't seem right to me. If you combine the lists to one function then both sides would ramp up the wareffort which I believe is what is intended.

RE: Bug Wareffort for CP 1.5.1

Posted: Fri Aug 01, 2014 10:32 am
by Hellfirejet
ORIGINAL: jrone

ORIGINAL: kirk23





Hi its not a bug,the Central Powers are the aggressors,and Countries in the Entente are responding to that aggression,so it is the Entente that you now see building up their war effort.

Both Phasestart ( alliance )
Lists are very different,1 has id 1. While the other is Alliance.id 2

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 1 then ------- Alliance.id == 1 ( Entente )
if turn == 2 then

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 2 then ------- Alliance.id == 2 ( Central Powers )
if turn == 2 then



Yes the lists are different but the problem is they both have the same fucntion name "function PhaseStart(alliance)".This results in a conflict for the calling function which is resolved so that only the last function the Entente list is ever called. This leads to CP never having an increase in wareffort and staying at 75% throughout the war. This doesn't seem right to me. If you combine the lists to one function then both sides would ramp up the wareffort which I believe is what is intended.


Ok I stand corrected,this one has been missed somehow,you are right,now picked up and fixed thanks to you.[&o]



Image

RE: Bug Wareffort for CP 1.5.1

Posted: Fri Aug 01, 2014 10:33 am
by Hellfirejet
Entente war effort. ( Ignore the fact that Belgium surrendered message,I was only clicking end turn for testing purposes )

Image

RE: Bug Wareffort for CP 1.5.1

Posted: Fri Aug 01, 2014 10:36 am
by Hellfirejet
Sorry if I was a bit grumpy jrone,and I know its not an excuse,but I have been up virtually all night,working on the next game play patch.

Correct war effort script now combined cheers.[:)]

function PhaseStart(alliance)
local turn = game.turn + 1
if alliance.id == 2 then
if turn == 2 then
SetWarEffort(2, 80)
SetWarEffort(3, 79)
end
if turn == 4 then
SetWarEffort(2, 85)
SetWarEffort(3, 83)
end
if turn == 6 then
SetWarEffort(2, 90)
SetWarEffort(3, 87)
SetWarEffort(5, 76)
end
if turn == 8 then
SetWarEffort(2, 95)
SetWarEffort(3, 90)
SetWarEffort(5, 77)
end
if turn == 10 then
SetWarEffort(2, 100)
SetWarEffort(3, 93)
SetWarEffort(5, 78)
end
if turn == 12 then
SetWarEffort(3, 96)
SetWarEffort(5, 81)
end
if turn == 14 then
SetWarEffort(3, 100)
SetWarEffort(5, 84)
end
if turn == 16 then
SetWarEffort(5, 87)
end
if turn == 18 then
SetWarEffort(5, 90)
end
if turn == 20 then
SetWarEffort(5, 93)
end
if turn == 22 then
SetWarEffort(5, 96)
end
if turn == 24 then
SetWarEffort(5, 100)
end
if turn == 2 then
SetWarEffort(0, 78)
SetWarEffort(1, 80)
SetWarEffort(4, 76)
SetWarEffort(7, 77)
end
if turn == 4 then
SetWarEffort(0, 82)
SetWarEffort(1, 85)
SetWarEffort(4, 78)
SetWarEffort(7, 79)
end
if turn == 6 then
SetWarEffort(0, 86)
SetWarEffort(1, 90)
SetWarEffort(4, 80)
SetWarEffort(7, 81)
end
if turn == 8 then
SetWarEffort(0, 90)
SetWarEffort(1, 95)
SetWarEffort(4, 82)
SetWarEffort(7, 83)
end
if turn == 10 then
SetWarEffort(0, 94)
SetWarEffort(1, 100)
SetWarEffort(4, 84)
SetWarEffort(7, 85)
end
if turn == 12 then
SetWarEffort(0, 98)
SetWarEffort(4, 86)
SetWarEffort(7, 87)
end
if turn == 14 then
SetWarEffort(0, 100)
SetWarEffort(4, 88)
SetWarEffort(7, 89)
end
if turn == 16 then
SetWarEffort(4, 90)
SetWarEffort(7, 91)
end
if turn == 18 then
SetWarEffort(4, 92)
SetWarEffort(7, 93)
end
if turn == 20 then
SetWarEffort(4, 94)
SetWarEffort(7, 95)
end
if turn == 22 then
SetWarEffort(4, 96)
SetWarEffort(7, 97)
end
if turn == 24 then
SetWarEffort(4, 98)
SetWarEffort(7, 100)
end
if turn == 26 then
SetWarEffort(4, 100)
end
end
end