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,160
Reaction score
15,541
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

Finally showing some updates again
I think it's ready - Chapter Selection:
unknown.png
On another more gaming topic, I paid 20 bucks for a visual novel to emotionally destroy me. I may write an entry about that.
1638611395177.png
Reading about metaverses recently. I can totally imagine myself in the future, logging in with VR glasses to a virtual beach villa sitting in a virtual chair, with a virtual laptop facing the sea...coding 16-bit RM.
Mod name: "[Game name] Gameplay Overhaul"
What they actually mean: "Here is a mod that makes the game harder."

Forum statistics

Threads
117,176
Messages
1,105,168
Members
153,292
Latest member
Drekex
Top