Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Make everything bigger but less dense  (Read 3457 times)

WindComeCalling

  • Bay Watcher
    • View Profile
Make everything bigger but less dense
« on: June 27, 2021, 07:04:47 pm »

Weight in DF is weird. I went over https://dwarffortresswiki.org/index.php/DF2014:Weight and noticed that the weight of everything is multiplied by 10 from its intuitive value (density * volume). Almost everything is about ten times as dense as you’d expect, with a few exceptions like weapons (7kg = 800ml of axe * 7.85 kg/litre, not 800ml of axe * 78.5 kg/litre).

I thought about this in the back of my head and realized that this is why falling objects are so incredibly dangerous: an ordinary piece of pig tail cloth is denser than real world lead when you multiply its density by 10 (1.52 g/cm^3 of plant fiber * DF factor of 10 > 11.34 g/cm^3 of real world lead). Even a seed (density 0.6 g/cm^3) is more than twice as dense as most stones (2.67 g/cm^3) when you multiply its density by 10. When you drop seeds and cloth on your dwarves, you're actually dropping stone and lead bullets on their heads.

But since everything in this game doesn't seem to be about ten times as heavy as it should be, I did some more digging. When I went over the size of objects, I noticed that they seem to be too small by a factor of 10. If you multiply each one by 10, you get a reasonable value: a statue is 60 litres, or the size of a dwarf, instead of being the size of 3 two-litre soda bottles. A chest is 20 litres instead of being the size of a two-litre soda bottle. A stone boulder is 100 litres, which means a wheelbarrow can fit one of those things instead of ten and a minecart five of those things instead of fifty. An anvil is now 10 litres instead of being half the size of a two-litre soda bottle. A drink is now a two-litre soda bottle’s worth of liquid instead of being less than a cup. Stuff like that.

In other words, as far as I can tell, DF includes two weird factor of 10 discrepancies that cancel out. Everything is ten times as small as it should be (except weapons and perhaps a few other exceptions), but everything is ten times as dense as it should be (again except weapons), so upon first inspection everything looks fine. But behind the scenes everything is ten times as dense as it should be, which makes cloth denser than real-world lead and seeds deadlier than real-world bullets. To fix that, you just reverse the changes: multiply the size of almost everything by 10 and remove the hidden factor of 10 multiplier on density when calculating weight.

TL;DR: Make everything bigger but less dense.
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #1 on: June 27, 2021, 08:22:27 pm »

This explains a lot about dwarven behavior…
Logged
Really hoping somebody puts this in their signature.

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #2 on: June 27, 2021, 09:12:12 pm »

On second thought, this sound like it warrants a bug report.
Logged
Really hoping somebody puts this in their signature.

WindComeCalling

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #3 on: June 27, 2021, 10:41:17 pm »

On second thought, this sound like it warrants a bug report.
Done: https://www.bay12games.com/dwarves/mantisbt/view.php?id=11772 (0011772: (Almost) Everything is 10 times as dense as it should be).
Logged

DwarfStar

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #4 on: June 27, 2021, 10:42:15 pm »

I believe volume in DF is measured in 1/10ths a liter, according to this formula on that page.

Weight (in Γ) = Density (in kg/m3) * Volume*10 (in cm3) / 1,000,000 (cm3/m3)

That's a fairly normal thing to do when representing something as an integer, so you can at least get a resolution down to 0.1. Does that explain the discrepancy?

I'm not sure what you mean by the size of objects, though...that link goes to the same page.
Logged

WindComeCalling

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #5 on: June 27, 2021, 10:53:25 pm »

I believe volume in DF is measured in 1/10ths a liter, according to this formula on that page.

Weight (in Γ) = Density (in kg/m3) * Volume*10 (in cm3) / 1,000,000 (cm3/m3)

That's a fairly normal thing to do when representing something as an integer, so you can at least get a resolution down to 0.1. Does that explain the discrepancy?

I'm not sure what you mean by the size of objects, though...that link goes to the same page.

That's possible, but it doesn't explain why falling seeds and socks are so lethal. If their density is secretly off rather than everything working as intended, that would explain the falling objects lethality bug. Also, we already know that sizes in DF are measured in cm^3 instead of 10 cm^3, and I don't think Toady spontaneously switched from measuring sizes in cm^3 for creatures to measuring size in 10cm^3 for objects. (Also, it's 1/100ths of a litre to reach 10cm^3 instead of 1/10th of a litre, but that's a minor quibble that has no bearing on anything.)
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #6 on: June 28, 2021, 05:54:37 am »

