Hello all. Is there a way to use states to check for misses in MV? Ideally I want to check and apply a state counter for each miss, but "if (b.result().missed){" doesn't seem to work w/Custom Action Effects
JavaScript questions that don't deserve their own thread
● ARCHIVED · READ-ONLY
-
-
@MiddleMang You might want to start your own thread with greater detail.
Per the first post in this thread, it's not for plugin support - state counters come from a plugin, and I'm not sure what you're referring to with Custom Action Effects, but that sounds like plugin stuff, too.
So as far as the JavaScript question goes, that conditional is correct for seeing if an attack missed. For help getting it to do what you want with plugins, I'd suggest making a thread with the names and links to plugins you're using. -
Is there a plugin for MZ that changes damage output per weapon? I would like to make this possible in MZ the way that HIME’s Weapon Damage plugin worked for MV. Apologies if this is the wrong thread in which to post this question.
Right now, my workaround is to use @ATT_Turan's custom hit formula plugin serve as a means for Armor Class, have Max MP serve as Armor Class, and relegate the Defense stat to a 'damage die' variable, but this will only work for 1d4-1d12. I'm not too concerned with following 5e to the T, so this workaround might end up being my method, but it would be great if there was a proper solution somehow. -
[using MZ]
I'm trying to make a small plugin just to disable the "step forward" when a character takes an action in SV battle, but i've only managed to find the function that plays the sprite animation (.requestMotion), so the character remains in their ready pose, but still moves forward and back when it's their turn.
Can someone point me to where i can find the code that initiates that step forward? If i can just find it, i think i'll be able to figure things out on my own.
Thank you.
(The way i've been teaching myself is to just poke around until i find what i need, but that gets a bit confusing sometimes, and googling it has been a bit hard because i don't know the correct term for some stuff.) -
Well, it is and isn't. The way you're asking it is about plugins, and the first post of this thread says it's not about plugins. This should be a new thread in Plugin Requests. However, it can be done without one, it's just not a great solution.Is there a plugin for MZ that changes damage output per weapon? I would like to make this possible in MZ the way that HIME’s Weapon Damage plugin worked for MV. Apologies if this is the wrong thread in which to post this question.
You could put it in the damage formula.
Code:will make everything right after it only execute if the attacker is an actor wielding a weapon, since enemies don't have weapons. Then you'd do:if (a.isActor() && a.weapons().length)
Code:where X is the ID of the weapon you're checking. So you'd have to do this long, nested thing:if (a.weapons()[0].id==X)
Code:if (a.isActor() && a.weapons().length) {if (a.weapons()[0].id==1) some_formula; else if (a.weapons()[0].id==2) some_other_formula; ... } else enemy_formula
I don't understand how doing that would limit you to what "die size" is in the Defense stat. But, honestly, I suggest asking for help with a plugin. I'm pretty sure you can do this with VisuStella's Battle Core, there are notetags for different damage calculations.Right now, my workaround is to use @ATT_Turan's custom hit formula plugin serve as a means for Armor Class, have Max MP serve as Armor Class, and relegate the Defense stat to a 'damage die' variable, but this will only work for 1d4-1d12.
It is - appropriately and amusingly? - stepForward()I'm trying to make a small plugin just to disable the "step forward" when a character takes an action in SV battle, but i've only managed to find the function that plays the sprite animation (.requestMotion), so the character remains in their ready pose, but still moves forward and back when it's their turn.
Can someone point me to where i can find the code that initiates that step forward?
So if you just want to entirely disable it, you can do:
Code:Sprite_Actor.prototype.stepForward = function() {};
I'm surprised - I Google "rpg maker mz step forward" and I find several threads. None of them are about disabling the step, but they all reference the name of the function.(The way i've been teaching myself is to just poke around until i find what i need, but that gets a bit confusing sometimes, and googling it has been a bit hard because i don't know the correct term for some stuff.) -
Thank you for the help.
I'm surprised - I Google "rpg maker mz step forward" and I find several threads. None of them are about disabling the step, but they all reference the name of the function.
Well, i feel silly now. The only time i even considered calling it a "step forward", was when i was trying to figure out how to explain it more clearly in here (to make that post), but not when i was messing around with the code. Sorry about that.
Edit: I feel double silly now, because the sprites.js was a file i wouldn't have thought to check. I thought it would be core, or object, or even manager, but sprites? :p -
I suggest ignoring the files. That is, just search for stuff in the entire js directory. That way it will come up regardless of which file you think it might be in.Edit: I feel double silly now, because the sprites.js was a file i wouldn't have thought to check. I thought it would be core, or object, or even manager, but sprites? :p
-
Hey all,
If I use a<JS Pre-Start Action>note tag that sets the value for m asvar m = (my code here to get value)will that m be usable in a damage formula? Or do I have to set var = m in the damage formula itself always? -
No. Code inside notetags is executed by another function (eval() ), so nothing you declare inside of it can go back out to a larger scope, unless you declare it globally (which is both poor practice and unnecessary).If I use a...note tag that sets the value for m...will that m be usable in a damage formula?
I mean, even if it weren't executed by a third function, just the fact that your notetag and your damage formula aren't the same function means you can't use locally-declared variables back and forth unless you're passing them as function arguments.
The obvious-ish alternative is to do what you might see in a ton of Yanfly Tip & Tricks, where you put the variable on the battler.
In a notetag,
Code:can then be accessed in a damage formula withuser.m=whatever;
Code:a.m
You could also, of course, use one of MZ's global variables. -
Is it possible to make a skill that deals damage to an enemy while healing the caster in the process?
-
Damage Formulas 101Is it possible to make a skill that deals damage to an enemy while healing the caster in the process?
But it's better not to put things like gainHp in the damage formula, so the preferred solution would be to use something like Yanfly's Skill Core to execute additional code when you use a skill. -
I have Skill Core installed, so that shouldn't be a problem. But I have to ask why is it ill advised to put things such as gainHp in damage formulas?Damage Formulas 101
But it's better not to put things like gainHp in the damage formula, so the preferred solution would be to use something like Yanfly's Skill Core to execute additional code when you use a skill. -
Stop Putting Mechanics in Damage Formulas - Yanfly.moe Wikiwhy is it ill advised to put things such as gainHp in damage formulas?
-
How would I call the item window used in battle via script call?
Trying to set up a "Use" skill that functions like the item command without taking up a command window spot. -
Hi everyone. Does anyone know what this selection window called inside Window_BattleActor (RPG Maker MV)?
I am trying to make its height taller so it goes all the way to the bottom:
-
The gauge or the rectangle cursor?
-
The rectangle cursor
-
@TESTOSTERONE I think you're talking about Window_BattleActor, "The window for selecting a target actor on the battle screen."
There's also a corresponding Window_BattleEnemy. -
There's that rectangle selection cursor inside Window_BattleActor, and I haven't been able to figure out yet how to change its height or when/how this selection cursor gets created.@TESTOSTERONE I think you're talking about Window_BattleActor, "The window for selecting a target actor on the battle screen."
There's also a corresponding Window_BattleEnemy.
Edit: Oooh, is it this thing?
-
I think you need turn plugins on and off to figure out what's is creating it - that's not a part of the default engine.There's that rectangle selection cursor inside Window_BattleActor
Are you using any Mog stuff? I feel like I've seen frilly windows-inside-windows from his suite.