Adding Ore Layers - JBurlison/Pandaros.API GitHub Wiki
Step 1
Create a minable type in your types.json
"Pandaros.Settlers.AutoLoad.infiniteemerald": {
"icon": "./icons/infiniteemerald.png",
"onPlaceAudio": "stonePlace",
"onRemoveType": "Pandaros.Settlers.AutoLoad.rawemerald",
"onRemoveAudio": "stoneDelete",
"destructionTime": 2000,
"sideall": "SELF",
"npcLimit": 0,
"maxStackSize": 600,
"isDestructible": true,
"customData": {
"minerIsMineable": true,
"minerMiningTime": 5
},
"categories": [
"ore"
]
}
Step 2
Create a ores json. Name this file whatever you want. ores.json is fine. Chance is a percentage, 1-100. NOTE: there is an additional property "ScienceBiome" to only spawn ores in a specific biome. Biomes currently are:
- sciencebiome.oldworld
- sciencebiome.newworld
- sciencebiome.fareast
- sciencebiome.arctic
- sciencebiome.tropics
[
{
"Chance": 1,
"Depth": 20,
"Type": "Pandaros.Settlers.AutoLoad.infiniteemerald"
}
]
Step 3
Add the ores.json to your modinfo. In settlers, there is a custom json section. Full example
"Pandaros.API.jsonFiles": [
{
"fileType": "Pandaros.API.OreLayers",
"relativePath": "WorldGen/OreSettings.json"
}
]