Jump to content

Unity.Rea.Overworld/BIBLE

From MindAttic Docs

Overworld — rebuild bible

The brief for the Unity rebuild. docs/RECONSTRUCTION.md is the evidence of what the original did (read it first; section numbers below refer to it). This file says what we are building: the original's gameplay kept exactly, its code replaced by modern, tested, data-driven Unity. Where the rebuild deviates from the original, it says so here and why.

Pitch

A top-down overworld adventure seen through a 45-degree perspective camera over a grid of hand-painted 512-pixel tiles: lead a party of three through a world of herbs, crops, books and quests, mouse-driven (hold the right button to walk toward the cursor, left to pick up), with a day and night that turns on a one-minute-per-second clock, weather that cycles at a key press, a script language that runs every item and event, and a stamina-gauge turn-based battle mode driven by a ring menu around the active hero. Originally a 2006 VB.NET / DirectX 9 prototype ("overhead", then "Overworld"); the rebuild is its finished, polished proof of concept.

Pillars

  1. The mouse is the player. Hold the right button and the hero walks, or runs when far, toward the cursor; the world cursor is a real object with edge-scroll arrows, a zoom hand and an examine eye. (RECONSTRUCTION 3, 5)
  2. Everything is a script. Item effects, quest completions, area events and the debug console all run through one tiny command language (CHANGE HERO HP +10 | CHANGE TIME HOUR 22), so content is data and behaviour is one interpreter. (9)
  3. A living clock. One real second is one in-game minute; the day moves through Morning, Day, Evening and Night with tinted light, sleep skips time, and the calendar has its own month and weekday names. (6)
  4. Stamina is the turn. Battle has no initiative roll: the gauge that powers running and moving is the turn timer, the ring menu is how you spend it, and everyone recharges kneeling. (12)
  5. The world is a data table. Pickups, quests, books, walls, props and (in the later layer) areas, scenes, terrain, NPCs and enemies are rows, not code. (8, 10, 16)

Scope and the union

The rebuild is finite. It covers the union described in RECONSTRUCTION section 19: the shipped 2006 behaviour first, then the later data layer (the 2007 world.mdb, hero.mdb, the unused art and sound). The 33 stories of epic A in docs/USER_STORIES.md are the whole of it, in build order (RECONSTRUCTION section 20). When all are built and the verified run (story A33) passes, the repo is done.

Architecture

Follows the owner's rebuild standard in AGENTS.md (Unity.SpaceGod and Unity.GridGame are the reference architectures).

Assets/Overworld/
  Core/        Overworld.Core      pure C# (noEngineReferences, no UnityEngine): rules, state, commands, events, data models, the script interpreter
  Runtime/     Overworld.Runtime   MonoBehaviours and presentation: camera, sprites, HUD, input, audio, UI Toolkit screens; references Core only
  Editor/      Overworld.Editor    editor-only builders and importers (scene, atlas and catalogue generators); references Core and Runtime
  Content/     validated data      JSON the Core loads: pickups, quests, books, walls, props, areas, scenes, terrain, NPCs, enemies, heroes, weapons
               (lives at Assets/StreamingAssets/Content: content.json names every file; both world.mdb databases and hero.mdb are
               exported there by tools/export-mdb.ps1, the books by tools/export-books.ps1; Core's ContentRegistry loads and validates them,
               naming every problem by file, key and line. world-2007.json is the playable world, world-2006.json a reference record.
               The 2007 export stays exactly as the database held it; world-2007-fixes.json holds the corrections, the start and the
               exits, applied when the playable world is read, and WorldPlayability checks the result every load: see Fixed defects.)
  Art/ Audio/  the original assets, imported verbatim and catalogued
