Hi I am trying to implement a ui at the end of a battle that displays some of the statistics. I turned on the Combatant Battle Statistics and made one called "DamageDealt" that is set to my Health Status Value (in the game it is called Garde) and the Decreases Given checkbox is selected. I then made a message pop up with the following text on a battle win event
"Otto lowered the performers garde by:#*custom0#"
after the battle the value that gets filled in for #*custom0# is always 0. even if I try the other options (decreases received, increases received, increases given) the value remains 0. the Abilities I use in the battle all have a target change for that Health Status Value. Is there something I have to do to make sure the statistic change is being recorded?
The combatant battle statistics don't have text codes to display them, their're mainly used for things like battle AI or formulas.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
That enables you to show the value via variable text codes.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Do I add the Battle Statistics node to my existing damage formulas? Will that effect the calculation at all? and then in the Battle End Event use the Formula to Variable node? If so I am a little confused on how to print the variable from the "Formula to Variable" Node. I added some screen grabs of my Formula and my Battle End Event.
Some Info: "DamageDealt" Is the name of the custom Combatant Battle Statistic I set up in Battle Settings
https://imgur.com/a/xSwA321
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
https://imgur.com/a/6jfMijC
Image 1: Combatant Battle Statistics setup. Pretty sure everything here is correct. Your verification would be much appreciated
Image 2: New DamageStatistic Formula with the Battle Statistic Node selected. I am unsure how this formula is being used.
Image3: Battle End Event with the Formula to Variable Node selected. This is where I am creating the variable damageDealt. However, when I print this value in Image4 the value is always 0.
Image 4: Battle End Event with the Dialogue Node selected. This is where I am printing the Game Variable I created in Image3.
Your Formula To Variable setup is wrong - unless you want to pass the result of the formula as starting value to the formula, you should just set the Initival Value to the Value value type.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
The Game Variable value type will use the value that's stored in the defined variable key, i.e. in this setup, it'll use the value of a variable as variable key.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I have the key in the Formula to Variable node set to "damageDealt" however, the battle statistic key is "DamageDealt". Should these be the same value?
And then in the Dialogue node I am displaying the value using #varfloatdamageDealt#.
After checking your images again, I think it's due to using different variable origins - the Formula To Variable node is using Local origin, while the dialogue uses Global origin, so just change the dialogue's variable origin to Local for the text codes to use the local variable you stored the value into.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
https://imgur.com/a/oABseMN
Try using the Player Group actor as target as well, since you only use the user anyway.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!