Sid Meier's Civilization VI

Sid Meier's Civilization VI

TSL Earth Remastered
 This topic has been pinned, so it's probably important
totalslacker  [developer] Aug 27, 2020 @ 5:02pm
INSTRUCTIONS: Changing the Map or Starting Positions
Default Mod Location: ..Steam\steamapps\workshop\content\289070\1290583081

1290583081 is the mod ID and folder name for this mod

All maps are LUA files located in the Maps folder of this mod. You can open these with any text editor.

Default Logs folder location: ..My Games\Sid Meier's Civilization VI\Logs

Recommended text editor is Notepad++ (free download online, makes working with code visually much easier)

How to Make Changes to the Map Itself:

First use worldbuilder to generate a new copy of the map you're playing on, with your preferred map settings. SET NATURAL WONDERS TO EMPTY (they are added later when you start a new game)

Make your changes to the map in the worldbuilder, then use the "Export Map to Log" option (found at the bottom when you open the in-game menu).

Open your Lua log file, and you'll see a bunch of lines like this:
InGameTopOptionsMenu: MapToConvert[149][0]={"TERRAIN_OCEAN",-1,-1,{{0,-1},{0,-1},{0,-1}},{-1,0},{0,0,0},-1}

Each line like this represents one hex plot on the map. Every line describes the X,Y coordinates, what features or resources are present, rivers, cliffs, continents, etc...

Copy all of those and paste into the map script file you want to change, overwriting the existing lines of map code. There should be a clearly marked section where you can insert the code, please look carefully.

The easiest way to do this is to find the first line in the log file you want to copy and use CTRL+SHIFT+END to select the entire exported list. There might be a few unrelated lines of code at the end, delete those.

Final step is to use CTRL+F to find and replace every InGameTopOptionsMenu: with an empty space.

Don't forget! You must delete every instance of InGameTopOptionsMenu: or the map will not load! Use the find and replace method I described previously to do this.

FINAL NOTES FOR GATHERING STORM USERS:
Use CTRL+F to find and replace all "FEATURE_ICE" with -1 as this map script generates the ice automatically every new game. Also replace all "FEATURE_FLOODPLAINS" "FEATURE_FLOODPLAINS_GRASSLAND" and "FEATURE_FLOODPLAINS_PLAINS" with -1 as floodplains are also generated by this map script (Gathering Storm only)

How to Change Starting Positions for Civilizations or Natural Wonders

Open MapValues.xml in the Maps folder of this mod.

Civilization starting locations look like this:

<Replace MapName="TSLEE" Civilization="CIVILIZATION_AMERICA" X="22" Y="40" />

Natural Wonder starting locations look similar:
<Replace MapName="TSLEE" X="8" Y="44" FeatureType="FEATURE_CRATER_LAKE" TerrainType="TERRAIN_COAST" />

Simply change the X,Y coordinates to a new plot to move starting locations. You can look these up by loading the map in the worldbuilder.

You can add a new starting location for a modded Civ or NW using the same format, but you will need to open the files for that mod and look up the database name for the Civ or NW.