Bay 12 Games Forum

Please login or register.

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

Author Topic: I can't kill a single Dwarf with 100 Whales  (Read 17314 times)

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #60 on: July 16, 2014, 10:00:26 am »

Is it possible, that in some calculations values larger than 2 billion are computed (maybe when the weight is multiplied with the speed)? If signed 32-bit integers are used that would cause an overflow.

I guess so. I have no idea about the tech part, but I'm pretty sure it's an engine limitation. Forced me to resize monsters in the MH mod and give them tougher skin/bones instead. Which is silly, since they're not supposed to be tougher than some smaller monsters, but well, that's that.

The strangest thing is that, in theory, all creatures spawned in the arena are average in size/stats. I don't think they vary. Still, some will be bugged, some won't. Totally random.
The easiest way to understand overflow is to think of an old-fashioned mechanical car odometer.  When you get to a certain point, it rolls over to zero again and keeps going like nothing strange happened.

In the case of a 32-bit signed integer, the highest number that can be stored correctly is 2,147,483,647.  Add one and it rolls over.  For arcane reasons dealing with how negative numbers are stored, our integer rolls over to -2,147,483,648 instead of zero.

So, if some intermediate calculation (such as speed * weight) goes over 2,147,483,647, then we might expect some really wonky things to happen.  For example, an intermediate result that should be 5 billion would wrap around and be treated like a mere 705,032,705 (goes from zero up to the max, wraps to the minimum, and climbs from there).
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Neo_Spade

  • Bay Watcher
  • [PREFSTRING:ginger neck-beard]
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #61 on: July 16, 2014, 01:25:08 pm »

As a big thank you to everyone that has participated in this thread thus far, especially to Saram for thinking up the Slade Whale, and to Wimopy for taking the time out to make them, and the Doom Whale a reality I've created this image as a homage:



EDIT: Minor grammar fixes.
« Last Edit: July 16, 2014, 03:37:55 pm by Neo_Spade »
Logged
If you've got dwarf problems, I feel bad for you, son.
I've got 99 whales because I killed Urist with one.

Cragspyder

  • Escaped Lunatic
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #62 on: July 17, 2014, 12:21:33 pm »

Why do Sperm Whales drown in air? They breathe air.
Logged

JoeJoe

  • Bay Watcher
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #63 on: July 17, 2014, 01:12:34 pm »

I guess unless the game differentiates between sea mammals and fish at some point and/or implements some form of holding breath, this is the best way for the creatures to behave realistically, even if what's going on in the background is sort of fudged up.
Logged

Wimopy

  • Bay Watcher
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #64 on: July 17, 2014, 03:37:06 pm »

