Quest Hub Mechanics

I’m wanting to code my game so that you return to camp between zones to interact with RO NPCs, train, maintain equipment. . . I also want the PC to choose the order of the zones within tiers. For instance:

Tier 1 consists of Zones A, B, and C.
You can do them in any order, but have to do all three before unlocking
Tier 2, which consists of Zones D and E.
When those are both done, the PC can move on to the final
Tier 3, which consists of Zone F.
The structure for this segment of the story ends up looking like a triangle 3-2-1.

*varying zone order lets me give the illusion or more choice by altering sequence and creates variation between playthroughs.

**tier allow me tp scale difficulty in a way PCs will be prepared for and to move forward with milestone events which change the backdrop of the story between tiers.

“Vampire the Masquerade: Night Road” did something like this. You’re a courier. You have to deliver 3 packages but can do them in any order. Once you’ve delivered those, you get two more. In between, you’re at the “hub,” the small town where you receive your packages. Here, you can train, side quest, purchase vehicles and equipment, and romance . . .

So, mechanically, my intuition is to code the zones on separate .txt docs each navigable from a camp.txt doc. On completion of, say Zone A, I can use a Boolean variable to set zoneacomplete to true. Returning to the hub, I can use hide _reuse or selectable_if to make it so that only the remaining options in Tier 1 remain: B and C. I’m thinking I can make the hub dynamic by setting events which only appear as zones are completed, e.g. tier1progress 0-3, getting a +1 at the end of each zone. So, at tier1progress = 2, something happens at the hub. That way, no matter which order the PC completes the zones, at two zones completed, the event occurs. Does anyone have knowledge or experience that can speak to this? Best practices? Pitfalls to avoid? Other suggestions?

For Tier Two, I’m thinking I could build this into the camp.txt, unlocking when, say, tier1progress = 3 and zone(A/B/C)complete = true. Or it may be useful just to create a camp2.txt to keep myself from errors and to have more room to change the space from camp.txt in Tier 1. Does anyone have knowledge or experience that can speak to this? Best practices? Pitfalls to avoid? Other suggestions?

Thanks! Sorry if I’ve been unclear with my terms–I’m more a writer than a coder.

2 Likes

You could use go subs and then just lock the options behind variables that are only set as true if you complete the required previous scenes. That would be the easiest way in my opinion.
Something like:

*choice
   #Scene A
   #Scene B
   #Scene C
   *if completedscenes
      #Scene D

And so forth

2 Likes

just to further clarify, you could create the variable as *create completedscenesABC, and then *create completedscenesDE

2 Likes

This is what I did in Too Different, and it worked fine for me. I do have to say, though, that it can get confusing juggling a lot of different potentialities in your head. I had to make a separate .txt file and keep a running list of *goto’s and *label’s I’d already done or needed to do, and that definitely won’t work for everyone.

Jackpot1776’s suggestion is what I would do if you don’t want to deal with variables-as-a-counter/gate. It really ultimately comes down to what you’re most comfortable with, though! (:

2 Likes

Sounds to me like you pretty much have it sorted.

Present 3 options and go down the path of the option chosen. Close off that path to prevent it being chosen again and track any other ancillary variables (e.g. total number of options chosen) to trigger your extra events. Then when all three options are chosen unlock the next tier and repeat.

Do you need help forming the code for it?

1 Like

It seems your story is going to be location-based heavy, so I’d create .txt files based on the plot then the location. I’ll have A.txt, B.txt, and C.txt, but for the next tier, I might have D1.txt and D2.txt depending on how many different variations I’ll have in the story.

2 Likes

Help? Hm, maybe. I want to see if I can do it first. Then, if I can’t, I’ll reach out. Thanks!

Yah, and also just set up an incremental variable. For example, completing scene A would result in *set scene_counter +1.

That way, as you want to gate off the final section(s), only an *if scene_counter = 3 being true would unlock the final zone.

Which I realize is exactly what the author said in the OP, so I’m just saying “Your instincts are right” :smiley:

1 Like