Still learning

JaeJaeCee

Emerald Phoenix
I want to have a character that will talk to the player and then walk around randomly...
i’m not sure if I am doing it right...
I’ll post screenshots in an edit, in a couple of minutes... My grandpa’s computer is a bit slow, and I wanted to post this before I forgot.

edit 1, screenshot 1/3
top of page 1 of the event

screenshot 2/3
bottom of page 1 of the event, with blue box to indicate bottom of what was shown in screenshot one

screenshot 3/3
page 2 of event...

I want to know how to have page 1 impossible to reactivate once that conversation ends...
I want her to just have a couple of random dialogues available for whenever the player activates her... This single one is fine, too, as she will be part of the story later in the game, but I would still like to know if it is possible.

Attachments

37.6 KB · Views: 2
37.6 KB · Views: 2
Last edited:

MushroomCake28

KAMO Studio
When there are many event page, the game will determine all the pages that satisfy the condition(s) and pick the page that is further right (the one with the highest number) that satisfy its conditions. So if your page 1 and 2 are possible, it will always select page 2.

So if you want the page 1 to only play once, make it so the page 1 activates a self switch that is a condition for page 2. That way, page 1 will only play once, and every other time page 2 will play.

To have her say random stuff, set a variable's value to random (number between 1 and the number of random dialogues you have). Then, create conditional branches with each value in that variable's range as a condition and put every random dialogues in a conditional branch.

JaeJaeCee

Emerald Phoenix
When there are many event page, the game will determine all the pages that satisfy the condition(s) and pick the page that is further right (the one with the highest number) that satisfy its conditions. So if your page 1 and 2 are possible, it will always select page 2.

So if you want the page 1 to only play once, make it so the page 1 activates a self switch that is a condition for page 2. That way, page 1 will only play once, and every other time page 2 will play.

To have her say random stuff, set a variable's value to random (number between 1 and the number of random dialogues you have). Then, create conditional branches with each value in that variable's range as a condition and put every random dialogues in a conditional branch.
I’m afraid I understand everything but the last couple sentenses.
Can you reiterate that last bit?
I get confused easily, and my brain is a bit foggy from not sleeping well...

Last edited:

MushroomCake28

KAMO Studio
Haha no worries, I'll re-explain step by step.

The first thing you need to do is set a variable of your choice to a random value. This will determine which message your NPC will say. To set a variable to a random value, go to "Control variables" -> "Operand" -> "Random" -> and here you'll need to set the range from which it will draw a number. That range should be from 1 to the number of different messages your NPC has: so if there are 5 possible different messages, your random range will be from 1 to 5 (so the random value will be either 1, 2, 3, 4, or 5).

Now that you've got a random value in your variable, you're going to create a conditional branch for all of your different messages. Each branch's condition will be one of the possible value of your variable, and each branch will contain one of your random messages. So it's going to look like this:
Code:
``````if (variable_x == 1) {
message_1
}
if (variable_x == 2) {
message_2
}
if (variable_x == 3) {
message_3
}
if (variable_x == 4) {
message_4
}
if (variable_x == 5) {
message_5
}``````

KazumiYonecura

Warper
RPG Maker checks events pages from right to left.
Let's say you have an event with 4 pages, if the conditions for page 4 are met all other pages won't run.
In your case the solution would be to uncheck 'Self Switch A' on Page 1 conditions but check it on Page 2 conditions, then at the end of Page 1 you have to add the command 'Control Self Switch A = On'.

Use the following commands
https://cdn.pbrd.co/images/HSetVvm.png

Set up the variable to have a random value
https://cdn.pbrd.co/images/HSeuWcM.png

Set up multiple conditional branches to check the value of given variable
https://cdn.pbrd.co/images/HSeubl5.png

Then just set up which dialogue you want to present with each different value of that variable
https://cdn.pbrd.co/images/HSeup4f.png

Last edited:

JaeJaeCee

Emerald Phoenix
Haha no worries, I'll re-explain step by step.

The first thing you need to do is set a variable of your choice to a random value. This will determine which message your NPC will say. To set a variable to a random value, go to "Control variables" -> "Operand" -> "Random" -> and here you'll need to set the range from which it will draw a number. That range should be from 1 to the number of different messages your NPC has: so if there are 5 possible different messages, your random range will be from 1 to 5 (so the random value will be either 1, 2, 3, 4, or 5).

Now that you've got a random value in your variable, you're going to create a conditional branch for all of your different messages. Each branch's condition will be one of the possible value of your variable, and each branch will contain one of your random messages. So it's going to look like this:
Code:
``````if (variable_x == 1) {
message_1
}
if (variable_x == 2) {
message_2
}
if (variable_x == 3) {
message_3
}
if (variable_x == 4) {
message_4
}
if (variable_x == 5) {
message_5
}``````
I don’t know anything about coding-
And i somehow broke the character, she isn’t there when i playtest.

