[CLOSED] Random Event Page Selection?

Disarmed

Villager
Member
Joined
Dec 6, 2014
Messages
29
Reaction score
1
First Language
English
Primarily Uses
How would I go around making an event that constantly changes? I want it so when I interact with an event, it changes next time when I speak to it?

For example:

I talk to an event for the 1st time

He shows me items he is selling.

I then talk to him again.

He shows me items he is selling, but they are different items.

Maybe make it so it constantly changes self switches and there are multiple pages each with self switches?
 
Last edited by a moderator:

EliteKilljoy

Beta Tester, English Proofer, German Translator
Veteran
Joined
Sep 8, 2014
Messages
197
Reaction score
45
First Language
English
Primarily Uses
N/A
I think you can just do it with switches/variables. I'm not skilled enough to give great explanations, but I don't think it'd be too difficult.
 

Disarmed

Villager
Member
Joined
Dec 6, 2014
Messages
29
Reaction score
1
First Language
English
Primarily Uses
I think you can just do it with switches/variables. I'm not skilled enough to give great explanations, but I don't think it'd be too difficult.
I have tried doing loops, that didnt work. I tried doing basic Self-Switches. Didnt work either. Maybe im doing it wrong? Im not sure, I just need someone smart to help me.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You don't even need multiple pages for this, all you need is one page. I did it with just variables and conditional branches... Set the variable to a random value at the start of the event, then set each possible value as a different path in the conditional branch.
 
Last edited by a moderator:

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
*EDIT* Fixed
This ought to help.
example 2.png
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I'd suggest using nested conditionals just so we're not running the remaining if's when 1 of them is already true anyways.
 

Disarmed

Villager
Member
Joined
Dec 6, 2014
Messages
29
Reaction score
1
First Language
English
Primarily Uses

byronclaude

