The official VisuStella notetag help thread

WilsonE7

Veteran
Veteran
Joined
Oct 12, 2019
Messages
60
Reaction score
20
First Language
English
Primarily Uses
RMMZ
Yeah there is a way to do this! You are on the right track! I did something similar with a Necromancer class (only targeting Zombies)
Thanks for your quick response! I've been looking over the code and I think I'm getting how it works. But could you explain the Pre-Start Action and common event in more detail? What's the temporary variable, and what are all the if statements for? My guess is that this skill is meant to be used by anyone and it's checking to see which actors are involved with the Dual Tech (determined in the Pre-Start Action by $gameVariables.setValue(1,index);). But for my game, each Dual Tech requires a specific pair of actors, and each skill's Action Sequence would only reference those two specific actors. Would I still need all those if statements?

For example, let's say I have Reid learn a Dual Tech called Twin Slash, where Priscilla is the other required member. No one else has access to this skill. Can I just reference those two ActorID's in the Action Sequence, or do I still need all the if statements?
 

Starsinger

Villager
Member
Joined
Jan 18, 2014
Messages
16
Reaction score
10
First Language
English
Primarily Uses
I'm trying to make an unleash effect that puts a barrier on the ally with the lowest hp%. The first part is easy, make the skill and assign it as a guard unleash. It's getting the skill to auto-target that I'm not sure how to go about.

I presume it's something like
<JS Targets>
targets = [ally.lowesthp];
</JS Targets>
But I don't think it's as easy as that.
 
Joined
Jan 23, 2014
Messages
171
Reaction score
24
First Language
English
Primarily Uses
RMMZ
Thanks for your quick response! I've been looking over the code and I think I'm getting how it works. But could you explain the Pre-Start Action and common event in more detail? What's the temporary variable, and what are all the if statements for? My guess is that this skill is meant to be used by anyone and it's checking to see which actors are involved with the Dual Tech (determined in the Pre-Start Action by $gameVariables.setValue(1,index);). But for my game, each Dual Tech requires a specific pair of actors, and each skill's Action Sequence would only reference those two specific actors. Would I still need all those if statements?

For example, let's say I have Reid learn a Dual Tech called Twin Slash, where Priscilla is the other required member. No one else has access to this skill. Can I just reference those two ActorID's in the Action Sequence, or do I still need all the if statements?

Great questions! The game variable is intended to grab the index of the party member based off the actorid you put in. So it wouldn't matter where Priscilla is in the position of leader (0), 1, 2, or 3, as long as she is in the active battle party. if you didn't have the index, you could possibly try just the actor id! This was just an example to get you started. I always say trying things out to see if it works is best practice. That's the nice thing about coding, there are a multitude of ways to get the same thing done!
 
Joined
Jan 23, 2014
Messages
171
Reaction score
24
First Language
English
Primarily Uses
RMMZ
Thanks for your quick response! I've been looking over the code and I think I'm getting how it works. But could you explain the Pre-Start Action and common event in more detail? What's the temporary variable, and what are all the if statements for? My guess is that this skill is meant to be used by anyone and it's checking to see which actors are involved with the Dual Tech (determined in the Pre-Start Action by $gameVariables.setValue(1,index);). But for my game, each Dual Tech requires a specific pair of actors, and each skill's Action Sequence would only reference those two specific actors. Would I still need all those if statements?

For example, let's say I have Reid learn a Dual Tech called Twin Slash, where Priscilla is the other required member. No one else has access to this skill. Can I just reference those two ActorID's in the Action Sequence, or do I still need all the if statements?

