Bay 12 Games Forum

Please login or register.

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

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

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #30 on: December 21, 2013, 02:28:50 am »

Some probing in the game memory suggests that the game is awarding a massive amount of XP points for a single incident, and that the code which levels up the skill is working fine.

http://dwarffortresswiki.org/index.php/DF2012:Experience

It appears that the game decided that the dwarf should gain somewhere from 436100 to 445500 XP for something, when he should have gained 30 XP.

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #31 on: December 21, 2013, 02:34:05 am »

It's amazing how no one have found this glitch before.

Now somebody should automate this glitch to make a Legendary Factory.
A newbie goes in, a legend goes out.

But how should we call this glitch?

EDIT: I propose Hyperbolic Spear Chamber.
« Last Edit: December 21, 2013, 02:43:13 am by Sergarr »
Logged
._.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #32 on: December 21, 2013, 02:44:00 am »

Are we going to file a bug report, or will this stay our dirty little secret? ;)
Logged

Vgray

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

I wonder why marksdwarves get sword skill? That just seems weird...
Logged

thegoatgod_pan

  • Bay Watcher
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #34 on: December 21, 2013, 04:22:10 am »

Another discovery in a single day! The forums are on fire!

This is amazingly fun for adventure mode and gives a nice reason to build a fancy sacrificial tower in the middle of your fort, with easy access to adventurers: mortal jumps in, god walks (or crawls) out.
Logged
More ridiculous than reindeer?  Where you think you supercool and is you things the girls where I honestly like I is then why are humans on their as my people or what would you?

wierd

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

You know.... this is a great use for garbage mood weapons. Artifact grade fungiwood spear, that kind of thing.

Make a lavishly ornate ritual chamber all around it, with special staircases and the whole bit.

I rather like the idea of calling it a "tower of power".  That the dwarf may actually need to sustain injuries to be transformed in this fashion just helps cement the metaphysical roleplay aspects, of the phenomenon being tied to being blessed by armok. It should be part of the temple complex, perhaps even tied to the sacrificial process somehow.

If it doesn't get fixed in the upcomming release, then "retired fortresses" are going to be a WHOLE LOT more interesting.
Logged

Zivilin

  • Bay Watcher
  • Dwarven Science Division
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #36 on: December 21, 2013, 05:27:15 am »

But how should we call this glitch?

EDIT: I propose Hyperbolic Spear Chamber.

Quantum Spike Pit - crams years-worth of fighting experience into a single, searing moment of enlightment. However, the acronym QSP would probably cause confusion with the Quantum Stockpile

Shaft of Enlightment - Get it, get it? Spear shaft, mine shaft?

<coughs>

Standard Prompt Experience Accruement Reactor - or S.P.E.A.R, for short - the crowning achievement of dwarven training science, acting on the principle of confronting recruits with a life-or-death situation, thus forcefully awakening their hidden potential.
Logged
No signature

wierd

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

Mosh pit?

Bed of nails?

Oooh! "Spear of Desinty"!
Logged

PDF urist master

  • Bay Watcher
  • Born from cold iron
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #38 on: December 21, 2013, 08:21:31 am »

if we equip the dwarves with picks, will they get legendary miner? just another potential application for the glitch
Logged
We are not evil by choice, but evil by necessity.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Upright spear causes instant badassery, probable glitch
« Reply #39 on: December 21, 2013, 10:38:22 am »

Here, we *may* have something like this going down:

If you try to add a number to, let's say, an 8 bit unsigned integer that is greater than 255, it is garanteed to overflow, because the memory space can't hold more than 8 bits. The extra bits "overflow" into the next byte over in memory, which could be data for some other attribute.
Unfortunately, this will NEVER happen - if the program is modifying a variable of a particular size, it will only ever write back data of that same size, leaving the upper bits to be discarded (which is why the value will simply wrap around instead). For example, incrementing an 8-bit value would be done using an instruction like "inc BYTE PTR [ebx+0x04]" (or "mov al, [ebx+0x04] : inc al : mov [ebx+0x04], al") and would not affect any adjacent addresses. The only time this sort of thing happens is when you're dealing with an array and the index happens to point past the end, but that's a buffer overrun and isn't related to this.

Are we going to file a bug report, or will this stay our dirty little secret? ;)

We file a bug report, of course - if people really want to cheat their soldiers' stats up that high, they can use DFHack.
« Last Edit: December 21, 2013, 11:59:42 am by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

AnotherDwarvernDeath

  • Bay Watcher
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #40 on: December 21, 2013, 11:59:18 am »

I wonder why marksdwarves get sword skill? That just seems weird...

I haven't tested this with a marksdwarf yet. My theory is that the goblin bowmen I threw on there may have some default Dabbling or Novice experience in Swordsdwarf. My other theory is that if I do test it on a marksdwarf, he'll instantly become a Hammer Lord because of his novice skills in Hammerdwarf.

I've just been calling it Drop Spear Training but that's boring, I know. I like the suggestion of Shaft of Enlightenment!
Logged

Urist Da Vinci

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

It also happens to miners who are holding picks (giving mining and fighter experience), but apparently not woodcutters with axes. Got a superlegendary miner/fighter, but he died shortly thereafter.

Best guess:

For this specific situation, it looks like garbage data from the stack is being used as experience input. The experience is awarded before the game even looks at the upright spears/spikes, being caused by the ground collision. The game should probably not be awarding any weapon XP at this point. You don't from normal falls, but might if you used your weapon to parry a spear attack. Perhaps an "allow weapon experience" flag or the like is being prematurely activated?

You could probably drop them 2z onto training spears if you want them to live. The weapon experience is always based on the equipped weapon. Bows in melee use the sword skill, crossbows in melee use the hammer skill, and picks use the mining skill. See item_weapon.txt

MonkeyHead

  • Bay Watcher
  • Yma o hyd...
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #42 on: December 21, 2013, 12:13:35 pm »

So, test subjects are trying to parry the ground?

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #43 on: December 21, 2013, 12:26:37 pm »

So, test subjects are trying to parry the ground?

Yes, probably. Someone needs to draw/make a comic of this...

It's all very epic. Jump off a tower towards a spike pit, and at the last moment attempt to parry the planet.

Lielac

  • Bay Watcher
  • [ETHIC:PEDANTRY: PERSONAL_MATTER]
    • View Profile
Re: Upright spear causes instant badassery, probable glitch
« Reply #44 on: December 21, 2013, 12:48:50 pm »

So, test subjects are trying to parry the ground?

Yes, probably. Someone needs to draw/make a comic of this...

It's all very epic. Jump off a tower towards a spike pit, and at the last moment attempt to parry the planet.

Parrying something that large would explain the experience reward. I mean, just think of the CR!

... I'll get my xX☼pig tail fiber coat☼Xx.
Logged


Lielac likes adamantine, magnetite, marble, the color olive green, battle axes, cats for their aloofness, dragons for their terrible majesty, women for their beauty, and the Oxford comma for its disambiguating properties. When possible, she prefers to consume pear cider and nectarines. She absolutely detests kobolds.
Pages: 1 2 [3] 4 5 ... 16