@world-forge/export-godot
v4.5.0
Published
Godot 4 export pipeline for World Forge — zones, entities, items, dialogues, navigation, and .tscn scene generation.
Maintainers
Readme
@world-forge/export-godot
Godot 4 export pipeline for World Forge — converts a WorldProject into a structured content pack with .tscn scene generation.
buildWorldScene() emits a single playable .tscn — not a metadata graph —
that opens navigable in the Godot 4 editor. Verified against the real Godot 4.7
engine via a headless dogfood smoke (36 assertions on the generated scene).
What lands in the scene
- Per zone — a
Node2Dwith aStaticBody2Dcollision hull, aNavigationRegion2Dnavmesh,y_sort_enabled, and az_indexfrom its stratum band (+ elevation). A framedCamera2Dsits on the root. - Tiles —
TileMapLayer+TileSet(image tilesets baketile_map_datacells; color-only layers carry a scaffold + metadata), with per-cell wallStaticBody2Dcollision for non-walkable tiles. - Props — a
PropsNode2Dcontainer. - Town —
Markets/CraftingStations, plusBuildings(StaticBody2Dfootprints with aCollisionShape2D),Hubs, andStrongholds. - World modeling —
Strata+StratumLinkscontainers (zones carrystratum_id+ az_indexband so layers sort),HazardsasArea2Dregions (effects in metadata, read onbody_entered), and entry-gate metadata on gated zones (entry_gate/entry_gate_mode/entry_gate_reason). - Content — entities, items, navigation links, loot tables, spawn markers, transition nodes, dialogue resources, asset bindings, and district groupings.
- Fidelity report — structured tracking of lossless / approximated / dropped data, grouped by domain.
Every node is a textureless, self-contained engine primitive — the export loads clean headless with zero external resources.
Usage
import { exportToGodot } from '@world-forge/export-godot';
const result = exportToGodot(project);
// result.contentPack — full GodotContentPack (zones, tiles, props, town,
// strata, hazards, …)
// result.contentPack.worldSceneTscn — the playable .tscn text
// result.fidelity — structured fidelity reportFormat Version
GODOT_PACK_FORMAT_VERSION — currently 1.0.0.
License
MIT
