RMMV: Attempting to make a state deal a set amount damage to an enemy at the start of their turn, not using a negative hp regen trait... using Yanfly's Buffs&StatesCore
Buffs & States Core (YEP) - Yanfly.moe Wiki
I've been teaching myself the javascript as I go but I cant seem to figure this one out. Any help appreciated
JavaScript questions that don't deserve their own thread
● ARCHIVED · READ-ONLY
-
-
Welcome!RMMV: Attempting to make a state deal a set amount damage to an enemy at the start of their turn, not using a negative hp regen trait... using Yanfly's Buffs&StatesCore
Looking at the plugin instructions, we can find:
"Turn Start: Whenever the battler's turn starts."
Then you might reference the pinned thread with MV script calls (or just Google "rpg maker mv script deal damage" or something like that). You end up with:
Code:where X is the amount of HP to lose.<Custom Turn Start Effect> user.gainHp(-X); </Custom Turn Start Effect>
If it doesn't display the damage on its own, you might need to add a line withuser.startDamagePopup() -
Thank you so much!Welcome!
Looking at the plugin instructions, we can find:
"Turn Start: Whenever the battler's turn starts."
Then you might reference the pinned thread with MV script calls (or just Google "rpg maker mv script deal damage" or something like that). You end up with:
Code:where X is the amount of HP to lose.<Custom Turn Start Effect> user.gainHp(-X); </Custom Turn Start Effect>
If it doesn't display the damage on its own, you might need to add a line withuser.startDamagePopup() -
Not sure if it's the right thread, but I was wondering how hard would it be to make it so the RMMZ software allows to drag and drop the Common Events in the Databse menu so you are able to reorganize them visually without changing their unique ID.
And the same with the Switch/Variables/all similar lists in the Database. -
You can't modify the editor. Plugins can only affect gameplay.Not sure if it's the right thread, but I was wondering how hard would it be to make it so the RMMZ software allows to drag and drop the Common Events in the Databse menu so you are able to reorganize them visually without changing their unique ID.
And the same with the Switch/Variables/all similar lists in the Database. -
I mean, I was not speaking of plugins. But I realise now this whole section of forum is in Javascript/Plugin Support.You can't modify the editor. Plugins can only affect gameplay.
-
Well, you posted in a specific thread entitled "JavaScript questions," and JavaScript is used in MV and MZ to write plugins. :wink:I mean, I was not speaking of plugins. But I realise now this whole section of forum is in Javascript/Plugin Support.
But the first part of my initial response still applies - you can't modify the editor. All of the database tabs list in order of ID and that can't be changed. -
How can I make a state that removes a state category as soon as it is applied to the user of the state? I'm trying to make a state that removes all negative states as soon as one is applied, and for that I created a state that would serve as a dummy for all negative states, so I just need to check if that dummy state is about to affect the battler. Apart from that I know that you need to put something between this tags: <Custom React Effect></Custom React Effect>, but I don't know much apart from that. Can you please help me? Thanks a lot for reading!
This are the plugins I know I need to make this thing to work.
Buffs & States Core (YEP) - Yanfly.moe Wiki State Categories (YEP) - Yanfly.moe Wiki -
I think it's technically not impossible to modify the editor but it was not what I was thinking about. More about something that would interpret the database prior to its display and/or inject new data before it's displayed in the vanilla menu.Well, you posted in a specific thread entitled "JavaScript questions," and JavaScript is used in MV and MZ to write plugins. :wink:
But the first part of my initial response still applies - you can't modify the editor. All of the database tabs list in order of ID and that can't be changed.
It's beyond my level of execution but I was seeking for possible ways of attaining it. Also JSON might be too different from Javascript to be talked on this section I would guess? -
Feasible and allowed under the license is two different things. You can't modify the editor itself.I think it's technically not impossible to modify the editor but it was not what I was thinking about.
That is definitely possible. When the game is launched, all the database info gets transferred into global objects, so it would be possible to modify those.More about something that would interpret the database prior to its display and/or inject new data before it's displayed in the vanilla menu.
I don't see why it can't be discussed in here. Coding sections are mainly divided into everything coding related for RMMZ and RMMV (javascript) and the RMVXA, VX, and XP section (ruby/rgss). So anything coding relating to RMMZ and RMMV is fine.Also JSON might be too different from Javascript to be talked on this section I would guess? -
I think it's technically not impossible to modify the editor but it was not what I was thinking about. More about something that would interpret the database prior to its display and/or inject new data before it's displayed in the vanilla menu.
It's beyond my level of execution but I was seeking for possible ways of attaining it. Also JSON might be too different from Javascript to be talked on this section I would guess?
Your best bet would probably to build a tool that parses all the game files, and lets you dragon and drop the order of various things, and then detects (upon hitting save) all the users of all the old variables / switches / common events and updates them everywhere.
It wouldn't be a trivial tool to build though. -
This seems like a roundabout way to do it. Is there some reason you can't just give the skill that would apply this dummy state the notetag from the plugin you linked to:How can I make a state that removes a state category as soon as it is applied to the user of the state? I'm trying to make a state that removes all negative states as soon as one is applied, and for that I created a state that would serve as a dummy for all negative states, so I just need to check if that dummy state is about to affect the battler.
<Remove State Category: x>? -
Sorry if I didn't explain myself properly. What I want is a state that'd serve as a shield that will block and remove the next negative state that targets the user. In my project, the state doesn't need to remove negative states already affecting the user because the state won't be applied if the user already has negative states (I already know how to do this last part, I just wanted to give more context).This seems like a roundabout way to do it. Is there some reason you can't just give the skill that would apply this dummy state the notetag from the plugin you linked to:
<Remove State Category: x>? -
Okay - the trick here is that you're looping around the standard process for this in RPG Maker (give your state the State Resist trait for all states you want to block). You can do it this way, but you'd be allowing the negative state to apply then removing it immediately after, so it won't stop any, say, Custom Apply Effects that negative state might have.Sorry if I didn't explain myself properly. What I want is a state that'd serve as a shield that will block and remove the next negative state that targets the user.
The other problem is the timing - Custom Respond happens before the incoming attack applies effects, e.g. states.
So I'd suggest you add a State Resist for each state in your category, then give it:
Code:where "debuff" is the name of the state category you're blocking and X is the ID of your protective state.<Custom Deselect Effect> if (this.item().effects.some(effect => effect.code==EFFECT_ADD_STATE && $dataStates[effect.dataId].category.contains("debuff"))); target.removeState(X); </Custom Deselect Effect>
That should cause it to resist applying the state and then be removed. If that doesn't work, you should post your own thread in plugin support. -
I have :
gameVariables.value(1)
gameVariables.value(2)
gameVariables.value(3)
I want to use a conditional branch to check if 1 = 1 + (2 x 3)
What should I put in the event command? -
I assume you mean the variables 1, 2 and 3 and not the integers.I have :
gameVariables.value(1)
gameVariables.value(2)
gameVariables.value(3)
I want to use a conditional branch to check if 1 = 1 + (2 x 3)
What should I put in the event command?
Script : $gameVariables.value(1) = $gameVariables.value(1) + $gameVariables.value(2) * $gameVariables.value(3) -
That's not correct syntax - you need to prepend $ to the beginning of $gameVariables.I have :
gameVariables.value(1)
gameVariables.value(2)
gameVariables.value(3)
I want to use a conditional branch to check if 1 = 1 + (2 x 3)
What should I put in the event command?Code:!$gameVariables.value(2) || !$gameVariables.value(3)
The only that mathematical equation can happen is if variable 2 or 3 is 0.
That's not quite right - one = is to assign a value. Narch asked how to check if it is equal to that. So you'd use == (and also the whole thing can be shortened, as above :wink:)Script : $gameVariables.value(1) = $gameVariables.value(1) + $gameVariables.value(2) * $gameVariables.value(3)
Also, you can't assign using the value() method like that, you would have to use setValue(). -
Yeah, I just noticed that after I posted it. I didn't proofread.That's not quite right - one = is to assign a value. Narch asked how to check if it is equal to that. So you'd use == (and also the whole thing can be shortened, as above :wink:)
-
I'm trying to edit a window from a plugin (Terms of service says i can) so I was wondering what line i'm looking for to change the font of the plugin window. Is there a certain line im looking for or is it different with each plugin
-
This is at least the third time you asked for help with a plugin without saying what the plugin actually is.I'm trying to edit a window from a plugin (Terms of service says i can) so I was wondering what line i'm looking for to change the font of the plugin window. Is there a certain line im looking for or is it different with each plugin