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
43,728
Reaction score
15,308
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

FL Studio is a huge step up from LMMS but I'm having such a tough time with it D:<
The new Dune movie reminds me of the game Dune 2 made by Westwood. A quality product on its own, but extremely disloyal to its source of inspiration.
Terrible Writing Advice, you've done it again.
1635026211997.png
Feeling like my new profile picture is nice. Thinking of making it semi-permanent, does any one has an opinion? Does it look too evil or does it work as a public profile picture? :)
Bishiba.png

Forum statistics

Threads
116,032
Messages
1,095,121
Members
151,366
Latest member
1AmAlex
Top