Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 16

Author Topic: Upright spear glitch aka "Shaft of Enlightenment"  (Read 144040 times)

ImagoDeo

  • Bay Watcher
  • [NOT_THINK:UNTHINKABLE]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #15 on: December 20, 2013, 11:22:20 pm »

If it is an overflow, related to damage calc, then you need to have a goblin subject that fits the profile for the overflow to get triggered.


Basically, the goblin's armor needs to be the same kind, he needs to fall from about the same height, needs to have similar body weight, and needs to have similar armor user and dodger skills.

Otherwise the overflow won't happen the same way.

Do remember: the OP records at least three separate instances of this happening, each time with a similar result and yet with entirely different goblin creatures. That makes me doubt (if it's an overflow) that it has anything to do with armor, weaponry, or previous skill. Toady might be able to offer some input but it's pretty unlikely that he will.

And now we have an instance of the same thing happening to a dwarf. So creature type has nothing to do with it either.
Logged
What would it be like to live in a world that was copy/pasted? Would we even notice? If not, how many times have we switched celestial harddrives or whatever?

AnotherDwarvernDeath

  • Bay Watcher
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #16 on: December 20, 2013, 11:39:42 pm »

Before the dwarf randomly (and unexpectedly) worked I was going to say that the goblins I used represented a pretty wide range of stats and skills, so specifics don't seem to matter. It seems to be something overlooked in the actual game mechanics.

Anyway, here's the save. Sorry it took a while -
http://dffd.wimbli.com/file.php?id=8228

Not going to win any aesthetics or safety awards but it'll have to do, haha. Testing chamber is just past the soil layer, near the entrance to the mines/caverns staircase, across from the drowning chamber. Let me know if I forgot to mention something obvious.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #17 on: December 20, 2013, 11:42:59 pm »

Davinci:

Can you give me a quick and dirty spoilerized pseudocode for the damage calc routine?
Spoilerized, of course.

I've so far avoided the temptation to decompile DF, since it seems quite clear toady doesn't want to share his sourcecode, and I respect that decision. I have however looked quite gleefully at the memory structures, and made some inferences.

A quick and dirty on the algorithm would be helpful in determining what values I should be paying the most attention to when I watch the experiment.


Deo:

The likely important thing is the value that gets calculated for the impact. The overwrite appears to happen just after the dwarf hits the ground, and just before the spiketrap starts beating on them as they stand up. That suggests that the result of the impact calc is the magic ingredient.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #18 on: December 21, 2013, 12:05:06 am »

I just dug around in mantis to see if any previously reported bugs might be applicable. The falling objects produce unreasonable damage values bug might be applicable, but that's a stretch.

That said, I really do seem to recall reading on the forums a report about dwarves gaining skills when just being dropped before. My memory isn't as good as it used to be.. and I could be getting scenile, so don't take that as gospel now. ;)  I think it was about a year ago.

I don't see any information in mantis about such a thing though. Either it wasn't officially reported in the tracker, or my memory is playing nasty tricks on me.

Logged

ImagoDeo

  • Bay Watcher
  • [NOT_THINK:UNTHINKABLE]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #19 on: December 21, 2013, 12:12:48 am »

Yeah, that sounds right.

Do we classify this as an actual glitch, or was the game intended to give substantial amounts of combat training for falling on spears? Given the specific circumstances involved I'd say it's an actual glitch. Whether or not it's a data overflow is another matter. Theoretically, Toady's code could be giving a value that it considers correct, even if all of us players recognize that it's absurd.

I'd also like to know exactly which skill is being trained. It's Fighter, right? If it's weapon skill then this makes even less sense than I thought.
Logged
What would it be like to live in a world that was copy/pasted? Would we even notice? If not, how many times have we switched celestial harddrives or whatever?

Maolagin

  • Bay Watcher
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #20 on: December 21, 2013, 12:16:06 am »

I just dug around in mantis to see if any previously reported bugs might be applicable. The falling objects produce unreasonable damage values bug might be applicable, but that's a stretch.

That said, I really do seem to recall reading on the forums a report about dwarves gaining skills when just being dropped before. My memory isn't as good as it used to be.. and I could be getting scenile, so don't take that as gospel now. ;)  I think it was about a year ago.

I don't see any information in mantis about such a thing though. Either it wasn't officially reported in the tracker, or my memory is playing nasty tricks on me.

Maybe you're thinking of this post about item-drop training? It also suggests random weapon skill gain only when an injury is inflicted, but I don't see much additional detail than that.
Logged

AnotherDwarvernDeath

  • Bay Watcher
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #21 on: December 21, 2013, 12:20:17 am »

I'd also like to know exactly which skill is being trained. It's Fighter, right? If it's weapon skill then this makes even less sense than I thought.

From
Code: [Select]
Novice Swordsdwarf (Rusty)
Dabbling Armor User
Novice Fighter (Rusty)
Dabbling Wrestler

to
Code: [Select]
Legendary Swordsdwarf
Dabbling Armor User
Legendary Fighter
Dabbling Wrestler
Dabbling Striker
Dabbling Kicker
Dabbling Dodger
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #22 on: December 21, 2013, 12:32:41 am »

This thread describes some of the combat calculations with respect to materials:
http://www.bay12forums.com/smf/index.php?topic=131995.0
IIRC I mentioned falling on spikes in there. EDIT: here http://www.bay12forums.com/smf/index.php?topic=131995.msg4722022#msg4722022 and http://www.bay12forums.com/smf/index.php?topic=131995.msg4727505#msg4727505

