Getting a map script into Civ 6

Is there a way to display the coordinates of a map tile? I'm trying to see if what I think is happening is really happening, but I can't really tell. My debug messages might be pure fantasy as far as I know.
 
Ok, so my pangaea breaker and the terra option are working great! However, I noticed that this version of Civ allows river outflow from lakes! This is not something that civ had before, and allows lakes to be incorporated within the river drainage system. I have to take advantage of this. Expect a delay.
 
Excellent to hear - cannot wait! Thanks for working on this.
 
Glad to hear that you are making progress. The delay for getting lakes into the hydrolocial system will be worth the result, I'm sure :)
 
Alright, I spent all weekend on those darn lakes. It was much harder than I thought but I got it working. Now I'm just going to playtest and polish for a bit.

My brain hurts. I need some help with how to configure two custom options for the map. I need an option to 'allow pangaeas' yes or no, and also an option to start in 'old world' or 'start anywhere'. Also, a quick example of how to retrieve them in the script would be good. I don't need the usual 'world age' or climate options, that stuff is handled differently in PerfectWorld.

Also, is there a way to have 'standard' options show up on the initial game setup or are all custom options considered 'advanced' options?
 
Gedemon has added many such custom set-up options in YNAMP (and the Terra script included therein) so hopefully he is equipped to help you with that.

If you decide that you want some help playtesting, I will be more than happy to spend time doing that.
 
In a xml file set as <FrontEndActions>
Code:
<GameInfo>
    <Parameters>
        <Replace ParameterId="NoIceAdjacentToLand" Name="LOC_MAP_NO_ICE_ADJACENT_TO_LAND_NAME" Description="" Domain="bool" DefaultValue="1" ConfigurationGroup="Map" ConfigurationId="NoIceAdjacentToLand" GroupId="MapOptions" SortIndex="2000"/>
    </Parameters>
</GameInfo>

In your map script:
Code:
local bNoIceAdjacentToLand = MapConfiguration.GetValue("NoIceAdjacentToLand");

MapConfiguration.GetValue get the ConfigurationId, the ParameterId is used in other tables like <ParameterDependencies> to check when to display (or not) an option
 
Ok, I got the map option working. Now just tweaking and adjusting. For example, I loved how PW could put a continent centered on the map edge, but in Civ6 this makes an ugly seam, as the textures don't line up.The problem is that attenuating the east/west edges causes the continents to ball up more, which causes some ugliness with the pangaea breaker. It breaks pangaeas beautifully when there are choke points to exploit, but breaking up a large ball looks like a buzzsaw is cutting through it, so I'm thinking of rejecting that scenario and regenerating. It takes a long time, but it's worth it for a better map to play on.
 
I'm having a hard time visualizing these 'seams' you're referring to, but I hope you don't have much trouble working out a different solution if necessary :).

Any chance we can get some preview screenshots of your work in progress? :D
 
Getting very close now! Speaking of screenshots, is there a way in Civ6 to have an extra large version of the minimap so that landform examples can be emphasized? The main map can't really be zoomed out, and the minimap is kinda small.

Also, I'd like to put this on the Steam Workshop also, is there a good guide someone can link to for putting a Civ 6 mod on SW?
 
Minimap Size: This can be done in-game (patched in sometime last year). Simply load up your game, go to Options, then Interface. You will see a slide-bar for Minimap Size.

Initial Steam Upload:
1. On your Steam client, go to Library --> Tools. Search for and download the Sid Meier's Civilization VI Development Tools (don't worry about downloading the large Development Assets for this)
2. Open up that up. The 3D splash screen has 3 buttons to click - the second one is Steam Workshop Uploader. Click that.
3. Hit "Begin."
4. Hit "Upload..."
5. Hit the "..." button to find and select the .modinfo file for PerfectWorld.
6. Hit "Next." On this screen you will select your workshop banner/preview image. This image can only be selected or changed through the Workshop Uploader, not through Steam itself. Everything else on there - visibility, description, tags - can be changed at anytime on the Steam client or when you're on your browser logged into Steam. I always make sure to change visibility to Public on this screen, lest I forget and no one can see my mod!
7. Hit "Next" again - you can enter upload notes here but it's not necessary.
8. Hit "Upload."

From then on, you can go to your mod's page through the Steam client or your browser and add screenshots, change the title/description, etc. Note it usually takes a little bit of time - 30 minutes or so usually - before your mod actually pops up on the "most recent" tab, but anyone can actually see your mod with the link once you upload.

Note: Upload is very fast, but sometimes it will hang at Upload for unknown reasons. If it does, chances are your mod still uploaded. Go to the Steam workshop page for Civ 6 (https://steamcommunity.com/app/289070/workshop/), click the "Your Files" dropdown, then click "Files you've posted." If you see your mod there, it worked.

Updating on Steam
1. Open the Steam Workshop Uploader.
2. You'll see your mods in a list. Select the mod you want to update, on the right column you'll see "Upload a new version."
3. Click that - the rest of the steps are similar to the initial upload.

If the mod hangs while updating, again, chances are it still worked. To verify, go to your mod's page and check the "Updated" time stamp.
 
Last edited:
Thanks again pokeihl. I have another question, in previous civs you had to use a special random number generator for multiplayer, because only the map seed was distributed and the maps were generated synchronously on each client. Is that still and issue or is multiplayer handled differently now? I'm using the lua math library for my randoms right now.
 
Thanks again pokeihl. I have another question, in previous civs you had to use a special random number generator for multiplayer, because only the map seed was distributed and the maps were generated synchronously on each client. Is that still and issue or is multiplayer handled differently now? I'm using the lua math library for my randoms right now.
You need to use TerrainBuilder.GetRandomNumber(maxValue, "Some Optional Text for the Logs") for MP
 
integers and minimum is 0 IIRC

edit: yes, minimum is 0, I'm using some "+1" when getting random entries in lua tables...
 
Last edited:
Here is a fun screenshot of rivers flowing into lakes and draining into other lakes and on to the sea.
20181011185335_1.jpg
 
Oh AWESOME! Man those river systems are so beautiful...and judging by the minimap you've created freaking awesome looking continents! I'm so excited!
 
Back
Top Bottom