# ChoiceScriptDev Wikia

**URL:** <https://forum.choiceofgames.com/t/choicescriptdev-wikia/764>\
**Category:** ChoiceScript Help\
**Created:** [September 21, 2012, 6:21pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764 "2012-09-21T18:21:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [September 21, 2012, 6:21pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/1 "2012-09-21T18:21:42Z")

</div>

**Introduction:**  
While browsing this forum in the “ChoiceScript Help” section, I’ve noticed a thread, made in 2011, that was about a wiki:

> **[Developer Wiki](https://forum.choiceofgames.com/t/53)**
>
> This has been brought up before in the Google group: why not let the community maintain the Choice Script documentation in a developer’s wiki? The official documentation is woefully incomplete and out of date, which is understandable since...

  
I said to myself, why shouldn’t I do one? Since people were talking about one since 2011, there surely wasn’t anyone developing one currently. So, I requested help from Vendetta with the wiki, and we both started editing it. Every day, we added pages, edited the current ones to make them more comprehensive… After that, CJW and JimD joined our Admin Staff; CJW being experienced in JavaScript/CS and JimD with ChoiceScript (you surely know him…Zombie Exodus).

**Link:**

> **[ChoiceScript Wiki](https://choicescriptdev.fandom.com/wiki/ChoiceScript_Wiki)**
>
> Welcome to the ChoiceScript Wiki The wiki about ChoiceScript, a simple scripting language developed by Adam Strong-Morse and Dan Fabulich of Choice of Games LLC for writing text-based, multiple-choice games. This Wiki is a ChoiceScript Game...

**Explanation:**  
This wiki was done with the purpose of being an easy way for beginners to learn ChoiceScript, or even for advanced ChoiceScript users that just need some clarifications on certain subjects. It has comprehensive description for each basic command of CS, and some clarifications and explanations on other subjects.

Always remember; any suggestions, corrections and/or questions about the wiki are going here, on this thread; the wiki doesn’t have its own forum, and we, the admin staff, don’t think that it actually needs one. Please, also feel free to post comments on the wiki’s individual pages.

This is still a work in progress; more pages will be added as time passes. If you think that there is anything the wiki is lacking, feel free to tell us here on the forum discussion! We’re always open to suggestions.

---

<div class="post-metadata">

**Author:** ![Pace675](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/pace675/32/10543_2.png) [@Pace675](https://forum.choiceofgames.com/u/Pace675)\
**Post date:** [September 21, 2012, 6:28pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/2 "2012-09-21T18:28:59Z")

</div>

First and foremost thank you good sir for this.

---

<div class="post-metadata">

**Author:** ![CS\_Closet](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cs_closet/32/684_2.png) [@CS\_Closet](https://forum.choiceofgames.com/u/CS_Closet)\
**Post date:** [September 21, 2012, 7:26pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/3 "2012-09-21T19:26:51Z")

</div>

@AlexCosarca @Vendetta @CJW @JimD

Thank you all for putting forth the effort to do this. It’s an extremely helpful (and long overdue) contribution to the community. I know a lot of people will benefit greatly from this.

---

<div class="post-metadata">

**Author:** ![Antitorpiliko](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/antitorpiliko/32/761_2.png) [@Antitorpiliko](https://forum.choiceofgames.com/u/Antitorpiliko)\
**Post date:** [September 21, 2012, 7:31pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/4 "2012-09-21T19:31:00Z")

</div>

YAY!!!

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [September 22, 2012, 7:20am UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/5 "2012-09-22T07:20:43Z")

</div>

A new person joined the admin team: @Reaperoa !

---

<div class="post-metadata">

**Author:** ![bawpie](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bawpie/32/343_2.png) [@bawpie](https://forum.choiceofgames.com/u/bawpie)\
**Post date:** [September 22, 2012, 7:39am UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/6 "2012-09-22T07:39:51Z")

</div>

Brilliant stuff, your entry on handling the if statement alone is excellent - I was struggling this morning to figure out not equal to (I was typing \<\> rather than !=). In the end I discovered the \*if not command on the old choicescript google group. I shall be bookmarking this and making use of it, many thanks to all involved!

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [September 22, 2012, 9:01am UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/7 "2012-09-22T09:01:29Z")

</div>

It would be great if we could get this stuck/made an announcement.

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [September 22, 2012, 9:26am UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/8 "2012-09-22T09:26:35Z")

</div>

It would be indeed, although I don’t think it will.

---

<div class="post-metadata">

**Author:** ![FcA](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fca/32/432_2.png) [@FcA](https://forum.choiceofgames.com/u/FcA)\
**Post date:** [September 22, 2012, 3:17pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/9 "2012-09-22T15:17:00Z")

</div>

Props, guys. I also love the gray background, makes it easy on the eyes to look at. Well my eyes in this case. Thanks muchly.

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [September 22, 2012, 5:15pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/10 "2012-09-22T17:15:57Z")

</div>

@FcA, Those were our thoughts when we changed the default white background of the wiki to dark grey ^^

---

<div class="post-metadata">

**Author:** ![Nocturnal\_Stillness](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nocturnal_stillness/32/100414_2.png) [@Nocturnal\_Stillness](https://forum.choiceofgames.com/u/Nocturnal_Stillness)\
**Post date:** [September 22, 2012, 6:16pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/11 "2012-09-22T18:16:16Z")

</div>

@AlexCosarca

is italics and bold tied to a specific version of choicescript as it doesn’t work in my version.

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [September 22, 2012, 6:44pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/12 "2012-09-22T18:44:49Z")

</div>

I think that the release on 26th of March had it (and again, I’m not sure; I started my game on 29th of July and Bold&Italics worked fine).

---

<div class="post-metadata">

**Author:** ![Nocturnal\_Stillness](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nocturnal_stillness/32/100414_2.png) [@Nocturnal\_Stillness](https://forum.choiceofgames.com/u/Nocturnal_Stillness)\
**Post date:** [September 22, 2012, 7:04pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/13 "2012-09-22T19:04:18Z")

</div>

I’ll download the current version and test it out as I can’t remember when I downloaded the version I have at the moment.

---

<div class="post-metadata">

**Author:** ![bawpie](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bawpie/32/343_2.png) [@bawpie](https://forum.choiceofgames.com/u/bawpie)\
**Post date:** [September 23, 2012, 4:20am UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/14 "2012-09-23T04:20:06Z")

</div>

Re the entry on \*fake\_choice - I believe that the \*set command can be used directly after a \*fake\_choice decision, as can a \*goto scene label. I don’t think another \*fake\_choice can be used after a \*fake\_choice though. I don’t know if this is dependant on the version of choicescript being used, but my current wip uses quite a few \*fake\_choice that have \*set and \*goto that follow it.

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [September 23, 2012, 5:15am UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/15 "2012-09-23T05:15:53Z")

</div>

But then, what’s the point of \*fake\_choice if \*set and \*goto are allowed? (I know they are allowed as I saw that in another WIP game’s code, but that’s not something that should be encouraged to be done) You could simply use \*choice for that, and a \*goto/\*label for each choice; inside of a \*fake\_choice using any commands but text isn’t recommended. Also, why did you use \*fake\_choice if you use commands inside it? (i.e. why didn’t you use \*choice instead) ^^

---

<div class="post-metadata">

**Author:** ![Vendetta](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/vendetta/32/533_2.png) [@Vendetta](https://forum.choiceofgames.com/u/Vendetta)\
**Post date:** [September 23, 2012, 5:17am UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/16 "2012-09-23T05:17:21Z")

</div>

@bawpie Intriguing! I’m guilty of taking the CoG tutorial on the subject too literally, i.e.

_“ **\*fake\_choice** : This convenience command behaves exactly like \*choice, but no commands are allowed in the body of the choice; thus no \*goto/\*finish is required.”_

. . . So I never investigated further. Given your own experience of using the command, however, I shall now investigate more closely and see just what else is actually possible with that command! Thanks for the tip. 🙂

---

<div class="post-metadata">

**Author:** ![bawpie](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bawpie/32/343_2.png) [@bawpie](https://forum.choiceofgames.com/u/bawpie)\
**Post date:** [September 23, 2012, 6:08am UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/17 "2012-09-23T06:08:46Z")

</div>

@AlexCorsica  
You can ‘fall’ out of a fake\_choice statement, whereas a choice statement won’t let you do this (each choice has to end with a go\_to).

So for example you can do this:

\*fake\_choice  
#1  
You smile.  
#2  
You frown.  
Continue.

You can’t do this with a \*choice with the latest build without it failing (though I think it’d pass an autotest).

There’s no reason to use fake\_choice if you want to use \*goto though - I just noticed I’d accidentally coded in a fake\_choice that did result in \*goto and it work though I’ll probably change it to a regular choice statement just in case.

As my story is fairly linear, a lot of the choices don’t result in a go\_to. I’m not sure what the fake\_choice can’t do - I think functionality has been added to it though as I’m fairly sure a while back it couldn’t set variables and I think I mentioned it on the google group as a shame.

I’ve whipped up a demonstration here: [https://dl.dropbox.com/u/11379019/COG/Test/web/mygame/index.html](https://dl.dropbox.com/u/11379019/COG/Test/web/mygame/index.html)

Test 4 fails as it should end in the ‘Fallout’ line but doesn’t. This is basically if you’ve coded a \*choice statement without ending it in a \*goto.

To me, it’s fairly essential that I’m able to use \*set following a \*fake\_choice - I want my game to remember any choices made, but I don’t always want that choice to actually branch the game (i.e. being forced into a \*goto).

@Vendetta  
I also followed the CoG documentation, but I think it’s very out of date now (which is why the wiki is a god send!). I did doubt what I was doing at first, but I’ve noticed other users have encountered it to, so thought it was worth bringing up.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [September 23, 2012, 4:55pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/18 "2012-09-23T16:55:19Z")

</div>

\*fake\_choice, as far as I know, is a carbon-copy of \*choice - There’s no difference. The idea behind it is that as you say, you don’t HAVE to use commands in a \*fake\_choice - because they’re only intended to be used when the player’s choice won’t affect the games progression.

The reason you DO have to use commands in a normal choice isn’t anything technical, it wouldn’t break if you somehow disabled the error message, it’s more of a warning saying “Hey you do realize this is a pretty pointless choice/answer right now, don’t you?”

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [September 23, 2012, 7:12pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/19 "2012-09-23T19:12:28Z")

</div>

\*fake\_choice originally could not handle anything other than text, and would report an error if there was anything. If it can now handle \*set or other commands, that is a change from earlier versions (whether or not it was intentional or not, I cannot say). \*fake\_choice was originally for cutting down the size of a \*choice which had no impact other than the immediate text, such as the number of legs choice in CoD.

---

<div class="post-metadata">

**Author:** ![FcA](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fca/32/432_2.png) [@FcA](https://forum.choiceofgames.com/u/FcA)\
**Post date:** [September 23, 2012, 11:20pm UTC](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764/20 "2012-09-23T23:20:31Z")

</div>

This becomes a fake choice thread…  
I think \*fake\_choice doesn’t allow \*if (condition) #yourchoicetext, and the same is likely for \*selectable\_if although I haven’t tested it. Yes, parameter setting like the \*set will go through with \*fake\_choice.

Re the \*choice _has_ to have commands following, I know that it demands for a \*goto as a minimum, whereas the fake will just carry on to whatever there is below. The way I see it now, \*fake\_choice isn’t really fake… it’s useful to keep the lines down if you’re not doing a huge branching out and/or some serious calculations going. In which case, the \*choice is useful.

[Next page](https://forum.choiceofgames.com/t/choicescriptdev-wikia/764.md?page=2)
