Stamina has no caller, so the orange orb never appears in play #63

Open
opened 2026-07-30 21:02:58 +00:00 by sickday · 1 comment
Owner

Two things in World.Energy have no production caller:

  • stamina/1 — turns the stamina effect on, which is the thing that
    halves drain;
  • gain/2 — restoring energy by an amount, which is what a stamina potion
    does.

stamina?/1 is called (World.Player reads it for the orb's active flag),
and the varbit that turns the orb orange is written every tick, so the plumbing
to the client exists and is verified against the cache's own orb script. What
does not exist is anything that turns the effect on or restores energy
directly. Stamina potions are the content that does both, and there is no
consumable system yet at all — nothing eats or drinks anything.

The drain formula is correct and era-checked: the 2017 formulas agree with the
modern ones only at level 99, and this uses the 2017 ones. Stamina is a * 30 / 100 multiplier on the drain and a +2000 unit restore, both already
implemented and tested; a dose is 200 ticks and re-dosing resets rather than
stacks.

The run latch this issue was originally filed alongside is fixed and merged in
#72 — see the comment below.

Two things in `World.Energy` have no production caller: * **`stamina/1`** — turns the stamina effect on, which is the thing that halves drain; * **`gain/2`** — restoring energy by an amount, which is what a stamina potion does. `stamina?/1` *is* called (`World.Player` reads it for the orb's active flag), and the varbit that turns the orb orange is written every tick, so the plumbing to the client exists and is verified against the cache's own orb script. What does not exist is anything that turns the effect on or restores energy directly. Stamina potions are the content that does both, and there is no consumable system yet at all — nothing eats or drinks anything. The drain formula is correct and era-checked: the 2017 formulas agree with the modern ones only at level 99, and this uses the 2017 ones. Stamina is a `* 30 / 100` multiplier on the drain and a `+2000` unit restore, both already implemented and tested; a dose is 200 ticks and re-dosing resets rather than stacks. The run latch this issue was originally filed alongside is fixed and merged in #72 — see the comment below.
Author
Owner

The second half of this — the run latch — is fixed and merged in #72.

Whether a tick runs is derived now, never stored: a player holds the two
things that were asked for, the orb (varp 173) and the current route's
ctrl-click, and Contract.Run.running?/3 puts both to the bar every tick.
Player.running?/1 is the one reader, and the two functions that measure a
step ask it. The field was renamed run? -> ctrl_run? so that no reader can
mistake a question for the answer, and Player.interact/4 now takes the
click's ctrl flag as a required argument — every interaction click already
decoded one and threw it away, which is what let an approach inherit whatever
the last walk click left behind.

One clarification that came out of it and is worth having on the record: the
1% floor gates enabling run mode and nothing else. resolve/2 has exactly
one caller, the orb. Starting a route is not gated, so a player who lit the orb
at a full bar and drained it to half a percent keeps running until the bar
reaches 0 and the orb goes out.

What this issue is now, and stays open for: stamina has no caller.
Energy.stamina/1 and Energy.gain/2 are built, tested and called by nothing
in lib/, so the orange orb never appears in play. stamina?/1 is read by
World.Player for the orb's active flag, so the plumbing to the client is
there — what is missing is the content that turns the effect on, which is a
stamina potion, and there is no consumable system at all yet.

Retitled to match.

The second half of this — the run latch — is fixed and merged in #72. Whether a tick runs is derived now, never stored: a player holds the two things that were *asked for*, the orb (varp 173) and the current route's ctrl-click, and `Contract.Run.running?/3` puts both to the bar every tick. `Player.running?/1` is the one reader, and the two functions that measure a step ask it. The field was renamed `run?` -> `ctrl_run?` so that no reader can mistake a question for the answer, and `Player.interact/4` now takes the click's ctrl flag as a required argument — every interaction click already decoded one and threw it away, which is what let an approach inherit whatever the last walk click left behind. One clarification that came out of it and is worth having on the record: the 1% floor gates *enabling* run mode and nothing else. `resolve/2` has exactly one caller, the orb. Starting a route is not gated, so a player who lit the orb at a full bar and drained it to half a percent keeps running until the bar reaches 0 and the orb goes out. What this issue is now, and stays open for: **stamina has no caller.** `Energy.stamina/1` and `Energy.gain/2` are built, tested and called by nothing in `lib/`, so the orange orb never appears in play. `stamina?/1` is read by `World.Player` for the orb's active flag, so the plumbing to the client is there — what is missing is the content that turns the effect on, which is a stamina potion, and there is no consumable system at all yet. Retitled to match.
sickday changed title from Stamina has no caller, and run? is latched at click time to Stamina has no caller, so the orange orb never appears in play 2026-07-31 01:45:22 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Revenant/Server#63
No description provided.