Great questions! The game variable is intended to grab the index of the party member based off the actorid you put in. So it wouldn't matter where Priscilla is in the position of leader (0), 1, 2, or 3, as long as she is in the active battle party. So the condition branches are intended to play out no matter the index! if you didn't have the index, you could possibly try just the actor id! (I tried to have the $gamevariable.value(1) replace the Actor Index variable in Action Sequences, but it doesn't work afaik). This was just an example to get you started. I always say trying things out to see if it works is best practice.

That's the nice thing about coding, there are a multitude of ways to get the same thing done!

I'm trying to make an unleash effect that puts a barrier on the ally with the lowest hp%. The first part is easy, make the skill and assign it as a guard unleash. It's getting the skill to auto-target that I'm not sure how to go about.

I presume it's something like
<JS Targets>
targets = [ally.lowesthp];
</JS Targets>
But I don't think it's as easy as that.

So JS Targets is interesting because you have to actually define the target yourself from scratch, so how I would handle it is simliar to Wilson's.

Code:
<JS Targets>
const allies = this.targetsForFriends();
if (allies.length > 1){
  // Remove the user from the allies array
  allies.splice(allies.indexOf(user), 1);
  //Sorts Allies Array in ascending order of HP (Lowest -> Highest)
  allies.sort(function(c,d){
    return c.hp - d.hp;
  });
  //Removes the first element of Allies. (Lowest HP Ally)
  var ally = allies.shift();
  if (!!ally){
     targets.push(ally);
  }
}
</JS Targets>

Hope this helps! :)

(Sorry Mods about the double post, was trying to multi-quote! Please merge.)
 

Ys42

Villager
Member
Joined
Nov 24, 2019
Messages
15
Reaction score
6
First Language
Russian
Primarily Uses
RMMV

cchmaster

Veteran
Veteran
Joined
Nov 3, 2020
Messages
69
Reaction score
42
First Language
Chinese
Primarily Uses
RMMZ
Hello friends, I have a problem here.

Weapon Animation doesn't work during action sequence?

When I use normal attack, it works perfectly, showing my custom weapon. However, during an action sequence, the weapon shown becomes the original one.

I've run a new project and Visustella's sample project to test this. Both result the same thing. Weapon Animation seems not working in action sequence.

I think I saw a gif with custom weapon shown in action sequence on Weapon Animation's official page, but it seems to be removed.

Did I miss something or this function is just not implemented yet?

OK, I accidentally figured this out. When using "Freeze Motion Frame" with "Show Weapon", it shows the default weapon. Only when using "Motion Type" or other commands from "Move" group, it shows the custom weapon.

Unfortunately all action sequences are controlled with "Freeze Motion Frame". That's why I couldn't see my custom weapon.
 

EverNoir

Villager
Member
Joined
Dec 12, 2020
Messages
14
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Hi, I was wondering if someone could teach me how to make states stackable in MZ using Visustella. I have all the plug-ins I just can't figure out how to make the state actually stack.
 

MLyons

Villager
Member
Joined
May 20, 2019
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Good day all - I'm working on a translation tool to simulate languages in RPGMZ. I've got the Javascript class running fine and now I'm working on integrating it with the messaging system. I've defaulted to using VisuStella Messaging Core. I'm stuck though in actual implementation and could use some advise or suggestions.

I've been digging into the Message Core documentation and playing with the Text Code Actions and have been able to take the text entry box and send it to my custom Language class that is stored in a Global Variable and it process it correctly. But how do I display new result - I'd like to replace the original text with "translated" text. Even using a simple static text return statement (something like "return 'Test';") doesn't actually show that return value of "Test". It just displays the text in the brackets.

Said another way - if I have a Text Code Action block setup as:
Match: TestTranslate
Type: set to the string value
Common Event not used
And the Javascript set to a minimal static return "return 'Hello World';"

And the message box uses "\TestTranslate[This should be replaced]"

In game I get a dialog box that says "[This should be replaced]" ... the return value is not displayed.

Am I doing something wrong? And in this case the argument[0] value that is passed to the Javascript section is " TestTranslate[This should be replaced]"...with a special character like a box in front of that first T where the space is.

Thanks for any thoughts - cheers, mike
 

MLyons

Villager
Member
Joined
May 20, 2019
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Alright - I guess I figured it out - using the Text Replacement Actions and splicing the resultant string on the < and >. It's working now!
 

