The official VisuStella notetag help thread

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,780
Reaction score
2,921
First Language
English
Primarily Uses
RMMZ
There is sort of, but it's a bit fiddly.

The max level notetag appears to directly modify the actor's data, which is loaded when you start the game. You can change its value mid-game, but it isn't part of the data that's included in a save, so if you did this you would also have to store the value in a new property on the actor, and modify the game load code so that it retrieves that value on loading a game.
 

Lostsouls46

Villager
Member
Joined
Jun 27, 2021
Messages
11
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Unsure if anyone has already answered this as my googlefu can't seem to find it, but could someone give me an example of a common event chain that determines animations based on weapon equipped? I.e. if a melee weapon is equipped move to target else end? I cant seem to do this by weapon type without having to create a huge if chain by listing every weapon in my game.
 

burb

Villager
Member
Joined
Jan 23, 2016
Messages
22
Reaction score
4
Primarily Uses
Hi all,

When using VisuStella's Battle Core plugin, I have selected the Border battle layout. This presents the battle screen with a character portrait on the right side, and the actor command window on the left.

I'd like to have some flexibility with the position and width of the actor command window when using this layout. None of the plugin commands or parameters allow the window position (or any of the attributes) to be edited.

Is there a way around this? Ideally, just reducing the width of the command window and being able to position it on the x-axis would be very helpful.

Thanks!
 

lupecavem

Villager
Member
Joined
Feb 17, 2018
Messages
12
Reaction score
4
First Language
Engish
Primarily Uses
RMMV
Hey y'all. Having an issue with the show/hide tags in Skills and States core. I need

<JS Skill Visible>
code
code
visible = code;
</JS Skill Visible>

to show a skill x once skill y is learned, but stop showing skill x once skill z is learned.

Any help is appreciated!

EDIT: I figured it out on my own through lots of trial and error! If anyone else needs to know how, this is what I did

<JS Skill Visible> let x = 0 if (user.isLearnedSkill(SKILL ID A) && user.isLearnedSkill(SKILL ID B)) { x = 3; } else if (user.isLearnedSkill(SKILL ID A)) { x = 2; } visible = x === 2; </JS Skill Visible>
 
Last edited:

Aegis98

Villager
Member
Joined
Jul 10, 2021
Messages
8
Reaction score
2
First Language
English
Primarily Uses
RMMZ
I have the VisuStella SkillStatesCore plugin and I would like to set up certain states to do a fraction of the damage that the skill dealt over time. For example, I want my Fire spell to have a chance of inflicting the Burning state, which will do 10% of the damage of the initial attack.

My damage formula for this skill is as follows.

(a.mat ** 2 / (a.mat + b.mdf)) * (1 + (a.tp * .01))

The plugin gives me the following template to put into the notetag for the state.

<JS type Slip Damage>
code
code
damage = code;
</JS type Slip Damage>

How would I go about coding for my goal?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,780
Reaction score
2,921
First Language
English
Primarily Uses
RMMZ
Hey y'all. Having an issue with the show/hide tags in Skills and States core. I need

<JS Skill Visible>
code
code
visible = code;
</JS Skill Visible>

to show a skill x once skill y is learned, but stop showing skill x once skill z is learned.

Any help is appreciated!

EDIT: I figured it out on my own through lots of trial and error! If anyone else needs to know how, this is what I did

<JS Skill Visible> let x = 0 if (user.isLearnedSkill(SKILL ID A) && user.isLearnedSkill(SKILL ID B)) { x = 3; } else if (user.isLearnedSkill(SKILL ID A)) { x = 2; } visible = x === 2; </JS Skill Visible>
You've really overcomplicated that for yourself. You can get the same effect with:

