MT's custom scripts M S P M B D L D F


v35.123.4

  • 35 custom timings
  • 123 custom functions
  • 4 custom features/other stuffs

Contributors: MT, Styx, pluh, Mellohi138, Blob, Diesel, lob, Froggo
Honorable Helper: Doppelglower

Symbols Meaning
! Indicates the function is now included in Modular.
A Indicates the specific author; color assignments are defined in the Contributors list
  • : Indicates the TIMING provides the context reference
  • springgreen: Mostly guaranteed to be provided
  • lightgoldenrodyellow: Might be provided
  • Flowery Your dad's my best friend
  • Hwell, what's this? Manageable so far? Chachihu
  • : Indicates the TIMING does not provide the context reference
  • lightslategray: Not provided

Just a warning, not all examples work, only for reference or joke

v35.123.4 notes:

  • Changes made by MT:
    • Disabled getcurrentpower acquirer since the Modular's version is better now
    • Added a new TIMING: AfterDuelClashLog
    • Added a new acquirer: getparryingclashpower
    • No longer refresh all units' appearance renderer on all pre-combat TIMINGs
    • Stop killing idle on all pre-combat TIMINGs

v34.122.4 notes:

  • Changes made by MT:
    • Added a new consequence: removeallactions (endbattle but not buggy)
    • Added an optional 2nd argument to setactionindex

v34.121.4 notes:

  • Changes made by MT:
    • Added a new acquirer: getkeyinput

v34.120.4 notes:

  • Changes made by MT:
    • Added a new TIMING: OpenInfo
    • Added a new acquirer: getmodularvalue
    • Added a new consequence: allowopeninfo

v16.71.3 notes (Keep this here to glaze Styx):

  • Updated version format
  • Changes made by MT:
    • Fixed instantdeath doesn't work if ignoreImmortal is false
    • Renamed didusedskillprevturn to diduseskillprevturn
    • Added 3rd argument for modifysubtarget: excludeTargets
  • Changes made by Styx:
    • removeskill now works properly except it wont update infos in the unit's summary tab
    • Refactored and added beta support for Modular lines in addskillability ("now AddSkillAbility should support up to adding 99% of skill abilities" - Styx)
    • Refactored custom targettings: Single-Skill, Multi-Skill, Single-Coin, Multi-Coin
    • Added new Multi-Targetting type: 'char[xx]' and 'not[x]'
    • Added 'MTValues' support for getcomparerresult
    • Added new 3rd argument for getmapdata to support 'MTData'
    • Changed how print option works in hasbuffkeyword (now work as setmtdata)
    • Added new argument for changepaniclevel
    • Added acquirers: getchangespvalue, getmtdata
    • Added consequences: setmtdata
    • Added timings: OnTakeSwitchingVibration, OnOtherTakeSwitchingVibration, OnTakePiledVibration, OnOtherTakePiledVibration, OnTakeSPDamage OnOtherTakeSPDamage, OnChangeSP, OnOtherChangeSP
    • Added Wait
    • Added a new type of data: 'MTData' (values get from this type of data are called 'MTValues')

Custom features

Global Lua Data added in v0.18.7 ! A

Related functions: setgdata, getgdata, clearallgdata

MTData added in v16.71.3 A

Related functions: getmtdata, setmtdata
String Replacement: Putting text between brackets, will replace the text when processing the batch with value of the corresponding mtdata

Examples:

⎗
✓
1
2
3
"Modular/TIMING:WhenUse/setmtdata(Self, TestValue, VALUE_0, TestValue)" <- set an MTData of DataID and DataSource = TestValue, and Value = VALUE_0
"Modular/TIMING:OSA/VALUE_0:hpcheck(Self, %)/scale([TestValue]" <- replace the brackets with VALUE_0 from mtdata with DataID = TestValue
"Modular/TIMING:OSA/VALUE_0:hpcheck(Self, %)/scale([TestValue:TestValue]" <- replace the brackets with VALUE_0 from mtdata with DataID AND DataSource = TestValue 

Wait(x) added in v16.71.3 A

If this line is anywhere in a valid modular line, will wait X milliseconds before processing the batch

Examples:

⎗
✓
1
2
3
"Modular/TIMING:WhenUse/Wait(500):log(Myself)" <- wait 500 milliseconds before processing the logs
"Modular/TIMING:OSA/Wait(900)/buff(Self, Protection, 2, 0, 1)" <- Wait 900 milliseconds before processing nothing
"Modular/TIMING:OSA/buff(Self, Protection, 2, 0, 1):Wait(1000):changepaniclevel(Self, Panic, NoCorrode)" <- Wait 1000 milliseconds before processing buff() and changepaniclevel()

Dynamic Locale (Text Blocks and Custom Properties)

Related functions: dlactivatepath, dldeactivatepath, dlclearallactivepaths, dlsetonepathvalue
Allows buff description/flavor to dynamically change by hiding/showing text blocks or custom values

Text Blocks added in v21.94.4 A

By writing this syntax [INDEX](content) will trigger Dynamic Locale to parses it
I call this a block: [INDEX](content)
INDEX can be any integer >= 0

You can nest blocks inside each other, examples:

  • [INDEX_1]([INDEX_2](content_2))
  • [INDEX_1](content_1[INDEX_2](content_2))
  • [INDEX_1](partofcontent_1[INDEX_2](content_2)partofcontent_1)

Path: Combination of all INDEX that lead to a specific block
Examples:

  • Deals +[0](50 damage)[1](50% damage)
    • All paths: 0, 1
    • If path 1 is activated: Deals +50% damage
    • If no path is activated: Deals +
  • Deals +[0](50 damage[0]( and extra [0](+25% damage)[1](+37 damage)))[1](50% damage)
    • All paths; 0, 1, 0-0, 0-0-0, 0-0-1
    • If path 0-0-1 is activated: Deals +50 damage and extra +37 damage
    • If path 0-0-0 and 1 is activated: Deals +50 damage and extra +25% damage50% damage (no space between "damage" and "50%" here is accurate btw)
    • If path 0-0 is activated: Deals +50 damage and extra

Activate a specific path by using dlactivatepath
Deactivate a specific path (also deactivate all sub-paths) by using dldeactivatepath
Deactivate all path by using dlclearallactivepaths
Replace a path's content by using dlsetonepathvalue

For who are curious, Dynamic Locale detects ( and ). You still can have ( and ) inside a Text Block's content like Deal +[0](50 damage (once per turn)) -> Deal +50 damage (once per turn) (Path 0 is activated)

Custom Properties added in v20.90.4 A

Use tags wrapped in <!_> (_ is a tag) will trigger Dynamic Locale to parses it
You can have Custom Properties inside Text Blocks too

Tags
Tag Description
POTENCY# The potency value of the buff, # being the active round (0: this turn; 1: next turn; 2: sum of this turn and next turn)
COUNT# The potency value of the buff, # being the active round (0: this turn; 1: next turn; 2: sum of this turn and next turn)
NAME The buff's name
inst# The unit's name with instance ID = # (any newline \n will be replaced with whitespace)

Examples:

  • Deal +<!POTENCY0>% damage -> Assume the potency value is 77: Deals +77% damage
dlactivatepath(index, index, ...) (Only for buff scripts) added in v21.94.4 A

Activate a Text Block with a valid path

  • index: An INDEX
    Example: dlactivatepath(1,2,0) -> Activate path: 1-2-0
dldeactivatepath(index, index, ...) (Only for buff scripts) added in v21.94.4 A

Deactivate a Text Block with a valid path. Also deactivate all sub-paths in the process

  • index: An INDEX
    Example: dldeactivatepath(5) -> Deactivate path: 5
dlclearallactivepaths() (Only for buff scripts) added in v21.94.4 A

Deactivate all active paths of the buff

dlsetonepathvalue(newContent, isModularVALUE, index, index, ...) (Only for buff scripts) added in v22.98.4 A

Replace a Text Block's contents with newContent with a specific path

  • newContent: Must be a string
  • isModularVALUE: true | false. Set this to true if your newContent is a Modular's VALUE (Example: newContent = VALUE_7)
  • index: An INDEX

