Help with coding


#1

I am currently working on my first story and am having trouble with a few things.

  1. How do you add multiple stat sections on the stats screen?

  2. How do you add name, wealth, and age to the stats screen after one has been chosen?

if you could help that would be appreciated.


#2

You can just have as many *stat_charts as you want.

I often find it easier to look at examples. Have a look at how Choice of Vampire does things. Compare it with the stats you see while playing the game.
https://www.choiceofgames.com/vampire/scenes/choicescript_stats.txt

You can do

Name: {name} Age: {age}
Wealth: ${wealth}

outside of a startchart.


#3

thanks, appreciate the help, got it figured out :). Just one more question. For some reason the startup scene won’t jump to the next scene once I put *finish


#4

Do you have your next scene in the scene_list?

*scene_list
     startup
     nextscene

I would suggest against copying my coding, as the tabbing is off. :sweat_smile:


#5
*scene_list
  startup
  chapter1
  chapter2
  chapter3
  chapter4
  chapter5

yes it looks like this


#6

How to format your code so it can be seen on the forum.

Paste code into window.
Highlight all of the code.
Click the preformatted text button. (It looks like </> and is next to the quote one and on the same bar as the other formatting and smilies choice.)
Click reply.


#7

Does using *goto_scene instead of finish work?


#8
*choice
  #Kingdom name
        *input_text kingdom
        
        *page_break
        Great. Now which creature are you?
    *choice
      #lion (+5 strength, +5 combat, +5 leadership, Intimidation +5).
        A lion. You will have long sharp teeth, a golden main and sharp claws.
        *set creature "Lion"
        *set strength +5
        *set combat +5
        *set leadership +5
        *set intimidation +5
        *goto action
        *goto_scene chapter1

this is what it looks like. and yes iv’e tried that but doesnt work


#9

Perhaps it’s because the *goto is nested under a *choice?

Try putting the *goto_scene chapter1 on its own line.


#10
*choice
  #Kingdom name
        *input_text kingdom
        
        *page_break
        Great. Now which creature are you?
    *choice
      #lion (+5 strength, +5 combat, +5 leadership, Intimidation +5).
        A lion. You will have long sharp teeth, a golden main and sharp claws.
        *set creature "Lion"
        *set strength +5
        *set combat +5
        *set leadership +5
        *set intimidation +5
        *goto action
        *goto_scene chapter1

when i have it like that this is the error i get


#11

So what’s happening is that you’re trying to go to a label that you don’t have in the file. Make sure you have a line “*label action”.
Or were you trying to go to the label action in chapter 1?

Edit: And usually you wouldn’t need both *goto and *goto_scene in one choice. If you’re done with the file, then you should use *finish, but if you plan to come back, you should use *goto_scene. And if you’re staying within the file, you use *goto


#12

thanks that worked! :slight_smile: appreciate your time. and the others that helped as well :slight_smile: