Ability
Ability describes the effects that occur while the trinket is equipped. Such the healing the player, harvesting a crop, attacking an enemy, and so on.
An ability is primarily defined by AbilityClass
(what it does) and Proc
(when does it activate). Following the successful proc of an ability, a number of proc effects can happen.
{
"Action": "EditData",
"Target": "mushymato.TrinketTinker/Tinker",
"TargetField": [
"{{ModId}}_Sample",
],
"Entries": {
"Abilities": [
// lvl 1 abilities
[
// 1st ability for lvl 1
{
"Id": "<string ability id>",
"AbilityClass": "<string ability class>",
"Description": null|"<string description class>",
"Proc": "<emu proc on>",
"ProcTimer": <double timer miliseconds>,
"ProcSyncId": null|"<string proc sync ability id>",
"ProcSyncIndex": <int proc sync index in list>,
"ProcSyncDelay": 0,
"ProcFuel": {
"RequiredItemId": "<string qualified item id>",
"RequiredTags": [/* string context tags */],
"Condition": "<string game state query>",
"RequiredCount" <int required item count>
},
"ProcSound": {
"CueName": "<string sound cue>",
"Pitch": [/* int pitch values */],
}, // OR just "<string sound cue>"
"ProcTAS": [/* TemporaryAnimatedSprite ids */],
"ProcOneshotAnim": "<string anim clip key>",
"ProcSpeechBubble": "<string speech bubble key>",
"ProcAltVariant": "<string alt variant key>",
"ProcChatterKey": "<string next chatter key>",
"Condition": "<string game state query>",
"DamageThreshold": <int damage threshold (for ReceiveDamage|DamageMonster only)>,
"IsBomb": <bool damage came from explosion (for DamageMonster|SlayMonster only)>,
"IsCriticalHit": <bool if damage is a crit>,
"InCombat": <bool if player is in combat>,
"Args": {
/* AbilityClass dependent arguments */
}
},
{ /* another lvl 1 ability */}
],
[ /* lvl 2 abilities */ ],
//and so on...
]
}
}
Structure
Property | Type | Default | Notes |
---|---|---|---|
Id |
string | same as AbilityClass |
The Id of this ability, used for ProcSyncId and content patcher EditData. |
AbilityClass |
string | "Nop" |
Type name of the motion class to use, can use short name like "Buff" . Refer to docs under "Ability Classes" in the table of contents for details. |
Description |
string | null | String of the ability, will be used to substitute "{1}" in a trinket's description. |
Proc |
ProcOn | Footstep | Make ability activate (proc) when something happens. |
ProcTimer |
double | -1 | After an ability proc, prevent further activations for this amount of time. |
ProcSyncId |
string | null | For use with Proc.Sync, makes this ability proc after another ability in the same level, by their Id. If set, this field takes precedence over ProcSyncIndex . |
ProcSyncIndex |
int | 0 | For use with Proc.Sync, makes this ability proc after another ability in the same level, by their order in the list of abilities. |
ProcSyncDelay |
int | 0 | For use with other abilities with Proc.Sync, add a delay between the proc of this ability and any sync ability listening to this one. |
ProcFuel |
RequiredFuelData | null | A model defining what items will be consumed by each activation of this ability. The fule item comes from a trinket inventory. |
ProcSound |
string | null | Play a sound cue when ability procs (details) |
ProcTAS |
List<string> | null | String Ids of temporary animated sprites to show when the ability activates. For most abilities, this TAS is drawn shown relative to the farmer. For Hitscan/Projectile, this TAS is shown on the targeted monster instead. |
ProcOneshotAnim |
string | null | Play the matching anim clip on proc, return to normal animation after 1 cycle. |
ProcSpeechBubble |
string | null | Show the matching speech bubble on proc. |
ProcAltVariant |
string | null | Switch the companion to the matching alt variant on proc. Use "RECHECK" to switch |
ProcChatterKey |
string | null | On the next activation of a Chatter ability, use this key instead of the normal conditional key. |
Condition |
string | null | A game state query that must pass before proc. |
DamageThreshold |
int | -1 | Must receive or deal this much damage before proc. For ReceiveDamage & DamageMonster |
IsBomb |
bool? | null | Must deal damage with(true)/not with(false) a bomb. For DamageMonster & SlayMonster |
IsCriticalHit |
bool? | null | Must (true)/must not(false) deal a critical hit. For DamageMonster & SlayMonster |
InCombat |
bool? | null | Must (true)/must not(false) be in combat. "In combat" is defined as there being monsters in the same location, and the player has or taken damage in the last 10 seconds. |
Args |
Dictionary | varies | Arguments specific to an ability class, see respective page for details. |
Ability Descriptions
Abilities are internally 0-indexed, but the displayed minimum ability can be changed in TinkerData
Then there are multiple abilities per level and a description for each, they will be joined with new line before passed to description template.
It's not neccesary to provide descriptions to all abilities in a level, often it is sufficient to describe the entire ability in 1 description on the first ability, while leaving the others blank.
Example of a description template for a trinket with 2 ability levels:
// Trinket
"Description": "My trinket {0}:\n====\n{1}"
// Tinker
"MinLevel": 2
// Tinker Abilities
[
[ // rest of ability omitted
{"Description": "first ability A", ...},
{"Description": "second ability B", ...},
],
[ // rest of ability omitted
{"Description": "first ability C", ...},
{"Description": "second ability D", ...}
]
]
Description when trinket has internal level 0:
My trinket 2:
====
first ability A
second ability B
Description when trinket has internal level 1:
My trinket 3:
====
first ability C
second ability D
Fuel Item
Property | Type | Default | Notes |
---|---|---|---|
RequiredItemId |
string | null | Required item id, to target a specific item. |
RequiredTags |
List |
null | Required item context tag, target all items that have all of these tags. |
Condition |
string | null | Required item game state queries condition. |
RequiredCount |
int | Total required fuel item count. |
An item must qualify for at least one of RequiredItemId
, RequiredTags
, and Condition
to be considered fuel to be consumed.
If not enough fuel items, nothing is consumed and the ability does not activate.