Well, even in real life, whales do die rather fast outside of water. Usually because then they can't move, eat or drink. I guess drowning is close enough to simulate that, seeing as whales aren't attacked by sharks reliably when beached (or at all, for that matter? I haven't seen many beached whales )
Logged
Now updating the Monster Hunter Universe mod
Current Version: 0.4.95b - Updated June 17, 2015
New Thread
Download
Old Thread

Neo_Spade

  • Bay Watcher
  • [PREFSTRING:ginger neck-beard]
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #65 on: July 18, 2014, 08:30:34 am »

Well, even in real life, whales do die rather fast outside of water. Usually because then they can't move, eat or drink. I guess drowning is close enough to simulate that, seeing as whales aren't attacked by sharks reliably when beached (or at all, for that matter? I haven't seen many beached whales )

What usually kills the beached whale is the sudden loss of support. Without water supporting it's gigantic form it crushes it's own bones and vital organs under the preasure of it's own weight. If that doesn't kill them then it's down to dehydration, or more commonly drowning when water/sand covers the blow hole. (Don't quote me on the ordering there, I'm probably wrong, either way these are the 3 most common reasons).

Basically, in the case of Dwarf Fortress, outside of when we've been dropping them (which in reality would turn them into jam) and due to the percieved speed at which a whale drowns in Dwarf Fortress, I'd say it's safe to say that they actually do drown in a fairly realistic manner.
Logged
If you've got dwarf problems, I feel bad for you, son.
I've got 99 whales because I killed Urist with one.

Gojira1000

  • Bay Watcher
  • Demands a glass bed? Seriously?
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #66 on: July 18, 2014, 10:20:22 am »

Well I would dodge one-hundred whales, and I would dodge one-hundred more,
Just to be the dwarf who dodged one-hundred whales that fell outside your door.

 
Logged
"Sarcasm is the lowest form of wit." - Oscar Wilde

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #67 on: July 19, 2014, 08:41:01 am »

The strangest thing is that, in theory, all creatures spawned in the arena are average in size/stats. I don't think they vary. Still, some will be bugged, some won't. Totally random.
They can vary. I left 10 GSW to air-drown, and butchered the corpses.

Bone: 1339 - 1690
Meat: 5596 - 7048
Intestines: 1382 - 1740
Fat: 1209 - 1523

Those two extremes came off the same two animals.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

JoeJoe

  • Bay Watcher
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #68 on: July 19, 2014, 05:43:50 pm »

Do you still have all the data? would be interesting to see if they are uniformly distributed or normally. or see how the standard deviation is.
Logged

Wimopy

  • Bay Watcher
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #69 on: July 20, 2014, 05:50:04 am »

The strangest thing is that, in theory, all creatures spawned in the arena are average in size/stats. I don't think they vary. Still, some will be bugged, some won't. Totally random.
They can vary. I left 10 GSW to air-drown, and butchered the corpses.

Bone: 1339 - 1690
Meat: 5596 - 7048
Intestines: 1382 - 1740
Fat: 1209 - 1523

Those two extremes came off the same two animals.

Really? I thought they were same-sized because the status screen always says "Average-sized".
Still doesn't explain why not all GSWs get bugged, unfortunately.
Logged
Now updating the Monster Hunter Universe mod
Current Version: 0.4.95b - Updated June 17, 2015
New Thread
Download
Old Thread

Neo_Spade

  • Bay Watcher
  • [PREFSTRING:ginger neck-beard]
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #70 on: July 20, 2014, 07:50:29 am »

The strangest thing is that, in theory, all creatures spawned in the arena are average in size/stats. I don't think they vary. Still, some will be bugged, some won't. Totally random.
They can vary. I left 10 GSW to air-drown, and butchered the corpses.

Bone: 1339 - 1690
Meat: 5596 - 7048
Intestines: 1382 - 1740
Fat: 1209 - 1523

Those two extremes came off the same two animals.

Really? I thought they were same-sized because the status screen always says "Average-sized".
Still doesn't explain why not all GSWs get bugged, unfortunately.

Is there any way something like DFHack or some other external program figure out the finer details of these creatures?

I think that what we've stumbled upon here is either a buggy feature or just a straight up bug, I believe that what it could potentially be is this:
Average size just means it averages around the given weight, so when a creature is spawned in it has a percentage of it's weight given or taken (e.g. 5%), or maybe a multiplier is applied (so that way there is natural variety in the starting creatures in a world). If it this is the case it'd explain why some GSW are buggy and other aren't, so some of them just about go over the weight overflow. However, what changes things is if weight and butchering returns are linked, because while the different returns given are fairly similar from what Sutremaine's stats show (apart from the meat, which is vastly different in comparison to the 1500-ish difference in the meat returns) then none of the whales could have been an overflowing weight, otherwise you'd get really small returns.

As an aside, if this percentage/multiplier is applied (and actually exists) to the GSW, maybe it does it twice, one for the SW and then, because they both have a size tag, it does it again for the GSW.

If DFHack (or something) can read into the weights more and figure out if these creatures really do have identical values then we can safely say that it's a bug. Also, if the meat returns aren't intentionally randomized, and not connected to weight (which is a bit easier to prove if we can determine that these creatures are the same weight) then it's very likely that while trying to clarify 1 bug we've discovered another one :P

(I hope I made any sense here, I'm not 100% sure that I did :S)
Logged
If you've got dwarf problems, I feel bad for you, son.
I've got 99 whales because I killed Urist with one.

JoeJoe

  • Bay Watcher
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #71 on: July 20, 2014, 08:44:49 am »

Meat returns are always a lot higher than the others. If you divide the lower of the two values by the higher one, you will always have 0.79...
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #72 on: July 20, 2014, 09:20:26 am »

The game doesn't apply fatness or muscularity to arena creatures, but it does apply the general length / width / broadness modifiers. Edit those in the sperm whale entry to

   [BODY_APPEARANCE_MODIFIER:LENGTH:100:100:100:100:100:100:100]
   [BODY_APPEARANCE_MODIFIER:HEIGHT:100:100:100:100:100:100:100]
   [BODY_APPEARANCE_MODIFIER:BROADNESS:100:100:100:100:100:100:100]

and you should get the following off each GSW (for .40):

Bone: 1578
Meat: 6589
Brain: 542
Kidney: 542
Spleen: 271
Sweetbread: 271
Tripe: 542
Liver: 542
Intestines: 1626
Heart: 271
Lung: 1084
Eye: 26
Fat: 1423
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #73 on: July 20, 2014, 12:53:03 pm »

What Sutremaine said, and note that butchering returns are based on the RELSIZE of the organs, not the overall size of the creature.  Those trend with each other, but they are not the same thing.

You can see the difference by giving the forced-average-size giant sperm whale a great big set of horns without changing the body size.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

blue sam3

  • Bay Watcher
    • View Profile
Re: I can't kill a single Dwarf with 100 Whales
« Reply #74 on: July 20, 2014, 01:35:26 pm »

The strangest thing is that, in theory, all creatures spawned in the arena are average in size/stats. I don't think they vary. Still, some will be bugged, some won't. Totally random.
They can vary. I left 10 GSW to air-drown, and butchered the corpses.

Bone: 1339 - 1690
Meat: 5596 - 7048
Intestines: 1382 - 1740
Fat: 1209 - 1523

Those two extremes came off the same two animals.

Really? I thought they were same-sized because the status screen always says "Average-sized".
Still doesn't explain why not all GSWs get bugged, unfortunately.

Is there any way something like DFHack or some other external program figure out the finer details of these creatures?

I think that what we've stumbled upon here is either a buggy feature or just a straight up bug, I believe that what it could potentially be is this:
Average size just means it averages around the given weight, so when a creature is spawned in it has a percentage of it's weight given or taken (e.g. 5%), or maybe a multiplier is applied (so that way there is natural variety in the starting creatures in a world). If it this is the case it'd explain why some GSW are buggy and other aren't, so some of them just about go over the weight overflow. However, what changes things is if weight and butchering returns are linked, because while the different returns given are fairly similar from what Sutremaine's stats show (apart from the meat, which is vastly different in comparison to the 1500-ish difference in the meat returns) then none of the whales could have been an overflowing weight, otherwise you'd get really small returns.

As an aside, if this percentage/multiplier is applied (and actually exists) to the GSW, maybe it does it twice, one for the SW and then, because they both have a size tag, it does it again for the GSW.

If DFHack (or something) can read into the weights more and figure out if these creatures really do have identical values then we can safely say that it's a bug. Also, if the meat returns aren't intentionally randomized, and not connected to weight (which is a bit easier to prove if we can determine that these creatures are the same weight) then it's very likely that while trying to clarify 1 bug we've discovered another one :P

(I hope I made any sense here, I'm not 100% sure that I did :S)


It's also possible that it isn't the weight that's overflowing, but something else. Maybe momentum or kinetic energy or something?
Logged
Pages: 1 ... 3 4 [5] 6