Ys42

Villager
Member
Joined
Nov 24, 2019
Messages
15
Reaction score
6
First Language
Russian
Primarily Uses
RMMV
Hm, can someone explain this one to me? Custom parameters, they have formulas in JS. That I do understand. Now, can I set their values outside of the basic parameters that is available?
In another words:
Ive got a Strenght stat, for example. Can I make it to be just 10 at lvl 1 for my character, and then grom with levels or items independently from all other stats? OR there is no way around using basic, vanilla stats from mz, and then hiding them with your new stats?
 

optiprimeful

Veteran
Veteran
Joined
Aug 27, 2017
Messages
86
Reaction score
7
First Language
English
Primarily Uses
RMMV
Hello,

I can't get slip damage to work on this poison state

<JS On Add State>

target._poisonStacks = target._poisonStacks || 0;

target.setStateDisplay(4, target._poisonStacks);

</JS On Add State>



<JS Pre-End Turn>

target._poisonStacks = target._poisonStacks || 0;

target._poisonStacks++;

target.setStateDisplay(4, target._poisonStacks);

</JS Pre-End Turn>



<JS HP Slip Damage>

target._poisonStacks = target._poisonStacks || 0;

var n = target._poisonStacks;

damage = Math.floor(n);

</JS HP Slip Damage>
 
Last edited:

GHNeko

Sega Stockholm Syndrome.
Member
Joined
May 28, 2018
Messages
25
Reaction score
1
First Language
English
Primarily Uses
RMMZ
I'm having a bit of an issue with <JS On Expire State>

the code im using right now goes like this

Code:
<JS On Add State>

target.gainHp(Math.round(this.hp * 0.6));

</JS On Add State>

<JS On Expire State>

target.gainHp(Math.round(-this.hp * 0.375));

</JS On Expire State>

i had some more complicated stuff but its not really getting the job done
the issue is; lets say the character's hp was 500/504
with that snippet, they gain 300 HP as the max HP is increased to 806
so it becomes 800/806
the problem i'm having is when the state applies, the max HP increase goes away and the character's hp goes to 504/504 because of the loss of hp bringing down current
the issue with this is that using this.hp on expire will return 504
i dont know how to capture the current hp of the character while the state was active before and use that value during expiration
so that i can apply an hp reduction that keeps the ratio betwen current and max the same when checked against the ratio when the state is active
its a non issue if the current hp is less than max hp after the state expires
but for hp between 505-805, if i use the example above, i'm at a complete loss
 

kikicoco3909

Warper
Member
Joined
Jan 3, 2021
Messages
1
Reaction score
0
First Language
chinese
Primarily Uses
RMMZ
Hi, @Trihan I'm trying to create a poison state, but the state I made can't kill the target
may you help me please ?
my state's notetage setting like the following

<JS HP Slip Damage>
damage = Math.max(((user.mat * 4 - target.mdf *2 + user.luk)) / 3 , 1);
if (damage >= target.hp) {
target.addState(1)
};
</JS HP Slip Damage>
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,951
Reaction score
2,224
First Language
English
Primarily Uses
RMMV
Okay, a lot of stuff's been going on with me lately including losing my job, so I've been slightly adrift. I'm back now though, and ready to tackle all your notetag needs!
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
395
Reaction score
592
First Language
English
Primarily Uses
RMMV
Glad to see you back!

I Posted this in the official plugin thread and havent had a response yet, so I figured I'd try here:

Has it been mentioned anywhere on how to give the default parameters custom formulas?

In MV, you could use Yanfly's ExtraParameterControl (or something like that) plugins to give the X and S parameters (like target rate, critical rate, physical damage rate, etc) custom formulas. For example, I liked to have my PDR and MDR decrease as the actors' ATK and MDF went up.

I'm assuming you'd do this somewhere in the core engine's Parameter settings, I just have no idea where to start:

