Skip to main content

Crate nwnrs_git

Crate nwnrs_git 

Source
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 GIT payloads into typed instance collections such as creatures, doors, placeables, triggers, sounds, and waypoints
  • preserve the original raw GFF structures alongside the typed view
  • expose geometry and transform data in forms suitable for higher-level tools
  • rebuild and write typed GIT payloads back to GFF

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 GFF data remain available through the typed model
  • geometry points and transforms are represented explicitly rather than being folded into ad hoc tuples
  • rebuilding a GIT payload preserves unknown per-entry raw fields while rewriting the typed fields owned by this crate

§See also

  • nwnrs-gff, the underlying typed GFF container layer
  • nwnrs-set, which describes tileset structure rather than placed instances

Modules§

prelude
Common imports for consumers of this crate.

Structs§

GitAreaProperties
Parsed AreaProperties block.
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.
GitSoundRef
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 GIT payloads.

Constants§

GIT_RES_TYPE
NWN resource type id for git.

Functions§

build_git_root
Builds a typed GffRoot from a GitFile.
parse_git_root
Parses a typed GIT file from a decoded GffRoot.
read_git
Reads a typed GIT file from reader.
write_git
Writes a typed GIT file to writer.

Type Aliases§

GitResult
Result type for GIT operations.