Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: Alchemical Material Property Tokens: Redesigning Reactions  (Read 20693 times)

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #30 on: March 14, 2012, 09:05:05 pm »

Perhaps we could write the master reaction types?

Eg.
Reaction: Dip
[Solid object] + [Liquid any][volume > multiplier x surface area] = [Solid object] + [Liquid any]
Conditions -
[Container] containing [Liquid any]
Interactions -
[Liquid any][Tag class: X] copies to [Solid object]
[Solid object][Tag class: Y] copies to [Liquid any]

Reaction: Leeching
[Liquid any] = [Liquid any]
Conditions -
[Container] containing [Liquid any]
Interactions -
[Liquid any][Tag class: X] copies to [Container]
[Container][Tag class: Y] copies to [Liquid any]

Reaction: Melt
[Solid object] = [Liquid = melted object]
Conditions -
Temperature > melting point
[Container] containing [nothing]
Interactions -
Check [Solid object][Tag class: Temperature sensitive]

Toady made it so only liquids can react outside of proper reactions in workshops for a reason - if you star introducing reactions that can occur between any possible combination of objects at any possible time, then you have to stop the game to check if a dwarf's boot will react with the floor he's walking on every time he/she takes a step. 

The advantage of keeping this to the workshops is that you only have to check for reactions when you are purposefully causing that reaction to take place.

Temperature is already a rather resource-intensive operation, and I don't think we actually need to have something like changing from solid to liquid become a full-fledged reaction when it's already a component of the material properties.
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

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #31 on: March 18, 2012, 02:50:11 pm »

Although I kept it rather short in the original post (because I have to constrain myself at least somewhat in these posts...), one of the things I really would like to see, especially in conjunction with a much greater variety of crops with more meaningful distinctions in their cultivation in general is the ability to differentiate types of food as more or less appetizing.  Especially when you have high-class residents in a fort, giant rat tripe should be something that is less appealing than a masterwork roast turkey menacing with spikes of bacon and rings of barbecue sauce.

Value alone can be helpful in measuring this, but having the ability to say "this is spicy food, and these dwarves love spicy food, but these don't" would be a great little feature that adds that little detail to the cooking and food preparation slice of the game, compared to just "we are a quarrey bush leaf and cooked dwarven wine fortress ONLY".  Hopefully, a well-fed fort might get to the point where the weasel tripe is fed only to the dogs (or other large carnivorous beasts).
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

tsen

  • Bay Watcher
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #32 on: March 18, 2012, 05:00:18 pm »

Fully agree. Also it would be interesting to perform some kind of calculation at world gen that looked at the flavors available in an area and assigned them to civ entities, then even if those entities moved around they would retain (to some extent) the original flavor preferences of their culture. They would then either move the plants with them in cultivation, or create demand for those spices/plants/flavors.  :D
Logged
...Unless your message is "drvn 2 hsptl 4 snak bite" or something, you seriously DO have the time to spell it out.

Sunday

  • Bay Watcher
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #33 on: April 04, 2012, 08:58:26 pm »

So, I really, really like this idea.

Furthermore, I think there are a few reasons why it might be worthwhile to implement it relatively soon.

Basically, I think it's important to note that this would tie in extremely well with the upcoming caravan arc.

As a preliminary matter, I'd like to say that—while I would like farming, for instance, to be a bit harder than it is in vanilla—I think that it shouldn't be TOO hard for dwarf fortresses to, without an insane amount of difficulty, get beyond subsistance level and be able to have multiple thriving industries. "Survival," while fun, shouldn't be the only goal in DF, IMO, especially as we get to the caravan and army arcs, where effecting the wider world should also be a goal.

However, if that is the case, having a hook into the wider world economy of the caravan arc is somewhat necessary.

In effect, this system or something like it is a solution to one of DF's biggest problems, at least as that problem manifests through the world economy. DF is amazing because it has a lot of extremely complicated interlocking systems. Its amazingness is potentially lessened a bit when the data is not really visible (or rather, where it doesn't really matter) to the player, however.

The interesting, exciting system in this case is the caravan arc/wider world economy/army arc and the wider effects on the world, none of which might concern most players if they can turtle up and build their little fortress in peace. The solution to this problem—and the way of making those effects material to the player—is giving incentives to the player to trade. Which is exactly what a system like this would do.

