Kutna Hora logic

Moderator: rbodleyscott

Post Reply
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Kutna Hora logic

Post by rbodleyscott »

locustmustdie wrote:In Kutna_Hora.BSF there’s a sentence:If(ownPercentRemaining<=60) ,whatif reverse side? Any function or existing variety for that?
Hi.

I have looked at the code, and that condition will always apply, because ownPercentRemaining is a local variable which will have been initialised to 0, and has not been assigned a value since.

So it's an error in the code logic, but I think it will very rarely (if ever) have any effect on the game.

Paul, I am not sure what that condition was intended to achieve?
Richard Bodley Scott

Image
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Kutna Hora logic

Post by rbodleyscott »

As previously stated, that condition does not have the intended effect, because no value has been assigned to ownPercentRemaining.

If the condition was actually needed, you would need to call the PercentRemaining(side) function for whichever side was intended.

Fortunately the condition is redundant anyway, as the SpecialScenarioVictoryConditions() function is only called if neither side has already lost due to rout %.
Richard Bodley Scott

Image
locustmustdie
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 99
Joined: Fri Mar 05, 2021 11:33 am

Re: Kutna Hora logic

Post by locustmustdie »

thanks,Richard
Post Reply

Return to “Field of Glory II: Medieval - Scenario Design”