JavaScript:
<Show if Learned Skill: ID of Y>
<Hide if Learned Skill: ID of Z>
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,252
Reaction score
1,210
First Language
English
Primarily Uses
RMMV
<JS Skill Visible> let x = 0 if (user.isLearnedSkill(SKILL ID A) && user.isLearnedSkill(SKILL ID B)) { x = 3; } else if (user.isLearnedSkill(SKILL ID A)) { x = 2; } visible = x === 2; </JS Skill Visible>
Aside from Trihan giving you the efficient way to do this just using the included notetags...I can't figure out what you're trying to accomplish with all of that. If the user doesn't know any of the skills, it will return false (not visible). If the user knows both A and B, it will still return false, so why set x to a different value in that case, if it's never used and gives the same result?

The only case in which it returns true is if the user knows A but not B.

So what's the point of assigning x to 0 and 3 and 2 (or having x at all) when you're just asking:
Code:
visible = (user.isLearnedSkill(ID A) && !user.isLearnedSkill(ID B));
 

lupecavem

Villager
Member
Joined
Feb 17, 2018
Messages
12
Reaction score
4
First Language
Engish
Primarily Uses
RMMV
Aside from Trihan giving you the efficient way to do this just using the included notetags...I can't figure out what you're trying to accomplish with all of that. If the user doesn't know any of the skills, it will return false (not visible). If the user knows both A and B, it will still return false, so why set x to a different value in that case, if it's never used and gives the same result?

The only case in which it returns true is if the user knows A but not B.

So what's the point of assigning x to 0 and 3 and 2 (or having x at all) when you're just asking:
Code:
visible = (user.isLearnedSkill(ID A) && !user.isLearnedSkill(ID B));
That is a lot simpler way of writing it, thank you! I couldn't use the simple show and hide tags for what I'm doing, and I wasn't sure how to write the one line. :) I'm making a system where actors equip accessories and acquire progressively better skills from them as they gain experience with the item, but only as long as they have the accessory equipped (FF7 materia, basically). This meant that A.) the basic add skill trait feature of equipment wouldn't work, because it would assign all the skills at once (Heal I, II, and III) and B.) the equipment learning plugin I'm using wouldn't work by itself, because then the skills would be permanent. By using equipment learning and the show/hide features of skill/state core, I was able to pull off exactly what I wanted.

Through equipment learning, accessories teach levels of proficiency to the actor for the pieces themselves (just empty skills called Heal Rune Level 2, 3 etc) that are hidden from the menu and battle. Actor learns Level 2, now <Hide if Learned Skill: ID of X> gets rid of Heal I from the pool of spells provided by the accessory. Actor Learns Level 3, now <Show if Learned Skill: ID of Y> allows Heal III to appear. Show and Hide wouldn't work for Heal II, however, because it needed a Show tag for ID of X and a Hide tag for ID of Y, and they cancelled each other out and caused the skill to always be visible once the actor had learned Skill ID of X. So, I had to use a code instead. I figured it out and it works just as I hoped but I like your shorter and simpler one lol :)

@Trihan also, I can assure you, <Show if Learned Skill: ID of Y> and <Hide if Learned Skill: ID of Z> together did not work. I tried rearranging them and I tried using <Hide if Learned All Skills: Y, Z> but as long as it had the Show if Y tag, they would cancel each other out and it would simply appear once Show if Y was true and not go away. It was a super overcomplicated solution, but it's the only one I could come up with that worked, lol :kaoswt2:
 
Last edited:

rockhub

Villager
Member
Joined
Oct 6, 2012
Messages
13
Reaction score
7
First Language
English
Primarily Uses
I need help with 3 things making the Bleed, Black Blood states, and making a skill that heals that caster team by the damage it does but the more teammates the less healingit does 1 party member no heal loss 2 party members 1/2 of damage is heal 3 party members 1/3 of damage is heal and so on. Please help me.

here is the MV bleed state code:

<Custom Apply Effect>
user._bleedDmg = user._bleedDmg || 0;
user._bleedDmg += Math.ceil(origin.atk * 0.50);
</Custom Apply Effect>

<Custom Remove Effect>
user._bleedDmg = 0;
</Custom Remove Effect>

