I want to create a single player game were the NPCs follow a distinct schedule, like Stardew Valley. I’ve been working on the system for a few days. Here’s what i have so far.
- Data table with a defined schedule that the NPCs can follow.
2.In world clock that records in game hours(60 seconds in real-time), days, and months.
- Having the NPC’s spawn within one map at certain places based on their schedule.
- Having NPC’s move to a “Standing Point” actor during certain times based on their schedule for a single level.
The problem I’m having is scaling this up for use in multiple maps. Specifically
- How would I get the location of the “Standing Point” actors in different levels?
- Is there a way to use get all actors of a class on multiple maps, or get information from other levels.
- I tried saving the locations in the instance on construction, but to my knowledge instance only starts during runtime so I couldn’t use that to save the location values.
- I really hope I won’t to manually input the location for every location an NPC could be standing.
How would I simulate actor movement within the maps I’m not in. Is there a way to simulate movement while only using the numbers, while still maintain the NPCs pathing so they don’t end up spawning in a wall or something?
How should I have NPC’s move through multiple levels. Say if the NPC is in map 1 has a destination in map 3 but has to pass through map 2 how would I tell him to pass through the levels? I could create a big data sheet with all the connecting points of the map and just have the NPC branch through the data tree until they get all the transition points they need to pass through to reach the map with there destination, that doesn’t seem the most efficient way of handling things.