Smarter Variables

Discussion in 'Suggestions' started by RicoLouis, Apr 12, 2017.

  1. RicoLouis

    RicoLouis Really Really Experienced

    I don't really use variables mostly because typing them in kind of slows me down when I am writing. For example if there are three or four characters talking and you maid them all where the name can be changed you will have to write a bunch of {Whoever's_Name} to avoid confusion of who is talking which can slow a story down. Also if you mess up and type {First_Name} because you are used to writing names as capital letters while the variable is automatically set to {first_name} unless you change it so you have to remember to set your variables how you added them in the story.

    What if you could have the variable replace normal words. Say instead of typing {girl_friend} you could just add your default name Megan. If a reader wants to change the name every time you used Megan will be replaced with the name the reader choose.
     
  2. dingsdongs

    dingsdongs Really Really Experienced

    Well, if it's easier for you to remember and write "Megan" instead of {girl_friend}, then you could just name your variable {Megan} ;-)
     
  3. RicoLouis

    RicoLouis Really Really Experienced

    I could but I am sure I would miss one somewhere and the reader would be thinking who the hell is this Megan person.
     
  4. gene.sis

    gene.sis CHYOA Guru

    automatic replacing would need complicated rules
    just some dumb examples:
    Everest -> replace if it is part of a word? {Eve}rest
    Megan's -> replace if it is part of a word?
    Christmas Eve -> Christmas {Eve}
    {Megan's money} -> replace or not?
    {Megan}'s -> already replaced? Replace again?
    {{Megan}'s money} -> replace?

    I would suggest the way dingsdongs suggested with the addition of checking the chapter.
    CTRL+F
    type "Megan"
    check, if there is some "Megan" instead of "{Megan}"
     
    Last edited: Apr 13, 2017
    moonblack likes this.
  5. RicoLouis

    RicoLouis Really Really Experienced

    Fair point. Just thought I run it by someone and get some feed back.
     
  6. Nemo of Utopia

    Nemo of Utopia CHYOA Guru

    It was a worthy thought Reco but implementation would be like the ultimate nightmare to make workabl.
     
  7. gene.sis

    gene.sis CHYOA Guru

    Is it possible to tweak sth like Grammarly to mark Megan as wrong in favor of {Megan}?
     
  8. TripleAlfa

    TripleAlfa Virgin

    I think an auto-complete function for variables would make it less cumbersome. Another option is to have a list of variables somewhere during editing which you can use to add a variable with one click.
    The first option is great for stories with lots of variables while the second option is better for a smaller number of variables.
     
  9. gene.sis

    gene.sis CHYOA Guru

    We already have the Variables section in the sidebar.
    At the moment, if you click on the variable name once it gets highlighted.
    So you could use CTRL+C and CTRL+V.

    Though I could imagine that clicking on the variable name inserts the variable at the current cursor position. But in that case, the variable section should move along when scrolling down.


    The first option could lead to problems with writing conditional branches syntax.
     
  10. Nemo of Utopia

    Nemo of Utopia CHYOA Guru

    Agreed.

    Also, the click and copy only works on desktop and laptop interfaces, a one-step "paste-at-cursor" would be a clear improvement for tablets and other mobile devices.
     
    gene.sis likes this.