Examples:
"Blob is a talented [7](Lethe[5]( modder))"
Lets say path 7-5 is activated
=> "Blob is a talented Lethe modder"
Now i run this dlsetonepathvalue('s genius, false, 7, 5)
The string becomes "Blob is a talented [7](Lethe[5]('s genius))"
=> "Blob is a talented Lethe's genius"

"You have [1](7) business days to react!"
Lets say path 1 is activated
=> "You have 7 business days to react!"
Now i run this dlsetonepathvalue(VALUE_2, true, 1) (Assume VALUE_2 = 17)
The string becomes "You have [1](17) business days to react!"
=> "You have 17 business days to react!"

Custom Timings / Supports

CombatEnd added in v27.113.4 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Runs after all Skills has been used (does not count skills after this timing)

AfterSlots added in v17.80.3 A

Supports: Passive, Buff and Support Passive scripts

  • Self Unit
  • Self Action
  • Target Action

See AfterSlots in passive timings or skill timings

OnEquipDefense(refreshSlotView) added in v17.80.3 A

Supports: Passive, Buff and Support Passive scripts

  • Self Unit
  • Self Action
  • Target Action

Runs after a defense skill is equipped. This counts as a timing that uses a skill (more specifically the defense skill created), so things like getskillid work here

  • refreshSlotView: true or false | Setting this to true refreshes the view on the dashboard after the timing is run. Useful if you did something with the newly created defense skill and want it to show on the dashboard immediately

OnGainBuff(keyword?) added in v1.27.11 ! A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run every time the unit gains keyword buff

  • keyword (optional) : The buff's keyword | Leaving empty or None for all buff

Exclusive functions: gbkeyword, gbstack, gbturn, gbactiveround, gbsource

Examples:

⎗
✓
"Modular/TIMING:OnGainBuff(Laceration)/..." <- this script will only run when the unit gains Bleed
"Modular/TIMING:OnGainBuff(None)/..." <- this script will run when the unit gains **ANY BUFF**

OnLoseBuff(keyword?) added in v8.53.16 A (Temporary Disabled)

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run every time the unit lose keyword buff (does not work with gbsource)

  • keyword (optional) : The buff's keyword | Leaving empty or None for all buff

Exclusive functions: gbkeyword, gbstack, gbturn, gbactiveround, gbsource

Examples:

⎗
✓
"Modular/TIMING:OnLoseBuff/..." <- this script will run when the unit lose **ANY BUFF**

OnBeforeLoseBuff(keyword?) added in v8.53.16 A (Temporary Disabled)

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run every time the unit is about to lose keyword buff (does not work with gbsource)

  • keyword (optional) : The buff's keyword | Leaving empty or None for all buff

Exclusive functions: gbkeyword, gbstack, gbturn, gbactiveround, gbsource

Examples:

⎗
✓
"Modular/TIMING:OnBeforeLoseBuff(Laceration)/..." <- this script will only run when the unit is about to lose Bleed

OnLowMorale added in v6.46.16 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run every time the unit is in Low Morale

  • Do note this timing is still in testing phase

OnOtherLowMorale added in v6.46.16 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run every time another unit is in Low Morale

  • Do note this timing is still in testing phase

OnPanic added in v6.46.16 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run every time the unit is in Panic

  • Do note this timing is still in testing phase

OnRecoverBreak added in v6.46.16 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run every time the unit recover from Stagger

OnOtherRecoverBreak added in v6.46.16 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run every time another unit recover from Stagger

OnTakeSwitchingVibration added in v16.71.3 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action
  • Killer Unit

Run when a unit change of vibration type

OnOtherTakeSwitchingVibration added in v16.71.3 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action
  • Killer Unit
  • Victim Unit

Run when another unit change of vibration type

OnTakePiledVibration added in v16.71.3 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action
  • Killer Unit

Run when a unit is affected by Amplitude Entanglement

OnOtherTakePiledVibration added in v16.71.3 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action
  • Killer Unit
  • Victim Unit

Run when another unit is affected by Amplitude Entanglement

OnTakeSPDamage added in v16.71.3 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action
  • Killer Unit

Run when this unit takes SP damages (Change ctdsource) ("killer" becomes the unit that inflicted the damage)

Exclusive functions: getchangespvalue

OnOtherTakeSPDamage added in v16.71.3 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action
  • Killer Unit
  • Victim Unit

Run when another unit takes SP damages (Change ctdsource), ("killer" becomes the unit that inflicted the damage, "victim" become the unit that lost SP)

Exclusive functions: getchangespvalue

OnChangeSP added in v16.71.3 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run when this unit change SP

Exclusive functions: getchangespvalue

OnOtherChangeSP added in v16.71.3 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run when another unit change SP

Exclusive functions: getchangespvalue

OnUnOpposed added in v17.73.3 A

Supports: Passive and Buff scripts
Run when this unit getting attacked by an 'Unopposed Attack'

SortAction added in v19.88.3 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Run after the game sorts the action list (Decide skill/action orders)

Related functions: setactionindex

BeforeRoundStart added in v20.90.3 A

Supports: Passive and Support Passive scripts

  • Self Unit
  • Self Action
  • Target Action

Run before Turn Start

WaitCommand added in v22.91.4 A

Supports: Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Supports: Skill scripts

  • Self Unit
  • Self Action
  • Target Action

Run after AfterSlots. setmaintarget pre-combat phase mode only works here beside SpecialAction timing

OnSlotSelectsTarget added in v24.102.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

ONLY WORKS IN FOCUSED (Abnormality) ENCOUNTERS
Works in passive, buff and skill scripts
Run when the unit selects a skill slot with a skill

Related functions: getexpectedskillpower

OnSlotSelectedAsTarget added in v24.102.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

ONLY WORKS IN FOCUSED (Abnormality) ENCOUNTERS
Works in passive, buff and skill scripts
Run when a skill slot of the unit is selected as the main target of another skill

Related functions: getexpectedskillpower

AfterCoinParrying added in v25.112.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action
  • Coin Model

Runs after a Coin flip in a Parry
You can use Modular's ADDER consequences here like final, dmgmult, clash, etc...
Flow: DuelClash > BeforeAnyFlip > AfterCoinParrying > AfterDuelClash

OnActivateDurante(sepiraKeyword?) added in v26.113.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action (Provided if in a Skill Script)
  • Target Action

Runs after activating Dante's sepiraKeyword ability

  • sepiraKeyword? (optional) : The Sepira's keyword | Leaving empty or NONE to make this script runs after any Dante ability activation

Sepira Keyword:

  • NONE
  • HOKMA (PIGRITIA)
  • BINAH (SUPERBIA)
  • CHESED (MOROSITAS)
  • GEBURA (IRA)
  • TIPHERETH
  • NETZACH
  • HOD
  • YESOD
  • MALKUTH
  • MALKUTH_IMPERFECT

AfterDuranteAnim(sepiraKeyword?) added in v31.115.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action (Provided if in a Skill Script)
  • Target Action

Runs after Dante's sepiraKeyword ability animation ran (The animation with a clock with a Sepira icon on stop of it whenever you activate a Durante ability)

  • sepiraKeyword? (optional) : The Sepira's keyword | Leaving empty or NONE to make this script runs after any Dante ability animation (For list of valid sepiraKeyword, read OnActivateDurante timing description)

OnDashboardSkillHover added in v31.115.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Runs when a skill on the dashboard get hovered by the user's in-game mouse

OnSlotHoverTarget added in v31.115.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Runs when hovering a selected skill over a targetable skill slot

OnSlotHoveredBy added in v31.115.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Runs when a skill slot of this unit is hovered over by a selected skill

OnDeselectSin added in v33.118.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Runs when the unit deselect a Skill (unchain a skill)

OnDeselectSinGlobal added in v33.118.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action (Target Action is set to the Action of the unit that deselect a Skill (unchain a Skill))

Runs whenever a Skill is deselected (unchain a Skill)

OpenInfo added in v34.120.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action (Is provided if used in a Skill Script)
  • Target Action

Runs when the unit get clicked on to open infomation window
Related functions: allowopeninfo

AfterDuelClashLog added in v35.123.4 A

Supports: Skill, Passive and Buff scripts

  • Self Unit
  • Self Action
  • Target Action

Runs after a Parry in a Duel
Flow: DuelClash > BeforeAnyFlip > AfterCoinParrying > AfterDuelClash -> AfterDuelClashLog
Related functions: getparryingclashpower


Acquirers and Consequences

coinoperator(unit, coin_index) added in v0.4.0 ! A

Return an integer representing the coin's operator type:
1 - ADD
2 - SUB
3 - MUL
-1 - Could not acquire the data

  • unit: Self | Target / MainTarget (Requires: Self / Target Action)
  • coin_index: The index of the coin, starting at 0. If this is higher than the highest coin index the skill has, it will be set to highest coin index

Examples:

⎗
✓
"VALUE_0:coinoperator(Target, 1)" -> Get the 2nd coin operator's type of the opponent's skill
"VALUE_1:coinoperator(Self, 0)" -> Get the 1st coin operator's type of the unit's skill

bufftype(keyword) added in v0.5.0 ! A

Return an integer representing the buff's type:
0 - Neutral
1 - Positive
2 - Negative

  • keyword: The buff's keyword

Note

This function works with all in-game buffs and all custom buffs

Examples:

⎗
✓
"VALUE_0:bufftype(Combustion)" -> Returns 2 because Burn is a negative buff

ovwatkres(Multi-Target, atkType, newValue, add, defaultLimit?) added in v0.7.0 ! A

Overrides an attack resistance value

  • Multi-Target: Multi-Target
  • atkType: SLASH | PENETRATE | HIT
  • newValue: any integer (this will be divided by 100)
  • add: true | false
  • defaultLimit? (optional, any value): Adding this optional argument will limit the unit's resistance value in range of 0.00 to 2.00

Example (Blunt resistance):

⎗
✓
"ovwatkres(Enemy12, HIT, -42, true)" -> Before: x2 | After: x1.58
"ovwatkres(Enemy12, HIT, -789, true, imlimitingit)" -> Before: x2 | After: x0.00

ovwsinres(Multi-Target, sinType, newValue, add, defaultLimit?) added in v0.7.0 ! A

Overrides a sin resistance value

  • Multi-Target: Multi-Target
  • sinType: CRIMSON | SCARLET | AMBER | SHAMROCK | AZURE | INDIGO | VIOLET
  • newValue: any integer (this will be divided by 100)
  • add: true | false
  • defaultLimit? (optional, any value): Adding this optional argument will limit the unit's resistance value in range of 0.00 to 2.00

Example (Gloom resistance):

⎗
✓
"ovwatkres(Ally7, AZURE, 337, false)" -> Before: x0.75 | After: x3.37
"ovwatkres(Self, WRATH, 456, false, lethecoinsisreal)" -> Before: x0.37 | After: x2.00

refreshspeed(Multi-Target) added in v0.8.0 ! A

Refreshes a unit's speed (reroll the unit's Speed)
Useful cases: Fix a unit's speed when using MaxSpeedAdder or MinSpeedAdder system abilities; When applying Haste or Bind on RoundStart

Examples:

⎗
✓
"refreshspeed(Ally99)" -> Refresh all allies' speed (Including self)

destroybuff(...) added in v0.9.0 ! A

Destroys one or more buffs

  • destroybuff(Multi-Target, keyword, destroyRound)

    Single buff destroy mode

    • Multi-Target: Multi-Target
    • keyword: the buff's keyword
    • destroyRound: the active round of the existing buff
      • 0: this turn
      • 1: next turn
      • 2: this turn and next turn
        Examples:
        ⎗
        ✓
        "destroybuff(Enemy99, Vibration, 0)" -> Destroy Tremor currently on all enemies
        "destroybuff(AllyExceptSelf99, Sinking, 1)" -> Destroy Sinking currently on all allies except self will gain next turn
        
  • destroybuff(Multi-Target, mode, destroyRound, amount, includeCantBeDespelled?)

    Buff type / buff category based destroy mode
    Destroys amount of existing buffs chosen randomly, filtered by buff type / buff category

    • Multi-Target: Multi-Target
    • destroyRound: the active round of the existing buff
      • 0: this turn
      • 1: next turn
      • 2: this turn and next turn
    • amount: number of buffs to destroy (any integer >= 0) or All (all buffs filtered by mode)
    • includeCantBeDespelled (optional, any value): If exist, buffs with "canBeDespelled = false" are included
    • mode: filter which buffs to destroy. Either buff type or buff category, you cant use both.
      • Buff Type: Neutral | Positive | Negative
      • Buff Category:
        SIN
        RESOURCE
        SHIELD_MANAGER
        BREATH
        CHARGE
        COMBUSTION
        LACERATION
        VIBRATION
        BURST
        SINKING
        BULLET
        CAN_GET_ONLY_BY_SYSTEM
        AACFPBBCA
        FREISHUTZ_OUTIS_EGO_BULLET
        DUEL_DECLARATION
        CONCENTRATED_ATTACK
        DIANXUE
        BURSTREACTIVE
        IGNORE_CHECED_CORRECTION_EXCLUSION
        TURN_IS_ALSO_LOADED_BULLET
        VIBRATION_CONVERTED
        VIBRATION_MERGED
        SUPPORTIVE_PROTECT
        Examples:
        ⎗
        ✓
        "destroybuff(EveryTarget, Positive, 0, All, whynot)" -> Destroys all positive buffs currently on every target (including buffs that can not be despelled)
        "destroybuff(MainTarget, RESOURCE, 1, 2)" -> Destroys 2 RESOURCE type buffs (like Bullet) currently on the main target will gain next turn (does not include buffs that can not be despelled)
        

