Add missing drop tables and combat definitions - #3
Open
HarleyGilpin wants to merge 16 commits into
Open
Conversation
Compared against rsmod reference: 38 NPC families had no charm drops. Rates from runescape.wiki charm logs (Module:Data/<npc>) at 1/100000 precision; cave slime, outlaw, rockslug, unicorn and tzhaar use rsmod rates as no charm log exists. KBD drops charms four at a time. - add charm-only tables for spider, deadly red spider and wolves, which previously dropped nothing - wrap cave_bug, rockslug and tzhaar tables in type = "all" to support charm rolls - remove hobgoblins.drops.toml, stale duplicate of hobgoblin/hobgoblin.drops.toml
Clones don't inherit the implicit string-id drop table match, so numbered variants like green_dragon_1-4 dropped nothing despite the base table existing. Also wire bones-only droppers matched against the rsmod reference (entrana/monastery monks, skeleton warlock, Kolodion).
468 npcs wired to existing combat definitions by species; without one an npc never swings, retaliates or plays defend/death anims. Stats for 336 npcs (hitpoints, levels, attack_bonus, max hits at x10 lifepoints scale) taken from OSRS wiki Monster Examine data, filtered to monsters released before March 2007 so values match rev 634. 106 minimal combat definitions authored from the same data for families with no existing definition; attack anims omitted until cache anim ids are sourced. Also fixes five pre-existing dangling combat_def values (bear_cub, king_scorpion, zombie_dragging, tzhar_ket typo, gardener). Spawned npcs missing combat definitions: 681 -> 69; missing hitpoints: 304 -> 131. Remainder is post-2007 content with no OSRS source.
Second pass using runescape.wiki December 2011 revisions for post-2007 content the OSRS wiki can't cover (Scabaras dungeon, gnoeals, mutated bloodveld, ancient warriors, warped creatures, cursed ivory bosses). 2011 infoboxes carry LP, attack style, speed and max hit directly on the lifepoints scale; att/str/def are estimated from the combat level formula (x = (cb - 0.25*hp) / 0.9) as pre-EoC stat levels were never published. 41 combat definitions authored, ~65 npcs given stats, plus manual wires for stragglers: new archer ranged definition, fremennik citizens and customs officers to man, rock troll to ice_troll, The Kendal to bear, lava monster to fire_elemental. Spawned npcs missing combat definitions: 681 -> 0; missing hitpoints: 304 -> 0.
Replaces the uniform att=str=def estimate with the standard reversal: strength from max hit (P = (max/10 - 0.5) * 10 - 9, zero equipment bonus since rev 634 lacks npc equipment stats in the cache), then defence from combat level (DEF = 4 * (CB - S) - HP with S = 0.325 * (att + str) for melee, 0.4875 * level for ranged/magic; magic attackers assume def = mage). Verified against existing guard data (str 18, max hit 30, level 21). NPCs with no published max hit keep the previous combined estimate. Ref: rune-server.org/threads/698651 (503+) NPC Combat Numbers
The 718 cache stores npc equipment stats in definition params (keys 0-9: attack and defence bonuses per style) which rev 634 definitions lack. Ids are stable between revisions for pre-718 content, so the bonuses apply directly: per-style defences (stab/slash/crush/magic/range_defence, read by accuracy rolls in Equipment.kt) and attack_bonus for 848 combat npcs. Previously every npc defence bonus was implicitly zero, so monsters had no style weaknesses. Only absent keys are added; clone variants inherit from their base rather than repeating values. Verified against known values: cow -21 all styles, guard 24/14/19/4/16.
196 spawned npcs marked hunt_mode = "aggressive" per December 2011 wiki infoboxes (only where no hunt_mode was configured; explicit disables untouched, conditional aggression skipped). Seven combat definitions gain impact_poison with wiki start damage: ancient mage 88, frog 68, sea snake hatchling 50, spinolyp 20, big snake 10, confusion beast 2. Ten poisonous species already had it. Kill rat with range test pinned npc.huntMode = "" as giant rats are aggressive and now charge the shooter mid-test.
Remove the 718 equipment stat config keys - the cache already contains these params via DefinitionsParameterConverter so config duplication is unnecessary. Wiki 'aggressive' means aggressive with a combat level check, which is hunt_mode "cowardly"; reserve "aggressive" for npcs that attack regardless of level. All 194 added hunt modes flipped to cowardly. Stronghold of Player Safety muggers are the exception among muggers and are not aggressive; removed with source comment.
114 combat definitions authored earlier in this branch had no attack/defend/death animations. Ported from 2009scape's npc_configs.json (rev 530 data; animation ids are stable across revisions for pre-existing content - goblin's ported defend/death ids match void's hand-authored entries exactly). 266 animation and 57 sound entries added next to each combat definition, including per-style attack anims where the source distinguishes magic/ranged. 35 definitions remain without animations: post-2009 content absent from the source (blood reaver, elite dark warriors, cursed ivory bosses, Temple Trekking shadows).
114 combat definitions authored earlier in this branch had no attack/defend/death animations. (ported from rev 530 data; animation ids are stable across revisions for pre-existing content - goblin's ported defend/death ids match void's hand-authored entries exactly). 266 animation and 57 sound entries added next to each combat definition, including per-style attack anims where the source distinguishes magic/ranged. 35 definitions remain without animations: blood reaver, elite dark warriors, cursed ivory bosses, Temple Trekking shadows
GregHib
reviewed
Aug 7, 2026
| death_anim = "archer_death" | ||
|
|
||
| [archer.range] | ||
| range = 7 |
Collaborator
There was a problem hiding this comment.
projectile = "bronze_arrow" or iron?
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.
Fork-side PR for the NPC implementation sweep. Mirrors upstream PR GregHib#1143 — see that PR for full details and review discussion.
Summary:
cowardly) and poison flags from 2011 wiki🤖 Generated with Claude Code