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

Problems with Map Generation

Discussion in 'Civ5 - Creation & Customization' started by Halcyan2, Nov 18, 2013.

  1. Halcyan2

    Halcyan2 Emperor

    Joined:
    May 12, 2012
    Messages:
    1,380
    I'm working on my first mod. The rest of the mod (using XML) seems to work fine, but I am having issues with XML (all of it has <GameData> tags but I will not include them in the rest of this post) and Lua code involving Natural Wonders.


    1. I would like to increase the number of Natural Wonders that show up in a map. I have tried changing the XML:

    <Worlds>
    <Update>
    <Set NumNaturalWonders="10"/>
    <Where Type="WORLDSIZE_HUGE"/>
    </Update>
    </Worlds>

    and the Lua script from AssignStartingPlots:

    [GameInfo.Worlds.WORLDSIZE_HUGE.ID] = 10

    but no matter what, the test games keep capping it at the normal number of 7, even when there should be plenty of map space to add more wonders.


    2. I have also tried changing the Frequency of the Natural Wonders in the XML, example:

    <Features>
    <Update>
    <Set OccurrenceFrequency="0"/>
    <Where Type="FEATURE_CRATER"/>
    </Update>
    <Update>
    <Set OccurrenceFrequency="10000"/>
    <Where Type="FEATURE_KILIMANJARO"/>
    </Update>
    </Features>

    but I am still getting map results which include Frequency 0 NW's and not including Frequency 10000 NW's.


    3. I also want to change the Ripple value between NW's and City States, changing the appropriate code in AssignStartingPlots.lua:

    self:placeResourceImpact(x, y, 5, 1)

    to

    self:placeResourceImpact(x, y, 5, 4)

    but that doesn't seem to be working either.

    In this case, it might be because I'm not correctly implementing Lua (not sure). I have a replacement version of AssignStartingPlots.lua and I have changed "Import into VFS" to TRUE.

    Now I've tried running the game like that, or by going to Properties->Content and Adding the lua file as either an InGameUIAddIn or as a MapScript, but in all three scenarios the game doesn't seem to be using or recognizing my replacement Lua file.

    Am I doing something wrong in trying to replace the Lua file?



    Thanks for any help you can provide!
     

Share This Page