I think I've asked about this before in another thread but I can't seem to find it. I'm trying to set up a system where characters in the player party get one of a random "injury" status effects whenever they go down in combat (semi-random, anyways: with available injury status effects getting worse for each one you've already got.) This is very similar to the injury system in Dragon Age: Origins and Dragon Age II. I remember being advised that this could be done via "Death Events" that play when a combatant dies, but I can't find death events anywhere. Is that the right way to do it and if so where are Death Events?
  • edited August 31
    The default death events for all combatants (called Death Animation) is set up in Battle System > Battle Settings > Combatant Settings > Battle Animations. It uses battle events to animate a combatant's death and can also be used for things like this.

    Each combatant can override the default events in it's Battle Settings > Override Settings > Battle Animations.

    For the general mechanic you can e.g. use a Random or Chance Fork node, use Check Status node to check if a status effect is already applied, etc.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited August 31
    Alright, cool. I haven't done a lot with status effects yet. By default are status effects on a combatant saved when loading them between contexts? E.g. using a scene changer. Or when you start a new fight (using more or less the battle start event for grid battles from the tutorial, where it deletes the player combatants and then reloads them in order to load them on the grid in the start locations during player placement.) And if they are not is there something I can do to make them saved until a player does a specific thing to remove them (e.g. visit the in game infirmary.)
    Post edited by Whatexists on
  • The status system (i.e. also status effects) is persistent between scenes, battles, etc.
    For status effects, you can control this via the effect's setup, e.g. by default effects are set up to end on the combatant's death. Check the Effect End Settings of the status effect.

    They're also saved with save games, unless you disable the Save Game option on an effect.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I've been trying to get something going in the first place with a Death Event that applies a single status effect that halves the users HP. As far as I can tell the event does not appear to be getting called at all when the player dies.

    Under "Battle System > Battle Settings > Combatant Settings > Battle Animations" I have checked "animate action" for death animation, then added an animation with a DeathEvent event. Chance 100; field disabled; turn based, active time, real time, phase all enabled; grid battles yes; used by player and ally enabled, enemy disabled. No set prefabs or audio clips, no use requirements.

    The first node of the event is a debug node that is not getting called when the player character's hit points reach 0 and the battle ends in defeat. Currently the HP status has "Death On" set to "on Minimum". Checking the combatant components "Is Dead" is getting set to True when they're HP reaches 0. But the event is not firing. Any idea what could cause that?
  • What's the battle system setup - especially End Immediately or Death Immediately.
    Also, is your combatant maybe overriding the default battle animation for death?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • The combatant does have a battle animation for Death, I think that was a part of getting Mecanim Animations set up. Animate action is disabled. Does that override the default event even if Animate Action is disabled?
  • Yeah, that overrides the default action - if a combatant defines a battle animation for an action it'll override the default one.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Alright, new question: is it possible to set it up so that a member of the player group cannot be used in battle if they have a particular status effect on them, more then a certain number of a certain type of status effects? (e.g. if one of your characters has 3+ injuries they can't be in the active battle group.)
  • I don't think so - while you can remove them via the event system based on conditions (using selected data, e.g. in a battle start event), you can't prevent them from joining in the battle group based on conditions.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited September 23
    1) What about something like... a "pick your team" screen like when you're leaving your base in a Biowere game where you pick up to X# of your companions out of all those who are available? And if you did could you make the menu options conditional based on things like whether you've done their recruitment quest, whether they have certain status effects (such as an "injured" status effect) on them?

    2) In regards to menus that display status effects: for status effects that are stackable there's a "Combined Stacked" option. But if I have that turned on how would I have it also display the number of stacks?
    Post edited by Whatexists on
  • 1) That can be handled by an event using selected data - Select Combatant node can filter them by conditions and using a Selected Data Choice to have the player select the combatants.

    2) The content labels of status effect HUD elements can use text codes to show the stack count: %sc and %sc2 (only shows if more than 1 is applied)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.