Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 5 6 [7] 8 9 ... 16

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

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #90 on: December 25, 2013, 12:59:58 am »

Huh.  The second one is one of the best ideas I've heard so far.  But then why must they have weapon skill already?
I -think- that if a dwarf has 0 skill points in a particular skill, then it doesn't exist for them.  Experience is not applied because there is nothing to apply it to.  They're not listed as [Liar:30,Shield:50,Spear:0] they're instead listed as simply [Liar:30,Shield:50] and anything at zero is perfectly excluded.  Therefore, for overflow experience to be applied, there must be something there to begin with.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #91 on: December 25, 2013, 01:49:38 am »

There's only three things I an consider happening here.  Either one or the other is occurring, or some combination...
1: The damage dealt by an upright spear/spike depends on the distance dropped, as it effectively takes your falling damage and applies that as the power of the weapon's attack.  Falling from higher up increases the damage the spear does, which alters the way experience and skillgain is handled.  I'm aware that skillgain doesn't depend on difficulty of task, so...
2: Toady may have slipped a variable somewhere, and accidentally referenced the wrong item.  It may not be a fluke of design, but rather an outright misplaced value, where it's trying to assign the damage as experience.  Because of the weird way combat is handled, dealing damage in the tens of thousands might only translate into bruises, but if those tends of thousands are accidentally put in the 'experience' column, you get supersoliders.
3: Weird conversions are happening.  It's possible that falling damage is figured differently from weapon damage, because normal weapons are made of metal and wielded, while the ground is made of relatively soft 'floor' and thus needs highly exaggerated damage values - an axedwarf with a copper axe might deal 30 strength through 10 hardness, for 300 damage, but a floor tile only has a hardness of .1 so it needs to hit with a strength of 3,000 to deal any reasonable damage.  That 3,000 strength strike is only a gentle pap, but it's somehow applied to the upright spear as well, and from there somehow works its way into the experience given...

Whichever way you look at it, this is a very deep coding issue, not something that can be explained via any in-game means.

In any case, I think it'd tag quite nicely on the Children of Armok project...

Huh.  The second one is one of the best ideas I've heard so far.  But then why must they have weapon skill already?
I -think- that if a dwarf has 0 skill points in a particular skill, then it doesn't exist for them.  Experience is not applied because there is nothing to apply it to.  They're not listed as [Liar:30,Shield:50,Spear:0] they're instead listed as simply [Liar:30,Shield:50] and anything at zero is perfectly excluded.  Therefore, for overflow experience to be applied, there must be something there to begin with.

In this thread: http://www.bay12forums.com/smf/index.php?topic=131995.0 I found out how falling damage, weapon damage, and trap damage are calculated. It doesn't work the way that you suggest.

If people want to help track down the bug, they could test the bug under a large set of varying conditions, and look for patterns. Vary the armor type/material, the ground material (build a floor before the trap is built), and the spear material/type. As mentioned in the above thread, dense ground deals more damage than low-density ground.

I am away from my DF tools until later in December due to holidays.

4maskwolf

  • Bay Watcher
  • 4mask always angle, do figure theirs!
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #92 on: December 25, 2013, 01:58:18 am »

After Christmas, go plan on doing an extensive bugsearch in the name of SCIENCE!

HmH

  • Bay Watcher
  • Cage Trap Personified
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #93 on: January 05, 2014, 10:33:29 am »

Performed some experiments on an unarmored, clothes-only human in adventure mode, then had him put on some armor and tested again.

Results:
1) The minimal height required for the bug to work is two Z-levels. It does not require the test subject to wear armor or clothes.
2) Falling two Z-levels onto one spear yields 148250 experience for each skill, two spears: 296490. Falling three Z-levels onto one spear: 546440, two spears: 1092880. The experience gain might fluctuate slightly, but often remains stable.
3) Skill level does not influence experience gain.
4) Falling two Z-levels onto one spear while wielding two weapons of the same skill yields 296490 experience.
5) There is no difference in experience gain between wooden training spears and silver spears, or between well-made spears and exceptional spears.
6) It is possible to become Legendary from No Skill. In such an event, experience gained is always one thousand higher than it is in any other case. And I mean always: it does not change regardless of how many weapons of that skill you hold, the height from which you fall, the amount of spears you fall onto. Wait, no, I was calculating it wrong. No 1000 experience points here, just a mistake on my part.
7) Falling with three lead bins, two lead crutches and one lead splint on me, which added 578lb to my weight, did not yield any extra experience.
8) Changing humans' BODY_SIZE from 4000 to 400000 did not result in higher experience gain.
9) My attributes remained constant no matter how many skill levels I gained.
10) My Armor User skill did not increase even in armor.

