[Feature Request] Conditional Modifiers

Feature Summary

This feature would allow to select conditional modifiers (coming from items) in the user input window before a roll gets applied. I´ll try to explain this with an example: I´ll use the following tables as a reference:

SKILL TABLE [TABLE]:

SKILL LEVEL MODIFIERS TOTAL
Running 2 1 3
Smithing 3 0 3

ADVANTAGES [ITEMS]:

ADVANTAGE LEVEL DESCRIPTION
Happy Smith 1 You gain a bonus on Smithing in the amount of the level when you´re in a good mood
Fast Runner 1 You gain a bonus on Running in the amount of the level

Fast Runner in this case would modify our Running-skill by 1 for every roll, so we just add an item modifier to Fast Runner and reference the MODIFIERS-Key of the Running-skill. So this one is easy and is already doable in the system.

But now it gets tricky with the Happy Smith-advantage. The bonus only applies when the character is in a good mood, so it´s tied to a ingame-condition. So the condition check should happen when a roll needs to be performed, which is not possible in the current environment. That´s exactly what this feature should make possible and I already have a concept for this.

Concept

I´ll devide the concept into 3 different sections. Each section will have multiple implementation choices with pros and cons. I´ll try to explain these in as much detail as possible.

1. Extending current Item/Effect Modifiers

First of all, we´d need to extend the current Item/Effect-Modifiers system. The current Item Modifiers have the following configuration points:

  • Priority
  • Key
  • Operator
  • Formula

For the conditional part, we need 2 more configuration points:

  • Conditional (Checkbox): Determines if this modifier is a normal or a conditional modifier

Option 1:

  • Description (Text/Formula): The description of the conditional modifier. Should contain to which specific condition the modifier applies. This should be visible later in the user-prompt.

Pros:

  • Detailed descriptions can be provided (together with the source)

Cons:

  • Additional RTA-field required in the HTML
  • A bit more implementation needed

Option 2:

  • Source-Name (Text): The name of the source the modifier comes from (item or effect)

Pros:

  • Fast implementation

Cons:

  • No description for the condition, only modifier source is provided

2. Storing and calling Conditional Modifiers

Conditional Modifiers can basically be processed the same way as normal Item Modifiers, but it might make sense to store them in a different Collection (prefiltering, so you don´t have to filter later by the isConditional-flag when needing them). The crucial part will be, which keys should be stored and HOW they should be applied.

Option 1:

Apply on all used keys in a Label Roll Message: This option would check, which keys are used in a Label Roll Message. The keys used will be evaluated to the keys in the Conditional Item Modifiers. The procedure would look like this:

1. Check which keys are used in the Label Roll Message
2. For each key:
  2.1. Check if any of the Conditional Item Modifiers contain this key.
  2.2. If it contains this key:
    2.3.1. Retreave a List of all Conditional Modifiers of this key.
    2.3.2. Show this List of Conditional Modifiers to the User and let him decide, which should be applied``
    2.3.3. Modify the value with the selected Modifiers

Cons:

  • Would miss modifiers from base-values, which are not used in the Label Roll Message (e.g. you use the key Running in the Label Roll Message, but the value of Running is derived from Strength, which is not specified in the Label Roll Message)

Option 2:

Apply on Label Key: This option would check, if for the key of the Label Roll Message exist Conditional Modifiers.

Cons:

  • You need to determine on which formulas in the Label Roll Message the Conditional Modifiers should be applied, so some kind of marker is needed.
  • No way to delegate specific Conditional Modifiers to specific Formulas, so all formulas get the same Conditional Modifiers (really bad)

Option 3:

Apply on function: This option would introduce a new function to CSB: applyConditionalModifiers(modifierKey: string, valueToModify: number | string): void. With this, the User decides which Conditional Modifier keys should be created and on which values they should be used.

Cons:

  • Every Conditional Modifier is likely to get his own popup-window, which can cost time and is less user-friendly

3. Extended Userinput-Dialog

The current Userinput-Dialog needs to be extended to show up a List of Conditional Modifiers, which can be applied to the current Label Roll Message. The User should see the following properties in the List per Conditional Item Modifier:

  • Operator
  • Value
  • Description or name of source (Item/Effect)
  • Selection (Checkbox)

User Experience

This would be a great semi-automated way to handle conditional modifiers in the current system

Priority/Importance

It´s one of the bigger Feature Requests but I´d still say Mid

Edited by Martin1522