Svartypops Posted July 2, 2021 Share Posted July 2, 2021 (edited) 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 July 5, 2021 by Svartypops 1 Link to comment Share on other sites More sharing options...
Grape_You_In_The_Mouth Posted July 2, 2021 Share Posted July 2, 2021 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. 2 Link to comment Share on other sites More sharing options...
Grape_You_In_The_Mouth Posted July 2, 2021 Share Posted July 2, 2021 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. Link to comment Share on other sites More sharing options...
Grape_You_In_The_Mouth Posted July 2, 2021 Share Posted July 2, 2021 Actually, OnHit would never work ever, because it has to be OnPlainHit. OnHit only works for visual effects! Link to comment Share on other sites More sharing options...
Noqn Posted July 2, 2021 Share Posted July 2, 2021 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); } 2 Link to comment Share on other sites More sharing options...
Svartypops Posted July 5, 2021 Author Share Posted July 5, 2021 (edited) 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 July 5, 2021 by Svartypops Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now