Status
Not open for further replies.

Amsrul

Warper
Member
Joined
Jun 24, 2012
Messages
3
Reaction score
2
First Language
English
Primarily Uses
As the title suggests I already have a day/night cycle set up using some common events. The problem I have now is making it so that some monsters only appear at night (or day). I've tried some things with common events and troop events, but nothing I've thought of works.

I think that the only solution might be to script a way around this issue, but I figured asking the community would be worth a shot. So what do you guys think? Any advice would be much appreciated!
 

Levi

Veteran
Veteran
Joined
Jun 7, 2012
Messages
798
Reaction score
144
First Language
English
Primarily Uses
I can think of a few possible solutions...

1) A script that changes region ID based on a timer. Then have "daytime" r-IDs (e.g. 1-30) and "nighttime" r-IDs. (e.g. 31-60).

2) If you want to get less into Scripts, simply have a daytime map and a nighttime map. Then set up all 'teleports' and 'doors' to transfer you to one or the other, depending on the time of day. This might not be practical, depending on the number of maps you plan on using this with.

3) (This seems the most flexible... plus no scripts are required) Have encounters set up via event, as opposed to through the 'Map Properties'. Then have a page for day-time (e.g. condition Var[time]: 1) and a page for night-time (e.g. condition Var[time]: between 2). Then set up variables to randomly pull numbers that can then be used to dictate likely hood of an encounter.... sort of as a work around to the "weight" issue. Plus, you could still use Region-ID to dictate where you will encounter which enemies, by using conditional branches and "pull region" commands.

This whole thing could be set up as a Comment Event, so the bulk of the eventing only has to be one once. After that you just substitute Troops and Region-IDs on a map per map basis.

That's all that comes to mind for now.

Edit:

A bit longer of a description for #3:

1) Create a Variable called ToD (Time of Day) or whatever you want.

2) Have that variable receive the time of day (be as specific or non-specific as you want. Non-specific would be "Day = 1" and "Night = 2". Specific would be having ranges (Morning 1-50, Day 51-100, Evening 101-200 etc) Both would work... but one would take much more effort (obviously)

3) Have an event page for each time of day (The condition being the variable you just set up).

3a) So the day-time page would be "Var[ToD]; 1" and night-time would be "Var;[ToD]; 2 based on bolded phrase above)

4) Set up battle processing for each page.

4a) Have a var called "Encounter 1" that receives a number either 1, 2 or 3. Then using conditional branches, have it set so that if Var[Enc 1..] = 1 you battle a wolf. This is used as a rough workaround for weighting. This example should produce a 33% of encountering a wolf at time of processing.

This is the jist of it. Whether you have the battles trigger after contact, after a certain length of time, or randomly, is your call. Using this technique provides a great deal of flexibility as you can easily incorporate other variables into the Page Conditions or Conditional Branches based on whatever you like. And the end result doesn't have to be battles...

I think everyone should have a crash course in variables before they start a game... simply because they're one of the most powerful tools available, and few people take full advantage of them. There are a few great tutorials on here regarding Variables, it won't hurt to do a quick search and go through them.
 
Last edited by a moderator:

ragnawind

Veteran
Veteran
Joined
Jun 3, 2012
Messages
180
Reaction score
5
First Language
English
Primarily Uses
It would be easier to do without random encouters, such as having the enemy encounters triggered on the map by stepping on tiles. Other than that I'm not sure of a way to do it.
 

Amsrul

Warper
Member
Joined
Jun 24, 2012
Messages
3
Reaction score
2
First Language
English
Primarily Uses
Thanks! I think I'll be trying #3, I think that'll give me much more control over everything with encounters as well as doing what I want.

I have used some variables so far, but I definitely take a look at a tutorial or two.
 

Linkzell

High Level n00b >_
Member
Joined
Jun 23, 2012
Messages
68
Reaction score
2
First Language
English
Primarily Uses
Also. If you want to nix Random encounters all together, just do events as your encounters akin to FF12 or other RPGs with realtime battle. paper Mario is another example. Then set up a condishanl branch for day or night. the event would change during the day and night.
 

Amsrul

Warper
Member
Joined
Jun 24, 2012
Messages
3
Reaction score
2
First Language
English
Primarily Uses
I ended up using the idea #3 from Levi and combined it with one of Yanfly's many scripts (this one to be specific) to simplify the whole process. Now I have half the regions reserved for day-time and the other half for night-time such that all my event does is add 32 to the Region Id if the switch for "Night-time" is on.

I think it turned out pretty slick (that is easier and much more simple than I'd expected). Thanks everyone for your help!
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,558
Reaction score
5,614
First Language
Dutch
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Got a new phone and glasses to replace the old busted ones I've been hanging onto for years.

Expect this to improve my productivity 10x.
How do people feel about killing important characters or playing with their sanity? There's a possibility that I thought up earlier that could be interesting to work with.
I need more sales of my game to pay my bills or December is gonna be really hard for me :/
Longtime lurker, happy to have joined, hoping to find some help when I need it.

Forum statistics

Threads
126,938
Messages
1,182,452
Members
166,770
Latest member
rockcjc
Top