Master of all things... (except the things I am no
Veteran
Joined
Aug 9, 2013
Messages
392
Reaction score
180
First Language
English
Primarily Uses
I think it ias an awesome idea.  Randomness really makes the game interesting.  I have a similar radom effect set for when players enter towns from a world map...  depending on a randomly produced variable...   there is a chance that it is raining in that town.  The weather also causes the NPC's to behave differently, or to disappear.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
though too much randomness can be annoying for the players too...
 

Disarmed

Villager
Member
Joined
Dec 6, 2014
Messages
29
Reaction score
1
First Language
English
Primarily Uses
I think it ias an awesome idea.  Randomness really makes the game interesting.  I have a similar radom effect set for when players enter towns from a world map...  depending on a randomly produced variable...   there is a chance that it is raining in that town.  The weather also causes the NPC's to behave differently, or to disappear.
Wow, that seems like a pretty cool idea. Except, I dont have an overworld map (Im making an open world RPG with huge maps for 1 realm) so yeah.
 

byronclaude

Master of all things... (except the things I am no
Veteran
Joined
Aug 9, 2013
Messages
392
Reaction score
180
First Language
English
Primarily Uses
Hmmm...   it would still be possible...  but would take more work.  Also, any sudden change in weather would need to happen outside of any town map in order for NPC's in those towns to be realigned according to the variable change. 

My current project uses a world map, and upon transfer into a town, a variable is randomly set to a number from 1 to 8.  If it lands on 8, rain is triggered.  It is arduous though, as the rain has to be made to stop upon entering buildings, and the variable is re-assessed upon exiting to determine if it is supposed to be raining.

@Engr. Adiktuzmiko - I agree too much randomness can be annoying.  As far as NPC's go, I try to save random for those who have less purpose, who just give the town personality or culture.  Merchants remain merchants, Innkeepers remain etc.  But the occasional 1 in 12 chance of finding a traveling merchant who is selling often used items at a quarter the normal price is often well appreciated :)
 

Disarmed

Villager
Member
Joined
Dec 6, 2014
Messages
29
Reaction score
1
First Language
English
Primarily Uses
*EDIT* Fixed

This ought to help.

example 2.png
I'd suggest using nested conditionals just so we're not running the remaining if's when 1 of them is already true anyways.
So I tried using the whole random variable thing. Didn't work. It would choose a random shop proccessing option, but every time I interact with the Merchant, it would be the same shop. It never changes, its always the same.
 

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
So I tried using the whole random variable thing. Didn't work. It would choose a random shop proccessing option, but every time I interact with the Merchant, it would be the same shop. It never changes, its always the same.
Weird... It works fine for me. I'm using the merchant I made for that example I gave you and each time I get a different one of those shop inventories. Well, once in a while I'll get the same one twice in a row, but it is random and there are only 4 choices so that is to be expected.
 

Disarmed

Villager
Member
Joined
Dec 6, 2014
Messages
29
Reaction score
1
First Language
English
Primarily Uses
Weird... It works fine for me. I'm using the merchant I made for that example I gave you and each time I get a different one of those shop inventories. Well, once in a while I'll get the same one twice in a row, but it is random and there are only 4 choices so that is to be expected.
Ive added 5 different possible outcomes, and I kept on getting the last Shop inventory. Then any game after that was just the 4th last one.

Maybe create a new game and add the merchant there and send me a link?
 

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
Here. I just started a new game and copied the merchant's event right over. Just remember you have to completely exit the shop, all the way back to the map, before the variable will randomize when you next enter the shop. Just backing out of the "Buy" menu and re-entering it won't do it.
*Edit*
Forget that last link. I accidentally made it an "encrypted archive".
This version is not encrypted however.
https://www.dropbox.com/s/6ainv42hdg4wz7h/random%20inventory%20merchant%20example.exe?dl=0
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Ive added 5 different possible outcomes, and I kept on getting the last Shop inventory. Then any game after that was just the 4th last one.
Then you had some wrong setting or something.
 

Disarmed

Villager
Member
Joined
Dec 6, 2014
Messages
29
Reaction score
1
First Language
English
Primarily Uses
Here. I just started a new game and copied the merchant's event right over. Just remember you have to completely exit the shop, all the way back to the map, before the variable will randomize when you next enter the shop. Just backing out of the "Buy" menu and re-entering it won't do it.

*Edit*

Forget that last link. I accidentally made it an "encrypted archive".

This version is not encrypted however.

https://www.dropbox.com/s/6ainv42hdg4wz7h/random%20inventory%20merchant%20example.exe?dl=0
Thanks, and I did completely exit out of the merchant, thats what I wanted anyways,
 

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
Oh, and you should make sure to label the variable you use with it so you don't accidentally use it for something else that is incompatible. After all it is going to be randomized frequently and should never go over what you have the shop inventories set for.

By the way, when you set the conditional branches you did set it to only work when "Equal to" the number? Not "Greater than or Equal to" nor "Less than or Equal to"? Right?
 

Disarmed

Villager
Member
Joined
Dec 6, 2014
Messages
29
Reaction score
1
First Language
English
Primarily Uses
Oh, and you should make sure to label the variable you use with it so you don't accidentally use it for something else that is incompatible. After all it is going to be randomized frequently and should never go over what you have the shop inventories set for.

By the way, when you set the conditional branches you did set it to only work when "Equal to" the number? Not "Greater than or Equal to" nor "Less than or Equal to"? Right?
Yes, I set it to Equal to and I named the variable. Still not working.

A picture comparison of mine and yours:

http://i.imgur.com/HjmPsXg.png

EDIT: Forgot to scroll down on mine but pretty much the same as the top.

EDIT: Maybe its Hime's shop manager script? Ill test it out.

EDIT: Nope, the script has notihng to do with it.
 
Last edited by a moderator:

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
It looks fine from what was visible in the pic. You tried several times, not just 2 or 3? It might come up with the same number several times in a row if it is truly random. True chaos includes orderly patterns within it after all.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,845
Messages
1,016,961
Members
137,561
Latest member
JaCrispy85
Top