Back On Topic:

I managed to duplicate the bug in one of my own savegames. A speardwarf became a legendary speardwarf, legendary shield user, and legendary fighter from falling 2z onto 3 upright spikes.

Code: (gamelog.txt) [Select]
it  The Speardwarf in the body part, but the attack is deflected by The Speardwarf's (®iron mail shirt¯)!
Fath Koltogal has become a Spearmaster.
The (copper spear) strikes The Spearmaster in the left upper leg, fracturing the bone through the (®iron mail shirt¯)!
The (copper spear) strikes The Spearmaster in the left upper arm, fracturing the bone and fracturing the left shoulder's bone through the (®iron mail shirt¯)!
The (copper spear) strikes The Spearmaster in the lower body, bruising the muscle and bruising the guts through the (®iron mail shirt¯)!
The Spearmaster looks sick!
The Spearmaster loses hold of the (iron shield).
Something to do with falling on the ground while heavily armed and armored?

...
The likely important thing is the value that gets calculated for the impact. The overwrite appears to happen just after the dwarf hits the ground, and just before the spiketrap starts beating on them as they stand up. That suggests that the result of the impact calc is the magic ingredient.

Does not work that way. First, a giant cube of dirt beats on the falling victim. Then, its buddy throws the spears at the falling victim. The game processes them as two seperate attacks. The code that creates a dirt cube weapon is the only part run if you fall on a floor that doesn't contain a spike trap.
« Last Edit: December 21, 2013, 12:38:05 am by Urist Da Vinci »
Logged

AnotherDwarvernDeath

  • Bay Watcher
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #23 on: December 21, 2013, 12:44:37 am »

I managed to duplicate the bug in one of my own savegames. A speardwarf became a legendary speardwarf, legendary shield user, and legendary fighter from falling 2z onto 3 upright spikes.

-snip-

Something to do with falling on the ground while heavily armed and armored?

Hm, I hadn't seen legendary shield user pop up before. Good to know, because the dwarf I used wasn't holding a shield, just a short sword in multigrasp. I don't think it's falling onto the ground that does it at all, though; like I said, the goblins who happened to miss the spears before showed no apparent stat boosts compared to their impaled brethren. I wonder if armor matters, though. I'm going to drop one of my heavily-armored knights and edit this post with how he's feeling.

EDIT: In spoilers to save space.
Spoiler (click to show/hide)

So, nothing except for what Urist Da Vinci showed.
« Last Edit: December 21, 2013, 12:57:08 am by AnotherDwarvernDeath »
Logged

ImagoDeo

  • Bay Watcher
  • [NOT_THINK:UNTHINKABLE]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #24 on: December 21, 2013, 01:03:49 am »

First, a giant cube of dirt beats on the falling victim. Then, its buddy throws the spears at the falling victim. The game processes them as two seperate attacks. The code that creates a dirt cube weapon is the only part run if you fall on a floor that doesn't contain a spike trap.

And yet the fact that there is an upright spear seems to have some impact on the skill gain, even though the skill gain takes place before the spear's "attack." Is the spear factored into the first attack - the giant cube of dirt - at all? It must be or we'd have legendary dwarves showing up all the time from falling in cave-ins and the like.
Logged
What would it be like to live in a world that was copy/pasted? Would we even notice? If not, how many times have we switched celestial harddrives or whatever?

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #25 on: December 21, 2013, 01:07:24 am »

If I look at the creatures with DFHack, in one case the dwarf went from rank 1 to rank 89 in axe skill, where 0 is dabbling, 15 is grand master, and 20 is legendary+5. The other skills that became "legendary" also gained about 89 ranks.

So yes, the bug does appear to convert the creature into a god of war.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #26 on: December 21, 2013, 01:17:24 am »

Ok--

So, to exploit this curious finding, we need to know what the minimum drop distance is, and what the weakest material for the spiketrap should be, so that we can insta-train (for example) the products of the childcare experiment in weapon, and shield use after they have already gained dodge and armor user from the childcare system, and do so with the lowest mortality and casualty rate.

Logged

ImagoDeo

  • Bay Watcher
  • [NOT_THINK:UNTHINKABLE]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #27 on: December 21, 2013, 01:19:45 am »

*sigh*

And I thought danger rooms were exploitative...
Logged
What would it be like to live in a world that was copy/pasted? Would we even notice? If not, how many times have we switched celestial harddrives or whatever?

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #28 on: December 21, 2013, 01:24:46 am »

Look at it this way:

We put the children through the spartan survival test, and THEN put them through a "coming of age" ritual, which magically imbues them with superdwarven power.

:)
Logged

nogoodnames

  • Bay Watcher
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #29 on: December 21, 2013, 01:52:32 am »

A quick test in adventure mode reveals that you need to fall from at least two units for the glitch to take effect, with more experience being gained when falling from greater heights. Even so, just a single fall from two blocks up was enough to give legendary+ skills in shield using, fighting and my chosen weapon skill.

So far it doesn't seem to affect attributes or the dodging and armour using skills.
« Last Edit: December 21, 2013, 01:54:07 am by nogoodnames »
Logged
Life is, in a word, volcanoes.
                        - Random human lord
Pages: 1 [2] 3 4 ... 16