Jump to content
Age of History Games
Chairman Baad

How to Use cities.json

Recommended Posts

When it comes to adding cities to a map, you have two methods for how to do it. The first method is to use the in-game city editor, and while this does work in adding new cities, it doesn't let you change existing cities. It also displays new cities at the incorrect level. The worst part is that it leaves a file for each city, therefore forcing Android modders to add these and bringing their mods closer to the 65,536 resource limit.

The second method is by using the cities.json files in the map's cities folder. This method requires you to have the map editor open, but the process for adding cities is still quite easy. It also lets you change existing cities and displays cities correctly while only using 1-5 files. Let's go through the steps for using cities.json in a map.

  1. Go into your map's directory and go into the cities folder. If it does not exist, create it.
  2. Add a file for each level of city you plan to create: cities.json for capitals, cities_1.json for major cities, cities_2.json for towns, cities_3.json for villages, and cities_4.json for hamlets.
  3. For each new file you created, copy the below example into it. Replace City 1 with your city name, and copy the parts in bold for each city you plan to create on the same level.
{
	cities:
	[
		{
			Name: "City 1",
			x: 0,
			y: 0
		},
	],
	name: Earth
}

       4. This is the part where you need the map editor: click the point on your map where you want each city to appear. For each point, you will get a
           set of coordinates in the top-right corner. Replace the "zero coordinates" for each city with the corresponding set you got from the map editor.

And now you're done! Unless you recreated some cities you made with the in-game city editor, in which case you'll need to delete the city editor versions. But now you can reload your map and see your new cities appear!

Edited by Chairman Baad

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.


  • Tell a friend

    Love Age of History Games? Tell a friend!

  • Posts

×
×
  • Create New...