Awesome! Great work.
Using could have varying effects: http://www.sightspecific.com/~mosh/www_faq/nbsp.html (for e.g. some browsers might collapse many into one). It does seem to be working for me though (on both a Mac & PC).
I would like to suggest <pre></pre> tags instead (for preformatted text), this would ensure any wrapped text retains indentation/whitespace.
But implementing pre would be difficult as CS parses line by line, not token by token.
To that end I’d be surprised if your [indent] div works properly, does it?
As for your big block of url replacements, have you done that so you can set target="_blank"?
An easier way would be to use the *link command as normal and just add this line to the printLink function in ui.js (unless you’re also needing none “_blank” links?):
function printLink(target, href, anchorText, onclick) {
if (!target) target = document.getElementById('text');
var link = document.createElement("a");
link.setAttribute("href", href);
link.setAttribute("target", "_blank"); //ADD THIS LINE
link.appendChild(document.createTextNode(anchorText));
if (onclick) {
if (link.addEventListener) {
link.addEventListener("click", onclick, true);
} else {
link.onclick = onclick;
}
}
target.appendChild(link);
target.appendChild(document.createTextNode(" "));
}
Yea, I know it’s not a standard space, the problem is that it’s not forcing indentation simply to force indentation. I actually can use styling for the same effect, but it doesn’t allow copy/pasting, which is why I switched to it over just styling.
As for But I can force line breaks with a [br], all I have to do to is keep all the * code on the same line. That should be more universal, and I don’t know why I didn’t think of it before. (I typed line_breaks three times there before I got it right lol).<pre>, it has this problem for inserting whitespace between every line even without any line_breaks. It’s possible I’m doing it wrong, but it looks like there’s…
As for inserting div through printx, it actually works fairly well I think (although it may break something in the background I’m not aware of, 'cause I’m basically a monkey in a room with a typewriter at this point). The only real problem is it seems to insert an extra line break, so I’ve gotta be careful about the lines I am getting rid of it either way though, as [pre] serves the styling’s only real purpose of offsetting any actual code (by changing the font).
As for the url replacement, a tiny part of it was to set target _blank, but also I also wanted the urls to not actually appear in the text (which is the main reason I’m doing it this way, rather than the way you first gave me). Part of the design I’m going for is to pare down anything that’s even remotely intimidating until you can basically hand this to anyone and they should be able to figure things out without any further prompting. Addresses and things that actually refer to the structure of computers/the internet seems to intimidate people. Over/Underestimating things, IDK, but it’s what came across as best to me.
Okay. updated the styling to make use of <pre>. Hopefully it’s superior on the user end, 'cause it’s a little bit of a mess on mine. (Every block of code has to be on a single line.) There’s a couple of bits I have to review, as a code block followed by a *choice leaves far too much whitespace, and makes the whole format look ugly, but other than that this is most likely close to the final format I’ll be using.
Again, only thing I can test on is Win8, but I’m fairly sure that, at the very worst, everything should still appear very clean, just with reduced margins.
Thank you for this handy guide. Are you still working on it? If so, there are a few typos I’ve spotted. As a newbie, it would also be helpful to have an option to view what the sample code should look like in its entirety at certain points for those trying to follow along.
There is still actually on my todo (although I might have to go back over and revamp it again since it’s been so long), but I’m currently juggling a few things and keep getting sidetracked.
Thank you so much for this guide, it has helped me a lot. I am new here and your guide has done so much to get me started.
Unzipping was not an issue for me and the guide seemed clear.
I did not find the colors confusing; I found them to be very helpful.
I just wanted to drop a line to say thank you!
6 posts were split to a new topic: Trouble Using *Set
@RETowers thank alot u have been soo helpful I’m currently trying to do it on my tablet I’m on the step for hello world piece. So I go to check if it works on Firefox and it says file start.up.txt
What do you mean by ‘it says’. There are a lot of ‘its’ involved in writing a CS game. Can you take a screenshot/copy past your code and the exact error?
Can you host this over on Dashingdon or somewhere else? It no longer works thanks to dropbox’s changes.
Incidentally
I already know how to use ChoiceScript, I just need some tips, or am looking for solutions to common problems.
Could you add something about how to do encyclopedia/lore/multiple stat screens? I think we’ve had a few people asking about that in the last week.
Regarding hosting it, I’m looking. I was going to drop it on my webs site, but apparently that’s not longer an option. (There’s a couple more considerations I have to take into account w/r/t hosting.) Regarding writing more, that’s actually somewhere on the ToDo list, but that list is kinda long at the moment.
I I read your guide and thought that there should be some alterations like
About hosting you can say that - you can either compile your files or host them as txt and change the hosting recommendation from Dropbox to dashingdon ( due to problems with using Dropbox )
The advanced commands like modulo aren’t explained
hi everyone! I am new to the choice script program and i downloaded firefox to download the program, but it wont load on firefox. please help me and show me the steps, id really appreciate it. I wish to write gamebooks and need assistance. thank you!
Consult the guide at the top of this thread. It will walk you through much of what you need to know.
Awesome! It really helps! Thank you for this @RETowers 
