Need help circumventing a Quicktest error

Commenting out will probably be my best option, I guess. Ah well.

Your code seems uniquely… complex. Mind sharing what do you have in plan with them? Maybe there’s a way where quicktext doesn’t have to fail them.

Have you ever heard of Arithmancy? Essentially, the player is assigned a number from 1-9 that will determine certain elements in the story. That number is determined by changing each letter in their name into a number, adding those numbers up, and if the sum has more than one digit, adding those digits up until it becomes a one-digit number.

For example, the name Helen would become 85355, which would add up to 26, and then 8.

I understand how you’re going to add the individual digits up, but how are you going to add the separate digits together if the name adds up to more than one digit? The only way to do this that I can see is by treating the sum as a text variable and then doing the thing that you are already doing with the first “letter” (though in this case it would be a number), but if that is so then I’m not sure it would be possible to add “letters” together.

This isn’t a criticism – I am genuinely curious because this sounds like a cool game mechanic, but I would also like to say that if this ever seems to become too complicated or bloated, I don’t think you should feel like you absolutely need to go through with this in your game. It might be easier to just have the pre-set list for players to choose from and their number would be assigned that way, and save the text_input for surnames and such. It’s up to you, though, so don’t feel like you need to do what I advise, either, lol! (:

1 Like

Don’t know how much this helps, but trying out quicktest on the code you shared in ChoiceScript IDE, the problem could be solved by changing by either adding or changing the very first name option - Hiroas - into a name that is 9 letters long.

Interesting. This can be a neat thing to weave to the deep-lore of the story.

I wonder what’d be the consequence if someone metagame it and starts using weird text as their name, xkcd.

I’ve run into this myself many times. As mentioned, you can’t use Quicktest to skip lines. I don’t know the exact technical reason for this; maybe it’s because Quicktest reaches that test and, in its alternate-universe-testing imperative, says “Hmm… but what if NOT Quicktest? :sunglasses:

Instead, what you have to do is use *if quicktest to set every variable you need to to a default value that will pass QT. You don’t care whether or not a playthrough in QT will be internally consistent or varied; QT isn’t for testing playthroughs at all. That’s what RT is for.

So, in this specific case:

*if (choice_quicktest)
     *set name "Rumplestiltskin"
1 Like

Isn’t quicktest would still go “What if not *if choice_quicktest?”

Haven’t tried autotesting, just curious.

1 Like

No, in my experience, although using *if quicktest to send QT off to a different part of the code doesn’t work, using it to set variables does. Again, I’m not exactly sure why; maybe it always tries to gobble up all the code it can reach (even despite *if quicktest), but then uses a different, naive mechanism to track variable states? QT clearly doesn’t keep a unique set of variables live with every one of its forks, otherwise there would tons more variable-value errors every time you ran it. And it makes sense that it doesn’t; that’s RT’s purpose.

1 Like