Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Chemical interactions  (Read 1275 times)

kirby2099

  • Bay Watcher
  • test
    • View Profile
Chemical interactions
« on: August 05, 2017, 07:07:23 pm »

   I was thinking that it would be nice if modders could add chemical reactions between different materials and environmental factors resulting in explosions, nonlethal/small explosions, combustion, and production of one or more different materials in varying amounts. feel free to suggest environmental factors or possible results of mixing certain materials below*. Also in my opinion the different physical states(eg, liquid, solid, gas) should be able to have different chemical interactions completely seperate from thier other physical forms.

* eg fire, heat, moisture, air.
Logged
!!SCIENCE!! makes everything better, so next time there is fire remember !!fire!! is even better.

Hello, pest control what's your problem?
I have a cat infestation.
...
Hello? Pest control? hello?

Azerty

  • Bay Watcher
    • View Profile
Re: Chemical interactions
« Reply #1 on: August 06, 2017, 07:33:36 am »

   I was thinking that it would be nice if modders could add chemical reactions between different materials and environmental factors resulting in explosions, nonlethal/small explosions, combustion, and production of one or more different materials in varying amounts. feel free to suggest environmental factors or possible results of mixing certain materials below*. Also in my opinion the different physical states(eg, liquid, solid, gas) should be able to have different chemical interactions completely seperate from thier other physical forms.

* eg fire, heat, moisture, air.

It will provide an use to Alchemy skill.
Logged
"Just tell me about the bits with the forest-defending part, the sociopath part is pretty normal dwarf behavior."

kirby2099

  • Bay Watcher
  • test
    • View Profile
Re: Re: Chemical interactions
« Reply #2 on: August 06, 2017, 02:18:02 pm »

They have an alchemy skill!? :o
I had no Idea!
also perhaps alchamists will have to discover a chemical interaction and share this information before it can be used. Meaning that certain regions, empires, guilds, or even individuals can have exclusive access to chemical interactions giving them a combat or buisness advantage? For example a guild of alchemists might have knowledge of how to produce emeralds from clam shells eventually getting filthy rich off of emeralds and having multiple attempted assassinations.
You could even make it so extra chemical reactions are created in world-gen!

It would certainly add extra history during world gen!
Logged
!!SCIENCE!! makes everything better, so next time there is fire remember !!fire!! is even better.

Hello, pest control what's your problem?
I have a cat infestation.
...
Hello? Pest control? hello?

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Chemical interactions
« Reply #3 on: August 07, 2017, 04:28:15 pm »

This is, broadly speaking, planned, but has some serious problems.  As Toady has mentioned, if you make it possible for any random thing to create chemical reactions with any other random thing (including the floor), then you force the game to start checking every single object in the game for an interation with the materials of the map or the other objects in the tile every single tick, which would result in an instantly tanked FPS.  (As Toady put it, every single time a dwarf made a step, you'd have to check for whether their boots were made of something that would react with whatever the floor was made of.)

This is why the chemical reactions that exist within the game are limited to contaminants, which are relatively limited in how common they are (but in evil biomes where contaminants are everywhere, it's a major FPS bomb), and things that touch contaminants.  The functions for syndromes are basically the same as for any chemical interaction, so in a way, this in the game, already.

If you want to provide a suggestion that would actually advance the idea, you'd probably be better off coming up with ways to make this sanely checkable without significantly overloading the system.
« Last Edit: August 08, 2017, 01:53:45 am by NW_Kohaku »
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Chemical interactions
« Reply #4 on: August 09, 2017, 05:53:15 am »

This is, broadly speaking, planned, but has some serious problems.  As Toady has mentioned, if you make it possible for any random thing to create chemical reactions with any other random thing (including the floor), then you force the game to start checking every single object in the game for an interation with the materials of the map or the other objects in the tile every single tick, which would result in an instantly tanked FPS.  (As Toady put it, every single time a dwarf made a step, you'd have to check for whether their boots were made of something that would react with whatever the floor was made of.)
Generally speaking, we don't have to worry about solids reacting with solids. One of them needs to be dissolved first, which leads to contaminants or workshops.
Toady is already going to limit the number of flowing liquid types for the interaction concern. The rest have to remain contaminants.
Last are gases and smoke, which are currently handled like miasma. The performance is already pretty poor on these, but at least they dissipate.
« Last Edit: August 09, 2017, 05:57:01 am by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Azerty

  • Bay Watcher
    • View Profile
Re: Chemical interactions
« Reply #5 on: August 10, 2017, 04:11:40 am »

This is, broadly speaking, planned, but has some serious problems.  As Toady has mentioned, if you make it possible for any random thing to create chemical reactions with any other random thing (including the floor), then you force the game to start checking every single object in the game for an interation with the materials of the map or the other objects in the tile every single tick, which would result in an instantly tanked FPS.  (As Toady put it, every single time a dwarf made a step, you'd have to check for whether their boots were made of something that would react with whatever the floor was made of.)

This is why the chemical reactions that exist within the game are limited to contaminants, which are relatively limited in how common they are (but in evil biomes where contaminants are everywhere, it's a major FPS bomb), and things that touch contaminants.  The functions for syndromes are basically the same as for any chemical interaction, so in a way, this in the game, already.

If you want to provide a suggestion that would actually advance the idea, you'd probably be better off coming up with ways to make this sanely checkable without significantly overloading the system.

Should such reactions be limited to alchemy laboratories?
Logged
"Just tell me about the bits with the forest-defending part, the sociopath part is pretty normal dwarf behavior."

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Chemical interactions
« Reply #6 on: August 12, 2017, 12:05:28 am »

Should such reactions be limited to alchemy laboratories?

Those would be workshop reactions - those are already in the game.

Likewise, things like gasses or contaminants having syndromes that have chemical reaction-type effects are already in the game.

Flowing liquids are limited to water and magma as a data management concern.  The game can only handle exactly two types of actual flowing fluid at the moment, and it can't handle mixing of fluids at all (which is sidestepped by just making any tile where it would be a problem an obsidian wall, instead).

In short, without restructuring some of the data types in the game, there isn't really much you can ask for that you couldn't already get from modding.  You'd be better off asking for more flexible reaction types than general reactions to occur.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Chemical interactions
« Reply #7 on: August 12, 2017, 05:08:45 am »

I don't think contaminants can interact with each other.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

kirby2099

  • Bay Watcher
  • test
    • View Profile
Re: Chemical interactions
« Reply #8 on: August 14, 2017, 01:01:53 pm »

Oh sorry I didn't think of performance issues. No idea how you would get around that :(
Logged
!!SCIENCE!! makes everything better, so next time there is fire remember !!fire!! is even better.

Hello, pest control what's your problem?
I have a cat infestation.
...
Hello? Pest control? hello?

jamminmud

  • Escaped Lunatic
    • View Profile
Re: Chemical interactions
« Reply #9 on: August 18, 2017, 07:34:49 pm »

Well you figure there could be basic things that DONT affect every tile but only certain materials, something like wood buildings burning, additionally you could make certain reactions only occur once the site is loaded which could ultimately result in pretty comical interactions where a giant potassium tower gets rained on and explodes once you still up to it.
Logged