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,086
Reaction score
15,501
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

I'm listening to iiluminaughtii talking about the secrets behind shady businesses and scams. Meanwhile I'm writing a fanfic about Sephiroth from FF7, one specifically for my stepmom. I'll get to give it to her, too, because my boss said I could take the holidays off! Dec. 22-27 I will be in Orlando, and maybe Fort Myers too, visiting my dad and stepmom!
Of course, I bought a handful of games on the Steam Black Friday sale. Will I try them? Will I complete any? Who knows...
I don't really have any neat updates today about how I screwed up programming... But if you want to observe the intensenes of me programming, then you can check out my stream :)
New Weapons.gif
No more spam from me today, I promise! Just wanted to upload this, people have been giving me feedback that my weapon sprites (which were RTP) clashed badly with my battlers for ages, so today I finally took the plunge and updated them! Really happy with how they came out :D :D
So Facebook fraudulently took money from me. They even went through my PayPal accounts to find a card that had the money on it. Thinking about deleting my Facebook account because this doesn't happen on twitter, not even close.

Forum statistics

Threads
117,002
Messages
1,103,720
Members
152,896
Latest member
LuanGarcia23
Top