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
369
Reaction score
1,121
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

That moment when you're getting a new update ready, deploy it for the final round of testing (gotta make sure the deployed version runs, ya know?) andddddd there's a visual blip :ysrs: Doesn't impact gameplay. It's only on-screen for a few seconds. But you can't leave it there.
So now you have to fix it, then redeploy, then retest. Why do I do this to myself.
So I'm reading a sci-fi book called Berserker Man. Now, the 'Berserker Man' isn't a man or a Berserker. He is actually a very calm 11 year-old-boy. So misleading title. He was recruited to fight these emotionless killing machines called Berserkers. Also confusing. I will read it until it starts making sense.
A few tweaks and changes, now the load screen is literally loading :kaoswt:
loading.gif
I tried a new thing.

fg.png
Another night, another game dev stream in about 20 minutes or so.

Forum statistics

Threads
129,798
Messages
1,205,235
Members
170,899
Latest member
b3thamphetamine
Top