Poisons mechanics in OpenMW

Everything about development and the OpenMW source code.
Chris
Posts: 1625
Joined: 04 Sep 2011, 08:33

Re: Poisons mechanics in OpenMW

Post by Chris »

Perhaps something a bit more flexible. Rather than treating potions and poisons differently, simply allow any potion to be drunk or applied to a weapon, the former conferring the effects to the user and the latter causing the effects to apply to the target on hit with the weapon. When making a potion, you can choose to strengthen positive effects or negative effects, at the expense of the other.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Poisons mechanics in OpenMW

Post by Zini »

I have given this topic some more thoughts. There are two separate game mechanics at play here. Use of potions (e.g. poisoning a weapon) and making of potions (Alchemy). Best to not mix them up.

Poison on weapon

I think we are not doing any inappropriate hardcoding, if we implement the followings:
- A weapon can have a potion effect attached to it.
- This is indicated by a icon on the weapon icon (icon itself being configurable).

The rest can be handled via the stage1 extensions. We already have a system for item-item interaction planned. This can be used to detect an attempt to apply a potion to a weapon. The script can then decide how to handle it (simply apply the potion, involve a skill or whatever).

Throwing potions

Throwing potions is a different issue again. The easiest solution would be a GMST with 3 values:
* 0: no throwing
* 1: throwing only for negative effects
* 2: throwing allowed for all potions

Alternatively we could add a new magic effect "Splash" (Hello Minecraft!) that makes potions throwable. I think I prefer the second option.

Alchemy

That is a can of worms that I would prefer not to open at this time (could get really complicated). IIRC there is only one tool that reduces the strength of negative effects (Alembic ?). So if a player would want to make a poison he could just avoid using an Alembic. So technically we could introduce poisons without messing with Alchemy for now (except for the splash effect, if we want to include throwing).
erretel
Posts: 14
Joined: 29 Jan 2018, 23:20

Re: Poisons mechanics in OpenMW

Post by erretel »

Chris wrote: 28 Jul 2018, 23:41 Perhaps something a bit more flexible. Rather than treating potions and poisons differently [...]
The issue become one of usability. Do you really want to go through a menu every time you use a potion?
Zini wrote: 29 Jul 2018, 11:37 * 2: throwing allowed for all potions
How does the game determinate if the player wants to drink the potion or to throw it?
Zini wrote: 29 Jul 2018, 11:37 Alternatively we could add a new magic effect "Splash" (Hello Minecraft!) that makes potions throwable. I think I prefer the second option.
Adding a new alchemical effect seems such a messy solution. Which ingredients get that? How would that interact with the many mods that add new ingredients? How are you going to communicate to the player about it?
Zini wrote: 29 Jul 2018, 11:37 That is a can of worms that I would prefer not to open at this time (could get really complicated). IIRC there is only one tool that reduces the strength of negative effects (Alembic ?). So if a player would want to make a poison he could just avoid using an Alembic. So technically we could introduce poisons without messing with Alchemy for now (except for the splash effect, if we want to include throwing).
I haven't seen the code, but I don't really understand how much harder it would be to do things the way I described above. At its core is just about adding a new button which control a variable that would determinate the magnitude of the effects through a single multiplier.
User avatar
joshcamas
Posts: 5
Joined: 21 Jul 2017, 05:53

Re: Poisons mechanics in OpenMW

Post by joshcamas »

The idea is that these new systems aren't implemented by default - instead, new mods can make use of them. That's really the strength of OpenMW anyways
Chris
Posts: 1625
Joined: 04 Sep 2011, 08:33

Re: Poisons mechanics in OpenMW

Post by Chris »

erretel wrote: 29 Jul 2018, 18:23
Chris wrote: 28 Jul 2018, 23:41 Perhaps something a bit more flexible. Rather than treating potions and poisons differently [...]
The issue become one of usability. Do you really want to go through a menu every time you use a potion?
Instead of dragging it onto the player to use as a poison, you could drag it onto the item. So when dragging a potion onto the paperdoll it drinks it like normal, but if you drag it onto the weapon's icon it asks if you want to apply the effects to the weapon. Alternatively it could ask when starting to drag a potion, and have shortcuts to bypass the dialog (similar to dragging a stack of items asking how many to take, and shift/ctrl being used to bypass the question by auto-picking all or one). I'm less fond of the latter idea, but it's an option that came to mind. The former idea would also let you apply effects to a weapon you don't currently have equipped, which I'm sure would be nice to people who use poisons and multiple weapons (they wouldn't have to change weapons to reapply poisons for later, only to switch back to what they actually want to use right now).
Zini wrote: 29 Jul 2018, 11:37 * 2: throwing allowed for all potions
How does the game determinate if the player wants to drink the potion or to throw it?
Perhaps it could be determined when making the potion, just not with special ingredients. For example, use a standard bottle for drinking potions, and light/fragile bottles for throwing potions.
Zini wrote: 29 Jul 2018, 11:37 That is a can of worms that I would prefer not to open at this time (could get really complicated). IIRC there is only one tool that reduces the strength of negative effects (Alembic ?). So if a player would want to make a poison he could just avoid using an Alembic.
What about reducing positive effects? It makes sense to me that if you're making poisons, you'll want to do more than just not weaken the negative effects, you'll want to make them stronger than normal while also reducing the strength of positive effects (your skill in alchemy and available equipment determining how effective you are at strengthening negatives and weakening positives). Having a toggle to switch between strengthening negatives at the expense of positives, or strengthening positives at the expense of negatives, seems to be a rather simple and elegant solution.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Poisons mechanics in OpenMW

