Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: BODY_SIZE limits  (Read 2517 times)

Wimopy

  • Bay Watcher
    • View Profile
BODY_SIZE limits
« on: June 15, 2014, 09:05:26 am »

So, I'm currently working on adding the Jhen Mohran from Monster Hunter to Dwarf Fortress. Obviously, the thing has to be gigantic AND killable (at least by extremely well-equipped and trained people.
Now, here's the problem: I've found that after a specific body size, the most one can do is "fracture" the scales. Now, I was thinking I made an error in the code, but the Raviente that's already in the code and nearly 10x larger only receives "tears" to its skin.
I've checked and this is also true of Giant Sperm Whales. It seems that only piercing attacks can do damage (i.e. I've only damaged the Jhen Mohran with stab attacks).

Does anyone know how I can keep the enormous size of the monsters but also make them killable? My tests were with adamantine swords, other weapons did even less.
Bronze Colossi couldn't land meaningful hits, the best case scenario was that they would make the monster faint for whatever reason.

   [BODY_SIZE:0:0:140000]
   [BODY_SIZE:2:0:1400000000]
This is the size for the Jhen Mohran. I made some calculations and in fact the number is not even near the true size based on data found on the monster's length (it should be 35 billion...)

Also, is this a deliberate effect? I mean, I can understand that at this size tissues are way too thick to damage (comes up with Giant Sperm Whales too), but the messages seems strange. I've had attacks pass through and the Jhen had no weight as well, but that was probably a fault on my part.

My raws, as it's my first creature, there may be errors contributing to the whole thing:
Spoiler: Creature Raws (click to show/hide)
Spoiler: Tissue Template (click to show/hide)
Spoiler: Body (click to show/hide)

Oh, and as a quick connection to the title, has any found where body_size turns from an advantage into playing in a totally different dimension (and potentially screwing the game, as even 1v1 the Jhen Mohrans tend to have problems from time to time).
« Last Edit: June 15, 2014, 09:19:59 am by Wimopy »
Logged
Now updating the Monster Hunter Universe mod
Current Version: 0.4.95b - Updated June 17, 2015
New Thread
Download
Old Thread

jaxy15

  • Bay Watcher
  • Adept Modder
    • View Profile
Re: BODY_SIZE limits
« Reply #1 on: June 15, 2014, 09:23:38 am »

I think you made him a little bit TOO big. There is no way Jhen is 560 times the size of a regular sperm whale.
Logged
Dwarf Fortress: Threats of metabolism.

Wimopy

  • Bay Watcher
    • View Profile
Re: BODY_SIZE limits
« Reply #2 on: June 15, 2014, 09:28:10 am »

I made it a bit larger than the Lao-Shan Lung that was already in the game. (Okay, 40% larger, because it seems way fatter)
And that thing is 111m long according to the wikia. Depending on how you judge its average height and width, it will likely still be more than what I made it in game...
Logged
Now updating the Monster Hunter Universe mod
Current Version: 0.4.95b - Updated June 17, 2015
New Thread
Download
Old Thread

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: BODY_SIZE limits
« Reply #3 on: June 15, 2014, 11:44:12 am »

1. This thread (that I made) will probably be helpful to you: http://www.bay12forums.com/smf/index.php?topic=131995.0
Near the end of the thread I have made several posts with a combat calculator. The most recent is http://www.bay12forums.com/smf/index.php?topic=131995.msg5220442#msg5220442 . But, you probably need to read the thread to understand the results provided.

2. Your BODY_SIZE is too large. Please note that size values in game data are 1/10 of that in the raws:
Code: [Select]
100000000 <=actual maximum size due to size cap at RAW-reading time (100,000,000)
2147483648 <= maximum storage capacity of signed memory (2,147,483,648)
20000000 <= average size of the GSW in-game (20,000,000) but it gets its size from CHANGE_BODY_SIZE_PERC
It IS possible (proven via testing) to wrap around your creature size to a negative number using CHANGE_BODY_SIZE_PERC to get a size larger than 2147483648, which gets automatically increased to the minimum size of 1.

Wimopy

  • Bay Watcher
    • View Profile
Re: BODY_SIZE limits
« Reply #4 on: June 15, 2014, 12:09:23 pm »

Mhm, I thought it was something like that. I'll either have to resize the largest monsters (seeing as the Raviente has one digit more than the Jhen Mohran, which is crazy) or remove them entirely. I'll probably go with making them smaller, but giving them attacks and natural defence that sort-of offsets it.

I'll refrain from adding creatures the size of smaller islands in the future, I guess.
Still, I'm proud I managed to get the rock-launching to work flawlessly and the creature actually works when sized down.

EDIT:Okay, they can be killed now with A LOT of luck, legendary skills and good equipment, but that's okay.
Thank you for the help.

