The official VisuStella notetag help thread

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,986
Reaction score
4,595
First Language
English
Primarily Uses
RMMZ
target.displayAbsorptionBarrierPopup(300) should do it.
 

Krawzer_KOF

Veteran
Veteran
Joined
Aug 27, 2017
Messages
113
Reaction score
12
First Language
English
Primarily Uses
RMMV
It works too! If my enemies have different barrier states (because they have different barrier points) will I have to use a conditional branch for every single barrier state or is there a less tedious way? For example


<JS Pre-Damage>

if (target.isStateAffected(195)){

const barrier = target.getStateDisplay(195) - 300;

if (barrier > 0) target.setStateDisplay(195, barrier); else target.removeState(195);

target.displayAbsorptionBarrierPopup(300)}

else

if (target.isStateAffected(196)){

const barrier = target.getStateDisplay(196) - 300;

if (barrier > 0) target.setStateDisplay(195, barrier); else target.removeState(195);

target.displayAbsorptionBarrierPopup(300)}

</JS Pre-Damage>
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,986
Reaction score
4,595
First Language
English
Primarily Uses
RMMZ
You could give barrier states a category and loop through the category states.
 

Krawzer_KOF

Veteran
Veteran
Joined
Aug 27, 2017
Messages
113
Reaction score
12
First Language
English
Primarily Uses
RMMV
They all belong to the absorption barrier category but I don't know how to do the loop in a script. Is it something like those "push scripts''?



<JS Pre-Damage>


if (statecategory() === 'absorption barrier') {

state.push(195, 196, 52);

}

</JS Pre-Damage>
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,986
Reaction score
4,595
First Language
English
Primarily Uses
RMMZ
That isn't even remotely how to do it, but good try! XD I'll give you the code for it in a bit.
 

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,262
Reaction score
326
First Language
English
Primarily Uses
RMMZ
Gonna take a wild stab here...I'm trying to use VisuStella Skill Learn System and get it to where I need it to look at a custom stat before the skill shows up in the learn skill menu...so I use...

<JS Learn Show>
if (this.NParamId(1) > 1);
visible = true
</JS Learn Show>

and I've also tried several other things...

<JS Learn Show>
if (user.NParamId(1) > 1);
visible = true
</JS Learn Show>

and this...

<JS Learn Show>
if (user._NParamId(1) > 1);
visible = true
</JS Learn Show>

and this...

<JS Learn Show>
var NParamId = 1;
var amount = 1;
var skillId = 26;

if (user.NParamId(1) > 1);
visible = true
</JS Learn Show>

...and a few other similar things changing little things here and there but I just can't get it to work right.

I am using ICF-Soft Custom Parameters and I got it to work with VisuStella using the Core Engine Plugin and tying them together so that part is done, I just need it to recognize that custom stat in the Lunatic Mode of Skill Learn System so it doesn't show up unless that Custom Parameter is greater than 1.

I don't typically get errors with this one but it's basically like the notetag doesn't exist at all and the skill will be in the list to learn but it shouldn't be unless the Custom Stat is greater than 1 and it's not.

I've gotten several things to work with Lunatic Mode by a lot of trial and error but I'm not a Coder so I'm having a hard time figuring this one out to get this to work.

Any help would be appreciated.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,597
Reaction score
2,936
First Language
English
Primarily Uses
RMMV
<JS Learn Show>
if (this.NParamId(1) > 1);
visible = true
</JS Learn Show>
Your syntax is wrong. You put semicolons after code statements (optionally, but recommended). You cannot put them after a conditional. So the correct syntax is:
Code:
if (condition)
    statement;

Also, as a tip for efficiency, any time you find yourself writing an if statement and the only thing it does is set a boolean, you can always get rid of that as the result of the condition itself is a boolean. So your entire tag can be:
Code:
<JS Learn Show>
visible=this.NParamId(1)>1;
</JS Learn Show>

However, that will still fail, as when the code executes, this is not referring to the actor. According to the Skill Learn System documentation, you should use user to refer to the actor. Therefore:
Code:
<JS Learn Show>
visible=user.NParamId(1)>1;
</JS Learn Show>
 

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,262
Reaction score
326
First Language
English
Primarily Uses
RMMZ
@ATT_Turan - Thank you very much for the lesson. You broke it down to where even I could understand it and it got it to work. Consider this solved. Thanks again and have a good day!
 

Reinarc

Veteran
Veteran
Joined
Sep 21, 2020
Messages
183
Reaction score
180
First Language
English
Primarily Uses
RMMZ
Hello there. For the Visustella Menu Core, I'm trying to implement a menu item that has a show condition based on a switch being ON. In the JS: Show text box I have:


if ($gameSwitches.value[817] == true){

return true;

} else {

return false;

}

It's always returning false, even with the switch on. This would work in basic JS, but why it's not working is beyond my skill level at the moment.



Edit: $gamesSwitches.value(817) not [817]. Nothing to see here, please move along -_-'
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,986
Reaction score
4,595
First Language
English
Primarily Uses
RMMZ
Hello there. For the Visustella Menu Core, I'm trying to implement a menu item that has a show condition based on a switch being ON. In the JS: Show text box I have:


