Expand description
§openstranded-common-units
Shared data types for the OpenStranded unit / AI system.
This crate defines the canonical structures that represent unit
types — creatures, NPCs, vehicles, and the player — parsed from
units*.inf files.
§Types
| Type | Purpose |
|---|---|
UnitDef | Full definition of a unit type |
AnimFrame | Start/end frames + speed for an animation |
UnitAnimations | All animation slots |
LootEntry | Loot drop: item_id + max count |
VehicleParams | Vehicle physics (acceleration, steering, …) |
§Relationship to .inf files
Each id=N entry in a units*.inf file corresponds to one
UnitDef. Most fields map directly from their .inf names.
§Dependency
Only serde — this is a pure data crate with no engine or plugin API
dependencies.
Structs§
- Anim
Frame - A single animation frame range.
- Loot
Entry - A single loot-drop entry.
- Unit
Animations - All animation slots for a unit type.
- UnitDef
- Full definition of a single unit type (creature, NPC, player, vehicle).
- Vehicle
Params - Vehicle-specific physics parameters.