JaeJaeCee

Emerald Phoenix
Veteran
Joined
Dec 15, 2018
Messages
137
Reaction score
130
First Language
english
Primarily Uses
RMMV
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
upload_2018-12-17_19-23-39.png


screenshot 2/3
bottom of page 1 of the event, with blue box to indicate bottom of what was shown in screenshot one
upload_2018-12-17_19-25-14.png

screenshot 3/3
page 2 of event...
upload_2018-12-17_19-26-55.png

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

  • upload_2018-12-17_19-24-47.png
    upload_2018-12-17_19-24-47.png
    37.6 KB · Views: 2
  • upload_2018-12-17_19-24-48.png
    upload_2018-12-17_19-24-48.png
    37.6 KB · Views: 2
Last edited:

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,941
Reaction score
4,853
First Language
EN, FR
Primarily Uses
RMMZ
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
Veteran
Joined
Dec 15, 2018
Messages
137
Reaction score
130
First Language
english
Primarily Uses
RMMV
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
Global Mod
Joined
Nov 18, 2015
Messages
3,941
Reaction score
4,853
First Language
EN, FR
Primarily Uses
RMMZ
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
}
 
Joined
Dec 16, 2017
Messages
2
Reaction score
1
First Language
English
Primarily Uses
N/A
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
Veteran
Joined
Dec 15, 2018
Messages
137
Reaction score
130
First Language
english
Primarily Uses
RMMV
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
Global Mod
Joined
Nov 18, 2015
Messages
3,941
Reaction score
4,853
First Language
EN, FR
Primarily Uses
RMMZ
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.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,941
Reaction score
4,853
First Language
EN, FR
Primarily Uses
RMMZ
Here you go:
qr5zZT5.png
 

JaeJaeCee

Emerald Phoenix
Veteran
Joined
Dec 15, 2018
Messages
137
Reaction score
130
First Language
english
Primarily Uses
RMMV
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
Global Mod
Joined
Nov 18, 2015
Messages
3,941
Reaction score
4,853
First Language
EN, FR
Primarily Uses
RMMZ
@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
Veteran
Joined
Dec 15, 2018
Messages
137
Reaction score
130
First Language
english
Primarily Uses
RMMV
@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

upload_2018-12-17_20-18-27.png

i do not understand this.....
 

OmnislashXX

Veteran
Veteran
Joined
Mar 30, 2012
Messages
617
Reaction score
3,703
First Language
English
Primarily Uses
RMMV
Just do some things. Mess with it, see how it works. Don't make a game just yet.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,486
Reaction score
1,504
First Language
Spanish
Primarily Uses
RMVXA
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
Veteran
Joined
Dec 15, 2018
Messages
137
Reaction score
130
First Language
english
Primarily Uses
RMMV
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
Global Mod
Joined
Nov 18, 2015
Messages
3,941
Reaction score
4,853
First Language
EN, FR
Primarily Uses
RMMZ
Or just use my conditional branch solution with the variable random value to have random dialogues.

EDIT: See image above.
 

JaeJaeCee

Emerald Phoenix
Veteran
Joined
Dec 15, 2018
Messages
137
Reaction score
130
First Language
english
Primarily Uses
RMMV
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
Veteran
Joined
Mar 30, 2012
Messages
617
Reaction score
3,703
First Language
English
Primarily Uses
RMMV
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.
wd4RAF0.png
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Something might be coming...
Hallo.png
A new day for creating :)
2021 has been the runner-up for the worst year of my life. 2015 may take that title, but '21 is pushing it. Excuses really don't justify how much of a jerk I've been this year to a lot of people.

I'm sorry. I don't intend to be a jerk forever, but I'd rather back up my intent with actions, not words.
"Another hundred habaneros... a teaspoon of tumeric... and a heaping helping of nitroglycerin!" The kitten in a chef's hat laughed maniacally as the pot he was stirring promptly exploded.

Forum statistics

Threads
116,016
Messages
1,094,929
Members
151,330
Latest member
Liradric
Top