Conclusions:
1) Experience gained is proportional to the amount of spears you land onto. It is also proportional to the amount of weapons of a given skill that you currently wield.
2) Experience gained is not proportional to the height from which you fall. (Unfortunately, I don't have enough data to determine how the two are connected.) Still, I can't help but notice that falling from one more Z-level yields a significantly bigger increase in experience than falling onto one more spear.
3) Leveling up from No Skill has a weird tendency to grant one thousand more experience than leveling up from any other experience level is possible and behaves exactly the same as leveling up from any skill level.
4) Weight does not influence experience gain. Body size does not influence experience gain.
5) Experience gain from this bug does not increase one's attributes.


UPD:
Testing with a higher stairway and ten spears:
1 Z-level - no skill gain, "the spinning cacao wood training spear misses you!" x10.
2 Z-levels - 0/700 Adequate -> 13955/17200 Legendary+147, total of 1482455 experience points; 0/500 No Skill -> 12850/17200 Legendary+147, total of 1482455 experience points. Fits the prediction based on previous experiments: 10*148250 ≈ 1482455.
3 Z-levels - 0/700 -> 5096/33100, total 5464496, 0/0 -> 3996/33100, total 5465496. Fits the prediction: 10*546440 ≈ 5464496.
4 Z-levels - same as 1Z, those spears just keep missing me.
5 Z-levels - same.
6 Z-levels - same.
7 Z-levels - same.
8 Z-levels - 0/700 -> 26537/32100, 5160436 points; 0/500 -> 25537/32100, 5160436 points.
9 Z-levels - 26537/32100 -> 11363/35200, 1026426 points; 0/700 -> 13263/14300, 1026426 points.
10 Z-levels - same as 1Z.
11 Z-levels - same.

Repeating the experiments with different races and different quantities of spears shows the same pattern.

What we learned:
1) There is no obvious correlation between falling distance and experience gain. The most likely explanation is that the figures the game ends up working with are so ridiculously high that they repeatedly enter stack overflow; levels 2-3 and 8-9 are just sweet spots where the end value is positive for whatever is responsible for checking whether the spears hit you.
2) The highest experience gain you can achieve is with a 3 Z-level fall onto ten spears.
3) Upright spears can't hit you if you fall at them from the right height. The fall will probably kill you anyway, but that's beside the point. Point, geddit?

What we could do next:
Perform experiments with 2, 3, 4, 8, 9 Z-level falls in Fortress Mode, look up in combat logs whether they get hit by spears at Z-level 4, see how their skills change via DFHack or Dwarf Therapist, upload the results here. We'll find out if Fortress Mode calculations work the same way.
« Last Edit: January 27, 2014, 07:45:09 am by HmH »
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #94 on: January 05, 2014, 09:28:00 pm »

Performed some experiments on an unarmored, clothes-only human in adventure mode, then had him put on some armor and tested again.
...
2) Falling two Z-levels onto one spear yields 148250 experience for each skill, two spears: 296490. Falling three Z-levels onto one spear: 546440, two spears: 1092880. The experience gain might fluctuate slightly, but often remains stable.
...

I repeated this experiment for varying spear and menacing spike materials. No observed differences in XP from HmH's results.

It appears that the bug does not depend on the spear's material properties. It also appears to not depend on weapon properties (the differences between spears, training spears, and menacing spikes).

My further Windbg checks did not yield anything useful.

Creatures only explode on impact if you drop them 25+ z-levels, so we could test deeper spike pits to find the other (less useful) "magic numbers". The test subjects might live just long enough for their xp to be measured.

Thormgrim

  • Bay Watcher
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #95 on: January 05, 2014, 10:17:19 pm »

I want to say thank you for this funny glitch.
Every new child that reaches age is now conscripted into a special squad and walks into the "temple of enlightenment".   A short wait and it is decided: "Soldier, Garbagedwarf or Armok's embrace"
Logged

