As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
Civ6 with Custom World Builder Map

EDIT: Original opening post in spoiler:
I might have made some progress towards starting a game with a custom World Builder map (or at least an edited randomly generated map) ... not quite there but I'll post what I did and maybe someone can figure out the rest.

I read online somewhere that the 6 Arm Snowflake map option is not in fact a map script but a pre-made map. This gave me the idea of locating the pre-made map within the game files and substituting it with a map created in World Builder, then starting a game using the 6-Armed Snowflake map option. This worked perfectly except for the city states. Game started fine, no issues playing through 20 or so turns on a hot seat ... except that I never found any city states. Debug "reveal all" confirmed that city states were not generated.

Description of the steps I took:
1. Navigate to C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization VI\Base\Assets\Maps\BalanceMaps and rename Balanced6.Civ6Map to some other name to preserve the file [this is the pre-made 6-Armed Snowflake map file]
2. Open World Builder in Civ6 through Additional Content. Generate random map with desired settings
3. Edit map as desired. I tested a few of the map editing tools but didn't by any means get in-depth. I added a couple continent designations, changed terrain, adding resources & rainforest. I did not turn any water into land tiles or vice versa. 
4. Save map. I don't think the name at this step is important. I was able to start games with randomly named maps.
5. Navigate to C:\Users\Joshua Peterson\Documents\My Games\Sid Meier's Civilization VI\Saves\WorldBuilder and copy the new map file that was saved in Step 4. Paste the map to the location in Step 1, and rename the file to Balanced6.Civ6Map
6. In Civ6 begin a game. Choose Map Type: 6-Armed Snowflake. I ignored the other settings (I didn't test the No Barbarians or No Tribal Villages checkboxes)

NOTE! The map generated in step 2 has pre-placed player starting locations. It is important to click on each starting location and change the designation from "Player" to "Random Player", otherwise starting a game in step 7 often stacked 2 civs at the same starting location for some reason. With designation set to "Random Player" I never experienced stacked starts. Also It apparently doen't matter which civs are selected when generating the map in Step 2. I just left those at Random and started the game in Step 7 with all civs Random and there was no correlation between the civs actually selected in the World Builder file versus the ones generated in the game.

Regarding city states, the 6-Armed Snowflake does not allow to change the number of city states. It is hard coded to 9. I tried placing 9 "Random City State" start location, no good. City states were not placed on the map. I tried no designating any city state start location, no good. There was one time it did work and I got a hotseat game to start with city states, but I was running on battery without my charger, it was my last desperate attempt, it worked but my computer went into hibernate automatically at 2% battery before I had a chance to make note of what I did frown I saved the game when I finally got my computer charged again so I have the save game file but try as I would I just could not get another game to start again with city states.

I copied the original Balanced6.Civ6Map into the WorldBuilder folder from step 5 and opened the map in World Builder. That map has 9 "Random City State" start locations designated. No idea why it wasn't working for me when I added the city state start locations to a custom map.

I'm wondering now if maybe the settings from step 7 need to match the settings in step 2?? I don't see how that would affect placement of city states, I'm at work now so can't test and my evenings are pretty busy this week.

Screenshot below from a hotseat game with terrain, resource, and continent edits. All land tiles around the start location were changed to grass hill + jungle + banana, and I added another continent to see if that worked properly and it apparently does:




It is possible to edit and load custom maps in Civ VI (including vanilla and both expansions), but it requires some workarounds and legwork. Read on below for details. CLICK HERE to jump to the GATHERING STORM update (thanks Woden)
Reply

Dude, this is something we've been looking for in order to make serious MP games. Seriously great work!


Sent from my iPhone using Tapatalk
Reply

Can you set specific civs and city states to specific locations, instead of leaving them random? I know that specific civs is important to make a multiplayer game work, and I suspect that eventually people will want to balance city states as well.
EitB 25 - Perpentach
Occasional mapmaker

Reply

I'm pretty sure that you can select specific civs to specific locations by first selecting those civs in the World Builder settings when generating the map. Clicking on each player starting location there is a drop down menu with a list of civs. I didn't test that yet to confirm that it works. I did confirm though that specific civs can be distributed randomly among all the designated starting locations. The player starting location which has 2 options:

1. Player ... gives a secondary drop down to assign the starting location to one of the civs that were selected on the World Builder setup screen. This option is the default, however I noticed that if the actual game included different civs then those selected on the World Builder setup screen, sometimes the players were doubled up with 2 players on the same starting square???
2. Random Player ... players can select any civ, but are then distributed randomly among all the designated starting locations.

I couldn't figure out how to get city states to work, much less try placing specific ones in specific locations. For city states I only saw one option for placing a starting location: Random City State. But like I said, I only had one game successfully start with city states and I do know on that map I did not assign starting locations.
Reply

This is very exciting, even if you aren't able to get the city states to work properly. Wonderful news! thumbsup Is there any chance we could use this to set up Single Player events as well? I've had to do a ton of rerolling maps for our games, and the ability to set up things properly would be a huge help.
Follow Sullla: Website | YouTube | Livestream | Twitter | Discord
Reply

Awesome work, Cornflakes!

We badly need this for MPs. I would hope that more people are willing to join those games then.
Reply

Long time lurker here, but I'd never really found a good reason to post.


Until now, that is.


Let's recap Cornflakes' work here. Enable the World Builder, and use it to create any map of your choosing. Save it over the existing Balanced6.Civ6Map. Load up the Six Armed Snowflake Script, and voila, the map you made. Except for, sadly, city-states.

This struck me as rather odd, since they're a rather core part of the game. What causes the difference? The obvious answer is that the WorldBuilder doesn't actually place the starting positions right. It is, after all, not "officially" released for public consumption so that might be one of the bugs that kept it from doing so.

So, I decided to open up the Civ 6 map file and look at it myself. Maybe there's something to be found there?

[Image: Q0HaJqM.png]

Well, that looks like a whole bunch of junk data. Except, wait a minute. "SQLite", "CREATE TABLE"...those are things I know.

A quick Google later got me download DB Browser for SQLite. Opening up our file in that reveals...

[Image: hkmAetB.png]

Well, that's something we can work with.

You'll note the filename in the above has "- Copy" in the name. Well, that's because Balanced6.Civ6Map is now something else, and we're going to build that. In fact, we're going to build a whole new map, with City State start positions and all.

Before we start, make sure in your AppOptions.txt file you've got EnableWorldBuilder 1 and EnableDebugMenu 1 set. The first is obvious, letting you select WorldBuilder from Additional Options. The second is less obvious, but even more useful. It enables the opening of the debug console by pressing `. There's probably a bunch you can do with it, but we care about one command: "reveal all", which provides vision on all tiles. It's an easy way to see if things are working. There's also the EnableDebugPlotInfo option. If this is set to 1 it will display the tile ID of a plot in the popup, which can also be handy. I have no idea if these will interfere with multiplayer, so be wanred and probably just set them all to 0 before you play your next multiplayer game.

First, we want a completely blank map. I generated a Duel Pangaea map and removed everything on it. You can do this yourself if you want. If you do, you'll fast realize why the WorldBuilder isn't officially released yet: the map editor in Heroes of Might and Magic 2 all the way back in the mid 90s was more user friendly.

So, instead, we can use the one I made and uploaded here: https://www.sendspace.com/file/6b2lf5. It occurred to me halfway through this process that I could have seen if someone had already uploaded a blank map to CivFanatics. I haven't had the heart to check.



[Image: J0D7UQs.png]

Now we've got our blank map. Under Terrain, click Ocean and you'll get a dropdown of different terrains. Just use Grassland for now but if you've got a real urge for that Snow (Hills) map of your dreams I won't stop you.

[Image: T5DdkVa.png]

Here, I've made a 10x10 diamond in the middle of our map. I've also used the Continents brush to write the bottom half as Pangaea and the top half (highlighted because it's selected) as Pangaea Ultima. Why? It amuses me.

Don't worry about drawing in the exact spot I did. Just be aware that you might. Now, hit Escape, and save your map as something (preferable with a new filename) and open it up in DB Browser.

There's a lot of stuff you can play around with here, but I'd recommend being careful (which is, don't test stuff out on your only copy of a map you've been designing for ten hours). Click "Browse Data", and in the dropdown below select "Plots". You can scroll up and down and you'll see most of the plots are "TERRAIN_OCEAN" with some being "TERRAIN_GRASS". My guess is that each plot is numbered starting from an origin in the lower left. Why do I think that?

[Image: FiBLVCX.png]

If you click the ContinentType column, you can sort the table records by that value. Here, on the border between the two, we can see that Pangaea (the lower half) has lower ID values than Pangaea Ultima. Anyway, this section isn't overly important except to highlight that each plot has its own ID value.

Right now, though, we don't have any start positions. You can figure this out by going to the StartPositions table and observing its oppressive emptiness. In fact, if we were to save this and load it up as a game, we would...

[Image: jihXD5V.jpg]

...not crash horribly, as it turns out! We can observe a few interesting notes here. For one, the Continent setting worked. For two, there were resources generated. Those were certainly not placed by us, and yet they appear. My best guess is a sort of start normalizer. I don't think that a food and production resource are an accident. Additionally, were we to start a new game, we'd be in the same position with the same resources. Finally, despite Six-Armed being a "Small" map, we only have two players. Is this because we're using a Duel map as our base? Or is it just the bare minimum number to keep on functioning. I'm not sure which yet.

If we hit Abundant Resources, nothing changes. If we select Legendary starts, still nothing changes. We can assume that the game will not overly mess with our work.

Now, let's put in some starting positions. First, make sure you close the map in DB Browser. If Civ 6 can't get an access lock on the file, then it'll just jump back to the main menu when you try to open it in WorldBuilder.

[Image: c0ZUAhH.png]

Select each of the four corner plots and set their Start Position property to "Random Player". Save it, copy it, and start a game with it.

[Image: pjvf4aH.jpg]


Well, now we're talking. Although there's a pair of odd lakes at the bottom. What are they? I have no idea, to be honest. They might be river features I didn't actually remove, or just a natural part of the terrain aesthetics. They're not important, though. Also notably is a lack of free resources around our start. This solidifies my thought that it's a start normalizer at play, since a "crafted" map would have no need of such a thing.

What is important is opening our map up in DB Browser and looking at the StartPositions table.

[Image: 0cIvYHe.png]

It's not really a surprise, but again we see our work reflected. Note the plot IDs. If you flip over to the Plots table and look for those, you'll see they match up logically to where our corners are.

Now, let's add in some city states.

[Image: bptxoHt.png]

Load it up. Oh man, this is gonna be great, it's gonna be-

[Image: qHH06qU.jpg]

-exactly the same as before and as described by Cornflakes.

Well, of course it was. Everything before this? That was the preamble, an intro for those who hadn't touched this before (as I was not that long ago) as well as a bit of a guided tutorial as to what you'll be seeing. Now? Now we work wonders. Open up the original Balanced6.Civ6Map in DB Browser. You did keep a copy handy, right?

Navigate to StartPositions.

[Image: TORMFq5.png]
What are we looking at here? Well, you can probably guess. Fifteen records, with some number of fours and fives. And yes, there are six fours and nine fives, matching exactly with the proper number of players and city states on Six Armed Snowflake. However, there's another piece of the puzzle to look at.

[Image: SDERZ1f.png]

[Image: AREzGkU.png]

The first image you're seeing is the Players table from the original Balanced6.Civ6Map. The second is its counterpart in our custom map. You'll notice a great number of differences. There's a similar discrepancy over on PlayerAttributes. We need to reconcile them, at least the City States. In Balanced6, go to File -> Export -> Table(s) as CSV File, and export the Players and PlayerAttributes tables to their own files (you could probably do one, but let's keep things simpler), named Players.csv and PlayerAttributes.csv. Open them up in the text editor of your choice. You'll see (depending on what you chose for export settings) something like the following:

[Image: NnNLTAr.png]

[Image: lf0Ny7a.png]

What we're going to do is trim what we don't need and import this data into our created map. Over in Players.csv, delete the six lines corresponding to the players, two lines of the city states, and the Barbarian civ line. These are all either redundant or pointless for our purposes. You should be left with six city states and the column headers. Note which IDs (the leftmost values) are left. Over in PlayerAttributes.csv, delete everything but those values. Save both files. They should look something like the following:

[Image: QCcCQsG.png]

Now, in our created map, in DB Browser, we're going to import these files. In Players and Player Attributes, delete all of the records except for the Barbarian one (ID 63). I don't know what happens if you get rid of that, to be honest. Feel free to try! I suggest not right now, though. Anyway, go to File->Import->Table(s) from CSV file, and select Players.csv. Make sure the import options line up with what you exported (notably, make sure it's catching the column headers if you left them as column headers and not data. The same goes in reverse if you deleted them or didn't export them). Click "OK" and you'll be asked if you want to import the data into the existing table. Click "Yes", of course. Do the same for PlayerAttributes.csv. Finally, press Control+S or go to File->Write Changes. I'll be honest, I don't know precisely how much of this part is necessary, but not doing any of it caused this not to work, so just run with the cargo cult until we know better.

There's one last step to undertake. Go to the StartPositions table.

[Image: ojRxPrX.png]

Each of those "RANDOM_MINOR" entries, go and change to 5 (Easiest way is to just click on their cell once, then again a moment later). Save your changes and load up the map.

[Image: tyxt5JX.jpg]

Well, would you look at that. You can play on it too, though as you might imagine a mere one hundred tiles for ten players doesn't play well.


Now, the disclaimers. I haven't thoroughly tested this. There may be bugs that only become apparent down the line. There may be parts of the terrain editing which actually break things and aren't apparent. That being said, I do believe it is quite possible to properly create a balanced map for multiplayer or events. You might want to start with a randomly generated map just because working from scratch is kind of tedious.

The short version:
1) Take your map from WorldBuilder. Place Random City State Start Locations where you want city states to spawn.
2) Open the original Balanced6.Civ6Map in DB Browser for SQLite. Export the Players and PlayerAttributes tables as CSV files.
3) Open the CSVs in a text file, and remove all records but the number of city states you want. If you want more than nine, well, I'm not too sure how to add more but you could probably just copy a row multiple times, making sure the ID stays unique. Also, make sure the IDs in both CSVs match.
4) Opening your edited map in DB Browser, import your edited CSV files.
5) Edit the RANDOM_MINOR records in the StartPositions table to instead be 5. Save all of these changes
6) Copy your edited map file over the original Balanced6.Civ6Map in your installation folder.
7) Play Six Armed Snowflake and enjoy.
Reply

Trasson, I think that's the new best first post on the Realms Beyond. Amazing.  Eng101
If only you and me and dead people know hex, then only deaf people know hex.

I write RPG adventures, and blog about it, check it out.
Reply

(June 26th, 2017, 05:51)Commodore Wrote: Trasson, I think that's the new best first post on the Realms Beyond. Amazing.  Eng101

+1
Reply

Impressive!smile
Reply



Forum Jump: