Questions Concerning Conditions and Branches

Discussion in 'Authors' Hangout' started by sexybjgal, Jul 1, 2019.

  1. sexybjgal

    sexybjgal Virgin

    So I am finally taking the plunge and making my first story into a game mode (https://chyoa.com/story/Fallout-New-Vegas.13391) . I tried to do a work around when I first started and the story tree is a huge mess I am untangling (also trying to make my writing better!). I had a few questions.

    Is there a limit on the number of Variables you can have? I am not trying to make things overly complicated by having tons of regular ones. But I do have some hidden ones that remove choices (or add them) which are only used for a segment or two of the story. Just making sure there isn't a limit. They are "Hidden" so they don't clog up the menu of the player of course.

    Also--can you have two conditions of the same thing?
    For instance I have a Combat variable and I want the chapter to be able to only be seen if they have a Combat score of between say 25 and 35. Do I just add two? Combat <36 and Combat>24?

    Any other tips for making games better? I really want to go in and add some If Statements but I would love more examples or will simply just take my time to finish the story then polish it up. Any feedback (or story ideas) from the story itself is also appreciated! I know I need to focus less on some of the mechanical parts of the erotic writing and add more emotive bits. Working to edit my early attempts at writing.
     
  2. gene.sis

    gene.sis CHYOA Guru

    Basically, there is no limit.

    Yes, you can use 2 conditions for the same variable. As all conditions have to be true, it works like an AND operator.

    If you want to check for all cases where the Combat variable is higher than 35 or lower than 26, you need to create a chapter with "Combat < 26" and one chapter with "Combat > 35," both leading to the same chapter. (At least one of them must be a linking chapter.)


    Well, that question is quite general.

    I think it really depends on what you want to achieve with Game mode.
    You can use it just to track decisions and use if statements only for small adjustments within the chapter text, or to build whole chapters with if statements.
    You can use a wide structure as you have now, or an almost linear structure.
    ...
    (I'd definitely think about your structure up front as some things might become difficult if your structure doesn't fit.)

    What kind of examples would you like to see?

    I'd recommend using Grammarly to catch typos. (Your introduction shows 12 typos, though I'd say that the suggestions of 2 aren't right/intended.)
     
  3. RejectTed

    RejectTed Really Experienced

    I haven't had a chance to really get into the story but here are some general tips that might help.
    1. Have a list of all your variables, so you know what each variable means. Make it public if you want to help other authors adding to your story.
    2. Initialize variables early, or some of your operations wont work. If you have a condition involving a variable that doesn't exist it will always return false.
    3. If statements are great. They are a simple way to add immersion. What sort of examples do you want? How to write them? Or do you want examples of what they can do?