fractalman

  • Bay Watcher
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #96 on: January 05, 2014, 11:25:03 pm »

And we thought danger rooms were over-powered.

Maybe I'll use this...take a cage full of every goblin in the fort, chuck em down a chute onto some spears, floor the chute over, then breach HFS via some sort of elaborate remote mechanism, and see how much of the clown-car survives.   
Logged
This is a masterwork ledger.  It contains 3719356 pages on the topic of the precise number and location of stones in Spindlybrooks.  In the text, the dwarves are hauling.
"And here is where we get the undead unicorns. Stop looking at me that way, you should have seen the zombie deer running around last week!"

misko27

  • Bay Watcher
  • Lawful Neutral; Prophet of Pestilence
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #97 on: January 05, 2014, 11:28:07 pm »

Do this to a FB or Clown with a open path to your fort: Ultimate DF challenge.
Logged
The Age of Man is over. It is the Fire's turn now

fractalman

  • Bay Watcher
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #98 on: January 06, 2014, 12:17:40 am »

Dwarfy though that may be, my military-management skills are, at present, terrible: my idea of defense, at present, is to wall off the caverns, spam cage traps on the surface, and bump my fortress population/wealth up quickly enough to skip kobold ambushes/seiges. 

I blame haunted (reanimating) embarks for this. I will be remedying it in the future…but I need to be able to best a NORMAL clown-car in flat-out military engagement first. :P
Logged
This is a masterwork ledger.  It contains 3719356 pages on the topic of the precise number and location of stones in Spindlybrooks.  In the text, the dwarves are hauling.
"And here is where we get the undead unicorns. Stop looking at me that way, you should have seen the zombie deer running around last week!"

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #99 on: January 06, 2014, 12:19:16 am »

FBs and Clowns dont carry weapons or wear armor, so the bug wont really work on them the way you expect.

Now-- Amusing idea: animal creature that has picked up a weapon-- can THAT be "enlightened"?
Logged

misko27

  • Bay Watcher
  • Lawful Neutral; Prophet of Pestilence
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #100 on: January 06, 2014, 01:39:21 am »

FBs and Clowns dont carry weapons or wear armor, so the bug wont really work on them the way you expect.

Now-- Amusing idea: animal creature that has picked up a weapon-- can THAT be "enlightened"?
If it can, do the same with Bronze Colossus. No fluffy wambler can stop them now.
Logged
The Age of Man is over. It is the Fire's turn now

Ubiq

  • Bay Watcher
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #101 on: January 06, 2014, 02:58:34 am »

What about a minotaur? They have weapon skill levels.
Logged

smurfingtonthethird

  • Bay Watcher
  • Legendary Shitposter
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #102 on: January 06, 2014, 06:56:23 am »

This glitch has lead to some dwarven fun with necromancers, superpowered goblins, clowns and candy-clad infantry.
Logged
RIP Moot ;-;7 Sigtext!

Erils

  • Bay Watcher
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #103 on: January 06, 2014, 12:37:18 pm »

This supposed "glitch" is actually no glitch at all! What happens is simple.

When a dwarf or other creature falls toward a spike, they believe that the are about to die. This belief unlocks knowledge and potential hidden inside their minds. However, only relevant knowledge is unlocked. As such, a dwarf holding a sword would learn all the knowledge of swordplay and a goblin weilding a bow would also learn all the knowledge of swordplay because when he fell, he was thinking how much better it would be to have a sword. This hidden knowledge leads to the massive experience increase and mastery of whatever weapon they were holding.

But in all seriousness, Toady will probably fix this glitch. It would be cool if he left it in to allow for a sort of trial or initiation process for dwarves to become weapon masters.
Logged

MonkeyHead

  • Bay Watcher
  • Yma o hyd...
    • View Profile
Re: Upright spear glitch aka "Shaft of Enlightenment"
« Reply #104 on: January 06, 2014, 12:41:21 pm »

FBs and Clowns dont carry weapons or wear armor, so the bug wont really work on them the way you expect.

Now-- Amusing idea: animal creature that has picked up a weapon-- can THAT be "enlightened"?

Say, an antman, or Asax-like?
Pages: 1 ... 5 6 [7] 8 9 ... 16