Jump to content
View in the app

A better way to browse. Learn more.

Obsidian Forum Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

This seems to be how triggers work...

 

itemMod              -> Status effect ApplyOnEvent:    kill or whatever ->    a Status Effect that does nothing we'll call it "null_effect"
also in ItemMod   -> Ability containing a Function Called condition: If (character) has null effect     ->    Apply the effects in an ATTACK

 

As you can see, one branch of the object chain seems to apply a flag (null_effect) and the other branch uses an ability to do the function call to check whether the flag is up or not, and apply the attack if it is.

 

 

 

For functions, the Parameter GUIDs are here: https://eternity.obsidian.net/game-data-formats/instanceids

The FunctionHash is the same, so just find an existing Parameter and copy the FunctionHash Number from underneath it (the green one, if you're using VSCode).

 

Parameter Hashes correspond to parameter GUIDs, so to find the ParameterHash for an attack/race/statuseffect etc, you need;

  • search for the name of the Attack in the Attacks file or name of the race in ..er.. characters or global?, name of the Status Effect in Status Effects file etc. then copying it's GUID.
  • then search the StatusEffects file for the GUID being used in another condition, then copy it's corresponding ParameterHash.

 

*I don't know modern programming terminology, so if I've got the terms wrong, please forgive/correct me.

Edited by Svartypops

Triggers in Deadfire refer to something different.  In the Trigger section of the status effects you can set actions that would trigger changes to the status effect.  You can change duration, status effect value, etc.

 

What you're talking about is "how to trigger an effect after an action", which could also be called triggers but there is a specific use for the term trigger in Deadfire.  You ApplyStatusEffectOnEvent to have a status effect create when the EventValue occurs.

 

For instance, let's say you make that ApplyStatusEfectOnEvent status to create a Damage status effect OnHit.  So Whenever you're hit, you create damage to yourself.  But if you wanted to increase the damage OnCriticallyHit, then you'd put that in the TriggerOnEvent for the Damage status effect, and ValueAdjustment 5, to increase the damage by 5.  TriggerOffEvent would be OnDamaged to clear the bonus damage before the next round of hits.

The above example wouldn't actually work unless your ApplyStatusEffectOnEvent used an EventValue of OnHitOrCriticallyHit, because if it was just OnHit then there'd be no damage applied when you are critically hit.

Actually, OnHit would never work ever, because it has to be OnPlainHit.  OnHit only works for visual effects!

Regarding ParameterHash & FunctionHash, the game ignores these properties during deserialization*, so you can safely write ScriptCallData objects without those lines in your mod files!

*Snippet from decompiled ParseScriptCall method:

else if (text.Equals("UnrealCall") || text.Equals("FunctionHash") || text.Equals("ParameterHash") || text.Equals("Flags"))
{
    JsonUtilities.DiscardNextBlock(jsonReader);
}

 

  • Author

Here is simpler trigger I found;


itemMod              -> a Status Effect that does nothing, with the suffix "_information", this has a TextString reference to something like "When the user is bloodied"
also in ItemMod   -> Ability containing a Function Called condition    ->    Apply the effects in an ATTACK

Edited by Svartypops

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.