EDIT2: In actuality, it seems that even though the game only says "fracturing the scale" attacks DO cause wounds as normal (even though they aren't deep enough to instakill or hit the spine or such). I'm guessing I should post this as a bug after searching.
Also need to research it a bit more before saying it for sure.
« Last Edit: June 16, 2014, 02:27:26 am by Wimopy »
Logged
Now updating the Monster Hunter Universe mod
Current Version: 0.4.95b - Updated June 17, 2015
New Thread
Download
Old Thread

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: BODY_SIZE limits
« Reply #5 on: June 16, 2014, 03:07:07 pm »

If you'd like to make the skin thinner, you can increase the relative thickness of the innermost tissue layer.  That will make it slightly less impossible to get past scratching the surface.  However, I think you need to penetrate all of the tissues to get at internal organs, so it won't affect strikes to the heart, etc.
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

Wimopy

  • Bay Watcher
    • View Profile
Re: BODY_SIZE limits
« Reply #6 on: June 17, 2014, 07:41:43 am »

If you'd like to make the skin thinner, you can increase the relative thickness of the innermost tissue layer.  That will make it slightly less impossible to get past scratching the surface.  However, I think you need to penetrate all of the tissues to get at internal organs, so it won't affect strikes to the heart, etc.

Yes, I already thought of that. However, even thought I've only gotten "...fracturing the scale" messages, I've had "Jhen Mohran looks sick" also appear, with a lot of heavy bleeding. Of course, I've yet to see an attack actually hit the brain, but that's fine. Long, gruelling fights against these enemies catches the atmosphere of the original game perfectly.
Logged
Now updating the Monster Hunter Universe mod
Current Version: 0.4.95b - Updated June 17, 2015
New Thread
Download
Old Thread

Roses

  • Bay Watcher
    • View Profile
Re: BODY_SIZE limits
« Reply #7 on: August 06, 2014, 04:28:27 pm »

1. This thread (that I made) will probably be helpful to you: http://www.bay12forums.com/smf/index.php?topic=131995.0
Near the end of the thread I have made several posts with a combat calculator. The most recent is http://www.bay12forums.com/smf/index.php?topic=131995.msg5220442#msg5220442 . But, you probably need to read the thread to understand the results provided.

2. Your BODY_SIZE is too large. Please note that size values in game data are 1/10 of that in the raws:
Code: [Select]
100000000 <=actual maximum size due to size cap at RAW-reading time (100,000,000)
2147483648 <= maximum storage capacity of signed memory (2,147,483,648)
20000000 <= average size of the GSW in-game (20,000,000) but it gets its size from CHANGE_BODY_SIZE_PERC
It IS possible (proven via testing) to wrap around your creature size to a negative number using CHANGE_BODY_SIZE_PERC to get a size larger than 2147483648, which gets automatically increased to the minimum size of 1.

Does this mean that all creatures which have a raw size larger than 100,000,000 are decreased in size to 100,000,000? What if you then use a CHANGE_BODY_SIZE_PERC to get above that number? Will the new cap be the signed memory storage capacity?
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: BODY_SIZE limits
« Reply #8 on: August 06, 2014, 04:30:37 pm »

From my experience, if the body size is over the limit, the attacks against that creatures start to "pass through".
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Roses

  • Bay Watcher
    • View Profile
Re: BODY_SIZE limits
« Reply #9 on: August 06, 2014, 09:19:37 pm »

Yes, I've seen that before, but I also thought it was if you went over the 2,147,483,648 number, didn't realize it happens as low as 100,000,000
Logged

Roses

  • Bay Watcher
    • View Profile
Re: BODY_SIZE limits
« Reply #10 on: August 07, 2014, 03:35:17 pm »

So doing a little testing on body sizes with DFHack

Raw Value*Change Perc -> Game Value
100,000,000*1 -> 10,000,000
200,000,000*1 -> 20,000,000
220,000,000*1 -> 22,000,000
230,000,000*1 -> 1
300,000,000*1 -> 1
100,000,000*2 -> 20,000,000
200,000,000*2 -> 1
300,000,000*3 -> 4,100,654
1,000,000,000*.1 -> 10,000,000
2,000,000,000*1 -> 14,100,654

For these tests I removed the BODY_APPEARANCE_MODIFIER tokens since it was possible to have a creature with 200,000,000*1 -> 1.

Now something that is interesting, these caps seem to be put in place at the time of the raw reading. I was able to change a creature size with DFHack to much higher numbers (didn't go higher than 2,147,483,648) without getting a round over to 1 or the "attack passes through" message. The first thing I noticed is that the butchering results go up, so that was sign of success.

My next test involved pitting one huge dwarf (multiplied in game size by 10,000) against 10 normal dwarves. The huge dwarf started by punching a couple of the normal dwarves and propelling them back about 10 spaces. He quickly finished off about half of them but then because exhausted and over-exerted. Passing out several times. But the normal dwarves were only able to break his fingers and toes, bruise his fat, and dent him. Eventually he recovered enough to finish off the remaining dwarves.

Next, the same huge dwarf (full of bruises and broken fingers) went up against 5 cyclops. He quickly dispatched all five, knocking two of them several tiles and causing them to die by colliding with a wall.

Finally the same dwarf was set up against a bronze colossus, that fight was going on for about 10 minutes until the dwarf eventually bleed to death.

More testing should be done if sizes above the "raw cap" actually have a major effect on combat or not. They definitely have an effect on butchering products.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: BODY_SIZE limits
« Reply #11 on: August 12, 2014, 05:06:39 pm »

After doing some more testing with DFHack I have created a script + interaction system that allows you to change a creatures size in game, which (theoretically) opens up a much broader range of sizes available to creatures, for my tests I have this in my raws
Code: [Select]
[BODY_SIZE:0:0:70000]
[APPLY_CREATURE_VARIATION:INCREASE_SIZE_10]
Which increases the creatures in-game size by x10 (through an interaction). Now the issue comes with creatures growing, and I haven't done enough testing to know if this will cause any problems in mature forts, but, for now, it appears that as soon as the creature appears on the map it will increase in size to the specified amount. Unfortunately this doesn't effect worldgen.

I will continue to do more testing before posting anything, but I find it strange that we are limited to sizes of 1-220000000, and that size appears to be an integer, so in game, a creature with a raw size of 1 is the same as a creature of raw size 10. Meaning we are really limited to 10-220000000. It wouldn't be as much of a deal if size wasn't so important in combat.
Logged