RMMZ VISUMZ Core Script - Using variables and switches in notes?

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
I am trying to set my Max HP % to a variable using VISUMZ Core Script. So depending on what integer the variable is equal to determines the percentage of the Max HP. I currently have this:


<MaxHP Rate: ($gameVariables.value(1))%>

I hoped that would work but it doesn't.
How do I do this?
I might have the plugin written incorrectly as well.
I also would like there to be a switch condition. So it only lets me go passed level 99 if a switch is enabled.

Any help would be great.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,239
Reaction score
1,201
First Language
English
Primarily Uses
RMMV
As a general rule, you can't use JavaScript expressions in notetag commands unless you are told you can.

In this case, the documentation for the <param Rate: x> notetag just says "Replace 'x' with a percentage (ie. 150%) or a rate (ie. 1.5)." It does not say that it will evaluate JavaScript, so your syntax is invalid.

However, if you scroll down in the documentation just a bit, you'll see the <JS param Rate: code> notetag. This one says code, and then instructs, "Replace 'code' with JavaScript code".

So <JS MaxHP Rate: $gameVariables.value(1)/100> will cause that variable's value to act as a percentage rate for your max HP.

I also would like there to be a switch condition. So it only lets me go passed level 99 if a switch is enabled.
I'm sorry, but I don't understand this. What does "level 99" mean? Do you mean the value of the variable is treated as being 99, even if it's higher, unless a switch is on? Or is this a completely different question about getting more than 99 experience levels in a class?
 

Latest Threads

Latest Posts

Latest Profile Posts

About the Deer, I had to cut some piece of video due the *swearing* Youtube copyrights issues...
A caveman pokes his head in...
I was listening to songs by Chuck E Cheese's voice actor (Jaret Reddick from Bowling for Soup) when the meds I was taking for my stomach virus apparently stopped working. I can't take my next dose until morning, but it's no use anyway. I'm officially sick again. Of course, I'll definitely take the next dose either way, but it's useless now.
New profile picture! This time, it's representative of my current project.
I suddenly feel like making a game for little kids: a pointless sandbox of cute animals, silly collectibles, and random mini games.

Forum statistics

Threads
116,002
Messages
1,094,790
Members
151,303
Latest member
rinchi4
Top