Skip to content

Modding

cobrapitz edited this page Nov 1, 2021 · 6 revisions

How to adds things to the game. (Not final!)


The base game will be built using mods. All config files are using json.

How to add ground-, chevron- and hill-tiles

"sand": {
	"type": "tile",
	"variant": "sand",
	"height_chevrons_enabled": true, // important for map editor; if enabled, tiles can be elevated and then use the "hills" texture
	"chevrons": "sand_chevrons", // chevrons are the images below tiles, which will be shown below a tile if elevated
	"hills": "sand_hills",
	"ground_texture_data": {  // only at height 0
		"cell_width": 30, 
		"cell_height": 21,
		"texture": "sand_tiles",
		"start": [0, 0], // from 0, 0 -> 9, 0 => 10 variations
		"end": [10, 0]
	}
}

How to add trees

https://steamcommunity.com/sharedfiles/filedetails/?id=2261818426 (https://web.archive.org/web/20210408142727/https://steamcommunity.com/sharedfiles/filedetails/?id=2261818426)

"example_tree": {
        "data": {
            "name": "Apple Tree",
            "resource": "woodplanks",
            "logs_amount": 9, // how many logs will spawn after bringing down tree
            //"planks_per_log": 4, // how many woodplanks a log yields 
            "tree_chop_amount": 5, // how many chops to bring down the tree
            "log_chop_amount": 4, // how many chops to get planks from log
            "growth_duration": 3.0, // until mature status reached (+randomness)
            "spread_per_year": 5.0, // (+randomness)
            "spread_range": 10, // spawns somewhere in this radius (some space between original tree)
            "grows_on": ["grass", "light_grass"] 
        },
        "type": "tree",
        "texture": "apple_tree",
        "cell_width": 185, // Texture size: [0, 0] -> Texture rectangle: 0,0 to 185, 185
        "cell_height": 185,
        "texture_regions": {
            "sprout": [],
            "sapling ": [],
            "pole": [],
            "mature": [
                [0, 0],
                [0, 1]
            ],
            "wind": [],
            "no_leaves": [],
            "idle": [],
            "chopped": [],
            "cut_down": []
        }
}

How to add buildings

How to add resources

How to add AI

How to add NPCs

How to add units

Clone this wiki locally