Creating side-quests

So basically I plan to have in my Voyage of the Eldritch game an university “quest-board” where your character can complete various sidequests from many npcs at the university (Lexi, Samuel, Alicia, Tetris, Olapen, Leon etc) and the mini quests only complete if your character actually gets the items required.

Question is, how do I go about writing the coding for the many sidequests? I’m also planning to have some of the sidequests to be related to various jobs or tasks (ie Barista or Professor)

2 Likes

That’s quite unspecific. :sweat_smile:

There could be many different things involved in coding sidequests, depending on how you want to do it. The way I do it in my own WIP might not be the way you do.

What, more exactly, do you need help with?

1 Like

Basically I would like it in a format similar to:

Job: Barista
Quest: Collect 20 coffee for [npc]
Completed by: Friday 30th of October.
Earnings: $5 for [x] hours
Extra: Bonus potion

So a list of available quests?

Yes, a list of available quests by various npcs in the university, as a type of message-board.

I would look at the following:

and

Learning about these two features of choice script should help you.

3 Likes

Okay, then I’d make it a subroutine, and just list out all the quests, and hide them behind boolean checks. That way you can set them to true when they are unlocked, and they should show up on the board.

And then a choice for accepting them, hiding behind the same *if check.

2 Likes

So, maybe you could write the “boolean check” example for me, in case I need to write it for quest coding later on? Thanks… Also before I forget, how do I make the game check if the player collected the necessary items for the npc sidequests?

Something like this is my guess.

*disable_reuse

*if (zoe_sidquest = false) #Complete Zoe's side quest.
       *set zoe_sidequest true
*if (zack_sidequest = false) #Complete Zack's side quest
      *set zack_sidequest true

Depends on where in the text your checking if they have the items or not and what the outcome is. Probably more boolean variables would work best?

*if (has_pencil = true) and (has_notebook = true)
          X happens.

If I have understood you correctly, something like this:

*create quest_20_coffee false
*create quest_10_soap false
*create soap 0
*create coffee 0

*if quest_20_coffee
    Job: Barista
    Quest: Collect 20 coffee for [npc]
    Completed by: Friday 30th of October.
    Earnings: $5 for [x] hours
    Extra: Bonus potion
    
*if quest_10_soap
    Job: ?
    Quest: Collect 10 soap for [npc]
    Completed by: Thursday 29th of October.
    Earnings: $2 for [x] hours
    Extra: Bonus potion
    
*choice
    *if ((quest_20_coffee) and (coffee>19))
        #Deliver coffee
            *goto coffee_delivery
    *if ((quest_10_soap) and (soap>9))
        #Deliver soap
            *goto soap_delivery
    #Back
        *return

I haven’t exactly tested it or anything.

Probably something like *if (not quest_20_coffee) at first, since the player hasn’t chosen to do them yet.

I’m writing it as quests that gets unlocked at specific times, or player actions.
If they need to be specifically accepted, before they can be turned in, that requires another layer of variables.

EDIT: I guess you could make the variables numerical instead, and have 0=unavailable 1=inactive 2=active, or something like that.

1 Like

Do I have to create the quest items in the startup.txt beforehand, or do the items work just as fine on a seperate page with coding? Also, how do I randomise the NPCs and [hours] for questing?

Ie. Collect coffee for [npc], complete by [_] hours

How many quests are you thinking of having it total?

Use the *rand command.

Approximately 13 quests, but some side-quests usually lead into permanent content unlocked for the player (ie. npc “Kotone” being unlocked after completing specific spell for Olapen, for example)

https://dashingdon.com/play/nocturnalstillness/test-code/mygame/

Are you after something like this?

1 Like

That is exactly what I was thinking of! :slightly_smiling_face:

*create quest_01 false
*create quest_02 false
*create quest_03 false
*create quest_04 false
*create quest_05 false
*create quests 5
*create sidequest_01 false
*create sidequest_02 false
*create sidequest_03 false
*create sidequest_04 false
*create sidequest_05 false
*create sidequests 5

*label start_here

These are the current quests available…
*choice
  *if (quests > 0)
    #Main Quests.
      *goto main
  *if (sidequests > 0)
    #Side Quests.
      *goto side
  #Accepted Quests.
    *goto accepted
  
*label main
*choice
  *if not (quest_01)
    #Quest One.
      *set quest_01 true
      *set quests - 1
      *goto quest_one
  *if not (quest_02)
    #Quest Two.
      *set quest_02 true
      *set quests - 1
      *goto quest_one
  *if not (quest_03)
    #Quest Three.
      *set quest_03 true
      *set quests - 1
      *goto quest_three
  *if not (quest_04)
    #Quest four.
      *set quest_04 true
      *set quests - 1
      *goto quest_four
  *if not (quest_05)
    #Quest Five.
      *set quest_05 true
      *set quests - 1
      *goto quest_five
  #No more quests.
    *goto start_here
    
*label quest_one
This is the first quest.
*goto start_here

*label quest_two
This is the second quest.
*goto start_here

*label quest_three
This is the third quest.
*goto start_here

*label quest_four
This is the fourth quest.
*goto start_here

*label quest_five
This is the fifth quest.
*goto start_here

*label side
*choice
  *if not (sidequest_01)
    #Side quest One.
      *set sidequest_01 true
      *set sidequests - 1
      *goto sidequest_one
  *if not (sidequest_02)
    #Side quest Two.
      *set sidequest_02 true
      *set sidequests - 1
      *goto sidequest_one
  *if not (sidequest_03)
    #Side quest Three.
      *set sidequest_03 true
      *set sidequests - 1
      *goto sidequest_three
  *if not (sidequest_04)
    #Side quest four.
      *set sidequest_04 true
      *set sidequests - 1
      *goto sidequest_four
  *if not (sidequest_05)
    #Side quest Five.
      *set sidequest_05 true
      *set sidequests - 1
      *goto sidequest_five
  #No more quests.
    *goto start_here
    
*label sidequest_one
This is the first side quest.
*goto start_here

*label sidequest_two
This is the second side quest.
*goto start_here

*label sidequest_three
This is the third side quest.
*goto start_here

*label sidequest_four
This is the fourth side quest.
*goto start_here

*label sidequest_five
This is the fifth side quest.
*goto start_here

*label accepted
*if (quest_01)
  Quest One accepted.
  *line_break
*if (quest_02)
  Quest Two accepted.
  *line_break
*if (quest_03)
  Quest Three accepted.
  *line_break
*if (quest_04)
  Quest Four accepted.
  *line_break
*if (quest_05)
  Quest Five accepted.
  *line_break
*if (sidequest_01)
  Side Quest one accepted.
  *line_break
*if (sidequest_02)
  Side Quest two accepted.
  *line_break
*if (sidequest_03)
  Side Quest Three accepted.
  *line_break
*if (sidequest_04)
  Side Quest Four accepted.
  *line_break
*if (sidequest_05)
  Side Quest Five accepted.
  *line_break
*goto start_here

Here is the code I used for the example so you can see what I did.

edit: are the quantity of items going to be individually collected or will the quest just send them to get them or will players need to keep track of how much they have?

3 Likes

Does that mean that I have to first create the quests in the startup.txt page before implementing the quests?