Quote
  • Im unsure on the particulars, but i hope Toady can take some time to look at this, and get back to you with a reply. Because there's not a awful lot players can do from raw-modding as far as im aware to try and justify some of the propositions

However taking boulders particularly then making them bigger like proposed will likely skew resource accessibility a lot, if the amounts dont shift to change because of how the reactions are coded to take the quantity of a object and make as much as they can out of it or fixed amounts.

Already you can have too little of a thing, like creatures that are too itsy-bitsy small to make a sheet of leather or more than a single chunk of meat, and im sure the arguement works the other way too when you have enormous boulders you'll probably make significantly more blocks from it than the 3 you would recieve normally irregardless of weight, then how that applies into game balancing that you have a metric tonne of blocks and stone still lying around and needing to upsize item-lag-capacity for that.

Even other unconventional stuff like catapults math and whether this creates a even worse glut of materials for smelting exploits and bringing raw-ore on embark, unless all stone and ores are made more expensive or there are ways to bipartition some of the biggest materials. Same goes for the 1 use log, whether they could actually stretch to 2 beds each in reality.
« Last Edit: June 28, 2021, 06:04:40 am by FantasticDorf »
Logged

WindComeCalling

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #7 on: June 28, 2021, 06:56:07 pm »

Quote
  • Im unsure on the particulars, but i hope Toady can take some time to look at this, and get back to you with a reply. Because there's not a awful lot players can do from raw-modding as far as im aware to try and justify some of the propositions

However taking boulders particularly then making them bigger like proposed will likely skew resource accessibility a lot, if the amounts dont shift to change because of how the reactions are coded to take the quantity of a object and make as much as they can out of it or fixed amounts.

Already you can have too little of a thing, like creatures that are too itsy-bitsy small to make a sheet of leather or more than a single chunk of meat, and im sure the arguement works the other way too when you have enormous boulders you'll probably make significantly more blocks from it than the 3 you would recieve normally irregardless of weight, then how that applies into game balancing that you have a metric tonne of blocks and stone still lying around and needing to upsize item-lag-capacity for that...