Code:
// Determine the variables used in this calculation.
let xparamId = arguments[0];
let base = this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);
let plus = this.xparamPlus(xparamId);
let paramRate = this.xparamRate(xparamId);
let flatBonus = this.xparamFlatBonus(xparamId);

// Formula to determine total parameter value.
let value = (base + plus) * paramRate + flatBonus;

// Final value
return value;
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,951
Reaction score
2,224
First Language
English
Primarily Uses
RMMV
There's a JS:Formula for X and S parameters in the settings for the Core plugin. If you want to have specific formulae for different params, just branch it on the param ID.
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
395
Reaction score
592
First Language
English
Primarily Uses
RMMV
Yeah, I think that's the code I posted above. I'm not good at programming so I have no idea what the syntax is or what you mean by "branch it". Would you mind posting an example of what the code should look like and where it should go?

EDIT: Turns out I probably won't need help after all. Yanfly's Special Parameter Formulas plugin for MV is compatible with MZ. Since it's easy to use (not to mention much more well documented and doesn't require the user to have coding knowledge), I'll just use that instead.
 
Last edited:

Austrian

Veteran
Veteran
Joined
Jan 17, 2016
Messages
31
Reaction score
22
First Language
English
Geez, I am having a issue and I bet its pretty simple to solve but I can't seem to solve it.

Anyway I am using auto battle function and I've managed to get the actor and enemy skills to work the way I want. However, when it comes to creating a healing skill it doesn't seem to work with Battle A.I conditions at all.

I am trying to set it up where it only triggers the heal when the user or allies have HP% at 50% or below. So I went with:

<Any AI Conditions>
User HP% <= 0.25
Target is Actor HP% <= 0.25
</Any AI Conditions>

Can't seem to get it to work properly. Seems to just randomly heal.

@Trihan Welcome back and sorry to hear about the job loss.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,951
Reaction score
2,224
First Language
English
Primarily Uses
RMMV
Geez, I am having a issue and I bet its pretty simple to solve but I can't seem to solve it.

Anyway I am using auto battle function and I've managed to get the actor and enemy skills to work the way I want. However, when it comes to creating a healing skill it doesn't seem to work with Battle A.I conditions at all.

I am trying to set it up where it only triggers the heal when the user or allies have HP% at 50% or below. So I went with:

<Any AI Conditions>
User HP% <= 0.25
Target is Actor HP% <= 0.25
</Any AI Conditions>

Can't seem to get it to work properly. Seems to just randomly heal.

@Trihan Welcome back and sorry to hear about the job loss.

I'll take a look at this for you later and see if I can figure out what the issue is.
 

Heis

Warper
Member
Joined
Jan 20, 2021
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Hey Everyone! I have a couple simple issues (at least I think.) that may involve editing some stuff within some VisuStella plugins.

First, I'd like to be able to disable the flashing enemy selection box as pictured here:
S9DJAoRKjB.gif

Also, I'm currently using the STB Battle System but would like the enemy selection list that comes up when you're choosing an enemy to attack in the default battle engine, pictured here:
nw_Z3VyJjDhsb.png

Could anyone help me remove the flashing selector and add the enemy list when attacking, to the STB Battle System plugin?

Thank you!
 

Attachments

  • S9DJAoRKjB.gif
    S9DJAoRKjB.gif
    233.9 KB · Views: 1
  • nw_Z3VyJjDhsb.png
    nw_Z3VyJjDhsb.png
    62 KB · Views: 1

Latest Threads

Latest Posts

Latest Profile Posts

Working on some A4 Interior walls in my own style.
Making test maps is really illuminating when it comes to figuring out how the real maps should be. It's like the outline that one writes for the story before writing the actual story.
I am adamant about not having missable quests, which means having to write entirely new scenes at each plot progression that takes into account that time and events have passed since the quest could first be accepted while still having there be a quest to solve in the first place. It's worth every second.

Forum statistics

Threads
110,381
Messages
1,052,845
Members
143,430
Latest member
Hiboux
Top