No more questions from me right now… just a lot of experimentation.
I’m now thinking about if there’d be ways to get it to reference more than one variable… the simplest would be something like @{(jack > jill) Jack likes me better.|Jill likes me better.} Which isn’t quite accurate if they’re equal, but good enough.
The division trick could allow for more possibilities here, but that might be more trouble than it’s worth *if is still a perfectly good command.
That’d look like this, I think:
@{(round(((jack-jill)+150)/50)) Jill likes me way more than Jack does.|Jill likes me a little more than Jack does.|Jack and Jill feel about the same about me.|Jack likes me a little more than Jill does.|Jack likes me way more than Jill does.}
I think most people would love it if they could change the font size or font ( I think if there will be a folder from which font will be loaded is made with a default font in it and you can change that font with any other font )
Is there a limit to the number of things we can store in @{}
Also, instead of “multireplace” how would you feel about calling @{} an array? (or an “at array” if that’s catchier)
Still, need to decide when will you go into “some” instead of actual numbers, but I think it can be improved considering you can nest {} inside an @{{}}
This actually won’t do what you expect. The parentheses are binary tests, and true/false converts to 1/2, so you will only have the blanks or “a match,” “a cigar,” or “a healing potion” displayed, never “two” or “some”.
@dfabulich Just out of curiosity, is nestable multireplace a potential future addition or just a flat-out impossibility? Multireplace alone is already spectacular, but I’ve oh so longed to nest them on several occasions.
Yeah, a combination of *if statements with multireplace is possible, but I’d be looking for something more like
@{damage+1 You miss.|You do 1 damage with your @{weapon sword|dagger|mace|carrot}.}
Totally fake example, but yes I’m dealing with a lot of ifs that could be much more elegant with nested (or nested in nested—a girl can dream, right?) mutireplace.
Nice idea, I’ll have to check if that would help with any of my code. I’ve mostly ended up either combining with *if statements or separating the multireplaces across multiple variables.
Haha, perhaps too much nesting would get a little out of hand. Seeing how much more compact my code is thanks to multireplace, though, I’d imagine that 1 nested level could actually still make the code clearer. But I could be wrong!
Sure, it’s not at all a necessary feature, but then neither are many of the more programming-heavy features, yet they can be really helpful to people who do choose to utilize them. Anyway, it’s just me dreaming!
It would be @{(languages <= 59) the foreign tongue | Deeplandish} in this case. You want the first part to be something an *if will see as either true or false, whereas language + 59 is just a number.
I’d been using multireplace properly for variables where, for instance, biting_daisies = 1 (or 2, 3, 4, etc.) but then it occurred to me that multireplace would be really useful for some of my on/off *if flavour text. But I nearly implemented it all wrong, because my way would have only worked if the player had exactly 60 or 61 in languages. I hadn’t thought it through properly; too excited about ending the endless string of *if statements, I suppose.