Character Dialog (Dependant on Party Leader)

Status
Not open for further replies.
Joined
Jan 31, 2013
Messages
21
Reaction score
15
First Language
English
Primarily Uses
Hello! Nice to meet you.

*I hope I'm posting this in the right place, I'm sorry if it's wrong!*

I would like to get a bit of help with a dialog/formation issue of mine. I know that when you go into party formation, people can change the party leader and as such, the sprite in the map changes too. (Ex: Al is in the party lead and his sprite shows, then I replace Al with Arthur and now Arthur's sprite is shown in the map.)

I have some fairly specific dialog though, but I don't want to lock Al as the leader. (though this is my "Plan B" if this "Plan A" fails) So to remedy this, I figured that depending on who is in the party lead, the dialog would change.

For example if Al *in the party lead* examines and apple, he says "It's a red apple." but if Arthur *in the party lead* examines the apple, he says "I don't like apples."

I thought I could do this with conditional branches, but it only seems to apply to characters "In party" not by characters in party position. 

Then I thought maybe something *kind of complicated* like variables or switches, where a switch or variable indicates that this character is in the front of the party. But I don't know how scripts work and I'm fairly certain I'd have to add a few things into some formation script to make that work. Events like parallel processes wouldn't suit, since it solely depends on when people open up a formation window and change the formation.

I tried thinking of scripts I've seen that would work, like formation scripts, but they wouldn't do at all for this. 

With all that being said, (Sorry it's so long >.< ) I'm not to sure what to do now. I'm hoping someone can figure an event out? Maybe create a script *if needed* to accomplish this? Or just tell me that this is impossible so I can look for a leader-lock script. 

Thank you for the help! (^u^)/)
 

Dalph

Nega Ralph™ (RM Tyrant)
Veteran
Joined
Jul 15, 2013
Messages
7,769
Reaction score
19,642
First Language
Italian Curses
Primarily Uses
RMMZ
It's very simple.

Create a Variable named Party_Leader and give it the Operand\Game Data\Member #1 Actor ID

Use a Conditional Branch, if the variable Party_Leader is equal to 1, then display the message 1.

Use another Conditional Branch (under Else), if the variable Party_Leader is equal to 2, then display the message 2.

and so on...
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,673
First Language
German
Primarily Uses
RMMV
No, you don't need a script for this - but to do it with eventing alone is a bit complex, depending on how exactly you go on.

You need a control variable command to put the ID for the leader into the variable, and then you use conditional branches depending on which ID is in that variable.

Then you can either use

control variables : script : $Game_Party.leader

to get the ID of the leader, or

control variables : Game Data : Party : Member #? 's ID

to get the ID of the member in said position.
 
Joined
Jan 31, 2013
Messages
21
Reaction score
15
First Language
English
Primarily Uses
Ugh, I didn't see the multi-quite button. (@.@ ) *I just know this probably isn't how I'm supposed to respond to these things; I'm very sorry!*
 
Last edited by a moderator:
Joined
Jan 31, 2013
Messages
21
Reaction score
15
First Language
English
Primarily Uses
It's very simple.

Create a Variable named Party_Leader and give it the Operand\Game Data\Member #1 Actor ID

Use a Conditional Branch, if the variable Party_Leader is equal to 1, then display the message 1.

Use another Conditional Branch (under Else), if the variable Party_Leader is equal to 2, then display the message 2.

and so on...
No, you don't need a script for this - but to do it with eventing alone is a bit complex, depending on how exactly you go on.

You need a control variable command to put the ID for the leader into the variable, and then you use conditional branches depending on which ID is in that variable.

Then you can either use

control variables : script : $Game_Party.leader

to get the ID of the leader, or

control variables : Game Data : Party : Member #? 's ID

to get the ID of the member in said position.
The Variables Guide has a small section dedicated how to determine who is the party leader.
Thank you MisterX for the help! I've done just that *though took a while to figure the rest out. Conditional branches sure can get messy. @.@ )* and it seems to work so far.

Also thank you Andar and Celianna! Especially for that variables link. I'll be looking at that next! I really appreciate the help! *gives you all internet cookies* ( ouo )

I do have another question about this particular method though. Here is the event I made:



I'm just wondering if, for every event that needs to check the party leader;I will always need that red "Control variables" part?  Isn't there a way to permanently set that variable to find the Actor #1's ID? Of course, I guess you could do that with maybe... Erh, a separate event in the map (Like a parallel process?) to constantly check the Actor #1, but that's also making an event for every map I have and putting it in the notorious bottom corner with all the other events.

It's a bit of a confusing question actually, so it's okay if this can't be answered. I'm just glad that this works at all! (Of course, thinking up unique dialog for every bookshelf is another story, eh?)

Hopefully I don't have any problems in the future with this setup, since I'll be using it for pretty much everything. Can you see anything about this event I could improve to prevent any possible errors in the future?

Although, I guess it's a rather simple thing, now that I see it. Phew, I really need to brush up on my variable knowledge. Times like this you realize there's still plenty to learn. (@.@ )
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
You mean to say you want a variable to always update and hold the current value of whatever it is that you want. If that's the case, you'd put the variable in a common event set on a parallel process.


But in this case, finding out who the party leader is, is not a good idea. The way you have it set up (though conditional branches do not need to stack in the else branch if the condition is set to 'equal to', so you can simply put them beneath each other if you'd like and it'll work fine) is perfectly fine and recommended.


Go play the Variables Guide if variables confuse you :)
 
Joined
Jan 31, 2013
Messages
21
Reaction score
15
First Language
English
Primarily Uses
You mean to say you want a variable to always update and hold the current value of whatever it is that you want. If that's the case, you'd put the variable in a common event set on a parallel process.

But in this case, finding out who the party leader is, is not a good idea. The way you have it set up (though conditional branches do not need to stack in the else branch if the condition is set to 'equal to', so you can simply put them beneath each other if you'd like and it'll work fine) is perfectly fine and recommended.

Go play the Variables Guide if variables confuse you :)
Ah I see~ I think I've got it and I played the variables tutorial. There was a little part about the ID check so I used that. It was really helpful; thanks for bringing it to my attention~ 

Well, I Think I got this event down. So I suppose this means the topic is solved? I'm not too sure what to do now with this topic, but thank you everyone for the help! 

( ^ ^ ) What a great community~ 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,673
First Language
German
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top