This is save from Warlord mod 1.5.1. I received this bug save from Sapher, it is end turn crash around turn of Druk'gyalpo which is reproducable but has no report detail. Log stop recording around AI turn phase 6 Attack. I have never met this kind of problem on my own and I could not identify problem by myself. So I upload save along with log.txt to you.
It's an "integer overflow" error on calculating a unit rating.
The unit causing it is "Great Chaos Lord", 16 ATK, 10 Ranged, 15 Firebreath, 7 Figures, 3 different gaze attacks, 60% chance to hit, 13 defense, 24 hp.
The result is stored in a 64 bit integer but the calculation itself seems to be done using the original 32 bit variables maybe that's the problem, there is no conversion to 64 bit before it's too late.
...yes, that was the problem, changing the other variables to also be 64 bit fixed the crash.
This will be fixed in 1.5.2.
It shouldn't affect unmodded games because no unit can even get close to these stats under normal conditions.
(July 30th, 2023, 05:02)Seravy Wrote: It's an "integer overflow" error on calculating a unit rating.
The unit causing it is "Great Chaos Lord", 16 ATK, 10 Ranged, 15 Firebreath, 7 Figures, 3 different gaze attacks, 60% chance to hit, 13 defense, 24 hp.
The result is stored in a 64 bit integer but the calculation itself seems to be done using the original 32 bit variables maybe that's the problem, there is no conversion to 64 bit before it's too late.
...yes, that was the problem, changing the other variables to also be 64 bit fixed the crash.
This will be fixed in 1.5.2.
It shouldn't affect unmodded games because no unit can even get close to these stats under normal conditions.
Thank you for help me identify problem. I did not encounter this for a while due to I never test it on condition in phantasm difficulty. For now I will nerf some of its stats and give them more the others that much enough without causing integer overflow (-2 figures, +4 ATK, +2 Firebreath, and set MP to 250). I hope that there is no other units which might causing something like this.
I have new problem found in my playthrough, for some reason display info in combat crash related to ruler of underworld spell. but script of this part in DisInfo.cas is the same as unmodded CoM. I don't know why it end up crash.
To reproduce crash, Warlord mod version 1.5.1, load save here and send night stalker to attack chaos node then once reach player turn, click info. It would crash when click it with display of error here.
I could confirm that code on this part is the same as unmodded CoM. I could confirm to this section due to it not crash once remove line involve Ruler of Underworld here.
Confirmed, the same line causes a crash in the base game as well.
..the bug seems to be that newer functions without parameters, in this case Defender() do not "use up" the ending ) from the code so then the engine will see that and assume it's the end of the expression. After that the "%AND" would continue the expression in the code but the evaluation was already aborted and a "THEN" should follow so that's where the error comes from.
This will be fixed in the next update.
As a temporary solution, removing one ) from the expressions affected should work.
(August 2nd, 2023, 09:14)Seravy Wrote: Confirmed, the same line causes a crash in the base game as well.
..the bug seems to be that newer functions without parameters, in this case Defender() do not "use up" the ending ) from the code so then the engine will see that and assume it's the end of the expression. After that the "%AND" would continue the expression in the code but the evaluation was already aborted and a "THEN" should follow so that's where the error comes from.
This will be fixed in the next update.
As a temporary solution, removing one ) from the expressions affected should work.
I found that it is much easier to hot fix it by using substitute parameter. By have this part at the top of script....
A=Attacker();
D=Defender();
And replace all Attacker() and Defender(); in middle of script with just A and D. Script would function without problem. Perhaps this is reason why I don't encounter this problem in other script earlier.
Do this:
1) Set unit A to patrol on a tower.
2) Move unit B onto the tower, so that unit B still has at least 1 movement point left
3) Click "Plane" to switch plane.
Now unit A is suddenly selected in a group with unit B, is no longer patrolling.
I think this is new behavior, used to not do this.