The official VisuStella notetag help thread

Weremole

Veteran
Veteran
Joined
Jan 22, 2016
Messages
301
Reaction score
264
First Language
Swedish
Primarily Uses
You could create a text code replacement for it and add your conditional to the code there.
I've considered it and it seems possible now that I looked at this more closely, like you can split a number input in the textcode tag. Just need to look how the default MZ textcodes draw icons I guess. The rest is setting the actor and skill variables and putting them in the If branch.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,706
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
I've considered it and it seems possible now that I looked at this more closely, like you can split a number input in the textcode tag. Just need to look how the default MZ textcodes draw icons I guess. The rest is setting the actor and skill variables and putting them in the If branch.
Hrm, yeah. I tried returning '\i76]' in the text code text but it just shows as-is (tried with 2 slashes as well) so doesn't look like they support using codes themselves. Which makes sense I guess.

All the other ones that show icons call existing functions which just take a boolean parameter for whether to display the icon or not.
 

Onox

Villager
Member
Joined
Apr 17, 2020
Messages
5
Reaction score
2
First Language
French
Primarily Uses
RMMZ
Hi ! As a total noob in JS I desperately try to port some Yanfly Tips and Tricks to MZ. Can you help me with this one? : "Cleric Stance"
<Custom Confirm Effect>
// Check if the action is magical and deals HP damage.
if (this.isMagical () && this.isHpEffect () && value> 0) {
// Then increase the damage dealt to 120%.
value = Math.ceil (value * 1.20);
// Chec if the action is magical and heals HP.
} else if (this.isMagical () && this.isHpEffect () && value <0) {
// Then decrease the healing done to 80%.
value = Math.ceil (value * 0.80);
}
</ Custom Confirm Effect>


For the state, and for the skill :

<Before Eval>
// The State ID of the Cleric Stance.
var clericStanceId = 155;
// Check if the user is affected by the state.
if (user.isStateAffected (clericStanceId)) {
// If the user is, then remove the state.
user.removeState (clericStanceId);
// If the user isn't ...
} else {
// Then add the state.
user.addState (clericStanceId);
}
</ Before Eval>

Thank you very much !
 
Last edited:

Junane

Veteran
Veteran
Joined
Feb 10, 2018
Messages
100
Reaction score
15
First Language
English
Primarily Uses
RMMV
Hi ! As a total noob in JS I desperately try to port some Yanfly Tips and Tricks to MZ. Can you help me with this one? : "Cleric Stance"



For the state, and for the skill :



Thank you very much !

Below code goes into the State:
<JS Pre-Damage as User>
if (this.isHpEffect() && this.isMagical() && value > 0){
value = Math.ceil(value * 1.2);
} else if (this.isHpEffect() && value < 0){
value = Math.floor(value * 0.8);
}
</JS Pre-Damage as User>

And this into the skill itself:
<JS Post-Apply>
if (user.isStateAffected(x)){
user.removeState(x);
} else {
user.addState(x);
}
</JS Post-Apply>
changing x into your state's ID.
 

Onox

Villager
Member
Joined
Apr 17, 2020
Messages
5
Reaction score
2
First Language
French
Primarily Uses
RMMZ
Below code goes into the State:
<JS Pre-Damage as User>
if (this.isHpEffect() && this.isMagical() && value > 0){
value = Math.ceil(value * 1.2);
} else if (this.isHpEffect() && value < 0){
value = Math.floor(value * 0.8);
}
</JS Pre-Damage as User>

And this into the skill itself:
<JS Post-Apply>
if (user.isStateAffected(x)){
user.removeState(x);
} else {
user.addState(x);
}
</JS Post-Apply>
changing x into your state's ID.
Many thanks ! I reread each page of this thread 10 times to find the solution without success ^^ "

If anyone has a little time I also have problems reproducing this effect:
<Custom Turn End Effect>
if (user.mp == 0) {user.removeState (16)};
</ Custom Turn End Effect>

I also have a few questions, I can't find a solution to reproduce this: <Target: All Allies But User> is this not possible at the moment?

And I suppose that to reproduce everything related to "auras" we will have to wait for a dedicated plugin ?

Is there a solution to transpose all: <Custom Apply Effect>
or should they be changed on a case-by-case basis depending on their effect?

Once again thank you for your answers :)
 
Last edited:

Junane

Veteran
Veteran
Joined
Feb 10, 2018
Messages
100
Reaction score
15
First Language
English
Primarily Uses
RMMV
Many thanks ! I reread each page of this thread 10 times to find the solution without success ^^ "
If anyone has a little time I also have problems reproducing this effect:
<Custom Turn End Effect>
if (user.mp == 0) {user.removeState (16)};
</ Custom Turn End Effect>
I also have a few questions, I can't find a solution to reproduce this: <Target: All Allies But User> is this not possible at the moment?
And I suppose that to reproduce everything related to "auras" you will have to wait for a dedicated plugin ?
Is there a solution to transpose all: <Custom Apply Effect>
or should they be changed on a case-by-case basis depending on their effect?
Once again thank you for your answers :)
You can change <Custom Turn End Effect> into "<JS Pre-End Turn>"* and <Custom Apply Effect> is turned into "<JS On Add State>"; <Target: All Allies But User> goes into the skill or item and overwrites the original scope to affect the party even if it targets an enemy.

*This also has <JS Post-End Turn> as another alternative.
 

Onox

