Integration Guide (5.1 GDScript)
Goal
Get a minimal 5.1 scene running where:
- The addon loads from
res://addons/grid_building. - Your scene drives the runtime through a small set of entry points.
- The backend logic remains traceable via the runtime chain (nodes → workflows → services → state).
What this page assumes (and does not assume)
- Assumes: you are using Godot 4.x and the 5.1 GDScript addon.
- Does not assume: you are using the 6.0 C# port.
If you are adopting 6.0, start at:
Install the addon
- Ensure the addon folder exists in your project at:
res://addons/grid_building/
- Enable the plugin in:
Project → Project Settings → Plugins
Notes:
- The docs are branded GridPlacement (5.1+), but the addon folder name remains
grid_buildingfor backward compatibility.
Minimal scene wiring (recommended)
The stable 5.1 pattern is:
- Your gameplay node(s) talk to a composition container / registry.
- Input is routed through
GPInputServiceinto input adapters. - Orchestrators produce
GBOrchestratorOutputwhich is interpreted byGPEffectApplier.
Conceptually:
| |
Practical “start here” files
These are good starting points when reading the demo wiring:
demos/grid_building_dev/godot/demos/shared/world/world.gddemos/grid_building_dev/godot/addons/grid_building/resources/gb_composition_container.gd
Entry points you should treat as stable
In 5.1, stability means: keep your project code calling a small set of node-shaped APIs and avoid reaching deep into internal helpers.
Recommended entry points:
- Mode switching via a mode service resolved from the container/registry.
- Input routing through
GPInputService. - Placement / manipulation through workflow orchestrators (usually reached via adapters).
- Visual application through
GPEffectApplier(interpret outputs, emit signals).
Debugging checklist (fast)
When something “does nothing”, trace in this order:
- Confirm the plugin is enabled and
res://addons/grid_building/plugin.cfgis present. - Confirm your scene resolves the container/registry.
- Confirm
GPInputServiceis receiving events. - Confirm the relevant input adapter is active.
- Confirm the orchestrator emits
GBOrchestratorOutput. - Confirm
GPEffectApplieris connected and applying effects.
For the detailed chain (with examples), see: