🌱
The Insurgent's Forge
  • Home
  • Getting Started
    • Setup
    • Resources
  • Overview
    • Configuration
      • Formulas
      • Functions
      • Classes
      • Helpers
      • Assemblies
      • Middlewares
      • Dependencies
      • Options
      • Errors
    • Improvements & Additions
    • Structures & Parameters
    • Formula Workflow
      • Combo
      • Counter
      • Area of Effect
      • Reserve Party Member
      • Reflect
      • Mist
      • Trap
      • Chain Benefit
      • Summon
      • Spawn
      • Gambit
    • Limitations
      • Animations
      • Status Effects & Augments
    • Notes
      • Flags
      • Loops
      • Function in a Function
    • Helpers
      • Add Augment
      • Add Status Effect
      • Apply Knockback
      • Get Active Party Member
      • Get Action Status Effects
      • Get Augment Duration
      • Get Battle Unit Keep
      • Get Battle Unit Keep By Focus
      • Get Battle Unit Work
      • Get Character Max Hp
      • Get Character Max Mp
      • Get Character Type
      • Get Elemental Affinities Match
      • Get Equipment Status Effects
      • Get Forced Poach Rarity
      • Get Forced Steal Rarity
      • Get Formula Proc Keep
      • Get Knockback Range
      • Get Location Mist Strength
      • Get Model Evade Types
      • Get One Hit Kill State
      • Get Random Number
      • Get Reflect Target
      • Get Remedy Status Effects
      • Get Status Effect Duration
      • Get Status Effect Tick Duration
      • Get Status Effects Match
      • Get Terrain Type
      • Get Weather
      • Is Interactable
      • Modify Content
      • Modify Gil
      • Modify Hp
      • Modify Mist Charges
      • Modify Mp
      • Modify Sky Pirates Den Stats
      • Refresh Stats
      • Remove Augment
      • Remove Status Effect
      • Set Level
      • Shift Elements
      • Show Combat Log
      • Show Number Text
      • Teleport Location
  • Support & Updates
    • Changelogs
      • Version 1.0.3
      • Version 1.0.2
      • Version 1.0.1
      • Version 1.0.0
    • Known Issues
    • FAQ
Powered by GitBook
On this page
  • Description
  • Example
  • Merge Operations
  • Notes
  1. Overview
  2. Formula Workflow

Mist

Description

The formula processing of a Quickening, Concurrence and Esper-Ultimate works slightly differently than with other actions.

Since an action's event animation is played after its formula is applied, it's important that both the caster and target are not yet effected by its changes. Otherwise it can cause issues in certain scenarios (e.g. if target is KO'd).

Therefore, these actions won't affect their caster and target immediately. Instead, all changes are first internally merged and then applied to both characters after all event animations are finished.

As a result, it's impossible to determine to which extent the caster and target have already been affected during a Quickening or Concurrence.

Example

Vaan, Balthier and Ashe are in the active party and in a battle with Wolf A and Wolf B. Vaan casts Red Spiral on Wolf A. Afterwards, Balthier continues the chain with Fires of War, followed by Ashe with Intercession. Finally, the Quickening chain ends which triggers the Concurrence Inferno.

Order
Middleware
Caster
Target
Action
1

On Cast

Vaan

Wolf A

Red Spiral

2

On Hit

Vaan

Wolf A

Red Spiral

3

On Cast

Balthier

Wolf A

Fires of War

4

On Hit

Balthier

Wolf A

Fires of War

5

On Cast

Ashe

Wolf A

Intercession

6

On Hit

Ashe

Wolf A

Intercession

7

On Cast

Ashe

Wolf A

Inferno

8

On Cast

Ashe

Wolf B

Inferno

9

On Hit

Ashe

Wolf A

Inferno

10

On Hit

Ashe

Wolf B

Inferno

11

On Mist End

Vaan

Vaan

Red Spiral

12

On Mist End

Vaan

Wolf A

Red Spiral

13

On Mist End

Vaan

Balthier

Fires of War

14

On Mist End

Vaan

Ashe

Intercession

15

On Mist End

Vaan

Wolf B

Inferno

After OnHit middleware functions are executed for each caster and target, their changes are internally merged and then preserved. Once the Quickening chain ends, the changes are applied via OnMistEnd middleware functions.

Merge Operations

Each property uses one of 3 operations (Add, Or, Mov) when it's merged. Based on the property, it might be preferable to either overwrite the last actions' changes or only add to them.

Assume a Quickening reduces the target's HP by 100 and randomly either applies the status effect Slow or Blind, with a duration based on the caster's vitality.

If the Quickening is executed twice, the properties would be merged as follows:

Property
Operation
Initial
Last
Result

Removed HP

Add

100

100

200

Status Effect State

Or

0

1

1

Status Effect Duration

Mov

100

120

120

The removedHp property uses the merge operation Add. So the new value is being added on top of the currently preserved value. That way, the target's hp can be reduced by more than just 100.

The addedStatusEffects property uses the merge operation Or. So the new value overwrites the currently preserved value, but only if the latter is 0. That way, all of the target's status effects can be modified at once, but an action can also never remove the added status effects of the actions executed before it.

The addedStatusEffectDurations property uses the merge operation Mov. So the new value always overwrites the currently preserved value. That way, the formula's intent is not only preserved, but there is also an incentive to smartly chain Quickenings.

For a list of which properties use which merge operation, you can check out the mod spreadsheet in Resources.

Notes

The formula's outcome type is always set to 0 (successful) before processing functions of a middleware group. In theory, a mist action can have a different outcome type at the end, but the result will not be reflected by the game. For example, if the action misses, no "miss" text will be shown.

The caster of a Concurrence is the last caster of a Quickening.

The caster of all OnMistEnd functions is the caster of the initial Quickening. The same applies to the action.

In theory, a caster's and target's properties can still be modified before OnMistEnd middleware functions. Therefore, it's important to check the formula cause type (3 -> Mist) and skip those functions if necessary, similar to how it's done with function 320, for example.

While using the Mov Operation for some properties may seem bad at first, it's necessary to do so as otherwise the formula's intent would be automated.

Assume the target's hp is set to 100 twice using the matchedHp property.

If the merge operation Add is used, then the target's HP would be set to 200 which could be completely against the formula's intent as there is no way to know beforehand if it was meant to be beneficial or detrimental. The same goes for using the Mov operation when the new value is higher or lower than the currently preserved one.

However, if the new value always overwrites the current one, then the formula's intent is directly inherited. So even if an action can possibly worsen the changes applied by previously executed actions, it can also improve them and, most importantly, preserve the formula's intent.

PreviousReflectNextTrap

Last updated 11 months ago