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

Adding more players to original TSL maps

Discussion in 'Mod Creation Help' started by WineGuy, Apr 24, 2020.

  1. WineGuy

    WineGuy Chieftain

    Joined:
    Apr 24, 2020
    Messages:
    4
    Gender:
    Male
    First time poster, long-time lurker (and player of the Sid Meier series since Civ1...logged 740 hours on Civ6)

    Two questions:

    First, is it possible to add more players to the TSL Europe and TSL Earth map that came with the game (single player). I love these two maps but they'd be much better with 50% more nations. I've tried YnAMP mods and nothing seems to work. I know there are other World and Europe maps out there that are less restrictive, but I was wondering about the two maps that came with the game.

    Second, has anyone stripped the maps from the scenarios (Alexander, Vikings, etc) and made those into TSL maps that can be played without the scenario restrictions? It would be fun to play an open game on some of those maps, but I've never seen it done before.
     
    Benualdo likes this.
  2. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    You can create a new map in worldbuilder with your mods enabled then select the "TSL Earth" provided by Firaxis. This way in "advanced" mode you'll be able to add more starting positions. Add the Civilizations and City-States you want to be available when playing your "mod" and save.
    Then enable your saved map as a mod then start a new game and select your map in the list (restarting the game before starting new game is recommended) but in my experience you have to select all the starting civilizations else the game may crash before start (some missing starting positions may be the reason why, I guess). Also, you'll be limited to 8 civs because of the map size.
     
    Last edited: Apr 24, 2020
  3. WineGuy

    WineGuy Chieftain

    Joined:
    Apr 24, 2020
    Messages:
    4
    Gender:
    Male
    So...I can't go above 8 civs on the TSL Earth map even if do I the Worldbuilder approach?
     
  4. James_Champagne

    James_Champagne Chieftain

    Joined:
    Sep 7, 2019
    Messages:
    92
    Gender:
    Male
    Yeah, I'm playing a game right now on the TSL Earth map and I wish they had a larger (official) version than just the standard 8 player max one (also, is it just me or are rivers not named in that map? Oceans are, but not the rivers).
     
  5. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    What I'm trying to achieve now is a .lua or .xml with custom starting locations for all civs including the ones from my mod for the standard earth map but so far
    Code:
    <GameInfo>
        <StartPosition>
            <Replace MapName="EarthStandard" Civilization="CIVILIZATION_EUROPE" X="39" Y="45" />
            <Replace MapName="TSLEarthStandard" Civilization="CIVILIZATION_EUROPE" X="39" Y="45" />
            <Replace MapName="EarthStandard_XP2" Civilization="CIVILIZATION_EUROPE" X="39" Y="45" />
            <Replace MapName="TSLEarthStandard_XP2" Civilization="CIVILIZATION_EUROPE" X="39" Y="45" />
        </StartPosition>
    </GameInfo>
    does not work because
    Code:
    [2930290.697] [Gameplay] ERROR: no such table: StartPosition
    [2930290.697] [Gameplay]: In Query - insert or replace into StartPosition('MapName', 'Civilization', 'X', 'Y') values (?, ?, ?, ?);
    [2930290.697] [Gameplay]: In XMLSerializer while updating table StartPosition from file NewLeader_DiplomacyInfo.xml.
    so I'm still investigating ...
     
  6. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,342
    Location:
    France
    StartPosition is a table created/used by YnAMP, Firaxis use a table named MapStartPosition and use plot index instead of X, Y.

    I don't know if their table is implemented in the game's code.

    You can convert any map to YnAMP format, then set the TSL as you've done and play it with up to 62 civs.
     
    Benualdo likes this.
  7. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    Thanks these valuable informations ! Effectively after digging into code I was starting to wonder if this wasn't specific to the YnAMP mods ^^
    I'll still try to set MapStartPosition from .xml method or player:SetStartingPlot from .lua to to set player position at startup because I'ld prefer not to embed a map in the mod I distribute to avoid burden with futur map updates if possible.
    Also, I want to be able to play TSL and random, but one caveat I noticed with the Worldbuilder approach is that the civs arent randomly distributed, most of the times I end up having 6 civs out of 8 to start in Europe.
     
  8. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,342
    Location:
    France
    Note that their table is both in the FrontEnd and GamePlay DB (which is what I should have done since the start, to get TSL when on the setup screen), so you may have to load your file in both context for it to take effect.

    But I've not tried anything like that, and can't help with WorldBuilder maps either, I didn't even tried to use them because I was afraid of the possible limitations of using a WorldBuilder Map over a Map Script, like back in civ5 with no MP for WB map. Or your current issue in civ6.
     
  9. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    Actually the only reason I wanted to play the original earth map from Firaxis was because last time I returned to playing Civilization I had a lot of issues when playing the maps created by the community :cry: But I think it it was right after the release of Gathering Storm and it seems theses problems are now fixed so I see no reason anymore not to play with your improved version of the Earth map. I especially like all the options you added when it comes to select civs and city-states, I've always felt like they were missing from the original game.

    Then first I edited directly the \map\GreatestEarthMap\Map.xml file from your mod adding
    Code:
    <!-- Major Civilizations -->
      <StartPosition>
        <Replace MapName="GreatestEarthMap" Civilization="CIVILIZATION_EUROPE" X="42" Y="48" />
    ...
    and it worked but then I tried to do the same this time from my own mod and set the same values using
    Code:
    CREATE TABLE IF NOT EXISTS StartPosition (MapName TEXT, Civilization TEXT, X INT, Y INT);
    INSERT INTO StartPosition (Civilization, MapName, X, Y)
    VALUES
    (
        'CIVILIZATION_EUROPE',
        'GreatestEarthMap',
        42,
        48
    ),
    from an .sql file it did not work.
    Looking at the lua log output I have
    Code:
    Map Script: WARNING : no starting position reserved for LEADER_MACRON of CIVILIZATION_EUROPE
    ...
    Map Script: WARNING ! No TSL for :     CIVILIZATION_EUROPE    LEADER_MACRON
    So I'm still trying to figure out a way of enabling TSL on YnAMP earth maps for my mod uploaded on the Steam Workshop without editing the map file itself :sad:
     
    Last edited: Apr 25, 2020
  10. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,342
    Location:
    France
    maybe with that mod (ignore the warning and see if the scenario map are listed)
    https://steamcommunity.com/sharedfiles/filedetails/?id=1301633651

    What's in the Database.log/Modding.log ?

    (database.log to look for error, modding.log to look for your file being loaded)
     
  11. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,342
    Location:
    France
    Moderator Action: and moved to Mod Creation Help
     
  12. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    There was an error in the code in my previous post (swapped civilization and map names) so I fixed it but still have the issue (spawning at random location with no settler or unit).
    Here is my sql code :
    Code:
    CREATE TABLE IF NOT EXISTS StartPosition
    (  
        MapName TEXT,
        MapScript TEXT,     -- to override MapName reference for specific entries in relation to MapScript (like in region of the Largest Earth Map that were heavily modified and can't use the GiantEarth reference)
        Civilization TEXT,
        Leader TEXT,
        DisabledByCivilization TEXT,
        DisabledByLeader TEXT,
        AlternateStart INT default 0,      
        X INT default 0,
        Y INT default 0
    );
    
    INSERT INTO StartPosition (MapName, MapScript, Civilization, Leader, DisabledByCivilization, DisabledByLeader, AlternateStart, X, Y)
    VALUES  
    (
        'GreatestEarthMap',        -- MapName
        "",                        -- MapScript
        'CIVILIZATION_EUROPE',    -- Civilization
        'LEADER_MACRON',        -- Leader
        "",                        -- DisabledByCivilization
        "",                        -- DisabledByLeader
        0,                        -- AlternateStart
        42,                        -- X
        48                        -- Y
    ),
    and the requested log files.

    Thanks a lot for your help, I'm new to Civ VI modding so I must have missed something obvious.
     

    Attached Files:

  13. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,342
    Location:
    France
    ";" not "," at the end of your code
    Code:
        48                        -- Y
    );
    The
    Code:
    CREATE TABLE IF NOT EXISTS StartPosition
    is just in case you mod is used without YnAMP, you don't need to put the extra column there if you don't use them, because if you use your mod with YnAMP, the table is already created (unless you use a negative load order < -1000)

    if you do use them, and want to not give a value to a column, use NULL instead of "", I'm unsure how my code will react on an empty string there, especially for MapScript that will override what's in MapName, and Leader as when one is set and the "use alternate leader start" option is active it will ignore the rows with only a Civilization.

    Not your fault here, my table should have been better defined, I'm still learning every day.
     
    Benualdo likes this.
  14. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    Thanks, it's working !
    I can now proudly write in my mod description that it's "compatible with Gedemon's YnAEMP mod" :lol:



    I just have now to find the correct locations for all the maps as (42,58) is the location for Paris, not Bruxelles. I know how to do this with WorldBuilder for regular maps but I'm curious about how do you usually get a plot coordinates for lua maps ?
     
  15. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,342
    Location:
    France
    Benualdo likes this.
  16. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    Oops :shifty:
     

Share This Page