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

- Hwell, what's this? Manageable so far?

- : 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
getcurrentpoweracquirer 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
- Disabled
v34.122.4 notes:
- Changes made by MT:
- Added a new consequence:
removeallactions(endbattlebut not buggy) - Added an optional 2nd argument to
setactionindex
- Added a new consequence:
v34.121.4 notes:
- Changes made by MT:
- Added a new acquirer:
getkeyinput
- Added a new acquirer:
v34.120.4 notes:
- Changes made by MT:
- Added a new TIMING:
OpenInfo - Added a new acquirer:
getmodularvalue - Added a new consequence:
allowopeninfo
- Added a new TIMING:
v16.71.3 notes (Keep this here to glaze Styx):
- Updated version format
- Changes made by MT:
- Fixed instantdeath doesn't work if
ignoreImmortalisfalse - Renamed
didusedskillprevturntodiduseskillprevturn - Added 3rd argument for
modifysubtarget:excludeTargets
- Fixed instantdeath doesn't work if
- Changes made by Styx:
removeskillnow 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
getmapdatato support 'MTData' - Changed how
printoption works inhasbuffkeyword(now work assetmtdata) - Added new argument for
changepaniclevel - Added acquirers:
getchangespvalue,getmtdata - Added consequences:
setmtdata - Added timings:
OnTakeSwitchingVibration,OnOtherTakeSwitchingVibration,OnTakePiledVibration,OnOtherTakePiledVibration,OnTakeSPDamageOnOtherTakeSPDamage,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:
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:
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
1is activated:Deals +50% damage - If no path is activated:
Deals +
- All paths:
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-1is activated:Deals +50 damage and extra +37 damage - If path
0-0-0and1is activated:Deals +50 damage and extra +25% damage50% damage(no space between "damage" and "50%" here is accurate btw) - If path
0-0is activated:Deals +50 damage and extra
- All paths;
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: AnINDEX
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: AnINDEX
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 stringisModularVALUE:true|false. Set this totrueif yournewContentis a Modular's VALUE (Example:newContent=VALUE_7)index: AnINDEX
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 orNonefor all buff
Exclusive functions: gbkeyword, gbstack, gbturn, gbactiveround, gbsource
Examples:
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 orNonefor all buff
Exclusive functions: gbkeyword, gbstack, gbturn, gbactiveround, gbsource
Examples:
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 orNonefor all buff
Exclusive functions: gbkeyword, gbstack, gbturn, gbactiveround, gbsource
Examples:
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 orNONEto 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 orNONEto make this script runs after any Dante ability animation (For list of validsepiraKeyword, readOnActivateDurantetiming 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:
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:
ovwatkres(Multi-Target, atkType, newValue, add, defaultLimit?) added in v0.7.0 ! A
Overrides an attack resistance value
Multi-Target: Multi-TargetatkType:SLASH|PENETRATE|HITnewValue: any integer (this will be divided by 100)add:true|falsedefaultLimit?(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):
ovwsinres(Multi-Target, sinType, newValue, add, defaultLimit?) added in v0.7.0 ! A
Overrides a sin resistance value
Multi-Target: Multi-TargetsinType:CRIMSON|SCARLET|AMBER|SHAMROCK|AZURE|INDIGO|VIOLETnewValue: any integer (this will be divided by 100)add:true|falsedefaultLimit?(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):
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
Multi-Target: Multi-Target
Examples:
destroybuff(...) added in v0.9.0 ! A
Destroys one or more buffs
-
destroybuff(Multi-Target, keyword, destroyRound)
Single buff destroy mode
Multi-Target: Multi-Targetkeyword: the buff's keyworddestroyRound: the active round of the existing buff0: this turn1: next turn2: this turn and next turn
Examples:
-
destroybuff(Multi-Target, mode, destroyRound, amount, includeCantBeDespelled?)
Buff type / buff category based destroy mode
Destroysamountof existing buffs chosen randomly, filtered by buff type / buff categoryMulti-Target: Multi-TargetdestroyRound: the active round of the existing buff0: this turn1: next turn2: this turn and next turn
amount: number of buffs to destroy (any integer >= 0) orAll(all buffs filtered bymode)includeCantBeDespelled(optional, any value): If exist, buffs with "canBeDespelled = false" are includedmode: 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:
- Buff Type:
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
Single-Target: Single-TargetatkType:SLASH|PENETRATE|HIT
Examples:
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-TargetsinType:CRIMSON|SCARLET|AMBER|SHAMROCK|AZURE|INDIGO|VIOLET
Examples:
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
Single-Target: Single-Target
deactivebreak(Multi-Target, breakIndex, sort, reverseIndex?) added in v0.13.3 ! A
Deactivates 1 or all active stagger bars
Multi-Target: Multi-TargetbreakIndex: The index of the stagger bar (integer). Index starts at0. Use-1to deactivate all stagger bars (this will ignoresortandreverseIndexas they don't matter anymore)sort:true|false. Iftrue, the list of active stagger bars will be sorted in descending order (THIS ARGUMENT IS NOT REQUIRED IFbreakIndexIS-1)reverseIndex(optional, any value): Index still starts at0but the active stagger bars list is reversed. THIS RUNS AFTERsort
Examples:
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-Targetstack: any integer (potency/stack)turn: any integer (count/turn)activeRound: the active round of the existing buff0: this turn1: next turn2: this turn and next turn
StackTurnAddRespectively:true: addsstackpotency andturncount for each selected bufffalse: 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:
defcorrection(Multi-Target, newValue) added in v0.18.7 ! A
Set the unit's defense value to newValue
Multi-Target: Multi-TargetnewValue: any integer
Examples:
addunitscript(Multi-Target, id) added in v0.19.7 A
Add an 'unit script' to the target(s)
Multi-Target: Multi-Targetid: unit script's id (must be a string)
Examples:
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-TargetdefenseSkillId: the id of the defense skill
Examples:
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)
Single-Target: Single-Target
Examples:
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-TargetValueToCompare: The string to compareoperator:=: equal>: the data retrieved containsinput<:inputdoes 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_iftargetKeywordiscurrent)targetKeyword: Any buff keyword | Usecurrentto target the buff itself (only for buff scripts)checkType: which property of the buff to checkmain: main keywordsub: sub keywordmaub|mainsub: main and sub keywordcategory: category keyword
checkKeyword: Any buff / buff-category keywordprint(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) | usecurrentfor the current map the game is usingdata:size: the map's size (rounded down)active: Return1if the map is active (the game is using it). Return0if the map is inactiveid: 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_ifbuffOwneriscurrent)buffOwner: Any buff keyword |currentto target the buff itself (only for buff scripts)property: which property of the buff the function editsstack: the buff's potencycount: the buff's countboth: the buff's potency and count
mode:adder: edit the buff's bonus maximum valuevanilla: edit the buff's vanilla maximum valueboth: edit both buff's bonus maximum value and vanilla maximum value
addOrSet:add: addvalueset: set tovalue
value: any integer (accepts negative value)loseValueAtMax(optional):info: if there is a problem with the function (modifier), use thislowmax: 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 whatinfoandlowmaxdo
changehp(Multi-Target, newHp, mode, damageSource, buffKeyword, deactivePassedBreakSection, attacker?) added in v1.35.16 A
Set the targets' HP to newHp
Multi-Target: Multi-TargetnewHp: any integer value >= 0mode:static: Change HP tonewHpHP value%: Change HP tonewHp% 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
NONEbuffKeyword: Default =None; Any buff keyword, only matter ifdamageSourceisBUFF(Example: you know when Bleed got activated and you see a Bleed icon float up on the enemy right?)deactivePassedBreakSection:true|false. Iftrue, deactivate an active stagger bar ifnewHpvalue 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:
changesp(Multi-Target, newSp) added in v1.35.16 ! A
Set the targets' SP to newSp
Multi-Target: Multi-TargetnewSp: any integer value
Examples:
changepaniclevel(Multi-Target,Panic-Level, Variable ) added in v6.46.16 A
Set the units current sanity state to Panic-Level
Multi-Target: Multi-TargetPanic-Level:0Get out ofLow MoraleandPanicorCorrosion(if possible)1Set this unit toLow Morale2Set this unit toPanic3Corrode this unit (only if it can corrode)
Variable: Optional conditionals required for somePanic-Levelor just as an optionForcefully(Used forPanic-Level=0) Get this unit out ofLow MoraleandPanicif this unit normally shouldn'tLatest(Used forPanic-Level=3) Set this unitCorrosionto the last EGO usedRandom(Used forPanic-Level=3) Set this unitCorrosionto a random EGOTETH(Used forPanic-Level=3) Set this unitCorrosionto the current TETH EGO if possibleHE(Used forPanic-Level=3) Set this unitCorrosionto the current HE EGO if possibleWAW(Used forPanic-Level=3) Set this unitCorrosionto the current WAW EGO if possibleALEPH(Used forPanic-Level=3) Set this unitCorrosionto 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-TargetPanic-Type: The panic-type to change into (eg. Ruins)Panic-Propriety: The unit propriety to change the Panic fromDefault(Self Explanatory)CachedCouldn't find any differences with defaultBuffUse it if you want to overwrite thePanic-Typeby using a Buff (or overwriting it), requires to have theOptBuffcase filled
OptBuffRequired field ifPanic-Proprietyis set toBuffKeywordSelect the buff using the keywordCurrentIf 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-TargetReturn-Typethe values equal to the return types-1If this unit is inCorrosionor not in a quantifiablePanic-Level0If the Unit is not inLow Morale,PanicorCorrosion1If the unit is inLow Morale2If the unit is inPanic
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.
Single-Target: Single-TargetskillId: the skill's ID
Examples:
getbuffstackgainedthisturn(Single-Target, buffKeyword) added in v6.46.16 A
Returns the buffKeyword's buff stack/potency the unit has gained this turn
Single-Target: Single-TargetbuffKeyword: any buff keyword
Examples:
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++)
Single-Target: Single-Target
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,...)
Single-Target: Single-Target
instantdeath(Multi-Target, ignoreImmortal, dmgSource, killer?, action?) added in v6.46.16 A
Instantly kill all Multi-Target
Multi-Target: Multi-TargetignoreImmortal:true|false. Iftrue, ignore all immortal effect(s) to kill the unit. Iffalse, unit with immortal effect(s) won't be killeddmgSource: source of the damage, choose one from the list below
COMBAT
BUFF
PASSIVE
SKILL
EVENT
EGO_GIFT
STAGE
SYSTEM
SYSTEM_ABILITY
FORCED
NONEkiller(optional): Single-Target. Determine who is the killeraction(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:
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-TargetstaggerType: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-1for 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, allcoinIndexmust be in ascending order. If the firstcoinIndex=All, ignore all othercoinIndexs and remove all coins of the skill instead
Examples:
addskill(Multi-Target, SkillID, Level, Uptie, Amount) added in v8.53.16 A
Multi-Target: Multi-TargetSkillIDthe ID of the SkillLevelthe Level of the SkillUptiethe Uptie of the SkillAmountthe 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
Multi-Target: Multi-TargetMulti-Skill: Multi-Skill
hasskill(Single-Target, SkillID) added in v8.53.16 A
If the target has the skill then returns 1, else returns 0
Single-Target: Single-TargetSkillIDthe ID of the Skill
getskilldata(Single-Target, Single_Skill, Data-Type, Var) added in v8.53.16 A
Single-Target: Single-TargetSingle-Skill: Single-SkillData-Type: The type of data to return, select one from belowScalereturns the coin powerScaleAdderreturns the additional coin power (returns -1 if the the skill is not used this Turn)Finalreturns the Final Power (returns -1 if the skill does not target a skill)Clashreturns the Clash Power (returns -1 if the skill does not target a skill)Weightreturn the Attack Weight (returns -1 if the skill does not target a skill)ogWeightreturns the original Attack WeightEvadereturns the additional Evade Power (returns -1 if the skill is not used this Turn, or does not target a skill)Defaultreturns the skill Base PowerMotionreturns the skill Motion (refer to the enum, will be added later)Levelreturns the skill LevelSkillAtkLevelreturns the skill Offense LevelDefTypesame as getskilldeftypeAtkTypesame as getskillatk()Ranksame as getskillrank()Fixedsame as getskillfixedtarget()Attributesame as getskillattribute()EgoTypesame as getskillegotype()IsActionreturns 1 if the skill is being used this TurnUseCountreturns the amount of time the skill is being used this TurnTargetClashreturns 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)TargetTypereturns 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)TargetCountreturns the amount of Targets (returns -1 if the the skill is not used this Turn)RealTargetCountreturns the amount of Targets (Was added in case TargetCount bugs) (returns -1 if the the skill is not used this Turn)IsTargettingNamereturns if the skill is targetting a unit with a specific name (returns -1 if the the skill is not used this Turn)IsTargettingUniqueNamereturns if the skill is targetting a unit with a specific unique name (returns -1 if the the skill is not used this Turn)IsTargettingIDreturns if the skill is targetting a unit with a specific ID (returns -1 if the the skill is not used this Turn)IsTargettingMainNamereturns if the skill main target has a specific name (returns -1 if the the skill is not used this Turn)IsTargettingMainUniqueNamereturns if the skill main target has a specific unqiue name (returns -1 if the the skill is not used this Turn)IsTargettingMainIDreturns if the skill main target has a specific ID (returns -1 if the the skill is not used this Turn)IDorInvalid Typereturns the skill ID
Varis either a variable needed for aData-Typeor a Target-CoinSingle-Coinused forScaleAdderandClashSingle-CoinMulti-Coinused forFinalMulti-CoinNameused forIsTargettingNameandIsTargettingMainNameUniqueNameused forIsTargettingUniqueNameandIsTargettingMainUniqueNameIDused forIsTargettingIDandIsTargettingMainID
addcoin(Multi-Target, Multi-Skill, CoinIndex, VAR_4, VAR_5, VAR_6, CopyStaticData) added in v8.54.17 A
Multi-Target: Multi-TargetMulti-Skill: Multi-SkillCoinIndex: 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)Single-Unit: Single-TargetPower: the Coin Power of the target
VAR_5Single-Skill: Single-SkillOperator: The coin operator to set
VAR_6Single-Coin: Single-CoinColor: 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-1for 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:
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-TargetSingle-Skill: Single-SkillskillAbilityName: 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:
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 namecoinIndex?(optional): The coin's index, input-1for 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:
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 toSingle-TargetSingle-Target: Single-Target
Examples:
-
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 ofCountskill(s) with skilll id =SkillIDof everyAttackerstoTargetAttackers: Multi-TargetTarget: Single-TargetSkillID: a Skill ID |-1. If input as-1and this script is in a skill script, ignoreCountand only set the main target of the skill this script is inCount?(optional): Any integer >= 1 (Default = 99)forceDuel?(optional):true|false(Default =false) Iftrue, 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:
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. Iftrue, automatically filters out any units that are already the main target or already present in the sub-target list of the skillincludeTargets: Multi-TargetexcludeTargets?(optional): Multi-Target (Highest priority, runs after everything)
Examples:
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 integeradd?(optional, any value): If exists, addnewValueto the skill's SP usage instead
Examples:
setlevel(Multi-Target, newLevel) added in v8.65.25 ! A
Set level, yes
Multi-Target: Multi-TargetnewLevel: Any integer >= 1 (idk bro, if you input negative number the game might break)
Examples:
setmaxhp(Multi-Target, newMaxHp) added in v8.68.25 ! A
Self-Explaination
Multi-Target: Multi-TargetnewMaxHp: Any integer
Examples:
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)
Single-Target: Single-Target
Examples:
gethpincrement(Single-Target) added in v8.68.25 ! A
Get the HP increment by level of the unit multiplied by 100 and rounded down
Single-Target: Single-Target
Examples:
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:
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:
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-TargetTargetValue:oldsp: return the SP before the changenewsp: return the SP after the change
getuptielevel(Single-Target) added in v16.72.3 A
Returns the uptie level of the unit
Single-Target: Single-Target
Examples:
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-TargetkeywordName: Any string that could be a unitKeyword or association in the json data of a unitisAssociation?(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
Multi-Target: Multi-Target
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-TargetsinType:CRIMSON|SCARLET|AMBER|SHAMROCK|AZURE|INDIGO|VIOLETincludeEgo?(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-Targetcolumn: 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 numbertopOrBottom: Top Slot or Bottom Slot | Which slot you want the skill to spawn in. 0 for the Bottom Slot, 1 for the Top SlotskillID: 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-TargetsearchID: any integer | Searched Skill ID | The ID of the skill you want to convertreplaceID: 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-Targetunit_2: The second unit. Single-TargetskillIDforUnit_1: the skill id for unit 1 to use (self-explanation) (the skill must be CLASHABLE). If input as-1, ignoreunit_1and use the skill of theSelfunit if the this script's timing providesskillIDforUnit_2: the skill id for unit 2 to use (self-explanation) (the skill must be CLASHABLE). If input as-1, ignoreunit_2and use the skill of theTarget/MainTargetunit if this script's timing provides
Examples:
getworldpos(Single-Target, cordType) added in v17.83.3 A
Returns the world position cordType value of the unit multiplied by 100
Single-Target: Single-TargetcordType:x|y|z
Examples:
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-Targetxandyandz: the coordinate values (these values will be divided by 100)
Examples:
-
setworldpos(Multi-Target, Sequences, loopCount?, loopType?)
Move the target to the destinated world cords with determined time and easing style
Multi-Target: Multi-TargetSequences: one or multiple sequences; A sequence must follow the format below{x; y; z; duration; easingStyle}xandyandz: 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 theeasefrom it. Ex: i want to useeaseOutExpo, you writeOutExpoinstead.
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:
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-TargetsinType: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
Single-Target: Single-TargetskillID: a skill ID
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
Multi-Target: Multi-TargetegoID: an ego ID
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 >=0priorityGroup(optional): Default =0. Decide which priority group the action belongs topriorityGroup=0: The action is inserted directly into the game's action queue atnewIndex.priorityGroup>=1: The action is placed before every action in group0(the game's queue).newIndexis the position within that group. Higher group numbers run earlier, so group2runs before group1priorityGroup<=-1: The action is placed after every action in group0(the game's queue).newIndexis the position within that group. Lower group numbers run later, so group-3runs 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:
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:
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-TargetslotIndex: the skill slot index. Index starts at0topOrBottomTop: target the top slotBottom: 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 effectRING_FAVUISM_TEST: Ring fauvist effect (ring rodya critique shiny effect thing)
isActive:true|false. To set the effect is active or notalphaValue?(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-TargetslotIndex: the skill slot index. Index starts at0topOrBottomTop: target the top slotBottom: target the bottom slot
effectType:OVERCLOCK_STABLE: Corrosion stable effectOVERCLOCK_UNSTABLE: Corrosion unstable effectBINAH_EGO: Superbia EGO effectINDEX_FINGER: Mark of the Prescript effectRING_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: MotionMotionIndex(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:
changeanimspeed(Single-Target, Speed) added in v22.100.4 A
Increase the skill animation speed like how facade does
Single-Target: Single-TargetSpeed: 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-TargetgateType:Min|MaxgateValue: Any integer
Examples:
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:
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)
Multi-Target: Multi-TargetMulti-Skill: Multi-SkillSkillKeyword: Basically every vanilla buff-keywords
addskillkeyword(Multi-Target, Multi-Skill, SkillKeyword, Add?) added in v24.106.4 A
Add SkillKeyword to every selected Skills
Multi-Target: Multi-TargetMulti-Skill: Multi-SkillSkillKeyword: Basically every vanilla buff-keywordsAddoptional, 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):
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-TargetbuffKeyword: 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:
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-TargetnewSpeed: Any integer >= 0priority: Any integer >= 0 and <= 999. Decide action priority for units with same speed valuecheckMinMax(optional):true|false(Default =false). Iftrue, clampsnewSpeedto the unit's min and max speed limits
Examples:
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-TargetlimitType:Min|MaxnewLimitValue: Any integer >= 0
Examples:
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
Multi-Target: Multi-TargetallowRefresh:true|false
Examples:
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 9newValue: Any integer
Examples:
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:
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:
getkeyinput(keyCode) added in v34.121.4 A
Returns 1 if keyCode is being pressed, otherwise returns 0. Returns -1 if keyCode is invalid
keyCode: (CASE SENSITIVE) https://docs.bepinex.dev/v6.0.0-pre.1/api/BepInEx.IL2CPP.UnityEngine.KeyCode.html
Examples:
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:
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
Single-Target: Single-Target
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 keywordscategory: category keywords
getappearanceid(Single-Target) added in v6.46.16 ! A
Returns a .lua string representing the unit's appearance ID
Single-Target: Single-Target
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-TargetisActiveOnly:true|false. Iftrue, 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))
Single-Target: Single-Target
Assume im using Ryoshu equipped with Forest for the Flames and Great Trichiliocosm [三千大世界], the table will look like:
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
Single-Target: Single-Target
listallskills(Single-Target) added in v24.104.4 A
-Returns a .lua table (array-like) containing all skill IDs of the target
Single-Target: Single-Target
listpassiveids(Single-Target) added in v24.104.4 A
Returns a .lua dictionary with all passives the unit has in the following format.
Single-Target: Single-Target
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
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,
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
Target:Self|Target/MainTarget
Custom Targetting
All targettings are caps insensitives
Single-Skill
intgrab 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)ModularSkillgrab the skill of the timing (if possible)ModularSelfActiongrab the skill of the action of the timing (if possible)ModularOppoActiongrab 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 withActiveActionSALL-(int)same as single-skill but grab the skills of every actions that meets the criteria when using withActiveActionSALL-(int)-(int)same as single-skill but grab the skills of every actions that meets the criteria when using withActiveActionATKALLgrab every attack skillsDEFALLgrab every defense skillsALLgrab every skills
Single-Coin
(int)get the coin by the original indexENDORIGIN-(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

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!


