Electricity, Planning, Refinements – Shogun Exodus Devlog #47

A wide panoramic black and white ink wash painting depicts a traditional Japanese castle complex with workers on scaffolding and a suit of armor displayed inside.
Recent Shogun Exodus development introduces Plan Mode alongside a functional electricity system. Players can now lay out cable networks along floor dividers and pillars to connect active generators to power consumers, beginning with Small Wall Lamps that require active electrical supply to illuminate rooms. This framework includes dynamic power allocation, material conductivity requirements, segmented cable construction tasks, and a unified indicator system that tracks material hauling and build progress across both placeables and cable layouts.

Accompanying updates deliver substantial visual, structural, and interface refinements. Planning tools now include dedicated mode toggling, real-time demand and generation readouts, and updated interior connection boxes that align with room background layers. Additional improvements correct visual rendering orders so passing Servants remain visible in front of active construction, adjust scaffold reflections, fix stair interaction pathing, seal cosmetic gaps where roofs abut upper-floor walls, and add an editor-only grading scene for tuning material palettes.


Raw Patch Notes

UPDATE 2026-10-21 #211 - Plan Mode and Electricity Cables
- 56 new Cable/Wire related assets created and added.
- Status: the implementation has been added to the source files. It has NOT yet been compiled or tested in Godot. The checks below validate file structure and references; gameplay, appearance and performance still need in-game verification.
- Plan Mode: added the bottom Plan button, a free-moving/zooming camera, and left-side Placeables and Electricity buttons. The simulation continues while planning and the Shogun stays stationary. Confirming a plan sends the Shogun to its starting point; construction sites and jobs are created on arrival. Only one such request can be pending. It can be cancelled, and reopening Plan pauses the journey until planning is closed again.
- Cable planning: added connected layouts along pillars and floor dividers, including branches, loops and connections through existing finished cables. Layouts use 200px and 400px sections, costing 1 and 2 ingots respectively. The selected material must have conductivity strictly greater than 6. One Shogun journey authorizes the layout, after which each section has its own hauling, construction progress and cancellation. Unfinished sections appear at 35% opacity without scaffolding or construction walls. Individual unfinished projects can be cancelled from Plan > Electricity, including after partial construction; delivered materials are returned.
- Cable appearance and electricity: cable sections and connection boxes use the supplied artwork with saved random variants, the agreed rotations, overlapping joins and a small shadow. In Electricity Mode, finished cables connected to a currently producing generator show a glowing yellow overlay; disconnected networks and networks with no producing generator show orange. Unfinished sections never conduct. Generators connect through the divider above their horizontal centre, with a data override and a free visual lead behind the generator.
- Data and saving: added mod-merged Data/cables.json for cable types, descriptions, icon, materials, costs and visual settings. Added saving for cable layouts, individual projects, visual variants and pending Shogun requests. Newly confirmed plans respect Instant Build and skip travel, materials and construction when enabled; existing unfinished projects are not automatically completed by that setting.
- Shared systems and performance: cable projects reuse construction material accounting and Servant work handling. Cable connectivity updates when completed links or generator output change. Cable art uses shared region drawing rather than a separate light, physics area or tick update for every section. These design choices still require performance testing at larger Castle and Servant counts.
- Deliberately outside this phase: connecting electricity-consuming placeables, electricity transfer limits, deconstructing finished cables, and additional Plan sub-modes. These are future features, not unfinished requirements of this implementation.
- Files: new cable scripts are Scripts/Construction/CableCatalog.gd, CableConnectivity.gd, CableConstructionSite.gd, CableRegion.gd and CableSystem.gd. Shared helpers are ConstructionSite.gd and ConstructionMaterials.gd. Planning uses Scripts/UI/PlanController.gd, PlanMenuHandler.gd and Scripts/Buildings/BuildingJourney.gd. Existing database, power, building, camera, selection, player, Servant construction and item-info scripts were integrated with these. Data/cables.json, Data/AI/jobs.json, Data/ui_config.json and Data/LoadingScreenText.json were added or updated. Architecture and mod contracts are documented in DeveloperFiles/current-game-setup.txt and Mods/mod-guide.txt. The complete file list is in DeveloperFiles/plan-cables-validation.txt.
- Validation completed: static grammar parsing of 24 GDScript files, structure/duplicate-key checks for 4 JSON files, checks of 55 cable/box images, and cross-file API, save-field and whitespace checks. No Godot engine or Godot MCP was used. DeveloperFiles/plan-cables-validation.gd contains helper checks for the user to run in Godot; those checks have not been executed yet.
- Manual checks still required: Godot compilation, planning controls and Shogun travel, cable placement and artwork, hauling/building/cancellation and material returns, generator connectivity, Instant Build, save/load and travel, and performance with increasing cable counts and 25/50/100 Servants. See DeveloperFiles/plan-cables-validation.txt for the handoff. No intentional save/mod compatibility break or new autoload was introduced.
- Follow-up after user testing: most features were reported working. Plan tools now use the shared ink window background, ink dropdowns and action-button styling, with larger status text and a separate readable Cancel Request button. Fixed valid cable lengths being rejected at confirmation: allowed lengths loaded from JSON are compared numerically rather than using type-sensitive Array.has() against an integer. Added helper checks for JSON-loaded 200/400px lengths and rejection of unsupported/off-grid lengths. Moved the generator's orange back glow from layer 18 to absolute -9, behind its effective -8 sprite; its blue front light stays at 18. Generator light layers remain absolute before and after room clipping.
- Follow-up files: Scripts/UI/PlanController.gd, Scripts/Construction/CableCatalog.gd, CableSystem.gd, Scripts/Placeables/Components/PlaceablePowerGeneratorComponent.gd, Data/Items/placeables.json, DeveloperFiles/plan-cables-validation.gd, plan-cables-validation.txt, current-game-setup.txt, update-log.txt and Mods/mod-guide.txt. Loading hints reviewed; these fixes do not change the intended player mechanics. Static validation is recorded in plan-cables-validation.txt; the new helper checks and visual/gameplay fixes still require Godot verification. No intentional save/mod compatibility break.

