The official VisuStella notetag help thread

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,977
Reaction score
4,588
First Language
English
Primarily Uses
RMMZ
Do not worry. I figured it out. Like RPGMaker, Visustella takes some time to digest especially the more complicated systems. Not sure whether she realizes it or not, but Olivia has the OTB system set up in VS to have more possibilities than dreamt of in Octopath Traveler.

Thank you, again, Trihan for your assistance (and especially with porting the Yanfly Tips and Tricks to MZ). You have no idea how many hours of time and frustration you are saving people.
Thanks for reminding me I'm due to do the next 30.
 

schulliya

Veteran
Veteran
Joined
May 13, 2020
Messages
36
Reaction score
14
First Language
portuguese
Primarily Uses
RMMV
i dont know how to delete a message, sorry
 

Jeivalien

Wandering soul
Veteran
Joined
Jan 24, 2014
Messages
69
Reaction score
32
First Language
Spanish
Primarily Uses
RMMV
Hi, I'm trying to make a passive state that ampliflies the power of the first TP skill you use in battle and then removes itself(it refreshes after each encounter, hence the Switch Condition). I have the following in my state's notebox:

JavaScript:
<Passive Condition Switch ON: 23>

<JS Pre-Damage As User>
  user._effectUsed = false;
  if (value >= 0 && user.skillTpCost(this.item()) > 0) {
    value = Math.ceil(value * 3);
    user._effectUsed = true;
  }
</JS Pre-Damage As User>

<JS Post-End Action>
  if(user._effectUsed){
    $gameSwitches.setValue(23, false);
  }
  delete user._effectUsed;
</JS Post-End Action>

This works for skills that do damage but not for skills that heal. So, two questions:
How to amplify the power for healing skills as well?
&
Can this be any easier to implement? lol

Thanks.
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
507
Reaction score
294
First Language
English
Primarily Uses
RMMZ
I think healing uses
Code:
<JS Pre-Regenerate>
Instead of
Code:
<JS Pre-Damage>
 

Jeivalien

Wandering soul
Veteran
Joined
Jan 24, 2014
Messages
69
Reaction score
32
First Language
Spanish
Primarily Uses
RMMV
I think healing uses
Code:
<JS Pre-Regenerate>
Instead of
Code:
<JS Pre-Damage>
Thanks Naosox, I figured it out. You do use Pre-Damage but when using HP recover as the damage type "value" returns a negative number. So using value >= 0 as a flag was a bad move, I think it's better to use this.isHpEffect().
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,977
Reaction score
4,588
First Language
English
Primarily Uses
RMMZ
Thanks Naosox, I figured it out. You do use Pre-Damage but when using HP recover as the damage type "value" returns a negative number. So using value >= 0 as a flag was a bad move, I think it's better to use this.isHpEffect().
Yeah, you're right. If you check for value being greater than 0, it will ignore healing.
 

Krawzer_KOF

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

I'm trying to add a combo stack on state apply


<JS On Add State>

user._comboStacks ??= 0;

let stacks = user._comboStacks.clamp(0, 10);

stacks++;

stacks = stacks.clamp(0, 10);

user.setStateDisplay(state.id, 'x' + stacks);

user._comboStacks = stacks;

</JS On Add State>

but I get this error

error2.PNG
at the end of a battle.

Does someone knows how to solve it?

Thanks
 

Githgulcag

Villager
Member
Joined
Feb 7, 2022
Messages
11
Reaction score
1
First Language
Finnish
Primarily Uses
RMMZ
Hi,

I'm trying to make a status effect which makes a new enemy to spawn when a status effect expires. I think I am close to right solution, but I am missing something.


<JS On Expire State>

const NewEnemy = new Game_Enemy(2,200,200);

$gameTroop.members().push(NewEnemy);

</JS On Expire State>

