Ok, I know right off that this is feature creep: but please hear me out. I've been working on a story based on THE GAMER by Sangyoung Seong, and I suddenly realized that I couldn't do two things I NEED to be able to do to do the story correctly. The first one is covered in the other thread, but the second one is this: We need to be able to have fixed variables, which displays different TEXT based on what you write into the variable field, that ARE NOT user controlled. This is not the same as Boolean variables, yes they make an awkward but usable workaround but they aren't the dynamic option we need for full functionality. Say you have a dating sim game type story you're trying to build: there are different jobs that the character can do, but you want just one variable: "Job". Right now you have to make 20 Boolean variables with "Job: Lumberjack", "Job: Sales Representative", "Job: Tour Guide", etc, etc. Under this new idea you woud write in the variable "Job" and then have, say 99 characters, to fill in what that variable is right now... Make sense?
It makes sense, and I support the idea, as it will make setting up some games a bit easier (due to needing fewer variables).
While I love this idea, can't you do a workaround using a regular integer variable and use of the if statement within text? I've done that in a test story to track the day of the week. Each time the reader sleeps I increment daynumber, until it reaches 7 then offer a different sleep chapter that resets it to 1. Using IF/ELSEIF/ in the text lets it display the day of the week instead of a number.
Yes, it's another usable, but cumbersome, workaround that this new variable type would render superfluous.
Well, if your current variable {day} would hold the value "Monday", how would you proceed to the next day? {day} + 1 would need some additional logic which is only date-specific. Also, string variables are quite inflexible if you need linguistic variations like "Mon." or "Tue." So even if you have a string variable, you'd also need the number, thus you have to save two variables instead of one. Or you need additional functions for pretty cumbersome string manipulations. (e.g. check the current value of {day}, convert it to a number, add the difference of days, then convert to weekday names. Basically, the effort would be at least doubled in comparison to using the line of code like dirtytyke does.)
Perhaps dates are a bad use for string variables, but, there are other uses, once we have the formula parser, where they are invaluable: consider the combination of two variables, one string, one numeric. The string variable is "Class" and has fifty possible values as the author has set up the story: Fighter, Magus, Rogue, Cleric, Samurai, Tourist, Oracle, Caveman, Barbarian, Ninja, Sorcerer, Mesmerist, Monster Tamer, Cavalier, Pirate, Monk, Drunken Master, Wizard, Bard, Druid, and Demigod, to name but a few. The numeric variable is "Level": when the properly laid out formulas that the author has set up at the beginning of the story and can copy/paste from there are given these two variables, they decide the maximum values of all of the skills, abilities, and powers of each of these fifty classes which would be nearly impossible to keep straight by number alone... Welcome to ALDAIRUNE, land of mystery and adventure, the most massively SINGLEPLAYER adventure you'll ever experience.
Well, using 50 comparisons like 'if({class}="Fighter"; {level}*1.5 ; if({class}="Magus"; {level}*0.9 ; ...' would be quite lengthy and you would have to do it for every skill. Also, you would need to have calculatable Conditions to apply the maximum values. I'd rather like to have "Conditional Links" and map the max for all skills in a single chapter for each class. (And after getting to know a few RPG systems throughout my life I realized that there is basically no need for character classes. I mean, everyone can learn basically everything (except performing magic which is rather inborn) and can become a master of it, so it is rather a question of specialization. So one might be specialized in melee weapons which makes it just easier for him to learn/improve fighting while another one is specialized in stealth which makes it easier for them to learn/improve lockpicking. There is also no need to distinguish too much between spells of different classes. They basically have the same result, even if a druid does something completely different than the sorcerer.)
True, but classes give people a sense of order. Makes it easier to identify and orientate for some readers, especially in a fantasy setting. Classes, in a way, come with their own background (everybody knows or believe he knows how the youth of a fighter or a thief looked like), while skills need to get the void they present filled. It's of course a matter of taste (and RPG experience), but it's not without merit.
Sure, but Knight, Warrior, and Barbarian are basically the same classes with the mostly identical skillsets. The only difference is the background. In terms of game mode stories, it is also quite difficult to implement all these classes as you would end up with a ton of variables.
Yes, it's difficult, which is why if you lay it all out in calculated formulas at the start with only two variables that determine the rest of the scores from that point on it is much more efficient than doing the whole thing Ad-Hoc as you play. There is a reason few video games are based off G.U.R.P.S. and many off D&D...
If every level has different maximum values for every skill the character could have, you need a set of them for every level/skill combination. Well, not knowing G.U.R.P.S. I'd say that the reason that games favored D&D is popularity, preference of the firstborn, more detailed world descriptions (a lot of books), and better marketing. Though I really dislike these detailed world descriptions. I mean, I don't want a fantasy world to be a place where every detail of any country is written down. Then, what would there be left to discover?
GURPS is a game with point-based character generation - very open-ended, no classes. It allows a much broader range of options, with all the good and bad that implies. Classes and levels have certain benefits: they narrow down the range of character options into fairly narrow concepts, making it easier to pick out what you want and get playing sooner, streamlining character advancement since, again, you have less options - you get set benefits at each level, and make relatively few choices. That also means it is easier to judge how relatively effective characters of a given level and class are with regards to each other: you can easily see that a 4th level Fighter has a higher attack and defense bonus than a 4th level Sorcerer, for example. The more complicated the system gets, the fuzzier the math, but in general in limited environments like CHYOA, there's a benefit to D&D style classes with predefined roles and abilities over a more freeform character generation system which would be harder to code without something like Twine.
A point-based character creation doesn't have to be complicated at all. Sure, classes can be handy for beginners, though they can pretty easily become crutches. And life doesn't follow straight paths, so I don't see a reason why a character has to stay true to their origin. If the level 4 fighter spent the last three levels with riding horses and searching herbs, why should they be better than a level 4 sorcerer who spent the last weeks fighting? I mean, roleplaying isn't all about fighting. (Though I guess that it was a major point in the first years of playing...) And back to 50 different classes for a story... I'd rather prefer a story which is kind of tailor-made for a specific kind of character instead of a story which must be too generic to make encounters something special.
And I say a story designed for say, only thieves, is too narrow! I want options, I want diversity! If you can't tell a story broad enough to encompass the wizard and the samurai then your a niche writer who needs to get out there and experience more of the vistas this world has to offer!
Makes sense to me, although this would be better implemented as the ability to create STRING variables (in coding a string is a bunch of text that is stored in a variable).
String variables: Yes. Need string variables with: * Ability to assign a value (as part of score) * Ability to include them in the text and titles as in {variable} * Ability to test them for equal or not-equal as part of conditions.
I would consider string variables to be low priority, because if-statements in text already resolve any variable to strings. Enums would solve the actual problem described here, prevent potential mistakes, guarantee consistency across an entire story, and are a simple extension of the basic integer variable, which vastly reduces the complexity of their implementation and the space they occupy in a saved game. They would probably still need to be called text variables, though, to avoid confusing users.
Oh! I didn't know that IF statements existed! Oh, how wonderful! I will start using them today! String variables would be nice, because text can be plugged in quickly, to save a lot of time. The syntax is simpler than {if}. And you can make a change in one place, and it can propagate immediately to the rest of the story (you don't have to edit a bunch of chapters if you change her dress from "pink" to "rose" for example. But agreed, now that I know that {if} exists, that takes care of a lot of problems.