Leetstuff

Villager
Member
Joined
Oct 27, 2015
Messages
26
Reaction score
2
First Language
Portuguese
EDIT: This is what I've managed so far.

Let's use Pokemon Paralysis as an example. If you are paralyzed, there's a 25% chance of not moving.

<Custom Turn Start Effect>

var x = Math.floor(Math.random()*100) + 1

if (x >= 25 ) {

user.addState(15);

}

</Custom Turn Start Effect>
State 15 is simply a "Cannot Move" State that is auto-removed at turn end. 

The problem I'm currently having is that, when the state is added, there's no prompt warning that the character cannot move and the enemy attacks automatically first. Right before the turn ends, the state persistence message is shown. The problem with that is the order of actions, I'd like to have the "Cannot move" state appearing before the enemy attack.

Is there a command for "Cannot Move" or force action "Wait"? That way I don't have to use another state.

I know there's a Numb State plugin, but it isn't working on my game, probably because of YEP's State Core.
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,169
Reaction score
15,542
First Language
English
Primarily Uses
RMMV
I've moved this thread to JS Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.


You could also just post in Yanfly's plugin thread for faster attention from Yanfly.
 

theolis-wolfpaw

Villager
Member
Joined
Jan 4, 2016
Messages
22
Reaction score
4
First Language
English
Maybe try adding this._logWindow.displayAddedStates(user); below where you added the state.In theory, that should make it display the "If such and such is inflicted with the state:" message. (Though, I haven't tested it, so I'm not 100% sure that'll work)

Though, if you want a message, like the show message event command, I think you'd use $gameMessage.add(user.name() + " was paralyzed and couldn't move."); in the same spot (This one I know works for certain.

I'm not exactly a javascripter, and I'm still learning all the ins-and-outs of the code so I know it may not be the most helpful post, but I hope I at least steered you in the right direction.
 

Leetstuff

Villager
Member
Joined
Oct 27, 2015
Messages
26
Reaction score
2
First Language
Portuguese
Maybe try adding this._logWindow.displayAddedStates(user); below where you added the state.In theory, that should make it display the "If such and such is inflicted with the state:" message. (Though, I haven't tested it, so I'm not 100% sure that'll work)

Though, if you want a message, like the show message event command, I think you'd use $gameMessage.add(user.name() + " was paralyzed and couldn't move."); in the same spot (This one I know works for certain.

I'm not exactly a javascripter, and I'm still learning all the ins-and-outs of the code so I know it may not be the most helpful post, but I hope I at least steered you in the right direction.
Didn't work.

The second one works fine, I've tried it, but it's too out of place.

What's the command to add a message to the battle log? If it just shows "Couldn't move!" would be just fine. Thanks!
 

theolis-wolfpaw

Villager
Member
Joined
Jan 4, 2016
Messages
22
Reaction score
4
First Language
English
Sorry for the late reply, it took me a bit to get around to actually looking into it, but this should work:


BattleManager._logWindow.push('addText', user.name() + " was paralyzed and couldn't move.");


I couldn't get there to be a wait time before the enemy attacks, though nor could I get it to clear the log, despite having used both these lines:


BattleManager._logWindow._waitCount = 24;
BattleManager._logWindow.clear();


This may be something specific to my situation so it might not hurt to try those, maybe fiddle around with the waitCount, it should be in frames which are 1/60th of a second.
 

Latest Threads

Latest Profile Posts

Nightmare... Dreamt I posted a GFX resource post. With a work in progress glove icon that tinted to different colors. In the wrong forum. And I was in such a panic. I saw people writing posts in response, those "..." you see in discord and such. So I frantically tried to report my post as wrong forum, editing to say it's the wrong forum and that I "accidentally" posted it too early... Very odd dream to be honest...
The youngest photo of you is also the oldest photo of you.
People need to stop submitting their game to every single game jam without even reading the jam rules (╯°□°)╯︵ ┻━┻
Mom tested positive for COVID thanks to a single stupid coworker of hers not taking sh*t serious.
I'll prolly won't be on here for a while as we deal with this.
So before I inevitably start a new project to reorganize myself (I will make sure to save important info dw), I will make an external list of what I want in the final database.

Forum statistics

Threads
117,196
Messages
1,105,407
Members
153,335
Latest member
lichtsky
Top