Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mrh0/pa-spec-generator

Planetary Annihilation: Titans spec schema generator
https://github.com/mrh0/pa-spec-generator

planetary-annihilation

Last synced: about 1 month ago
JSON representation

Planetary Annihilation: Titans spec schema generator

Awesome Lists containing this project

README

        

# Generates JSON-schemas for Planetery Annihilation: Titans spec files.

This Node.js script generates infered JSON-schemas based on the files in the PA `/media/pa` and `/media/pa_ex1` directory

## Supported spec types
- AI builds
- Ammo
- Animation Trees
- Build arms
- .pfx files
- Tools
- Units / Structures

The generated spec files are put in the [/specs](https://github.com/mrh0/pa-spec-generator/tree/main/specs) folder.

## Usage
### Generate spec files
```shell
npm start
```
### Use schemas
Visual Studio: Code supports JSON-schema validation by adding one of the following `$schema` properties with a link to the schema in the JSON file you are working in.
```json
{
"$schema": "https://raw.githubusercontent.com/mrh0/pa-spec-generator/main/specs/ai_builds_spec.json",
"$schema": "https://raw.githubusercontent.com/mrh0/pa-spec-generator/main/specs/ammo_spec.json",
"$schema": "https://raw.githubusercontent.com/mrh0/pa-spec-generator/main/specs/anim_tree_spec.json",
"$schema": "https://raw.githubusercontent.com/mrh0/pa-spec-generator/main/specs/pfx_spec.json",
"$schema": "https://raw.githubusercontent.com/mrh0/pa-spec-generator/main/specs/tool_spec.json",
"$schema": "https://raw.githubusercontent.com/mrh0/pa-spec-generator/main/specs/unit_spec.json",
}
```