That way, the wider conditions in the world—(wars, famines, shortages of a given supply) have a direct effect on the player's goals. If the player needs a rare ice-plant from the norther reaches in order to forge a specific type of armor, but the only civilization with access to that plant is on the far side of a heated war between elves and goblins and the ice-kingdom's trade caravans can't get to the fortress, then a) the player may have to create bins of gold to buy a single plant, given its scarcity or b) it would give the player an incentive (after the army arc was implemented) to send an army escort around a trade caravan up north to trade with the ice-kingdom.

Anyway, I just think that—even beyond the crafting system, which would likely be entertaining in itself—this would have beneficial effects on gameplay.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #34 on: April 04, 2012, 09:44:45 pm »

So, I really, really like this idea.

-snip-

Well now, I feel like someone just showed up at my doorstep with chocolates and a bouquet of flowers... and it's not even the crappy kind of chocolate with the raspberry goop inside, or anything!

One of the things Toady has said, though, is that he kind of wants farming to be impossible for a large fortress, and that he'd expect us to have to trade for our food once the economics arc really starts up.  That's part of why I wanted the "simple for basic subsistence, but possible to make a really complex and optimized system that could produce surplus food if you really try" system, but the alchemical system takes it well beyond this, because it lets you make the food crops relatively simple to produce, but gives you a reason to have some really hard-to-grow materials that are out of reach of any but the most dedicated farmers, and these will, naturally, be the likely keys to some of the really special stuff that you can make, like having firebulbs that only grow when you constantly keep a field magma-irrigated while spreading special kinds of fertilizer, but which are a component in making an oil which, when used in blending your steel, lets you make perpetually flamming weapons (which don't burn their wielders). 

If that same fire sword recepie also requires some sort of goods you have to trade for, that's also part of the fun. 

The point is that it gives you a goal object: some sort of crazy complex "ultimate weapon" that you can design, but at the same time, provides multiple paths towards achieving it (are you going to go to the extreme lengths it might take to harvest your own, or are you going to go to the lengths it takes to set up trade relations good enough that they would be willing to grow and export some precious firebulb just for you?)
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

ravaught

  • Bay Watcher
  • Anybody seen mah beer?
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #35 on: April 04, 2012, 11:04:31 pm »

Nohaku,

There is way too much here for me to absorb at the moment due to that little absurdity I like to call real life, but, I did manage to get through your first section on Alchemy. I think you are making it too difficult. It seems like most of what you want to do could be accomplished through a few additions to the raw files. For example, if you want a random effect, have a tag set up for:

[RANDOM_PROPERTY_LIST:LIST_NAME:LIST_LENGTH:%CHANCE]

[LIST_NAME:NUMBER_OF_ENTRIES]
         [EFFECT_NAME]
         [EFFECT_NAME]

[EFFECT_NAME]
       [PROPERTY1]
The list name would pull from another raw file that contained an entry for the list, with a ordered list of effects. Effects would in turn be broken down in another raw file on a entry by entry basis. That way, it doesn't require so much in the way of hard coded changes, and it can still be modded by the players.
Logged
..because making sense and having FUN are not mutually exclusive.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #36 on: April 04, 2012, 11:09:58 pm »

Nohaku,

There is way too much here for me to absorb at the moment due to that little absurdity I like to call real life, but, I did manage to get through your first section on Alchemy. I think you are making it too difficult. It seems like most of what you want to do could be accomplished through a few additions to the raw files. For example, if you want a random effect, have a tag set up for:

[RANDOM_PROPERTY_LIST:LIST_NAME:LIST_LENGTH:%CHANCE]

[LIST_NAME:NUMBER_OF_ENTRIES]
         [EFFECT_NAME]
         [EFFECT_NAME]

[EFFECT_NAME]
       [PROPERTY1]
The list name would pull from another raw file that contained an entry for the list, with a ordered list of effects. Effects would in turn be broken down in another raw file on a entry by entry basis. That way, it doesn't require so much in the way of hard coded changes, and it can still be modded by the players.

That would miss most of the point of the idea, however.

The point is that there would be an extensible set of types of materials, and all types of materials could hypothetically be combinable with any other type of material. 

That is to say, the point is to free the system up from the confines of strict raw control over what can be achieved, and invert it into simply having raws be the things that set up limits on what can be achieved. 

It's like the difference between being on an island and having a trip in a train where you have to build a new train station just to have another choice for where to go, or having a car, and being able to go anywhere there isn't water or armed guards telling you to get off the premises.
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

ravaught

  • Bay Watcher
  • Anybody seen mah beer?
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #37 on: April 05, 2012, 11:42:42 am »

Spoiler (click to show/hide)
That would miss most of the point of the idea, however.
Spoiler (click to show/hide)

Unfortunately, the dichotemy can't really be maintained. You can not have a truly moddable game and a truly procedurally generated game at the same time. You can have a game that is procedurally generated based off moddable templates though, which is what I was suggesting. Aside from that, I see absolutely no benefit to hard coding it other than performance, and even that would only be affected at world gen.

If all of the tiles are generated, and their properties saved, at world gen, then how would hard coding these properties give any benefit over having them in the Raw files? Being able to combine the materials, any materials, could be hard coded, or coded as a set of reactions that allowed for non-specific regeants/effects.
Logged
..because making sense and having FUN are not mutually exclusive.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #38 on: April 05, 2012, 01:43:33 pm »

Unfortunately, the dichotemy can't really be maintained. You can not have a truly moddable game and a truly procedurally generated game at the same time. You can have a game that is procedurally generated based off moddable templates though, which is what I was suggesting. Aside from that, I see absolutely no benefit to hard coding it other than performance, and even that would only be affected at world gen.

If all of the tiles are generated, and their properties saved, at world gen, then how would hard coding these properties give any benefit over having them in the Raw files? Being able to combine the materials, any materials, could be hard coded, or coded as a set of reactions that allowed for non-specific regeants/effects.

The point is not the material properties themselves, but the fact that you can create an arbitrary number of new types of materials in-game. 

What I am saying is to replace material definitions with mix-and-matchable tokens that are partial "material definitions", so that when you alter the materials through reactions, the resulting new combinations of tokens will result in entirely new materials which have properties based upon the mix of property tokens contained within them.

If you are defining materials strictly in the raws, or strictly building a set of materials procedurally at worldgen, you only have those materials that are built - if you create "partial material definitions" out of property tokens, then combine them to make the materials, then you open up tremendous numbers of permutations of individual property combinations.
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

ravaught

  • Bay Watcher
  • Anybody seen mah beer?
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #39 on: April 05, 2012, 02:04:49 pm »

Quote
if you create "partial material definitions" out of property tokens, then combine them to make the materials, then you open up tremendous numbers of permutations of individual property combinations.

We are saying exactly the same thing. How those tags get combined would have to be hardcoded no matter what you do, because there will always be a need for some bit of code that directs the combination process. All I was suggesting was that the particular property tags not be hardcoded, and that there be a way of removing properties for the sake of keeping the sandbox quality of the game for people who want that. To make that possible, you create lists of properties that you want included in the game. Somewhere, some how, there has to be a list of possible makeup of the choices for these affects. I'm simply saying make those available in the RAWs


Logged
..because making sense and having FUN are not mutually exclusive.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #40 on: April 05, 2012, 02:55:06 pm »

Quote
if you create "partial material definitions" out of property tokens, then combine them to make the materials, then you open up tremendous numbers of permutations of individual property combinations.

We are saying exactly the same thing. How those tags get combined would have to be hardcoded no matter what you do, because there will always be a need for some bit of code that directs the combination process. All I was suggesting was that the particular property tags not be hardcoded, and that there be a way of removing properties for the sake of keeping the sandbox quality of the game for people who want that. To make that possible, you create lists of properties that you want included in the game. Somewhere, some how, there has to be a list of possible makeup of the choices for these affects. I'm simply saying make those available in the RAWs

If that's the case, then I was severely confused by what you were suggesting, as this looked like you were talking about adding random chances of specific properties into the materials themselves, not creating whole tokens. 

What, then, is the % chance for, to be included in the game at all?  That would be problematic when building the reaction webs, as we shouldn't be just excluding things based upon random chance alone, they should only be excluded when there's simply no path to them in the reaction webs.

Effects of properties would also still need to be hard-coded to be viable, in the same way that the game currently can't handle more than a few small types of syndrome and interaction.  You can't have a "shoots lightning" effect until lightning is part of the game.  However, as far as those can be put in the raws, they should be put into the raws, of course. 
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

ravaught

  • Bay Watcher
  • Anybody seen mah beer?
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #41 on: April 05, 2012, 03:34:50 pm »


The %chance is the chance that any effect at all from the applied list would be added to any item, not that a specific item would be added. This would allow for players to mod the frequency with which strange things happen. This would allow for these types of reactions to be broken down by category and then each category regulated as to how often it occurs. For example:
Spoiler (click to show/hide)

As far as your reaction webs are concerned, I do not think that every potential property should wind up on every map, every tile, or even in every world, hence the reason for the %chance. The way I am envisioning it, when the worldgen process runs, it has to generate each and every tile in the entire game world. If that is the case, or even if it only does this at embark, when creating tile it would run a check against the % to see if any affects from any of the list were being applied to that tile. Items that are generated on the fly, like plants, would do this check as they are instantiated. I can see two ways to do this. One would check each type of mat(hematite, olivine, etc) and apply the changes globally to each item of that type, the other would check each individual tile so you could have two pieces of hematite with dramatically different properties. For obvious reasons, I am not a big fan of the second method as it would involve entirely too much overhead at world gen. I think the first method, assigning at group of effects to each matt at world gen would work well, especially if there were a way to psuedo-randomly determine which effects carried over to child objects and how/why those affects might be lost. Even better would be if those objects had some effect on the game in their natural state that they player could unwittingly disrupt. Maybe the bamboo in this particular worldgen had a WARD_UNDEAD affect that only existed in its natural state that is lost when the player cuts it down.

Your web would somehow need to be in the hard coded portion of the process, as it would be defining how different combinations happen. I.E. what happens if you combine a +20 happiness item with a Poison item. What I am talking about has absolutely nothing to do with that aspect of it. Yes, all of the potential affects would need to be hard coded, such as poison, lightening, fire, etc. To the extent possible though, I would hope that they are coded in such a way that leaves lots of wiggle room for being able to mod them or combine them to produce new and interesting effects.








Logged
..because making sense and having FUN are not mutually exclusive.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #42 on: April 05, 2012, 04:34:51 pm »

I don't understand why you would want to structure it where you declare "list length"...  Certainly the game can figure that out by the number of items in the list, can't it? 

Why would you want to set chances for "generic effects" instead of setting the chances for each and every effect?

How can the game sort which ones are supposed to be on common items, and which ones are supposed to be rare and difficult to find properties if it just goes by category, for that matter?

You are also using terms that are not clearly defined - I don't know what you mean by "tile" here, for one, or what lists of tiles you are talking about.

Further, I have already said in the OP that the webs should be raw moddable, so I don't know why you keep insisting I'm arguing something else.

I tried to hold myself back from the dry technical details where I just outright tell people what the raws are going to look like because there are often technical restraints that are beyond most player's grasp, and Toady is capable of figuring these things out himself, but if you're going to organize this, it has to keep in mind what the goals of the system are, and that includes building the properties for the climb up the web. 
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

ravaught

  • Bay Watcher
  • Anybody seen mah beer?
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #43 on: April 06, 2012, 02:00:27 pm »

Quote
Why would you want to set chances for "generic effects" instead of setting the chances for each and every effect?

You could do it either way, really. I was looking at having the effects categorically separated for a couple of reasons. First, it would make it easier to tweek the ratio of effects that happened. Generic effects would be things that did not directly affect gameplay or had only extremely limited affects on gameplay, where as others might affect future combat or magic. This way, you could shut off the magic effects, without shutting off the combat affects, and without having to tweek each and every entry. There is actually no reason not to do both. That way, you could set rates for the category and for the individual effects within the category.

Quote
How can the game sort which ones are supposed to be on common items, and which ones are supposed to be rare and difficult to find properties if it just goes by category, for that matter?

That would be a matter of implementation. Ideally, it would be tag based so that it could be structured and set up in the raw files. For example, Magic could be disallowed on common quality items, but allowed on Mastercrafted and Artifact, similar to the way entities are able to allow/disallow reactions/jobs/workshops/etc.

Quote
You are also using terms that are not clearly defined - I don't know what you mean by "tile" here, for one, or what lists of tiles you are talking about.

A tile is one space of the map, a 1x1x1 area of the world. I thought that was pretty much standard lingo for the number of times I have seen it used, even by you. Although, I am not certain what you are referring to a 'list of tiles'. The lists I have been talking about are the lists of properties/effects for your alchemy set up, and the tiles are space in the game.

Quote
Further, I have already said in the OP that the webs should be raw moddable, so I don't know why you keep insisting I'm arguing something else.

Because of statements like: "That is to say, the point is to free the system up from the confines of strict raw control over what can be achieved, and invert it into simply having raws be the things that set up limits on what can be achieved."

This sounds like you are attempting to make more of the process hardcoded than perhaps needs to be.
Logged
..because making sense and having FUN are not mutually exclusive.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Alchemical Material Property Tokens: Redesigning Reactions
« Reply #44 on: April 06, 2012, 02:15:19 pm »

You could do it either way, really. I was looking at having the effects categorically separated for a couple of reasons. First, it would make it easier to tweek the ratio of effects that happened. Generic effects would be things that did not directly affect gameplay or had only extremely limited affects on gameplay, where as others might affect future combat or magic. This way, you could shut off the magic effects, without shutting off the combat affects, and without having to tweek each and every entry. There is actually no reason not to do both. That way, you could set rates for the category and for the individual effects within the category.

That completely breaks the entire basis upon which the reaction webs idea is built upon. 

That would be a matter of implementation. Ideally, it would be tag based so that it could be structured and set up in the raw files. For example, Magic could be disallowed on common quality items, but allowed on Mastercrafted and Artifact, similar to the way entities are able to allow/disallow reactions/jobs/workshops/etc.

That is not what this system is trying to achieve.

"Magic" properties are just properties.  The game does not judge whether they are magic or not, in the same way that nether caps are just another type of wood that happens to be ice cold at all times.  All items made of nether cap wood are going to have those "magic" properties, and item quality has no bearing, nor could it have bearing, because a nether cap wood log has no quality, and has that same property.

Likewise, the properties come from the inherent nature of the materials themselves - to achieve the latent potential of the materials requires the alchemical mixture of materials that react with one another, not some sort of making sure that the seams of the wood are kept unnoticeable or exquisite decoration.

A tile is one space of the map, a 1x1x1 area of the world. I thought that was pretty much standard lingo for the number of times I have seen it used, even by you. Although, I am not certain what you are referring to a 'list of tiles'. The lists I have been talking about are the lists of properties/effects for your alchemy set up, and the tiles are space in the game.

... that is severely confusing.  What do tiles have to do with reactions?

Are you saying you want different hemitite walls to have different properties?  If so, you're radically misinterpreting the concept.  The properties define what material I am talking about. 

There is no randomness there - property tokens A, B, and C have to be there for it to be called hemitite.  If it is hemitite, it means there are property tokens A, B, and C in it.  The name "hemitite" is just a label for a material consisting of property A, B, and C.  If it doesn't have those property tokens, or has more property tokens besides those, it isn't hemitite at all.

Likewise, reactions are what take place inside of workshops, so tiles should not come into this at all.

Because of statements like: "That is to say, the point is to free the system up from the confines of strict raw control over what can be achieved, and invert it into simply having raws be the things that set up limits on what can be achieved."

This sounds like you are attempting to make more of the process hardcoded than perhaps needs to be.

You're totally misunderstanding that, then.

I'm saying that instead of having raws where you have to iterate out each and every reaction that a dwarf is capable of performing in the raws, what you would do is simply set up a system where every reaction is possible unless you specifically deny it to them through use of the reaction webs. 

That doesn't mean it's hard-coded, that means everything is raw-modded, but that the way that you enable or deny things from happening in the raws is changed. 
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
Pages: 1 2 [3]