Questions about creating a text adventure story

Discussion in 'CHYOA General' started by porneia, Sep 15, 2016.

  1. porneia

    porneia Really Experienced

    I have always wanted to create a chyoa story that is a text based adventure game. To this end I have been reading up on conditional branches and immersion variables in the "Chyoa Guide" post, but have several questions.

    1) Is there any information about how the game/score function works for stories? I didn't see anything in the Chyoa Guide section.

    2) Is it possible to set a numerical value to a variable and then use it for conditional branches?
    For example:
    * The reader chooses to have the story's protagonist wear a bikini.
    * This assigns the variable "C" to "1".
    * Later in the story a npc will react to what the protagonist is wearing.
    * If C=0 then goto the non-bikini thread.
    * If C=1 then goto the bikini thread.

    3) Is there away to test publish a story so that only the author can see it, to make sure all the threads are working, before it is published for the community?

    Thank you for any assistance.
     
  2. dingsdongs

    dingsdongs Really Really Experienced

    Hello.

    There are currently two guides available in the chyoa guides section that should help to get you started.

    One about the immersion variables that a reader can set at the beginning of a story, and how to reference and work with them: https://chyoa.com/chapter/Immersion-Variables.260239

    And the other about "Conditional Branches - If-Statements", where you work with variables that you set durung the story: https://chyoa.com/chapter/Conditional-Branches---If-Statements.256046

    You can add or change variables at every chapter in edit mode by ticking the checkbox "changes to the score." For example you could set the variable"bikini" to true in your example, when the reader choses the option with the bikini. The "changes to the score", i.e. the changes to the variables take effect when the reader chooses to enter that chapter.

    You can reference the variable with if-statements as explained in the guide, or allow certain chapters to be only entered on your set conditions.

    Regarding the testing, you can start the game mode yourself, even if the story isn't published yet.

    Greetings
     
    Last edited: Sep 15, 2016
    porneia and gene.sis like this.
  3. gene.sis

    gene.sis CHYOA Guru

    Just want to add one thing about 2)
    In some cases, you could also combine the "non-bikini-thread" with the "bikini-thread" and use if-statements to decide the outcome of that thread.
    {if C = 0}non-bikini part{else}bikini part{endif}
    If both options should lead to different score changes, you should use conditions instead.
     
    porneia likes this.
  4. porneia

    porneia Really Experienced

    Dings & Gene, thank you for the replies. I have been reading through the threads on the Chyoa Guide and still don't fully understand the programing language with regards to conditional branches and immersion variables, but that will come with time.

    What I don't get is how the game/score function thing works. I don't see that described in any of the guide.
     
  5. gene.sis

    gene.sis CHYOA Guru

    There are still some things, which are not documented yet. I'm still working on some pages for the CHYOA guide.

    To use conditional branches, the option "Chapters can have conditions" has to be activated. This is a story option. You can choose it while creating a story or by editing the story.
    This will unlock the chapter options "Conditions to view this chapter" and "Changes to the score".

    With "Changes to the score" you can create and change variables ("plus", "minus" and "set", depending on the variable type). There are 3 types of variables: numerical (-100000 to +100000), progress (0 to 100) and boolean (true or false).

    With "Conditions to view this chapter" you can control, which chapter a user can access (it depends on his current score).

    If you created variables this way, you can also use them inside chapters (like described in "Conditional Branches - If-Statements")


    I still working on some chapters for the guide to give more information about Conditional Branches.
     
    porneia likes this.
  6. porneia

    porneia Really Experienced

    Gene, thank you again for the reply, and all the labors for this site.

    Do you know of any current chyoa story that actively uses the Conditional Branches/Game/Score function? All the ones I have tried by selecting"start game" or "end game" nothing really happens. I learn best by looking at examples.
     
  7. Javalar

    Javalar Really Experienced

    You can try my two stories: "Happy Maid" uses game/score function, although the implication of the points you gather is not too obvious in the earlier part. But the part about the bolean values ("inventory" and people you've met) should be quite clear.
    My new story "The invitation" will use stuff like "action points" which force you to choose x options out of y. Problem with this story is that it's still rather new and short. There is also one point where I used conditional text, but its a rather short passage, so readers might not even notice it. I also plan to make more use of this in connection to how the husband/wife are dressed. In my opinion the conditional if-Texts make most sense if they concern tiny bits of immersion. If you want to change a whole chapter, better make that a new chapter.

    On a different note, I have no clue why so many people tend to add the "game" feature without adding any gaming value at all. Maybe they don't understand what it's about? If I add conditions, I certainly want to have a plan on how to use them!
     
    porneia and Zingiber like this.
  8. Javalar

    Javalar Really Experienced

    To be precise: On the way to the party, the first paragraph reads slightly different if your wife is naked. And while telling the three business men in the atrium that you love your wife, the last paragraph reads slightly different if your wife is dressed as dominatrix. Just checked it again if it works, and it does, hooray.
     
    porneia likes this.
  9. porneia

    porneia Really Experienced

    Javalar, thank you very much! I am at work at the moment, but I plan to look over your stories as a guide this weekend.
     
  10. porneia

    porneia Really Experienced

    Javalar,

    Wow, I have been reading over your stories and they are very impressive. Unfortunately, I now have tons of questions! Let me try to condense them, if you have the time for the reply.

    1) Is it easy to control the display readout in the game window? I haven't found any instructions on that.

    2) Can you generate random numbers for variables? I hope so, that would be an amazing function that would allow the addition of gaming aspects to stories.

    3) Is there a way to create a story and not publish it immediately? I would love to play around with these new functions for a bit before making the story available to the community.

    Thank you again.
     
  11. dingsdongs

    dingsdongs Really Really Experienced

    1 ) Not sure what you mean. Perhaps you could clarify?

    2) Sadly that is not possible atm. As far as i can tell, the variables and conditons are a relatively new feature on this side. You can already do a lot with them, but the system could use some improvements.
    The site administration seems always open to suggestions. Though i assume it would help to have a few more stories to utilize the current capabilities, to showcase examples of which inprovements could help the most.

    3) Yes, you can easily save a story and as many chapters as you want "as draft". That way only you will see it, and can continue working on it until it is ready. You can then later publish it.
    Try it out :)
     
    porneia likes this.
  12. porneia

    porneia Really Experienced

    Dings, thank you.

    I can figure out question #1 through #3, so I am good with that.

    Are the command scripts used in chyoa unique to its program, or are they part of general computer language? If the latter, do you know the name of the language? (Ex: some form of html script?)
     
  13. porneia

    porneia Really Experienced

    Wow, I really like the new scripting ability. Props to Chyoa!

    I now have so many questions . . .

    The biggest one is this: Can ifthen statements not only control texts within a chapter but also the choice of answers?

    For example, in a story the protagonist decides to gamble and has the variable "Gold Coins" determining how much money she has. In a following chapter she loses a hand and with it 10 Gold Coins. Could the Follow-up Question be based on the amount of Gold Coins she now has? So if she has more than zero coins there is the option "continue to gamble" is zero or less that option is not available.

    Thank you again to everyone for their support and kindness.
     
  14. dingsdongs

    dingsdongs Really Really Experienced

    Your desired result should be possible.

    You would need to create two follow up chapters. The first "continue to gamble", and the second "stop gambling"

    At "continue to gamble", you tick the checkbox "Conditions to view this chapter" and insert the variable ("Add a new condition:" 00) "Gold Coins > 0"

    Now the player can only choose to enter this chapter "continue to gamble", if he has some coins left. You could also create a loop, to link back to the chapter where the gambling takes place, so that you don't have to write it several times.
    The second option "stop gambling" could be made available regardless of any conditions, so that the player can freely chose to stop gambling, for example because he likes to keep his winnings.

    You could also create a third chapter, "game over", where you check for the condition of "Gold Coins = 0", while at the "stop gambling" chapter you set "Gold Coins > 1" as a condition to view it.
    That way you could create a bad ending if the player gambles away all his money.
     
    gene.sis, porneia and Javalar like this.
  15. Javalar

    Javalar Really Experienced

    There's one problem with coins that might occur, though: in my Happy Maid story, I was surprised to find that 00-varibles can go down to negative numbers ("Antagonising Dave" is a case in point, readers who just follow the husband's wishes end up with a negative number there). I don't see any way to stop this yet. Or is there?
     
    porneia likes this.
  16. porneia

    porneia Really Experienced

    Thanks again Dings & Javalar. I truth I am not fully following you, but let me play around with it in my draft story.
     
  17. porneia

    porneia Really Experienced

    Another question . . . Can you link to another thread, but take the current thread's variables with it, instead of also adding the original default variables?

    For example . . .

    Thread #1 is a character creation chapter in which the reader chooses to add +1 to one of their abilities; lets say strength, intelligence or charisma. After their choice the story begins. So the story map would look something like this:

    1.1 = Character Creation Introduction
    ....2.1 = Strength +1
    ........3.1 = The Story Begins
    ....2.2 = Intelligence +1
    ........3.2 = Link to 3.1???
    ....2.3 = Charisma +1
    ........3.3 = Link to 3.1???

    If the reader chooses "Intelligence +1" and I link it back to 3.1 then both Strength AND Intelligence are increased by +1. Is there a way to link from "Intelligence +1" to the "The Story Begins" without it also adding +1 to Strength? Or do I have to create three "The Story Begins" and put in triplicate any new chapter? (Which would be terrible.)

    Or, could I put "The Story Begins" as 2.4, but set conditions to make it appear only after a choice is made?

    Thank you.
     
  18. dingsdongs

    dingsdongs Really Really Experienced

    I will quickly write a small showcase to take screenshots from.
     
  19. dingsdongs

    dingsdongs Really Really Experienced

    [​IMG]

    In the introduction is set:
    [​IMG]

    And on the +1 Attribute Options is set:

    [​IMG]


    The changes to the score, i.e. the changes to the variables, always take effect, when the reader opens a link to a chapter.
    If you create a loop, the changes can effect several times, if the reader chooses that chapter again.

    I submitted the showcase to be published, but it is currently in review. I do not know how long that usually takes ;-)

    But on the first screen you can see that all the attributes options link back to the "2.1 Begin Character Creation" Chapter. Now when you link back to a chapter, you should make sure that there are no "Score changes", i.e. variable changes in that chapter itself, or it could get messy. (unless you deliberately want those changes to happen). That is why i did set the initial settings on the first chapter, and began char creation only in the 2nd.

    So in this example, in chapter "2.1 Begin Character Creation" no conditions / variables are set at all. These things happen in the other chapters.
     
    Last edited: Sep 19, 2016
    porneia and gene.sis like this.
  20. gene.sis

    gene.sis CHYOA Guru

    there is currently no "debug mode" for authors and editors

    This isn't possible at the moment. I would like to have this for my own story, which seems abandoned at the moment.

    The "Conditional Branches - If-Statements" are implemented in js (javascript). It is a kind of text replacement (not real parsing).

    You can't use if-statements to manipulate the chapter answers.

    This is possible like dingsdongs stated.

    numerical Variables can have a value from -100,000 to 100,000

    You should be able to solve this with conditions. (If 13 coins are necessary for another wish, create a condition coins > 12)

    If the loop destination only use "+" and "-" it can be a workaround to manipulate the variable from the loop origin (+2(destination) -2(origin)). This may not work near the variable minimum and maximum (0 to 100 for progress variables and 100,000 to 100,000 for numerical variables)
     
    Last edited: Sep 19, 2016
    porneia likes this.