Add missing drop tables and combat definitions - #1146
Merged
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
approved these changes
Aug 7, 2026
GregHib
left a comment
Owner
There was a problem hiding this comment.
Gave it a quick scan and looks good, if there's any issues they can be resolved over time
Contributor
Author
|
Closes #1141 |
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.
What changed?
Drop tables
Before this branch, 577 spawned NPCs (938 total) resolved no drop table at kill time and died to nothing; ~30 NPC families with tables were missing their charm drops.
Module:Data/<npc>) at 1/100000 precision, matching the existing bat/scorpion table format; cave slime, outlaw, rockslug, unicorn and tzhaar fall back to rounded community rates where no charm log exists. KBD drops charms four at a time (amount = 4).roll = 1024.green_dragon_1-4dropped nothing because clones don't inherit the implicit string-id table match), 19 tobones, 63 toemptyfor NPCs that legitimately drop nothing.hobgoblins.drops.toml, a stale duplicate ofhobgoblin/hobgoblin.drops.toml.Combat definitions & stats
An NPC whose
combat_defdoesn't resolve never swings, never retaliates, and plays no defend/death animation (Attack.kt:52,Combat.kt:146). 681 spawned NPCs were in that state; 304 also had no hitpoints.guard, skeletons by wielded weapon →skeleton_sword_shield/skeleton_mace_shield, etc.).attack_bonus,max_hit_<style>, ×10 lifepoints scale) from OSRS wiki Monster Examine data, filtered per-version to monsters released before March 2007 so values match rev 634 (e.g. Bandit's 2002 level-22 version is used, its 2014 level-130 version is rejected). Only absent keys are filled — no existing values touched.attack_speed+target_hitwith correct offense style and max hit). Attack anims intentionally omitted until cache anim ids are sourced — an omitted anim is a silent no-op, so these NPCs now fight correctly but without bespoke animations.combat_defvalues (bear_cub,king_scorpion,zombie_dragging,tzhar_kettypo,gardener).P = (max/10 − 0.5)·10 − 9, zero equipment bonus as the 634 cache lacks npc equipment stats), then defence from combat level (DEF = 4·(CB − S) − HP,S = 0.325·(att+str)melee /0.4875·levelranged/magic). Verified against existing guard data. NPCs with no published max hit use a combined estimate instead.Aggression & poison (2011 wiki)
194 spawned NPCs marked
hunt_mode = "cowardly"(level-checked aggression) per December 2011 wiki infoboxes (only where no hunt_mode existed; explicit disables untouched, conditional aggression skipped). Seven combat definitions gainimpact_poisonwith 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. Stronghold of Player Safety muggers excluded (not aggressive, source in toml comment). TheKill rat with rangetest pinsnpc.huntMode = ""since giant rats are aggressive and now charge the shooter mid-test.Combat animations & sounds
The combat definitions authored in this branch initially had no attack/defend/death anims. 114 of 149 now have them, 266 animation + 57 sound entries added beside each combat definition, with per-style attack anims where the source distinguishes magic/ranged. The remaining 35 post-2009 definitions were since filled: real anim ids where reference data existed (chaos dwogre, ogre chieftain, soul wars avatars, blood reaver, ancient mage/ranger, luminescent icefiend, Temple Trekking shadows' shared death anim) and species-appropriate reuse of existing void anims for the rest (quest humans → human, elite dark ranger → archer, trolls, rock crab, demon, dagannoth, ghost, scarab). Only baby tanglefoot and the three cursed Ivory zogre bosses remain bare — no source data exists in any reference.
Verification
drop_table/combat_defreferences; combat def loader hard-fails on unknown keys at boot and boot passes.CombatTest,CombatMovementTest) and engine drop table tests pass.Continues #1143 - that PR could not be reopened after the branch was recreated