inf2ron
Parse Stranded II .inf definition files and output RON format.
Part of the OpenStranded
toolchain for converting original game mods into .s2mod Content Packs.
Usage
CLI
inf2ron <file.inf>... [output]
<file.inf>...— one or more.inffiles to parse[output]— optional output directory (default: current directory)
Each .inf file produces a corresponding .ron file with the same base name.
Example
# produces ./items_edible.ron and ./items_material.ron
# produces output/objects_trees.ron and output/objects_rocks.ron
Library
[]
= "0.1"
use ;
let entries = parse_str?;
Modules
| Module | Description |
|---|---|
parser |
State-machine .inf parser |
types |
Data types: InfEntry, CombiBlock |
registry |
Typed domain structures + classifier |
error |
Error types |
cli |
Command-line interface |
.inf file format
Line-oriented key=value with multi-line blocks:
### Entity name
id=9
name=Meat
group=food
icon=gfx\meat.bmp
model=gfx\meat.b3d
weight=500
script=start
on:eat {
eat 5,20,10,0;
}
script=end
Comments: # line, // line within script blocks.
Multi-value keys supported (e.g. multiple req= in crafting recipes).