So I posted a question as to whether it was possible in one of the other forums and got suggestions to post it here. As it is now the game mode variables are rather lacking. They can only be changed by a fixed amount on a per chapter basis, and while this works fine for some types of games it is rather limiting for others. Having some way to change the variables in the middle of the chapter and being able to use one variable to modify another would greatly increase their functionality. The ability to use one variable to change another at the end of the chapter would also work. For example if in an RPG story I had Attack, Defense, and Health variables for both player and enemy I currently have no way to compare player attack to enemy defense and than reduce health by the difference shy of making 20 different chapter options locked out based on what your attack stat is. Where if I could say something like {{EnemyHP} = {EnemyHP} - {{Attack} - {EnemyDef}}} in the middle of the chapter I could just set different chapters based on the action taken. It would of course be great to get many more functions like the formula parser that gene.sis had posted about, though that appears to be dead in the water for the looks of it. As it is game mode is very limited, and I can see why not many stories end up using it.
Something like this where everything in the brackets is invisible and allows you to assign the variable a value that can be based on other variables.
well... I mean specifically in the middle of the chapter. What would be the difference to a change at the beginning of the chapter (like it is currently) If you do such a scenario, would the reader click a chapter answer for each click? (Like "Fight aggressive", "Fight defensive", "Flee!", "Special action", "Deathblow")
Yes pretty much. It would allow for more options without massive depths of chapters. And being able to change it in the body of the text means you could have different variable changes behind if statements. This way you could have some changes to variables happen and not others based on previous choices/the state of the variables at the beginning of the chapter.
Currently, the variable changes happen backend, so there is no way for the reader to send back variables to the server, making it impossible to manipulate them. If you do a fight, your main chapter could have the 5 options I wrote above and when clicking one of the Fight options, the option would link back to that chapter after applying the result of the "round". That way the new values would be available at the start of the chapter and it would show the outcome of the chosen option. So you wouldn't have any chapter depth to do that.
true, and thats what ive done now, but it is so limiting in what you are able to do. And the fact that variables change at the start of the chapter is really annoying for if statements that are based on those variables
So why don't you go throw your weight behind THIS: https://forum.chyoa.com/threads/make-implementation-of-the-formula-parser-top-priority.844/
Well, if it would be possible to use more than one variable for a calculation, you could precalculate results for the chapter. The variable naming conventions are quite loose which can make it quite difficult to expand the syntax of if statements. If you choose a variable named "69" the if statement wouldn't be able to decide if it is meant as a variable name or number.