I tried this as a simple test for this mechanic, but this only creates an enemy that exists in some kind of limbo where it isn't visible and it doesn't take any actions but you can attack and kill it. Using .appear() functions doesn't do anything. My novice level programming skills are quite rusty and I've never used Javascript before, so feel like I'm just missing something obvious, but I can figure this out.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,977
Reaction score
4,588
First Language
English
Primarily Uses
RMMZ
Hello,

I'm trying to add a combo stack on state apply


<JS On Add State>

user._comboStacks ??= 0;

let stacks = user._comboStacks.clamp(0, 10);

stacks++;

stacks = stacks.clamp(0, 10);

user.setStateDisplay(state.id, 'x' + stacks);

user._comboStacks = stacks;

</JS On Add State>

but I get this error

View attachment 215492
at the end of a battle.

Does someone knows how to solve it?

Thanks
That error happens when you declare a variable with "const" then try to change it. I don't think it's the add state tag that's breaking it.

Hi,

I'm trying to make a status effect which makes a new enemy to spawn when a status effect expires. I think I am close to right solution, but I am missing something.


<JS On Expire State>

const NewEnemy = new Game_Enemy(2,200,200);

$gameTroop.members().push(NewEnemy);

</JS On Expire State>

I tried this as a simple test for this mechanic, but this only creates an enemy that exists in some kind of limbo where it isn't visible and it doesn't take any actions but you can attack and kill it. Using .appear() functions doesn't do anything. My novice level programming skills are quite rusty and I've never used Javascript before, so feel like I'm just missing something obvious, but I can figure this out.
Game_Enemy only contains the data for the enemy object. You still need to add a new Sprite_Enemy to the scene's spriteset and attach it to the newly-created enemy.
 

Krawzer_KOF

Veteran
Veteran
Joined
Aug 27, 2017
Messages
113
Reaction score
12
First Language
English
Primarily Uses
RMMV
Okay, it was another state somewhere in my database that was causing the error

<JS On Add State>
user._comboStacks ??= 0;
const stacks = user._comboStacks.clamp(0, 10);
stacks++;
stacks = stacks.clamp(0, 10);
user.setStateDisplay(state.id, 'x' + stacks);
user._comboStacks = stacks;
</JS On Add State>

<JS On Erase State>
user._comboStacks = 0;
const stacks = user._comboStacks.clamp(0, 10);
user.setStateDisplay(state.id, 'x' + stacks);
</JS On Erase State>


I replaced const stacks by var stacks and the error disappeared.

Thanks for your help!
 

Githgulcag

Villager
Member
Joined
Feb 7, 2022
Messages
11
Reaction score
1
First Language
Finnish
Primarily Uses
RMMZ
Game_Enemy only contains the data for the enemy object. You still need to add a new Sprite_Enemy to the scene's spriteset and attach it to the newly-created enemy.
Thanks! that helped a alot. Problem is that now I have no Idea what I am doing. :D How do I exactly add the new Sprite_enemy to the spriteset and attach it to the enemy?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,977
Reaction score
4,588
First Language
English
Primarily Uses
RMMZ
Thanks! that helped a alot. Problem is that now I have no Idea what I am doing. :D How do I exactly add the new Sprite_enemy to the spriteset and attach it to the enemy?
const sprite = new Sprite_Enemy();
sprite.setBattler(NewEnemy);
const spriteset = SceneManager._scene._spriteset;
spriteset._battlefield.addChild(sprite);
spriteset._enemySprites.push(sprite);

Try that.
 

Githgulcag

Villager
Member
Joined
Feb 7, 2022
Messages
11
Reaction score
1
First Language
Finnish
Primarily Uses
RMMZ
const sprite = new Sprite_Enemy();
sprite.setBattler(NewEnemy);
const spriteset = SceneManager._scene._spriteset;
spriteset._battlefield.addChild(sprite);
spriteset._enemySprites.push(sprite);

