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

The State of Map Making

Discussion in 'Civ6 - Creation & Customization' started by CornMaster, Jun 26, 2018.

  1. CornMaster

    CornMaster Romulan Commander Retired Moderator

    Joined:
    Nov 19, 2000
    Messages:
    3,758
    Location:
    Cloaked Warbird in the Neutral Zone
    Hello Folks,
    What is the current state of map making for Civ 6? I wanted to create a scenario (which will involve creating a map) and I've been poking around the last few days and not finding much in the way of tools to make maps. The World Builder seems to be one tile at a time editing, which is frustrating to say the least.

    As I kept digging, I found that a map is essentially a SQLite database, and working with databases is my thing. :) I've mocked up a script that can take a map designed in a spreadsheet (each cell being a hex) and create the SQL statements required to draw the map. I think I've dealt with all of the oddities around the other tables in the database, sizes, players, etc...

    Would a tool like this be useful? Right now, all it does is set up the map attributes, and lay out the base terrain. All of the features, cities, rivers, ... would all still be added at the World Builder level, but even drawing out a base map will save me a ton of time. If there was interest in this, I could convert it to a web service that you could upload your spreadsheet into and get out the SQL commands needed to draw your map.

    I can upload some screenshots of the spreadsheet and the completed maps tonight when I get home.
     
  2. CornMaster

    CornMaster Romulan Commander Retired Moderator

    Joined:
    Nov 19, 2000
    Messages:
    3,758
    Location:
    Cloaked Warbird in the Neutral Zone
    Hello Folks,
    Here are two screenshots, one of the spreadsheet, and one of the map in the World Builder. Clearly I need to clear out the goodie huts too. ;)

    In this example, 1 is coastal tiles, and 5 is grassland. I enabled conditional formatting on the spreadsheet to help make laying out the map a bit easier. It currently supports all 15 terrain types.

    spreadsheet-map.png

    wb-map.png
     
  3. Wolfdog

    Wolfdog Unit Butcher

    Joined:
    Jun 29, 2012
    Messages:
    643
    Location:
    Australia
    Looks promising. :)

    Is there a way to import Civ 5 maps into excel?
     
  4. wabatt

    wabatt Guess What's Back

    Joined:
    Feb 22, 2010
    Messages:
    233
    Location:
    Richmond, Virginia
    This is an amazing work. I would love to have this ability when working on very large maps. Is there a way you could upload the script and the Excel template?
     
  5. CornMaster

    CornMaster Romulan Commander Retired Moderator

    Joined:
    Nov 19, 2000
    Messages:
    3,758
    Location:
    Cloaked Warbird in the Neutral Zone
    The script that does the conversion is written in PHP, and the template is in LibreOffice. Although, it would probably open in Excel fine.

    I'm thinking about converting the script into a web page so that you can just upload the CSV and download the SQL statements to draw the map (I could also include the raw source in case someone wants to host/improve it). I'd also include some tutorials on how to best use the template and how to import the commands using some free Windows tools into the map database file.

    I'll try to get something online later today.
     
  6. wabatt

    wabatt Guess What's Back

    Joined:
    Feb 22, 2010
    Messages:
    233
    Location:
    Richmond, Virginia
    Sounds great, can't wait to try it out.
     
  7. Civfan1981nyc

    Civfan1981nyc Chieftain

    Joined:
    Dec 4, 2016
    Messages:
    40
    Gender:
    Male
    Hi - just seeing this thread for the first time. Were you able to get up a webpage? I’d love to be able to use this
     
  8. CornMaster

    CornMaster Romulan Commander Retired Moderator

    Joined:
    Nov 19, 2000
    Messages:
    3,758
    Location:
    Cloaked Warbird in the Neutral Zone
    Sorry folks,
    I didn't get alerts that there were posts on this thread. I didn't think there was any interest, so I didn't put much extra effort into it. I was pretty close to finishing though, and I'll get something up this weekend with what I have so far.
     
  9. CornMaster

    CornMaster Romulan Commander Retired Moderator

    Joined:
    Nov 19, 2000
    Messages:
    3,758
    Location:
    Cloaked Warbird in the Neutral Zone
    Hello Folks,
    Here is a webpage with the script to convert the template into SQL queries for importing into the database: http://civ.thehawkinsfamily.ca/civ6map/

    I need to spend a bit of time writing out the instructions to actually do the DB import, hopefully I'll get at that a bit later today. But provided you can do that part yourself, it should be good to go.

    Let me know if you have any problems with it. I know that the script will output the correct SQL queries, but how it interacts with everything else is a bit tricky, so there is likely a lot of learning we can all do there.
     
    wabatt likes this.
  10. wabatt

    wabatt Guess What's Back

    Joined:
    Feb 22, 2010
    Messages:
    233
    Location:
    Richmond, Virginia
    Success! Got it to work!

    For everyone like me who hasn't messed around in SQL here is what worked for me.

    Use https://github.com/sqlitebrowser/sqlitebrowser/releases to open CornMasters example maps. Install the program and then open up "DB Browser". Click "Open Database" and point it to CornMasters example maps or any game save (I think?) you don't care about.

    Go to the "Execute SQL" tab and paste in the SQL output you got from CornMaster's website. Click the play button to execute the SQL code. Ctrl + S to save the file. Exit DB Browser. That's it!

    Rember to close out of DB Browser before trying to load the game save in the world builder. The map won't load otherwise.

     
    Last edited: Jan 19, 2019
  11. CornMaster

    CornMaster Romulan Commander Retired Moderator

    Joined:
    Nov 19, 2000
    Messages:
    3,758
    Location:
    Cloaked Warbird in the Neutral Zone
    Glad you got it to work. Any issues with the instructions? Anything I should add?
     

Share This Page