Ability to sort variable order

Discussion in 'Suggestions' started by lexist, Oct 10, 2018.

  1. lexist

    lexist Virgin

    As someone with a huge number of variables on a single story I think it would be very helpful to be able to sort the order that the variables display. Some sort of drag and drop sorting would be ideal. That way as I add new variables later in the development of the story I can place them in the appropriate location.
     
  2. Nemo of Utopia

    Nemo of Utopia CHYOA Guru

    This gets my +1
     
  3. gene.sis

    gene.sis CHYOA Guru

    Where do you want to order them?
    In the field where you add them to control the order of execution?
    Or in the view of the reader?
     
  4. Nemo of Utopia

    Nemo of Utopia CHYOA Guru

    I'd say "Both", ideally. Personally, I think viewer order might be more significant at the moment though...
     
  5. Alphabetical would be a nice option.
     
  6. This would be great. Far too many times have I needed to remove and re-add variables as I thought of more, added more characters, or decided I didn't like the order.
     
    Nemo of Utopia likes this.
  7. Durzan

    Durzan Really Experienced

    Lump this idea in with the ability to save and recall variables and we got a decent start to some necessary QoL changes regarding variables that frankly need to happen.

    This gets my vote as well.
     
  8. Actiaeon

    Actiaeon Experienced

    Yeah, probably the biggest headache I've had recently, so sure this gets my vote.
     
  9. gene.sis

    gene.sis CHYOA Guru

    Where would you like to change the order?
    In the Score Change field on the Edit Chapter page?
    This would be indeed helpful if you need a certain order of variables to get the desired calculation results.
    (It might also make it easier to set up the variable order by initializing them in the introduction chapter.)
    Or in the Score tab in the Sidebar?
    How should the sorting work?
    A number which determines the precedence of showing the variables? (This would increase the size of the save game files)
    Alphabetically? (This would uglify the Score tab as writers would most likely start to number their variables)​

    Currently, an easy way to change the order in the sidebar would be to initialize variables in the introduction chapter.

    To vote for a suggestion, give the first post of the thread a Like.
     
    Actiaeon likes this.
  10. Actiaeon

    Actiaeon Experienced

    I think maybe chapter edit would be best, just a drag and drop, or arrows to rearrange the order.

    So say you have variables like
    Variable 2
    Variable 1
    Have a way to move them to
    Variable 1
    Variable 2

    I would assume that the order there would determine the order on the sidebar.
    And for like character name variables, it would be on the edit story screen but would be a similar idea.
    Unrelated, but an ability to delete old variables, I tend to collect old variables that have outlived their usefulness. Say I need a variable one but ten chapters later I no longer need, it would be nice to have a way to remove it.
     
  11. gene.sis

    gene.sis CHYOA Guru

    The order of saving the variables in the reader's score will determine the order of showing it in the sidebar.
    Initializing the variables in the introduction can determine the order from the start.

    My implementation of the formula parser has that function added. (Though I'm not sure if we can use it in the current form.)
     
    Actiaeon likes this.
  12. Greyrock

    Greyrock Really Experienced

    I would love to edit a chapter and be able reorder the variables Score Change field.

    My current workarounds are:

    Keep a master list variables in a spreadsheet, sort them into my preferred order, then copy/paste them all into the Score Change field one at a time.

    Use placeholder variables between defined variables so I can just rename one of those later instead of deleting and copy/pasting the whole list as often.

    Unfortunately, with liberal use of placeholders I have hit the limit of what how many variables the Score Change field can modify.
     
  13. gene.sis

    gene.sis CHYOA Guru

    A limit?
    As far as I know, there should be no limit.
    Is there an error message or do the buttons for new variables disappear?
     
  14. Greyrock

    Greyrock Really Experienced

    It seemed that after some number, the new variables were missing when I went in to edit the chapter again.

    I have a looping game structure for game+ options and was trying to reset nearly all the game’s variables in a single chapter. I now split the reset across two chapters to avoid the apparent limit. I expect to add many more variables in the future, so I may hit it again.
     
    gene.sis likes this.
  15. gene.sis

    gene.sis CHYOA Guru

    Hm... maybe the limit is the database field length for the score change.
    With the length of your variable names, it might be enough for about 400 variables. (There's a lot of overhead for each variable, so shortening them wouldn't help ^^)

    I counted 166 variables in one of your chapters.
    So if you split the original chapter into two, that sounds about right.
     
    Greyrock likes this.