Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Token proposals: Interactions exhausting bodily resources & Thermal conductivity  (Read 1073 times)

Tomsod

  • Bay Watcher
    • View Profile

These two ideas brewed up in my head for a while now, and I feel prepared to spill the beans.

1. Certain interactions should require limited internal resources

It always stroke me as unrealistic that one can milk GCS for endless bins of silk without any break for poor arachnid (including lunch breaks). Naturally, the protein in its webbing glands should run dry after a while! That is what I propose.

We can already declare arbitrary materials as depletable:
[WEBBER:LOCAL_CREATURE_MAT:SILK]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID]
[MILKABLE:LOCAL_CREATURE_MAT:MILK:20000]
The last one even specifies the recovery time. We just need to generalize this syntax:
[EXPENDABLE:WEB:LOCAL_CREATURE_MAT:SILK:12000:ENERGY_REQUIRED:1000]
[EXPENDABLE:BLOOD:LOCAL_CREATURE_MAT:BLOOD:10000:250]
[EXPENDABLE:MILK:LOCAL_CREATURE_MAT:MILK:10000:ENERGY_REQUIRED:500]

The arguments are NAME:MATERIAL:STORAGE_CAPACITY:REPLENISH_SPEED. NAME could be WEB, MILK, WOOL, BLOOD or any arbitrary value. STORAGE_CAPACITY could be a number or INFINITE. REPLENISH_SPEED could be (1) just a number, or (2) ENERGY_REQUIRED:number, or (3) STRUCTURAL:<tissue layer>, or (4) NONE. Which would respectively denote that the resource (1) gradually restores over time, (2) restores only provided the creature is healthy and fed, (3) actually represents condition of <tissue layer> and heals accordingly, or (4) is not replenished naturally. The latter implies some external means to affect material dimensions, like via syndromes. (Yes, it is obvious modding fuel.)
This syntax cannot directly specify blood state, but it's probably redundant anyway.

We then need to denote the material as depleted during the interaction:
[CDI:EXPENDED:WEB:25:30]
Thus, when the spider is all out of silk, it'll have to pass. It still does have its venomous bite, though; but while we're at it we could as well limit that too!
[EXPENDABLE:VENOM:LOCAL_CREATURE_MAT:POISON:2000:ENERGY_REQUIRED:2000]
[ATTACK:STING:BODYPART:BY_CATEGORY:MOUTH]
      [SPECIALATTACK_INJECT_EXTRACT:VENOM:100:100]

Note that VENOM is just an arbitrary identifier, it doesn't really mean anything here. The ones that do matter are: WEB, MILK, BLOOD, WOOL. WEB is also used to create cobwebs, MILK is depleted in hard-coded milking reaction, BLOOD gushes out of wounds, and WOOL can be sheared. The last one I shall detail.
Because wool is obviously begging to fit into the nascent system. Unfortunately it is currently described as a tissue layer property; but that's what STRUCTURAL is for:
[EXPENDABLE:WOOL:LOCAL_CREATURE_MAT:HAIR:INFINITE:STRUCTURAL:BY_CATEGORY:ALL:HAIR]
It is somewhat different from the status quo to describe lack of wool in sheep as 'wounds' to their coats, although it does make sense for me! The coat will probably require some additional tags to be described as "shaven" instead of "pulped"/"bruised"/whatever, and it should be explicitly allowed to overgrow, still I'd say it does simplify things overall.

Overall, this scheme is intended to generalize and improve realism of existing reactions, as well as facilitate the addition of new ones. This will be especially bountiful to modders, who could model both Vancian and mana-based spellcasting systems via this.

2. Modeling thermal conductivity in materials

This one sprung to my mind in late asbestos thread. Since, while such a material could be mostly described using current raws, it's imposible to realistically model its resistance to prolonged heat exposure. Neither, actually, could one model simple winter coats! While they could be set up to have big [SPEC_HEAT], eventually winter air will freeze the coat anyway, and then coat will freeze the dwarf with all its accumulated negative energy. Even fleeing indoors technically won't help at that point.

