Two questions about labels (in Chronicler)


#1

So looking through the Chronicler wiki, I’m still not sure if I can use labels within the choicescript_stats file or how that’d work. Also, I’m thinking of trying to make a kind of unlockable text. Like ‘ok, you’re at this point, that unlocks a bit of history or whatever if you want to know more about stuff from this scene’. I get that it would probably also be related to labels, though I’m not sure how I’d make it only visible once you’ve reached that point. Any suggestions?


#2

I’d like to start by pointing out that I use Notepad++ instead of Chronicler, so while I know it can be done, and how I would do it, your process in Chronicler might be a little different than mine in Notepad++. That aside…

Yes, it’s possible to use labels within your choicescript_stats.txt file. They work the same way there as they do elsewhere. When a piece of text or code is named by a *label, the game can use *goto and *gosub commands to jump directly to that piece of text or code.

As for unlockable text, the easiest way is probably to create variables to track if the main character has unlocked it yet, or left it undiscovered. Then you can use simple *if commands to hide or display the secret text in your choicescript_stats.txt file.

I made a very simple example of how a choicescript_stats.txt could be arranged using both labels and secret text. Click this to display it.
*label stats
*comment Stat charts for character stats and skills go here.
*choice
  #View relationships.
    *goto relationships
  #View setting history.
    *goto history
  #View trivia.
    *goto trivia

*label relationships
*comment Stat charts for inter-character relationships go here.
*choice
  #View stats and skills.
    *goto stats
  #View setting history.
    *goto history
  #View trivia.
    *goto trivia

*label history
*comment General setting history the main character should already know goes here.
*choice
  #View stats and skills.
    *goto stats
  #View relationships.
    *goto relationships
  #View trivia.
    *goto trivia

*label trivia
*comment Text hidden under if commands can be revealed when the variables are set during gameplay.
*if (secret)
  *comment Text here will appear if the variable is true, and be hidden otherwise.
*choice
  #View stats and skills.
    *goto stats
  #View relationships.
    *goto relationships
  #View setting history.
    *goto history

There are other ways to get the same results, but this might give you some useful ideas to get started.

Let us know how it goes - while I may not be experienced with Chronicler, others are, and can help you if you have difficulties specific to it.


#3

You might want to edit your title and add ‘and Chronicler’ so people who use Chronicler can help you. You could also ask the question in the Chronicler thread.

As for unlockable text, you can use booleans, like so:

(This part would be in your scene text)

*create clock_knowledge false

You decide to read a book from the library.
*fake_choice
    #I pick an exciting story about swashbucklers!
        There are lots of swords and hats with feathers.
    #I pick an encyclopaedia of clocks.
        *set clock_knowledge true
        You discover interest facts about pendulum clocks, water clocks, sundials, and the word 'wabe'.

(This is what you could put in your stat screen)


*if (clock_knowledge)
    All the relevant knowledge about clocks is here!

Edit: Ninja’d by @Minnow but I’ll leave the example here in case having a second sample is useful.


#4

@OP, I’ve changed the title with (in chronicler) as @Fiogan suggested.


#5

Sorry I’m late to the party. Anything that can be done in ChoiceScript can be done in Chronicler. (don’t quote me on that ;))

In the case of the choicescript_stats scene, it is simply accomplished right now by creating a scene with that name and adding a code bubble to write your stats code in.
Chronicler 2.0 will have much better support for this.

In essence, this is not anything specific to Chronicler. So you are free to copy/pasta any stats code you need.


#6

I’ve been trying to follow your suggestions (thank you by the way), but for
some reason, both of the
things that you are supposed to unlock are already visible at the
beginning, and I can’t seem to
figure out how to rectify it.


#7

Can you copy-paste the relevant code? And are you initially setting the variable (in the case of my example, {clock_knowledge}) as false?


#8

Yes, they’re supposed to be originally false, and then when you make the
decision about your side, you unlock
the relevant history of your royal (which I’ll add later), adding some
interest and replay value, but instead both
choices appear from the outset. Anyway, here you are.

From startup.txt

*create Aboutthequeen false
*create Abouttheking false

From scene1.txt

You are
*goto bubble_188978552

*label bubble_188978552
*choice
#A Star-guided servant of Her MaJesty
*goto Efryan

#A champion of His Royal Highness' Knights
    *goto Askadian

*label Efryan
*set Side 1

*set Aboutthequeen true

*label Askadian
*set Side 2

*set Abouttheking true

From choicescript_stats.txt

#The Book of Lore - History
Would you like to learn more about

    The Two Nations
    The Night of Blood and Steel

    *if Aboutthequeen = true
        Her Majesty
    *if Abouttheking = true
        His Royal Highness
    *choice
        #The Two Nations
            placeholder text
            *finish

        #The Night of Blood and Steel
            placeholder text

            *finish

        #Her Majesty
            placeholder text

            *finish

        #His Royal Highness
            placeholder text
            *finish

#9

I’m not sure if this will help, but maybe try using parenthesis?

*if (Aboutthequeen)
    Her Majesty
*if (Abouttheking)
    His Royal Highness

You don’t need the = true in this context, although I think that would work too as long as you had parentheses around all of it, like so:

*if (Aboutthequeen = true).

Also, you need to redirect between the Efryan and Askadian labels. If you go to Efryan, it will continue on down through the text and set both Aboutthequeen and Abouttheking to be true, according to the sample you pasted above. You could try something like:


*label Efryan
*set Side 1

*set Aboutthequeen true
*goto movingon
*label Askadian
*set Side 2

*set Abouttheking true
*label movingon

#10

I do have gotos to bubbles where I have you continue on making related
choices, though I’m not sure that counts.

To give an example bit:

Under Efryan
Welcome to the Order of the Star, sworn to the service of Her Majesty…
What you have found especially to your liking so far has been

*goto bubble_188983960 (choice bubble - do you like the gold, the honor etc)

There’s a pretty similar bit under Askadian.

Maybe I should add something else first?


#11

When you copy code, if you use four graves (this character: ` ) above and below your paragraphs of code, or highlight the code when you’re on the forum and then click the </> button, the forum will preserve your code spacing for you. That makes it a lot easier to see what’s happening.

Without seeing all of the relevant code in question from a .txt file, I’m having trouble parsing what might actually be wrong. Maybe consult @BenSeawalker, or ask for help on the Chronicler thread? I don’t use Chronicler so I’m not sure exactly what the expected code behaviour would be. Sorry I can’t be of more assistance!


#12

OK, I figured something out. It’s actually working to some extent. When it
is asking in the Choicescript what you want
to know more about in History, it does only show the Queen or King once
you’ve picked the side. I just need it to
follow through when you actually choose. Then all the options are shown,
where I just want the relevant one to show.


#13

Update: got it working, by making it so you get base menu if you haven’t
chosen, while if you have
then it jumps to a label that reproduces the base menu with the addition of
your royal. It was surprisingly
easy once I worked out the usual space-tab problems. Thank you all for your
help.