Is there a way to set the value of a block to a percent of damage reduction instead of total attack negation? And if there is is there a way to have it be based on a status or a formula?
If there isn't a way to do this, would you be willing to add it as a feature and if so how much would it cost for that work?
  • No - blocking is only complete a complete block with a chance (%) of that happening.

    If you want to do damage reduction, either set that up in your damage formulas or use the attack/defence attribute system.
    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!
  • So basically if I want blocks to exist but to provide variable damage reduction instead of just be a complete thing, I should put into my formula a chance fork (with the chance itself possibly based on a status if I want it to be variable from combatant to combatant) that goes to a node that reduces the value (possibly also based on a status if I want the damage reduction to be variable based on an individual combatants stats). And if I want it to be a quick time event use the wait for input node during whatever battle event triggers the quick time event to set a bool variable that is used in the damage formula for a variable fork instead of the chance fork?
  • Pretty much, yeah.

    It'd probably be best to set up a separate formula that handles the damage reduction (unless you have multiple variants) and just use the formula at the end of other formulas that should get reduced.
    Also, setting the bool variable as a local variable in the battle event will also have it available in the formulas (caused by the event) as a local variable.
    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!
  • Wow... that is so good to know about local variables! Is that also true for events that get called from within other events?

    For example I have a quick time event that determines if a "block" is successful which gets called from within the attack abilities events. Do those share local variables?
  • Also, do they share User and Targets?
  • edited September 2020
    The nodes to call other events usually have options to share variables, selected data and found objects. Also, using the Call Battle Event node will share the same battle action with the called event, i.e. user/target are also shared.

    Generally, all battle events used by an action will share these things, so local variables, etc. are the same in all battle events of an action. The game events you can use in the status changes in abilities/items also share those variables/selected data.

    Sharing is caring, after all :D
    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!
  • That is extremely convenient!
  • Alright. All of this worked, although since I'm not using the built in block the animate target setting of the calculate step doesn't know that the block animation should be played.

    I tried adding in a check game variable node that checks whether the "block success" bool is true or false and leads to two different combatant animation nodes that play the block or damage animations accordingly but it didn't seem to work. Combatant Animation nodes use Object > Actor, and Actor > Target.

    I know the bool is being set appropriately because it's working in the damage formulas the way it should. And I know that the ability does have the correct target because it is altering the targets HP correctly. So I'm not totally sure what else could be going wrong here. Any ideas?

    Current setup for the event is:
    Change Game Variable : Set "BlockSuccessFail" to false
    Check Faction : friend or enemy
    (if ally: Combatant animation > Calculate > Wait > done.)
    If enemy:
    Call battle event (quick time event)
    Combatant animation : Play Users Attack Animation
    Check if "BlockSuccessFail" is true
    if true: combatant animation : Play Actor:Target Defend animation
    if false: combatant animation : Play Actor:Target Damage animation
    either way
    Calculate
    wait 0.5 sec
    Remove QTE image
    Change game variable : Set "BlockSuccessFail" to false
    Change game variable : Set "CounterSuccessFail" to false
    done.
  • I guess it's due to the actual damage playing a damage animation.
    You can globally enable/disable that a change to a status value plays a damage animation in the status value's settings.
    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!
  • 1. It's super cool that that is even a setting and that it automatically sets up that way.
    2. Thank you!
  • Well I disabled Animate Damage for the HP status value but the block and damage animations still aren't playing from the attack event.
  • Hm, where is the BlockSuccessFail variable set and which variable origin is used?
    Also, would be easier to see the event :)
    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 2020
    BlockSuccessFail is set in the quick time event battle event (although it's initially set to false in the attack event but I might move that to the QTE event). It's variable origin is local.

    That event is as follows:
    Show Image (QTE Start Image)
    Wait for Input 0.2 seconds
    - if success: Remove Image (QTE Start Image), Show Image (QTE Success Image), Change Game Variables (Global "CounterSuccessFail" to 100), Change Game Variables (Local "BlockSuccessFail" to true)
    - if failed:
    Remove Image (QTE Start Image)
    Show Image (QTE Second Stage Image)
    Wait for Input 0.2 seconds
    - if success: Remove Image (QTE Second Stage Image), Show Image (QTE Success Image), Change Game Variables (Local "BlockSuccessFail" to true)
    - if fail: Remove Image (QTE Second Stage Image)

    It's supposed to be: If you succeed within the first 0.2 seconds you block and counter, and if you succeed within the 0.2 seconds after that you just block. Currently player controlled combatants have their Counter chance set to be equal to CounterSuccessFail.

    I've also tried changing the variable origin for BlockSuccessFail to global in all instances where it's called and tested that and I had the same problem of the animations not playing although the calculate step is playing properly.
    Post edited by Whatexists on
  • Hm, does your Call Battle Event node to call the QTE event has the sharing options enabled?
    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!
  • Yeah, Share Variables, Share Selected Data, and Share Found Objects are all enabled.
Sign In or Register to comment.