Robotron wrote: ↑Mon Jan 30, 2023 6:17 pm
Unsurprisingly "Data\scripts" does indeed contain
all the lua scripts.
What makes you think the faulty script is in scripts\game though?
I meant it's a script in Data\scripts, not in a folder in data scripts, except if that folder is Data\scripts\game.
I tried to play the broken saves on v15.2, and I can continue the games past the turns where v17 crashed. So then I started figuring out which files worked and which didn't. First I replaced all scripts with v15.2 files, and I could pass the turn, so I assume the problem is in that folder. Then I replaced all the scripts that were directly in Data\scripts, and the game didn't work at all, until I also added the files that were in Data\scripts\game. And the game worked and I could move past the turn.
So situation is like this:
v15.2
Data\scripts
+
Data\scripts\game
+
rest v17 files
and I can move past the broken turns.
I assume, therefore, that the bug is located in a file in one of these 2 locations or a combination of files in these locations, because if those files are replaced with v15.2, the game works.
To clarify, with v15.2, I can continue the game if I load a save 1 turn before the crash turns I uploaded here. If I load the crash turns, the game also crashes in v15.2, I guess something is remembered by the save. I don't really know why or what that means, but it might mean something to you.
With v17, the game crashes still, even if I load 1 turn before or 10 turns before, or start a new game. It also crashes if I move past the initial crash turn with v15.2 (aka go from turn 25 to 26 with v15.2) and then play the next turn with v17 (aka play turn 26 to 27 with v17).
With v17+v15.2 hybrid, the game functions as v15.2 does, at least in relation to this bug.
In itself, not a huge revelation, because as you say, most files that have been changed are in those 2 folders. However, i does show, I think, that a fix can be applied to running games if the problem is found.
I did find another small thing, that doesn't seem to have affect on the game but which was a bit odd to me. But in the AI file of 15.2 called Misc.Lua, there is a line which was removed in the v17 version of misc.lua. The 2 versions are identical, except for this one line. Replacing only this file doesn't seem to fix anything, so it doesn't seem related, but just wondering if it was intentional or accidental removal of the line?
Edit: narrowed it further down to either 1 or a combination of the following files in Data\scripts
constructions
factions
technology
units
Edit2: narrowed it down to technology.lua
after replacing this file and only this file (If I don't replace the file, the game always crashes in v17, while never crashing in v15.2, regardless of where I load the game), I've been able to continue the game for at least 5 turns on my own games, although only when I load 1 turn before where the game crashed on v17.
Entente46 crash game
Test70 crash game
Ostmars44 crash game
However, Wolf's Entente game still crashes. Perhaps because I only have an endturn save file, and not a proper previous turn save file, saved by the player.
and I still can't continue my MP game vs Munt.
So the technology file might be responsible for 1 type of crash but not others, or related to all crashes but not solely responsible. Idk yet, or the issue might be with requiring an uncorrupted save or a fresh game, neither which are available for Wolf's game and the MP game vs Munt.
Edit3: narrowed it further down to most likely the stats on entrenchment upgrades. if I change only those 3 numbers back to the same value as in 15.2, but keep the rest of the changes in the technology.lua file the same as v17, the game can be continued past the crash dates, at least in my game.
when I change all 3 values back to v15.2, the game works
when I change only dugout back from 5 to 4, the game crashes
when I change dugouts and pillboxes, reducing both by 1, but keeping barbed wire at 3, the game works.
when I change only dugouts from 4 to 3, but keep rest the same, the game crashes.
when I increase barbed wire from 3 to 4, but reduce pillboxes and dugouts by 1, the game works.
when I increase barbed wire from 3 to 5, but reduce pillboxes and dugouts by 1, the game crashes.
I have no clue why that is, but you might @Robotron. It seems like there's a limit to how high entrenchment can be.