Absorption Barrier as the resource & parameter

Hello,

I am trying to use the Absorption Barrier as a resource and parameter. Essentially;

I want to add the barrier's value to my ATK, more barrier means more damage, then expend the barrier

this is my attempt so far

<Custom Target Barrier>
var barrierPoints = wall;
var param(2) + wall = value;
battler.addParam (2, value);
battler.losebarrier;
</Custom Target Barrier>

Thanks
For attack damage I think you can put it in a damage formula with a.barrierPoints() (use that how you like in the formula). (Or a passive state action effect changing damage value)

Then if you want the attacker's barrier to vanish you can just have a skill notetag:
<User Barrier: -9999>
Or a passive state with an action effect with like:
user.loseBarrier(user.barrierPoints())
var barrierPoints = wall;
what is wall?
var param(2) + wall = value;
thats not correct syntax. you cant use parenthesis in a variable name, the value youre assigning to has to be on the left of the operator, and you cant perform any operations on the left side of an assignment.
if param(2) is supposed to be a battler's atk, then you need to call it with the associated battler as a method like user.param(2) or target.param(2), which the engine lets you shortcut by typing user.atk or target.atk

battler.losebarrier;
if that supposed to be a function call, youre missing the parenthesis and the arguments

The notetag also only gets ran as the skill is executed in order to apply a barrier, no? if this isnt actually applying a barrier, theres no reason to use it. you's use a skill core notetag.

I want to add the barrier's value to my ATK, more barrier means more damage, then expend the barrier
theres a few missing bits of info. you want the barrier to be added to atk and to be removed, but you never said when it should be removed or what should remove it. Your attempt looks like you tried to make a skill that consumes a target's barrier and have them gain atk based on the barrier, but your description makes it sound like it should just be a mechanic that barrier boosts atk.

it would require a plugin to add a battler's barrier points to their atk and it would be easier to bake this into a skill's damage formula and have the skill also remove the user's barrier points via action sequences or yanfly's skill core notetags. if youre trying to make a skill that consumes abrrier and adds atk, you want to use <After Eval> or something and use the functions youve used to add the barrier to atk and remove the barrier.
This
what is wall?

thats not correct syntax. you cant use parenthesis in a variable name, the value youre assigning to has to be on the left of the operator, and you cant perform any operations on the left side of an assignment.
if param(2) is supposed to be a battler's atk, then you need to call it with the associated battler as a method like user.param(2) or target.param(2), which the engine lets you shortcut by typing user.atk or target.atk


if that supposed to be a function call, youre missing the parenthesis and the arguments

The notetag also only gets ran as the skill is executed in order to apply a barrier, no? if this isnt actually applying a barrier, theres no reason to use it. you's use a skill core notetag.


theres a few missing bits of info. you want the barrier to be added to atk and to be removed, but you never said when it should be removed or what should remove it. Your attempt looks like you tried to make a skill that consumes a target's barrier and have them gain atk based on the barrier, but your description makes it sound like it should just be a mechanic that barrier boosts atk.

it would require a plugin to add a battler's barrier points to their atk and it would be easier to bake this into a skill's damage formula and have the skill also remove the user's barrier points via action sequences or yanfly's skill core notetags. if youre trying to make a skill that consumes abrrier and adds atk, you want to use <After Eval> or something and use the functions youve used to add the barrier to atk and remove the barrier.
was educational. I will save this for reference thank you

For attack damage I think you can put it in a damage formula with a.barrierPoints() (use that how you like in the formula). (Or a passive state action effect changing damage value)

Then if you want the attacker's barrier to vanish you can just have a skill notetag:
<User Barrier: -9999>
Or a passive state with an action effect with like:
user.loseBarrier(user.barrierPoints())
a.barrierPoints() does exactly what I wanted. Thank you

Thank you both. Happy New Year

resolved

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/absorption-barrier-as-the-resource-parameter.174316/