Course of Temptation Dev Diary #51 (Patreon)
Content
Hello friends! Happy Friday! Unless Friday is not happy... I once had a retail job and weekends were noticeably much less happy than weekdays. But I digress...
Today I have updated to v0.5.2e! This addresses bug reports made in the last week, and makes a crucial change to the game's Findr app.
Previously, Findr tags you chose tended to be subtractive rather than additive... meaning that if you had a tag that an NPC did not match, they would not "like" you and you would not end up with a match. More tags, therefore, often meant you matched with fewer NPCs.
When this came up in the Discord, it turned out that people overwhelmingly expected it to work the other way... that tags should be additive, and having more tags means you match with more NPCs! This may seem like the obvious thing to do, but sometimes, as you're coding right along, you find you've made odd assumptions without really thinking about them that you later can't really explain... until somebody forces you to confront them and you have to think to yourself, "But why did I do it like that..."
But anyway, it'll now work more like how everybody seems to expect!
Progress on 0.6: The River Rat expansion
I've been spending the week on writing what you'd probably call the baseline events for the River Rat server job. Technically, in game engine terms, it's one event, but with a whole bunch of variations, options, and outcomes. At several hundred lines and with the supporting widgets and whatnot, it's already longer than some entire event sets.
The purpose of this baseline narrative is to represent how orders should usually go. How it actually plays out depends on many factors, such as your existing relationship with the people at the table (those awkward times when you have to serve your friends...), their personality types, and whether they're physically attracted to you.
You, in turn, get a choice about exactly what sort of server you wish to be. You can be the consummate professional, or well, definitely not professional...
Naturally, how you present yourself here is influenced by the bar's uniform, if there is one, and your choices here also have a cumulative effect on the atmosphere of the bar. If you're always flirting with all the customers, then those customers may have certain expectations when it comes to things like apologizing for a delayed order, and suddenly trying to lean on professionalism may not go so well.
Comping the order tends to be an easy way to settle an angry customer, but by doing it, you're also cutting into the owner's profits! Some amount of comping is expected as the cost of doing business, but do it too much in one shift and it'll quickly impact the owner's opinion of your performance.
So, as a server simulator, there are a few things to juggle here, and my goal is to have enough variation with customers and outcomes to make it a reasonably interesting minigame. But, again, this is just the baseline, establishing the essential gameplay loop. My next focus (and my main task for next week) is to add in more random events and interesting occurrences. The baseline event has a low frequency, so as soon as something unique is cued to happen, it'll easily take precedence.
Speaking of events and event frequencies, it occurs to me that I've never explained how events actually work, since I wrote that system long before release and before I was doing dev diaries.
How events work
Events in the game are all defined in one big event database (we're approaching one thousand of them). The game hooks into the event system in many, many places — it's basically the backbone of the whole game.
When it's time to pick an event, the engine first builds an event set. It does this by handing the system a set of tags, a list of words or short phrases that identify which events we might want to fire. For example, when looking for an event for serving a table, we start with a generic "river rat server" tag, but we also add on a tag representing that table's attitude. The tags "river rat server" and "friendly" will build a different set than "river rat server" and "angry".
When I talk about event sets in these dev diaries (and I do, a lot), that's basically what I mean — events that share tags in common and will therefore be in the running when a certain part of the game is looking for an event to fire. There are tons of other possible event conditions too, like time of day, wardrobe considerations, whether a prerequisite event has fired, whether a certain kind of NPC is around, and on and on.
So once we have the set, the question is, which event in that set gets picked?
Again, there are a few possible factors here, but the most important factor is event frequency. Each event is assigned a frequency number — usually around 100 as a baseline, but it depends on the set. These numbers are all just relative to each other, so it's basically a weighted random pick. If we have Event A with frequency 100 and Event B with frequency 50, then think of a hat where Event A is written on a hundred slips of paper and Event B is written on fifty slips of paper, and then we reach in and pick just one slip of paper.
The combination of frequency and other conditions sometimes makes an event's actual likelihood difficult to predict. For example, if an event has a frequency of 1000, but it depends on a rare type of NPC being present, then it's still pretty unlikely! So, boosting the frequency of an event that's firing too infrequently often only goes so far — sometimes, it's other conditions that need to be addressed. This isn't always obvious when just staring at a bunch of code and database info, so I rely a lot on player feedback to determine when an event isn't firing frequently or reliably enough.
As the final part of the process, each event is associated with a passage. When an event is picked, the player is forwarded to its passage and the game proceeds from there. Exceptions apply: sometimes an event set is used in a different way, such as during adult streaming or with the bulletin boards, but I won't go too far into the weeds here.
Anyway, since events are so important to how the game works, I thought I'd write down this little summary of them. I hope someone finds it interesting!
Your comments
You all have been going nuts with the comments lately — and that's great! It's hard to respond to all of them, but I try to drop a short note or at least a like when I can. At the very least, I do absolutely read all of them. Much of what's been commented here lately has made it onto my shortlist for monthly update fodder, so I hope you'll be pleasantly surprised next time I drop a changelog!
Anyway, that's all for this week. I'll close by saying what I always say, and I really do mean it — thank you all for your support, it truly does mean a lot, and it's all of you who make this project possible. Have a good weekend and see you next week!