<Custom Regenerate Effect>
var damage = user._bleedDmg || 0;
damage = Math.min(damage, 9999);
if (damage !== 0) {
user.startAnimation(174);
user.gainHp(-damage);
user.startDamagePopup();
user.clearResult();
}
</Custom Regenerate Effect>

hear is Black Blood:

<Guard HP Life Steal>

<Custom Respond Effect>
if (this.isHpEffect() && target.result().hpDamage) {
var type = 'hp';
if (this.isPhysical()) {
type += 'Physical';
} else if (this.isMagical()) {
type += 'Magical';
} else {
type += 'Certain';
}
var rate = this.getLifeStealRate(target, target.result().hpDamage, 'hp');
rate += user.getLifeStealRate(type + 'Rate', target);
var flat = this.getLifeStealFlat(target, target.result().hpDamage, 'hp');
flat += user.getLifeStealFlat(type + 'Flat', target);
var dmg = Math.floor(target.result().hpDamage * rate + flat);
if (dmg > 0) {
var result = JsonEx.makeDeepCopy(user._result);
user.gainHp(-dmg);
user.startDamagePopup();
user.startAnimation(2);
user.clearResult();
user._result = result;
}
}
</Custom Respond Effect>
 

FrancoBash

Villager
Member
Joined
Jul 9, 2021
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMZ
I was wondering if anyone knew how to use a pre-damage notetag to get a 'Parry' effect. I'm thinking it should be possible with a combination of pre-damage and auto triggers. The exact mechanic I'm thinking of is as such:

If the user is hit with a physical skill then they have 33% chance of reducing the damage by 50%. Anyone know how this could be done?
 

slipstream7

Warper
Member
Joined
Jul 22, 2021
Messages
3
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Hey all. I know there's probably a super simple solution to this, but I can't find it. I'm following an old Yanfly tutorial to make the Chicken Knife, a Knife that sets its ATK equal to the number of battles you've escaped from. I'm using the Visustella suite in MZ, and to my understanding from the itemcore wiki, the knife's notetag should look like this:

<JS Parameters>
ATK = $gameSystem.escapeCount();
</JS Parameters>

However, when I test it out and run from battle, the stats of the knife do not change. Can anyone help me figure out where I'm going wrong?
Thank you :)
 

CrocPirate

Veteran
Veteran
Joined
Sep 1, 2020
Messages
49
Reaction score
29
First Language
English
Primarily Uses
RMMZ
@slipstream7 Hello, I have tested out your code and it works fine for me. Could you provide a screenshot of your weapon's setting?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,252
Reaction score
1,210
First Language
English
Primarily Uses
RMMV
I need help with 3 things...Please help me.
I know this is a bit tardy, I don't check this thread regularly. But since no one else has said anything to you: it is almost impossible to help you based on your post. You say you need help then you spout out a bunch of unformatted code.

If you want help, you need to actually say what you need help with - what do you want to happen, and what is happening right now? i.e. what is wrong?

Also, any time you're supplying code in a forum post, you should put it in Code tags (the right-most icon on the top). That will preserve formatting with empty spaces at the beginning of lines, and it will correctly show anything that includes brackets, which otherwise get swallowed by the forum formatting.
 

slipstream7

Warper
Member
Joined
Jul 22, 2021
Messages
3
Reaction score
2
First Language
English
Primarily Uses
RMMZ
@slipstream7 Hello, I have tested out your code and it works fine for me. Could you provide a screenshot of your weapon's setting?
Thanks for the response! Screenshot as requested.


>Edit: I just booted it up after a break and now it works as expected. I'm unsure exactly as to why, but it works now. Thank you for your time anyway.

The personal victory here is that my code was correct :)
 

Attachments

  • delete.jpg
    delete.jpg
    173 KB · Views: 5
Last edited:

GiantHurtBall

Villager
Member
Joined
Feb 13, 2018
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
It's come to my attention that a fair number of people are having issues getting their heads around the new JS injection parameters and notetags present in VisuStella's core plugins, and therefore they're struggling to achieve the effects they want. This will be especially true of people who were used to using YEP's hardcoded notetags for various effects, which are no longer present.