getatkres(Single-Target, atkType) added in v0.11.1 ! A

Returns an integer representing the target's attack resistance value (doesn't work on abnor)
x0.75 => return 75

Examples:

⎗
✓
"VALUE_0:getatkres(Self, SLASH)" -> Assume the self unit's Slash resistance is x0.75, returns 75

getsinres(Single-Target, sinType) added in v0.11.1 ! A

Returns an integer representing the target's sin resistance value (doesn't work on abnor)
x0.01 => return 1

  • Single-Target: Single-Target
  • sinType: CRIMSON | SCARLET | AMBER | SHAMROCK | AZURE | INDIGO | VIOLET

Examples:

⎗
✓
"VALUE_0:getsinres(Target, AZURE)" -> Assume the target's Gloom resistance is x0.01, returns 1

useddefaction(Single-Target) added in v0.13.3 ! A

If the unit has used a defense action this turn then return 1, else return 0

deactivebreak(Multi-Target, breakIndex, sort, reverseIndex?) added in v0.13.3 ! A

Deactivates 1 or all active stagger bars

  • Multi-Target: Multi-Target
  • breakIndex: The index of the stagger bar (integer). Index starts at 0. Use -1 to deactivate all stagger bars (this will ignore sort and reverseIndex as they don't matter anymore)
  • sort: true | false. If true, the list of active stagger bars will be sorted in descending order (THIS ARGUMENT IS NOT REQUIRED IF breakIndex IS -1)
  • reverseIndex (optional, any value): Index still starts at 0 but the active stagger bars list is reversed. THIS RUNS AFTER sort

Examples:

⎗
✓
"deactivebreak(Self, 1, true)" -> Deactivate the second active stagger threshold of the self unit (sorted in descending order)
"deactivebreak(Target, 1, false, yes)" -> Lets say the active stagger threshold list of the target is '20, 30, 40, 10'. Deactivate the 40% HP stagger threshold

bufcategory(Multi-Target, buffCategory, stack, turn, activeRound, StackTurnAddRespectively, amount) added in v0.14.5 ! A

Pick amount of existing buffs on the target(s) then add/remove potency and count based on the buff category. Accept negative values

  • Multi-Target: Multi-Target
  • stack: any integer (potency/stack)
  • turn: any integer (count/turn)
  • activeRound: the active round of the existing buff
    • 0: this turn
    • 1: next turn
    • 2: this turn and next turn
  • StackTurnAddRespectively:
    • true: adds stack potency and turn count for each selected buff
    • false: For buffs without Count, adds (stack + turn) potency. For buffs have Count, add random X potency and Y count (X + Y = stack + turn)
  • amount: number of buffs affected (any integer >= 0)
  • buffCategory: affected buff category (select one from the list below)
    SIN
    RESOURCE
    SHIELD_MANAGER
    BREATH
    CHARGE
    COMBUSTION
    LACERATION
    VIBRATION
    BURST
    SINKING
    BULLET
    CAN_GET_ONLY_BY_SYSTEM
    AACFPBBCA
    FREISHUTZ_OUTIS_EGO_BULLET
    DUEL_DECLARATION
    CONCENTRATED_ATTACK
    DIANXUE
    BURSTREACTIVE
    IGNORE_CHECED_CORRECTION_EXCLUSION
    TURN_IS_ALSO_LOADED_BULLET
    VIBRATION_CONVERTED
    VIBRATION_MERGED
    SUPPORTIVE_PROTECT

Examples:

⎗
✓
"bufcategory(Ally12, BREATH, 3, 7, 0, true, 2)" -> All allies including self gain 3 potency and 7 count of 2 random Poise related buffs

defcorrection(Multi-Target, newValue) added in v0.18.7 ! A

Set the unit's defense value to newValue

Examples:

⎗
✓
"defcorrection(Enemy12, 69)" -> Set the defense level of all enemies to 69

addunitscript(Multi-Target, id) added in v0.19.7 A

Add an 'unit script' to the target(s)

  • Multi-Target: Multi-Target
  • id: unit script's id (must be a string)

Examples:

⎗
✓
"addunitscript(Self, 10212)" -> Add the unit script of 'Heishou Pack - Mao Branch Adept Faust' to the self unit

changedefense(Multi-Target, defenseSkillId) added in v0.20.10 A

Change the defense skill of the unit and won't change back to original defense skill until you change it manually
The defense skill MUST BE in the unit's arsenal

  • Multi-Target: Multi-Target
  • defenseSkillId: the id of the defense skill

Examples:

⎗
✓
"changedefense(Self, 2147483647)" -> Change the defense skill of the self unit to skill with skill's id = 2147483647 (Assume skill 2147483647 is a defense skill)

unitfaction(Single-Target) added in v0.21.11 ! A

Returns an integer representing the unit's faction (works on both normal unit and abnor)
1 - PLAYER (Ally / Player faction)
0 - ENEMY (Enemy faction)

Examples:

⎗
✓
"unitfaction(Self)" -> Returns 1 (Assume the unit is on the player's side)

saslotindex() added in v0.22.11 A

Uses with 'SpecialAction' timing
Returns an integer representing the slot index (of that unit) which user last performed a 'Special Action' on

gbstack() added in v1.27.11 ! A

Requires: In a Passive or a Buff script
Uses with 'OnGainBuff' timing
Returns an integer representing the stack/potency of the gained buff

gbturn() added in v1.27.11 ! A

Requires: In a Passive or a Buff script
Uses with 'OnGainBuff' timing
Returns an integer representing the turn/count of the gained buff

gbactiveround() added in v1.27.11 ! A

Requires: In a Passive or a Buff script
Uses with 'OnGainBuff' timing
Returns an integer representing the active around of the gained buff
0 - This turn
1 - Next turn

gbsource() added in v1.27.11 ! A

Requires: In a Passive or a Buff script
Uses with 'OnGainBuff' timing
Returns an integer representing the source of the gained buff
0 - NONE
1 - SKILL
2 - EVENT
3 - BUFF
4 - PASSIVE
5 - SYSTEM_ABILITY
6 - EGO_GIFT
7 - PATTERN
8 - STAGE
9 - UNIT

comparer(Single-Unit, ValueToCompare, Operator, DataID, DataSource?) added in v1.33.14 A

Compare input to an mtdata
Return 1 if the comparison result is true. Return 0 if the comparison result is false

  • Single-Target: Single-Target
  • ValueToCompare: The string to compare
  • operator:
    • =: equal
    • >: the data retrieved contains input
    • <: input does not contain the data retrieved
  • DataID: The DataID of the mtdata (as string)
  • DataSource (optional): If this value is set, search for a data with the DataID AND DataSource

hasbuffkeyword(Single-Target, targetKeyword, checkType, checkKeyword, print?) added in v1.33.14 A

Check if the targetKeyword buff's checkType has checkKeyword.
Return 1 if true, 0 if false.

  • Single-Target: Single-Target (you should leave this empty/random input like _ if targetKeyword is current)
  • targetKeyword: Any buff keyword | Use current to target the buff itself (only for buff scripts)
  • checkType: which property of the buff to check
    • main: main keyword
    • sub: sub keyword
    • maub | mainsub: main and sub keyword
    • category: category keyword
  • checkKeyword: Any buff / buff-category keyword
  • print(optional): If this value is set, store an mtdata to the unit equal to SetMTData(Self, BuffKeyword_CheckType, Result, HasBuffKeyword)

getmapdata(mapName, data, dataID?) added in v1.33.14 A

Return the mapName's data

  • matchType: any map name (a string) | use current for the current map the game is using
  • data:
    • size: the map's size (rounded down)
    • active: Return 1 if the map is active (the game is using it). Return 0 if the map is inactive
    • id: Store this value to an mtdata on the unit equal to SetMTData(Self, dataID, MapID, GetMapData)
  • dataID (optional): only used if data is ID

editbuffmax(Multi-Target, buffOwner, property, mode, addOrSet, value, loseValueAtMax?) added in v1.33.14 A

Add or set the maximum potency/count value of a buff

  • Multi-Target: Multi-Target (you should leave this empty/random input like _ if buffOwner is current)
  • buffOwner: Any buff keyword | current to target the buff itself (only for buff scripts)
  • property: which property of the buff the function edits
    • stack: the buff's potency
    • count: the buff's count
    • both: the buff's potency and count
  • mode:
    • adder: edit the buff's bonus maximum value
    • vanilla: edit the buff's vanilla maximum value
    • both: edit both buff's bonus maximum value and vanilla maximum value
  • addOrSet:
    • add: add value
    • set: set to value
  • value: any integer (accepts negative value)
  • loseValueAtMax (optional):
    • info: if there is a problem with the function (modifier), use this
    • lowmax: If the buff’s current potency/count is greater than it's respective maximum value, reduce the exceeded value by the difference (current − max)
    • both: do both what info and lowmax do

changehp(Multi-Target, newHp, mode, damageSource, buffKeyword, deactivePassedBreakSection, attacker?) added in v1.35.16 A

Set the targets' HP to newHp

  • Multi-Target: Multi-Target
  • newHp: any integer value >= 0
  • mode:
    • static: Change HP to newHp HP value
    • %: Change HP to newHp% of the unit's max HP
  • damageSource: Source of the damage, choose one from the list below
    COMBAT
    BUFF
    PASSIVE
    SKILL
    EVENT
    EGO_GIFT
    STAGE
    SYSTEM
    SYSTEM_ABILITY
    FORCED
    NONE
  • buffKeyword: Default = None; Any buff keyword, only matter if damageSource is BUFF (Example: you know when Bleed got activated and you see a Bleed icon float up on the enemy right?)
  • deactivePassedBreakSection: true | false. If true, deactivate an active stagger bar if newHp value is set to a value lower than a stagger threshold value (for some reason, this can only deactivate 1 active stagger bar. Who knows why)
  • attacker (optional): Single-Target (who is the attacker, ik u will leave this empty for most of the time)

Examples:

⎗
✓
1
2
3
"changehp(Self, 1337, FORCED, None, false)" -> Set the self unit's HP to 1337
"changehp(Target, 101, COMBAT, None, true, Self)" -> Set the target's HP to 101, the damage is dealt by the self unit and also deactivate a stagger threshold if new HP value is under a stagger threshold value
"changehp(Self, 420, BUFF, Burst, false, Target)" -> Set unit self's HP to 420, the damage is dealt by Target, activated through Rupture buff

changesp(Multi-Target, newSp) added in v1.35.16 ! A

Set the targets' SP to newSp

Examples:

⎗
✓
"changesp(Ally12, 15)" -> Set all allies including self SP to 15

changepaniclevel(Multi-Target,Panic-Level, Variable ) added in v6.46.16 A

Set the units current sanity state to Panic-Level

  • Multi-Target: Multi-Target
  • Panic-Level:
    • 0 Get out of Low Morale and Panic or Corrosion (if possible)
    • 1 Set this unit to Low Morale
    • 2 Set this unit to Panic
    • 3 Corrode this unit (only if it can corrode)
  • Variable: Optional conditionals required for some Panic-Level or just as an option
    • Forcefully (Used for Panic-Level=0) Get this unit out of Low Morale and Panic if this unit normally shouldn't
    • Latest (Used for Panic-Level=3) Set this unit Corrosion to the last EGO used
    • Random (Used for Panic-Level=3) Set this unit Corrosion to a random EGO
    • TETH (Used for Panic-Level=3) Set this unit Corrosion to the current TETH EGO if possible
    • HE (Used for Panic-Level=3) Set this unit Corrosion to the current HE EGO if possible
    • WAW (Used for Panic-Level=3) Set this unit Corrosion to the current WAW EGO if possible
    • ALEPH (Used for Panic-Level=3) Set this unit Corrosion to the current ALEPH EGO if possible

changepanictype(Multi-Target, Panic-Type, Panic-Propriety, OptBuff) added in v6.46.16 A

Set the unit's sanity type to Panic-Type

  • Multi-Target: Multi-Target
  • Panic-Type: The panic-type to change into (eg. Ruins)
  • Panic-Propriety: The unit propriety to change the Panic from
    • Default (Self Explanatory)
    • Cached Couldn't find any differences with default
    • Buff Use it if you want to overwrite the Panic-Type by using a Buff (or overwriting it), requires to have the OptBuff case filled
  • OptBuff Required field if Panic-Propriety is set to Buff
    • Keyword Select the buff using the keyword
    • Current If used from buff script, select this buff

getfinal() added in v6.46.16 A

Requires: In a Skill script or, Self Action is provided
Get the current skill Final Power

getpaniclevel(Single-Target) added in v6.46.16 A

Get an integer representing the unit sanity state of the unit

  • Single-Target: Single-Target
  • Return-Type the values equal to the return types
    • -1 If this unit is in Corrosion or not in a quantifiable Panic-Level
    • 0 If the Unit is not in Low Morale, Panic or Corrosion
    • 1 If the unit is in Low Morale
    • 2 If the unit is in Panic

diduseskillprevturn(Single-Target, skillId) added in v6.46.16 ! A

Check if the unit used skillId skill last turn. Returns 1 if true, returns 0 if false.

Examples:

⎗
✓
"didusedskillprevturn(Self, 1519284218)" -> Assume the self unit used skill 1519284218 in the previous turn, returns 1

getbuffstackgainedthisturn(Single-Target, buffKeyword) added in v6.46.16 A

Returns the buffKeyword's buff stack/potency the unit has gained this turn

Examples:

⎗
✓
"getbuffstackgainedthisturn(Self, Combustion)" -> Lets say the self unit has gain total of 21 Burn potency this turn, returns 21

getbreaklevel(Single-Target) added in v6.46.16 A

Get the current stagger level of the unit.
Returns
0 if the unit is not staggered
1 if the unit is staggered (Stagger)
2 if the unit is staggered+ (Stagger+)
3 if the unit is staggered++ (Stagger++)

isactionable(Single-Target) added in v6.46.16 ! A

Returns 1 if the unit can make action, returns 0 if the unit can't make action (Staggered, immobilized,...)

instantdeath(Multi-Target, ignoreImmortal, dmgSource, killer?, action?) added in v6.46.16 A

Instantly kill all Multi-Target

  • Multi-Target: Multi-Target
  • ignoreImmortal: true | false. If true, ignore all immortal effect(s) to kill the unit. If false, unit with immortal effect(s) won't be killed
  • dmgSource: source of the damage, choose one from the list below
    COMBAT
    BUFF
    PASSIVE
    SKILL
    EVENT
    EGO_GIFT
    STAGE
    SYSTEM
    SYSTEM_ABILITY
    FORCED
    NONE
  • killer (optional): Single-Target. Determine who is the killer
  • action (optional): Self | Target / MainTarget. Specifies which action (mostly skill) is credited with the kill and therefore triggers any On Kill effects (Haven't test this one yet)

Examples:

⎗
✓
"instantdeath(Enemy99, true, FORCED)" -> Kill all enemies, ignore immortality
"instantdeath(AllyExceptSelf99, false, SKILL, Self, Self)" -> Assume this script is in a passive, used in a timing with a skill, kill all allies except self, does not ignore immortality, activated through the self unit's skill  

lbreak(Multi-Target, staggerType) added in v6.47.16 ! A

Staggers the target immediately (This consequence exists because break can not be used in lua modular)

  • Multi-Target: Multi-Target
  • staggerType: natural | force | both

getopposkillid() added in v6.48.16 ! A

Requires: Target Action is provided
No Arguments. Returns the ID of the skill the Target being used. Only usable in a Clash. Returns 0 if target's skill not found.

removecoin(Target, coinIndex, coinIndex...) added in v6.49.16 ! A

Removes any number of coins

  • Target: Self (Requires: In a Skill script or, Self Action is provided) | Target / MainTarget (Requires: Target Action is provided)
  • coinIndex: The coin's index, input -1 for coin scripts to target themselves (Requires: In a Coin script) (coin index starts at 0) (You can input as many indexes as you need). When inputing more than 1 coin index, all coinIndex must be in ascending order. If the first coinIndex = All, ignore all other coinIndexs and remove all coins of the skill instead

Examples:

⎗
✓
1
2
3
4
"removecoin(Self, 0)" <- remove the first coin
"removecoin(Self, 0,1,2)" <- remove the first, second and third coin
"removecoin(Self, All)" <- remove all coins
"removecoin(Self, All, 1, 2)" <- still remove all coins

addskill(Multi-Target, SkillID, Level, Uptie, Amount) added in v8.53.16 A

  • Multi-Target: Multi-Target
  • SkillID the ID of the Skill
  • Level the Level of the Skill
  • Uptie the Uptie of the Skill
  • Amount the Amount of the Skill in the pool

removeskill(Multi-Target, Multi-Skill) Does not remove base skill in the UI for the "Summary" tab added in v8.53.16 A

hasskill(Single-Target, SkillID) added in v8.53.16 A

If the target has the skill then returns 1, else returns 0

getskilldata(Single-Target, Single_Skill, Data-Type, Var) added in v8.53.16 A

  • Single-Target: Single-Target
  • Single-Skill: Single-Skill
  • Data-Type: The type of data to return, select one from below
    • Scale returns the coin power
    • ScaleAdder returns the additional coin power (returns -1 if the the skill is not used this Turn)
    • Final returns the Final Power (returns -1 if the skill does not target a skill)
    • Clash returns the Clash Power (returns -1 if the skill does not target a skill)
    • Weight return the Attack Weight (returns -1 if the skill does not target a skill)
    • ogWeight returns the original Attack Weight
    • Evade returns the additional Evade Power (returns -1 if the skill is not used this Turn, or does not target a skill)
    • Default returns the skill Base Power
    • Motion returns the skill Motion (refer to the enum, will be added later)
    • Level returns the skill Level
    • SkillAtkLevel returns the skill Offense Level
    • DefType same as getskilldeftype
    • AtkType same as getskillatk()
    • Rank same as getskillrank()
    • Fixed same as getskillfixedtarget()
    • Attribute same as getskillattribute()
    • EgoType same as getskillegotype()
    • IsAction returns 1 if the skill is being used this Turn
    • UseCount returns the amount of time the skill is being used this Turn
    • TargetClash returns the Clash Power of the skill this is clashing with (returns -1 if the skill is not used this Turn, or does not target a skill)
    • TargetType returns the type of the skill target (refer to the enum, will be added later) (returns -1 if the the skill is not used this Turn)
    • TargetCount returns the amount of Targets (returns -1 if the the skill is not used this Turn)
    • RealTargetCount returns the amount of Targets (Was added in case TargetCount bugs) (returns -1 if the the skill is not used this Turn)
    • IsTargettingName returns if the skill is targetting a unit with a specific name (returns -1 if the the skill is not used this Turn)
    • IsTargettingUniqueName returns if the skill is targetting a unit with a specific unique name (returns -1 if the the skill is not used this Turn)
    • IsTargettingID returns if the skill is targetting a unit with a specific ID (returns -1 if the the skill is not used this Turn)
    • IsTargettingMainName returns if the skill main target has a specific name (returns -1 if the the skill is not used this Turn)
    • IsTargettingMainUniqueName returns if the skill main target has a specific unqiue name (returns -1 if the the skill is not used this Turn)
    • IsTargettingMainID returns if the skill main target has a specific ID (returns -1 if the the skill is not used this Turn)
    • ID or Invalid Type returns the skill ID
  • Var is either a variable needed for a Data-Type or a Target-Coin
    • Single-Coin used for ScaleAdder and Clash Single-Coin
    • Multi-Coin used for Final Multi-Coin
    • Name used for IsTargettingNameand IsTargettingMainName
    • UniqueName used for IsTargettingUniqueNameand IsTargettingMainUniqueName
    • ID used for IsTargettingIDand IsTargettingMainID

addcoin(Multi-Target, Multi-Skill, CoinIndex, VAR_4, VAR_5, VAR_6, CopyStaticData) added in v8.54.17 A

  • Multi-Target: Multi-Target
  • Multi-Skill: Multi-Skill
  • CoinIndex: Set the coin current index (Origin Index is set as last, Real index is set as this number)
  • VAR_4: this consequence has two modes, you can either create a coin based on another coin (Single-Unit to Single-Coin); or make a coin based on specific settings (Power to Color)
  • VAR_5
    • Single-Skill: Single-Skill
    • Operator: The coin operator to set
  • VAR_6
    • Single-Coin: Single-Coin
    • Color: Set the color of the coin
  • CopyStaticData: Add this argument if you only want to copy the static data of the targetted coin

getcurrentpower(Target) added in v8.64.25 ! A

Get the current skill's power

  • Target: Self (Requires: Self Action is provided) | Target / MainTarget (Requires: Target Action is provided)

clearskillabilities(Target) added in v8.64.25 A

Clear/Remove all abilities of the skill

  • Target: Self (Requires: Is in a Skill script or, Self Action is provided) | Target / MainTarget (Requires: Target Action is provided)

clearcoinabilities(Target, coinIndex?, coinIndex?, ...) added in v8.64.25 A

Clear/Remove all abilities of coin(s). If there are no coinIndex?, clear all coins' abilities

  • Target: Self (Requires: Is in a Skill script or, Self Action is provided) | Target / MainTarget (Requires: Target Action is provided)
  • coinIndex? (optional): The coin's index, input -1 for coin scripts to target themselves (Requires: Is in a Coin script) (coin index starts at 0) (You can input as many indexes as you need)

Examples:

⎗
✓
"clearcoinabilities(Self)" <- Clear all abilities of all coins
"clearcoinabilities(Self, 1)" <- Only clear all abilities of the second coin

addskillability(Multi-Target, Multi-Skill skillAbilityName, skillScriptName, turnLimit?) added in v8.64.25 A A

Add a skill script to the skill

  • Single-Target: Single-Target
  • Single-Skill: Single-Skill
  • skillAbilityName: A vanilla SkillAbility class name / If you want to put modular scripts, put "modReplace"
  • skillScriptName: The script name of the "skillAbilityName" / When putting modular lines, you have to start with the timing, and replace some characters
    • : with ;
    • / with \
    • ( with <<
    • ) with >>
  • turnLimit (Optional): The amount of the ability will trigger in a turn (not needed at all for modular lines, or some abilities)

Examples:

⎗
✓
1
2
3
"addskillability(Self, S-3, ChangeAttackDamageToZero, ChangeAttackDamageToZero, 0)"
"addskillability(Self, S-3, CoinScaleAdderIfFasterThanMainTargetMinDiff, CoinScaleAdder1IfFasterThanMainTargetMinDiff2, 0)"
"addskillability(Self, S-3, modReplace, WhenUse\\log<<Self, Yes>>)"

Read Me

Not all skill script can be added as alot of them required some specific datas

addcoinability(Target, coinScriptName, coinIndex?, coinIndex?, ...) added in v8.64.25 A

Add a coin script to specific coins. If there are no coinIndex?, add the coin script to every coin

  • Target: Self (Requires: Is in a Skill script or, Self Action is provided) | Target / MainTarget (Requires: Target Action is provided)
  • coinScriptName: A vanilla coin script name
  • coinIndex? (optional): The coin's index, input -1 for coin scripts to target themselves (Requires: Is in a Coin script) (coin index starts at 0) (You can input as many indexes as you need)

Examples:

⎗
✓
"addcoinability(Self, CanDealOnlySubTarget)" <- Add the coin script to every coin
"addcoinability(Self, CanDealOnlySubTarget, 0, 1)" <- Add the coin script to the first and second coin only

A Warning You Must Read

Not all coin script can be added as alot of them required some specific datas

removealltargetexceptmaintarget() added in v8.64.25 A

Requires: Self Action is provided
Remove all sub-targets from the skill, only let the skill attack the main target

setmaintarget(mode, ...)

  • setmaintarget(Mid, Single-Target) added in v8.64.25 A

    Requires: Self Action is provided
    Mid-combat phase mode
    mode = Mid
    Set the main target of the skill to Single-Target

    • Single-Target: Single-Target
      Examples:
      ⎗
      ✓
      "Modular/TIMING:BeforeUse/setmaintarget(Mid, RandomEnemy)" <- Set the main target of the skill to a random enemy
      
  • setmaintarget(Pre, Attackers, Target, SkillID, Count?, forceDuel?) added in v17.83.3 A (Bug fixes assisted by Doppelglower)

    Required TIMING: SpecialAction, WaitCommand, OnSlotSelectsTarget or OnSlotSelectedAsTarget
    Pre-combat phase mode
    mode = Pre
    Set the main target of Count skill(s) with skilll id = SkillID of every Attackers to Target

    • Attackers: Multi-Target
    • Target: Single-Target
    • SkillID: a Skill ID | -1. If input as -1 and this script is in a skill script, ignore Count and only set the main target of the skill this script is in
    • Count? (optional): Any integer >= 1 (Default = 99)
    • forceDuel? (optional): true | false (Default = false) If true, try to register a Duel (a Clash) between this skill and the targeted skill (i hope this is right, i dont fully understand the codes i wrote, guaranteed most of all time you dont even need to use this. This is like the support for very edge cases)
      Examples:
      ⎗
      ✓
      "Modular/TIMING:WaitCommand/setmaintarget(Pre, id114501, id1051206378, 114501)" <- Set the main target of all skills with skill id = 114501 of unit with id = 114501 to unit with id = 1051206378
      "Modular/TIMING:OnSlotSelectedAsTarget/setmaintarget(Pre,Self,Target,-1,99,true)" <- Assume this is in an abnor's skill script. When the skill slot of this script is selected as the main target of another skill, try to redirect this skill to that same skill slot and force a Duel (a Clash) between 2 skills regardless of Speed or skill abilities
      

modifysubtarget(Mode, exceptTargetedUnits, includeTargets, excludeTargets?) added in v8.64.25 A

Requires: Self Action is provided
Add/Remove specific sub-targets from the skill

  • Mode: Add | Remove (Self explanation)
  • exceptTargetedUnits: true | false. If true, automatically filters out any units that are already the main target or already present in the sub-target list of the skill
  • includeTargets: Multi-Target
  • excludeTargets? (optional): Multi-Target (Highest priority, runs after everything)

Examples:

⎗
✓
1
2
3
"Modular/TIMING:BeforeUse/modifysubtarget(Add, false, RandomEnemy2)" <- Add 2 random enemies to the skill sub-targets list. Those 2 enemies can be units that the skill already targeted
"Modular/TIMING:BeforeUse/modifysubtarget(Remove, false, inst3)" <- Remove the unit has instance id = 3
"Modular/TIMING:BeforeUse/modifysubtarget(Add, true, RandomEnemy7, FastestEnemy3) <- Add 7 random enemies (doesnt consider units that the skill already targeted) but ignore 3 fastest enemies

setspusage(newValue, add?) added in v8.64.25 A

Requires: In a Skill script or, Self Action is provided
Set the SP usage of the skill (like how EGO skills consume SP on use)

  • newValue: Any integer
  • add? (optional, any value): If exists, add newValue to the skill's SP usage instead

Examples:

⎗
✓
"setspusage(37)" <- Set the SP usage of the skill to 37
"setspusage(18, yeswhynot)" <- Add additional 18 SP usage of the skill (Assume the skill's default SP usage is 15, then i added 18. So the skill will consume 33 SP on use)

setlevel(Multi-Target, newLevel) added in v8.65.25 ! A

Set level, yes

  • Multi-Target: Multi-Target
  • newLevel: Any integer >= 1 (idk bro, if you input negative number the game might break)

Examples:

⎗
✓
"setlevel(Ally99, 3000)" -> Set level to 3000 for all allies including self

setmaxhp(Multi-Target, newMaxHp) added in v8.68.25 ! A

Self-Explaination

Examples:

⎗
✓
"setmaxhp(Self, 7175)" -> Set the max hp of the self unit to 7175 HP

getdefaultmaxhp(Single-Target) added in v8.68.25 ! A

Get the default max HP of the unit (Default max HP is the max HP when the unit's level is 0)

Examples:

⎗
✓
"getdefaultmaxhp(MainTarget)"

gethpincrement(Single-Target) added in v8.68.25 ! A

Get the HP increment by level of the unit multiplied by 100 and rounded down

Examples:

⎗
✓
"gethpincrement(Self)" -> Assume the Self unit's HP increment by level is 16.736 HP. Returns 1673

getmtdata(Single-Target, DataID, DataSource?) added in v16.71.3 A

Get a string value from a specific unit (This method tries to turn the value into a number, if it cannot it will return 0)

  • Single-Target: Single-Target (If the targetting is invalid, it will return data linked to the encounter)
  • DataID: The ID of the Data to search (as a string) (will return the first Data with ID equal to this)
  • DataSource (optional): If this valeu is set, will search for a string with the DataID and the DataSource (as a string)

Exemples:

⎗
✓
"getmtdata(Self, TestValue, TestSource)" <- if this value is VALUE_0, it will return the current value for VALUE_0

setmtdata(Single-Target, DataID, DataValue, DataSource?) added in v16.71.3 A

Set a string value to a specific unit

  • Single-Target: Single-Target (If the targetting is invalid, the data will become linked to the encounter)
  • DataID: The ID of the Data to search (as a string)
  • DataValue: The value of the Data (as a string)
  • DataSource(optional): The Source of the Data (as a string)

Exemples:

⎗
✓
"setmdtdata(Self, TestValue, VALUE_0, TestSource)" <- set a data with litteral VALUE_0 as value, with DataID = TestValue and DataSource = TestSource

getchangespvalue(Single-Target, TargetValue) added in v16.71.3 A

This value will crash your code if there the unit you target did not have any SP changes

  • Single-Target: Single-Target
  • TargetValue:
    • oldsp: return the SP before the change
    • newsp: return the SP after the change

getuptielevel(Single-Target) added in v16.72.3 A

Returns the uptie level of the unit

Examples:

⎗
✓
"getuptielevel(Self)" <- Assume the self unit uptie level is 3, returns 3

getskillslotindex() added in v17.80.3 A

Requires: Self Action is provided
Returns the slot index of the skill being used. 0 is the leftmost slot, increased by 1 whenever it shifts to right
Returns -1 if the unit is not using a skill

issinnerfielded(characterID) added in v17.80.3 A

Returns 1 when the sinner with the specified characterID is fielded. Else, returns 0

  • characterID:
    • 1: Yi Sang
    • 2: Faust
    • 3: Don Quixote
    • 4: Ryoshu
    • 5: Meursault
    • 6: Hong Lu
    • 7: Heathcliff
    • 8: Ishmael
    • 9: Rodion
    • 10: Sinclair
    • 11: Outis
    • 12: Gregor

addkeyword(Multi-Target, keywordName, isAssociation?) added in v17.80.3 A

Adds a keyword to the specified unit in the middle of the encounter

  • Multi-Target: Multi-Target
  • keywordName: Any string that could be a unitKeyword or association in the json data of a unit
  • isAssociation? (optional, any value): Whether or not the keyword is an association | If this option exists, it tries to add the keyword as an association ID instead

clearalltempskillabilities(Multi-Target) added in v17.80.3 A

Clears all temporary skill abilities (like changed sin affinities, scripts given via giveskillscript, etc.) from all of your skills in the dashboard

replaceallaffinity(Multi-Target, sinType, includeEgo?) added in v17.80.3 A

Replaces all of the skill affinities on your slots with the specified affinity

  • Multi-Target: Multi-Target
  • sinType: CRIMSON | SCARLET | AMBER | SHAMROCK | AZURE | INDIGO | VIOLET
  • includeEgo? (optional, any value): Whether or not to include EGO | If this option exists, it also changes the sin affinities of EGOs. They're normally ignored

replaceskillondashboard(Single-Target, column, topOrBottom, skillID) added in v17.80.3 A

Replaces a skill on a dashboard with a specified skill at the specified coordinates

  • Single-Target: Single-Target
  • column: The Skill Column Index | Which 'column' you want the skill to spawn in. 0 is the leftmost skill 'column', with it shifting to right with each increase in number
  • topOrBottom: Top Slot or Bottom Slot | Which slot you want the skill to spawn in. 0 for the Bottom Slot, 1 for the Top Slot
  • skillID: any integer | ID of the Skill you want to spawn in

Warning

If you set either column or topOrBottom to a number BELLOW 0, then those cordinates will not be used, and the function instead will scan your entire dashboard, and try to replace a skill on the dashboard slot with the desired skill, prioritizing the leftmost skill on the bottom row

upgradeskillondashboard(Single-Target, searchID, replaceID) added in v17.80.3 A

Converts the leftmost-bottom instance of a Skill into another Skill

  • Single-Target: Single-Target
  • searchID: any integer | Searched Skill ID | The ID of the skill you want to convert
  • replaceID: any integer | New Skill ID | The ID of the replacement skill

addduel(unit_1, unit_2, skillIDforUnit_1, skillIDforUnit_2) added in v17.83.3 A

Add a clash between 2 units instantly with determined skills

  • unit_1: The first unit. Single-Target
  • unit_2: The second unit. Single-Target
  • skillIDforUnit_1: the skill id for unit 1 to use (self-explanation) (the skill must be CLASHABLE). If input as -1, ignore unit_1 and use the skill of the Self unit if the this script's timing provides
  • skillIDforUnit_2: the skill id for unit 2 to use (self-explanation) (the skill must be CLASHABLE). If input as -1, ignore unit_2 and use the skill of the Target / MainTarget unit if this script's timing provides

Examples:

⎗
✓
"Modular/TIMING:StartBattle/addduel(id5601, id10611, 560104, 1061103)" (video below)
(Skill script) "Modular/TIMING:StartBattleSkill/addduel(Self, inst5, -1, 5924842)" <- Assuming the script's skill is an unopposed attack, 5924842 is an attack skill of unit inst5. This skill will clash against inst5's skill with skill ID = 5924842

Provided by Blob
addduel example

getworldpos(Single-Target, cordType) added in v17.83.3 A

Returns the world position cordType value of the unit multiplied by 100

Examples:

⎗
✓
"getworldpos(Self,x)" <- Assume the world position's x value of the unit is 17, returns 1700

setworldpos(...) added in v17.83.3 A

Set/move the unit to the world cords you want

  • setworldpos(Multi-Target, x, y, z)

    Set world position

    • Multi-Target: Multi-Target
    • x and y and z: the coordinate values (these values will be divided by 100)
      Examples:
      ⎗
      ✓
      "setworldpos(Enemy99, 100, 300, 700)" -> Set the world position of all enemies to coordinate (1, 3, 7)
      
  • setworldpos(Multi-Target, Sequences, loopCount?, loopType?)

    Move the target to the destinated world cords with determined time and easing style

    • Multi-Target: Multi-Target
    • Sequences: one or multiple sequences; A sequence must follow the format below
      • {x; y; z; duration; easingStyle}
        • x and y and z: the coordinate values (these will be divided by 100)
        • duration: how long it would take the unit to move (will be divided by 100)
        • easingStyle: Default = Linear (Move at constant speed). Visit https://easings.net/ for list of available easing styles. When choosing an easing style on the web, copy the name and remove the ease from it. Ex: i want to use easeOutExpo, you write OutExpo instead.
    • loopCount? (optional): If you dont want loop, dont ever input this (Taken from https://dotween.demigiant.com/documentation.php)
      • 1: No loop (Default)
      • Any positive integers
      • -1: infinite loop
    • loopType? (optional): (Taken from https://dotween.demigiant.com/documentation.php)
      • Restart: When a loop ends it will restart from the beginning (Default)
      • Yoyo: When a loop ends it will play backwards until it completes another loop, then forward again, then backwards again, and so on and on and on.
      • Incremental: Each time a loop ends the difference between its endValue and its startValue will be added to the endValue, thus creating tweens that increase their values with each loop cycle
        Examples:
        ⎗
        ✓
        "VALUE_1:1700/setworldpos(Self, {VALUE_1; 0;-1300;200 ;InOutQuart} {2300;0;1400;300;InElastic}{-1200;0;700;100;InBack},-1,Yoyo)"
        

isreusedskill(Target) added in v19.88.3 A

Checks to see if the skill being used is actually reused. Only accepts timings that use a skill

  • Target: Self (Requires: Self Action is provided)| Target / MainTarget (Requires: Target Action is provided)

isunitpartofreson(Single-Target, sinType) added in v19.88.3 A

Returns 1 when the selected unit is part of the sinType resonance. If sinType is not valid, it will instead try to check if the selected unit is a part of the highest resonance instead
Returns -1 when the selected unit can't be found

  • Single-Target: Single-Target
  • sinType: CRIMSON | SCARLET | AMBER | SHAMROCK | AZURE | INDIGO | VIOLET

hasskillondashboard(Single-Target, skillID) added in v19.88.3 A

Scans the entire dashboard to search for the skill with the desired skillID. Returns 1 if found
Returns -1 when the selected unit can't be found

activateegopassive(Multi-Target, egoID) added in v19.88.3 A

Activates the E.G.O passive on a unit. Only works on equipped E.G.Os

setactionindex(newIndex, priorityGroup?) added in v19.88.3 A

This should works with others timing beside SortAction
Moves the current action (the current skill's action) to a specific position in the game's action queue list

  • newIndex: Any integer >= 0
  • priorityGroup (optional): Default = 0. Decide which priority group the action belongs to
    • priorityGroup = 0: The action is inserted directly into the game's action queue at newIndex.
    • priorityGroup >= 1: The action is placed before every action in group 0 (the game's queue). newIndex is the position within that group. Higher group numbers run earlier, so group 2 runs before group 1
    • priorityGroup <= -1: The action is placed after every action in group 0 (the game's queue). newIndex is the position within that group. Lower group numbers run later, so group -3 runs after group -2

If newIndex is larger than the number of actions currently in its group, it is clamped to the end of that group
Act order: GROUP_N => ... => GROUP 2 => GROUP 1 => GROUP 0 (the game's queue) => GROUP -1 => GROUP -2 => GROUP -N

Examples:

⎗
✓
1
2
3
"Modular/TIMING:SortAction/setactionindex(0)" <- set the current battle action index to `0`, making this skill **goes first regardless of the unit's speed**
"Modular/TIMING:SortAction/setactionindex(99)" <- set the current battle action index to `99`. Assume the maxium battle action index of the current combat phase is `10` (10 actions/skills in total), set the index to `11`, making the skill **goes last regardless of the unit's speed**
"Modular/TIMING:SortAction/setactionindex(99,1)" <- set the current battle action index to `99` within group `1`. Making this skill goes BEFORE all game's origin action queue but goes LAST within actions in group `1`

Provided by MT
setactionindex example

betterskillsend(Single-Target, Multi-Target, skillOption, actionIndex?) added in v20.90.3 A

skillsend but if it has more supports
Sends an attack from a unit to another

  • Single-Target: Single-Target (Attacker)
  • Multi-Target: Multi-Target (Targets)
  • skillOption: Use one from the list below
    • Any skill ID
    • S#: # being the skill tier (Ex: S1, S2, S3)
    • D#: # being the defense skill index (Ex: D1 - the first defense skill, D2 - the second defense skill)
  • actionIndex? (optional): Any integer >= 0 (Default = 0). The delay (measured in total skill uses by any unit) before this skill get sent / The skill order, 0 means this skill will be sent immediately or 99 means this skill will be the last skill in that turn regardless of the unit's speed

Examples:

⎗
✓
"Modular/TIMING:WhenUse/betterskillsend(Self, Ally, S1, 2)" -> Send an attack with a tier 1 skill from the `Self` unit to an `Ally` after 2 skill uses (video below)

Provided by Blob
betterskillsend example

gettimingid() added in v22.95.4 A

Return the Modular's script timing ID (an integer)
TIMING ID List

applyskilleffect(Multi-Target, slotIndex, topOrBottom, effectType, isActive, alphaValue?) added in v22.96.4 ! A

Apply an effect for skill slots. You can stack multiple effects on a slot, those effects will disappear when you swap over to defense skills, after using the skill and after turn end

  • Multi-Target: Multi-Target
  • slotIndex: the skill slot index. Index starts at 0
  • topOrBottom
    • Top: target the top slot
    • Bottom: target the bottom slot
    • Default: both top and bottom slot
  • effectType:
    • OVERCLOCK_STABLE: Corrosion stable effect (CAN'T BE APPLIED TO TOP SLOT)
    • OVERCLOCK_UNSTABLE: Corrosion unstable effect (CAN'T BE APPLIED TO TOP SLOT)
    • BINAH_EGO: Superbia EGO effect (CAN'T BE APPLIED TO TOP SLOT)
    • INDEX_FINGER: Mark of the Prescript effect
    • RING_FAVUISM_TEST: Ring fauvist effect (ring rodya critique shiny effect thing)
  • isActive: true | false. To set the effect is active or not
  • alphaValue? (optional): Any integer in range of 0 to 100. This value will be divided by 100

hasskilleffect(Single-Target, slotIndex, topOrBottom, effectType) added in v22.97.4 ! A

Check if the slot has a skill effect. Returns 1 if true, 0 if false and -1 if something went wrong

  • Single-Target: Single-Target
  • slotIndex: the skill slot index. Index starts at 0
  • topOrBottom
    • Top: target the top slot
    • Bottom: target the bottom slot
  • effectType:
    • OVERCLOCK_STABLE: Corrosion stable effect
    • OVERCLOCK_UNSTABLE: Corrosion unstable effect
    • BINAH_EGO: Superbia EGO effect
    • INDEX_FINGER: Mark of the Prescript effect
    • RING_FAVUISM_TEST: Ring fauvist effect (ring rodya critique shiny effect thing)

playmotion(Single-Target, Motion, MotionIndex?, HasZoom?) added in v22.99.4 A A

plays a specific motion (like leiheng reload on turn end)

  • Single-Target: Single-Target (Unit to play the motion)
  • Motion: Motion
  • MotionIndex (optional): the index of the skill motion to be played (Any integer >= 0 (Default = -1))
  • HasZoom (optional): any string (If this variable is added, adds a zoom to the unit)

Examples:

⎗
✓
"Modular/TIMING:EndBattle/playmotion(Self,S6)"

changeanimspeed(Single-Target, Speed) added in v22.100.4 A

Increase the skill animation speed like how facade does

  • Single-Target: Single-Target
  • Speed: any interger (these will be divided by 100)
    Notes:
  • Only useable on visual timings like ChangeMotion or OnVisualUse else the effect will be applied on Combat Start
  • The Speed does not reset to 100 (default) after the affect is applied so others skills will keep the speed increase

gatesp(Multi-Target, gateType, gateValue) added in v22.101.4 A

Gate SP

  • Multi-Target: Multi-Target
  • gateType: Min | Max
  • gateValue: Any integer

Examples:

⎗
✓
"gatesp(Ally12, Min, -10)" <- 12 Allies' SP can not get below -10
"gatesp(Self, Max, 37)" <- Self's SP can not get over 37

getexpectedskillpower(Target, valueType) added in v24.102.4 A

Required TIMINGs: OnSlotSelectsTarget or OnSlotSelectedAsTarget
Get the expected final skill power of the Self or Target/MainTarget

  • Target: Self (Requires: Self Action is provided) | Target / MainTarget (Requires: Target Action is provided)
  • valueType: Min | Max (get the minimum or maximum expected final skill power)

Examples:

⎗
✓
"Modular/TIMING:OnSlotSelectsTarget/VALUE_0:getexpectedskillpower(Self,Max)" <- get the maximum expected final skill power of this unit when select a skill slot as the main target of one of this unit's skill
"Modular/TIMING:OnSlotSelectedAsTarget/VALUE_0:getexpectedskillpower(Target,Min)" <- Assume this script is in an abnor's part passive script, get the minimum expected final skill power of the target who just select one of this abnor's part skill slot as the main target

hasskillkeyword(Multi-Target, Multi-Skill, SkillKeyword) added in v24.106.4 A

Return the amount of skills with Keyword (return -1 in case the parsing failed)

addskillkeyword(Multi-Target, Multi-Skill, SkillKeyword, Add?) added in v24.106.4 A

Add SkillKeyword to every selected Skills

  • Multi-Target: Multi-Target
  • Multi-Skill: Multi-Skill
  • SkillKeyword: Basically every vanilla buff-keywords
  • Add optional, if this value is set to anything but null or add, remove SkillKeyword instead

getmang(Target) added in v24.109.4 A (Assisted by Doppelglower)

Returns the Mang count of the Target provided by Limbus's Mang Controllers.
Only works with timings that run after WhenUse and before EndBehaviour (Like BSA and OSA)
Returns -1 if Target not found or something went wrong

  • Target: Self (Requires: Self Action is provided) | Target / MainTarget (Requires: Target Action is provided)

Examples (All Tested):

⎗
✓
1
2
3
"Modular/TIMING:BSA/getmang(Self)" <- get the Mang counts manifested by the Self unit's Skill before succeed attack
"Modular/TIMING:OSA/getmang(Self)" <- get the Mang counts manifested by the Self unit's Skill on succeed attack
"Modular/TIMING:WhenHit/getmang(Self)" <- get the Mang counts manifested by the Attacker unit's Skill

getbuffhascount(Single-Target, buffKeyword) added in v24.111.4 A

returns 1 if the provided buff has count, and returns a 0 if it does not.
will return a -1 if the unit is null or if the unit does not possess the buff

  • Single-Target: Single-Target
  • buffKeyword: any buff keyword (a string)

getcoinindex(indexType) added in v25.112.4 A

Requires: Coin Model must be provided
Returns the Coin's index based on indexType. Returns -1 if Coin Model not found

  • indexType: Log | Real | Origin

Examples:

⎗
✓
"Modular/TIMING:AfterCoinParrying/getcoinindex(Origin)"
"Modular/TIMING:OSA/getcoinindex(Real)"

getsepiralevel() added in v26.113.4 A

Only works with OnActivateDurante TIMING
Returns the Sepira's ID

  • NONE | 0
  • HOKMA (PIGRITIA) | 1
  • BINAH (SUPERBIA) | 2
  • CHESED (MOROSITAS) | 3
  • GEBURA (IRA) | 4
  • TIPHERETH | 5
  • NETZACH | 6
  • HOD | 7
  • YESOD | 8
  • MALKUTH | 9
  • MALKUTH_IMPERFECT | 10

setspeed(Multi-Target, newSpeed, priority, checkMinMax?) added in v27.115.4 A (Assisted by Doppelglower)

Set speed (Self-explaination). You dont need to call refreshspeed after

  • Multi-Target: Multi-Target
  • newSpeed: Any integer >= 0
  • priority: Any integer >= 0 and <= 999. Decide action priority for units with same speed value
  • checkMinMax (optional): true | false (Default = false). If true, clamps newSpeed to the unit's min and max speed limits

Examples:

⎗
✓
1
2
3
"Modular/TIMING:RoundStart/setspeed(Self,11,999)"
"Modular/TIMING:WaitCommand/setspeed(AllyExceptSelf5,7,777)"
"Modular/TIMING:AfterSlots/setspeed(Self,21,0,true)" <- Assume the Self unit maximum speed is 12, set speed to 12 instead of 21

setspeedlimit(Multi-Target, limitType, newLimitValue) added in v27.115.4 A

Set Min/Max speed (Self-explanation). You may need to call refreshspeed after

  • Multi-Target: Multi-Target
  • limitType: Min | Max
  • newLimitValue: Any integer >= 0

Examples:

⎗
✓
1
2
3
"Modular/TIMING:RoundStart/setspeedlimit(Self,Min,7)/refreshspeed(Self)"
"Modular/TIMING:WaitCommand/setspeedlimit(AllyExceptSelf5,Max,15)/refreshspeed(AllyExceptSelf99)"
"Modular/TIMING:AfterSlots/setspeedlimit(Enemy99,Max,5)"

allowrefreshrenderer(Multi-Target, allowRefresh) added in v31.116.4 A

Allows these TIMINGs to refresh or not refresh the Multi-Target appearance renderers: SpecialAction, OnActivateDurante, AfterDuranteAnim, OnDeSelectSin, OnSlotSelectsTarget, OnSlotSelectedAsTarget, OnDashboardSkillHover, OnSlotHoverTarget, OnSlotHoveredBy and WaitCommand
Resets on Encounter Starts/Ends

Examples:

⎗
✓
"Modular/TIMING:WaitCommand/allowrefreshrenderer(Self,false)"
"Modular/TIMING:RoundStart/allowrefreshrenderer(Enemy99,true)"

setmodularvalue(VALUE-Index, newValue) added in v31.117.4 A

Set a Modular's VALUE_X's value to newValue where X is equal to VALUE-Index
Only usage of this consequence is in lua modular where you dont have access to those VALUEs

  • VALUE-Index: Any integer from 0 to 9
  • newValue: Any integer

Examples:

⎗
✓
"Modular/TIMING:ChangeAttackDamage/setmodularvalue(7,1337)" -> set this script VALUE_7 to 1337
⎗
✓
setmodularvalue(9, 2700) --Assume this lua script is called with ChangeAttackDamage timing. Set VALUE_9 to 2700 -> set the attack damage to 2700

getmodularvalue(VALUE-Index) added in v34.120.4 A

Get a Modular's VALUE_X's value where X is equal to VALUE-Index
Only usage of this consequence is in lua modular where you dont have access to those VALUEs

  • VALUE-Index: Any integer from 0 to 9

Examples:

⎗
✓
getmodularvalue(9) --Assume this lua script is called with ChangeAttackDamage timing. Get VALUE_9, which is the Skill's attack damage

allowopeninfo(allowOrNot) added in v34.120.4 A

Only works with OpenInfo TIMING
Allow the player to open the unit's infomation or not

  • allowOrNot: true | false

Examples:

⎗
✓
"Modular/TIMING:OpenInfo/allowopeninfo(false)" -> Does not allow the player to open the unit's infomation

getkeyinput(keyCode) added in v34.121.4 A

Returns 1 if keyCode is being pressed, otherwise returns 0. Returns -1 if keyCode is invalid

Examples:

⎗
✓
"Modular/TIMING:OpenInfo/getkeyinput(CapsLock)" -> Returns `1` if CapsLock key is being pressed...

removeallactions() added in v34.122.4 A

Removes all pending actions from the game's action queue list. This will make the combat phase end immediately

getparryingclashpower(Target) added in v35.123.4 A

Only usable with AfterDuelClashLog TIMING
Returns the Clash Power of the current Parry (of the current Duel). Returns -1 if the current TIMING is invalid or something went wrong

  • Target: Self | Target / MainTarget

Examples:

⎗
✓
"Modular/TIMING:AfterDuelClashLog/getparryingclashpower(Self)"

Exclusive .lua functions

jsontolua(string) added in v0.2.0 ! A

Turn a string represent JSON into a .lua table (use with readfile(), listfiles() and listdirectories())

  • string: a string

listdirectories(path) added in v0.2.0 ! A

Lists the folders of a given directory. This function does not list files. This function is restricted to the Plugins folder and any sub-folders. This function returns a .lua table (array-like)

  • path: Path of the directory (example: "Lethe")

listbuffs(Single-Target) added in v0.4.0 ! A

Returns a .lua table (array-like) contain all the buffs' keyword the unit has

setgdata(key, luaValue) added in v0.18.7 ! A

Set a global .lua value

  • key: a string (the data ID)
  • luaValue: a .lua value

Note

All global datas don't reset when you leave an encounter or reload your client with the '8' button. Close your client does

getgdata(key) added in v0.18.7 ! A

Returns a global .lua value

  • key: a string (the data ID)

clearallgdata() added in v0.18.7 ! A

Clear all global datas

gbkeyword() added in v1.27.11 ! A

Uses with 'OnGainBuff' timing
Returns a .lua string representing the gained buff's keyword

getcurrentmapid() added in v1.33.14 ! A

Returns a .lua string representing the current map's ID (the map which the game is using)

listrelatedkeywords(buffKeyword, mode) added in v1.33.14 A

Returns a .lua table (array-like) contains all the buffKeyword's mode

  • buffKeyword: any buff keyword (a string)
  • mode:
    • sub: sub keywords
    • category: category keywords

getappearanceid(Single-Target) added in v6.46.16 ! A

Returns a .lua string representing the unit's appearance ID

listbreakvalues(Single-Target, isActiveOnly) added in v6.46.16 ! A

Returns a .lua table (array-like) contains all stagger threshold values filtered by isActiveOnly

  • Single-Target: Single-Target
  • isActiveOnly: true | false. If true, only return values of active stagger thresholds

listegoskillids(Single-Target) added in v8.64.25 A

Returns a .lua dictionary with the following format (If no skill id found, it will be 0. (All base ZAYIN's corrosion skill id is 0))

⎗
✓
{
    ["ZAYIN"] = {
        [1] = { [1] = `AwakeningSkillID`, [2] = `CorrosionSkillID` },
        [2] = { [1] = `AwakeningSkillID`, [2] = `CorrosionSkillID` },
        -- ... (and so on if more ZAYIN egos)
    },
    ["TETH"] = {
        [1] = { [1] = `AwakeningSkillID`, [2] = `CorrosionSkillID` },
        [2] = { [1] = `AwakeningSkillID`, [2] = `CorrosionSkillID` },
        -- ... (and so on if more TETH egos)
    },
    -- ... and so on for HE, WAW and ALEPH ego type
}

Assume im using Ryoshu equipped with Forest for the Flames and Great Trichiliocosm [三千大世界], the table will look like:

⎗
✓
1
2
3
4
5
6
7
8
{
    ["ZAYIN"] = {
        [1] = { [1] =  2040111, [2] = 0 }
    },
    ["WAW"] = {
        [1] = { [1] = 2040911, [2] = 2040921 }
    }
}

listskillkeywords(Single-Target) added in v17.73.3 A

Only works on Identities
Returns a .lua table (array-like) contains all 'skillKeywordList' the Identity has

listallskills(Single-Target) added in v24.104.4 A

-Returns a .lua table (array-like) containing all skill IDs of the target

⎗
✓
1
2
3
4
5
6
{
    [1] = 745256,
    [2] = 12345,
    [3] = 54321,
    -- ... and so on
}

listpassiveids(Single-Target) added in v24.104.4 A

Returns a .lua dictionary with all passives the unit has in the following format.

⎗
✓
{
    ["egopassive"] = {
        [1] = 54321,
        [2] = 12345,
        -- ... and so on
    },
    ["passive"] = {
        [1] = 123212,
        [2] = 789876,
        -- ... and so on
    }
}

listbattleactions() added in v20.90.3 A

Returns a .lua table (array-like) represent the skill order in that turn based on the timing this function get called with the following format

⎗
✓
{
    [1] = {
        ["SkillID"] = `skillID`,
        ["InstID"] = `instanceID`
    },
    [2] = {
        ["SkillID"] = `skillID`,
        ["InstID"] = `instanceID`
    },
    -- ... and so on
}

Example table, assume i called this function on RoundStart (When no skill have been used)
Total skill will be used this turn: 3
Order: skill with ID = 405719284 by unit with instance ID = 6, skill with ID = 29418429 by unit with instance ID = 4, skill with ID = 5982734 by unit with instance ID = 6,

⎗
✓
{
    [1] = {
        ["SkillID"] = 405719284,
        ["InstID"] = 6
    },
    [2] = {
        ["SkillID"] = 29418429,
        ["InstID"] = 4
    },
    [3] = {
        ["SkillID"] = 5982734,
        ["InstID"] = 6
    }
}

getbufflocaledata(buffKeyword, dataType) added in v24.110.4 A

Returns the buff's locale data (string). Returns nil if buffKeyword or dataType is invalid

  • buffKeyword: any buff keyword (string)
  • dataType: name | desc | summary

listactiontargetingthisslot(Target) added in v33.118.4 A

Returns a .lua table (array-like) contains some datas of all skills that are currently targeting this Skill Slot with the following format

⎗
✓
{
    [1] = {
        ["SkillID"] = `skillID`,
        ["InstID"] = `instanceID`
    },
    [2] = {
        ["SkillID"] = `skillID`,
        ["InstID"] = `instanceID`
    },
    -- ... and so on
}
  • Target: Self| Target / MainTarget

Custom Targetting

All targettings are caps insensitives

Single-Skill

  • int grab the skill by its ID (9090)
  • S-(int) grab the skill by tier (S-1)
  • S-(int)-(int) grab the skill by tier and index (S-1-2)
  • D-(int) grab a defense skill by index (D-1)
  • ActiveAction- adding this before another targetting mode above, will pick the earliest skill in the action list that meets the condition (ActiveAction-S-1)
  • ModularSkill grab the skill of the timing (if possible)
  • ModularSelfAction grab the skill of the action of the timing (if possible)
  • ModularOppoAction grab the skill of the action of the target of the timing (if possible)

Multi-Skill

Multi-Skill is a bunch of "Single-Skill" but together, and separated with "|", it also possess additionals arguments possible
  • DALL-(int) same as single-skill but grab the skills of every actions that meets the criteria when using with ActiveAction
  • SALL-(int) same as single-skill but grab the skills of every actions that meets the criteria when using with ActiveAction
  • SALL-(int)-(int) same as single-skill but grab the skills of every actions that meets the criteria when using with ActiveAction
  • ATKALL grab every attack skills
  • DEFALL grab every defense skills
  • ALL grab every skills

Single-Coin

  • (int) get the coin by the original index
  • ENDORIGIN-(int) get the coin by the original index starting from the end (cannot go below 0) (ENDORIGIN-2)
  • STARTREAL-(int) get the coin by the current index (STARTREAL-0)
  • ENDREAL-(int) get the coin by the current index starting from the end (cannot go below 0) (ENDREAL-2)
  • COLOR-(color) get the first coin with the color (COLOR-GREY)
  • REROLLED-(bool) get the first coin with reroll equal to the bool (REROLLED-true)
  • HEAD-(bool) get the first coin with head equal to the bool (HEAD-true)
  • ACTIVE-(bool) get the first coin with active equal to the bool (ACTIVE-true)
  • BLOODDINNER-(bool) get the first coin that's in direct relation with blooddinner equal to the bool (ACTIVE-true)
  • CONSUMEBULLET-(bool) get the first coin that consumes bullet equal to the bool (CONSUMEBULLET-true)
  • USABLEDUEL-(bool) get the first coin that can duel equal to the bool (USABLEDUEL-true)
  • DESTROYABLECOIN-(bool) get the first coin that can be destroyed equal to the bool (DESTROYABLECOIN-true)

Multi-Coin

Multi-Coin is a bunch of "Single-Coin" but together, and separated with "|", it also possess additional arguments possible
  • COLORALL-(color) get every coins with the color (COLOR-GREY)
  • REROLLEDALL-(bool) get every coins with reroll equal to the bool (REROLLED-true)
  • HEADALL-(bool) get every coins with head equal to the bool (HEAD-true)
  • ACTIVEALL-(bool) get every coins with active equal to the bool (ACTIVE-true)
  • BLOODDINNERALL-(bool) get every coins that's in direct relation with blooddinner equal to the bool (ACTIVE-true)
  • CONSUMEBULLETALL-(bool) get every coins that consumes bullet equal to the bool (CONSUMEBULLET-true)
  • USABLEDUELALL-(bool) get every coins that can duel equal to the bool (USABLEDUEL-true)
  • DESTROYABLECOINALL-(bool) get every coins that can be destroyed equal to the bool (DESTROYABLECOIN-true)

MT Believe I didn't put any new images

Lei Heng, The Pinky's Tiantui Star
I'll be frank, y'all. Real impressed that you even pushed me this far.
But… MT…
… Ya darn sure oughta've unsheathed that consequence if ya really wanted to win!

Edit

Pub: 01 Nov 2025 06:45 UTC

Edit: 26 Nov 2026 15:00 UTC

Views: 9381