Post by Zini »

How does the game determinate if the player wants to drink the potion or to throw it?
Easy. Potions with the splash property can be equipped like throwing weapons.

Edit: Or not so easy. That only moves the problem from drink/throw to equip/throw. Easiest solution would be to simply make splash potions undrinkable. Good enough for stage1 IMHO.
Adding a new alchemical effect seems such a messy solution. Which ingredients get that? How would that interact with the many mods that add new ingredients? How are you going to communicate to the player about it?
Vanilla MW won't have throwable potions. It is up to mod developers to enable this feature and also to add the effect to ingredients or to add new ingredients.
I haven't seen the code, but I don't really understand how much harder it would be to do things the way I described above. At its core is just about adding a new button which control a variable that would determinate the magnitude of the effects through a single multiplier.
We don't want to unnecessarily hard-code new features. And that is the problem with Alchemy. I haven't de-hardcoded it yet in the stage1 document, because doing this in a general and flexible way within our framework will be tricky. This is not an issue of code, but of design.
Last edited by Zini on 30 Jul 2018, 10:41, edited 1 time in total.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Poisons mechanics in OpenMW

Post by Zini »

Instead of dragging it onto the player to use as a poison, you could drag it onto the item. So when dragging a potion onto the paperdoll it drinks it like normal, but if you drag it onto the weapon's icon it asks if you want to apply the effects to the weapon
Exactly. That was the idea behind my suggestions.
What about reducing positive effects? It makes sense to me that if you're making poisons, you'll want to do more than just not weaken the negative effects, you'll want to make them stronger than normal while also reducing the strength of positive effects (your skill in alchemy and available equipment determining how effective you are at strengthening negatives and weakening positives). Having a toggle to switch between strengthening negatives at the expense of positives, or strengthening positives at the expense of negatives, seems to be a rather simple and elegant solution.
Covering this issue in a non-hardcoded way sounds rather tricky. I think we need to have a long hard look at the alchemy feature and de-hardcode it as a whole, not just piece by piece. I haven't tackled this problem yet in the stage1 document, because I haven't been able to come up with a design that fits into the overall theme of stage1 (low hanging fruit, allows the legacy variant of the feature to be fitted in easily and allow for great flexibility).
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Poisons mechanics in OpenMW

Post by Zini »

For example, use a standard bottle for drinking potions, and light/fragile bottles for throwing potions.
That is an interesting idea, but unless I remember very wrongly, MW alchemy does not use bottles. I don't think we want to force such a large feature change into the engine. Maybe we could introduce bottles as an option at some point with an option to make bottle type affect the ability to throw. But there should still be other options to allow throwing (see above).
Chris
Posts: 1625
Joined: 04 Sep 2011, 08:33

Re: Poisons mechanics in OpenMW

Post by Chris »

Zini wrote: 30 Jul 2018, 10:37 Covering this issue in a non-hardcoded way sounds rather tricky. I think we need to have a long hard look at the alchemy feature and de-hardcode it as a whole, not just piece by piece. I haven't tackled this problem yet in the stage1 document, because I haven't been able to come up with a design that fits into the overall theme of stage1 (low hanging fruit, allows the legacy variant of the feature to be fitted in easily and allow for great flexibility).
What other needs do you see that wouldn't be covered by a toggle switch? Especially for a stage1 design (low hanging fruit, allows the feature to be fitted easily into existing games), it seems to fit quite well to me; it would be nothing more than a boolean inversion when checking if effects are helpful or harmful in the potion creation code. And if there are other more invasive enhancements to be made later, it doesn't seem like it'd get in the way.
Zini wrote: 30 Jul 2018, 10:45 That is an interesting idea, but unless I remember very wrongly, MW alchemy does not use bottles. I don't think we want to force such a large feature change into the engine. Maybe we could introduce bottles as an option at some point with an option to make bottle type affect the ability to throw.
The bottles idea is really just dressing to have it user-selectable at potion creation time. You don't actually use bottle items to create potions in vanilla, but they are stored in bottles you magically acquire when creating them. Saying you store it in a different type of bottle would offer a thin explanation as to why the choice is made at creation time, and why you can't throw just any potion already made (the bottle wasn't made to properly break). Later on after dehardcoding, a mod could be made to change the requirements for making throwable vs drinkable potions, or changing the description to dress it as something else besides "breakable bottles".
erretel
Posts: 14
Joined: 29 Jan 2018, 23:20

Re: Poisons mechanics in OpenMW

Post by erretel »

I'm not going to quote point by point, otherwise it start to become a mess.

- I personally believe that if you can't simply use the various potions/poisons from a quick-key and without having to go through a menu, you have a bad system.
- Using the equippable TESO mode the creator of this thread suggested is an excellent way to bypass a lot of ergonomic issues that poisons often have.
- I still don't get why both of you seems to be so strongly against having a simple button that toggle between potion/poison/throwable into the alchemy menu. The empty bottle idea you are juggling around is really the same exact thing, except more clunky and radically different from the design philosophy of vanilla (see spellmaking).
Post Reply