Dev Diary #214: Traits, Mood and Consumables

Hello everyone, welcome to the first official dev diary for 0.5.0. I've been hard at work this week, working on the infrastructure required for mood. Currently, the mechanic is still being implemented as I need to add it to all of the existing content, but there is still a whole lot that was done and that I can talk about.

The first big thing added to the game was traits. The goal with traits, as mentioned in last week's dev diary, was to add different ways to lay the game and manage the mood system. Of course, a few obvious ideas came to mind, like the Health Nut trait, which inverts the mood effect from food, or the Femboy trait that gives a mood bonus if the player is crossdressing.

On the other hand, some traits were a little less straight forward, but felt necessary to add, like the Social Drinker trait. Those add an extra layer of complexity of course. But how do those account with the mood system?

Well, the mood system is a rather complex thing. While the player has a base stat, some of the modifiers essentially permanent (Optimist/Pessimist traits), while others are only temporary (smoking/drinking alcohol). This meant finding the sweet spot for when they happen. Status modifiers are thus coded to last a certain amount of time.

But what would happen if you get the same modifier twice? Well, I had to code an extra layer of checks to be certain there wouldn't be doubles, instead having them restart the timer. Then again, what if two items affected the same thing, like beer and and vodka both being alcohols? That was another layer. And what if that alcohol was drank with a certain trait on top? Another one! All in all, I think I managed to make something fairly clever there so you can't just stack all the booze values at once.

Every thirty minutes in game that pass is when the buffs/debuffs can expire, which was also a whole new thing. All of the effects triggered daily prior to 0.5.0, so it was a bit of a design challenge, but then again, it opens a lot of opportunities for the future, so I'm really happy with all this is all working out.

This makes mood a very dynamic system all in all, but it also means anything can affect it. The only way to make things work decently from here was to add some consumable items to affect mood. Of course, this meant adding cigarettes and alcohol to the game. While I could have stoped at one kind of alcohol, I figured it would be fun to have a couple more and have them be more or less effective and have a chance to affect other stats. Champagne, notably, can increase the bimbo stat when drank!

With this all in the work, I have to say I am really looking forward to add cool new mechanics. I'll see you all next week with the next progress update!