The easiest fix for that is to make every reaction take 10 times as much material, since the outputted items are now ten times as large. It'd take a lot of manual editing of the RAWs, but this is something that Toady could farm out to the community so he doesn't have to do a lot of tedious manual labour himself. (Edit: This is incorrect, see Putnam's response below.)

I think there would be a lot of enthusiasm to get this change into the game once people realize it'll make gravity-chute transport viable and really speed up the hauling of low-density items. Imagine being able to safely use a trash chute to send leather and cloth from your trade depot to your fortress within moments, for example - I'm sure there'd be a lot of volunteers for adding something like that to the game.

Hauling and transport might honestly be in a better place after this change than before - minecart and wheelbarrow capacities can just be multiplied by 10 so they carry the same number of items as before, stuff can now be safely transported by gravity chute, and there are no downsides beyond losing the falling objects trap. And you could keep the falling objects trap if you use high-density items made out of gold and platinum, like a falling objects trap should probably require - it's always been a little bit goofy, mangling goblins with random seeds instead of proper dwarven gold.
« Last Edit: June 29, 2021, 05:16:39 am by WindComeCalling »
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #8 on: June 28, 2021, 07:05:51 pm »

And you could keep the falling objects trap if you use high-density items made out of gold and platinum, like a falling objects trap should probably require - it's always been a little bit goofy, mangling goblins with random seeds instead of proper dwarven gold.

Well maybe not even much change, simply increasing the height of the drop would create more velocity that would more thoroughly mush a creature with its large contact-area radius, same being said earlier for catapults which only need economic use-disabled stones moved into the correct stockpile as selective ammunition.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Make everything bigger but less dense
« Reply #9 on: June 29, 2021, 03:20:52 am »

Reactions don't take size into account at all, so this is a moot point. Every reaction was hardcoded to have quadruple output on 0.34.08's release. Boulders have no dimension, unlike bars, so making them bigger or smaller won't have any effect on reactions.

To elaborate:

the reactions are coded to take the quantity of a object and make as much as they can out of it or fixed amounts.

This is an unequivocally false statement. Reactions work only based on dimension, which is 1-per-item for the vast majority of items, not taking into account volume or density in any way. Melting is based on item size, but smelting is not related to melting in any respect. Smelting itself is hardcoded to give x*6 metal bars, for [METAL_ORE:x]; metal bars are one of the few dimension'd objects, so "150 metal bars" in this math shows up in-game as one "metal bar". Before 0.34.08, smelting made x*1.5 instead of x*6.
« Last Edit: June 29, 2021, 03:26:51 am by Putnam »
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #10 on: June 29, 2021, 05:12:02 am »

Reactions don't take size into account at all, so this is a moot point. Every reaction was hardcoded to have quadruple output on 0.34.08's release. Boulders have no dimension, unlike bars, so making them bigger or smaller won't have any effect on reactions.

To elaborate:

the reactions are coded to take the quantity of a object and make as much as they can out of it or fixed amounts.

This is an unequivocally false statement. Reactions work only based on dimension, which is 1-per-item for the vast majority of items, not taking into account volume or density in any way. Melting is based on item size, but smelting is not related to melting in any respect. Smelting itself is hardcoded to give x*6 metal bars, for [METAL_ORE:x]; metal bars are one of the few dimension'd objects, so "150 metal bars" in this math shows up in-game as one "metal bar". Before 0.34.08, smelting made x*1.5 instead of x*6.

You are correct that most of them are hardcoded, you can make a vast quantity of a object out of a single reagent by just defining it in the reaction raws to cheat it out, but it does when there's not enough material to actually make enough of the product, regarding materials like bones (teeth are often variable and too small) and corpses for butchering having wildly varying amounts based on the Cm3 of the creature in question, creating 1:1 when that is met to the specifications.

Whatever fits in a minecart is a dimension to the power of its tool-token capacity Boulders only have 1 size (of 100,000 given minecart capacity), so they do have a technical fixed dimension and they do have a fixed contact area in their usage of catapults. A million or more square units of boulder with @WindComeCalling's new math is obviously a handful with minecarts as it is, per loose tile and way too much to what the game was made for without moving things proportionally like minecart capacity to five million, to fit in 5 boulders once again everything would have to follow that gradient and need to be balanced by toady again.

Fair enough on the metal ore equation.
Logged

WindComeCalling

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #11 on: June 29, 2021, 05:24:04 am »



Whatever fits in a minecart is a dimension to the power of its tool-token capacity Boulders only have 1 size (of 100,000 given minecart capacity), so they do have a technical fixed dimension and they do have a fixed contact area in their usage of catapults.

Actually, boulders are of size 10 000 currently, and would be size 100 000 after this proposed change. Furthermore, I believe boulders do have a DIMENSION like quantity that is set to 1 per boulder regardless of its size, given that an entire boulder of cassiterite is consumed per tin-glazing reaction compared to the 1/150th of a bar of ash that is consumed per ash-glazing reaction. This is because both reactions call for 1 unit of their respective input materials, and stone boulders have a dimension of 1 while all bars have a dimension of 150. So size and dimension are separate, if I understand things correctly. Changing one doesn't affect the other.

The thing about making catapults even more useless however, is a valid concern. On the other hand, catapults are already so useless this isn't a great loss. I'd be comfortable sacrificing what little power they have for the sake of allowing safe gravity-powered transport from my trade depots to my fortress.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Make everything bigger but less dense
« Reply #12 on: June 30, 2021, 08:57:25 am »

You are correct that most of them are hardcoded, you can make a vast quantity of a object out of a single reagent by just defining it in the reaction raws to cheat it out, but it does when there's not enough material to actually make enough of the product, regarding materials like bones (teeth are often variable and too small) and corpses for butchering having wildly varying amounts based on the Cm3 of the creature in question, creating 1:1 when that is met to the specifications.

Butchering is also not a reaction

Salmeuk

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #13 on: July 01, 2021, 03:28:08 am »

Gravity chutes are completely feasible constructions in the current versions. Though it is a batch system, with access locked during dumping. This works fine for bulk production, and trade logistics. . . but I agree it would be nice to have a stupid easy method as well.

I imagine Tarn leaves in things like hyper-destructive fluffy wamblers just for the fun of it, or rather, chalks them up for fixing at a later moment while fully understanding the joy it creates. That being said, are fluffy wamblers still at all an effective throwing item? I'm no adventurer.
Logged

leastannoyingman

  • Bay Watcher
    • View Profile
Re: Make everything bigger but less dense
« Reply #14 on: July 05, 2021, 06:46:18 am »

Very strange and intriguing topic... should someone just ask Toady about this in Future of the Fortress?
Logged