Level System

I’m currently making a game that has six quests as well as some side quests. To me it makes sense for the quests to each have their own scene even though they are technically occurring within the same scene. I’m wondering if anyone has any input on this? Would there be a better way to handle it? I don’t think there is without me having to set a lot of variables from script manually as well as setting conditions for certain NPCs, so it seems like the best options is just placing every quest into its own scene. Advice is appreciated!

Hi techboysquared1,

Depending on the sizes of the scenes, it may or may not be worth it to create different scenes:

If the additional scenes are relatively small, then you could get away with keeping everything in one scene.
If the additional scenes are decently sized/large, then it would most likely be worth it to just load the different scenes.

The trade-off, as best I understand, is having one really long load (along with higher system load) vs having multiple small loads (and a lower system load).

Regards,
Ezro

Thanks for the reply. I’m not 100% sure if you understand my question. I have a town that is the location of my game. I want to have the different quests located in this town. The only difference being the state of the different objects and npc in the scene. I feel like it makes more sense to just take the scene duplicate it and then make the appropriate changes. I’m looking in my assets and the size of the scene file is only 896 kb. I really need advice here as I don’t want to go down the wrong path!

Is it like - Each npc has there own locations depending on the current quest?

Oh, I see.

For this, your best bet is probably to use town states, depending on which quest is active, and then use .setActive() on them.

So, the general idea would be like this:

//List of all of the GameObjects which should appear on the screen
//during the first quest
private GameObject[ ] firstQuestGOs;

void Update(){
//If first quest is started
if(…){
SwitchGOs(firstQuestGOs);
}
}

void SwitchGOs(GameObject[ ] activeQuest){
//Pseudo – probably better to use enums, or a string/int
if(activeQuest == firstQuestGOs){
foreach(GameObject GO in firstQuestGOs){
GO.SetActive(true);
}
}

There’s more to it than that, but that is the bulk of the concept.
(You would also need to disable all GOs which aren’t a part of firstQuestGOs by just iterating through them and using .SetActive(false); )

Hope that helps.

Regards,
Ezro

Most NPCs aren’t active during the current quest. You are unable to go into most buildings. Merchants are not selling. etc. So there is a lot changed, and I just feel like it would be very tedious to script it. Possible? Yes, but I feel as if it would be an inefficient way of going about it…

Ok. so here is what I’m thinking. I will have a base class Quest. This class will then be inherited from. in the base class i will have an onStart function to be called whenever a quest is started. this on start will handle deactivating merchants and doors. etc. i will then call this and special deactivations/activations from the inherited quest classes. A reference of the quest class will be stored in my GameStateManager object. where whenever a quest is set, it will check whether or not success or failure has been met via two functions in the Quest class hasSucceded and hasFailed. I’m hoping this is making sense to everyone as it is simply what i just drew up on my whiteboard!