Tutorial/Hint mode

Hi everyone!

Choicescript cave man here. :wave:

tldr: What’s the most elegant way of coding a tutorial mode into my game? I want choices in the game to show up (for the player) as:

Hit a ball hard and fast to the baseline [Strength] - If tutorial mode is on

Hit a ball hard and fast to the baseline - If tutorial mode is off

Does anyone know a code-efficient way to do this? Probably something to do with arrays, but I can’t seem to wrap my head around that.

I’ve searched the forums for a similar question, but I can’t seem to find anything. Thanks in advance for the help! :slight_smile:

Long story

I’ve coded a “tutorial mode” into my game, College Tennis: Origin Story, mainly to make sure that folks who are less familiar with tennis (or anyone, really) understand which stats are being tested for each choice made during a tennis match. An example of this would be:

*choice
  #Hit a ball hard and fast to the baseline. [Strength] 

I’ve also allowed players to toggle this mode on/off. Meaning that more ‘experienced’ players (or players who want to play with more immersion, can switch this tutorial mode off.

I’ve done this in the most primitive way possible: created two versions of the same scene:

  • Version A presents each choice with a label [which stat is being tested]
  • Version B presents just the choice

Obviously this is a terrible way to code, but the only other option I can think of is doing something like an “if” statement. I didn’t do this because I thought it would be almost just as much of a hassle.

*choice
  *if (tutorial_mode) #Hit a ball hard and fast to the baseline. [Strength] 
     Blah blah...
  *if (not (tutorial_mode)) #Hit a ball hard and fast to the baseline.
     Blah blah...

I’m not sure if this works, but you could try this.

*create tutorial true

*choice
#Hit a ball hard and fast to the baseline. @{tutorial [Strength]|}

With multireplace, if tutorial = true then [Strength] is shown, otherwise it isn’t.

6 Likes

*create em false
#I light a flare and wave it at the wight until it retreats.@{em [COM+Intimidation]|}

Is how Night Road does this idea. Basically “em” (short for easy mode/Storyteller mode) is set as a variable, by default “false” and thus easy mode is off but the option to turn easy mode on sets the variable em to true.

The way the second part works is that if “em” is true, then it will add on [COM+Intimidation] to the end of the choice and add nothing to it if “em” is false.

EDIT: Same principle as Rock, didn’t see them post while I was looking for the exact code.

5 Likes

You only need to create the two choices in that case, and make both choices go to the same place, but the multireplace mentioned above (if it works) is simpler.

2 Likes

OOH! Thank you all!! That was super helpful, and so much easier than I’d thought! :partying_face:

3 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.