UPDATE 2026-10-21 #212 - Construction Reflections and Passing Servants
- Construction walls now reuse the scaffold's existing floor-reflection surface, switching its source to the current delivery/Working image and falling back to scaffolding when no wall is visible. Normal Reflections setting, culling, shared textures, fade/squash and floor-contact behavior are retained; no second reflection loop or image copy.
- Active builders now hide their world body/shadow/carried item/dust explicitly while the portrait/AI/stats remain active. Their reflection is hidden immediately and stays suppressed while the source CharacterVisual is hidden. Prior visibility is restored on stopping, completion, worker change, restoration and presentation removal; the global Reflections setting is never forced on. Freed render references are validated before restoration.
- Lowered all construction wall stages from absolute layer 16 to 14, below ordinary Servant/Shogun bodies (15), so passersby stay in front. Room darkness (17), construction UI (18), separators (20) and all other world layers remain unchanged. Cable workers remain visible because cable sites have no enclosing presentation.
- Data/modding: construction.builder_hidden_nodes configures actor-relative render paths, with the four existing world visual nodes as defaults. PlaceableReflection exposes set_source_sprite for runtime source changes; no save schema, artwork or gameplay-mechanic change. Loading hints reviewed; no change needed.
- Files: Scripts/Construction/ConstructionPresentation.gd, ConstructionScaffold.gd; Scripts/Visual/PlaceableReflection.gd, CharacterReflection.gd; Data/ui_config.json; Mods/mod-guide.txt; DeveloperFiles/current-game-setup.txt, briefs/implemented_briefs/construction-work-handoff.md, construction-work-validation.txt, update-log.txt.
- Validation: grammar parsing of all four edited GDScript files plus JSON/resource/node/API/layer/lifecycle static checks. No Godot engine/runtime or performance tests were run. Manual checks remain stage reflections/contact alignment, global reflection toggling, builder visibility/restoration, passersby, lighting, interruption/completion/death/removal, save/load/travel and unaffected cable workers; details are in the construction handoff.
- Stair follow-up: build-entry and shared interaction arrival checks now wait until an active climb finishes. A matching inferred floor/X or tall overlapping UseArea can no longer end movement before the landing at construction above stairs. Walls have no solid collider; hidden builders keep normal actor collision exceptions. The reported blocked-passer scenario still needs an in-game retest; no runtime reproduction is claimed.
- Smoke correction: the room overlay now excludes the ceiling FloorDivider band while retaining its actor-covering draw layer. GeneratedRoom exposes ceiling_cover_px (default 140px), supplied from BuildingSpawner's actual divider height; custom standalone rooms can use 0. Bounds clamp safely to room height. No smoke-rate/debuff/save changes, new polling or extra physics query.
- Follow-up files: Scripts/BasicWanderAI.gd, Scripts/Buildings/GeneratedRoom.gd, BuildingSpawner.gd; DeveloperFiles/construction-stairs-smoke-validation.gd, construction-work-validation.txt, current-game-setup.txt, briefs/implemented_briefs/construction-work-handoff.md, update-log.txt; Mods/mod-guide.txt. Added developer-only helper regression checks; these have not been executed in Godot. Loading hints reviewed; these corrections add no player mechanic or intentional compatibility break. Manual checks remain stair passers/builders/haulers at active sites and smoke/divider boundaries at varied zoom/camera positions, smoke drain and save/load.

