Resource icon

PerfectWorld6 7

Hello. A Steam user managed to fix the bug that has been causing some people to get script errors when using this mod. The bug only happens if you choose Balanced Start in the game setup options, which explains why only some people seem to get it. Since it has been more than two years since they posted their comment I figured I would repost it here so more people can see it.

A bugfix for a crash a few people have mentioned:​
If you try starting a game with a Balanced start, it runs into a function that was removed from the base game Lua scripts ("__PreFertilitySort" and "__SortByFertilityArray").​
To resolve it, go to:​
Steam\steamapps\workshop\content\289070\1538122020\Map\PerfectWorld6.lua​
and replace lines 4854-4870 with just:​
table.sort (sortedPlots, function(a, b) return a.Fertility > b.Fertility; end);​
Since Balanced start is the default for multiplayer, that's why it seems it doesn't work in multiplayer.​

I implemented the fix myself by copying and pasting into PerfectWorld6.lua and I can confirm that it works. Hope it helps. :)
 
Top Bottom