So in comes this thread! If you can't figure out how to make something you want work with the VS library, let me know what it is and I'll do what I can to give you the code you need to achieve it! Similarly to my lunatic notetag thread for MV.


Orginal http://www.yanfly.moe/wiki/Chain_Lightning_(MV_Plugin_Tips_&_Tricks)

<Damage Formula>
// Set the chain multiplier to a value if it doesn't exist.
this._chainmultiplier = this._chainmultiplier || 1.0;
// This is the damage formula.
value = user.mat + 1000;
// Apply the chain multiplier to the damage formula.
value *= this._chainmultiplier;
// Reduce the chain multiplier per target.
this._chainmultiplier -= 0.2;
</Damage Formula>

<Custom Target Eval>
// Adds the selected target to the target list.
targets.push(target);
// Grab the group of alive foes as candidates.
var members = foes.aliveMembers();
// Remove the target from the group of candidates.
members.splice(members.indexOf(target), 1);
// This is the number of extra targets to select with Chain Lightning.
var extraTargets = 3;
// Loop the extra targets.
while (extraTargets--) {
// Grab a random foe from the alive foes.
var member = members[Math.floor(Math.random() * members.length)];
// Check to see if the member exists.
if (member) {
// Add the member to the group of targets.
targets.push(member);
// Remove the member as a viable candidate.
members.splice(members.indexOf(member), 1);
}
}
</Custom Target Eval>

<Enemy or Actor Select>



Trying to convert it over to MZ


rmmz_managers.js:2030 SyntaxError: Unexpected token 'var'
at new Function (<anonymous>)
at Object.VisuMZ.<computed>.<computed> [as createTargetsJS] (VisuMZ_1_BattleCore.js:16134)
at Object.VisuMZ.<computed>.<computed> [as Parse_Notetags_Targets] (VisuMZ_1_BattleCore.js:16134)
at Object.VisuMZ.<computed> (VisuMZ_1_BattleCore.js:16134)
at Object.VisuMZ.<computed> (VisuMZ_1_MessageCore.js:1854)
at Object.VisuMZ.<computed> [as ParseSkillNotetags] (VisuMZ_1_SkillsStatesCore.js:2447)
at Object.VisuMZ.<computed> [as ParseAllNotetags] (VisuMZ_0_CoreEngine.js:7281)
at Scene_Boot.<computed> (VisuMZ_0_CoreEngine.js:7281)
at Scene_Boot.<computed>.onDatabaseLoaded (VisuMZ_1_BattleCore.js:16134)
at Scene_Boot.<computed>.<computed> (VisuMZ_1_ElementStatusCore.js:3330)
[TABLE]
[TR]
[TD]
SceneManager.catchNormalError[/TD]
[TD]@[/TD]
[TD]rmmz_managers.js:2030[/TD]
[/TR]
[/TABLE]




<JS Pre-Damage>

// Set the chain multiplier to a value if it doesn't exist.

this._chainmultiplier = this._chainmultiplier || 1.0;

// This is the damage formula.

value = user.mat*21 + user.level*6 - target.mdf*2;

// Apply the chain multiplier to the damage formula.

value *= this._chainmultiplier;

// Reduce the chain multiplier per target.

[this._chainmultiplier -= 0.2];

</JS Pre-Damage>




<JS Targets>

// Adds the selected target to the target list.

targets.push(target);

// Grab the group of alive foes as candidates.

var members = foes.aliveMembers();
// Not sure why the variable is flagging :ysad:
// tried $gameTroop.aliveMembers();


// Remove the target from the group of candidates.

members.splice(members.indexOf(target), 1);

// This is the number of extra targets to select with Chain Lightning.

var extraTargets = 4;

// Loop the extra targets.

while (extraTargets--) (

// Grab a random foe from the alive foes.

var member = members[Math.floor(Math.random() * members.length)];

// Check to see if the member exists.

if (member) (

// Add the member to the group of targets.

targets.push(member);

// Remove the member as a viable candidate.

[members.splice(members.indexOf(member), 1)];

)

)

