Bug Wareffort for CP 1.5.1 (Full Version)

All Forums >> [Current Games From Matrix.] >> [World War I] >> Commander - The Great War >> Tech Support



Message


jrone -> Bug Wareffort for CP 1.5.1 (8/1/2014 11:34:08 AM)

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





kirk23 -> RE: Bug Wareffort for CP 1.5.1 (8/1/2014 12:11:57 PM)

quote:

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





jrone -> RE: Bug Wareffort for CP 1.5.1 (8/1/2014 12:21:02 PM)

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.




kirk23 -> RE: Bug Wareffort for CP 1.5.1 (8/1/2014 12:24:14 PM)

Why not just let everyone start at 100% war effort and let them get on with it,I think that is the simpler option.[;)]




jrone -> RE: Bug Wareffort for CP 1.5.1 (8/1/2014 12:39:54 PM)


quote:

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.




kirk23 -> RE: Bug Wareffort for CP 1.5.1 (8/1/2014 1:32:37 PM)


quote:

ORIGINAL: jrone


quote:

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]local://upfiles/36378/E4606C4E1B3D40BC8E504476C9E3B801.jpg[/image]




kirk23 -> RE: Bug Wareffort for CP 1.5.1 (8/1/2014 1:33:21 PM)

Entente war effort. ( Ignore the fact that Belgium surrendered message,I was only clicking end turn for testing purposes )

[image]local://upfiles/36378/FC91A22DAD754AFABDE9BE1312A8B051.jpg[/image]




kirk23 -> RE: Bug Wareffort for CP 1.5.1 (8/1/2014 1:36:12 PM)

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.[sm=00000924.gif]

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




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.09375