If-statements in chapter titles

Discussion in 'Suggestions' started by Apple687, Mar 9, 2018.

  1. Apple687

    Apple687 Virgin

    I would like to be able to use If-statements in chapter titles. Specifically I have an idea for a story where you come across a mind-controlling remote control and experiment by pushing the buttons, eg. button 7 might cause the person you pointed it at to give you a blowjob. I figure part of the fun of such a CHYOA would be discovering what the various buttons do. So an option at the end of a chapter might read "Press button 7" or "Press the blowjob button" depending on the reader's knowledge from previous chapters.

    Admittedly now I think about it, I'm not sure how such conditional chapter titles would be displayed on the story map, URL, search engine, and anywhere else where the chapter title is listed. Still, it would be good to be able to use chapter titles in this way, since existing workarounds would probably require creating hundreds of redundant chapters in order to implement my idea.
     
  2. Nemo of Utopia

    Nemo of Utopia CHYOA Guru

    True: and more to the point, give away a lot of the plot because the reader would know that there WAS a blowjob Button...
     
  3. Javalar

    Javalar Really Experienced

    Not sure this is technically possible.

    Also: if-conditions are only displayed when you start game mode. So to everyone else the titel would read "Press button".

    But I am not sure it's possible anyway, because the title is not the same as a text field.
     
  4. gene.sis

    gene.sis CHYOA Guru

    Well, all if-statements get processed every time you open a chapter. If game mode is not active, the defaults are used which can be defined within the syntax.

    Basically, the title is a text field, though you can only use 255 characters. Additionally, the size of the line is quite short and it would be difficult to see the syntax.

    I think it would be necessary to precalculate the syntax for purposes like story map or chapter links. (the chapters are identified by the id and don't need the chapter title)


    A problem could be that the chapter answer could be different from the child chapter title. If the child chapter includes a change of a variable which is used in the syntax, the title would show the result with the changed variable. (e.g. "Knows that Button 7 is BJ" is set to false. The chapter answer would be "Button 7: Минет". When accessing that chapter, the variable "Knows that Button 7 is BJ" will probably be set to true and the title of the chapter would be "Button 7: Blowjob")
    This could be confusing but in some cases also advantageous.


    Well, there would be a workaround without the need of additional chapters, though I don't know if it will work long-term.
     
    Javalar likes this.
  5. Apple687

    Apple687 Virgin

    Such as?
     
  6. gene.sis

    gene.sis CHYOA Guru

    Basically by moving the chapter answers to the end of the chapter while giving the links below the chapter question generic names.

    I described it here, including the disadvantages.