JavaScript questions that don't deserve their own thread

when you say buffs, do you mean buffs or states? there isnt a trigger you could use for buffs expiring but you can use a state with the same duration as the buff to fake one, use
Code:
user.addDebuff(2,5)
, and then add extra lines and change the 2 for the parameter ids for what you want debuffed

if you did mean that its a state that gives another state when it expires put in
Code:
user.addState(x)
into the expire effect and itll apply state x
Thank you, that worked perfectly!

It was a state expiring into another state sorry, I mistyped. I guess I accidentally worked around the buff expiring problem with a state that fakes as a buff though haha
Hi sorry, I've got another problem with a different plugin, this time with Visustella Battle Core (I think).
I enabled animated side view enemies, and had to change the offset so that they were aligned with the party.
1744499479754.png

1744499487641.png

That worked fine for encounters with only one enemy, but I've got another encounter with 5 enemies, one of them being an animated side view one, and I'm not sure what I need to change to align her with the party.
1744499497121.png


Please help!
Hi sorry, I've got another problem with a different plugin,
From the first post in this thread:
If you need help getting a plugin working, please start a NEW thread and include a link to where you downloaded the plugin from.
You can post a new thread by clicking the "Post Thread" button on the Plugin Support page:

post-thread-button.png​

​
👋
mb sorry, I'll delete this one and repost it as its own thread
Hey, not sure if this warrants it's own post. I am looking for a plugin that will allow easy custom parameter changes to an armor that are not normally supported.

Say, if armor 1 is equipped to hero 1, then hero 1 will have the custom parameter of dealing 3% more "Slashing" damage to the enemy.

Note: Normally, you would use a weapon for this, but in my case, weapons cannot be an accessory, and only 1 weapon can be equipped to a character at one time (afaik). If I wanted multiple types of parameter increases, say, up to 4 (even equipping the same ones!), I would need to tackle how to increase damage or any dealing modifier multiple times, one for each accessory, cause you can only equip one weapon.

Is there a plugin for this?
Hey, not sure if this warrants it's own post. I am looking for a plugin
The Plugin Requests board is dedicated to questions like "I'm looking for a plugin to do ____":
Note that plugin recommendations will depend on whether you're using MV or MZ. 👋
Looking to make a passive kind of like Yanfly Critical Hit Effects only that when you critically hit, you apply a state (of my choice) to the target. And maybe a version where you apply a buff to yourself too (for variation) 😛

Hopefully it will be possible without additional yanfly plugins.
Looking to make a passive kind of like Yanfly Critical Hit Effects only that when you critically hit, you apply a state (of my choice) to the target. And maybe a version where you apply a buff to yourself too (for variation) 😛

Hopefully it will be possible without additional yanfly plugins.

when you say the state will be of your choice, do you have a method in mind?
making it five a state is easy enough, but expressing a choice is going to change how itll need to be done
when you say the state will be of your choice, do you have a method in mind?
making it five a state is easy enough, but expressing a choice is going to change how itll need to be done
I just mean that It will fire off a state. When critically hitting, a state is applied.
ah. and here i was thinking of like, using a skill to do something to flag what state/effect that passive'd give. but the passive doing a single state is also cool 🤣

Code:
<Custom Establish Effect>
if (this.isDamage() && value > 0 && target.result().critical) {
  target.addState(x);
}
</Custom Establish Effect>
is all you need to get it going
Still using Yanfly plugins.

I have a WET status i'd like some synergies for 😛

- When target has WET (state 16), attacks that has a chance to FREEZE (state 14) has a double chance to happen.
- Lightning spells (Element id: 4) are guarranteed critical hits against target with WET.
When target has WET (state 16), attacks that has a chance to FREEZE (state 14) has a double chance to happen.
just to be sure, this has to be different than giving the wet state a 200% state rate trait for freeze?

Lightning spells (Element id: 4) are guarranteed critical hits against target with WET.
if you are using yanfly's critical control plugin, you could try putting this notetag into your lightning spell noteboxes
Code:
<Critical Rate Formula>
rate = target.isStateAffected(x) ? 1 : eval(Yanfly.Param.critRate);
</Critical Rate Formula>
it should make the crit rate for them 100% if the target has x state and should default to whatever calculation in set in the parameter for it otherwise

if you dont use crit control, you can do some buffs and states core stuff to apply a state on the attacker with a large crit boost and then remove it afterwards. I generally avoid measures like that, but if it sounds better it can be done instead
just to be sure, this has to be different than giving the wet state a 200% state rate trait for freeze?
I.... I suppose not 😳 Man, I keep forgetting about the basic stuff xD

if you are using yanfly's critical control plugin, you could try putting this notetag into your lightning spell noteboxes
Code:
<Critical Rate Formula>
rate = target.isStateAffected(x) ? 1 : eval(Yanfly.Param.critRate));
</Critical Rate Formula>
it should make the crit rate for them 100% if the target has x state and should default to whatever calculation in set in the parameter for it otherwise

if you dont use crit control, you can do some buffs and states core stuff to apply a state on the attacker with a large crit boost and then remove it afterwards. I generally avoid measures like that, but if it sounds better it can be done instead

Neither are working, but I've found some similar codes from others and nothing works. Might be an incompatibility with some plugins or something. Gonna have to try switching some stuff on and see 😛

Tnx!
Neither are working
that was on me. had accidentally typed in an extra closing parenthesis. give it another shot, ive updated the post now
that was on me. had accidentally typed in an extra closing parenthesis. give it another shot, ive updated the post now
Ye works now! (odd that all the others I found didnt, even tho people claimed it worked for them but whatever) the freeze one works too, I just forgot that I didnt set an icon it so I could see if it worked xD
I am having a frustrating time using the notetags to determine the stats; it seems like every time I try to determine states the database’s curves take over…

It is especially difficult for the purposes of making new level curves

Edit: besides not being able to define levels, the <param Plus: x> tag doesn’t seem to want to function at all; but the rate does…
I am having a frustrating time using the notetags to determine the stats; it seems like every time I try to determine states the database’s curves take over…

It is especially difficult for the purposes of making new level curves
theres way too much missing information for anyone to be able to realistically help. We still have no idea how youre doing any of that. you need to show us what youve written for us to be able to tell you anything about what youre doing.

Edit: besides not being able to define levels, the <param Plus: x> tag doesn’t seem to want to function at all; but the rate does…
If this is a function of another plugin youve downloaded, then as per the first post you need to make a new thread and include all the relevant details there
theres way too much missing information for anyone to be able to realistically help. We still have no idea how youre doing any of that. you need to show us what youve written for us to be able to tell you anything about what youre doing.


If this is a function of another plugin youve downloaded, then as per the first post you need to make a new thread and include all the relevant details there
I did a stupid and didn’t specify I was using VisuStella Core. I apologise.
I have been trying to make some cute states for my game, and I am struggling with this one where the enemy gets healed, at the beginning of a turn, whenever they share the same state as the player. The combat of my game is based around states, so the idea here is to incentive the player towards removing the enemy's state to prevent them from being healed every turn. Anyways, this is one of the codes I tried:

JavaScript:
<Custom Turn Start Effect>
if (target.isStateAffected(22)) && ($gameParty.leader().isStateAffected(22)) {
  target.startAnimation(21);
  var value = target.mhp * 0.50
  target.gainHp(value);
}
</Custom Turn Start Effect>

Any suggestions on what I am doing wrong? Should I approach this in a different manner? Thanks much.

Original thread: https://forums.rpgmakerweb.com/threads/javascript-questions-that-dont-deserve-their-own-thread.46341/