Resource icon

PerfectWorld6 7

This would be hugely helpful pokiehl, thanks very much. I think it's possible that the game needs to know the map size for several different systems, and perhaps merely altering it with that function doesn't report accurately to all systems. I don't know why it has worked for me, but it's totally worth a shot.

It really is a mystery to me why that function seems so problematic and why you've never experienced the problem - who knows what's going on behind the scenes as you said!

Anyway, I'll have the config up for you in a day or two :)
 
Anyway, I'll have the config up for you in a day or two :)

Hoping to fuel your efforts here by providing first experiences with the test I promised: I'm now 240 turns into an epic speed game (biggest possible map size, 18 civs, 27 CS), having reached mid age - no crashes, no graphic anomalies...and all changed was cutting out the function you singled out a few posts before. That's a lot longer than I have managed to come before in the crashing games. It appears that you have hit the bullet with your theory what is causing those nasty crashes. And now you are on the way to provide the solution as well - just great :)
 
I can confirm that the function that's causing some people to CTD after turn 100 or so is the function that pokiehl suggested.

I would always crash more or less around turn 150. Once I CTDed once, it would make it near impossible to load any save from that game even a savegame from turn 0.

I deleted the function as pokiehl suggested and now it works just fine. Just finished a game as Brazil. As for the map not being large enough without the function, I had no issues whatsoever and everything still looked and played nicely.
 
Thanks for verifying NukeAJS!

Cephalo and everyone else waiting - I apologize for the delay but I've been very busy with work this week. Ceph, I'll have the config file for you either tonight or tomorrow.
 
I can confirm the bug. I love this map and I'm 200 turns in with no crashes and multiple loads from saves.
It does feel a bit cramped with the standard # of players so I am excited about the option of Perfect World Map Sizes.

I'm going to do a bit of research on the Detailed Worlds Island Regions code & test some options, since I also love and miss that feature with PW6. What's the best method of sharing that for test help once I have a working model? I don't want to take credit for anyone else's work.
 
Thanks for further confirming my findings seawench!

Just a quick update for Cephalo - I am working on it and hoping to be done in the next day or two. A little more complicated than I thought - trying to find a nice and clean way to hide the new mapsizes when PerfectWorld is not the chosen map script.
 
OK @cephalo - you are all set. The complete mod package is attached to this post. The PerfectWorld6.lua file included also has the problematic function already deleted. Obviously, feel free to replace that file with your own if there are any other updates you wanted to make or wanted to do the change on your own.

I'll summarize the changes:

I've created new map sizes that are 15% larger in height and 15% larger in width, ensuring that all width and height values are even numbers to avoid any issues. These changes ONLY take into effect when PerfectWorld6 is selected as the map script - nothing is changed if the user picks say, Fractal or anything else. Also, these changes are totally invisible to the user - the only difference the user will note is that, when PerfectWorld6 is selected, if they hover over the map size for the description, the description text will also have (configured for PerfectWorld6).

I also added support for the most popular modded map sizes (my Larger Map Sizes mod, and Gedemon's YNAMP). I don't think there are any other map size mods out there. Again, these changes are totally invisible to the user, and these map sizes will only show up when the respective mods are activated.

I also modernized your .modinfo file. You will notice "LoadOrder" on the new actions - LoadOrder is the only way to set mod components to load sooner or later than other components. I gave these actions a high load order to ensure they load after popular mods that update mapsize configurations, like Religion Expanded or Terra Mirabilis.

Let me know if you have any other questions! I'm more than happy to help you further on this, keeping it updated, etc.
 

Attachments

  • p0kiehl_PW6_update.zip
    30.5 KB · Views: 91
Thanks a ton pokiehl! I will post this later today as is. Thanks for your hard work.

EDIT: Ok it's posted here and on Steam. Let me know if it stuck. The Steam uploader is not exactly easy to use, but I think it did something.
 
Last edited:
Thanks a ton pokiehl! I will post this later today as is. Thanks for your hard work.

EDIT: Ok it's posted here and on Steam. Let me know if it stuck. The Steam uploader is not exactly easy to use, but I think it did something.

Steam update came through just fine.
 
Hey Cephalo, apologies here, but there is a benign mistake in the version I gave you so I'd like you to replace the upload with this one. Basically, I was testing what a certain global parameter update did and I accidentally left it in the Gameplay file.

It doesn't do anything at all (I think Firaxis didn't link it properly with the DLL yet), and won't affect anyone's game, but it'd be best to take it out in case it has any hidden effects or something. Also, there was a little mix-up on your end as well - you added a redundant "Configuration" folder, which again, doesn't affect anything, but doesn't need to be there.

The attached version is fixed, and can be up-loaded as-is once you unzip it. Sorry for the mix-up.
 

Attachments

  • p0kiehl_PW6_update_fixed.zip
    31.7 KB · Views: 158
About that Config folder, I'm sure I deleted it out of my mod folder before publishing. Is there something special you have to do to get the mod uploader to delete what's there? Seems like it just merges new stuff with old stuff.
 
The Steam update system is very basic and just uploads what's in the folder system with the modinfo file- no merging (AFAIK). So all you need to do is select the proper modinfo file and it's good to go. Last time with that Config folder must have been a fluke or something.

Oh and even if it hangs after upload (like never says "Success" or whatever), it still worked.

Be sure to let me know if you need any other help.
 
Latest patch (today) seems to have broken this script. It works 90% of the time but on occasion (Usually a restart) it fails and kicks me back to the main menu with some error code. Looked into the luq log and found:
Code:
GenerateRandomMap: Map Seed = 1158736342
Map Script: Generating PerfectWorld6 Map
Map Script: Creating initial map data - PerfectWorld6
Map Script: map size: width=124, height=62
Map Script: OldWorldStart =     false
Map Script: random seed for this map is 807290239
Map Script: Siltified Lakes in 0.0000 seconds over 1756 iterations. - Brought to you by Bobert13
Map Script: length of valid list    0
Runtime Error: D:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1538122020\Map\PerfectWorld6.lua:1732: Bad assumption made. Lake outflow has less than 1 or more than 2 valid flows
stack traceback:
    [C]: in function 'error'
    D:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1538122020\Map\PerfectWorld6.lua:1732: in function 'RiverMap:RecreateNewLakes'
    D:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1538122020\Map\PerfectWorld6.lua:2717: in function 'GeneratePlotTypes'
    D:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1538122020\Map\PerfectWorld6.lua:238: in function 'GenerateMap'
    [C]: in function '(anonymous)'
Lua callstack:
Runtime Error: Call to GenerateMap() had errors
stack traceback:
    [C]: in function '(anonymous)'
 
Hmm, that error should come only from internal data that only PW uses. That might just be a normal. Bug. Others have said the new update breaks the map. I can't afford this expansion right now so I will have to wait to see what happens.
 
Ill test right now with the expansion, SO happy to see PerfectWorld return!
Edit: Yeah doesnt work with the expansion, i'm guessing because the Gathering Storm ruleset isnt written into the mod, because the map script simply doesnt appear in the UI list, but does appear if selecting vanilla Civ6 or Rise & Fall rulesets.
Played a few turns with R&F ruleset, map seemed to work well :)

But yeah, will this require a major update to the script? For it to work with the natural disasters, volcanoes etc? I hope its fairly easy for you to implement, because this was always my favorite script for Civ5 and Civ4.
 
Last edited:
Top Bottom