Nightblade50

Veteran
Veteran
Joined
Nov 10, 2016
Messages
2,175
Reaction score
4,285
First Language
English, French
Primarily Uses
RMVXA
I am wanting to add a system to my RPG Maker XP game in which, whenever the player is traveling on the road and enters a new area, then a random event will possibly spawn on the road. The events will vary greatly (e.g., bandits trying to get money from you, a traveling merchant, etc.) I am not sure if this will need a script or if it can just be done by some complex common events. Anybody know how to do this?

EDIT: I don't know if it matters, but if it needs a script, it will have to be compatible with my other scripts: Ccoa's Universal Message System, Mobius Quest Journal, Zer0 Advanced Weather, CCTS, and Lycan ABS
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,861
Reaction score
14,510
First Language
English
Primarily Uses
RMMV
What is "a new area"? A new map? Different areas on the same map? How are you defining the areas?

It's likely that it can just be done using events, but we need to know the above first.

Will all the different areas have the same random events, or will they change from one area to the next?
 

Nightblade50

Veteran
Veteran
Joined
Nov 10, 2016
Messages
2,175
Reaction score
4,285
First Language
English, French
Primarily Uses
RMVXA
What is "a new area"? A new map? Different areas on the same map? How are you defining the areas?

It's likely that it can just be done using events, but we need to know the above first.

Will all the different areas have the same random events, or will they change from one area to the next?
I mean a new map. Sorry for not making that clear.

Certain areas might have different random events than others. Some areas will have none at all.
 

orochi2k

The Mad King of Neolithic
Veteran
Joined
Jan 2, 2021
Messages
79
Reaction score
81
First Language
Chinese
Primarily Uses
RMXP
You don't need a script.
You can use an event that auto starts each time player get into the map, throw a random number to a variable and decide which one of the random events it's going to play, and then set up some other variable and switch accordingly.

For example, there may be 2 possible NPCs to appear in an area.
First, we set both NPC events up with each of them having a switch to control if they appear.
Then, we set up an auto-start event, throw a random number to a variable, if the variable is equal to 1, then we turn on the switch to let 1st NPC appear(but also turn off the other switch to make 2nd NPC not appear), if the variable is equal to 2, then we turn on the switch to let 2nd NPC to appear(and also turn off the first switch to let 1st NPC not appear.) At the end of the auto-start event, you just need to make it be erased. (So that it will reappear to do the randomization next time the player get into the map).

If you use more switches and variables you can make more complicated randomization.

The script is just there to make it easier to control. The logical flow is basically the same.
Unless you want to do some crazy things like I did to dynamically generate NPC with their own little AI to simulate what happens.
 

Latest Threads

Latest Profile Posts

Kind of relieved that I had medibang installed when I need to edit Sprite I was about to download gimp but I remember I had medibang installed lol
Voting for the first round of the Map Madness Tournament is now live! Vote for your favorite in each matchup!

Finally started working on Grim Trigger episode 2 today :LZScat: it's half comic/half visual novel!

GfY3Rwj.png
Is it interesting to get more backstory on villains? A key moment in their past, their childhood, or maybe something that shows they've always been that way? To see or not to see?
"Everything tastes like chicken until it's chicken, then it doesn't taste like chicken."
Context: chicken samosas do not taste like chicken. I thought it was veggie samosas.
Just another ordinary evening.

Forum statistics

Threads
110,364
Messages
1,052,622
Members
143,397
Latest member
RainingLamppost
Top