Is there any way to make this code more efficient?

You can collapse some of the choice options seeing as the only difference is the bold style of the text. For example:

@{false Bed | [b]Bed[/b] }

Since you don’t have anything inside the *else body, you can simplify it, like so:

From:

*if not (letter)
    *set letter true
    [i][b]Letter[/b] added to evidence.[/i]
    *line_break
    [i]This says her son died.[/i]
    *goto examine
*else
    *goto examine

To:

*if not (letter)
    *set letter true
    [i][b]Letter[/b] added to evidence.[/i]
    *line_break
    [i]This says her son died.[/i]
*goto examine

Other than that, your code is very well organized. There’s not much to give feedback right now. Unfortunately, ChoiceScript is rudimentary, so you can’t keep it DRY.

By your coding I can see you’re familiar with programming (with Python, perhaps?). Take a look at this cs library, there may be something that interests you there, especially the menu module. It can be helpful when building simple, repetitive choices.

5 Likes