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

Communitu_79

Discussion in 'Civ5 - Map Scripts' started by tu_79, Aug 12, 2019.

  1. Cat-du-fromage

    Cat-du-fromage Warlord

    Joined:
    Nov 17, 2018
    Messages:
    177
    Gender:
    Male
    right.. even if it's true, no need to be mean, i was just asking a question.
     
  2. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    6,919
    Location:
    Malaga (Spain)
    I'm sorry. I didn't intend to be rude.

    I don't know of any easy way to revert all the changes. Maybe you could pick the old Communitas script, then take ours and look for the pieces that you like, and just change that. But there are dezens of changes, from resource distribution to forest generation.

    Gameplay wise, I am opposed to polar canals. I think it is gamey to always have an easy way for circumnavigation at a known location. In this map you can still circumnavigate, but you have to find the location, and if you want to use the passage at will, probably you'll need to conquer a few cities.

    I have yet to try the latest changes from azum4, but I'm half confined at home with my kid, so I can't work right now. This is modding at times of corona.
     
    Erikose likes this.
  3. Cat-du-fromage

    Cat-du-fromage Warlord

    Joined:
    Nov 17, 2018
    Messages:
    177
    Gender:
    Male
    No problem, maybe i wasn't clear enough too.

    i was more thinking about an option when you set the map : north/south Canal open On/Off, like you did for the strategic balance "Strategic Balance (On, Off) - turns Strategic Balance on or off"
     
  4. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    6,919
    Location:
    Malaga (Spain)
    That's @azum4roll who did that. I'm not that code savvy.

    In the case of strategic balance, the default distribution was needed as a backup, since VP introduces its own resources in a way that meddles with the map script. This is the reason why Communitas has always been so rich in resources. It was not intended, but a side effect of mixing Communitas and VP.

    We don't want to lose the methods for distributing resources that Communitas provide, but currently the result is not proper. While we figure a way out, there's that option for vanilla resource distribution.

    In the case of the canals, I don't think it's necessary, but if too many people are interested, then I could reconsider.
     
  5. Cat-du-fromage

    Cat-du-fromage Warlord

    Joined:
    Nov 17, 2018
    Messages:
    177
    Gender:
    Male
    HI, i heard you wanted some feedback about the 1.16.

    First we do enjoy our multiplayer game with the 1.16, there are a lot of improvement about map generation like smalle islands we really like.

    Trees: in our opinions the amout of trees is very good now, at least there is no complains about that

    Some issues:
    -ressources abundant: i'm always tempting to use it but after some test it seems ressources are too much abundant leading to big balance issues about pantheon relying on ressources (god of hunt is op with ressources abundant). maybe ressources abundant should have a little less ressources.
    EDIT Only if Communitu ressource placement is selected

    -Hills/moutains: there is a balance issues about hills and moutains, with world age 3 billions one continent seems to have all the moutain(at least 90%) and the rest is randomly distributed. also hills are too much abundant even with world age 3 billions(making melee cavalerie useless)
     
    Last edited: Apr 1, 2020
    tu_79 likes this.
  6. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    6,919
    Location:
    Malaga (Spain)
    These are the basic values:
    Code:
        --Adjusting these will generate larger or smaller landmasses and features.
        mglobal.landMinScatter            = 0.06     --Recommended range:[0.02 to 0.1]
        mglobal.landMaxScatter            = 0.10    --Recommended range:[0.03 to 0.3]
                                                --Higher values makes continental divisions and stringy features more likely,
                                                --and very high values result in a lot of stringy continents and islands.
                                              
        mglobal.coastScatter            = 0.08     --Recommended range:[0.01 to 0.3]
                                                --Higher values result in more islands and variance on landmasses and coastlines.
                                              
        mglobal.mountainScatter            = 200 * mapW --Recommended range:[130 to 1000]
                                                --Lower values make large, long, mountain ranges. Higher values make sporadic mountainous features.
      
        -- Terrain
        mglobal.mountainWeight            = 1  --Weight of the mountain elevation map versus the coastline elevation map.
        mglobal.belowMountainPercent    = 0.95 -- Percent of non-mountain land
                                               -- flatPercent to belowMountainPercent : hills
        mglobal.flatPercent                = 0.70 -- Percent of flat land
        mglobal.hillsBlendPercent        = 0.15 -- Chance for flat land to become hills per near mountain. Requires at least 2 near mountains.
        mglobal.terrainBlendRange        = 2       -- range to smooth terrain (desert surrounded by plains turns to plains, etc)
        mglobal.terrainBlendRandom        = 0.4  -- random modifier for terrain smoothing
    This is the relevant option:
    Code:
        local oWorldAge = Map.GetCustomOption(1)
        if oWorldAge == 4 then oWorldAge = 1 + Map.Rand(3, "Communitas random world age - Lua") end
        if oWorldAge == 1 then
            print("Map Age:  New")
            mglobal.belowMountainPercent    = modifyOdds(mglobal.belowMountainPercent,    0.9)
            mglobal.flatPercent                = modifyOdds(mglobal.flatPercent,            0.8)
            mglobal.landMinScatter            = modifyOdds(mglobal.landMinScatter,        2/3)
            mglobal.landMaxScatter            = modifyOdds(mglobal.landMaxScatter,        2/3)
            mglobal.coastScatter            = modifyOdds(mglobal.coastScatter,            2/3)
            mglobal.mountainScatter            = mglobal.mountainScatter / 1.5
        elseif oWorldAge == 3 then
            print("Map Age:  Old")
            mglobal.belowMountainPercent    = modifyOdds(mglobal.belowMountainPercent,    1.1)
            mglobal.flatPercent                = modifyOdds(mglobal.flatPercent,            1.2)
            mglobal.landMinScatter            = modifyOdds(mglobal.landMinScatter,        1.5)
            mglobal.landMaxScatter            = modifyOdds(mglobal.landMaxScatter,        1.5)
            mglobal.coastScatter            = modifyOdds(mglobal.coastScatter,            1.5)
            mglobal.mountainScatter            = mglobal.mountainScatter * 1.5
        else
            print("Map Age:  Normal")
        end
    and this function
    Code:
    -- Get modified odds when you roll the dice multiple times
    function modifyOdds(odds, multiplier)
        if (odds >= 1) then
            return 1
        end
        if (multiplier <= 0) then
            return 0
        end
        return 1 - math.pow(1 - odds, multiplier)
    end
    An example of this function:
    modifyOdds(90%, 1.1) = 92%
    modifyOdds(30%, 0.8) = 24.8%
    As you may notice, it prevents values out of the 0-100% range, so it's a safe function to use on percentage values.

    So, currently Old Age values are:
    belowMountainPercent = 96% (Not good, this makes fewer mountains, not more) (*)
    flatPercent=76.4% (Meaning a 20% of the tiles are hills, while 4 millions age has 25% hills) (*)
    landMinScatter= 0.146 (barely noticeable, as the range is 0.03 to 0.3)
    the other scatter values have the same problem, they are not percentage values.
    the only one that might be noticeable is mountainScatter=300 (instead of 200)

    (*) This is in contradiction with your feedback, I wonder what is going on.
     
  7. Stalker0

    Stalker0 Baller Magnus

    Joined:
    Dec 31, 2005
    Messages:
    6,162
    I would like to see a bit more luxs on the islands the standard map creates. Some of those islands are quite tempting, lots of sea resources, even some stone and the like. But it also takes an incredible amount of naval defense to hold them, so it would be nice to get just a bit more incentive to take them.
     
    Erikose likes this.
  8. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    6,919
    Location:
    Malaga (Spain)
    Lux are placed by Vox Populi. Sorry.
     
  9. TadhgEomonn

    TadhgEomonn Chieftain

    Joined:
    May 10, 2016
    Messages:
    52
    Location:
    Asheville NC
    FYI: Playing 1.16: Barrier Reef is located up at the north pole ice cap, but without any landmass even remotely near it--no islands, no island mountains, no substantial land at all--only ice cap and ocean.
     
  10. azum4roll

    azum4roll King

    Joined:
    Jul 17, 2018
    Messages:
    628
    Gender:
    Male
    Probably a rare case where there was a one-tile island near it that was removed to "open" the inner sea. Can I have a screenshot?
     
  11. TadhgEomonn

    TadhgEomonn Chieftain

    Joined:
    May 10, 2016
    Messages:
    52
    Location:
    Asheville NC
    Understood.

    Thank you for this map script and all the good work the team has done to make it consistent with VP.
     
    Last edited: Apr 8, 2020
  12. Asterix Rage

    Asterix Rage Warlord

    Joined:
    Jun 6, 2010
    Messages:
    1,173
  13. Cat-du-fromage

    Cat-du-fromage Warlord

    Joined:
    Nov 17, 2018
    Messages:
    177
    Gender:
    Male
    After a lot a teste it seems some ressources that used to be common as monopole start aren't use anymore as monopole start(Tea, coffee, cotton, wine, tobacco, olives and ivory) which hurt diversity and surprise when you launch a game. Is it intended?

    funny after searching in the map script, it seems all ressources concerned are those who do not spawn on forest :crazyeye:, so.... maybe there is too much forest xD

    EDIT: there is also a side effect when choosing a bigger ocean rift, by choosing "Wide" the islands between the two continents became way smaller . i know it is intended the goal is to seperate the continents by more water. Problem is this setting is in conflict with "water level" who also reduce the amount of earth, so by choosing a "wide rift" + "sea level = High" you got a water map.

    My suggestion(may not be the best):to me it would be more interesting that ocean rift "wide" garantie 2 plots of oceans between the continents and the "new continents" so we can't explore them early with trireme. and make islands between the two "start continents" more fleshy and interesting for a good colonization without taking out a big tone of land like it does now.
     
    Last edited: Apr 10, 2020
    tu_79 likes this.
  14. mikes61293

    mikes61293 Warlord

    Joined:
    Nov 8, 2015
    Messages:
    106
    I fired up a bunch of games last night with this map script. All where on huge size. I messed around with the settings a bunch, but I couldn't get the type of map generation I wanted. I ended up going back to continents. Here are my 2 cents:

    - All of the land masses we're like Europe with lots of peninsulas and inland seas or like Indonesia/Austrialia being a chain of large islands. I didn't see any solid continents like Asia, Africa or the Americas.
    - Ocean rifts should be wider
    - Overall land mass should be less
    - Chance of inland seas should be reduced
    - Number of offshore islands should be turned down.
     
  15. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    6,919
    Location:
    Malaga (Spain)
    Hey, some of the issues you mention are from the very first release, you sure you are in the 1.16 version?

    About rifts.
    Currently they are defined here:
    mglobal.oceanRiftWidth = math.max(2, Round(mapW/30))
    This means the impassable tiles are 2, except for small maps, where it is 1.
    I think there is a bug. should be math.min function.
    If everyone wants it bigger, it can be changed to
    mglobal.oceanRiftWidth = math.max(3, 1 + Round(mapW/30))

    Also, atlantic and pacific are basically different. Atlantic are bigger at the poles, and form some Greenland masses. Pacific are bigger at the equator and form many small islands. I find Atlantic ones harder to traverse.

    I placed more land in purpose. The logic is that even though the Earth percentage of land is lower, this map does not include the last 5 degrees in latitude (the polar regions). Since the land masses are not very blocky, I felt that more land was needed for breathing.

    About inland seas, I tried to raise the number of lakes, and it kinda works for standard map size, but for large maps the become inland seas, and then some canals will try to open paths. I couldn't find an elegant solution, but would hate to miss lakes. (maybe the ideal way is to force the creation of lakes of a given size, instead of letting the random generator do its work).

    Are those offshore islands in a Pacific ocean? Also, they should have some nice resources around, so most islands are settleable.

    Thanks for testing. Feedback is necessary.
     
    Last edited: Apr 11, 2020
    mikes61293 and Erikose like this.
  16. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    6,919
    Location:
    Malaga (Spain)
    Well. Time for a debuging.

    This is the TO DO list.

    1> mglobal.oceanRiftWidth bug.
    Maps sizes are classified by being thinner than 32 (duel), wider than 60 (large and huge) and the rest. Duel maps need no rifts (IIRC, oceans are not created for maps under 30 width). Normal maps need 2 impassable tiles, while bigger maps can do with 3, for aesthetic reasons.
    That would change to
    mglobal.oceanRiftWidth = 2 + math.floor(mapW/60)

    2> Related to 1> Map Ocean Width Option.
    A narrow rift is 1 impassable tile, as it is already coded.
    A wide rift should be 3 to 4 impassable tiles, so that should be changed to
    Code:
        local oRiftWidth = Map.GetCustomOption(11)
    
        if oRiftWidth == 1 then
            print("Map Ocean Width: Narrow")
            mglobal.oceanRiftWidth = 1
            mglobal.landPercent = mglobal.landPercent - 0.02
        elseif oRiftWidth == 3 then
            print("Map Ocean Width: Wide")
            mglobal.oceanRiftWidth = 1 + mglobal.oceanRiftWidth
            mglobal.landPercent = mglobal.landPercent + 0.05
        end    
    3> World Age bug
    An older newer Earth should have a few more mountains and many more hills. The distribution and scattering I feel that should be left as the default setting, otherwise it can lead to weird map distributions.
    This is current code:
    Code:
        local oWorldAge = Map.GetCustomOption(1)
        if oWorldAge == 4 then oWorldAge = 1 + Map.Rand(3, "Communitas random world age - Lua") end
        if oWorldAge == 1 then
            print("Map Age:  New")
            mglobal.belowMountainPercent    = modifyOdds(mglobal.belowMountainPercent,    0.9)
            mglobal.flatPercent                = modifyOdds(mglobal.flatPercent,            0.8)
            mglobal.landMinScatter            = modifyOdds(mglobal.landMinScatter,        2/3)
            mglobal.landMaxScatter            = modifyOdds(mglobal.landMaxScatter,        2/3)
            mglobal.coastScatter            = modifyOdds(mglobal.coastScatter,            2/3)
            mglobal.mountainScatter            = mglobal.mountainScatter / 1.5
        elseif oWorldAge == 3 then
            print("Map Age:  Old")
            mglobal.belowMountainPercent    = modifyOdds(mglobal.belowMountainPercent,    1.1)
            mglobal.flatPercent                = modifyOdds(mglobal.flatPercent,            1.2)
            mglobal.landMinScatter            = modifyOdds(mglobal.landMinScatter,        1.5)
            mglobal.landMaxScatter            = modifyOdds(mglobal.landMaxScatter,        1.5)
            mglobal.coastScatter            = modifyOdds(mglobal.coastScatter,            1.5)
            mglobal.mountainScatter            = mglobal.mountainScatter * 1.5
        else
            print("Map Age:  Normal")
        end
        mglobal.mountainScatter = mglobal.mountainScatter * 0.00001
    where modifyOdds(x,y) = 1 - (1-x)^y

    Proposed code:
    Code:
        local oWorldAge = Map.GetCustomOption(1)
        if oWorldAge == 4 then oWorldAge = 1 + Map.Rand(3, "Communitas random world age - Lua") end
        if oWorldAge == 1 then
            print("Map Age:  New")
            mglobal.belowMountainPercent    = modifyOdds(mglobal.belowMountainPercent,    0.85)
            mglobal.flatPercent                = modifyOdds(mglobal.flatPercent,            0.75)
        elseif oWorldAge == 3 then
            print("Map Age:  Old")
            mglobal.belowMountainPercent    = modifyOdds(mglobal.belowMountainPercent,    1.1)
            mglobal.flatPercent                = modifyOdds(mglobal.flatPercent,            1.2)
        else
            print("Map Age:  Normal")
        end
        mglobal.mountainScatter = mglobal.mountainScatter * 0.00001
    A very small fix of the percentages so the scaling is the same, and removing the scattering changes.

    4> Avoid very low food start locations. This is a work for @azum4roll

    FUTURE
    5> Create lakes of desired size, rather than letting them form out of scattering.


    EDIT. Uploaded changes from 1 to 3.
     

    Attached Files:

    Last edited: Apr 12, 2020
    Zarggg, Maxxim69 and Cat-du-fromage like this.
  17. azum4roll

    azum4roll King

    Joined:
    Jul 17, 2018
    Messages:
    628
    Gender:
    Male
    Aw, since that's basically a bugfix version, I'd be naming it 1.16.1 instead.

    The current lakes are fine, since we have a surefire way to remove all inner seas (at least those not lake-sized) already.
     
    Erikose and tu_79 like this.
  18. SilentReply

    SilentReply Chieftain

    Joined:
    Jan 13, 2020
    Messages:
    55
    Gender:
    Male
    I'm curious what the standard amounts of each strategic resource are. Oil amount seems particularly high, about double that of other strategics. Is it possible it is being "distributed" twice due to land and ocean plots?

    Here's the amounts of each strategic in my game (standard size, strategic balance on, all else standard):
    Horse - 90
    Iron - 138
    Coal - 81
    Aluminum - 103
    Oil - 211
    Uranium - 22

    I've been happy with the amount of forests recently, but as someone pointed out some luxuries do seem very rare. Is there an easy way to run simulations of many maps and pull the resource quantities from each?

    Thanks for your work on this script. It is my go to map and I hope it only continues to improve!
     
  19. azum4roll

    azum4roll King

    Joined:
    Jul 17, 2018
    Messages:
    628
    Gender:
    Male
    That's a lot more oil than usual. Probably just the work of RNG. There's supposed to be only ~100 oil on a standard map.
     
    SilentReply likes this.
  20. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    6,919
    Location:
    Malaga (Spain)
    Civ v toolkit includes a tool for generating maps, but I didn't see an easy way to check resources amount. That's why I wasn't able to balance resources until azum kicked in.
     
    SilentReply likes this.

Share This Page