
Hello friends! It's time for another dev diary.
My main focus this week has been something I tentatively planned to get done this month yet managed to completely forget about when I was writing last week's dev diary, and that thing is... dialogue!
There are several areas of the game that demand that NPCs be able to say semi-random yet very specific lines of dialogue. We want NPCs to be able to comment on the player's clothes, their style, tattoos, reputation, and other things, and we also want them to be able to say things during encounters. In other words, we want the game to be reactive, to make the player's choices feel consequential.
An interlude about programming...
There are many ways to accomplish this, and I'll get into the nitty gritty a bit, because I think that's interesting to some of you. When I was a less experienced programmer, my first impulse probably would've been to make a bunch of bespoke widgets, all looking something like this:
<<if $pc.wearing_dress_with_pockets()>>
Your dress has pockets!? Where did you get it?
<<elseif $pc.wearing_crop_top()>>
Oh, a crop top? Daring!
...and so on. Basically, a whole bunch of if-elseif blocks checking for everything you want an NPC to potentially comment on and returning possible responses.
This quickly grows complicated. First of all, this one widget will become enormous in no time. Second, you probably want NPCs to be able to say more than just one possible thing, so every block ends up needing to repeat the same random line picking logic. Third, things higher in this stack of elseifs are prioritized, so if you're wearing a dress with pockets, nobody will ever comment on the fact you have "SLUT" tattooed on your forehead if that condition is underneath the dress one.
You could make separate commentary widgets for clothes and tattoos, and everything else, but again, you're repeating code and adding more messy logic.
Now, don't get me wrong. A project like this inevitably acquires messy logic in places anyway, especially where the conditions or what needs to happen as a result are highly circumstantial. But when you need to cover a whole lot of similar situations with essentially the same logic, then a more generalized framework is called for.
My favorite solution for these sorts of problems is a tag-based picking system. Here's one entry in a database:
tags: ["friendly", "clothes", "dress with pockets"],
content: [
"Your dress has pockets? Where did you get it?",
"Whoa! A dress with pockets!",
"That dress has pockets! Awesome!",
],
The tags are the key part. For every item in the clothing database that is a dress with pockets, I can now attach the "dress with pockets" tag to it. Now, when we want an NPC to comment on the player's clothes, we first compile a list of tags associated with their visible clothing. We then match those tags to entries in the dialogue database, and now we have a list of things the NPC can say about the player.
If we similarly attach tags to tattoos, we can compile tattoo responses and throw those into the pool along with clothing commentary and whatever else we want to do. NPCs now have a big list of specific stuff to say that applies to the PC.
And, of course, it's even more generalized than just commentary about the player. We can also attach dialogue tags to sex acts, then use the same system to find things to say about what's happening in an encounter. And it's pretty easy to add to, even for people who don't have much coding knowledge.
This tag-based picking is also how events work, and the event system is basically the backbone of the game. I think it works out pretty well!
Back to the progress report
This new dialogue framework has been fully coded, and my focus for the remainder of the week will probably be just coming up with tags to attach to things and writing lines to say. The first obvious use is firing events that relate to an NPC having something specific to say about your appearance:

The other thing I've been working on, which also uses the dialogue framework heavily, is spicing up encounters a bit. While encounters have come a long way since release, the actual narration of sex acts hasn't changed much beyond adding new ones.
Sex act narration uses one of those giant widgets I mentioned above, and it's constructed in such a way that there can be a lot of variation based on specific circumstances. Unfortunately, that mostly isn't reflected in what's there now — the current lines were written before release when my thought was "Ok, there's a ton to do, but if I can just write about three variations for every sex act, that's enough for now." But it's now been over a year since the first public release, and this has become an area that needs some attention.
So, this has been my other big focus this week:

A bunch of sex acts now have different narration based on whether the actor is shy or more confident or their experience and skill level. The NPCs have different reactions based on how well you're doing, and they'll also interject some dirty talk based on what's going on.
It's a step up, if still not perfect, but encounters are a huge part of the game and something I'll continue to iterate on. In fact, it's looking like encounters will probably be the big focus for this entire month, considering the other priority tasks from the last poll have to do with them too.
All right, once again I have rambled on for quite a while! Feel free to let me know if you liked this more detailed programming talk or if your eyes glazed over. Or, you know, whatever else is on your mind. As always, I appreciate your support, it really does mean a lot to me. And I will be back next Friday with another progress report!