</JS Targets>

Any help appreciated
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,780
Reaction score
2,921
First Language
English
Primarily Uses
RMMZ
Orginal http://www.yanfly.moe/wiki/Chain_Lightning_(MV_Plugin_Tips_&_Tricks)

<Damage Formula>
// Set the chain multiplier to a value if it doesn't exist.
this._chainmultiplier = this._chainmultiplier || 1.0;
// This is the damage formula.
value = user.mat + 1000;
// Apply the chain multiplier to the damage formula.
value *= this._chainmultiplier;
// Reduce the chain multiplier per target.
this._chainmultiplier -= 0.2;
</Damage Formula>

<Custom Target Eval>
// Adds the selected target to the target list.
targets.push(target);
// Grab the group of alive foes as candidates.
var members = foes.aliveMembers();
// Remove the target from the group of candidates.
members.splice(members.indexOf(target), 1);
// This is the number of extra targets to select with Chain Lightning.
var extraTargets = 3;
// Loop the extra targets.
while (extraTargets--) {
// Grab a random foe from the alive foes.
var member = members[Math.floor(Math.random() * members.length)];
// Check to see if the member exists.
if (member) {
// Add the member to the group of targets.
targets.push(member);
// Remove the member as a viable candidate.
members.splice(members.indexOf(member), 1);
}
}
</Custom Target Eval>

<Enemy or Actor Select>



Trying to convert it over to MZ


rmmz_managers.js:2030 SyntaxError: Unexpected token 'var'
at new Function (<anonymous>)
at Object.VisuMZ.<computed>.<computed> [as createTargetsJS] (VisuMZ_1_BattleCore.js:16134)
at Object.VisuMZ.<computed>.<computed> [as Parse_Notetags_Targets] (VisuMZ_1_BattleCore.js:16134)
at Object.VisuMZ.<computed> (VisuMZ_1_BattleCore.js:16134)
at Object.VisuMZ.<computed> (VisuMZ_1_MessageCore.js:1854)
at Object.VisuMZ.<computed> [as ParseSkillNotetags] (VisuMZ_1_SkillsStatesCore.js:2447)
at Object.VisuMZ.<computed> [as ParseAllNotetags] (VisuMZ_0_CoreEngine.js:7281)
at Scene_Boot.<computed> (VisuMZ_0_CoreEngine.js:7281)
at Scene_Boot.<computed>.onDatabaseLoaded (VisuMZ_1_BattleCore.js:16134)
at Scene_Boot.<computed>.<computed> (VisuMZ_1_ElementStatusCore.js:3330)
[TABLE]
[TR]
[TD]
SceneManager.catchNormalError[/TD]
[TD]@[/TD]
[TD]rmmz_managers.js:2030[/TD]
[/TR]
[/TABLE]




<JS Pre-Damage>

// Set the chain multiplier to a value if it doesn't exist.

this._chainmultiplier = this._chainmultiplier || 1.0;

// This is the damage formula.

value = user.mat*21 + user.level*6 - target.mdf*2;

// Apply the chain multiplier to the damage formula.

value *= this._chainmultiplier;

// Reduce the chain multiplier per target.

[this._chainmultiplier -= 0.2];

</JS Pre-Damage>




<JS Targets>

// Adds the selected target to the target list.

targets.push(target);

// Grab the group of alive foes as candidates.

var members = foes.aliveMembers();
// Not sure why the variable is flagging :ysad:
// tried $gameTroop.aliveMembers();


// Remove the target from the group of candidates.

members.splice(members.indexOf(target), 1);

// This is the number of extra targets to select with Chain Lightning.

var extraTargets = 4;

// Loop the extra targets.

while (extraTargets--) (

// Grab a random foe from the alive foes.

var member = members[Math.floor(Math.random() * members.length)];

// Check to see if the member exists.

if (member) (

// Add the member to the group of targets.

targets.push(member);

// Remove the member as a viable candidate.

[members.splice(members.indexOf(member), 1)];

)

)