Try that.
I tried it and the enemy didn't appear.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,524
Reaction score
2,884
First Language
English
Primarily Uses
RMMV
@Jeivalien you got your solution in that healing value is negative. I'm just curious - why are you calling Math.ceil()? Multiplying your initial value by 3 will always produce an integer.

(unless you're specifically altering the rest of the system to allow that value to be a decimal, in which case I still don't know why you'd want to round it later :wink: )

I think healing uses
Code:
<JS Pre-Regenerate>
That's referring to the regeneration phase at the end of each combat turn (i.e. when you'd see the negative regeneration from poison effects).
 

Githgulcag

Villager
Member
Joined
Feb 7, 2022
Messages
11
Reaction score
1
First Language
Finnish
Primarily Uses
RMMZ
I've been trying to solve my problem with other plugins, but nothing seems to have the function I need. The closest thing I found was taaspider's EnemyReinforcements but it only enables creation of skills that summons new enemies and I need the enemy to appear specifically on the expiration of a state. I've tried to look at the plugins code to figure out how it creates new enemies, but is too complicated code for me read and understand properly.
Maybe I should seek help in another thread since my problem is only tangentially related to Visustella notetags.
 

Githgulcag

Villager
Member
Joined
Feb 7, 2022
Messages
11
Reaction score
1
First Language
Finnish
Primarily Uses
RMMZ
I've almost managed to make the code what I need it to do, but the newly created enemies won't do anything in time progress battle mode. They only take actions in turn based battle.

<JS On Expire State>

const NewEnemy = new Game_Enemy(2,200,200);

$gameTroop.members().push(NewEnemy);

const sprite = new Sprite_Enemy(NewEnemy);

const spriteset = BattleManager._spriteset;

spriteset.addChild(sprite);

spriteset._enemySprites.push(sprite);

BattleManager.setSpriteset(spriteset);

</JS On Expire State>

How do I make them work in TPB?
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
507
Reaction score
294
First Language
English
Primarily Uses
RMMZ
Edit: Ignore

Page didn't update. Was looking at something old
 

Jeivalien

Wandering soul
Veteran
Joined
Jan 24, 2014
Messages
69
Reaction score
32
First Language
Spanish
Primarily Uses
RMMV
@Jeivalien you got your solution in that healing value is negative. I'm just curious - why are you calling Math.ceil()? Multiplying your initial value by 3 will always produce an integer.

(unless you're specifically altering the rest of the system to allow that value to be a decimal, in which case I still don't know why you'd want to round it later :wink: )

Hey Turan,

Well, its not always going to be 3, the final multiplier could be anything, 3.14, 1.288, etc. I was planning on using small numbers, therefore the round down. Do you think I should avoid rounding?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,524
Reaction score
2,884
First Language
English
Primarily Uses
RMMV
Hey Turan,

Well, its not always going to be 3, the final multiplier could be anything, 3.14, 1.288, etc. I was planning on using small numbers, therefore the round down. Do you think I should avoid rounding?
Not if you're planning to multiply by decimals. You just didn't have a value like that in the code you posted, so in that case it didn't make any sense to stick a number through Math.ceil() that couldn't possibly require rounding.
 

Latest Threads

Latest Profile Posts

Watch Studio Blue play Numina by starlit in our latest RPG Maker Games Critique stream starting NOW!

Wish me luck. One of the leading experts on certain false shuffle is going to check if my skill is good enough to be called "not total trash".
Not an RPG Maker Update but I'm happy to say that I finally passed my drivers written test. Which makes me a happy guy.
FWRu-cYXkAAAUbl
Have you ever been in such a luck streak you felt fear something was wrong?
I'm going to be adding in combat animations, revamping the UI and putting in a new cutscene this week, so this is your last chance to play the MC:RIS demo in its original form! Say you were there since the beginning! https://qos.itch.io/infinite-sadness

Forum statistics

Threads
123,123
Messages
1,154,136
Members
161,455
Latest member
Respec
Top