UPDATE 2026-10-21 #213 - Powered Lamps and Cable Draw Order
- Small Wall Lamps now require a completed cable in the floor divider above their horizontal centre, connected to a running generator. Each lamp draws 3 electricity per game hour. Lamp description and Info show the cost; both the bulb glow and room-lighting reveal turn off without power. Hue editing remains available.
- Added the reusable data-driven power_consumer placeable component and cached PowerSystem allocation. Each completed network supplies only its own consumers, with output from connected active producers combined. When output is short, devices receive full power in stable scene-path order while capacity permits; unserved lamps stay off. Allocation is coalesced after device, topology or output changes, with no new per-lamp tick or network scan each frame. Power is a rate, not a stored item, and existing generator fuel burning is unchanged.
- Fixed free vertical connection cables drawing in front of generated placeables: their art is now at absolute -10 and their Plan lines at -9, below the effective -8 placeable sprite. Cable art on pillars/dividers stays at 21, with its Plan yellow/orange overlay now at 22 so it cannot be covered by cable textures. These four depths are moddable in Data/cables.json. Lamps reuse the overhead port and automatic lead presentation already used by generators.
- Files: Autoload/PowerSystem.gd; Scripts/Construction/CableSystem.gd; Scripts/Placeables/PlaceableBase.gd, Components/PlaceableLightComponent.gd and new Components/PlaceablePowerConsumerComponent.gd; Data/Items/placeables.json, cables.json, LoadingScreenText.json; DeveloperFiles/plan-cables-validation.gd, plan-cables-validation.txt, current-game-setup.txt, update-log.txt; Mods/mod-guide.txt.
- Validation: static script grammar/duplicate-method, JSON/duplicate-key, component/resource/data-reference, lifecycle/allocation and layer-order checks. Added user-run helper cases for capacity shortage, zero/restored supply and lamp demand. No Godot engine or MCP was used. Compilation, lamp/lead alignment, network isolation, fuel exhaustion/restoration, shortage recovery, room effects, save/load and performance remain manual Godot checks.
- Saves retain their existing schemas; allocation is derived after restoration. Existing lamps intentionally stop lighting until wired to sufficient running generation. Finished cable deconstruction and advanced transfer/storage rules remain future work.

UPDATE 2026-10-22 - Editor Material Grading Test Scene
- Added Scenes/TestScenesDev/MaterialGradingTestScene.tscn with an editor-only Inspector interface for per-material hue, saturation, lightness, brightness and contrast. GPU previews show every material, all current placeables with independent primary/secondary/tertiary slot choices, and mineral-deposit variations. Optional source comparisons, background colour, cell size and gallery columns support art tuning in the 2D editor.
- Separate material drafts survive selection changes and can be stored with the test scene. The explicit Save Palette button writes only draft visual_adjustments to the chosen material JSON, preserving other current fields and refusing externally changed grading. Reload/discard and neutral-reset actions are included. Data paths default to base files and can target mod files directly; no runtime mod merge is simulated.
- Files added: Scenes/TestScenesDev/MaterialGradingTestScene.tscn; Scripts/DevTools/MaterialGradingTest.gd; Scripts/DevTools/MaterialGradingPreview.gdshader. Usage documented in DeveloperFiles/current-game-setup.txt. Runtime code, material values and mod schemas are unchanged; no intentional breaking changes or loading-hint changes.
- Validation: GDScript grammar parsed with cached gdtoolkit; static resource/data/mask/uniform checks and whitespace review. No Godot engine or Godot MCP used. Manual checks: open the scene in the 2D editor, select the root, tune/switch materials, compare mixed slots and source art, save/reopen scene drafts, and verify explicit palette save/reload. Preview avoids runtime CPU image baking; intermediate RGBA8 rounding can differ slightly from baked textures. Gameplay components/lighting/conditions are outside this art viewer.

