Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mrh0/pa-spec-generator
- Owner: mrh0
- License: mit
- Created: 2023-08-12T14:10:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-19T15:32:13.000Z (11 months ago)
- Last Synced: 2023-12-19T18:50:49.694Z (11 months ago)
- Topics: planetary-annihilation
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 / StructuresThe 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",
}
```