feat(combat_stats) record every hunt to SQLite and query it in-game - #2466
Merged
Merged
Conversation
This scripts is the link that records your hunts to a database for querying. Various reports included, more to be added.
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mrhoribu
approved these changes
Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
combat_stats: record every hunt to SQLite and query it in-game
Adds
combat_stats.lic, a script that subscribes to the Lich combat observer feed, persists it throughLich::Gemstone::Combat::Recorder, and answers questions about your hunting from inside the game.Requires Lich 5.21.1. The script reads schema the recorder gained in elanthia-online/lich-5#1600 (
attacks.ours,flares.ours,creatures.kill_credit,parent_confidence = 'unbound', the session-finished hook). It declaresrequired: Lich >= 5.21.1and callsScript.require_lich_version!before loading the recorder, so an older Lich gets the standard "too old" notice instead of a load error. Please hold the merge until 5.21.1 is released.What it records
One SQLite database per character at
<DATA_DIR>/<game>/<character>/combat_stats.db, seven tables: sessions, creatures, attacks, resolutions, flares, hits, statuses. A session is a hunt: it opens on the first combat event and closes after five minutes without one, timestamped at the last event so town time never pads a hunt. Ownership (ours vs. a nearby player's, a reactive flare vs. a creature's weapon proc), kill credit, and spawn-tree lineage are all decided by the recorder at write time; the script only reads.What it reports
Everything is typed as
cstats ...and every report is one aligned mono block with clickable links, so you can drill from a hunt to a creature to a single swing without typing ids.cstats/cstats sessions/cstats last N/cstats all: hunt summaries, kills and assists, damage dealt and taken, creature mixcstats creature <noun|id>: one creature's life, wound map, and every attack that touched it grouped by spawn treecstats attack <name>and attack detail: per-ability attempts, hits, crits, fatals, and a full breakdown of one swing including its flares and echoescstats flare <name>: proc rate, hit rate, crit rank and location distribution, reactive flares on inbound attackscstats defenses,cstats hp,cstats accuracy,cstats aim,cstats ttk,cstats blind,cstats control,cstats compare: defensive readings, HP estimates from solo kills, aimed vs. unaimed accuracy, kill efficiency, blind and control coverage, side-by-side hunt comparisoncstats recent: the last N attacks, newest firstA one-line "hunt N over [report]" notice prints whenever a session closes.
Notes for reviewers
;eqso clicks don't print exec chatter.🤖 Generated with Claude Code