Support for a writing Vet, but a Coding baby?

So i really love the idea of interactive story telling merging with gaming, and as a writer, i love the idea of being able to tell a story that someone can feel.

My issue, however, is that i have never laid one line of code, ever. and i would like to start learning; and i am having problems figuring out how to begin this whole process.

Any and all help would be appreciated, and big smiles and thanks in advance for advice.

1 Like

The first step, is to go to the wiki :ok_hand:

Any coding baby should be able to learn the simplicity of ChoiceScript there, but it’ll helps if you understand several coding terms:

Indentation
Line
Conditional Check
Commentary lines
Bug/Error

3 Likes

BTW, feel free to ask anything about coding or the code itself on the forum. Or browse other threads about coding issues.

The questions about coding are mostly the one who got their answers faster than other questions.

Coding in ChoiceScript does not have to be a complex, insurmountable task.
The crux of the language is the *choice command, as per its namesake.

Yes, the spacing is important when using ChoiceScript, but it’s not hard to get used to.
A simple choice tree might look something like this:

You just got home from school, and your mother is asking you about homework.

*choice
 #Tell the truth
 #Lie to her
 #Complain to dad that mom is bugging you. Again.

Though above code has three choices, it will not work. This is just to illustrate spacing. We need to tell the system to actually do something when the player selects that choice. So, here’s the code again:

You just got home from school, and your mother is asking you about homework.

*choice
 #Tell the truth
  *goto truth
 #Lie to her
  *goto lie
 #Complain to dad that mom is bugging you. Again.
  *goto dad

Using this example, we tell the system to literally “go to” a piece of code named either truth (for choice 1), lie (for choice 2) or dad (for choice 3). In order to tell the system what piece of code is named what, we label it using the *label command. Here’s the code again:

You just got home from school, and your mother is asking you about homework.

*choice
 #Tell the truth
  *goto truth
 #Lie to her
  *goto lie
 #Complain to dad that mom is bugging you. Again.
  *goto dad

*label truth
You are honest with your mother and tell her the truth.
(this would be a good time to change a statistic, like honesty +5 for example)

*label lie
You don't want to be forced to do homework tonight because you're going out with your friends.
(same deal, honesty -5)

*label dad
You are tired of mom trying to tell you what to do because you are almost an adult and deserve to be treated like one. Time to call dad!
(same deal, maybe a different stat. let's say... rebel +5)

Of course, as you create trees, you will have to make them get back to the main flow of the story.
So, in your labeled code, you can have all 3 branches *goto next (for example, assuming “next” is the label you want to go to that continues the main story)

Does this help?

1 Like

From my point of view best help will be to open script of some of the best games out there and look into it. Helped me big time when i was learning how choicescript working.

I know Choicescript is made to be beginner friendly but I found HTML easier to understand.

1 Like

Well, I think that’s because HTML coding is more flexible, while ChoiceScript is more strict in rules.
i.e. no code-in-brackets-tag <> <>

Well this is how I learned coding
Hope it helps

https://forum.choiceofgames.com/t/how-to-see-other-games-code

1 Like

Yes! Thank you! That is very informative, and pretty simple to follow!

1 Like