UPDATE 2026-10-22 - Roof/End Wall Overlap Fix
- Roof sections that abut an upper floor now run in behind that floor's end wall, ending at the wall's horizontal middle (END_WALL_WIDTH * 0.5), because the wall art does not fill its full width and an edge-to-edge join left a gap. Z_ROOF changed from -12 to -18 so roofs draw behind end walls (Z_END_WALL -17) but still in front of rooms (-20). The roof divider beam keeps its full width.
- Files modified: Scripts/Buildings/BuildingSpawner.gd (_spawn_roofs_for_layouts, Z_ROOF).
- Validation: static read-through only; no Godot engine used. Manual check: build a multi-floor Castle with a narrower upper floor on both sides and confirm the roof tucks behind the end wall with no gap, and roofs still look right against stairs, dividers and rooms.

UPDATE 2026-10-23 #215 - Plan Controls, Room Cable Connectors and Construction Status
- Plan now opens with neither mode selected, leaving the Castle available for camera panning. Clicking Placeables or Electricity opens its tools; clicking that same mode again closes them. The Electricity menu shows Total Electricity Being Produced and Total Connected Electricity Demand, plus yellow/orange line examples and their requested explanations. Dropdown text is black on the white surfaces and selected entries include Cable Type: / Cable Material:. The placement hint now reads Click a section of a wall to add a Cable.
- Insufficient material stock keeps the selected material instead of clearing/switching it or silently disabling confirmation. Drawing beyond available stock and confirming an unaffordable layout report Not Enough Materials. The existing Instant Build material bypass is retained. Electricity totals come from a small PowerSystem cache updated with deferred allocation; connected demand includes unserved devices on completed cable networks.
- Interior connection cables now belong to their room's background-wall transform and draw just above it (-19; Plan overlay -18), removing foreground-pillar parallax and extra shell darkening. The overhead cable junction remains on its support. Device-end boxes use the five supplied Final_Connector_Box variants, selected randomly and saved per connection. Their [100,100] top anchor retains 100px of upward cable overlap while the extended artwork hangs below the endpoint. Existing connectors adopt a final variant once; ordinary cable-to-cable boxes are unchanged.
- Added a shared ConstructionSiteIndicator for normal scaffolds and each individual cable segment. A slowly pulsing HaulIcon shows while deliveries are incomplete. Pulse runs in one shared GPU shader with no per-site frame callback/timer/tween. Cable segments create the existing brush progress bar on first build or partial-progress restore, keep it through interrupted work, and remove it at completion/cancellation. Indicators follow the correct support transform and are cleaned up or reattached when sites/geometry change.
- Files: Scripts/UI/PlanController.gd; Autoload/PowerSystem.gd; Scripts/Construction/CableSystem.gd, CableRegion.gd, ConstructionSite.gd, ConstructionScaffold.gd, CableConstructionSite.gd and new ConstructionSiteIndicator.gd; Data/cables.json, assets.json, ui_config.json, LoadingScreenText.json; Mods/mod-guide.txt; DeveloperFiles/current-game-setup.txt, plan-cables-validation.gd, plan-cables-validation.txt, update-log.txt. Supplied PNGs were referenced without modification.
- Validation: static grammar/duplicate-method checks, JSON/duplicate-key and asset-dimension/reference checks, cross-file API/data/layer/lifecycle review and whitespace checks. Added user-run indicator-phase and cached production helper assertions. No Godot engine/MCP was used. Godot compilation/shader import, mode toggling/panning, menu readability/totals/shortage notices, parallax/night lighting, final-box overlap, hauling/progress/interruption/cancellation and save/load still need in-game checks. No intentional save/mod compatibility break; final_box_image is an additive presentation field.
- Follow-up after user testing: corrected both Electricity total labels using unsupported %g formatting, which Godot rejected with an unsupported format character error. Labels now concatenate numeric string values directly, preserving fractional values without invoking that formatter. Files: Scripts/UI/PlanController.gd, DeveloperFiles/plan-cables-validation.txt, update-log.txt. Static grammar and related-format/whitespace checks passed; reopen Electricity in Godot to verify both numbers and absence of the runtime error. No data/save changes.

*This is an automated post, using Python and LLMs to summarize game updates. Mistakes, while rare, may happen.


Leave a Reply

Your email address will not be published. Required fields are marked *