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,173
Reaction score
1,164
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

So I just got my computer back (Was posting stuff on my phone) But now my dang monitor's broken! I'll need to get a new one, which means... JOBS! Yaaay... When I get a new monitor, I'll post picture of one of my RPGMMV projects.
Wish me luck... :kaodes:
Had to clean up disk space because Windows Updates was having my primaries' disk space for breakfast, lunch and dinner. I guess the clean up thingy doesn't work or something because there were 15gigs of old update files in it.
Monday morning, and the sudden message: Hey, can you set up a full second lesson about pixel art till tomorrow?
No one:
Steam game achievement: "Die 100 times in easy mode".

Forum statistics

Threads
115,889
Messages
1,093,733
Members
151,134
Latest member
umememe
Top