I imagine there is, but I don’t know it! I just copied the relevant files into a Libreoffice doc and looked there! It was actually only 12K words more than my running total, which surprised me. I feel like I write loads of code, but I suppose it isn’t that many actual words. It was very interesting to figure out how long an average playthrough was too - I’ve now added that to my WIP thread because I think @Hamartia is right that it gives a good idea of how much there is still to do after one playthrough.
Yeah I’ve got to do average playthrough one day too. Last I tried, I got a really weird number that didn’t seem quite accurate, and then I ended up crashing vscode with repeat randomtests trying to get it to work and I had to reinstall it entirely (total rookie, I know). Been scared to try again.
I’m not sure what I did wrong, I suspect it might have something to do with loops that I haven’t figured out how to code properly for testing. Like if you have options where the player could go back to redo a choice (e.g., a name selection loop) does that mess with randomtest?
I had a really similar experience when I first compared my work with / without code!
In my head I felt like I was being kinda fraudulent every time I did an invisible stat modifier, like when a response elicits +X relationship to a few different characters. I was like ‘wow great going - you’ve added like 20 words of code for a tiny conversation branch’! So when I compared / contrasted, I was fully expecting to find out that like 40% of my word count was code, which of course it absolutely isn’t.
That could mess with a randomtest if there isn’t a way out of it, yes. The way I make sure I don’t accidentally trap my player in an endless loop is just to make the last choice a way to exit the loop - so it’s always an “I’m done now, let’s move on with the story” option.
When you do the randomtest, set it to 50 rather than like 10000 repeats, change “show the full text that randomtest encounters”, and “show choices that randomtest makes” to “yes”. (I have no idea which of these is important but I’m fairly sure it’s one of them!). Then at the end of the randomtest text, you will see a wordcount. Divide it by the number of randomtest playthroughs you ran.
for anyone still wondering (@gracierocket @hellanikthi), there’s apparently no native word count feature in VS Code, BUT there’s a tone of extensions for that. I have this one rn:
looks like this in the status bar, by standard, next to the CS one:
![]()
Thanks for the tips @gracierocket @Ne_Ne! I keep forgetting that extensions exist but they are so handy.
I don’t think I have any forced infinite loops, just possible ones. Like a player could theoretically endlessly choose to redo their name, but nobody would…except maybe a computer? Not sure if that affects randomtests at all.
I’ll have to give it another go sometime soon.
EDIT: I love that the extension does estimated reading time! Now I’m wondering if there’s a way to view this for the entire game instead of just one scene at a time.
Randomtest picks randomly, so it could, by my understanding, end up going over and over again the re-picking loop.
Oooh thanks @Ne_Ne, this looks awesome!
@hellanikthi Whenever I get a failed randomness for a loop, it says it has hit the same line 1000 times, which I would say would be vanishingly likely to happen by chance in a randomised playthrough. Like, even if a loop is possible, I can’t imagine it happening over 1000 times consecutively by chance. Not more than once, anyway! Something that might be obvious but I only found out recently is that if you get an error on a particular line and the line seems fine, you actually need to check the bit just above the error, because that will actually be where the game got stuck. Not knowing that cost me several hours of my life before someone on here put me out of my misery!
Also, my game has possible loops for things like ‘what is your name’, and it doesn’t throw randomtest errors, so I doubt it’s that.
Reminder: Treating the codebase like a midnight Lego set just to test my own limits of exhaustion is an objectively terrible idea.
Spoiler alert: The code broke, I gave up, and I went to bed. Future Me is going to love waking up to this crime scene.
Randomtest also by default doesn’t truly choose randomly, but will choose options that are not chosen as much. If you keep that setting, it will never choose the same choice a thousand times in a row. It will alternate. I have instances where you can go back and forth between different rooms as much as you want in my WIP, and Randomtest never gets stuck in an infinite loop.
Yeah, I’ve definitely created open-ended hub-and-spoke modules before where the player can move freely through an open-ended “space” of multiple pages, and Randomtest will eventually move on, even without a timer to force advancement.
I have those too, but whenever you visit a location from a hub, it does advance the clock, and once you run out of time, the story will move on to the next part.
On a totally different topic, for those of you who do moodboards for social media: where do you get your images from? I’ve done a mix of free canva images and pixabay/pexels but it takes forever to find something that works.
I’ve seen a lot of people use Pinterest which would be soooo much easier but I worry about the legality/ethics of those images when I have no idea where they’re coming from.
I use Pinterest, but I don’t really share my moodboards publicly.
(I’m not sure how much easier it is though, it’s really easy to lose so much time in it.)
Pexels, Unsplash (turn off plus), and pixabay for me. I’ve learned to find an image that is close and then hunt through its similar images. I also note the tags used and use those to expand or refine my search.
Ooh you are welcome. @raywilson I’am stil in wacation but returning soon.
Apropos of nothing, any advice on what should I do with my impulse to offer a character whose route is going to end terribly no matter what the player does as an RO?
Based on the visual novels I’ve played whose ROs have unavoidable deaths, please ask yourself this: “Will this character death bring cheap tears?” If yes, you must make the character more relatable and sympathetic. Otherwise, congratulations.
Would someone mind looking over this base code for a conversation? I am trying to code so you’ve got three questions, and their responses change depending on what you’ve already asked and what you know.
Can anyone see any issues with this?
*label test_chat
*choice
*if (timing < 4)
#@{timing Ask test what it is doing here.|Ask it what it is doing here.|Ask it how it got here.}
*set question1 + 1
*if (timing != 1)
*set timing + 1
*if (question2 = 1)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question3 = 1)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question2 = 2)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question3 = 2)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question2 = 3)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question3 = 3)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*else
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*if (timing < 4)
#@{timing Ask test whose blood it is.|Ask it whose blood it is.|Find out whose blood it is.}
*set question2 + 1
*if (timing != 1)
*set timing + 1
*if (question1 = 1)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question3 = 1)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question1 = 2)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question3 = 2)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question1 = 3)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question3 = 3)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*else
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*if (timing < 4)
#@{timing Ask test about the code.|Ask it where the code is.|Ask it if the code is still alive.}
*set question3 + 1
*if (timing != 1)
*set timing + 1
*if (question1 = 1)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question2 = 1)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question1 = 2)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question2 = 2)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question1 = 3)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*elseif (question2 = 3)
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
*else
@{timing ToDo|ToDo|ToDo}
*if (timing = 1)
[ToDo].
*goto test_chat
*elseif (timing = 2)
[ToDo].
*goto test_chat
*else
[ToDo].
*goto test_chat
Hello everyone and happy July. Thank you for creating this thread, @raywilson!
We’ve been lurking in these writer support threads for quite a bit now while we were creating our own WiP (Blue-Blooded), and we finally mustered up the courage to post it this month. These threads were always a great help, especially considering some of the more finicky issues that tend to pop up with coding (cough indents cough) and writing. The past couple months of this year were spent planning and plotting; in total, the demo is sitting at approx. 85k words. These past 2 days of July were spent on debugging and elseif-ing.
The goal for the rest of July is to hopefully get some feedback on the first draft of the WiP, try to squash any reported bugs ASAP, and then push a smaller update towards the end of the month where we address any broader issues and add some new content. One of the major points to address is definitely the stat balancing act and how to best implement stat checks ‘fairly’, so to say.
If anyone would like to check it out or even share their thoughts, please feel free to check out the WIP thread. It’d be lovely to learn from you guys and get your feedback, it being our first attempt at an IF and all. Wishing everyone a month filled with progress and happiness!

