HOW TO CODE AN EVENT TO RECOGNIZE WHO'S IN THE PARTY?
Posts
Pages:
1
As some of you may remember, I'm doing a Master System in my game, in which characters in your party can apprentice under an individual to gain stat ups. The problem is, when I talk to the master and he says "Alright, so which one of you (in your current party) wants to apprentice under me?"
How do I code for that, especially with say, a 'Show Choice' command? Keep in mind that this has to account for every single possible combination of characters who could be in your party at that given time.
How do I code for that, especially with say, a 'Show Choice' command? Keep in mind that this has to account for every single possible combination of characters who could be in your party at that given time.
The easiest way would be to list every possible party member and check if they are in the party after you pick them. Anything other than that would be outrageously complicated.
Have some set of variables that are set to their ID when you can change party.
Then, in the Show Choice use the \v with the \n.
Then, in the Show Choice use the \v with the \n.
You can't. In your party changing system or whatever, you have to set it manually.
Like, have 4 variables. And set them to whatever the ID is manually when your system is set.
If you are using the default menu you can't keep track of their order either.
Like, have 4 variables. And set them to whatever the ID is manually when your system is set.
If you are using the default menu you can't keep track of their order either.
I mean like, when you try to add/remove a person from your party in the program, the program asks you if you would like to pick that character from a list, or if you want 'Character with ID Stored in (variable)'. What decides/influences said variable? How does that work?
Behold for I have the solution.
I've said many times in many different topics how to store in variables who is in the party, right?
For example, here.
Now, you can use \n[\v] to say the name of the character. Say, Variable 113 stores the ID of the third member of your group. So type \v[\v] to say his name. Done.
I've said many times in many different topics how to store in variables who is in the party, right?
For example, here.
Now, you can use \n[\v] to say the name of the character. Say, Variable 113 stores the ID of the third member of your group. So type \v[\v] to say his name. Done.
post=150961
I mean like, when you try to add/remove a person from your party in the program, the program asks you if you would like to pick that character from a list, or if you want 'Character with ID Stored in (variable)'. What decides/influences said variable? How does that work?
That ID is their number in the Hero section of the database. If you set Variable to 2 or something, and add variable 10 to the party, it'll add hero in #2 to the party.
Calunio, it's \n for the first one. And that method isn't really any good anyways since it'll automatically rearrange the party. It's much more complicated, too, than simply setting it whenever the party changes. Just remember it can't recall the order incase you have the option to switch party order.
No, the method's perfect. You don't need to rearrange the party, since the order of party members is not important in Feld's case.
I'll repeat the process here in case people are not very good with abstraction:
Let's say you have 10 different heroes... called A, B, C, D, E, F, G, H, I, J. Their database ID is 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10.
Now you need 5 variables. Let's say they're variables 115, 116, 117, 118 and 119. Variables 116-119 are called PartyMember1, PartyMember2, PartyMember3, and PartyMember4. Variable 115 is called something like... Current.
Steps are:
set Current = 116
Cond A in party:
<>Variable(value stored in Current) set = 1.
<>Current + 1.
Cond B in party:
<>Variable(value stored in Current) set = 2.
<>Current + 1.
Cond C in party:
<>Variable(value stored in Current) set = 3.
<>Current + 1.
And so on, for every single possible party member.
Now, you can type your choice like:
I'll repeat the process here in case people are not very good with abstraction:
Let's say you have 10 different heroes... called A, B, C, D, E, F, G, H, I, J. Their database ID is 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10.
Now you need 5 variables. Let's say they're variables 115, 116, 117, 118 and 119. Variables 116-119 are called PartyMember1, PartyMember2, PartyMember3, and PartyMember4. Variable 115 is called something like... Current.
Steps are:
set Current = 116
Cond A in party:
<>Variable(value stored in Current) set = 1.
<>Current + 1.
Cond B in party:
<>Variable(value stored in Current) set = 2.
<>Current + 1.
Cond C in party:
<>Variable(value stored in Current) set = 3.
<>Current + 1.
And so on, for every single possible party member.
Now, you can type your choice like:
\n[\v[116]]
\n[\v[117]]
\n[\v[118]]
\n[\v[119]]
Can you replace the
\n
\n
\n
\n
examples with actual numbers? Every time I try to mess around with it I screw up.
\n
\n
\n
\n
examples with actual numbers? Every time I try to mess around with it I screw up.
Where do I store this code? In a common event, or the particular event that's asking the player what member he wants to work with?
This is still unnecessarily complicated.
Feld, just go into whatever system you created to change party members.
Create 4 variables, one for each potential hero slot.
Wherever you see for example, "Add Hero to Party" look at that Hero's ID number and set one of the 4 variables with the corresponding slot to that ID number. If there's a "Remove Hero" command set whatever value they were at to 0.
That's it. This way it will be automatically set whenever you change party members.
If you don't have the "Order" option in your menu, this can also retain the order of the party which is a nice polish to the show choice command.
Feld, just go into whatever system you created to change party members.
Create 4 variables, one for each potential hero slot.
Wherever you see for example, "Add Hero to Party" look at that Hero's ID number and set one of the 4 variables with the corresponding slot to that ID number. If there's a "Remove Hero" command set whatever value they were at to 0.
That's it. This way it will be automatically set whenever you change party members.
If you don't have the "Order" option in your menu, this can also retain the order of the party which is a nice polish to the show choice command.
...
Yeah, uh, if you ARE going to create a system to change party members this kind of thing is practically built into it if you're doing it a smart way.
Otherwise if you don't do that now (although you really should), calunio's method will work except his method only sets a left endpoint, you will need to define a right endpoint for how many party members you have, if the player decides to use only 3 members out of 4 for some reason.
Yeah, uh, if you ARE going to create a system to change party members this kind of thing is practically built into it if you're doing it a smart way.
Otherwise if you don't do that now (although you really should), calunio's method will work except his method only sets a left endpoint, you will need to define a right endpoint for how many party members you have, if the player decides to use only 3 members out of 4 for some reason.
Well I'm definitely going to build a party change system but I never really figured out a code efficient way how to. the fact that I haven't really seriously, as in, SERIOUSLY messed around in the code in my game for quite a while combined with the fact that I'm pretty sure I have some sort of coding dyscalculia makes me want to shoot myself in the head when confronted with this stuff, honestly.
Well, it's just one of those things you have to sit down, plan out, and figure it out. After you've come up with all the characters at least.
Well Feld, look me up when you have your shit ready, I'll help you out. This kind of stuff is what I live for!
Pages:
1
