if ($gameSwitches.value[817] == true){

return true;

} else {

return false;

}

It's always returning false, even with the switch on. This would work in basic JS, but why it's not working is beyond my skill level at the moment.



Edit: $gamesSwitches.value(817) not [817]. Nothing to see here, please move along -_-'
I see you figured out your error. Brackets are the bane of the best of us. :)
 

Weremole

Veteran
Veteran
Joined
Jan 22, 2016
Messages
327
Reaction score
300
First Language
Swedish
Primarily Uses
It's me again. I'm trying to calculate the evasion rate based on Agility and I figure the most painless way to do it is with an XPARAM Plus notetag in Classes. I tried but user.agi doesn't seem to work so I can't even do any calculation.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,986
Reaction score
4,595
First Language
English
Primarily Uses
RMMZ
It's me again. I'm trying to calculate the evasion rate based on Agility and I figure the most painless way to do it is with an XPARAM Plus notetag in Classes. I tried but user.agi doesn't seem to work so I can't even do any calculation.
What have you tried so far?
 

Weremole

Veteran
Veteran
Joined
Jan 22, 2016
Messages
327
Reaction score
300
First Language
Swedish
Primarily Uses
What have you tried so far?

<JS EVA Plus: (user.agi+1) / 8 * 0.01>

I've tried with a simple number just to check if it was a bug somewhere, but it works. So it has to be that it's not finding the agility param.
 

shukrin

Veteran
Veteran
Joined
Sep 2, 2021
Messages
40
Reaction score
10
First Language
English
Primarily Uses
RMMZ
<JS EVA Plus: (user.agi+1) / 8 * 0.01>

I've tried with a simple number just to check if it was a bug somewhere, but it works. So it has to be that it's not finding the agility param.
try using this.agi instead of user.agi
 

shukrin

Veteran
Veteran
Joined
Sep 2, 2021
Messages
40
Reaction score
10
First Language
English
Primarily Uses
RMMZ
1) Can i call the battle log message for damages that are done through the notetag? For example, the custom slip damages, and for the On Add/Remove/Expire State notetag. As somebody who heavily use the default battle log, i would prefer some consistency rather than having some damages not mentioned by the battlelog.

2) Can I force a skill activation upon adding a state, through the "on add state" notetag. If i can what's the code? I know i can do the same thing with common event but i can't really specify the skill user with that.
 

Gallas

Villager
Member
Joined
Oct 1, 2018
Messages
25
Reaction score
22
First Language
English
Primarily Uses
RMMV
Probably the most useful thing of MV's Yanfly Engine was his 'Tips and Tricks' where it was shown how to actually execute iconic RPG spells/actions. It gave a reference on how to use most of the notetags. This is sorely missing from Visustella.

Can someone show how to implement the simple Freeze? It's so common in RPGs that VS used it as an example in their State Effects. Yet, there's no example of how to actually implement it. Is <Custom Respond Effect> replaced with <JS Pre-Damage>?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,986
Reaction score
4,595
First Language
English
Primarily Uses
RMMZ
Probably the most useful thing of MV's Yanfly Engine was his 'Tips and Tricks' where it was shown how to actually execute iconic RPG spells/actions. It gave a reference on how to use most of the notetags. This is sorely missing from Visustella.

Can someone show how to implement the simple Freeze? It's so common in RPGs that VS used it as an example in their State Effects. Yet, there's no example of how to actually implement it. Is <Custom Respond Effect> replaced with <JS Pre-Damage>?
JavaScript:
<JS Post-Damage As Target>
  const fire = 2;
  if (this.isPhysical() && value > 0) {
    target.setHp(0);
  } else if (this.item().damage.elementId === fire) {
    target.removeState(state.id);
  }
</JS Post-Damage As Target>
 

Gallas

Villager
Member
Joined
Oct 1, 2018
Messages
25
Reaction score
22
First Language
English
Primarily Uses
RMMV
JavaScript:
<JS Post-Damage As Target>
  const fire = 2;
  if (this.isPhysical() && value > 0) {
    target.setHp(0);
  } else if (this.item().damage.elementId === fire) {
    target.removeState(state.id);
  }
</JS Post-Damage As Target>

Thank you.

While I know this 'simple', I know others are looking for it too. *waves at lurkers*
 

Latest Threads

Latest Profile Posts

I've started brainstorming an entry for IGMC 2022. One hour of game length and first ten minutes to grab the reviewer's interest. Here we go.
Not played that much in years tbh, only been making/modding games. Every game I try now feels super easy o_O Even ones I used to struggle with.
Everywhere I go to, everyone brings up the heat being insane. Is this an omen? :kaoswt2:
Bex
Edit: Sorry wrong Thread.

So whats new?
Damn today was hot again XD, perfect for the cool Basement XD.
Happy RPG Maker Contest everyone.
So my team has a big upcoming event regarding our game, so I've had to draw like 20+ chibi characters so far to illustrate the game's mechanics. And I'm not done still... But! At least it is way less to do now.:kaopride:
show chibi.jpg

Forum statistics

Threads
123,355
Messages
1,156,024
Members
161,789
Latest member
kleine
Top