Expand description
§nwnrs-git
Typed parser for Neverwinter Nights area instance (GIT) resources.
§Why This Crate Exists
GFF is a general-purpose container; GIT is domain-specific. The raw GFF
layer has no knowledge of placed instances, instance types, or area geometry.
This crate lifts raw GFF structs into typed Rust collections so area tooling
can work with creatures, doors, placeables, and waypoints directly instead of
navigating untyped field maps.
§Scope
- parse
GITpayloads into typed instance collections such as creatures, doors, placeables, triggers, sounds, and waypoints - preserve the original raw
GFFstructures alongside the typed view - expose geometry and transform data in forms suitable for higher-level tools
- rebuild and write typed
GITpayloads back toGFF
The principal entry points are read_git, build_git_root, write_git,
and GitFile.
§Invariants
- authored instance order is preserved within each typed collection
- raw top-level and per-instance
GFFdata remain available through the typed model - geometry points and transforms are represented explicitly rather than being folded into ad hoc tuples
- rebuilding a
GITpayload preserves unknown per-entry raw fields while rewriting the typed fields owned by this crate
§See also
Modules§
- prelude
- Common imports for consumers of this crate.
Structs§
- GitArea
Properties - Parsed
AreaPropertiesblock. - GitCreature
- A placed creature entry.
- GitDoor
- A placed door entry.
- GitEncounter
- An encounter volume entry.
- GitFile
- Parsed area instance payload.
- GitPlaceable
- A placed placeable entry.
- GitPoint
- A geometry point used by triggers or encounters.
- GitSound
- A sound emitter entry.
- GitSound
Ref - A single sound reference within a sound object.
- GitStore
- A placed store entry.
- GitTransform
- A world transform extracted from a GIT instance.
- GitTrigger
- A trigger volume entry.
- GitWaypoint
- A placed waypoint entry.
Enums§
- GitError
- Errors returned while reading or parsing
GITpayloads.
Constants§
- GIT_
RES_ TYPE - NWN resource type id for
git.
Functions§
- build_
git_ root - Builds a typed
GffRootfrom aGitFile. - parse_
git_ root - Parses a typed
GITfile from a decodedGffRoot. - read_
git - Reads a typed
GITfile fromreader. - write_
git - Writes a typed
GITfile towriter.
Type Aliases§
- GitResult
- Result type for
GIToperations.