What we really need is to model a material that separates two differently heated objects, while preventing energy exchange beetween them. The idea is that items from materials from non-zero [THERMAL_RESISTIVITY] would internally have two different temperatures. The higher one would be used when interacting with objects hotter than itself, the colder one otherwise. The two would gradually gravitate towards each other with the speed inversely dependent on the token value.

Thus, dwarf in a fur coat won't feel cold because the coat is warm to him, while the coat won't freeze since it's already cold enough to the outside air. That is basically how it works in reality, so, good enough.

The [MAT_FIXED_TEMP] token could also make use of this mechanism by basically implying infinite [THERMAL_RESISTIVITY] with semi-temperatures instead slowly returning to the specified value when the object is left to itself. The implied ability of a single nether-cap log to freeze any amount of, say, boiling steel, slightly unnerves me. The fact that dwarves can burn the thing and it dissolves in magma signifies that it should still be affected by heat to some extent, so we need to model that. The above is one way to do that.

I also feel obliged to clarify about interacting with objects whose temperature (M) lies in between semi-temperatures (H and L) of the protective layer. I imagine they will affect both of them, although with greatly diminished power: about (|(H+L)/2 - M| : (H+L)/2)*(H-M)/(M-L) for the higher one and the opposite for the lower. Not sure how well does linear approximation emulate real physics here, but it's probably precise enough for our purposes.
Logged

taptap

  • Bay Watcher
    • View Profile

"The two would gradually gravitate towards each other with the speed inversely dependent on the token value."

Scotsman in summer spending too much time outdoors -> death by low body temperature?

You need to have bodies generate heat if you want to model anything at all. Many people live constantly in an environment far below a survivable body temperature without freezing to death, your model wouldn't accomodate that. Dwarves would freeze to death even in temperate environments.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile

"The two would gradually gravitate towards each other with the speed inversely dependent on the token value."

Scotsman in summer spending too much time outdoors -> death by low body temperature?

You need to have bodies generate heat if you want to model anything at all. Many people live constantly in an environment far below a survivable body temperature without freezing to death, your model wouldn't accomodate that. Dwarves would freeze to death even in temperate environments.
DF is a really detailed simulation for the things that Toady has gotten around to addressing.  There is already a HOMEOTHERM property for creatures, and tissue layers already have insulation values.  In fact, there was a performance issue in a previous version dealing with calculating the change in air temperature around a warm-blooded Dwarf as the thickness of his fat changed during a meal!

It might be easier to treat clothing as pseudo-tissue-layers, calculating an insulation value from the specific heat which could be overridden with an explicit insulation value if desired.
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

Khym Chanur

  • Bay Watcher
    • View Profile

There should be a way to let certain interactions or successful attacks replenish the resource, so you could mod something like an undead replenishing energy via absorbing life-force from a victim.  And along the same lines, have being the one responsible for a death replenish the resource (landing a killing blow, or death through a syndrome).
Logged

GavJ

  • Bay Watcher
    • View Profile

Quote
Thus, dwarf in a fur coat won't feel cold because the coat is warm to him, while the coat won't freeze since it's already cold enough to the outside air. That is basically how it works in reality, so, good enough.
No not really... a winter coat WILL freeze and it definitely does not work in real life by having "two different internal temperatures" or whatever, nor does it warm you by being warmer than you. You warm yourself, the coat just stops you losing your own heat to the outside as quickly. In other words, a winter coat would be almost useless for a cold blooded reptile.

Yes, DF is missing a thermal conductivity parameter, so you couldn't do asbestos very well. But it's just one number that would be slotted into the thermal equation as a multiplier for heat transferred, that's all it is. Each material has one temperature and conducts based on temperature differentials. Conductivity determines how much heat transfers at a given differential per unit time. A lot or a little. But never zero, it only ever delays the heat flow.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.