|Anonymous | Login | Signup for a new account||2018-07-19 22:33 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006397||Dwarf Fortress||Dwarf Mode -- Traps||public||2013-12-21 08:26||2015-01-19 20:37|
|Assigned To||Toady One|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Target Version||Fixed in Version||0.40.24|
|Summary||0006397: Nonlethal fall onto upright spike causes unreasonably high skill gain|
|Description||As discussed in the below-linked forum thread, both goblins and dwarves which fall 2 Z-levels onto an upright spike and survive appear to receive an inordinately large amount of experience in their weapon skill, Figher, and Shield User, enough to boost a Novice up to nearly Legendary+70.|
|Additional Information||http://www.bay12forums.com/smf/index.php?topic=134512.0 [^]|
edited on: 2014-03-17 21:33
The following binary edit MITIGATES this problem in Win32 v0.34.11 SDL:
0x006C3161 : 03 -> 31
This forces the upright spear to only hit as fast as a weapon trap, regardless of how fast you fall on it. Dwarves only gain about 125 xp with the patch, which is not enough to cause them to move beyond dabbling skill level. In comparison, arena testing shows a usual skill gain of about 3 xp for being stabbed with a spear by another creature. Upright weapons (and perhaps anything using the trap code) may be providing xp much faster than intended.
The bug appears to be due to the trap function being designed for word-sized speed numbers. It extracts the lower word of the dword-sized new projectile speed of the falling creature, does some math, and adds it to the base attack speed that all weapon traps share. My mitigation binary edit zeroes the extracted creature speed, causing the upright spear to attack just like a spear in a weapon trap.
I don't get why the super-fast trap would grant more XP, but nerfing the attack speed does lower the absurd XP gain.
The cause of the absurd XP is as follows:
-In the trap code, the super-high attack speed is also used to calculate the "hit_rating".
-Traps use virtual projectile data structures to implement attacks.
-Projectiles have a "hit_rating". A skilled marksdwarf fires crossbow bolts that have a high hit_rating (about 100 to 200 or so). A dabbling marksdwarf shoots bolts that have low hit_rating (about 3-33 or so).
-The amount of experience gained by the victim of a crossbow bolt depends partially on the bolt's hit_rating. I.e. you gain more experience by being wounded by a skilled opponent than by an unskilled opponent.
If I edit a crossbow bolt in flight using DFHack to have a hit_rating of about 50000 or more, it causes the creature it strikes to gain massive amounts of skill and become a legendary fighter as per this bug.
1. Put a cap on skill gains related to opponent's skill/accuracy.
2. Fix the formula that is converting the new parabolic projectile velocity.
|Related: in the notes for 0000089 Toady One mentions "In combat, you gain the attack skill roll of your opponent to your opposing skill."|
Confirmed as still present in 40.14
Just made a fort exclusively for this, made a 3 tile deep pit with an upright wooden spear at the bottom, retired and made a human adventurer go jump inside that hole.
An interesting note is that when the weapon and shield were strapped on me, there was no gain whatsoever. And since the adventurer had no armor, I assume that's the reason it didn't gain legendary armor user status either. But when I drew the sword and shield then jumped in, bam! legendary swordsman and shield user.
Uploaded a set of save files to illustrate this as I was curious, before and after the "lucky" fall that rocketed me into Legendary Fighter, Shield User and Swordsman. Had armor on (incomplete set, no gauntlets), Legendary Armor user skill was NOT gained.
|2013-12-21 08:26||Quietust||New Issue|
|2013-12-24 14:32||Knight Otu||Relationship added||related to 0003855|
|2014-03-14 00:32||UristDaVinci||Note Added: 0024604|
|2014-03-14 00:32||UristDaVinci||Tag Attached: binary patch|
|2014-03-15 18:52||Footkerchief||Note Edited: 0024604||View Revisions|
|2014-03-17 21:33||UristDaVinci||Note Edited: 0024604||View Revisions|
|2014-03-25 13:43||Dwarfu||Assigned To||=> Dwarfu|
|2014-03-25 13:43||Dwarfu||Status||new => acknowledged|
|2014-05-12 00:58||UristDaVinci||Note Added: 0024753|
|2014-05-12 01:02||UristDaVinci||Note Added: 0024754|
|2014-08-13 18:33||UristDaVinci||Note Added: 0029006|
|2014-08-13 18:35||4maskwolf||Issue Monitored: 4maskwolf|
|2014-10-30 03:32||cybergon||Note Added: 0030801|
|2014-10-30 03:33||cybergon||Issue Monitored: cybergon|
|2014-10-30 11:12||Footkerchief||Status||acknowledged => confirmed|
|2014-11-04 20:28||robotic||Note Added: 0030868|
|2014-12-31 11:29||Toady One||Status||confirmed => resolved|
|2014-12-31 11:29||Toady One||Fixed in Version||=> Next Version|
|2014-12-31 11:29||Toady One||Resolution||open => fixed|
|2014-12-31 11:29||Toady One||Assigned To||Dwarfu => Toady One|
|2015-01-19 20:37||4maskwolf||Issue End Monitor: 4maskwolf|
|Copyright © 2000 - 2010 MantisBT Group|