Best, and easiest way to do NPC Schedules

Patryk

Best in the World
Member
Joined
Jan 15, 2015
Messages
21
Reaction score
3
First Language
Polish
Primarily Uses
I'm a huge fan of games like Gothic I & II, Fallout 3 & NV, The Elder Scrolls series, because of many reasons, but the one I have in mind right now is NPC schedules. They not only add so much to the immersion factor, but it's just generally very fun to have them, they make the world feel a lot more organic and alive.

So, naturally, I would love to have them in my games, and I already have, but I'm wondering if anyone has idea how to make this feature easier to do.

Right now I have day and night cycle with 4 phases: day, sunset, night and morning. In every phase all npcs are doing different stuff, have different and appropriate dialogue, and stuff like that. After few playtests, it's just so much more fun to play the game. And the way I'm doing it is that I have switches for every phase, I copy the npcs, paste them in the places I want, adjust their dialogue and stuff, and of course I make them appear when appropriate switches are on. And so far everything is great, but the problem comes when I have to change several tings in the npcs. Then I have to either delete and copy the npcs again and change their dialogue and other things for the relevant phase, or copy every single change into the 3 copies, which is really hard to do sometimes when there are many major and complex changes. So far I have around 20 npcs, and It would be really easy to do if they would be a traditional generic npcs with one line, but all of my npcs are fairly complex, many as complex like a major character in any other game. And I also want to add another phase, late night, so npcs could do something else besides sleeping at night, and that would make making changes even more irritating.

So, does anyone have other, easier ways to make character schedules? I would be really grateful even for a small tip.
 

AwesomeCool

Bratty and spoiled little sister
Veteran
Joined
Jul 20, 2013
Messages
2,862
Reaction score
1,947
First Language
English
Primarily Uses
N/A
first, get theos pathfinding script (or another),

get a event cloning script (really helps),

get something to save event positions when leaving a map (like shaz's) (it can be done without a script),

maybe an additional self switch script,

and finally enjoy yourself as your job will get easier then eventing everything out.
 

Scott_C

Veteran
Veteran
Joined
Oct 23, 2014
Messages
43
Reaction score
38
First Language
English
Primarily Uses
Put the behavior for the NPCs into a common events? For example, have one common event for NPC Bob, another for NPC Lucy and so on.

Then each NPC appearance is just a shell whose only job is to show up and disappear based on the time of the day. When the player interacts with them all they do is call the common event.

Then if you need make a change to NPC Bob you can just update the common event and every Bob shell that uses that common event will automatically update.

This will probably result in some very complicated common events with lot of conditional branches, but I think it will let you do what you want without having to actually write any new scripts.
 

Athryl

The Reticent
Veteran
Joined
Jul 20, 2013
Messages
309
Reaction score
101
First Language
English
Primarily Uses
I messed around with something similar in a test project - but I used common events along with Hime's Extended Common Events so I could still use pages instead of endless branches. I am not sure if one way or the other is more efficient resource/lag wise that might be worth checking into for a large project.  I only did it on a small scale, but it seemed to work well.  If you do go this route read Hime's terms of use first of course.

Good luck - it really does make the world feel more vibrant and alive.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Use a time variable instead of using switches/self-switches.


You need to use the priority function of the event to handle the "or above" part of the condition, but then you could make more than four different sequences and use multiple pages to sort through them.


For example, if you make an hour-based time variable, you'll set each of 24 pages to the same time variable, with a number identical to the page number, and then the behaviour in any given hour will be on the event page numbered for that hour. If an event has an identical behaviour for several hours, you place that on the first of those hours and delete the pages for the next hours until the time for the next change is there.
 

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
The way I do it is like Andar's way. I have variables that take time and use those variables to determine which pages of the event to show.
 

Patryk

Best in the World
Member
Joined
Jan 15, 2015
Messages
21
Reaction score
3
First Language
Polish
Primarily Uses
Thanks everyone, you've really helped me a lot!  :)

Use a time variable instead of using switches/self-switches.

You need to use the priority function of the event to handle the "or above" part of the condition, but then you could make more than four different sequences and use multiple pages to sort through them.

For example, if you make an hour-based time variable, you'll set each of 24 pages to the same time variable, with a number identical to the page number, and then the behaviour in any given hour will be on the event page numbered for that hour. If an event has an identical behaviour for several hours, you place that on the first of those hours and delete the pages for the next hours until the time for the next change is there.
This is really neat way to do this, I was actually considering using variables with 24 hours, but here's a small problem I have.

I wanted to make it so the time passes only on the world map, so NPCs wouldn't suddenly start teleporting all over the place, and waiting for time to change wasn't too long or too quick. And the way I did this is that I have a common event with parallel process that activates after I enter the map, and deactivates after I enter another. But when I re-entered the world map the common event worked weird, not the right switches and tints were turning on. So I've had to set up condition for every phase. So for example when there's night, and the Night Switch is ON, in the condition there's whole day and night cycle starting from night. So, It would be a real pain to set up condition for every hour. Is there any easier way to do day and night cycle that only activates on one map? I guess there probably is because I started working with RPG Maker a week ago and this day and night cycle I've set up is probably very bad. But it worked alright if I wouldn't want to make more phases, and make the NPC Schedules easier to do.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top