Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/docs/launch-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ To turn it off, quit the launcher and start it again without the variable.
| `OPENAC_DUMP_APPEARANCE` | `openac` (every form) | off | `1` prints every appearance change (`0xF625`): a header with the object, base palette and counts, then one line per palette swap (`SP`), texture change (`TC`) and part change (`APC`); a body that does not parse prints `PARSE FAILED`. |
| `OPENAC_MOTION_LOG` | `openac` (every form) | off | `1` traces the motions of the player and the selected object, three kinds of line, in order. `[motion] recv <guid> seq= ctl= auto= type=` and the state, for every motion message from the server (`auto=1` is the echo of the character's own movement, `type` other than 0 a move-to or turn-to). `[motion] applied <guid> serial= session-body\|server-only` and the state, for every server state taken up (the session's body, or the server's state for an object nothing here moves; an echo is not taken up), preceded by `[motion] interrupted <guid> serial=` and the state the body's movement under way was left in when the server state interrupted it (a move-to's turn stopped; the window follows it first, as `followed between`). `[motion] window <guid> took up\|followed serial=` and the state, then `playing=[...]` (the motions waiting on their animations, oldest first: a swing shows as its command, `0x1000005B` for SlashHigh) and `cycle=` (the looping motion under them), for every state the window takes up in order or follows from the latest view (only with a window open); `playing` is the motions' completion queue, not what is drawn. What is drawn is `[motion] window <guid> draws <animation> from frame F to L; left <animation> at frame F of L`, one line each time the drawn animation (its dat id) changes, so an action left before its last frame was cut short, and one without the `left` part when the object is first watched; `[motion] window <guid> hit the ground\|left the ground\|went hidden\|came back: link animations dropped` (an action under way is dropped with them, as the game does), and `built from its view` / `dropped` when the window's copy of the object is made again. Every line carries `t=<seconds>.<ms>` (the wall clock, the same on the session's and the window's lines). A state reads `style= fwd=<command>@<speed> side= turn=` and `actions=[<command>#<stamp>@<speed>]` (`*` marks an autonomous action). A swing lost between server and screen shows as a `recv` without its `applied`, or an `applied` without its `window took up`. |
| `[combat-mode]` lines in the client log | `openac` (every form) | always | Not an option: written only when a combat-mode change has waited on the character's body for 5 s or more (a change is held back until the body is ready for the mode it is leaving). `[combat-mode] t=<seconds>.<ms> change to <mode> parked <n.n> s: mode=<current> style=<stance> fwd=<forward motion> waiting=[<motions still waiting, oldest first>] blocked by: <reasons>` at 5 s and every 30 s after while it still waits, the reasons being the ready check's conditions that fail (`not in a missile stance`, `not standing at the ready`, `no combat table`, `motions still waiting`; `no body` when there is none); then one `change to <mode> went out after <n.n> s`, or `given up after <n.n> s` when another request replaced it. With the first such line of a wait come `[combat-mode-history]` lines: a header with the same `t=` and the session clock `s=`, then the last 32 combat-mode events, oldest first, each `s=<session seconds> <what>`: a request sent, already in that mode, held back until the body is ready, or refused; a held-back request sent; a weapon swap made in combat asking for its mode again; the server's combat-mode update with its sequence, `taken` or `refused as older`; the client's mode now; the body's stance now (a full motion command). It lands in the session folder's `client.log`. A change that goes out within 5 s writes nothing. |
| `-- vital:`, `-- quality:`, `-- login complete` and `-- still dead` lines in the client log | `openac` (every form) | always | Not an option: what the session did with the character's own vitals and portal space, so a character left at 0 health after a death explains itself. A session that does not die writes none of the vital lines. `vital: <health\|stamina\|mana> <value> (id <update id>) seq <n>: refused, <why>; <vital> now <value>` for every vital update of the character's own the client refused, why being `sequence <n> vs held <n>` (older than the one last taken; ACE restores the vitals after a death with two updates each and the older arrives second, so one such refusal per vital there is normal), `not in items` (the character has no item record) or `no player guid` (no character yet); `now` is the value the client holds afterwards (`unknown` before the full record). The same line ending `: taken; ...` for every taken vital update while a death is watched: from the update that brings the health to 0 to the one that brings it back (both included), or until a `still dead` line was written for that death. `quality: own <kind> property <id> seq <n>: refused, <why>` for any other update of the character's own the client refused, at most once per property every 10 s (`(<n> more refused since the last line)` when some were held back). `login complete sent: teleport <n> arrived at 0x<cell>` when a teleport's arrival sends login complete, or `login complete: teleport <n> arrived at 0x<cell> before the login's own went; ...` when it releases the one held for the login, then `login complete sent: the login's own, released by teleport <n> at 0x<cell>` when that one goes. On the session clock, once per death and only while the health is still 0: `still dead 30 s after the death teleport <n> to 0x<cell> (last health update: s=<session seconds>, <value>, taken\|refused, <why>)` 30 s after the first arrival since the death (a later arrival does not move that time; the line names the latest teleport), or `still dead 60 s after dying with no teleport arrival (last health update: ...)` 60 s after the death when no arrival came; `none` when no health update came. They go to the console and to the session folder's `client.log` with or without `--console`. |
| `OPENAC_PROBE_EXTERNAL_CONTAINER` | `openac` (every form) | off | `1` prints one `[external-container] t=<seconds>.<ms> <what> (requested 0x..., open 0x...)` line when the outside container (a corpse, a chest) is asked for, opens, has its open refused by a use-done error, is closed by the server (`, not the open one` when it names another), stops being viewed, leaves the world while open, or is found open with no object in the world (`open 0x... left the world, closed`), and for each plugin close of a container with its answer and why (`plugin close 0x...: InvalidTarget, object not in the world`). Nothing is built while it is off. |
| `OPENAC_POSITION_LOG` | `openac` (every form) | off | `1` traces where the objects near the character are (any object but the character itself and a projectile in flight, not only creatures), three kinds of line, each `[position] t=<seconds>.<ms> s=<session seconds>`. `update <guid> "<name>" seq=<instance>/<position>/<teleport>/<forced> ground=yes\|no <handling> server=<cell> (x, y, z) body=<cell> (x, y, z) -> <cell> (x, y, z) gap=<before> -> <after> m player=<metres> m` for every server position of such an object within 30 m of the character: how it was handled (`glide`, the body catching up; `jump (more than 4 m\|first update\|body off the ground)`, put there at once; `placed (teleport\|far\|beyond 96 m)`; `ignored, no ground flag, cell written <server cell> over <body cell>\|cell unchanged`; `rejected (sequence\|bad position\|not authoritative\|no position yet)`, not applied; `no body (...)`), the server's place, the simulated body's place before and after (cell and landblock-local metres), and the body's distance from the server's place before and after. `apart <guid> "<name>" gap=<metres> m server= body= since update=<s> s since moved=<s> s player=<metres> m` every 2 s for each such object within 30 m whose body stands more than 4 m from the server's last place for it. `order <type> target=<guid> "<name>" via=body\|stand-in\|order place (<why>)\|order heading (<why>) steer=<cell> (x, y, z)` and the order's fields (`distance`, `min`, `fail`, `speed`, `walk_run`, `run_rate`; `speed`, `heading` for a turn) for every movement the server orders for the character; `via=body` adds `target gap=`, the target's body's distance from the server's place for it. |
| `OPENAC_PROBE_OBJECTS` | `openac` (every form) | off | `1` prints one `[objects] t=<seconds>.<ms> <what> <guid> "<name>" inst=<instance> at <cell>, player at <cell> <metres> m apart` line for each object standing in the world (not in a container, not held, not a projectile in flight, not the character) that is `created`, `created again` (a newer incarnation), `resent` (the incarnation held), given a `stale create ignored`, `described again`, `deleted by the server`, given a `delete for another incarnation ignored`, or `forgotten by the client` (25 s out of range); a delete for an object the client does not hold says `delete held for a create ... at nowhere`, whatever the object is (it may be an item in a pack), and `world emptied with <n> objects` marks the session's world cleared. An object that leaves or enters the world without a create or delete (picked up, put down) has no line. The distance is along the ground across landblocks; `player at unknown` before the character is placed. To find which side lost an object: the client never told of it (no `created` after the player came back), or the client dropped it. Nothing is built while it is off. |
Expand Down
18 changes: 18 additions & 0 deletions crates/ac-core/src/items/quality_stamps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ impl QualityStamps {
pub fn rejected(&self) -> u64 {
self.rejected
}

/// The sequence last taken for `property` of `kind`, if any was (a
/// refusal names it beside the sequence it refused).
#[must_use]
pub fn held(&self, kind: QualityKind, property: u32) -> Option<u8> {
self.held.get(&(property | kind.tag())).copied()
}
}

#[cfg(test)]
Expand Down Expand Up @@ -173,4 +180,15 @@ mod tests {
assert!(stamps.update(QualityKind::Bool, 1, 51));
assert!(!stamps.update(QualityKind::Bool, 1, 50));
}

#[test]
fn the_held_sequence_is_the_last_one_taken_for_its_kind_and_property() {
let mut stamps = QualityStamps::new();
assert_eq!(stamps.held(QualityKind::Vital, 2), None);
stamps.update(QualityKind::Vital, 2, 18);
stamps.update(QualityKind::Vital, 2, 17);
assert_eq!(stamps.held(QualityKind::Vital, 2), Some(18));
// Another kind with the same id has its own.
assert_eq!(stamps.held(QualityKind::Int, 2), None);
}
}
2 changes: 2 additions & 0 deletions crates/ac-runtime/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ mod runner;
pub mod selection;
#[cfg(feature = "host")]
mod state;
#[cfg(feature = "host")]
mod vital_watch;
pub mod world_tap;

pub use chargen_table::project_chargen;
Expand Down
9 changes: 7 additions & 2 deletions crates/ac-runtime/src/session/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ pub enum HostEvent {
/// through: the positions sent and received for the player just
/// before.
PlayerNotFound(Box<super::PlayerNotFound>),
/// A line for the client log about what the session did with the
/// player's own vitals and portal space (a vital update taken or
/// refused, login complete going out after a teleport, a character
/// still at 0 health after dying). Nothing a player sees.
Diagnostic(String),
/// The session ended; nothing follows.
Ended(SessionSummary),
}
Expand Down Expand Up @@ -1579,7 +1584,7 @@ impl Drive<'_> {
!self.state.movement.has_content() || self.state.movement.controller().is_some();
if self.state.take_login_release() {
if window || entered {
self.flow.send_held_login_complete();
self.state.send_held_login_complete(&mut self.flow);
}
// Released to the no-window path before the character entered:
// it goes when the entry is done (below, in a later pass).
Expand All @@ -1600,7 +1605,7 @@ impl Drive<'_> {
_ => false,
};
if !held && (window || entered) {
self.flow.send_held_login_complete();
self.state.send_held_login_complete(&mut self.flow);
}
}

Expand Down
Loading
Loading