My name is Tatiana and I’m new to all this. I love CoG and have bought almost all of the games available. I’ve been flirting with the thought of creating a multiple choice game myself lately. So I’ve checked out a lot of posts on here, the wiki and so on.
Today I thought I’d give it a go. I couldn’t piece together what to write at all ! I wonder if there is a more extensive tutorial out there? (Or maybe I’m just a bit thickheaded).
I’ve never tried coding before and the things I’ve read were pretty general. I’ve tried doing various things, some worked, some didn’t. I wonder if there is something I could read up on or a kind soul who would look through my messy test draft.
I’m sorry if this is something you have heard noobs saying over and over again (not that I wouldn’t just love be annoying ) But I just couldn’t seem to find it anywhere in older posts and such.
Thank you both for the kind replies I’m really thankful that you’d take your time to help me.
Err… I’m not super familiar with dropbox… Sorry :s
One of my main problems is that the choicescript_stats.txt file won’t recognize my *create stats and *set stats… When I go to index and check the stat screen out it hasn’t changed at all !
I’ve tried the *create at the beginning of startup.txt and in the mygame.js file. I’ve tried rewriting choicescript_stats.txt too. Nothing happens… (I’m being ignored!) It’s just the same basic Strength and Leadership stats it came with.
Yes I refreshed a couple of times after making in a change. What I’ve tried to write in the my game.js file so far hasn’t really worked… How did you write it?
Right now I’ve added just a couple of things, (to see if it would make any changes to stats in index) so it looks like this:
Your stats
*stat_chart
____text name
____text gender
____percent Leadership
____opposed_pair good
________evil
____text Leadership
____text Strength
@Tatiana I’m not the best at explaining my awesome ways, so ill do the next best thing with the updated version I have(or what I assume is updated since the version I have is about a month old but you dont have to mess with the mygame.js) Ill show you. :3
I add all my stats into mygame.js using notepad ++. That way I do not have to mess with create anymore. And if placing code on the thread use < pre> < /pre> without the space at the bringing. This will keep your text spacing.
This a sample of code
using pre.
*choice
#format in tact
*goto end
Notepad++ comes highly recommended btw. It’s got a lot of features which help quite a bit. Things like line counts, multiple tabs and “find in all opened documents” become really useful when you’re looking through 15 000 lines of text.
@2Ton hey, so I’ve tried doing what you showed me (exactly), and there are no changes to be seen. It’s the same as it was before. I don’t know if the original stat screen is hiding somewhere, since it keeps displaying that one. It ignores my commands completely. (I also tried spacing it out less, that didn’t help either.)
In mygamr.js you add your variables between You can set them in three ways.
Example
[
*comment we can make it true or false
happy: true
*comment we can make it a string
,npc: “Marry”
*comment we can make it a variable
,cost: 10
]
So you then can use the variables you just added.
*if happy
*set happy false
So it cost ${NPC} 6 bucks.
*set cost -6
so ${NPC} has ${cost} left in the bank.
*goto somewhere
*else
*goto somewhere
So it would display the following if happy is true.
First it makes happy false then then it would print: So it cost Mary 6 bucks.
It then subtracks the money from cost
It then prints: So Mary has 4 bucks left in the bank.
Then you are sending it to another label. And since we made it false it will now only go to else if called again.
Hope that helps.
@Tatiana Awwww, thank you. Im jealous of your awesomeness right back :3 but I dont think you have the updated version then, because that should work. And LordIrish is trying to show you how to do the old version stats and the different types of stats, and also to show codes on the forum just add
< pre >
[insert your codes from your game]
</ pre>
just remove the spaces, then it should look something like this…
I don’t think there is an easy way to tell what version of choicescript someone has. The only way I can think of to do an estimate is to look at the date stamp of the files in your choicescript installation. If they’re older than April 26th or so when @dfabulich put up his announcement, the new method may not work.
If you do have a recent enough version of choicescript, I do feel that the newer method is simpler and more straightforward. There’s no need to futz around with a javascript file and its different syntax.