New writer still figuring things could use tips

One thing I’ve come across so far is when you write a choice does it have to end the scene or can you continue the scene?

1 Like

A choice comes in two flavors:

*choice
   #an option
      *goto a_label
   #another option
      *goto b_label

And

*fake_choice
   #an option
      Maybe some text.
   #another option
This is where the game text will continue.

So the answers is no: unless you want a choice to move on to the next file on the scene list, you can either use labels (when having a *choice) to go to different bits, or use a fake_choice with maybe some flavor text if it all goes to the same bit of text.

There’s also something called implicit control flow that removes the need for gotos in choices and if/elseif/else trees, but this is not recommendable for beginners.

For later, if you trust yourself with it and want to give it a try, @GoldenSilver can explain it.

1 Like

Thanks, I’ve been thinking of starting this for a while but I find the coding difficult sometimes. I’m learning mostly from videos on YouTube but that only does so much.

Could you explain what a fake choice is for? I’ve played a couple CoG games so if you got an example it would help.

A fake choice looks like a regular choice, but all choices go to the same bit of text.
So you won’t need a label and goto, and you can still set stuff like stats and other variables, plus have some flavor text.

I’m currently on mobile, so I can’t copy paste one well, but, here’s a file from my own game:
https://dashingdon.com/play/meltingpenguins/curious-cuisine/mygame/scenes/6_apeculiarparty.txt

4 Likes

The ChoiceScript Wiki is also really helpful if you need more information.

Thank you both for explaining things

Most of the examples that have the *choices ending on *finish or *ending just for explanation purposes; on most cases you would use *goto to go to any *label that is placed on your file where you want to redirect the player to. Or as was said before, you can use *fake_choice that has it simply continuing down after a choice was picked.

Here are some wiki articles:


Just wanted to clear up that there’s nothing about this feature that is “not recommended for beginners”; if you like it’s effects @King14936, feel free to use it. It’s a pretty simple feature to use or enable or disable; there is nothing “advanced” about it.

Here is the wiki article:

1 Like

To clarify my comment about beginners:

should you be uncertain where and when to use *goto *finish *go_sub etc, ICF is not recommendable (yet)

1 Like

Meeps, you had a misuse of a *line_break in your sample code.

99% of the time, HG authors misuse *line_break. The only time you should need a *line_break is if you’re trying to show something like lyrics or poetry. (Or if you’re trying to space things out on the stats screen.)

1 Like

My intend was to have it look like this (in the hypothetical):

flavor text.
Regular text.

Is formatting like that not allowed in general (outside of lyrics and poetry)? As in will I (and maybe others) have to re-do all of what i/we have so far? (see the linked sample code. I use line_break a lot)

1 Like

I second this question. I usually just double enter, but I’ve been getting in the habit if using *line_break more.

I personally combined both my flavor and normal text in a paragraph. Heck, even most of my flavor texts are multireplace. YMMV, I think.

But as a note, I hate *line_break. [n/] all the way.

1 Like

A post was split to a new topic: *line_break and proper CS lineation

line break versus N slash

I’m using some weird syntax to represent sign language for one character in my game. Since there isn’t any actual punctuation, each new sentence is a new line. It looks like this:

HELLO - FRIEND
LONG TIME - NO - SEE
QUESTION - YOU - AGREE - NICE - DAY

There are two ways of doing this:

HELLO - FRIEND
*line_break
LONG TIME - NO - SEE
*line_break
QUESTION - YOU - AGREE - NICE - DAY

or …

HELLO - FRIEND [n/]
LONG TIME - NO - SEE [n/]
QUESTION - YOU - AGREE - NICE - DAY

The second one is a lot nicer and better mimics the final product. [n/] all the way.

Was gonna second the recommendation to split topics but internet’s dodgy in this motel. Should probably move this comment over to the new thread too!