RMMV (SOLVED)(Yanfly) How do I create a variable in the skill notetag using the Absorption Barrier plugin?

Bad_Muppet

Villager
Member
Joined
Oct 4, 2021
Messages
5
Reaction score
3
First Language
English
Primarily Uses
RMMV
I am trying to create a variable that stores the value of the user's magic attack (divided by 10) and have the Absorption Shield plugin use the <User Barrier: +#> script in it. However, I am having a difficult time figuring out how I can store the value into the variable. Right now my code looks like this:

Code:
var addShield = user.mat / 10;

<Target Barrier: +addShield>

The skill targets one ally. I have all of the plugins, as well.

I also tried doing

Code:
<Target Barrier: +(user.mat/10)>

but it didn't work. It seems to only work with integers.
 

Cythera

Veteran
Veteran
Joined
Jul 31, 2019
Messages
317
Reaction score
888
First Language
English
Primarily Uses
RMMV
Yanfly put a custom option in most of his plugins - they're called 'lunatic mode' and allow you to use custom code to do effects.
Try:
Code:
  <Custom Target Barrier>
   value = Math.ceil(user.mat/10)
  </Custom Target Barrier>
in your skill notetag :)
Note that the Math.ceil isn't necessary; I just tend to use it to round numbers, because the engine doesn't always handle extreme decimals very well! But you can set value to anything you like.
 

Bad_Muppet

Villager
Member
Joined
Oct 4, 2021
Messages
5
Reaction score
3
First Language
English
Primarily Uses
RMMV
Yanfly put a custom option in most of his plugins - they're called 'lunatic mode' and allow you to use custom code to do effects.
Try:
Code:
  <Custom Target Barrier>
   value = Math.ceil(user.mat/10)
  </Custom Target Barrier>
in your skill notetag :)
Note that the Math.ceil isn't necessary; I just tend to use it to round numbers, because the engine doesn't always handle extreme decimals very well! But you can set value to anything you like.
Okay, I missed the lunatic mode code somewhere. Thank you so much! This really helped!
 

Latest Threads

Latest Profile Posts

Went to the doctor because I was actually sick and it was covered over with healthy people from a factory shift who all had to get negative covid tests to go back to work because one of their shift mates got it. Waited for several hours to find out that my low-grade fever, chills, light-headedness and fatigue were in fact covid...
And here I thought I've lost my music sense. Good exercise once in a while
Made Edits to a Character Art from 'Hibiki Katakura MV Monsters' (DLC), to Look More like One of My Own Characters. :LZScheeze:

Decided to retake an old concept I was working on long ago, first change I decided to tackle on right away is the sprites. Never been fan of the default chibis, so I edited it a bit... :kaoswt:
8YavqRj.png

Not sure if this will be the final take, but I like it more than the regular one.
Need a few testers for my new plugin, any takers?

Forum statistics

Threads
118,531
Messages
1,116,714
Members
155,562
Latest member
DeadWolf
Top