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. :)
 
Hi All!

May I ask ifsomeone know how the parameter below works? I appreciated this is a very old thread...

I'm trying to have smaller lakes but I'm not sure how to play with the parameter below. I don't think it's a percentage but when I tried to change it I couldn't see any difference in lakes size.


--Fill in any lakes smaller than this. It looks bad to have large
--river systems flowing into a tiny lake.
mconst.minOceanSize = 50

Thanks!
 
Last edited:
I think you can have the value safely at 0. There might be world where there just isn't small lakes.

There is also the parameter:


--percent of land tiles made to be lakes
mconst.lakePercent = 0.04

Maybe try doubling that to 0.08 and putting a zero to the other one. You also might want to unsubscibe from the mod from Steam Workshop and set the mod "offline", so that Steam doesnt override your edits. Not sure if this happens, but could be worth it.
 
Thanks for your answer!

I have run more tests and I think that this parameter (mconst.minOceanSize) just add lake tiles to already generated "lakes". I have no idea how the script actually works though so I could be wrong :blush:

Anyway, setting it a bit lower (about 39) and leaving the mconst.lakePercent untouched seems to give a more balanced maps, with not too many lake tiles (personal preference, of course).
 
Last edited:
Top Bottom