So, a bit of background. I’m really very new to choicescript, I only just started using it a few days ago. I was working on the stats screen and wanted to see how everything was coming along, so I started up my game in Firefox. The main game screen is working just fine, but errors kept popping up when I attempted to open the stats screen. Now it’ll open but it won’t show my stats, it just shows the original, filler stats. If someone could give me some insight on what I’m doing wrong, that would be much appreciated.
Ok, I got this to work on mine.
In order to create bold lettering in ChoiceScript, you do a [ b ] TEXT [ /b ]
But you don't have any spaces, so you'll write it as [b]TEXT[/b]
In your **startup.txt** you will want to add this:
*create name "name"
*create gender "gender"
*create Valor 50
*create Self_Preservation 50
*create Strength 0
*create Leadership 50
*create Cowardice 50
*create Superstitious 50
*create Realistic 50
*create Charisma 50
*create Bluntness 50
*create Honesty 0
*create Ansy 0
*create Forrest 0
*create Isabella 0
*create Christopher 0
In your **choicescript_stats.txt** you will want to add this:
[b]Stats[/b]
[b]Character[/b]
*line_break
${name}
*line_break
${gender}
[b]Virtues[/b]
*line_break
*stat_chart
opposed_pair Valor
Self_Preservation
percent Strength
opposed_pair Leadership
Cowardice
opposed_pair Superstitious
Realistic
opposed_pair Charisma
Bluntness
percent Honesty
*line_break
[b]Relationships[/b]
*line_break
*stat_chart
percent Ansy
percent Forrest
percent Isabella
percent Christopher
This is incorrect. An opposed pair is not two different stats. An opposed pair is one stat that displays under two names. *create valor 50 is enough, *create self_preservation 50 isn’t needed. Also note; if Valor and Self_Preservation are opposed, if one is 0 the other must be 100. They cannot both be 0 (unless they’re not opposed.)
That aside, what you suggest for the choicescript_stats file will work. It could also look like this:
[b]Character[/b]
*stat_chart
text Name
text Gender
*line_break
[b]Virtues[/b]
*stat_chart
opposed_pair Valor
Self Preservation
opposed_pair Leadership
Cowardice
opposed_pair Superstitious
Realistic
opposed_pair Charisma
Bluntness
percent Strength
percent Honesty
*line_break
[b]Relationships[/b]
*stat_chart
percent Ansy
percent Forrest
percent Isabella
percent Christopher
Unfortunately, the new version is still creating extra variables that won’t be used. If you still have the sample startup.txt you built for testing, try replacing that column of *create commands with the following one, then re-test it. Don’t make any changes to your choicescript_stats.txt file, though!
Just edit the startup.txt a little, then see what happens without the extra variables.
If you’ve already deleted the startup.txt and choicescript_stats.txt you used for testing, it’s fine. You don’t need to write them all over again for this! Just know that an opposed_pair actually uses one variable, and “creates” the second purely for the sake of the player viewing the stats page. The “second variable” doesn’t actually exist as far as the rest of the game is concerned.
Let’s say we had an opposed pair of Left and Right…
and I only created the variable Left…
then if I wanted to increase or decrease Right…
would I actually be doing math with Left?
That’s exactly correct. You’ll only ever need to worry about the math for one, never both!
If you’re starting with *create left 50, then an opposed pair stat chart will display 50% left and 50% right. Using a *set command to adjust left — for example, *set left +10 — will adjust both sides of the start chart, causing it to read 60% left and 40% right.
Are you sure you saved the text files and reloaded the browser once you made changes?
I know it sounds obvious, but you’d be surprised how many times that fixed issues I was having with the stat screen…
Possibly. I for sure reloaded the browser, but could you by chance tell me how to save? I think I did, but I’m really kind of terrible with computers. Also, if it helps, I’m on a Mac.
Ah, I haven’t really used mac, but… Which word-processor are you writing in? Like, Notepad++, the choice script writer…? You can probably use the control+S command once you click in your word processor to make it the active window…
Looks pretty good…See how that stat_chart is still visible? If you put character on a line below, the stat_chart command will be invisible to the player…