Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Displaying Custom Maps in-game: Tutorial and Japan/Korea Screenshot
#1
I couldn't fall asleep, so I decided to see if I could get a new map displaying in-game.  Visually, that is.  I've been working on a Europe map since I hadn't known how to import new map images when I started (otherwise I likely would have done North America, since I live in North America, and it would be fun to play on a map with even more cities I've traveled to).

The good news is, I have some results!  The bad news is I'm still figuring out exactly how I did it.

Let's see if uploading an image works here...

[Image: attachment.php?aid=1481]


.png   screenshot_2022-9-10-238-58.png (Size: 2.23 MB / Downloads: 593)

I started out with Japan and Korea because it's a smaller area than the U.S.  Figured that meant I was less likely to run into crashes due to running out of memory or something like that.

Steps (please note these are not yet final):

1.  Download the full-res Blue Marble image from Wikipedia (https://en.wikipedia.org/wiki/File:Blue_Marble_2002.png).  Make sure to right click -> Save Link as on "Original File".  It may well crash your browser if you try to view it in the browser.

2.  Open it in a program that can handle a 500 MB PNG file.  I found that GIMP and IrfanView (64-bit) were the two I had installed that could handle it, but IrfanView was much faster.  IrfanView also lets you drag a box around a subset of the image (I'll use India as the example for this post), and adjust it with the bounding rectangle in case you accidentally selected too little or too much.  Neat!  Once you've got the area you want, paste it into a new file and save it as a PNG in its own folder, optionally shrinking it along the way (not necessary for Japan at 3495x2799, but might be for larger maps).  Let's say you named the PNG BlueMarble_India.png, it should wind up as BlueMarble_India.dds.


3.  Open Aorta.exe (which live in Gear City/Mod Tools), go to Batch Convert, choose the folder with your Blue Marble PNG, and choose a fresh folder to put the converted DDS file into.  Make sure Save as DDS is checked.  Click "Batch Convert..." and uncheck all the options, then click Okay.  It might take a couple seconds depending on the size of the map selection.

4.  Go to the GearCity/media/Maps folder, and copy the Europe Test folder, name it after your map, e.g. India (GearCity/media/Maps/India will be the map folder).

5.  Go to GearCity/Mod Tools and open GearCity_ModToolSuite.exe.  Choose Map Data Tools in the upper-left, and open GearCity/media/Maps/India/MapFileForModTools.xml.  Customize the Map Name and Map Description, let's say the Map Name is "India Map".  Leave the rest the same, including the Map Picture being "mapPicture_EuropeTest.dds".  I had a bunch of trouble with crashes due to not finding the map picture so I decided to leave well enough alone.

6.  Save the MapFileForModTools.xml file.  Then click Export Finished Map Files.  Export it to a fresh folder, let's say GearCity/media/Maps/India Exported.  It will export it to a sub-folder based on the name you gave it, such as GearCity/media/Maps/India Exported/India Map.  Copy the "India Map" folder to the GearCity/media/Maps folder.

7.  Go into your "India Map" folder, and then its MapArt folder, and make a copy of the MapArt.zip file, and then extract it.  Rename the "EuropeCityMap.material" file to "IndiaMap.material", open it, and on line 14 after "texture", change it to BlueMarble_India.dds.  Save the file.  Then find the BlueMarble_India.dds file from step 2, and place it in this same MapArt folder.  Compress both the DDS and the IndiaMap.material file into a new "MapArt.zip" file that will live in this folder.

8.  Within your "India Map" folder, open MapFileForGame.xml, and on line 17 ("ChangeMap"), change EuropeCityMap to IndiaMap.  Eventually you'll also want to change the lat/lon markers so cities display properly, but at this point you'll still have the cities in Europe and they'll just display weirdly like in the picture above.  Getting a fresh slate and proper cities is for a future tutorial.

9.  Fire up GearCity (with mods disabled), and click New Game, and click on "India Map".  It might crash here, if so go to "GearCity/GearCity/Logfile.log" and see what it says.  If not, click through to start a game and hopefully you see your map!  If it crashes, check that log file.  Most likely it failed to find a file somewhere.

(Note to self: I created this with "Japan Two" and copied the exported version to "Japan Test II".  The earlier "Japan" version is hopelessly broken for some reason, and probably needs a diff tool to figure out why.  The working version is also backed up)

-----

Also, some of the changes around the .material file are probably intended to be done via "Edit Map Artwork Loading Years" in step 5 (the "Map Data Tools" in the Mod Tools).  I haven't tried or verified that, but it might make things slightly easier.

----

Hopefully this is of use to someone.  I'm writing it up in large part for my future self, when I try that North America map.  I'm also fine with it being repurposed for the Wiki's page on the Map Data Tool.

I should also note that at this point I have no plans to create a Japan/Korea map in the short/medium term future. I'm currently finishing version 2 of my Europe map, with North America, and then version 3 of Europe likely next. Japan/Korea might be after that. In part because I've had reasonably good luck finding demographic/economic data for Europe (especially Spain/Portugal/France/Italy), and am confident I can find good info for at least the U.S., but am not sure if I can for Japan and Korea, in part due to the language barrier. But also just not knowing what's available... English is my native tongue, but it was way easier to find Spanish data than English for various historical reasons, primarily that there are about five types of counties in England.

So if anyone wants to start a Japan/Korea map... it's available.
Reply


Messages In This Thread
Displaying Custom Maps in-game: Tutorial and Japan/Korea Screenshot - by JC_Denton - 09-10-2022, 02:14 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)