-
Notifications
You must be signed in to change notification settings - Fork 89
Modding status effects
In the base game, there are 32 different statuses, including special ones like Jump, Low HP...
Using Memoria, it is possible to have up to 64 different statuses. A new status has been added to handle many positive/negative stat changes (like Power Break, Focus or Lv3 Defless), making it easier to create a dispel effect that reverts these stat changes (or only the positive parts of them, or only the negative parts of them).
There are thus 31 slots of statuses that are free to use for whole new statuses.
Status effects are intertwined within the battle's overall system. Many aspects of them can be modified in various places:
- CSV databases (that can currently only be edited manually, most likely with a text editor), that handle the duration, frequency and classical visual effects of the statuses,
- Dictionary Patch entries that handle status attributes (positive, negative, those that immobilise their target, those that persist out of battles) and status icons,
- C# scripts that handle the advanced effects of statuses, such as
Doom's countdown and final effect, or the attack/target automatised byBerserkandConfuse; on top of each status's own C# scripts, their effect are spread in many other scripts that can be modded within the DLLMemoria.Scripts(eg. physical ability scripts include the defence provided byProtectin their own script).
The main basic database for statuses is the CSV file StreamingAssets/Data/Battle/StatusData.csv. It contains the standard base duration of temporary statuses, the tick base frequency of statuses that act regularly (eg. Poison), the status incompatibility scheme, etc... Now it also setups the standard visual effects of statuses: whether they use a SPS or SHP and whether they change the color of the unit affected by the status (eg. Zombie or Protect).
As that's not a CSV that Hades Workshop can use or generate, it's most likely a file that needs to be modified / created manually with a text editor. Here's an example of a StatusData.csv that defines the default parameters of Venom:
#! UnshiftStatuses
#! IncludeVisuals
# Comment ; Id ; Priority(unused) ; OprCount(tick) ; ContiCount(duration) ; ClearOnApply ; ImmunityProvided ; SPSEffect ; SPSAttach ; SPSExtraPos ; SHPEffect ; SHPAttach ; SHPExtraPos ; ColorKind ; ColorPriority ; ColorBase
Venom ; 1 ; 7 ; 20 ; 0 ; Defend(15), Poison(16) ; Poison(16) ; 1 ; 0 ; 0, 0, 0 ; -1 ; 0 ; 0, 0, 0 ; -1 ; 0 ; 0, 0, 0Here, the fields are shifted with spaces to keep an alignment for easy reading, but in general the file is presented without this vertical alignment.
The two first lines #! UnshiftStatuses and #! IncludeVisuals should be included at the start of the file, so all the fields are used.
-
OprCountis the base tick frequency: the higher it is, the longer it takes between ticks. The exact period duration is computed with theMemoria.inioption[Battle] StatusTickFormula, which normally usesOprCntas a factor. -
ContiCountis similar but for the whole duration of the status. Here it is0becauseVenomis a permanent status. The formula is specified by theMemoria.inioption[Battle] StatusDurationFormula, which normally usesContiCntas a factor -
ClearOnApplyare the statuses that are removed whenVenomis inflicted: hereDefendandPoisonare removed when anyone gets inflicted. -
ImmunityProvidedare the statuses that are incompatible withVenom: once it is applied, the character is immune toPoisonas long asVenomis there. This immunity displays a messageMissfor status-inflicting spells, notGuard. -
SPSEffect,SPSAttachandSPSExtraPosare the settings for a visual SPS effect. SPS are small visual effects that are defined inStreamingAssets/Data/SpecialEffects/Common/SPS.csv(see #461 for detailed infos). Using aSPSEffectof-1means that no SPS is tied to that status. Here, the SPS used are the little colored "bubbles" above the character's head. - The same goes for a SHP effect (same documentation as for SPS). Only
Haste,Slow,TroubleandSilenceuse a SHP by default. -
ColorKinddetermines the type of color change of the character inflicted by the status. It can be either:-
-1: no color effect, -
0: a constant color is applied, like withZombie(brown) orBerserk(red). -
1: a glowing color is applied, likeShellandProtect. -
2: the trance glowing color is applied; since trance color is different for each character (or enemy), theColorBaseis ignored when using that color kind.
-
-
ColorPrioritydetermines the color of which status is used when multiple statuses have a character color attribute. For example, that priority is100forZombieand only50forShell, so the color ofZombieis used when both statuses are applied. For glowing colors, you can have the same priority, in which case the glowing alternates between the colors of the different statuses. -
ColorBaseis a RGB color with channels that can range from-255(lower the intensity of the color channel) to255(increase the intensity). For example,Berserkas a base color of16, -40, -40, which means it increases the red color while lowering the green and blue colors.
An important aspect of statuses is whether they belong to the different logical status groups. For example, statuses that completly freeze their target form the group Immobilized (that group contains Petrify, Venom, Stop and Freeze by default) or the statuses that triggers a Game Over when the whole party has them form the group BattleEnd.
You can change important aspects of the statuses by modifying these groups, adding or removing statuses from them. This is done with a file DictionaryPatch.txt in a mod folder and using BattleStatus lines.
Here are the different logical groups that can be modified:
OutOfBattle
AnyPositive
AnyNegative
Achievement
ContiCount
OprCount
CmdCancel
NoInput
CannotAct
Immobilized
FrozenAnimation
NoDamageMotion
PreventCounter
PreventEnemyCmd
StopAtb
IdleDying
IdleDefend
ChgPolyClut
CannotEscape
CannotTrance
NoRebirthFlame
NoReset
BattleEnd
BattleEndFull
BattleEndInMenu
RemoveOnMainCommand
RemoveOnMagicallyAttacked
RemoveOnPhysicallyAttacked
RemoveOnEvent
RemoveOnMonsterTransform
PenaltyEvade
PreventAlternateCamera
PreventATBConfirm
PreventReflect
VictoryClear
CannotHealInMenu
CannotUseAbilityInMenu
CannotUseMagic
ApplyReflect
ApplyTrouble
ZombieEffect
DisableRewards
CannotSpeak
Another thing that can be modified / completed in the DictionaryPatch.txt is the icon sprites of the statuses. That is done with the instructions BuffIcon and DebuffIcon. Whether you use Buff / Debuff here impacts whether they are displayed in battles when targeting an ally for providing good statuses or for curing bad statuses.
It is not exactly the same as being marked as AnyPositive or AnyNegative: for example, Berserk is consider neither a positive or a negative status in multiple aspects, but its icon appears as a debuff when curing bad statuses.
Also, only debuff icons appear in the menu out of battles.
Each status has a code that runs when it applies to and when it is removed from a target. That code can be externalised.
It works similarly to external battle scripts: you need to create C# files in the sub-path StreamingAssets/Scripts/Sources/ of your mod folder and define classes corresponding to the effect of the status. Base C# codes for the default status effects can be found there.
Each class coding status effect must have the attribute [StatusScript(STATUS_ID)] and be a sub-class of StatusScriptBase. It can also have interfaces like IDeathChangerStatusScript if it triggers something at specific key moments.
There, the status AutoLife can make use of a special parameter (parameters[0]) that, if provided, determines the HP value with which the beneficiary will be revived. When it's not provided, the character is revived with 1 HP on their death.
The different interfaces can be found here:
-
StatusScriptBase, that every status script must have, which codes what happens when trying to apply / remove the status. -
IOprStatusScriptfor statuses with a regular update (eg.PoisonorDoom). -
IDeathChangerStatusScriptfor statuses triggering on death and possibly preventing it (onlyAutoLifeby default). -
IAutoAttackStatusScriptfor statuses triggering when the ATB is filled and possibly send an automatic command in place of the player (ConfuseandBerserkby default). -
IFinishCommandScriptfor statuses that watches the commands performed by the character affected by it. By default, it is used byTranceto monitor Garnet's Eidolon command and activate periodic replicates, and byJumpto handle what happens at the end of the jumping and spearing commands. -
IFigurePointStatusScriptfor statuses that triggers an effect at the "figure point" of attacks, ie. not when the damage is actually done but when it is displayed as a figure (or a message likeMiss,Death...). By default, onlyTroubleuses it to spread damage to the allies of the affected character. Note that the figures displayed can be modified there (for statuses that hides to the player the damage taken or dealt) but not the actual damage.
A couple of overloadable methods are heavily tied to specific status effects:
-
IOverloadUnitCheckPointScriptdetermines by default whether the statusLowHPis applied to a character, as well as their UI color in battles. -
IOverloadOnBattleScriptStartScripthandles the instant killing of targets underFreezewhen attacked physically. -
IOverloadOnCommandRunScripthandles the instant killing of acting characters underHeat.