</JS Targets>

Any help appreciated
I have a working version of Chain Lightning in MZ, I'll help you with this shortly.
 

lupecavem

Villager
Member
Joined
Feb 17, 2018
Messages
12
Reaction score
4
First Language
Engish
Primarily Uses
RMMV
If I wanted to have my actors show up above the status window in a horizontal row instead of to the right of the screen in a vertical row, what changes would I need to make to the JS in the JS: Home Position Actor Battler Settings parameter in Battlecore? I have this currently, which gets one actor in the correct spot but it doesn't work with multiple actors because I didn't know what to put for the offset area.

Code:
// Declare Constants
const sprite = this;
const actor = this._actor;
const index = arguments[0];

// Make Calculations
let x = Math.round(Graphics.width / 4)
x -= Math.floor((Graphics.width - Graphics.boxWidth) / 2);
x += index * 32;
let y = (Graphics.height - 5) - ($gameParty.maxBattleMembers() * 48);
y -= Math.floor((Graphics.height - Graphics.boxHeight) / 2);
y += index * 48;

// Home Position Offsets
const offsetNote = /<SIDEVIEW HOME OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i;
const xOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$1) : 0));
const yOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$2) : 0));
x = xOffsets.reduce((r, offset) => r + offset, x);

// Set Home Position
this.setHome(x, y);
 
Last edited:

boikish

Always trying to help :)
Veteran
Joined
Sep 8, 2016
Messages
170
Reaction score
49
First Language
English
Primarily Uses
N/A
Thanks for the thread and all of the help, Trihan. :)

Is there an equivalent to .startAnimation(x) that can be used with states in VS?

Thanks again!
 

slipstream7

Warper
Member
Joined
Jul 22, 2021
Messages
3
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Hey again all, I'm having a little trouble figuring out how to create the targeting scope that I need. I have a character selects either 1 ally, or 1 enemy, then checks if they have a certain state. If yes, they remove it, if not, they apply it. I have the state part working great, I just need the targeting part. I've dug around all morning and couldn't find an answer or an option to do so so far.

The battle core lays it out like such:
Code:
<JS Targets>
 code
 code
 targets = [code];
</JS Targets>
I've fiddled a little bit with $gameParty.aliveMembers() and $gameTroop.aliveMembers(), but I can't figure out anything that works, either it targets everyone, or it doesn't work at all. Any help would be greatly appreciated!
 

cchmaster

Veteran
Veteran
Joined
Nov 3, 2020
Messages
71
Reaction score
42
First Language
Chinese
Primarily Uses
RMMZ
Unsure if anyone has already answered this as my googlefu can't seem to find it, but could someone give me an example of a common event chain that determines animations based on weapon equipped? I.e. if a melee weapon is equipped move to target else end? I cant seem to do this by weapon type without having to create a huge if chain by listing every weapon in my game.
I'm not sure if I really understand your question, but I guess you can make new basic attacks(with action sequence) for both melee and ranged weapons. Swap the original attack command with the new ones you've made.
 

Latest Threads

Latest Profile Posts

Feeling like my new profile picture is nice. Thinking of making it semi-permanent, does any one has an opinion? Does it look too evil or does it work as a public profile picture? :)
Bishiba.png
My washing machine is a supernatural being. I lost a piece of clothing in there a month ago; searched up and down, inside other clothes, nothing. It just vanished.
Today, put in a new load. When I pull it out, the missing clothing is back! And a sock was sacrificed in the process :yswt2:
thought I'd upgrade to mz from mv cause of the nice quality of life features but ****ing hell why couldn't they allow old plugins to work in it and secondly how come in over a year since it's release has there been no mz version of something so crucial as a non grid based movement plugin. I guess I'll stick with mv. (why wasnt mz just an update to mv anyway literally nothing substantial changed..)

Forum statistics

Threads
116,023
Messages
1,095,010
Members
151,346
Latest member
gd111
Top