Tests/
  Overworld.Core.Tests   NUnit, plain `dotnet test`, no Unity: rules, scripts, data validation, the asset-catalogue diff
  PlayMode / EditMode    Unity tests for Runtime wiring and scripted play-through runs
  • Core never sees Unity. Vectors, colours, time and randomness are Core types behind small interfaces (IClock, IRandom), so every rule is deterministic under test. Randomness is seeded, so the random gold and weather are reproducible in tests.
  • Commands in, events out. Input becomes a command carrying a player id (MoveHero, PickUp, UseItem, ToggleBattle, Rest, RunScript, ...); Game.Apply(command) mutates state and returns events (HeroMoved, ItemPickedUp, PeriodChanged, QuestObjectiveCompleted, ...). Presentation reads state and plays events, and never mutates the game. There is one authority and no "current player" singleton: currHero becomes a per-player selection in state, so a second player is a data change, not a rewrite.
  • A fixed 60 Hz step. The original moved, scrolled, rained and drifted per rendered frame and only animated and kept time by the clock. The rebuild runs the simulation at a fixed 60 Hz and converts every per-frame constant to per-tick, so the game plays at the speed the owner remembers on a 60 Hz display regardless of machine; animation frame rates and the clock stay in seconds. Presentation interpolates. Core's tick is driven by its own accumulator, independent of FixedUpdate.
  • Content is data, validated on load. Every table in RECONSTRUCTION 8, 10, 11, 12.4 and 16 becomes a file under Content/; a loader validates references (item textures exist, scripts parse, quests reference real objectives) and fails loudly. All tuning numbers (speeds, regen rates, ranges, costs, colours, volumes) live in one settings registry and surface in the options screen where the original had none.
  • Built in code. One near-empty scene; a bootstrap builds the world, camera, HUD and screens in code (UI Toolkit with a shared theme), generated from the data. No prefab or Inspector wiring the owner has to maintain.
  • Modern Unity. Unity 6000.4.3f1, URP behind a pipeline-agnostic layer, the Input System (the original's key, mouse and gamepad map as rebindable actions), com.mindattic.unity.shared profiles for settings (replacing the registry key), com.mindattic.media.capture for the scripted-run screenshots.
  • Rendering. A perspective camera at 45 degrees looking straight along the world's depth axis, world units as in the original (one unit per area tile, the hero 0.144), sprites as quads with alpha cutout (the magenta colour key becomes real transparency at import), draw order by Y as the original sorted, weather and clouds as depth-layered particle quads at their original depths. The 4:3 640 x 480 reference is kept as the base aspect; other aspects letterbox or extend the horizontal view without changing the world's scale.
  • The render pipeline (U.OVW-T45). URP 17.4 with one Universal (forward) renderer, Assets/Unity.Rea.Overworld/Rendering/OverworldURP.asset and OverworldRenderer.asset, generated by Editor/RenderPipelineBuilder (menu, -executeMethod ...RenderPipelineBuilder.BuildPipeline, and before every player build) and set on GraphicsSettings and every quality level; matched to the original's unlit fixed-function frame: no HDR, MSAA, shadows, depth or opaque textures, render scale 1. The pipeline-agnostic layer is Runtime/View/SpriteMaterials: the only code that names a shader. Every world quad, the team button and the weather and cloud batches draw with MindAttic/Overworld/Sprite (Rendering/Resources/Overworld, so every build carries it): texel x vertex colour x the light, premultiplied source-alpha blending, no culling, no depth writes, and no LightMode tag, so it draws the same under URP or the built-in pipeline. Headless captures of the start, the weather and the battle ring match the built-in pipeline's pixel for pixel but for animation timing.
  • Online (U.OVW-T46, AGENTS.md rule 9). The game is built on the shared kit (Unity.Multiplayer, MindAttic Components for its menus, Unity.Shared for the player's name and colour; Packages/manifest.json, NGO under testables, MINDATTIC_NGO_TESTABLE committed in ProjectSettings.asset) in its own assembly, Unity.Rea.Overworld.Online (Assets/Unity.Rea.Overworld/Online, references Core, Runtime and the kit; the Editor references it). Its one rule is the game's own: one authority (Core's Game) holds the state, players send what they want to happen.
    • Local play is unchanged. Main holds the bootstrap and the kit's networked root (Editor/OnlineBuilder, run by OverworldBuild.BuildMainScene); its NetBootstrap never starts a session by itself (autoStart and serveWhenHeadless off, so batch-mode captures play locally) and the kit's menus stay hidden.
    • The front end beside it. O (OverworldOnline) opens the kit's NetFrontEnd (not with the developer tools on: O is then the original's path clear, U.OVW-T53); while one of its menus is open HeroInput.Hold holds every control (the held input let go), the pointer is freed, and outside a session the local game is held still (GameHost.Suspended). While a session runs HeroInput.EscapeTaken gives Escape to the kit's in-game menu.
    • Players carry their seat. Every connection gets an OverworldPlayer (NetEntity, the Player Prefab) with its roster seat ([Synced] Seat); seat n plays as player n + 1 (OverworldPeer.PlayerOf), so seat 0 is the scene's own player 1 and any other seat joins the authority's game (JoinGame) and leads its own hero (Party.LeaderOf: player 2 leads Belmont, and so on), leaving with LeaveGame when it goes. The server writes back the hero it leads ([Synced] Leader, Hero).
    • Commands into the server. On a client, OverworldPlayer sets its screen's Game.Forward: every command a player's controls make (CommandCodec.IsSent: the same HeroInput as local play) goes to the server as CommandCodec bytes ([ToServer] Send) instead of changing the client's game, which GameHost no longer steps. The server decodes them as the sender's seat, whatever id the bytes name, refuses anything malformed, and submits them. The authority's own commands (join, leave, load) and the scripted runs' are never sent.
    • State back for presentation. OverworldWorldSync (spawned by key, overworld:world, when a server's session starts) sends the game 20 times a second as a Core WorldSnapshot (the tick, the clock, its light, the weather, the hold, every hero's place, facing, mode, vitals and pictures, and every player's leader and view: camera, free-camera and cursor, OverworldPeer.View), which every peer keeps as Latest and raises SnapshotReceived with.
    • Drawing it (U.OVW-T51). A client's own game is frozen (Game.IsRemote: GameHost steps nothing for it, and its OverworldPlayer forwards its commands instead of applying them), so what its screen shows comes from the authority's snapshots instead of its own held game. Core's WorldMirror is that presentation: Present writes a snapshot's heroes straight onto the screen's own Party (place, facing, mode, vitals, pictures, drawn there at once, nothing to ease from), mirrors the clock's time and light, the weather and the hold, and, for the seat this screen's connection carries, mirrors its leader and its camera and cursor onto the screen's own player (PlayerId.One, so the HUD and camera read exactly as local play's do); Animate moves the rain and clouds at the 60 Hz tick between snapshots (scenery a snapshot does not carry, and the original moved every frame it was not paused). The owning client's OverworldPlayer builds one once its screen's party exists, finds the session's OverworldWorldSync once it has spawned (a client may seat before the server's world sync does) and feeds it every SnapshotReceived, so joining is "my own game's party, lit and weathered by the one I joined, standing where theirs stands" with no further wiring. Core WorldMirror has no test of its own yet (every piece it composes — Party.MirrorLeader, WorldClock.Mirror, Weather.Mirror, InterfaceControl.MirrorPaused, WorldSnapshot's own encode and decode — is dotnet tested already); the whole pipeline, host to a client's own Party, is Tests/Online's own TheClientsScreen_DrawsTheAuthoritysHeroesThroughItsWorldMirror.
    • Bots and tests. OverworldBot is the game's [NetBotDriver] (-bot A): it waits for its seat, holds an arrow and passes once the authority has walked its hero. Tests/Online runs on the kit's NetSessionTest (a host and a client: seats, forwarding as the sender's seat, refused bytes, snapshots, leaving, and the client's own screen drawn by its WorldMirror) and NetBotTest (a dedicated server and two bots joining by code). The wire formats and the forwarding are dotnet tested (NetWireTests).

Decisions beyond the original

Each is a place where the original is silent, broken or ambiguous. They are decided here so no ticket has to guess; a ticket that wants to change one amends this table.

Topic Original Rebuild
Near plane (3.2) PerspectiveFovLH(PI/4, 4/3, 0, 100): a near plane of 0 0.01, the nearest a Unity camera allows (view.json); nothing the game draws comes nearer the camera than that except a recalled hero at Z -1 with the camera at -1, which neither version shows
Aspect (3.2) Fixed 4:3 in a 640 x 480 window The 45-degree vertical field of view is kept and the aspect follows the window, so wider windows see more to the sides at the same world scale; 640 x 480 reproduces the original frame exactly (the capture tools render at that size)
Colour key and layering (2.3, 3.3) TextureLoader.FromFile with key 0xFFFF00FF; alpha blending with every quad at z 0, so later draws cover earlier ones The art is imported verbatim under Assets/Unity.Rea.Overworld/Art/Resources at its original path, the importer turning opaque magenta into transparent black as Direct3D did; every quad is a sprite-shader quad layered by sorting order in the original's draw order (backdrop, tiles, then objects back to front by Y)
Frame-rate dependence (RECONSTRUCTION 18) Per-frame speeds on an unthrottled loop Fixed 60 Hz tick; per-frame constants kept numerically as per-tick values
Walking down after running down (4.4) aiWalking's Down branch only ever lowers dY toward -walkSPD (it lacks the matching rise), so a hero who runs down and lets go of the run key keeps running speed while showing the walk cycle Fixed: every direction steps toward its speed from above or below in 0.001 steps, so the walk down settles at -0.003 like the other three directions (U.OVW-T9; Core LocomotionTests)
Free camera hold (5.3) checkScroll lets the free camera (F) scroll past the limits around the hero, but renderCursor then clamps the camera to hero +0.6 / -0.45, +0.35 / -0.4 every frame regardless, so the free camera never scrolled further (only its zoom was free) Fixed: with the free camera on the hold is lifted too, so the edges, numpad and X / Z move the camera anywhere; with it off everything is held exactly as before (U.OVW-T10; Core CameraControlTests)
Diagonal running animation (4.4) Running up or down while a side arrow is held shows the side's run cycle but advances it at the walk rate and frame count (the run-up/down branches reuse the walk numbers) Fixed: every run cycle advances at the hero's run rate, six frames, so a diagonal run animates like a straight one (U.OVW-T9; Core LocomotionTests)
Walls (3.5) Six segments hard-coded in Walls.loadwall; checkWall rewrites each hero's velocity before it moves (flat and angled walls set dY to +/-0.001 within twice ` dY
Recall and falling (3.7, 4.5) recallHero places a hero within +/-0.05 of the leader (two getRndPercent draws, x then y) at Z -1; checkFall raises a hero below 0 by 0.04 a frame showing halt_left, then sets it to 0 The same in Core's Party (figures in heroes.json "fall", the halt pictures in "sprites"): a RecallHero command (player id, hero) does what the follow rule (story A8) does on its own, through the same Party.Recall; the random source is the party's own System.Random (seedable for tests and replays); HeroRecalled and HeroLanded events let presentation play it. A recalled hero is placed, not eased in, and is drawn at its depth, so it drops toward the ground from the camera plane (U.OVW-T11)
Party, following and the leader (4.5, 4.7, 13) checkfollow per hero after its AI (recall beyond 1 on either axis, then run x0.03 / walk x0.02 / stand by the nearest range within on both axes, facing from dy unless dx is larger); checkFlocking once a frame before the heroes update; one global currHero and bTeam; [ / ] (changeHero), a left click on a hero (overHero, sticky while the button is held) and ' or the team button (bTeamtoggle / bUseDown latches) The same rules and order in Core's Party (figures in heroes.json "follow", "flocking", "selection"; the button in view.json "teamButton"), per 60 Hz tick, recalling through the one Recall path (HeroRecalled / HeroLanded). ToggleTeam, SelectHero and CycleLeader commands carry the player id; the leader is per player (LeaderOf), a follower is any hero no player in the game leads, and the followers follow the leader of the captain (the lowest player id in the game), which with one player is exactly the original. The team flag stays the party's. A click on a hero in battle mode follows battle's own rule (the Ring menu row, U.OVW-T23); with the team off the original also kneels the clicked-away leader. LeaderChanged centres that player's camera, and a [ / ] change snaps the cursor onto the new leader. The team button is a quad just in front of the camera at the fraction of the view the 640 x 480 pixels gave it (the original stretched its back buffer to the window), over the world and under the cursor. The hover name over a hero and the 2D cursor over the button came with the interface (U.OVW-T24, the Interface row) (U.OVW-T12; Core PartyFollowTests, EditMode PartyTeamTests)
Hero controls (5.1, 5.4) DirectInput: arrows, Right Ctrl / Space to run, right mouse button to head for the cursor, the cursor a quad on the ground The Input System (actions built in code in HeroInput) with the same bindings; the move button heads for Core's world cursor (below); the held state is sent each frame as a SetMoveInput command carrying the player id, and the party applies it per 60 Hz tick in the original's getKeyboard, getMouse, KeysUp, updateHero order
World cursor and camera (3.2, 5.3) The system pointer hidden, DirectInput's relative mouse motion moving a virtual 640 x 480 mouse (held 32 px in) and the world cursor (0.00172 a pixel); edge scroll, the hold and carry around the hero, centring, wheel and drag zoom and the debug keys per frame The same rules, numbers in view.json, in Core's CameraControl (one Viewpoint of camera and cursor per player, installed after the party so it runs after updateHero, as renderCursor and initCamera did), per 60 Hz tick. The pointer is hidden and locked while the window has focus; its motion is scaled from window pixels to the virtual 640 x 480 and sent as SetViewInput (motion and wheel steps add up until a tick uses them); E and F are ToggleExamine / ToggleFreeCamera on the key press (F was a WinForms KeyDown, so holding it toggled on every key repeat). The wheel zooms one step per frame it turns, as the original's per-poll test did; the wheel's other uses (rings, books, inventory, items in reach) come with their stories. The camera and cursor are drawn eased between their last two ticks
Death and Reset (6.5) Lights.GameOver, every frame: the leader's health 0 or below steps fadeOut (255 at full light) down by 1, the ambient colour (fadeOut, fadeOut, fadeOut); at 0, Root.Reset runs (tutorial re-queued, game speed 1, day period Morning, camera home, every pickup returned, the pack emptied, every menu shut, the render switches reset) but never restores health, position, gold, experience, quests, the clock or fadeOut, so the game calls Reset every frame forever with the screen still black Core GameOver (a tick system, U.OVW-T28): per player, the same 255-tick fade (FadeOutOf, read by WorldViewPresenter.FadeBy to draw it exactly as the clock's and the sleep's light are drawn, overriding both while it runs); at 0, the same Reset effects it is possible to build here — InterfaceControl.Reset (every menu shut, FPS on, pause off, tutorial re-queued), WorldClock.ResetForGameOver (game speed 1, day period Morning; the date and time untouched, so the period drifts on from there exactly as the original's would have had its clock run), every player's camera home at (0, 0, -1), Pickups.RestoreAllPickedUp (every world pickup returns; a drop, a rebuild-only concept, is untouched, as the original's loop only ran over the pickup array), the one shared pack emptied (Inventory.Clear, gold untouched, as the original's loop never touched it) and every player's panel shut — and, replacing the original's defect of restoring nothing, every hero is restored to full health, mana and stamina at its start position, facing, mode and AI state (Party.RestoreAfterGameOver), so play resumes instead of the screen staying black forever. ResetGame (R, a frmMain key like W or F7 / F8) forces the same reset at once, fade or no fade, as the original's R did. Not rebuilt: the original's other render-switch resets have no equivalent here (bMenu and the engine-layer bForeground / bBackground / bProp / bEnemy / bAnimate toggles have no state in this rebuild to reset at all); the developer tools' wireframe, textures and back-face culling switches (U.OVW-T47) are left as the player set them, since resetting them is outside this ticket and nothing else here reads their original figures. Core GameOverTests
checkScripts never called (9.3) A MOVE HERO TO script locks input forever; had it been called, it compared copies of the hero's position taken when the command ran, so it could never have ended either The completion check runs every tick on the hero's live position and steers it: each axis not yet within 0.05 (scripts.json "move") walks toward the target, and once both are the hero stands and the script stops running, as the code was written to do (U.OVW-T18; Core ScriptTests)
Script language and console (9) Script.Execute upper-cases a script, splits it at " | " and runs each four-word (or two-word keyword) command through module-level Command / Type / Item / Parameter; isArithmetic (+ / - add, = stripped, else assign); scriptError writes "Script failed to execute." after the run, an exception "Script failed to run."; bScriptRunning (MOVE, the AI walks) stops getInput; frmMain's scripter mode (~, Insert recalls lastScript, C / C shortcuts, the punctuation table, Back, Delete, Enter, Esc / F11 / ~) with checkScripter's prompt blinking every 0.5 s at (55, 75) in scriptColor (128, 255, 128) One Core ScriptInterpreter (an IScriptRunner and a tick system, installed after the pack and before the party) runs every script: the console's lines (PressConsoleKey, by the WinForms key name the original tested, with Shift as held; RunScript for scripted runs), every item's effect and the gold's (it replaced ItemScripts and CurrencyScripts), the Rune's teleport, and the quests' end scripts (story A15 calls Execute). Per player ScriptState: the console's line, last script, I-beam and colour, the running flag and MOVE targets, and (since U.OVW-T24) CHANGE OPTIONS opens and shuts the player's options menu (ScriptInterpreter.Interface); CHANGE BOOK works the player's book in the BookReader (ScriptInterpreter.Books, since U.OVW-T20; see the Books row). Party.InputLocked drops that player's input while its console is open or a script runs (the console's keys stay live, so CHANGE HERO AI STOP or CHANGE SCRIPT RUNNING OFF can end a walk); HeroInput sends nothing else then and swallows the Enter that ran a line until it is let go. Failures go to the message board in fontArial white and as ScriptFailed (with Crashed); an item whose script fails stays in the pack. Tables and texts (console keys, place, colour and blink, the messages, SCRIPT COLOR's colours, DAYPERIOD's hours, RUN's scripts, CAMERA POS HERO's offsets, MOVE's arrival) are scripts.json; the words of the language are the interpreter's grammar. The prompt is a UI Toolkit label over the HUD (HudPresenter.ShowConsole). Unknown commands and types still do nothing, as before; CHANGE HERO WEAPON stays an error until the weapon story. Scripted runs: -overworld-script, -overworld-console, -overworld-script-after (U.OVW-T18; Core ScriptTests, EditMode ConsoleHudTests)
Music never plays (15) The track is constructed and never started; Sound.vb otherwise wires only regen.wav (F7 / F8) Same volumes, converted to linear gain (audio.json "musicCentibels" 0, "effectCentibels" -1000, "ambientCentibels" -1500; AudioData.MusicVolume etc., U.OVW-T26): OverworldAudio plays Music.mp3 looping from the start and swaps to Battle.mp3 (pause one, un-pause the other, so each resumes where it left off) while any hero is in battle mode (BattleToggled). The unused effects are wired to the events they are evidently made for, read from Party's existing per-hero events, nothing new in Core: a footstep (alternating footstep_1 / footstep_2) or heavy_footstep once per half stride while a hero's HeroStateChanged frame crosses 0 or its cycle's midpoint in Walking or Running; sword_draw once a hero's state becomes Drawing, and a random sword_swing followed by a random sword_hit once it leaves Drawing for Battle (the shipped game never resolves an attack against anything, so this is the one drawing flourish, not a landed blow); charge once a hero's HeroBattleActionChanged goes from Recharging to Ready (its gauge full); a random death_1..4 once a hero's HeroVitalsChanged health crosses to 0 (ahead of the Reset story, A24, which reacts to the same crossing); zombies ambient loops while the leader stands in the 2007 database's "Entering Dark Woods" event box (EventRecord.X + Left etc., WorldPlayability's own combination), not the generic every-event-runs-its-script behaviour the Events row below describes, which is a separate, larger story. F7 / F8 are PlayRegenTest / StopRegenTest (RegenTest, a tiny Core command pair so every key still goes through one, kept distinct from any hero's own regeneration, as the original's one DirectSound buffer was); -overworld-regen-test scripts a press. jump.wav and defend.wav are imported (Audio/Resources, verbatim, catalogued) but never played: both are leftovers of art and sound built for mechanics the shipped top-down game never has (the superseded side-view jump/dash Hero.vb prototype RECONSTRUCTION 1 names, and a Defend stance no ring-menu choice ever reached), so there is no event in the shipped game they are evidently made for, and inventing one would be inventing gameplay this rebuild does not do
Events (9.4, U.OVW-T30) Loaded, never evaluated (the compiled engine reads both databases' Event and Script tables and uses neither) Core AreaEvents (a tick system, installed on the playable world only): each tick, for each player's leader standing inside an EventRecord's box (X + Left etc., as WorldPlayability already combines them, AreaEvents.Contains), its Script runs through IScriptRunner — once on entering, and again every the script's Rate seconds while the leader stays inside (0: the once only; leaving and re-entering runs it again). The 2007 world's three events: the Poison Box (-1 HP every 0.5 s), the Healing Box (+1 HP every 0.5 s), Entering Dark Woods (CHANGE TIME DAYPERIOD Night, once; the hour is set at once but, as DAYPERIOD always has, the period and light only follow on the clock's next minute, RECONSTRUCTION 9.3). The 2006 engine database's own three events (Test, Dark Woods, Cinematic) and three scripts stay exactly what they already were, a reference record (ContentRegistry.ReferenceWorld) AreaEvents never reads: the compiled engine never ran them either, and the ticket keeps them "as data", not live. Core AreaEventsTests
Poisoned icon (7) Reuses the Angry frames (the Poisoned folder is empty) A distinct green-tinted poisoned animation derived from the Angry frames, flagged for replacement art: heroes.json "vitals" lists the Angry frames as poisonedIcon and the world presenter draws them in poisonedTint (96, 255, 96) times the light (U.OVW-T14)
Vitals, status and regeneration (4.1, 7, 13) Health 31 / 50, mana 12 / 20, stamina 60 / 60 per hero; checkStatus every frame (not Poisoned: Fine, Exhausted below 0.15 x max stamina, Angry below 0.05 x max health); checkRegen in adventure mode once regenRate (2 s) has passed (not poisoned: kneeling and not picking up +2, standing +1; poisoned: health -1, floor 0; running: stamina -1, floor 0 either way); renderIcon draws the status's four frames at 0.3 s on a 0.05 quad at (x + 0.045, y + 0.03); renderStatus writes the leader's name and "HP n / max", MP, AP (and the team's at +80, +160) in (255 - r, 255, 255 - b) of the light; three 75 x 14 bars at the bottom left whose fill quads narrow with the value, the whole fill picture squeezed onto them The same rules in Core's Party (figures in heroes.json "vitals"), per hero per 60 Hz tick before its AI, the status animation stepped after its move; HeroStatusChanged / HeroVitalsChanged events. SetHeroVitals (player, hero, HP / MP / AP / status, clamped to 0 and the maximum) is the CHANGE HERO assignment for the script story (A14) and scripted runs (-overworld-vitals). The status box is Core's StatusBoxView (hud.json "statusBox") drawn as UI Toolkit labels, and the bars (hud.json "bars") as UI Toolkit pictures, both unlit, by HudPresenter; the icons are quads in front of the heroes in the world's light. Running already needed stamina (U.OVW-T9) and now spends it. Battle's 0.18 s refill and the "NN %" / "Ready!" line came with U.OVW-T22 (the Battle mode row). The hero-select brackets came with the interface (U.OVW-T24). Picking up sets PickingUp since U.OVW-T16 (U.OVW-T14; Core VitalsTests, EditMode VitalsHudTests)
Stamina past its maximum (7) Kneeling adds 2 whenever stamina is below the maximum, so 59 becomes 61 (shown as "AP 61 / 60" and an overfull bar) until the next step sets it back to 60 Fixed: every gain stops at the maximum (U.OVW-T14; Core VitalsTests)
Status animation timer (7) AnimateIcon keeps one lastStatusCheck for every hero, so in a frame only the first animated hero advances and the others' animations freeze Fixed: each hero keeps its own timer, so every icon animates at 0.3 s a frame (U.OVW-T14; Core VitalsTests)
Resting and sleeping (6.4) actionRest (, not in battle) stops running and steps Standing to Kneeling, Kneeling to Laying, Laying back to Kneeling; showRestText writes "Rest for n hour(s)?" at (iWidth / 2 - 100, iHeight / 2 - 20) in fontArialNarrow24 white while laid; laid, the arrows move sleepHours 1 to 24 every 0.08 s; Enter (or the left button) sets bSleeping; checkSleep fades the device ambient 5 a frame to black, then lays every hero down, adds max x hours x 0.125 to health and mana (stamina too unless Poisoned), adds the hours to the clock, resets sleepHours to 1, stands the leader and fades back up The same in Core: the Rest command and the chooser in Party (heroes.json "rest"), and SleepCycle (Sleep, SleepUntil; SleepStarted, PartySlept), installed after the party and before the clock, with the gains assigned as VB did (rounded half to even, capped at the maximum). The ambient multiplies the world's light in WorldViewPresenter.DimBy; the HUD (prompt from hud.json "rest", status box, bars) is not dimmed. Scripted runs: `-overworld-rest <kneel
Moon Berry and Morningstar wake an hour late (6.4, 8.1) Their scripts CHANGE HERO AI LAYDOWN | CHANGE TIME HOUR 22 / 5 set the clock, and LAYDOWN starts the ordinary sleep of sleepHours (1), so the party wakes at 11 PM / 6 AM Fixed: the draughts sleep until 10 PM and 5 AM (the minute kept, the next such hour), as their hours evidently meant: SleepUntil (hero, hour) lays the hero down and the sleep ends at that hour instead of adding the chosen hours. The script story (A14) maps the item scripts' CHANGE HERO AI LAYDOWN followed by CHANGE TIME HOUR h onto one SleepUntil(h) (LAYDOWN alone is SleepUntil(null), a sleep of the chosen hours), and the inventory story (A13) runs them on use: built in U.OVW-T17 with ItemScripts, and since U.OVW-T18 in the interpreter, which lays the hero down until the hour a script's CHANGE TIME HOUR assignment names and leaves the clock for the waking to set (U.OVW-T15; Core RestTests, InventoryTests)
Nitro Bean (8.1) Overwritten by Cheese before use Both exist: Cheese at pickup 102, the Nitro Bean (+200 stamina, value 120) as an added 373rd pickup at its original coordinates (drawn over the Coffee Bean it shares a place with, later index over earlier, as the original drew)
Pickups, reach and picking up (8.1, 8.2) loadItem places the 372; checkItemsInRange lists up to 13 unpicked pickups whose (x + 0.025, y - 0.025) is within 0.05 of the hero's (x + heroSize / 2, y - heroSize / 2.5), in index order; showItemName writes "." (scale 0.02) and the selected one's name (0.007) in 3D text over it; , / . (and the wheel, before it zooms, whenever anything is in reach) step through them, wrapping; Enter or the left button (not over the team button; while laid it is Sleep instead) stops running and, once a press (bItemPickup), kneels the hero with PickingUp, while held the arrows only mark their direction and the move button waits; checkItemPickup in the same frame takes the selected one (UseOnPickup scripts run, the rest stack by name with the weight); checkGrowth brings a picked pickup back growthRate seconds of AppTime later; KeysUp clears PickingUp and stands the hero when the button is let go The same rules and figures in Core's Pickups (pickups.json "reach", "label", "art"), stepped before the party each 60 Hz tick as checkItemsInRange and checkItemPickup ran after getInput and before updateHero; the button is MoveInput.PickUp (held) or the one-tick PickUp command, CyclePickup is , / ., and Pickups.UseWheel is handed to CameraControl.WheelFirst. Growth runs on game seconds (the 60 Hz tick clock, as AppTime was real seconds), not the in-game clock, so a sleep does not regrow the fields. The gold and satchels scatter by a seeded System.Random (the original's was the clock's; -overworld-seed). The pack and purse are Core's Inventory (party-wide, as items / inventoryWeight / Gold were); the gold's CHANGE HERO GOLD runs through Pickups.Scripts, the script interpreter since U.OVW-T18 (CurrencyScripts before it), which reports a failure itself. The pickups draw as item-size quads of gfx/items in the world's light, after the tiles and behind the heroes; the 3D-text names are UI Toolkit labels projected onto the pickup at the em height the scale gives Arial 24 (GraphicsFont.Render3DText: pixels / 10 units), in the world's light, under the HUD. The dropped items (dropped, checkDroppedPickup) came with dropping (U.OVW-T17, the Inventory row). A hero Moving in battle pays 5 percent of its maximum stamina for a pickup or a drop taken back (U.OVW-T22; its Moving comes from the ring's Move entry, A19), and the pick-up button does not kneel while the battle's ring menu is open. Scripted runs: -overworld-place, -overworld-reach, -overworld-pickup, -overworld-examine-pickup (U.OVW-T16; Core PickupTests, EditMode PickupHudTests)
Satchels (8.1) GroupItem, weight 0, script CHANGE HERO GOLD +25: carried in the pack, paying its 25 gold when used (a GroupItem applies at once on use, with no target to choose) Kept: a satchel goes into the pack and pays out when it is used (built in U.OVW-T17: Enter on it in the panel, or its number key); only the coins (UseOnPickup) pay out on pickup. The story's "gold and satchels paying out at once" is read as the satchel paying at once when opened, since nothing in the original is broken there
Examine box (8.4) checkCursorOverItem (every frame, examine mode or not) writes the name over the first unpicked pickup within 0.03 of the cursor + (0.03, -0.04) at (x + 0.025, y) and sets overItem; in examine mode renderExamine draws examine.png over 328 x 175 at (292, 112), the pickup's world picture 32 x 32 at +(15, 10), and in fontArial white its name, effect, "Description:" and the description, "Weight: " and "Value: $" The same, built here in full: Pickups.PickupAt (pickups.json "hover"), the box from hud.json "examine" drawn by HudPresenter as UI Toolkit elements at the same fraction of the window. The examine eye cursor came with the camera (U.OVW-T10). The screen-interface story (A20) keeps the box as it is and adds only what is its own (the 2D cursor over the HUD) (U.OVW-T16)
Battle mode: stances, weapons and the turn gauge (4.2, 4.4, 5.6, 7, 12.1, 12.2, 12.4, 13) actionBattleToggle (End, once a press, bBattleDown): entering, bRingMenu opens, the leader's mode is Battle and, its stamina full, it draws from frame 0 (else Recharging); with bTeam every other hero copies the leader's mode and battle action, then draws if full or recharges; leaving, the ring shuts and the leader is Adventure, Standing, Ready, the others copying the mode and action and then drawing if full or recharging again, and the quick bar and range circles close. checkRegen in battle mode: once more than refillInterval (0.18 s) has passed since lastBattleCheck, a Recharging hero below its maximum gains 1 and kneels, one at it is Ready, stands, has moveDistance recomputed and, not already in the Battle state, draws from frame 0 (the adventure regeneration does not run). aiDrawing holds the hero still on the draw cycle (`combat\draw\draw_left right_1..6, left and down the left set) at 0.05 s and on its last frame sets a random battle frame (getRndInt(0, BattleFrames)) and the Battle state; aiBattleloopscombat�attle_left
Entering battle behind a recharging leader (12.1) actionBattleToggle copied the leader's BattleAction onto every other hero before deciding its own, so a full hero entering behind a recharging leader drew while Recharging, and the next refill check (at most 0.18 s later) made it Ready and started its draw again from frame 0 Fixed: each hero's action is its own gauge's, full Ready and drawing, else Recharging, so the draw plays once (U.OVW-T22; Core BattleTests)
Ring menu, move budget, range circles and the turn (12.2, 12.3) renderRingIcon / checkRingRotate draw ring_select.png (0.075) at (x + 0.035, y + ringRadius - 0.03) and the five 0.05 icons (Move, End, Skill, Item, Attack) at radius 0.1 round the leader's middle, entry n at 1.57 + 1.256 n; left / right (held, every frame) and the wheel set RingLeft / RingRight, every angle easing by 0.1 + 0.3 x what is left and snapping, then ringNum moves (right back one, left on one, wrapping) and checkRingEffect applies: Move shows the move circle, Attack the attack circle, Item the quick bar, Skill none, each standing the leader into determineBattleStance, End kneeling it; Up (bRingSelect) pulses the radius out by 0.1 to 1 and back. Enter or a left click off a hero (actionRingSelect, bUseDown, and bItemPickup so the press does not kneel): Move with stamina sets Moving and shuts the ring; Item with items opens the pack and shuts the ring; End calls NextHeroInBattle; Attack and Skill nothing. checkHeroMove (in actionMove, the move button): the distance covered comes off moveDistance and the gauge is set to its share (VB Integer); spent, the hero stops, recharges and the turn passes, the ring shutting with bNoOneReady if it came back to the same hero. NextHeroInBattle: resetRing, the leader kneels and recharges, the next hero in index order in battle mode and Ready leads (or the same one), gets up and draws unless in stance, CenterOnHero. checkBattleSelect: with bNoOneReady the first hero at full stamina leads, draws, the ring opens reset. A click on a battle hero at full stamina sets the leader recharging, resets and opens the ring and leads. checkUseItem in battle: the leader pays CInt(max x 0.1), selectedHero is the leader, the panel shuts and the ring opens (not reset). actionDrop in battle (Backspace, the middle button) shuts the panel and opens the ring reset. renderCircle: 21 0.02 dots, dot n at 0.3 n, orbiting 0.01 a frame (up facing left or down), radius moveDistance (Move) or the weapon's Range (Attack), behind the heroes; checkDotColor red near the leader, blue near an ally (0.08 of the hero's point), green otherwise, every Attack dot red The same in Core's Party (PartyRing.cs, per player RingMenu from RingOf; heroes.json "battle" "ring", "circle", "itemStamina"; TurnRing and ChooseFromRing commands, RingTurned, RingEntryChosen, TurnPassed, and LeaderChanged so the camera follows), stepped on the 60 Hz tick after the heroes (the turns, pulses and circles were per frame); the move budget is spent in MoveTowardCursor, as checkHeroMove ran inside actionMove; the pack's hooks (QuickBarShown, OpenPack, PayForItem, CancelToRing) and RingChoiceHeld (the choosing press neither kneels nor uses) tie it to InventoryControl and Pickups; Party.UseRingWheel is first in CameraControl.WheelFirst; HeroInput sends ChooseFromRing on Enter or a left click off a hero and the buttons, and the middle button's DropItem in battle. WorldViewPresenter.ShowRing draws the frame and icons after the status icons and the dots behind the heroes, in the world's light. As in the original, the arrows still walk a battle hero with the ring shut (only the move button spends the budget), End with no one else ready gives the turn back to the same hero recharging with the ring open, entering with a recharging leader stands it into its draw until the refill kneels it, and G / H (the ring's debug entries) are not bound. Fixed: the four rows below. Scripted runs: -overworld-ring <steps[,choose][,seconds]> (U.OVW-T23; Core RingMenuTests, EditMode RingMenuHudTests)
A cost while Moving given back (12.3) checkHeroMove set the gauge from moveDistance every frame, and nothing else changed moveDistance: a pickup's 5 percent, an item's 10 percent or a CHANGE HERO AP while Moving was undone at the next step, and a hero choosing Move part-charged had its gauge filled back up from the distance worked out when it was last Ready Fixed: choosing Move, a pickup's or item's cost and a stamina change while Moving set the move distance to what the gauge allows (U.OVW-T23; Core RingMenuTests)
No one ready, after leaving battle (12.2) bNoOneReady was never cleared on leaving battle, and checkBattleSelect took any hero at full stamina, so the first full hero (in adventure mode too, as with the team off) drew its weapon and opened the ring outside battle Fixed: leaving battle clears it, and only a hero in battle mode is taken (U.OVW-T23; Core RingMenuTests)
A turn and a pulse cutting each other off (12.3) One ringMode held both: Up during a turn left the entries off their places until the next turn, and a turn during a pulse left the ring stuck wide until the next Up Fixed: a turn waits for a pulse to finish and a pulse for a turn (U.OVW-T23)
A reset mid-turn (12.3) resetRing put the entries back but left a turn under way, which then finished from the reset places and moved the selection off Move Fixed: a reset settles the ring at rest at its own radius (U.OVW-T23)
Leaving battle (12.1) Leaving copied the mode and action onto the others and then set every full one Drawing (a draw cut short by checkfollow the same frame) and every other one Recharging in adventure mode, so after a later [ / ] that hero knelt whenever idle; and the leader kept the Kneeling of its recharge, so the right button did not move it until an arrow stood it up Fixed: every hero leaving is Adventure, Standing, Ready and not kneeling, as RECONSTRUCTION 12.1 states the intent (U.OVW-T22; Core BattleTests)
Rusty Sword (8.1) CHANGE HERO WEAPON ITEM has no handler, so it fails CHANGE HERO WEAPON equips the carried item (the Equipable type's evident purpose), ATK 5, DEF 1, DUR 2/10 as its effect text says
Quests, subquests, the quest screen and markers (10) checkQuests each frame after checkFlocking and before updateHero: every incomplete objective of Quest(currQuest) whose (x, y) is within Range on both axes (A_near_B, edges included) of hero(currHero)'s (x + heroSize / 2, y - heroSize / 3) is complete, Experience += its Exp and its endScript runs (Script.Execute); with every objective complete the quest is Success, adds its Exp, runs its endScript, currQuest moves on (not past maxQuest) and the next is set Active and runs its startScript; checkSubquests the same for every Active subquest (no hand-on); only MoveTo is evaluated. Page Down (actionQuestScreen, once a press) toggles bQuestScreen; while it is open the arrows (bQuestLeft ... bQuestDown latches) only mark their direction for the leader and work questCategory / subquestNum / onSubquests (QuestCategoryUp / Down), actionMove and actionRest do nothing; renderQuestScreen draws texQuests(page) on a 600 x 430 quad at (20, 20) and writes the lines in fontArial; showQuestPoints (every frame, open or not) writes renderText's "*" (0.02) at every incomplete objective of every main quest and every Active subquest The same rules in Core's QuestLog (quests.json: the quests, objectives and the hero point; hud.json "questScreen": the screen, its pictures, points, colours, texts and the marker), installed after the interpreter and before the party, checking each player's leader (one player: exactly currHero); the experience is the party's Party.Experience (the original's global Experience). Scripts run through the interpreter with HERO the item target (selectedHero), so go East's CHANGE TIME HOUR 18 sets the clock to 6 PM. ToggleQuestScreen (Page Down) and PressQuestKey (the arrows, for scripted runs; the held arrows are read per tick with the original's latches) per player (QuestScreenView); Party.QuestScreenOpen blocks the arrows' walking, the move button and rest, as the original's flags did. QuestObjectiveCompleted, QuestCompleted, QuestStarted and QuestScreenChanged events. The original shows no message on completion and none is added. The screen is drawn by HudPresenter (UI Toolkit, after the examine box and before the messages, as renderQuestScreen came between them); the markers are 3D-text labels projected onto the objectives in the world's light, as the pickups' names are (not WorldViewPresenter quads, since renderText is the same 3D text). The picture's top edge v of 2 / 600 and 2 / 430 (under half a pixel row cropped) is not reproduced. Scripted runs: -overworld-objective, -overworld-quest-screen (U.OVW-T19; Core QuestTests, EditMode QuestHudTests)
Books and the reader (5.1 to 5.3, 9.2, 11) loadBooks reads every data\books folder (title) and its page files in name order and loads "Grimoire de'Alchemiste" in fontCorsiva8 (Monotype Corsiva 8 italic), Roman; renderBook (after renderExamine, before the bars) draws texBook (book.png until CHANGE BOOK COVER) on a 600 x 450 quad at (20, 20), Pages(currPage) at +(30, 30) and Pages(currPage + 1) at +(320, 30) in the book's font and their numbers (Roman, standard, or blank for none and ancient) at +(150, 405) and +(440, 405) in fontAmount, all black; B toggles bBook; N (currBook on, wrapping) loads the next folder's book in fontCorsiva (12), Roman, at page 0, keeping cover and bBook; with bBook on, actionLeft / actionRight call lastPage / nextPage (two pages, clamped, one bTurnPage latch for the pair) instead of turning or walking the leader, while actionUp / actionDown still walk; the wheel turns pages before the pack and the zoom (away on, toward back); selectInventory* do nothing; Delete hides the book and opens the inventory; actionDrop with the inventory open hides the book instead of dropping; the right button hides it; a book item's script (COVER, FONT, TO ITEM, NUMSYS ROMAN, SHOW TRUE) opens it The same in Core's BookReader (per player BookView: Shown, Book, Page, Numbering, Cover, Lettering), installed after the pack and before the party; ToggleBook (B), NextBook (N), and for scripted runs TurnPage and OpenBook; the held arrows are read per tick with the one latch, the wheel through CameraControl.WheelFirst (book, pack, items in reach, zoom), Party.BookShown makes left and right only mark their direction (as an item's target choice does), InventoryControl.Books gives Delete, the drop key and the panel's arrows to the book while it is shown, and the move button hides it; BookChanged events. CHANGE BOOK drives it through ScriptInterpreter.Books (U.OVW-T18 had only recorded its settings): TO ITEM loads the book named like the pack's selected stack (no such book reloads the open one, as loadBook's failed search did), NUM n (-1 the open one), SHOW, NUMSYS, COVER, FONT; every load is Roman at its first spread and keeps the lettering. The screen, covers and letterings (by script word), fonts, the start book and N's lettering are hud.json "book" (Monotype Corsiva 8 and 12 italic added to its fonts); the books are books.json. Drawn by HudPresenter.ShowBook (UI Toolkit, after the examine box and before the bars, which now have their own layer after it, so the bars draw over the book's corner as they did); each page file is written as it is (its hand wraps, its own spaces). Monotype Corsiva has one face, flagged italic, that Windows lists only as "Monotype Corsiva Italic"; GDI drew it unslanted, so the HUD loads it as a font asset by family and style and does not slant it again (a stand-in face where it is missing is slanted). Up and down still walk the leader with the book shown, as in the original (not a defect: only left and right belong to the book). Using another item does not close the book (RECONSTRUCTION 11 said it did; corrected). book_brown.png is byte-identical to book.png, so only BLUE changes the picture, as in the original. The picture's top edge v of 2 / 600 and 2 / 450 is not reproduced. Scripted runs: `-overworld-book <title
CHANGE BOOK NUM past the books (9.2, 11) loadBook took any number as currBook: past 100 it threw ("Script failed to run."), from the book count to 100 it loaded a one-page book of no text whose Pages(currPage + 1) threw in renderBook every frame it was shown Fixed: a number that is not a book (other than -1, the open one) stops the script with "Script failed to run." and leaves the book as it was (U.OVW-T20; Core BookTests)
Weather, clouds, tent and props (3.4, 3.6, 14.1, 14.2) loadRain scatters 2,501 0.04 quads over the grid's box (x -3 to 7, y -8 to 2) at z -1.51 stepping 0.01 further up; updateRain each frame moves every one by the mode (Snowing x and y +0.001 x rnd, z +0.01; Raining z +0.05; Clear nothing; FallingLeaves a random diagonal of 0.003 x rnd, z +0.01, with the snow picture; DustStorm x and z +0.05) and puts one at z >= 0 back at -1.1 with a new x and y (+1); renderRain draws those in range on x, y and z; W (a frmMain KeyDown, console shut) cycles Snowing, Raining, Clear, FallingLeaves, DustStorm; loadCloud scatters 401 clouds (y +1, z -1.1 stepping 0.005 nearer, 0.2 to 0.8 square, cloud1 or cloud2, the first four the balloon) that updateCloud drifts right 0.001 to 0.004 a frame and wraps from x 7 to -3 with a new y; the tent quad (0.3) at (-0.7, -0.04) on layer 1; the four prop bottoms in the sorted objects (their tops never drawn) The same rules and figures in Core's Weather and Clouds (weather.json, its box checked against the area grid on load), stepped first each 60 Hz tick (clouds, then weather, as updateCloud and updateRain ran first after getInput), each with its own seeded System.Random (the original's clock-seeded rndNum; -overworld-seed fixes them with the pickups'), the random draws in the original's order. One weather for the world, as the module was: CycleWeather (W, through HeroInput's Input System action, sent once per press as E and F are, rather than on every key repeat; still read while a script runs and not while the console is open, where W is typed) and SetWeather carry the player id; WeatherChanged. Drawn by WorldViewPresenter: the tent as a quad after the tiles and before the pickups (culled on x and y), the particles as one dynamic mesh (QuadBatch, one quad each, folded to a point when out of range) in the mode's picture after the status icons, and the clouds as one mesh over one picture packed at run time from cloud1, cloud2 and the balloon (imported readable for that) after the weather, so 2,902 quads are two draws and keep the original's index order (the clouds back to front); all in the world's light (the clock's tint and the sleep's fade, as the material was) and eased between ticks, a particle or cloud that starts again appearing where it starts. Not reproduced: the Z-buffer let a nearer particle drawn earlier hide a farther one behind its transparent corners (the sprite material writes no depth, so a particle never cuts into another); the pickups' names and quest markers, 3D text drawn before the weather, are UI Toolkit labels over the whole world (as decided with the pickups), so snow falls behind them rather than over them. The props were built with the world view (U.OVW-T8) and are unchanged. Scripted runs: -overworld-weather <snowing|raining|clear|leaves|dust>[,seconds] (U.OVW-T21; Core WeatherTests, EditMode SceneryPresenterTests)
Quest Exp at the last quest (10) If currQuest < maxQuest Then currQuest += 1, then Quest(currQuest).Status = Active regardless, so at the last quest the finished quest is made Active again, found complete again the next frame and its 3500 Exp re-awarded every frame, for ever Fixed: awarded once; the final quest stays Success, and the Finished page lists it (U.OVW-T19; Core QuestTests)
Quest Exp use (10) A counter nothing reads Kept as Party.Experience; the hero screen shows it ("Experience: n" under its time line, hud.json "heroScreen" "experience", U.OVW-T24); no levels (none existed)
Clock noon (6.1) 12 PM shown as AM 12:00 shows PM (U.OVW-T13; Core ClockTests)
Clock, daylight and calendar (6.1 to 6.3) renderTime once a frame: when timeRatio * gameSpeed seconds (1) have passed since the last minute, theTime gains a minute, checkDayperiod puts the hour in Day 9-17, Evening 18-20, Night 21-5 or Morning 6-8 (queuing the period's name in Arial Narrow 24 white on 9:00, 18:00, 21:00 and 6:00), then each of r, g, b steps 1 toward the period's colour (Day and Morning rise to white, Evening falls to (255,128,128), Night falls red and green and raises blue to (128,128,255); a channel on the wrong side is set to the target at once); the colour is the world's material, so every 3D quad is multiplied by it and the screen-space HUD is not; the HUD writes the period and strTime at (5,410) and (5,423); renderDate names the months and weekdays for the hero screen The same rules and figures in Core's WorldClock (time.json: start, periods with hours, colour, per-channel rise/fall and announcement, the calendar; the game speed is heroes.json's), stepped per 60 Hz tick, at most one minute a tick, a minute every 60 ticks; PeriodChanged / PeriodAnnounced events. The world presenter multiplies its one sprite material (backdrop, tiles, objects, world cursor) by the light; the team button and HUD are unlit. The HUD's two lines are UI Toolkit labels (hud.json: positions on the 640 x 480 screen, fonts, the half-transparent yellow), placed as the same fraction of the window. SetClock (the HOUR path: hour, optional minute, the next day when earlier, period and light settled, announcing a first minute it lands on; or unsettled, the DAYPERIOD path) and SetTimeRatio (timeRatio, 0 = a minute every tick) are commands for the script story (A14) and for scripted runs (-overworld-clock h:mm[,seconds]). The start (9:00, Day, white) is not announced, as in the original (its first check ran at 9:01). The hero screen's date and time lines (hud.json "heroScreen", WorldClock.DateText / TimeAndPeriodText) are drawn by the hero screen since U.OVW-T24 (A30 adds the hero database to it); the - / = game-speed keys (5.2) are not bound, so the game speed stays heroes.json's 1; sleep's ambient fade is story A11 and Reset's Morning is story A24 (U.OVW-T13; Core ClockTests, EditMode ClockHudTests)
Messages (13) addMessage queues up to 100 (a full queue overwrites its last); MessageHandler shows the first at the screen centre (x less 3 px a character) once the last shown is more than 14 px below the centre or gone; renderMessages takes 2 alpha and moves each down 1 px a frame, freeing it at 0 (the step that would pass 0 overflowed the byte and set it to 0 without moving) The same queue in Core's MessageBoard (hud.json "messages"), per 60 Hz tick, stepped after the clock as renderMessages ran after renderTime, so an announcement shows on its minute; drawn by HudPresenter. Built with the clock for the period announcements; the script failures (U.OVW-T18) and the tutorial (U.OVW-T24, MessageBoard.SayTutorial, hud.json "tutorial") use the same board (U.OVW-T13)
Stale pickup selection (8.2) checkItemsInRange resets selectedItem only when one item or none is in reach and never clears itemArray, so with the third of three selected and two left in reach the selection points past the list at a stale entry: its name shows and Enter picks it up wherever it now is, out of reach Fixed: a selection beyond the items in reach goes back to the first, so the name shown and the item taken are always in reach (U.OVW-T16; Core PickupTests)
Inventory, swap, drop, use and the quick bar (4.6, 4.7, 8.2, 8.3, 8.5) Global bInventory, currItem, bSwap / swapNum, bHeroSelect / selectedHero, bQuickBar and items / inventoryWeight / WeightLimit; Delete (actionInventory, not in battle, clearing bSwap) toggles the panel; with it open the arrows (selectInventory*, per press) move currItem (left / right wrap, up / down by 10, clamped), the run key marks then swaps (SwapItem), Enter or the left button (bUseDown) moves to the icon under the mouse (overInventory) or uses (solo: on currHero; team: GroupItem and Reusable at once on the last selectedHero, anything else closes the panel and sets bHeroSelect, where left / right / the wheel pick selectedHero and Enter uses), Backspace or the right button (actionDrop) drops (checkDrop: a copy at hero + 0.05 x rnd per axis into the next of 372 dropped slots) and cancels bHeroSelect; checkUseItem runs the script with HERO = selectedHero and consumes one unless Reusable; \ (actionRest) shuts the panel; 1 to 0 (actionQuickItem) set currItem and in team mode bHeroSelect, in solo bQuickUse; Q toggles bQuickBar; checkDroppedInRange / checkDroppedPickup take drops back like pickups (after them, no growth); checkWeight per hero burdens and kneels every hero while inventoryWeight > WeightLimit (28.5) and renderStatus writes "You are overburdened" The same rules in Core's InventoryControl (per player PackView: Open, Cursor, Swapping / SwapFrom, Choosing / Target, QuickBar) over the party's one Inventory, stepped after the pickups and before the party; the held arrows, run key, pick-up button and move button are read from MoveInput with the original's per-key latches, the rest are commands (ToggleInventory, ToggleQuickBar, DropItem, QuickUse, and MoveInventoryCursor, SwapItem, UseItem, ChooseTarget, GiveItem for scripts and scripted runs); the party and pickups read its InputFocus (pack open: the arrows, run key and move button no longer move the leader and Enter does not kneel; choosing: left and right choose), Party.Pack burdens (HeroBurdened), drops are Pickups.Drops drawn after the pickups with their inventory picture, the wheel goes to the pack before the items in reach. Layout and text (panel, icons 10 to a row, cursors, the weight / gold / item lines, counts, quick bar, inventory button, "You are overburdened", the target's select_hero.png and 3D name) are hud.json "inventory", "quickBar", "inventoryButton", "burdened" and "target", drawn by HudPresenter (UI Toolkit, over the world cursor, which the original hid over the panel and buttons) and WorldViewPresenter (drops, target). Item scripts ran through ItemScripts (CHANGE HERO HP / MP / AP / STATUS / GOLD, AI LAYDOWN with TIME HOUR, AI KNEEL, TIME HOUR, INVENTORY OPEN / CLOSE) until U.OVW-T18's interpreter replaced it: now every item's script runs in full (the Rune teleports, the books open in their covers and letterings through the BookReader since U.OVW-T20), and one that fails (the Rusty Sword's WEAPON, until the weapon story) shows "Script failed to execute." and the item is not used up. Battle mode's use (10 percent stamina, the target back to the leader, the panel shut, back to the ring) and the ring's Item entry came with U.OVW-T23 (the Ring menu row); the 2D cursor over the panel with the interface (U.OVW-T24); actionInventory, the drop key and the panel's arrows with a book shown came with the books (U.OVW-T20). Scripted runs: -overworld-give, -overworld-quickbar, -overworld-inventory, -overworld-swap, -overworld-drop, -overworld-use, -overworld-quick, -overworld-pickup-drop (U.OVW-T17; Core InventoryTests, EditMode InventoryHudTests)
Inventory cursor on an empty pack (8.3) Left, right, down or the wheel with nothing carried set currItem to itemCount - 1 = -1, and the next item picked up was drawn and used from slot -1 Fixed: with an empty pack the cursor stays on the first slot (U.OVW-T17; Core InventoryTests)
Clicking an icon (8.3) checkCursorOverInventory tests x within the icon but y with A_between_BC(mouse.Y, icon centre, 16), i.e. anywhere between the screen's 16th pixel and the icon's centre, so a click selected the icon whose upper-half band (reaching up to the row above) it fell in Fixed: a click lands on the icon whose 32 x 32 square it is in (InventoryPanelDefinition.SlotUnder) (U.OVW-T17)
A click on a button also did the panel's work (8.3, 13) A left click on the team or inventory button also ran actionPickup: with the panel open it used the selected item (and the inventory button's toggle then reopened the panel the use had closed); shut, the leader knelt to pick up Fixed: a click on a button is only the button's (HeroInput.PickUpHeld) (U.OVW-T17)
The swap mark after a removal (8.3) Using or dropping the last of a stack kept bSwap / swapNum, so the next run-key press swapped with a slot past the end of the pack, moving a stack out of it, where it was lost Fixed: any removal clears the mark (U.OVW-T17; Core InventoryTests)
Solo quick use (8.5) actionQuickItem in solo mode used the item on selectedHero, which only changeHero, a click on a hero and a team-mode choice set, so a number key could feed another hero Fixed: solo, a quick use is on the leader, as the panel's solo use is (U.OVW-T17)
Running out of drop slots (8.2, 8.3) dropCount only ever rose, so the 373rd drop wrote past the 372 dropped slots Fixed: a drop takes the first slot whose item was picked up again (Pickups.Drop) (U.OVW-T17)
Vitals added below 0 (9.2) CHANGE HERO HP -5 (the Bramble Nut) caps an addition at the maximum but never at 0, so health could go negative An addition stops at 0 too, as every other change of a vital does (U.OVW-T17; Core InventoryTests)
A command of the wrong length (9.1) divideScript only stored the words of a four- or two-word command, so any other (an empty line, CHANGE HERO HP, a doubled word) ran with the previous command's words: an empty Enter in the console ran the last item's effect again Fixed: such a command is an error ("Script failed to execute.") and does nothing; a two-word command has no item or parameter, so only RUN takes that form; runs of spaces count as one (U.OVW-T18; Core ScriptTests)
RUN skipped the rest (9.2) cmdRunScript called Execute again, which overwrote the module-level command list and counter, so RUN NIGHT | CHANGE HERO HP +1 never ran the second command Fixed: the named script runs in place and the commands after it still run (U.OVW-T18)
CHANGE TIME HOUR +n (9.2) The arithmetic path called theTime.AddHours(n) and threw the result away, so it did nothing Fixed: the clock moves on n hours (the next day past midnight) with the period and light settled, as the assignment path does (U.OVW-T18)
CHANGE LIGHT (9.2) CByte threw on any negative number (so CHANGE LIGHT AMBIENT -10, the source's own "Fade2Black", failed to run) and on a sum past 255, and AMBIENT read r,g,b only when the second character was a comma, so 128,128,128 threw too Fixed: AMBIENT takes r,g,b of any width or a +/- step added to every channel, RED / GREEN / BLUE add or set one channel, every channel held within 0 and 255 (U.OVW-T18)
CHANGE CURSOR POS CENTER (9.2) Wrote the screen centre into delta, the mouse's last motion, which the next poll overwrote before anything read it, so it did nothing Fixed: the virtual mouse goes to the screen's centre and the world cursor to the camera's (U.OVW-T18)
CHANGE ENEMY HEALTH (9.2) cmdChangeEnemy tested "Health" against the upper-cased script, so it never matched and was an error Fixed: HEALTH and AI are the empty stubs they were meant to be until the enemies exist (the battle stories give them effects) (U.OVW-T18)
Shift stuck in the console (9.3) The scripter set SHIFT = True on a Shift press and nothing ever cleared it, so after the first Shift the = / + key typed = for the rest of the session Fixed: each console key carries whether Shift is held as it is pressed (U.OVW-T18)
Roman numerals past 64 (18) A few entries repeat or are wrong (65 to 69, 74 to 80) Correct numerals at every number (BookReader.Roman); page numbers beyond 16 never occur in the shipped books (U.OVW-T20; Core BookTests)
Mana assignment clamp (18) Clamped to current mana (and every assignment to the current hero's maximum, not the target's) Clamped to the target's maximum mana, like health and stamina (U.OVW-T17, kept in U.OVW-T18)
Hero sprites (4.1) All three heroes use the Chrono art; the original's own Belmont (the side-view jump/dash prototype's walk, run, stand, halt, kneel and attack frames, repurposed here for the front-view engine) and girl sets ship on disk but are never read by any loader Kept as optional per-hero art (story A31, U.OVW-T35): Party.SpritePacks (content sprite-packs.json, read in heroes.json's own "sprites" shape so the one HeroSprites class draws them, each pack with its own walk/run/draw/battle frame counts) holds "Belmont" and "Girl"; SelectSpritePack(player, hero, name-or-null) gives one hero its own pack (resetting its frame) or clears it back to the shared Chrono set every hero drew with before this ticket, and only a known pack name on a real hero index is accepted. Neither set ever had a kneel, sleep, draw or battle pose of its own: Belmont's reuses its one attack cycle for both draw and battle and its kneel picture for sleep; the girl set (no attack or kneel art at all) reuses its stand picture for kneel, sleep, draw and battle. Up and down face right and left respectively for both, as the engine's own Halt already does for every hero. F6 cycles the leader's pack (default to Belmont to Girl to default); -overworld-sprite-pack <name|off> sets it for a scripted run. Core SpritePackTests
Settings (2.2) HKCU\Software\MindAttic\Overhead: Width, Height, Depth, isWindowMode; missing, the defaults (640 x 480, depth 32, windowed) are saved and a message box "Starting for the first time . . ." / "Welcome and beware!" shown; depth must be 16 or 32 (otherwise an exception box); F12 stops the loop, flips isWindowMode and restarts the whole engine A MindAttic profile's settings.json (Profiles.Current.Settings.Game["window"], Runtime WindowSettings, U.OVW-T27), the same place every MindAttic game keeps its settings, saved with Profile.SaveSettings; width, height, depth and windowed read and round-trip exactly, a missing "window" section counting as first run. Windowed is always the fixed 640 x 480 client size (MinimumSize = MaximumSize); full screen uses the stored width and height. The welcome is queued through the message board instead of a blocking OS dialog, ahead of the tutorial (hud.json "welcome", MessageBoard.SayWelcome), so first run is never interrupted. A bad depth is just corrected to 32 instead of an exception box, and depth otherwise has no visible effect under a modern GPU, unlike the original's 16 / 32-bit back buffer. F12 flips windowed / full screen in place (WindowSettings.ToggleFullScreen, read by HeroInput like W and F7 / F8) and saves it without reloading the scene, so the game is never lost, as the ticket itself asks (a deliberate departure from the original's restart). This is infrastructure, not gameplay (SessionAudio's precedent): no Core command or event. Scripted runs: -overworld-full-screen-test (U.OVW-T27)
Debug keys (5.2) F1 to F5 wireframe, texture, culling, FPS, filter; G/H ring entries; U; L; P/O path dots Available behind a developer-tools switch (off in the shipped build), except FPS (F4) which stays; the wall lines draw only in developer mode (U.OVW-T47). The switch is data: developer.json "enabled" (false as shipped; -overworld-developer turns it on for a run), read by Core's DeveloperData with every figure the tools use, and Core's DeveloperTools refuses every developer command while it is off. F1 ToggleRenderSwitch(Wireframe) (GL.wireframe around the world camera, WireframeSwitch), F2 Textures (the sprite shader's _OverworldUntextured global: every world quad drawn as its colour), F3 BackFaceCulling (_OverworldCullBack: back faces discarded, as Cull.CounterClockwise did; the quads face the camera, so nothing vanishes), F5 LinearFilter (Linear at start, Point after, on every world picture through TextureLibrary.Filter); G / H ResizeRing (ringTotal 0 to maxRings 7: 1 to 8 icons, reset after each; the angle between icons is checkRingRotate's deltaAngle table, heroes.json "spinSteps"); U the party's ToggleHeroMode; L ShowTestMessage ("WHAt's up, this worked!!!!" in fontArial white); P CyclePathMode (off, show, set, show2) and O ClearPath (clearpath(20)) drive Core's PathTrail: in set mode the leader of the player who pressed P lays a 0.02 path.PNG dot at its centre (lifted 0.01) once that centre is more than 0.05 from the last dot along its facing axis, in 1,001 slots (slot 0 the far-off start, the last slot laid again once full), every tick paused or not (checkPathPoints ran in the draw), drawn after the tent and before the pickups in every mode but off; - / = ChangeGameSpeed every frame either is held (getInput's, so not while paused, a script runs or the console is open; minus first), 0.01 a step, never below 0, the party's GameSpeed (movement) and the clock's (seconds a minute takes) together. The wall lines are renderwall's six one-pixel line lists with terrain.PNG (its one orange pixel), drawn after the drops only with the tools on. The frmMain keys are read with the console shut and the game not paused. R (Reset) stays unbound until the Reset story (A24, U.OVW-T28) gives it a command. Scripted run: -overworld-developer-keys <f1,f2,f3,f5,g,h,u,l,p,o,minus:n,equals:n> (Core DeveloperToolsTests)
The ring's filler icons (5.2, 12.3) loadRingIcon built vertex buffers only for icons 0 to ringTotal (4 at start), then set the textures of icons 5, 6 and 7 (Coffee Bean, Book2, Rune1); after H grew the ring, renderRingIcon drew icons with no vertex buffer Fixed: every icon (the five entries and the three fillers, heroes.json "fillers") has its quad from the start, so H shows the fillers; chosen or turned to, a filler does nothing, as checkRingEffect and actionRingSelect had no case for it (U.OVW-T47)
The F5 filter (5.2) F5 flipped worldFilter between Linear and Point, but the only setFilter(worldFilter) (Background.vb) was commented out, so the key changed nothing Fixed: the filter is applied to every world picture (U.OVW-T47)
The F2 textures switch (5.2) useTextures was set by F2 and read by nothing the game drew (only the menu cube's draw tested it), so the key changed nothing Fixed: off, every world quad is drawn untextured, as the switch was meant to do (U.OVW-T47)
Pause (2.4) A flag with a banner and no key; oneFrameRender skipped getInput and every update while it was on, but the clock (renderTime), the messages, the ring's turning, the status animation and the sleep's fade ran in the draw and would have gone on P is taken by the path tool in developer mode; Pause (the key) toggles TogglePause, Escape opens and shuts the options menu as F11 does, and its Exit quits (the original's only quit key was Escape directly). The pause holds what the original's held and nothing else (U.OVW-T48 corrected U.OVW-T24, which stopped every tick): the ticks still run and each system reads Game.IsHeld, skipping what sat inside oneFrameRender's If Not bPause (the input, the clouds and weather, the pickups' reach and taking, flocking, the quests and the hero updates, the inventory, book and quest-screen keys, a MOVE script's walk), while what it did in the draw goes on: the clock and its light and the sleep's fade (renderTime), the messages, regrowth (renderItem), the ring's turning and the range circles, the status animation, the console's blink, and renderCursor's scrolling, hold and centring with the camera (the mouse's motion and the wheel wait for the unpause, as DirectInput's relative axes added up until the next poll); - PAUSE - is drawn at (256, 210) in Arial Narrow 24 white over everything but the loading picture. While paused HeroInput reads only Pause, Escape / F11, F4 and the options menu's keys, so its Exit can quit from a pause (getInput's arrows were not read then). Scripted run: -overworld-pause (U.OVW-T24)
The interface: options, hero screen, FPS, turn bars, 2D cursor, hover name, brackets, tutorial, loading (2.3, 2.4, 5.3, 13) F11 toggles bOptions: renderOptionMenu stretches menu.png over 255 x 255 at (10, 10), writes "Options" at (28, 20) in Arial Narrow 24 cyan, ">" at (50, the row's y) and the page's rows at x 60 in fontArial white; Up / Down (optionUp / optionDown latches) step optionNum 0 to 3, wrapping; Left goes back to Main; Enter or the left button (actionPickup, unlatched) on Main opens Controls / Video / Audio or, on Exit (y 200), sets bRunning False; Controls lists "Move Left = LeftArrow" ... at y 60 to 105; with bOptions the arrows only mark, actionMove, actionRest and actionPickup's kneel and sleep do nothing; Page Up (bHeroOpen latch) toggles bHeroScreen: menu.png over 600 x 430 at (20, 20), the date and time lines at (390, 25) and (390, 45) in Calisto (128, 255, 255, 0); F4 toggles bDrawFPS (on at start): every 100 ms the frames counted become the rate x 10, written "n fps" at (590, 4) in fontArial (255, 0, 25); renderTurnBar: 60 x 13 at (18, 59), (96, 59), (176, 59), the leader's, then the others' in team mode, each fill CInt(60 x stamina / max) wide with the stamina_fill picture under ready_bar when full or stamina_bar; rendercursor2D: arrow.png 28 x 28 at the mouse + (-9, +4) while it is over the open panel or a button's hit box (bShowCursor2D, overTeam, overInventoryBox), the world cursor not drawn then nor while bHeroSelect, and checkScroll's left edge waiting while overTeam / overInventoryBox; checkCursorOverHero: "." (0.02) and the name (0.007) in 3D text over the first hero the cursor is on, unless it leads, at +0.1 (+0.08 kneeling); renderStatus writes the chosen target "|Name|" in yellow while bHeroSelect; sayTutorial queues 88 lines at start and on Reset; frmMain shows a random load640_1..12 as the form's background while the engine loads The same in Core's InterfaceControl (per player InterfaceView: OptionsOpen, OptionsPage, OptionsCursor, HeroScreenOpen, FpsShown; the game's Paused): ToggleOptions (F11 or Escape), PressOptionsKey (the arrows and Enter or the left button, sent per press while the menu is open), ToggleHeroScreen (Page Up), ToggleFps (F4), TogglePause (Pause); OptionsChanged, HeroScreenToggled, FpsToggled, PauseToggled and QuitRequested (the bootstrap quits). Party.OptionsOpen holds the arrows and the move button as the quest screen does and refuses rest; Pickups does not kneel and HeroInput does not sleep with it open. CHANGE OPTIONS drives it (ScriptInterpreter.Interface; it replaced ScriptState.OptionsOpen). FrameRateCounter samples real milliseconds as renderFPS did; TurnBarsView lists the bars; Cursor2DDefinition.Shown is the arrow's hit test (WorldViewPresenter.CursorHidden hides the world cursor under it and while a target is chosen; CameraControl.OverButton stops the left edge on a button); StatusBoxView.Lines takes the chosen target; MessageBoard.SayTutorial queues the tutorial (at start; InterfaceControl.Reset for the Reset story, A24). Layout and text are hud.json "options", "heroScreen", "fps", "pause", "turnBars", "cursor2D", "hoverName", "tutorial", "loading" and statusBox "chosenText"; drawn by HudPresenter.ShowInterface (UI Toolkit, each layer in renderFPS ... rendercursor2D's order; the hover name as 3D text in the world's light, as the target's is). The loading picture is shown over everything while the host and input are held: the rebuild loads in a moment, so real play holds it 1.5 s (hud.json "loading" "seconds"); scripted runs skip it unless -overworld-loading <1..12|random>. The hero screen also shows the party's experience (the Quest Exp use row). The icon quad loadheroScreen built and never drew and the options' hand cursor (renderOptionCuror, commented out) are not drawn. Fixed: the three rows below. Scripted runs: -overworld-options <page[,row][,seconds]>, -overworld-hero-screen, -overworld-pause, -overworld-fps-off, -overworld-hover <hero[,seconds]>, -overworld-loading (U.OVW-T24; Core InterfaceTests, EditMode InterfaceHudTests)
The options' Video and Audio pages (13) loadOptionMenu set positions for the main and Controls pages only (and optionPos(0, 2).X where (2, ...) was meant), so on the Video page every optionPos(2, n) was (0, 0) and the ">" sat at y 0; the table was optionPos(2, 20), so the Audio page's optionPos(3, n) threw, oneFrameRender's empty Catch skipped the rest of the frame and Present, and the screen froze until Left went back Fixed: both pages use the Controls page's rows (y 60 to 105), so the cursor steps them and the screen keeps drawing; they still list nothing (U.OVW-T24; Core InterfaceTests)
The FPS counter while off (13) renderFPS counted frames only while bDrawFPS was on but wrote iFrameRate every frame, so F4 froze the number on screen instead of hiding it Fixed: off, nothing is written (U.OVW-T24; EditMode InterfaceHudTests)
The tutorial's inventory key (13) sayTutorial said "INSERT - Toggle INVENTORY", but Delete opens the pack and Insert reopens the console with the last script Fixed: "DELETE - Toggle INVENTORY"; every other line is the original's (U.OVW-T24; Core InterfaceTests)
Combat (12.4, U.OVW-T33) checkRingEffect's Attack and Skill did nothing at all; no damage, hit or defeat code of any kind Choosing Attack in the ring menu (RECONSTRUCTION 12.2), with a living enemy within the leader's weapon Range, resolves a hit through Core Combat.Damage: the weapon's Rating times the weighted average of its slashing / piercing / blunt split against the target class's own multiplier for each (1.5 vulnerable, 1 neutral, 0.75 or 0.5 resistant — animals are hunted with piercing and shrug off blunt, insects are crushed not cut, paranormal slimes split under a blunt blow and resist an edge, reptiles are cut but absorb blunt, the Mechanical class turns a blade but not a hammer), rounded and never below 1; PartyRing.HandleChooseFromRing's own new case raises EnemyHit and passes the turn (Attack now acts, as End or a spent Move already did). The hero's own copy of its weapon's durability (Hero.WeaponDurability, since the shared WeaponDefinition is read-only content every hero of the same weapon would otherwise share) drops 1 a hit, never below 0; nothing yet penalises a worn-out weapon, flagged for a later ticket. A defeated enemy (EnemyView.Health 0) holds still and is drawn no more (WorldEnemies.Step, WorldViewPresenter's enemy loop). Being attacked: an Aggressive, or a triggered Defensive, enemy within a hero's-width contact range of its target hits it for 1, at the Poison Box's own rate (0.5 s) — a hero's health can reach 0 this way exactly as a script's could, so the Reset story (U.OVW-T28) runs the same. The hero database's own four weapons (hero.mdb, RECONSTRUCTION 16.3: Axe, Steel Sword, Katana, Broad Sword) carry a simpler figure with no class split and no hero of this party carries one (the Equipment story, U.OVW-T34, equips them on hero.mdb's own hero instead); Combat.DamageFromRecord resolves their own simpler math (power plus a random bonus to its own "random" figure) and is tested so they are provably not dead code either. Every number above (the class table, the contact range, its rate, the hero database weapons' lack of a class) is this ticket's own documented decision, there being nothing to port. Core CombatTests
Equipping Alexander (16.3, U.OVW-T34) hero.mdb never read by any code at all: one hero (Alexander, HP 50, STR 1, AGI 2, INT 0, SPD 2, the Steel Sword, a relic that does not exist), four weapons, and Armor, Armor_Head/Body/Arms/Feet, Relic and Weapon_class all empty Core Equipment (installed beside the party, not part of it: hero.mdb's Alexander is not one of Chrono, Belmont or Flagg) holds which of the four weapons each player has equipped on him (the Steel Sword, his own starting one, until changed); CycleEquippedWeapon steps it, wrapping. The hero screen (Page Up) shows him beside the party's own date, time and experience (HudPresenter.EquipmentLine, hud.json "heroScreen" "equipment"): his stats, his equipped weapon and its durability, and the head, body, arms, feet and relic slots as "none" — not invented, since the original gave none of those tables a single row. While the hero screen is open, , and . (otherwise the pickups in reach) cycle the equipped weapon instead, the two having nothing to do with each other. Alexander himself never joins the party or a battle: this is the hero database's own hero, shown and interactive on his own terms, as the ticket asks, not a fourth playable hero. Core EquipmentTests
Enemy AI states (16.2) Passive, Aggressive, Afraid, Defensive as names Passive ignores the party; Aggressive pursues within range; Defensive holds until hurt or approached within half its range; Afraid retreats; speeds from the data
Enemies met (16.2, U.OVW-T32) Enemy loaded and never read by any code; Area_Enemies and Enemy_Images are empty tables — no placement and no art ever existed for any of the five Core WorldEnemies (a tick system) places all five along the Grasslands' ground (y -0.2, the NPCs' own height; x this ticket's own decision, since none exists), each moving exactly the row above's rule off its own data (Range, MoveSpeed); motion (Walking, Flying, Hopping) does not change how it moves, only what it would have looked like with art this rebuild does not have. Werelynx draws the catman set (stand / walk, left or right, imported verbatim); Blue Slime and Red Slime draw their own coloured picture (slime_blue.PNG / slime_red.PNG), the generic slime frames having no colour variants to animate; Botherfly and Toadie, whose Enemy_Images rows were never shipped either, draw the slime's plain picture (slime_1.PNG) as a placeholder, flagged here and in WorldEnemies.SetArt for replacement once real art exists. Not built: landing a hit (the combat story, A29) — Defensive's "until hurt" never arrives, so a triggered one simply keeps acting Aggressive once approached within half its range. Core WorldEnemiesTests
NPC states (16.2) "stand" and "pursue" as names Stand idles facing the party; pursue follows the leader at the NPC's data speed without attacking
NPCs met (16.2, U.OVW-T31) Npc and Area_Npcs loaded, never read by any code; no behaviour was ever written for either state Core WorldNpcs (a tick system) places the start area's Area_Npcs: the Peasant Woman ("stand", npc_front.PNG, W6's corrected spelling) and the Magitek Armor ("pursue"); WorldViewPresenter.ShowNpcs draws each as an NPC-size quad (0.144 width, the database's own half-height 0.072, so the drawn square matches its 48 x 48 picture) within the camera's render range, after the pickups and before the heroes. This ticket is only "I meet" them: placed and drawn, their walking, left, right and front pictures imported verbatim (Art/Resources). A standing NPC shows its still front picture; since the original never wrote an NPC walk cycle either, a pursuing one cycles its four walk-right frames in place at the owner's own rate (0.15 s a frame) to read as alert and active, distinct from standing — not yet the row above's "follows the leader": U.OVW-T32, the next ticket in the build order, turned out to be the enemies' story only (its own ticket text names no NPC), so an NPC actually following the leader is still open, unclaimed by any ticket yet approved; flagged here rather than built unasked. Core WorldNpcsTests
Items in later areas Only area 0 data existed for pickups Pickups stay in the original world (the 45 loaded tiles); the Grasslands area (story A25) carries the 2007 props, NPCs and enemies
The world played (owner 2026-10-23) The engine loaded the 2006 data\world.mdb (and used none of it); the 2007 root world.mdb was never read by any code The 2007 world is the world the game starts in and plays, with the fixes below; the 2006 database is a reference record only. A new game begins in the Grasslands (U.OVW-T38)
The landscape: scenes, mountain, props (16.2, U.OVW-T29) Scene loaded and never drawn: renderProp and prop tops are compiled but unreachable (section 18), and nothing reads Terrain or Area_Props at all; the 2007 design's own ground lines are an orphan (Terrain.vb) the shipped engine never ran WorldViewPresenter.ShowLandscape draws the start area's (WorldData.Start.AreaId) own Scenes as picture quads at their place (width and the database's own half-height, RECONSTRUCTION 16.2 "sizes are half-heights") and its AreaProps (the orchard trees, Stonehenge, the Gateway, each its PropArtRecord's picture) the same way, both depth-sorted by the database's own Z (more negative, nearer the camera, drawn over what is further, as weather's particles and clouds already are) above BackdropOrder (LandscapeOrder), which replaces the small original area's hand-authored tile grid: while shown, the tile grid is hidden instead of drawn under it, the two being alternative grounds for the same world, never both at once. Scenes and props are static: built once, from data already loaded and validated by WorldPlayability. new.PNG (Scene 5) is the intact Fish 2 copy the W4 fix names (the shipped Overworld copy is 441,816 zero bytes); mountain.PNG, the bgLandscape2_1x1..8.jpg strips and bgLandscape2_0x4.jpg (scenes 9 and 11) and the orchard, Stonehenge and Gateway pictures are imported verbatim (Art/Resources). Not built: the nine Terrain ground-line segments stay data only, loaded and validated (the party's own start position already sits on segment 1's y, -0.3) but not enforced as collision — like the original's own Terrain.vb, written but never wired to anything, and the game is free-moving top-down, not the 2007 design's own side-on walk (RECONSTRUCTION 16.2); giving the segments real collision would be a new ticket, not a corrected defect, so it is left for the owner to ask for. Lowlands' stand-in scene and terrain (fix W8) load the same way but are never seen: no exit yet moves the party there (the "exits" the fixes name are data only too). EditMode WorldViewPresenterTests.LandscapeDrawsTheStartAreasScenesAndPropsAndHidesTheOldTileGrid (built, not run)
Online play (AGENTS.md rule 9) Single player only; O is unbound in play (the developer's path points use it) Built on the shared Unity.Multiplayer kit beside unchanged local play (see Online, under Architecture). With the online menu never opened the game plays exactly as before. O opens the kit's menu (Host, Join by IP, Join by code with a lobby, Settings, Play alone, Quit) over a held local game, except with the developer tools on, where O stays the original's path clear and the menu key is skipped (U.OVW-T53); online, Escape opens the kit's in-game menu (F11 still opens the options), and only this screen's own player's Exit quits it (U.OVW-T46)
Unfinished hooks (18, U.OVW-T36) Four things the source compiled but never wired to anything, so none was shipped as a feature: Cutscene (name, title, start/end script, objective; only "Hello" ever set, its other fields never assigned); Magic (five spell schools by comment, one spell actually defined, Flame: cost 5, range 0.2, duration 10 s); the Mechanical enemy class and the Teleporting, Stationary and Swimming motions (declared in Enemy_Class/Enemy_Motion, used by no enemy); Item_Textures (the 2006 reference world's own table) Kept as defined seams instead of dropped, each built only as far as the original actually defined it: CutsceneData (cutscenes.json) reads the one "Hello" record with its other fields genuinely empty, inert data like Item_Textures already was (WorldData.ItemTextures, read, unique-id checked and cross-referenced — already whole before this ticket, named here only for completeness). MagicData (magic.json) reads the five schools as a taxonomy with no spell of their own and Flame's own cost, range and duration; the Skill ring entry (PartyRing.HandleChooseFromRing's own new case, left doing nothing at all like Attack before U.OVW-T33) casts it at the caster's own point — "a given point" was never aimed anywhere in the source, so none is invented — spending the mana, raising SpellCast and passing the turn exactly as a resolved Attack does; without enough mana, or with Party.Magic unset, it still does nothing. Mechanical's damage multiplier was already in Combat's own class table (U.OVW-T33); it is exercised directly by a Core test since no enemy carries the class to exercise it through, and the three unused motions are left as validated data with nothing invented to place an enemy on them. What the Skill ring entry offers beyond Flame, and what a cutscene or any other spell would do, both stay open, as they already were. Core MagicTests, SkillRingTests, and a CombatTests case for the Mechanical multiplier
Gamepad (5.5) DirectInput's first game controller (bJoystick True, False when none; frmMain's J flips it): getJoystick beside getKeyboard calls the same actions, the stick's X / Y past joyOutsideDeadZone 250 of +/-1000 as the arrows, buttons by number on a pad labelled A B C X Y Z L1 R1 START L2 R2: 0 (A) run, 1 (B) drop, 3 (X) pick up, 4 (Y) inventory, 8 (START) rest, 9 (L2) next hero, 10 (R2) previous hero; btnExamine is 1 too but nothing handles it; each latch clears only when both its key and its button are up Kept (U.OVW-T25): gamepad.json holds the switch (on), the threshold (0.25 of the unprocessed stick, the original's raw axis), the sticks and each button's controls; today's pads take the original's map by its labels (A south, B east, X west, Y north, START start, L2 / R2 the triggers), since DirectInput's numbers name different buttons on every pad. The left stick and the d-pad are both the arrows (on the original's pad the pad was those axes). The pad adds to the keys inside HeroInput and sends the same commands: held arrows, run and pick up go into SetMoveInput (so the pad works the pack, ring, quest screen and book as the arrows do), X is also Enter's sleep, ring choice and options Enter, the stick works the options menu, and each pressed button acts once a press. J is a frmMain key (read with the console shut, even paused or while a script runs) and lets go of whatever the pad held. Each online player's own HeroInput reads its own pad. -overworld-gamepad <x>,<y>[,<control>...] plugs in a virtual pad for scripted runs
End-to-end verification (all, U.OVW-T37) No formal, repeatable check that the whole rebuild, not just each ticket's own ad hoc capture, still plays every mechanic against this document tools/verify-reconstruction.ps1: builds the real Windows player once (Build/Overworld/Overworld.exe, not the Editor) and launches it once per scenario, one or more per build-order story (A1 to A32; RECONSTRUCTION 20, 21), each a play.ps1 -Capture with the mechanic's own scripted arguments, a screenshot under Logs/verify/, and a regular expression its own log must match as evidence the mechanic actually ran, not only that a screenshot exists — play.ps1's default capture fires too early for almost any scripted action (ApplyScripted* nearly always defers through a coroutine, even at "0 seconds"), a race this script's own development caught on the Skill/Flame and Poison Box scenarios (both silently captured the unchanged start state until given their own wait and assertion). -From/-To split the 31 launches into smaller batches, so a constrained host's memory stays bounded. Thirty-one scenarios, all verified clean. It is not a CI test (a real window, for a person or an agent to run and look at); the Core and EditMode suites remain the automated gate

Fixed defects

The 2007 world was never loaded by any code of the original, so nothing had ever found what in it does not work. U.OVW-T38 checked every table, row, reference and picture of it against the original's files and fixed what is broken. Each data fix is an entry of Assets/StreamingAssets/Content/world-2007-fixes.json with the same id (a Core test fails if a fix has no row here); world-2007.json itself stays the faithful export, and WorldPlayability re-checks every rule below on every load, so undoing a fix fails loudly.

ID Defect in the 2007 world Fix
W1 The original engine could not open it at all: getArea queries Pickup and Items, which it lacks, and nothing reads its Scene, Terrain, Props, Npc or Enemy tables. Three columns hold numbers as text (Area_Npcs.areaID, Enemy.enemyID, Enemy.enemyMAXHP) Core reads its own 15-table schema (U.OVW-T6) and the text columns as whole numbers, rejecting text that is not one. No data change
W2 Scene 11 "Grasslands Sky 8" is in area 0, which has no Area row (0 is the 2006 database's Foothills of Phar; the copied row kept its area) Moved to area 1, the Grasslands its name gives. The record keeps it as a warning; the played world allows no dangling area
W3 Scene 11 at x 8 covers half of Scene 9 (Grasslands Sky 4, x 7 to 9): the same sky picture at the same depth, so they flicker against each other Moved to x 9, continuing the sky row. No two pictures of an area may overlap at one depth
W4 Scene 5's picture new.png (the 1x5 strip whose sky is see-through so the Mountain behind shows) is 441,816 zero bytes in the shipped folder (and in the Overhead RPG copy): it is not a picture The asset import takes the intact file of the same size from the sibling project Fish 2\bin\gfx\area\West of Town\new.PNG (assetSources)
W5 Every picture path has backslashes and a leading backslash, and 10 name an extension in the wrong case (orchard_N.png for .PNG, gate.png, mountain.png, new.png); only Windows' forgiving file system made them resolve Each is the file's exact relative path (gfx/prop/tree/orchard_1.PNG); NPC folders end with /. A Core test checks every one against the original folder, byte signature included
W6 NPC 1 is spelled "Peasent Woman" "Peasant Woman"
W7 No start: no area to begin in, nowhere for the party to stand Area 1 (Grasslands), the party on ground line 1 at x -0.4 (Chrono), -0.1 (Belmont), -0.7 (Flagg): the 2006 heroes' order and 0.3 spacing reused, the point given is under each hero's feet
W8 Area 2 "Lowlands" is a name only: no picture, no ground A stand-in until the owner supplies content: one strip using the spare original 1x5 landscape (bgLandscape2_1x5.jpg, the picture new.png displaced) at x -1 to 1, and a ground line across it at the Grasslands' height (-0.3)
W9 Nothing links the areas: no exit table and no event that moves the party, so the Lowlands could never be reached Two exits: the Grasslands' east end (x 14.8 to 15, where its pictures stop; ground line 7 runs on to 16) to the Lowlands at x -0.6, and the Lowlands' west end (x -1 to -0.8) back to the Grasslands at x 14.5. Every area must be reachable from the start and lead back to it

Checked and not changed, because they work as the 2007 design meant: the events and their scripts (Poison Box, Healing Box, and Entering Dark Woods, whose "Night" script is the 2006 "Make Night" with the same effect, the interpreter upper-casing it); the props, including the Gateway at z -0.5, a deliberate foreground piece (the 2005 sibling engine Battle 2 places gate.png at the same depth); the half-height sizes (see RECONSTRUCTION 16.2); the ramp and ledge of ground lines 8 and 9; the five enemies with no placement and no Enemy_Images rows (nothing references missing art; their art and placement are story A28's). Nothing else of the 2006 database was needed: its three events, scripts and starter items have no 2007 counterpart they would repair.

Open questions (flag when a ticket hits one)

  • Where the shipped 2006 tile world (A1 to F8, with its pickups, quests, walls, props and tent) sits now that a new game begins in the 2007 Grasslands (U.OVW-T38): the 2007 database has no area for it and no exit to it. Linking it in (as an area, perhaps under its 2006 name Foothills of Phar) is the owner's call; until then it is built as before and reached by the stories that build it.
  • What the Lowlands hold: the data gives none; W8's single strip is a stand-in until the owner supplies content.
  • What the Skill ring entry offers beyond the Flame spell seam (story A32, delivered by U.OVW-T36: Skill casts Flame; a second spell or school is a new ticket, the source never having defined one).

Laws

See AGENTS.md for the non-negotiables (REA the original in its totality first, an engine-free tested Core, hard assembly boundaries, content as data, built in code, modern Unity only, done means verified by play, finite).

From Unity.Rea.Overworld/docs/BIBLE.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.