msch-generate
v1.5.5
Published
Mindustry schematic buildtool.
Downloads
255
Readme
msch-generate
Mindustry schematic parser and generator. Allows you to generate schematics from json files.
Installation: npm i -g msch-generate
Usage: msch build [schematic.json] (-o schematic.msch)
Example
{
"$schema": "https://raw.githubusercontent.com/BalaM314/msch-generate/main/docs/msch-v1.schema.json",
"info": {
"name": "All Config Types",
"description": "testing schematic \nby $author",
"labels": ["test"],
"authors": ["BalaM314"],
"version": "1.0.0"
},
"tiles": {
"grid": [
["pulverizer", "sorter", "proc"],
["bridge1", "message", "bridge2"],
["switch", "node", "conv"]
],
"blocks": {
"pulverizer": { "id": "pulverizer" },
"sorter": { "id": "sorter", "config": {
"type": "item",
"value": "titanium"
} },
"proc": { "id": "micro-processor", "config": {
"type": "program",
"value": "testProgram"
}, "links": [ "switch", "bridge1", "bridge2" ] },
"message": { "id": "message", "config": {
"type": "string",
"value": "this sussy message ($_message) was autogenerated by [blue]msch-generate[] for testing purposes"
} },
"bridge1": { "id": "phase-conveyor", "config": {
"type": "point",
"value": "2, 0"
} },
"bridge2": { "id": "phase-conveyor" },
"switch": { "id": "switch", "config": {
"type": "boolean",
"value": "true"
} },
"node": { "id": "power-node", "links": [
"pulverizer",
"bridge1"
]},
"conv": { "id": "armored-conveyor", "rotation": 2 },
"air": { "id": "air" }
},
"programs": {
"testProgram": [
"print \"Sussy Baka\"",
"set generatedFromJson true",
"set author \"BalaM314\""
]
}
},
"consts": {}
}
Features
- File validation, error handling, and JSON schema
- All block config types
- Specify content configs (unit type, block, item) with the item name instead of id
- Specify code for processor as a string[] or a file path, automatically compresses to a byte[]
- MLOGX integration, automatically compiles mlogx programs at specified file paths
- Compiler constants: replace bits of your schematic file or programs (like C #define)
- All content-based icon characters (items, blocks, team icons)
- for example, $_copper is automatically replaced with the mindustry-specific unicode character for copper, U+F838
See Overkill RC.json for an example JSON file.