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
6
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
338
Reaction score
999
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
6
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

I've been trying very hard to distance myself from my inspirations, but maybe It would be better just to accept it.
3uL5XnP.gif
For my 100th post, I wanted to thank this forums community for the generosity and respect that each of you show.

I'm always impressed when I see the 6x veterans (in number of years compared to my presence here on these forums) continue to help and support all the community members on a daily basis, the awesome artists who share their creations with so much passion...
If a person becomes voluntarily missing, does it cause the butterfly effect?
normal_water_is_fine.jpg

Just going to use stationary water for the randomized maps. Sure, particles would look cool... But this is about compromising and not spending countless hours making the perfect water particle for each set piece with water. :kaoswt:
Maybe I should get rid of the Banish ability in my game. It's a non-elemental spell that doesn't even appear in the magic chart. It's only there because my Elementalist doesn't use light or dark magic. It only effects summoned creatures.

Forum statistics

Threads
121,912
Messages
1,145,147
Members
160,181
Latest member
lewzah
Top