Villager
Member
Joined
Apr 17, 2020
Messages
5
Reaction score
2
First Language
French
Primarily Uses
RMMZ
You can change <Custom Turn End Effect> into "<JS Pre-End Turn>"* and <Custom Apply Effect> is turned into "<JS On Add State>"; <Target: All Allies But User> goes into the skill or item and overwrites the original scope to affect the party even if it targets an enemy.

*This also has <JS Post-End Turn> as another alternative.
Thank you for your quick reply !
I will try it !

PS : Sorry for "all allies except the user" I thought it was not working but I did not see well ...
 
Last edited:

Cyberhawk

Bravelion Leader
Veteran
Joined
Jan 9, 2019
Messages
138
Reaction score
100
First Language
English
Primarily Uses
RMMZ
WOuldn't it be easier if there was a list of the MV Tips and Tricks that work in MZ or the ones that were modified to work in MZ instead of scouring 15+ pages of text?
 

Weremole

Veteran
Veteran
Joined
Jan 22, 2016
Messages
301
Reaction score
264
First Language
Swedish
Primarily Uses
Hrm, yeah. I tried returning '\i76]' in the text code text but it just shows as-is (tried with 2 slashes as well) so doesn't look like they support using codes themselves. Which makes sense I guess.

All the other ones that show icons call existing functions which just take a boolean parameter for whether to display the icon or not.
I'm doing something terribly wrong here.

const textState = arguments[0];

const data = this.obtainEscapeString(textState).split(',');

if (textState.drawing) {

const actor = parseInt(data[0].trim());

const skill = parseInt(data[1] || '0');{

if $gameActors.actor(actor).skills().contains($dataSkills[skill]); {



const icon = 92

return this.drawIcon(icon);

}else{

const icon = 74

return this.drawIcon(icon);



}

}
 

Corygon

Storyteller
Member
Joined
Mar 20, 2019
Messages
15
Reaction score
11
First Language
English
Primarily Uses
RMMZ
WOuldn't it be easier if there was a list of the MV Tips and Tricks that work in MZ or the ones that were modified to work in MZ instead of scouring 15+ pages of text?
That'd be awesome.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,706
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
That'd be awesome.
Almost all of them do except the ones which use Selection Control or Target Core. I know this because I've recreated all of them in MZ for a client. :p

I am working on a document outlining the notetag changes required to make them compatible, but I'm not done yet.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,706
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
Did you remove the entire lines or just the word "return" from those lines? I meant the latter, in case that wasn't clear.
 

Weremole

Veteran
Veteran
Joined
Jan 22, 2016
Messages
301
Reaction score
264
First Language
Swedish
Primarily Uses
Did you remove the entire lines or just the word "return" from those lines? I meant the latter, in case that wasn't clear.
Just the word 'return'.
 

WilsonE7

Veteran
Veteran
Joined
Oct 12, 2019
Messages
92
Reaction score
40
First Language
English
Primarily Uses
RMMZ
Hey, @Trihan I was trying to figure out how to make an event shake or tremble, and I remembered that YEP's Event Sprite Offset plugin had move route script calls to offset the sprite by n pixels. I haven't seen anything like that in VisuStella's plugins, but I thought I'd ask. Is there any way to implement that, or are there any plans to bring that back?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,706
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
Hey, @Trihan I was trying to figure out how to make an event shake or tremble, and I remembered that YEP's Event Sprite Offset plugin had move route script calls to offset the sprite by n pixels. I haven't seen anything like that in VisuStella's plugins, but I thought I'd ask. Is there any way to implement that, or are there any plans to bring that back?
The script calls are the same as in the MV plugin: this._spriteOffsetX = whatever and this._spriteOffsetY = whatever.
 
Last edited:

WilsonE7

Veteran
Veteran
Joined
Oct 12, 2019
Messages
92
Reaction score
40
First Language
English
Primarily Uses
RMMZ
The script calls are the same as in the MV plugin: this._spriteOffsetX = whatever and this._spriteOffsetY = whatever.
Thanks! I wish they put that in the documentation, though.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,706
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
Thanks! I wish they put that in the documentation, though.
As far as I was aware VisuStella was focusing on putting easy-to-use tools in the hands of developers who can't code their own; the focus was more on plugin commands and parameter functionality than documenting every script call. By all means stick that in the suggestion box if you want to, though.
 

Ys42

Villager
Member
Joined
Nov 24, 2019
Messages
23
Reaction score
6
First Language
Russian
Primarily Uses
RMMV
What do you mean by add state via notetags?
On a skill, you can make said skill add a state to the affected unit via notetag, so, is there a way for said state to be affected by enemy state resist.
 

Latest Threads

Latest Posts

Latest Profile Posts

The "docs" are honestly soo frustrating. Eg. positionType : "Returns the current position type of the message window." Yes, great. could you please also tell me if 0 was bottom or top, so i don't have to start a playtest to see, because i keep forgetting it all the time, and what are the docs even for, if not that? (it's top btw...)


Here's the combat sprite of Azrael one of the main characters of our game,
with and without weapon.
https://discord.gg/Q2uS6Str
The one thing I've always struggled with is creating a story, it halts every single project I've ever worked on. We must be in the twilight zone because I've actually come up with a plot, from beginning to end (it kinda wrote itself). I may very well be on my way to creating my first proper little game, yay!
Oh, wow!
6VDEms4.png


Still need one or two "placeholder" asset things and then I'm venturing into custom windows + menus!
(I'm a little scared, lol)

Forum statistics

Threads
113,690
Messages
1,076,680
Members
147,713
Latest member
etanara0083
Top