1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

PerfectWorld6 6

Map Script for Civ 6

  1. pokiehl

    pokiehl Chieftain

    Joined:
    Mar 5, 2017
    Messages:
    481
    Up to turn 400+ in my Standard game. No crashes or issues. After this I'm going to try a custom map that is 15% larger than my Gigantic map, and disable PW6's function that increases size.
     
  2. cephalo

    cephalo Chieftain

    Joined:
    Jul 26, 2007
    Messages:
    2,042
    Location:
    Missouri, USA
    One thing I forgot to ask is whether people are using Rise and Fall or vanilla. PW will place reefs if the g_FEATURE_TYPE_REEF is defined, but it might be defined even if you're playing vanilla. It's probably not the best way to make that decision.
     
  3. jacktannery

    jacktannery Chieftain

    Joined:
    Apr 8, 2006
    Messages:
    446
    Location:
    Dublin
    Hi, great map script. I'm using Rise and Fall and NOT using YNAMP. I am having crashes when I try to load late-game saves.
     
  4. shaglio

    shaglio The Prince of Dorkness

    Joined:
    Jun 15, 2001
    Messages:
    3,317
    Gender:
    Male
    Location:
    Lawrence, MA, USA
    I'm using Rise & Fall and not using YnAMP. Most of my crashes occur after I press "End Turn." Luckily I autosave every turn, and the problem doesn't duplicate itself upon reloading.
     
  5. BobbyPeru

    BobbyPeru Chieftain

    Joined:
    Nov 1, 2018
    Messages:
    1
    Gender:
    Male
    Hi everyone!

    It my first post on civfanatics forum:)
    I have installed Perfectworld few days ago and still I really surprise - maps are amazing - thanks for this.
    Unfortunately after 133 turn I have occured a problem with loading saved game. Everytime when I loaded the saved game - game crashed and exit to windows. Initially I thought that it concerned to city-state which I conquered but not - after few save/load using previous saved games I'm sure that this error is concern to first contact with German civilization. Everytime time (in my tests) when I met this civilization and after this I saved the game is not possible load this saved game.
    I did another test, I loaded really early saved game (around 11 turn) and I used "Reveal all" - in time of displaying of many screens with informations that my civilization found nature wonder - game crashed and exit to windows - just the same when I load the game saved after I met Germans.This problem doesn't occur when I play without Perfest world mod.

    I did one more test - I created two completelly new games (for 4 and for 10 cilizations) with Perfect world and I used "Reveal all" - games crashed the same like previously.

    I use Rise and fall(and other official plugins) and Perfect world.
    Before I have used Perfectworld I tried to use Civ6-YnAMP-master mod - but I doesn't work, game doesn't start - so I completelly removed thid mod.

    thanks
    Bobby

    ps. Database.log:
    [3482977.961] [Localization]: StartupErrorMessages.xml
    [3482977.961] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
    [3482997.043] [Localization]: Validating Foreign Key Constraints...
    [3482997.044] [Localization]: Passed Validation.
    [3482997.061] [Configuration]: Validating Foreign Key Constraints...
    [3482997.062] [Configuration]: Passed Validation.
    [3483000.552] [FullTextSearch]: Initializing FullTextSearch
    [3483001.043] [Gameplay]: Validating Foreign Key Constraints...
    [3483001.063] [Gameplay]: Passed Validation.
    [3483003.543] [Configuration]: Validating Foreign Key Constraints...
    [3483003.544] [Configuration]: Passed Validation.
    [3483025.112] [FullTextSearch]: FTS - Creating Context
    [3483035.476] [Configuration]: Validating Foreign Key Constraints...
    [3483035.476] [Configuration]: Passed Validation.
    [3483041.660] [Gameplay]: Validating Foreign Key Constraints...
    [3483041.687] [Gameplay]: Passed Validation.
    [3483051.034] [FullTextSearch]: FTS - Creating Context
    [3483051.684] [FullTextSearch]: FTS - Creating Context
    [3483053.529] [FullTextSearch]: FTS - Creating Context
     
    Last edited: Nov 1, 2018
    cephalo likes this.
  6. sampo

    sampo Chieftain

    Joined:
    May 14, 2008
    Messages:
    21
    Location:
    Finland
    What I was actually wondering could we have jungle on both, the plains and grassland, tiles. Maybe we could have a wetter jungle on grassland and a dryer jungle on plains.
     
  7. resorcerer

    resorcerer Chieftain

    Joined:
    Apr 3, 2013
    Messages:
    75
    Cephalo, I'm curious why you chose to use Lua's native random number generator, seeded with TerrainBuilder.GetRandomNumber. I used TerrainBuilder.GetRandomNumber for every random number in my map script, and people have been reporting multiplayer desyncs with it. I don't see anyone having the same issues with PerfectWorld. I don't understand why this should make a difference (isn't the whole point of having TerrainBuilder.GetRandomNumber random numbers consistent across platforms?), but maybe I should switch to the method you're using.
     
  8. PonderThis

    PonderThis Chieftain Supporter

    Joined:
    Nov 15, 2014
    Messages:
    92
    I just finished a game on a Small map and everything was just fine, so I'm thinking it's just the slightly larger map sizes that were doing me in on Standard.

    How do I do that? (Disable PW6's function that increases size)
     
  9. Pfeffersack

    Pfeffersack Chieftain

    Joined:
    May 10, 2003
    Messages:
    2,190
    Location:
    Germany
    Since my current game with it on the biggest possible map size has now come to the point where the last autosaves crashes always when reloading (and I haven't even reached T100), I might try that as well. It' so sad that this great map scrit somehow manages to strain the engine of Civ6 or CPU ressources too much :(
     
  10. Pfeffersack

    Pfeffersack Chieftain

    Joined:
    May 10, 2003
    Messages:
    2,190
    Location:
    Germany
    I might have found a solution for the crashes…

    Try lowering ingame video settings.

    I started a game on the biggest possible size with this mod, having activated some other mods as well...a few dozen turns into the game the crashes started, become more and more frequent, I fought them by reloading autosaves. Until a point, close to T100, where the last autosave constantly refused to load. Since I never believed in the theory of some other mod causing the problem, I was about to restart on a smaller map to see if it would make a difference. But then a thought struck my mind: Why should a smaller map help, if this isn't related somehow to something like performance/memory/graphics? So in a last desperate attempt I reduced *all* graphical settings to minimum - and the autosave loaded fine within seconds. I have continued already a couple of turns - and no more crashes in them, something which just wasn't possible before.

    Of couse I can't guarantee its working for everyone (might depend on yur CPU), but it may be worth a try. Needs of course more testing to see if its maybe only necessarily to reduce/turn off a certain video option. Good luck and happy holidays!
     
    pokiehl likes this.
  11. pokiehl

    pokiehl Chieftain

    Joined:
    Mar 5, 2017
    Messages:
    481
    @cephalo I believe I've found the solution to the crashing - the function to increase map size, as I suspected before, starting at line 297:


    Code:
    function GetMapInitData(MapSize)
        local MapSizeTypes = {};
        local Width = 0;
        local Height = 0;
    
        for row in GameInfo.Maps() do
            if(MapSize == row.Hash) then
                Width = math.floor(row.GridWidth * 1.15);
                Height = math.floor(row.GridHeight * 1.15);
            end
        end
        
        if ( Width % 2 ~= 0 ) then
            Width = Width + 1
        end
        if ( Height % 2 ~= 0 ) then
            Height = Height + 1
        end
        print("width and height",Width,Height)
        local WrapX = true;
    
        return {Width = Width, Height = Height, WrapX = WrapX,}
    end
    
    Previously, using my custom Gigantic size map + all my other mods, PW6 would result in in-game + loading crashes to the desktop. The instability would consistently begin around turn 100 or so.

    I decided to test my theory, so I completely deleted that function and then loaded up an autoplay game. Currently, it is past turn 300 with no crashing, and it loads fine (although the loading does take quite a while).

    Would it be possible for you to delete this function and maybe compensate by lowering the amount of mountains or something? Alternately, I can actually create a version of my Gigantic size with the width and heigth increased by 15% each; then we can really see if it's the size increase or the actual function causing it. If it's the function, then you can just add your own map sizes in and it'll be no problem.

    @Pfeffersack tagging you because you may be interested in the solution as well.
     
  12. Grayson Carlyle

    Grayson Carlyle Chieftain

    Joined:
    Mar 26, 2015
    Messages:
    26
    This was something I did to make Civ 5 load very large maps on turn 1200+ where every single tile had been developed and most farms were no longer visible. I can totally see it being a solution in Civ 6 too.
     
  13. Pfeffersack

    Pfeffersack Chieftain

    Joined:
    May 10, 2003
    Messages:
    2,190
    Location:
    Germany
    Thanks for doing so and further investigating things. I was too optimistic with my euphoria in regard to lowering video settings - yes it helped for a certain time, but it seems to be more a thing of delaying the inevitable. Currently the only way to stay clear of those crashes seems to be avoiding the map sizes beyond huge (I currently play on huge and have no troubles) I would be really great to track down, if sheere size is the problem or only that special function you suspect - if 2nd, then there would be still a chance to enjoy PW6 on truly wide maps.


    As said above, it's sadly no real permanent solution to a certain kind of crahses we seem to have here. Still, it might help to prevent other kinds of memory related ones and help to keep the game play- und enjoyable. The best eyecandy is worth nothing, if the the entire map is dotted with black parts because of delayed loading.
     
  14. pokiehl

    pokiehl Chieftain

    Joined:
    Mar 5, 2017
    Messages:
    481
    I do not find it to be a "sheer size" problem because I routinely use other scripts like Detailed Worlds with very big sizes with no problems. I am convinced it is the function - I strongly encourage you to do this little experiment for yourself because I would like confirmation that it's not just a coincidence for me :)
     
  15. seawench

    seawench Chieftain

    Joined:
    Feb 10, 2017
    Messages:
    2
    Gender:
    Female
    Is there anything I would need to do other than delete the code in question? Does that function do anything special that the mod absolutely needs? I love this map script and want to keep playing with it but I couldn't get past about turn 130.
     
  16. pokiehl

    pokiehl Chieftain

    Joined:
    Mar 5, 2017
    Messages:
    481
    That function only expands the map width by 15% and height by 15% because Cephalo considers that PW makes less habitable land overall due to the mountain chains and whatnot. It does nothing else. Just highlight the exact lines I posted and hit 'delete' and save.

    Please be sure to update this thread with your experience.
     
  17. Pfeffersack

    Pfeffersack Chieftain

    Joined:
    May 10, 2003
    Messages:
    2,190
    Location:
    Germany
    You could be easily right - now that you say, I remember that before becoming addicted to PW6 I used Seven05's map scripts detailed/larger worlds for a longer period - and never encountered any crashes despite playing only the biggest map sizes offered. I will follow your advice, modify the file and fire up a test in the next days :)
     
  18. cephalo

    cephalo Chieftain

    Joined:
    Jul 26, 2007
    Messages:
    2,042
    Location:
    Missouri, USA
    I think it's safe to assume that this function is the culprit. Then I need an acceptable solution. I don't like the idea of using less mountains, because the mountain ranges look so darn good. I would prefer to make adjustments the way that the other map size mods do. I'll have to re-research that when I have time.

    EDIT: Also at some point, I would like to completely redo the civ placement and resource placement code. The starts and resource placement is abysmal on this map.
     
  19. pokiehl

    pokiehl Chieftain

    Joined:
    Mar 5, 2017
    Messages:
    481
    Cephalo, one solution may be to just add your own custom PW6 map sizes - like "PerfectWorld Small," "PerfectWorld Standard" etc. These could be the same as the vanilla sizes, just with the height and width 15% larger. Then the player can choose those to play with. You can even make it so that the vanilla sizes are not selectable when the PW script is selected in the map drop down. This way, the end result of the map sizes is the same.

    If you decide to go this route, I can make the configuration files for you.
     
  20. cephalo

    cephalo Chieftain

    Joined:
    Jul 26, 2007
    Messages:
    2,042
    Location:
    Missouri, USA
    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.
     

Share This Page