Course of Temptation Dev Diary #76 (Patreon)
Content
Hello friends! A happy Friday to all.
As you may be aware, the monthly update hit public release on Monday! There have been a couple of bugfix updates since then, and the current version as of today is 0.6.4g. If you're on an earlier version, I suggest grabbing the latest update to make sure you're caught up on fixes.
Aside from patching, I've been back on the Greek house update, which will be the next major update, bringing us to version 0.7. I've been spending this week plugging away at pledge tasks: things you can do to earn points towards acceptance into your chosen house.
Some are relatively PG, but this game being what it is, you can expect a lot of them to involve nudity and various sexual exploits. For example, skinny dipping in the gym pool while it's busy:
Pledge tasks are basically falling into four categories:
Tasks that rely on existing mechanics, and just need their conditions properly checked and completion flagged. Example: win an arcade bet against a member of another house.
Tasks that can be done with existing mechanics but should also have unique events that let them happen more reliably. Example: get a member of a rival house to kneel for you. This can happen if you pursue a certain type of relationship with somebody, so we do need to detect that, but there should also be a way to achieve this specifically for pledging.
Tasks that need their own unique events. Example: place one of your sex toys on the elk statue, as well as the skinny dip task above.
Tasks linked to events or games that will happen at Greek house parties. Example: survive a game of pussy roulette.
I've gotten through detecting task completions that engage with existing mechanics and I'm currently working on writing unique events for the ones that need those. I should more or less get through those this week, which will make the majority of pledge tasks doable. That'll just leave tasks that require Greek house party events. In the next week I'll start implementing the games and activities for house parties, and whenever I'm finished with that, I can go back and finish up the remaining pledge tasks.
It's a lot of event writing! Whew! But that's what the game is ultimately all about.
Event frequency
Speaking of events, I've been asked a few times lately about how event frequency actually works. The event system is sort of the core of the game, and I've talked about it a couple times before, but I'm always happy to discuss how the game actually works.
First of all, there's currently over 1200 events in the database, and every time something is supposed to happen, we have to resolve this down to one pick within a few milliseconds. How often does something happen, you ask? For example, if you're walking across the map location by location, how many locations should you pass without incident before an event fires?
This is determined by the base event chance, and while it's modified by a few things and sometimes used different ways in different places, the quick version is that where events can happen, they'll generally actually happen about one time out of six.
So, we passed the base event chance roll and it's time to pick an event. What now? We start with event tags, which are some unique strings we search for in order to instantly cut hundreds of events down to a handful. When I talk about event sets, I generally mean events that share tags. This first pass selection-by-tag eliminates most events very quickly.
Next, a lot of events have further conditions. For example, some events are only valid if the PC is wearing a skirt. Or one might require an NPC with specific inclinations or other characteristics to be at your location. This eliminates a few more.
Up until now, RNG has not really played much of a direct role besides the base event chance roll. A roll may have been made for a wardrobe malfunction or some other special circumstance, like whether a certain type of NPC is around, but other than that we have not randomized the selection of events. Grabbing an event set from event tags has mostly static results.
But that's about to change. Now we're down to a few events which are all valid. Which one do we end up with? What we want to do now is basically throw each event into a hat and then draw one out at random, and that's the event we fire.
But events should not all be equally likely. The event where you find the secret lucky cat can't be as common as somebody smiling at you on the street. This is where event frequency actually comes in!
Instead of putting each event into the hat once, we put each event into the hat x number of times, where x is the event's frequency. Event A with frequency 80 goes into the hat eighty times, and Event B with frequency 20 goes into the hat twenty times. Now we have an 80% chance of picking Event A. To get an event's chance of firing, divide its frequency by the total frequency of all events in the set.
That's about it. I think people who dig into the code sometimes erroneously believe that event frequency directly controls how often the event appears. As we've seen, the base event chance is actually the first hurdle, and its frequency only determines how often it's picked among the other events in its set. If an event set only contains one event, then its frequency is completely meaningless: every time we search for its event tags, that event will fire 100% of the time. Event frequency is relative.
Now, there are other considerations. Many events have cooldowns so that they don't fire too often even if their number would otherwise come up. Several events, especially ones necessary to advance storylines, keep track of when they should fire by, and once they're overdue, their frequency rapidly increases until they're the strongest contender when that event set gets pulled up. "It's just RNG" isn't usually a sufficient explanation for an event firing too infrequently — there are countermeasures against pure randomness, and usually what's actually happening is the event's special conditions are more strict than intended.
If a storyline is just not proceeding when it feels like it should, that should be reported as a bug, with specific information about which part you're stuck on. If you provide a save, I can determine exactly why you're stuck, which of course is extremely helpful in figuring out what I need to tweak. My intent has always been for storylines to sort of flow naturally — I don't want the player to feel like they need to look up a guide and do something weirdly specific to move a storyline along. But it's easier said than done sometimes!
Okay that was way longer than I thought it would be! I'm sure I've talked about this before but maybe not in so much detail... still, if I've repeated myself, sorry! If there's anything else you want to know about, let me know and I can talk about it in a future dev diary.
But for now, that's definitely more than enough rambling! I'm getting back to writing events, and I'll be back next week with another progress report. Thank you so much for your support, and I hope you have a good weekend!