Skip to content

Add per-minute net worth series - #92

Open
geracosta wants to merge 1 commit into
odota:masterfrom
geracosta:networth-series
Open

Add per-minute net worth series#92
geracosta wants to merge 1 commit into
odota:masterfrom
geracosta:networth-series

Conversation

@geracosta

@geracosta geracosta commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Adds networth_t, a per-minute net worth series, next to the existing gold_t/xp_t/lh_t/dn_t.

The value is already read from the entity state on every interval tick, it just never makes it into the blob: only the final net_worth survives. Someone asked for this on Discord (they wanted net worth over time rather than a single number) and gold_t isn't a substitute, since it's total earned gold: at 0:00 net worth is 600 from the starting gold while earned gold is 0, and the two drift further apart with buybacks and consumables.

Semantics match the existing series: samples land on whole minutes, so the last partial minute isn't included. On the match I validated with (42:36), the last sample is at 42:00 and the remaining 36s show up as a gap against Valve's final net_worth: negative for players still earning, positive for the three who bought back at the end.

Validation:

  • All 10 series line up with times/gold_t and start at 600.
  • With the field stripped the blob is byte-identical to master, on both a current match and the 2015 test replay.
  • Replays that don't expose net worth leave the array empty, same as camps_stacked_t does today, so old replays cost nothing.

Storage: +1.3 KB gzip per match on that 42 minute game (43441 -> 44792 bytes gzipped).

odota/web#3375 uses it for a Net Worth graph on the Graphs tab, which is the curve every broadcast shows and the site doesn't have yet.

Net worth is already read from the entity state on every interval tick but
only the final value survives into the blob. Emit it as networth_t next to
gold_t, so the API can serve a net worth curve instead of a single number.

Replays that don't expose the field leave the array empty, same as
camps_stacked_t.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant