Event confusion

xTrentx

Villager
Member
Joined
Oct 14, 2018
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hello everyone!

I am currently having troubles with my character creation process. I have created a entire events page that allows me to create 3
characters for my party. My issue is that after each character selection, The skills menu is supposed to pop up and allow you to
spend your JP on skills for THAT character. I am using the yanfly engine core, jp, skill learn system and everything works when im not attempting to use a variable to control which party members skill page is opening. Currently I have it working except it always opens the same persons skill window.

working.PNG
This method works or "functions" however I need to open the skill menu of which ever character you just made. So I figured
using the "party members" variable that has already been made and is being used to teleport you into the starting area would
work. Each time you create a character it adds "+1" to that variable. so I tried doing something like:
conditional variable: if "Party members" =1, plugincommand: OpenLearnSkill party 1
If "partymembers" =2, plugincommand: OpenLearnSkill party 2. and repeat for the third. however it just bypassed the skill menu
altogether and went on the creating your next character. So i slimmed it down to a single one, to see if it would work like this.
not working.PNG

However it still skips the skill menu altogether. The variable is set to 0 at the top of events, and the teleporting/break loop
at partymember =3 works perfectly fine. I dont understand why openskill party x isnt working with the variable. Any information
is extremely appreciated as I've been stuck on this for a few days now.
 

gambitben

Veteran
Veteran
Joined
Jun 8, 2013
Messages
161
Reaction score
127
First Language
Spanish English
Primarily Uses
RMMV
It keeps skipping the skill menu because after it checks if party members = 0 it then adds +1 to the variable, making it 1 for the next round. Instead of loops, I sugegst you sue labels. I find them way easier to set up and jump around. do you know how labels work?:rhappy:
 

xTrentx

Villager
Member
Joined
Oct 14, 2018
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
@gambitben I do not. Im pretty new to this. It checks if variable =0 then opens menu, then adds +1? or am I misunderstanding it?
 

gambitben

Veteran
Veteran
Joined
Jun 8, 2013
Messages
161
Reaction score
127
First Language
Spanish English
Primarily Uses
RMMV
Yes, but only opens it the first time, because the second time it goes through the variable it's already at 1. Well, there is a tutorial section in the forums and maybe you can find a better explanation there, but I'll try my best.

Mv has two options: label and jump to label.

Label lets you write anything you want in there (I usually write a 1) with the only condition that each label that you have in this event's page has to have an unique name.
Jump to label: When you call this, you write the name of the label you want to go and, well, you jump to it. This lets you, for example, write that 1 I mentioned earlier at the very beginning of the character creation you want to loop, and then use that conditional with a variable to increase it. So you could write:

if party members = 3 then transfer player, else jump to label 1.

This basically functions as a loop, but it also lets you be more flexible, as you can have more than one label and jump to almost anywhere you want inside the event page.

I hope I explained it in a somewhat understandable manner. The best way you can learn it is by testing it, you'll see it's not that hard when you get your first one working :owink:. I think this can pretty much get you unstuck.
 

xTrentx

Villager
Member
Joined
Oct 14, 2018
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
@gambitben I appreciate your information. To my understanding I can set a label as " character creation" and each time you select your class and race, it will jump to the character creation part of the event. The reason i am confused is because without labels if I just put "OpenLearnSkill party 1" The code works and after each character creation it opens the skill menu for the first member of the party. I thought using the same variable that causes you to leave the creator once its value is "3" as the determining factor of which characters skill menu you open would work just fine.

variable = party members: 0
"+1 party members" after each class/race selected
OpenLearnSkill party1
if "party members" = 3, break loop and teleport.

That setup works 100%. However it only opens party member 1's skill menu. however once you create 3 members, it does break loop and teleport you out. this means the variable is working correctly and adding 1 each time. so how come when I try:

variable = party members: 0
"+1 party members" after each class/race selected
if "party members" =1 OpenLearnSkill party 1
if "party members" =2 OpenLearnSkill party 2
if "party members" =3 OpenLearnSkill party 3
if "party members" = 3, break loop and teleport.

Why would this code cause it to skip opening the menu altogether when its confirmed that the variable IS adding +1 each time? It makes literally no sense to me. Also how would using labels make this work? wouldn't I have the same problem?
 

gambitben

Veteran
Veteran
Joined
Jun 8, 2013
Messages
161
Reaction score
127
First Language
Spanish English
Primarily Uses
RMMV
Oh sorry, I thought your loop wasn't working too. Yeah, the way you explained it should work, it's pretty weird it doesn't. The last conditional is not really needed, as you can put the teleport inside the same condional as openlearnskill party 3 and state variable party members = 1. Did you try OpenLearnSkill actor x instead of party? If the actor number is always the same, this one should work better and a little bit safer (tho that early in the game it doesn't really matter, but trying it is worth a shot).
Also, checking your images again, I think it may be because you have +1 members outside the conditionals; you want to put them inside each conditional, as the event doesn't finish when it checks one condition, it goes all the way through'till the end. I'm always extra safe with conditionals, they betray you easily. I hope this is more helpful than my last reply :rswt
 

xTrentx

Villager
Member
Joined
Oct 14, 2018
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
@gambitben Thank you for all your feedback thus far. I switched the event to Actor X and it works. That also bypasses the need for the variable. I could have sworn that actor X wouldn't work for my setup but I was over thinking it. Your first post was very help and this one even more so. Thank you again for all your help, I was completely lost. I still wish I knew why it wouldn't work but since I found a way around it, Ill settle for that.
 

gambitben

Veteran
Veteran
Joined
Jun 8, 2013
Messages
161
Reaction score
127
First Language
Spanish English
Primarily Uses
RMMV
Glad I could help! Good luck with your project!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I think I've got my hero designs pretty much finialised ( still got some tweaks. ) In the end it'll be the four outfit colour variants with four different skintones.

I'm a bit conflicted. One the one hand, it's quite visually cool to make bodies of water that the player can interact with by going into it. However obscuring the player character from a gameplay perspective is pretty bad. Hmm... There's the option to make the area around the player visible, but then that kind of defeats the purpose of submerging them. :unsure:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Another two plugins done! One being an on map grid inventory.
busy with my newborn child, can't even touch pc at all ;_;

Forum statistics

Threads
104,295
Messages
1,005,349
Members
135,811
Latest member
napax
Top