MushroomCake28

KAMO Studio
No need to code, this is all done through eventing (I was just too lazy to screenshot an event page). You know how to control game variables through eventing? The "Control Variables" command is on the first page when you want to add a command. In there there's an option to set a random value.

As for the conditions, they are also done through eventing. Also in the first page of the event commands, there's a command named "Conditional Branch". You can set a condition for executing some commands in the event.

If you're character isn't there when you playtest, it's probably because the event doesn't satisfy the conditions on any of its pages.

Here you go:

JaeJaeCee

Emerald Phoenix
No need to code, this is all done through eventing (I was just too lazy to screenshot an event page). You know how to control game variables through eventing? The "Control Variables" command is on the first page when you want to add a command. In there there's an option to set a random value.

As for the conditions, they are also done through eventing. Also in the first page of the event commands, there's a command named "Conditional Branch". You can set a condition for executing some commands in the event.

If you're character isn't there when you playtest, it's probably because the event doesn't satisfy the conditions on any of its pages.
Thank you... ^~^, this is only my third day messing aound with VX Ace and i keep messing up one thing or another.
Earlier the player couldn’t walk at all- ji have to rebuild the map from scratch Q^Q

MushroomCake28

KAMO Studio
@JaeJaeCee No worries, you'll learn pretty quickly. You'll see it's not so complicated. Most of the important event commands are on the first page, and other important but more advance commands are on the second page and third page.

JaeJaeCee

Emerald Phoenix
@JaeJaeCee No worries, you'll learn pretty quickly. You'll see it's not so complicated. Most of the important event commands are on the first page, and other important but more advance commands are on the second page and third page.
I’m afraid conditional branching went over my head when i opened the manu..... o.o

i do not understand this.....

OmnislashXX

Veteran
Just do some things. Mess with it, see how it works. Don't make a game just yet.

gstv87

Veteran
as in the first two images you posted, same deal, but make the 2nd page be "selfswitch A", and on the first page right at the end of the dialogue add a "turn on self switch A"

disable the check for party character for testing purposes.
if the whole assembly works, then put it back.

I want her to just have a couple of random dialogues available for whenever the player activates her...
that,.... is.... a little bit trickier
try making it switch configurations correctly *first* and then try the random dialogue.
I could show you a whole dialogue manager made with editor blocks (no code), but you wouldn't understand anything if you don't know how the program works.

JaeJaeCee

Emerald Phoenix
as in the first two images you posted, same deal, but make the 2nd page be "selfswitch A", and on the first page right at the end of the dialogue add a "turn on self switch A"

disable the check for party character for testing purposes.
if the whole assembly works, then put it back.

that,.... is.... a little bit trickier
try making it switch configurations correctly *first* and then try the random dialogue.
I could show you a whole dialogue manager made with editor blocks (no code), but you wouldn't understand anything if you don't know how the program works.
I have the dialogues planned, but I guess I won’t be able to use them...

MushroomCake28

KAMO Studio
Or just use my conditional branch solution with the variable random value to have random dialogues.

EDIT: See image above.

JaeJaeCee

Emerald Phoenix
Or just use my conditional branch solution with the variable random value to have random dialogues.

EDIT: See image above.
I will try in the morning, but I doubt I will understand it...
I don’t understand how to DO it- a picture of the completed process isn’t helpful...

OmnislashXX

Veteran
Alright. Lemme explain variables. They are, simply put, a value. You can add the value, subtract the value, make it a random value, etc. So for Variable 1 for instance, you can randomly set it to 1,2,3, etc.

Now, what this mean? You can influence how things work depending on the value. This is where a Conditional Branch works.

So let's see how this works.

First, we set the value of the Variable. If you want it to be random, select that option. Then set the Conditional Branch. If the value of the Variable equal so and so, then one of your messages happens.

Set another Conditional Branch. Make the value of the Variable different. Now if the Variable equals THAT value, then a different message occurs.

You can potentially create as many messages as you wish, given how many options you make for that Variable.

Hope this explanation helps.
EDIT: I provided you with a visual representation of what I'm talking about. This is MV but the principle is the same. In this case, the Variable (aptly named MelanieFireAttack ) is set to a Random value of 1-8. Everytime it sees that command, it will turn that variable to one of those random numbers. And if that random number happens to be 1, 2 or 3, she'll say the message assigned to that value. She won't say anything if the value is 4-8.

Last edited:

Latest Profile Posts

Holy cow, I have made Row Formation work again with OTB!

Now, my devious machinations can finally be born...
finished the second chapter of deltarune today, I gotta say that the 3 years wait was worth it lol
Happy Friday, y'all! I just got home from work and am sitting down with a nice cider, and I'm ready to chill and enjoy myself. Not sure if I'm gonna dive into any of my game-related projects or not tonight.... we'll see how I feel after unwinding for a bit I guess!