Ultimate Noob Coding

As all of the *if clauses are structured the same here, I’m guessing the true error is in some other section of code (maybe where the stat’s added?).
If you’re using CSIDE, there’s a step function that lets you watch your game run the code line by line, as well as an option to track all stat changes…

I note Insanity is capitalized while your other variables aren’t – you might want to double-check that you’re being consistent.

To find bugs like this earlier, you can set randomtest to ‘show line coverage statistics,’ which lists how many times each line was used during testing, and check for anything that was never used.

1 Like

Can you be more specific; what kind of “transporcrash didn’t”?

Is it not appearing correctly, or it produces an error, or something?

1 Like

The Insanity thing is actually consistent; I always capitalize it and the other actual stats from the stat screen. Just a personal presence. I will try looking at the lines in Randomtest to figure out where we went off the rails.

@Szaal it is not an error message, it just didn’t show when it should have. I wrecked the transport by flying with my feet (doing a high Insanity run, which is why I did get that if to show) but it skipped right over it.

Well, maybe for some reason you get 3 [transportcrash] instead of 2 or 1. Or maybe more. Or less.

Try to double-check it.


Tip: to help you track the possible error, try putting this code at the end of that scene.

The transportcrash is ${transportcrash}.
3 Likes

Y’all were right as usual; I had a point where both successful transport crashers and failed ones funneled into the same paragraph, and there was a +2 to the stat after that. So it wasn’t showing because successful crashers essentially get +3, not +1. I’ve changed it accordingly, and expect it should show up in later playtests without issue.

1 Like

What’s the best way to track total wordcount per playthrough? Is it an option in Randomtest?

Here is a topic related to the question. :slightly_smiling_face:

1 Like

Huzzah! It works!

Double huzzah! 22,847 words so far, and not done yet. Will certainly hit 25k per run, and potentially 30.

1 Like

If I want multiple die rollers in a chapter, how do I work this? I have previously done *temp dieroll 0 and then *rand dieroll 1 2 but otherwise don’t know if I’ve actually used a dieroller anywhere else in the game, and definitely not more than once in a scene file (I pondered it for a previous chapter but instead made the encounters set to certain events instead of random)… Didn’t want dieroller results overwriting each other.

Nah, just put *temp dierolla *temp dierollb *temp dierollc at the top of your scene.

Need more dice at the mid of your writing? *temp dierollz at the top of scene.

1 Like

I tried to run Quicktest this morning, and got this message:

QUICKTEST FAILED
ERROR: couldn’t open web/mygame/scenes/The.txt

I have no idea what it is saying, no files are titles The in here.

Randomtest still works fine.

Do you have an accidental *gosub_scene The or *goto_scene The somewhere, maybe? Or a ‘The’ on your scene list in startup?

Or possibly a scene called The_Scene or somesuch where a space was swapped out for the underscore?

1 Like

You nailed it; I checked and in my new chapter I had done a goto_scene for the full chapter name, not the short scene name it is in ChoiceScript. It’s called The Math of the Aftermath, so it just interpreted that as goto The, apparently. Thanks!

1 Like

@Fiogan I know that this is like seven months late, but I just stumbled across your response about using CSIDE’s console to skip around while playtesting and you really saved me! I did not know that option existed and now I feel like so much time has been saved! Just wanted to say thanks! :sweat_smile:

2 Likes

So is Randomtest not quite as random as the name implies? I ran it a couple times to get an idea of word count per playthrough (which looks to be at 27k if this is to be believed) and realized the two instances of Randomtest appear to be totally identical. Exact same final word count, and exact same choices for each seed.

If I understand correctly—which I may not—the seeds are randomly generated but each seed consistently takes a certain path. If you start on seed 0 and do a thousand runs, those will be the same. If you try starting on seed 3000 and do a thousand runs, that’ll be a different set of random play-throughs with slightly different results.

Things do tend to average out pretty well after a thousand play throughs, depending on the length of the game, so the results of starting with seed 0 and starting with seed 3000 would likely be similar—but they won’t be the same. Neither would the full text output. Not that I would necessary suggest running full text with that many iterations, unless you have a fabulously zippy computer.

2 Likes

Heh, I was about to say that I tried to do 1,000 iterations once, but my laptop was not having it. I usually do 100. As you said, I started on seed 90 this time, and definitely got a more varied result. Thanks!

1 Like

Each seed does the same thing.
Seed 0 will always do the exact same thing as any other Seed 0.
Seed 1 is different that Seed 0.
Seed 2 is different from both of them.
Seed 3 is also unique.
Etc.

If you start at Seed 0, and do 10 iterations, you will end up testing Seed 0 through Seed 9.
If you start at Seed 10 and do 10 iterations you will end up testing Seed 10 through 19.

1 Like

I am finally implementing this, and since time is of the essence I wanted to check on something before I did so fully. Would the gosub routine reset things like *disable_reuse since you are technically leaving the scene you are in?

If anyone else can answer the question above, I would be grateful. If the gosub makes it where *disable_reuse options that were picked become selectable again, I will need to quickly make a workaround for at least one chapter.