In another thread, talking about positive effects on syndromes, I was re-introduced to something that set me off thinking about player control over dwarven AI (which has been one of those big issues I've been talking about whenever farming isn't eclipsing it) and the syndrome/alchemy/what will probably be the base of the magic system. Specifically, this:
Capntastic: So what about herbs and plants being turned into potions?
Toady: I guess hopefully it would all fall under the same umbrella; it's not chemistry per se, you're not trying to give names to the things, but stuff turning into other stuff that has effects ... We've got the poisons now which are the only example of a material having an effect, and the effects are all over the place even know; they can make you cough blood, give you blisters, cause your body parts to swell up and get compartment syndrome, give you fevers, make you dizzy, and that's a material effect that effects a creature through contract, injection or inhaling the object and so if you start to give beneficial effects or more neutral effects, maybe give it a few more ways that cause the syndrome to trigger - it could just be something that's nearby rather than something that's inhaled or injected - and then all of a sudden what was a really practical grounded real world poison system becomes a system for doing all kinds of fantastic things. So if your herbs, if you say one plump helmet and one newt eyeball is a reaction that you can do in a workshop with an empty flask, and then you use the to container thing that we've got now for reactions to say all that stuff goes into a new liquid in that container called plump helmet newt eyeball juice or something. Then you can define a new material and that material could have whatever properties you want. So the pieces are in place now to make poisons, but you wouldn't be able to do anything with them unless you somehow found a way to get the poison out of the container ... which you could do, if you find a way to heat the thing up, like dropping it in magma and then it turns into a gas you could have creatures nearby inhale. So you could actually set up some kind of poison gas traps, even in the new version. But just in general things like a potion that makes you happy ... there are two obstacles there now in the current system. One of them is that you'd need to have the effect, you'd need to give the modder or vanilla modding control to change the happiness of a dwarf, so it's not just giving blisters or whatever but there's a new effect, and that list is just going to increase over time and hopefully cover the basis. The other problem is to get a dwarf to actually use the thing; to recognise that there's now this flask filled with this juice that when you drink it it makes your happiness one hundred and fifty percent for a week, and having the dwarf know that that's something that needs to be used is a large problem, especially for a modding situation where you make happiness juice that gives you blisters and makes you fly ... when do you drink it? I don't know, it sounds like an adventure mode thing; the adventurer would take that journey, but not necessarily a dwarf craftsman that's feeling a little bummed out. So that's another issue with modding, but it's not that far away now, you can mod in your own poisons and create them and boil them to make them work now and we just need to expand the effects and give things a few more uses.
Now, since there's two issues, there's two major topics to talk about. The first issue is something I trust you are gradually adding whenever you have time, because, thanks to the way that bodies work in DF, pretty much everything that can happen to a body has to be some sort of odd "status effect" on a body part or entire creature. (By the way, I hope to soon see burns, instead of just bleeding and fat melting, so that there aren't
stupid exploits like melting all the fat off of your body to make yourself virtually fireproof, and that exposure to extreme hot and cold temperatures have realistic effects, as well as just for the ability to drop cryo-bombs or Greek Fire.)
What I really am interested in talking about, however, is the second problem mentioned. We already have the Job Priorities and Standing Orders concepts from the ESV slated for development on the devpage, and these will allow for control over specific dwarves' decision-making processes and for at least some basic form of boolean operation and ability to check given variables, respectively. Although I've talked about this before, I think it's worth brining up again that with some expansion on these concepts, we can create a method for players to give more direct instruction to dwarves on how they will act.
First, I'll start with what I've argued for most recently: that we should have the ability to set when dwarves will eat, preferably as a part of an alert status, since that is an already existant and potentially potent tool. (See:
http://www.bay12forums.com/smf/index.php?topic=64515.0 and
http://www.bay12forums.com/smf/index.php?topic=63984.0) The basic idea is that we marry job priorities to alert status, which could be potentially useful for many reasons (although it would require some expansion of the way in which alert status can be toggled, so that you have control over civilians the way that you do over military dwarves), so that we can have a "prepare for battle" alert status that may include putting on armor if they were previously civilian, but which also says "if you have hunger at more than 40%, then eat now so you don't have to eat later". Obviously, similar things can be put in for drinking and sleeping. Doing this, when we put soldier dwarves onto full alert, they're already rested, fed, and liquored up for a day's fighting, rather than going to take naps when the FB breaches the floodgates.
This would obviously also marry the boolean operators and searches on a variable to a priority in the dwarf's script, as well as become tied to an alert status.
Going further, pushing this into the realm of using potions, we could go back to the guy we want to take happy juice (apparently, prozac has struck DF), so we could create some sort of check within the system that has a relatively high priority in his job priorities screen for either whether he has the happy juice effect currently active (so that he constantly pops happy juice to stay permanently under its effect), or to take it whenever his happiness value reaches some threshold value (down some happy juice whenever he gets to 50 happiness or below).
This would require the additional ability to recognize more than just "drink something" or "drink alcohol" as an input, but the ability to declare that you want a dwarf to drink (or consume or otherwise "use") some specific type of object. In THIS sort of manual-override of a dwarf's AI script behavior, all that needs to happen for modders is that it be put into some kind of class of objects that is drinkable (but not alcohol), has specific effects, and how it gets stored.
Putting the two together, let's say that you develop an "Elixir of the Maddened Boar" that will give a bonus to strength, endurance, and up the chances of becoming enraged or entering a martial trance, and whenever you think a fight is coming up, you want all your military dwarves to raid the stockpile (or possibly carry it with them in a flask), and down this stuff so that they get the combat bonuses for doing so.
Alternately, you could develop poisons that you want your dwarves to coat their weapons or ammo in, but not while already in combat under most circumstances. So you would want some sort of alert status (probably the same ones that involve eating first if they are slightly hungry, then applying poison, then drinking any combat effectiveness drugs you've made) so that you can command dwarves to start applying the specific poison you want to whatever ammo or weapons they have. (It might also be helpful here to have a "get more ammo" priority or a "make sure you are wearing the right armor" priority you could slide up or down the list of priorities.)
And once again, I'd obviously ask for some sort of import/export to .txt file capability for many of these priority scripts or uniforms or alerts or the like, since building them will likely become fairly complex, and the ability to save them and load them between fortresses would be of great help to many players.
What would be even more problematic, however, would be the ability to have raw-created or procedurally-generated supplies be used in an automatic fashion, or in a process. For example, when talking about alchemy (and farming) recently, I was talking about how we could hypothetically have a healing poultice made out of, let's say, aloe vera resin, feather tree leaves, and argent cave lichen. This poultice would then have to be rubbed into the wound, and would mitigate bleeding, and speed healing, and would be best used by a doctor (probably with a relevant doctor skill check to see how effective it is) as part of the process of bandaging and treating an open wound. Unless we make the entire process of how a doctor treats a patient somehow a list of priorities, this likely shouldn't be something we ask a player to manually control. We'd need to have a flag for individual raw-defined (or procedurally defined) substances to become part of certian processes, and to have those become rolled into standard dwarven AI. (This will, however, mean that the game will likely be less moddable because of this, as every function will likely need some kind of hard-coded token.)
Likewise, this could expand towards having "dwarven free will" more similar to what I had asked about a month ago, where dwarves might just grow to LIKE taking Happy Juice, and will want to be constantly under its effects, even if they aren't unhappy, and even if they aren't ordered to take it, and maybe even if you've forbidden it (they're jonesing for it real bad, man), so that they can feed what is essentially an addiction. (Of course, this would require addiction mechanics, and possibly mechanics for gaining resistances to certain chemicals, which can cause changes in what the exact effects of some given item is.)
Although I know this is a pretty massive lead-up, my question would be the following:
Toady, where do you see the ability of players to affect AI behavior? Will we see something that goes more towards having the ability to directly script dwarven AI to use certain items or take certain actions using some logic operations or a rudimentary scripting ability? Or do you see this as being more a matter of dwarves having to somehow learn how and when to properly perform actions or use items from the properties they have in the raws alone? While I'm obviously interested in the effects this can have, I'm also interested in what sort of game design philosophy you have about what level of control you want players to be exerting over their dwarves.Since I'm already putting together ideas for a procedural set of alchemy formulas suggestion thread, I'll probably roll all this into another one of my broad-concept tl;dr threads, but I'd like to have some idea on what concepts for dwarven control you're open to before I start building some heavier ideas around assumptions on how these things can play out.
EDIT: Oh, and appropos of nothing, but since I'm already posting here, and remembered this time, I'd like to say I am quite excited about what you're doing, here, Baughn.