1
0
Fork
You've already forked icmmts
0
forked from tuxcrafting/icmmts
No description
  • Python 96.2%
  • JavaScript 3.8%
2021年11月23日 16:11:40 +00:00
.gitignore validation and factoring 2021年11月23日 14:04:36 +02:00
extractor.js initial commit 2021年11月22日 22:13:23 +02:00
import_pack.py initial commit 2021年11月22日 22:13:23 +02:00
libicmmts.py small fix 2021年11月23日 17:22:14 +02:00
LICENSE license 2021年11月23日 16:22:44 +02:00
params.json initial commit 2021年11月22日 22:13:23 +02:00
README.md allow for custom nation colours 2021年11月23日 16:02:22 +00:00
render.py allow for custom nation colours 2021年11月23日 16:02:22 +00:00
validate.py fix validation error 2021年11月23日 16:11:40 +00:00

Integrated Collaborative Map Manipulation Tool Set

This repository is also the home of the ICMMTS, Integrated Collaborative Map Manipulation Tool Set, a set of scripts to do stuff with maps. Note that this does not handle generation, instead use this map generator and import the map data.

Create topography

First, generate your map with FMG. Then, open the dev console and copy and run the script inside extractor.js. This should give you a file pack.json.

Now, create a directory for your map data, move there, and run import_pack.py < path/to/pack.json. This will produce a pack.json.gz file in the current directory.

Now, copy params.json in the ICMMTS base to the current directory and fill in the details based on stats FMG gives you. Congratulations, you now have a full map!

Add political regions

Create a .txt file with the name of the nation, with the following format:

{
 "name": name,
 "colour": "rgb(r, g, b)"
}
%%
cell 1
cell 2
...

Where there is a cell ID on each line. Comments are also allowed within the file with #.

Render the map

Use render.py in the directory to output an SVG. Options of the form a=b are supported:

  • color={height|biome|nation} [height] - Coloring method.
  • select=all - Cell selection.
  • width=N [1000] - Width of output SVG.
  • height=N [500] - Height of output SVG.
  • rivers=B [1] - Whether to show rivers.
  • legend=B [1] - Whether to show the legend.
  • show_id=B [] - Whether to show cell IDs.
  • nation_legends=B [1] - Whether to show nation names.

Validate claims

The validate.py script checks if there are overlapping claims or claims on water tiles and reports them.