Add missing drop tables and combat definitions - #1143
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.
368a041 to
e0659fb
Compare
|
Hello, i noticed that muggers have aggresive again source: https://www.youtube.com/watch?v=iWUsTvMLQtY and https://www.youtube.com/watch?v=wQndhUKbV-w muggers in player safety dungeon are not aggressive towards to player. They are only muggers in game that does not have aggressive I think. (I should have put the source in the .toml file my bad :( ) Overall really good job on other things, you are putting the hours in! ❤️ |
The params are taken from 718 (See DefinitionsParameterConverter) and are already in the cache so aren't needed in config files.
Aggressive in the wiki is actually hunt_mode "cowardly", "aggressive" is equivalent to aggressive regardless of combat level - which most npcs are not, and the wiki doesn't specify which-is-which. |
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.Equipment stats (718 cache)
The 718 cache stores npc equipment stats in definition params (keys 0-9, unavailable in 634 defs). Since npc ids are stable between revisions for pre-718 content, per-style defence bonuses (
stab/slash/crush/magic/range_defence, consumed by accuracy rolls inEquipment.kt:149) andattack_bonusare applied to 848 combat NPCs, previously every npc defence bonus in the codebase was implicitly zero, so monsters had no style weaknesses. Verified against known values (cow −21 all styles, guard 24/14/19/4/16). Only absent keys added; clone variants inherit from their base.Aggression & poison (2011 wiki)
196 spawned NPCs marked
hunt_mode = "aggressive"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. TheKill rat with rangetest pinsnpc.huntMode = ""since giant rats are aggressive and now charge the shooter mid-test.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.