Tuesday, October 6, 2020

Some insight into Xulabarthath

Hi there,

I don't know about you, but sometimes I feel like Xulabarthath is a bit random in his activities... I know it's not, but I have a hunch his way of "thinking" is not immediately obvious to the player, and that's an understatement. It is true that I have been voluntarily vague in the main blog post.

This is why I'd like to give a little bit if insight about how he functions and how he chooses what to do next. I don't want to spoil but I don't want people to think the AI is bogus and he just acts randomly because he really doesn't. I've heard that concern only once though, it's not like everybody feels that way, maybe I'm just getting ideas.

Also, I don't want the game rules to be too opaque. You need tools to start thinking ahead of the game and to get the monster do to you exactly what you want, after all. This sort of "meta-game" is a game in itself.

If you prefer to ignore everything about how the AI functions, I recommend you stop reading here, nobody will blame you.

But if you're curious, read on.

Needs, Responses, Activities, Level

These are the most important data that the AI uses to figure out what to do next, what I call "Activities".

The Needs are the fundamental objectives that Xulabarthath must fulfill during a session. The Responses are updated each time you click on a dialog button. When you do, the response depends on what's going on at the time. For example, if you respond positively to being pleasured, then your "pleasure" response goes up.

Needs, Responses and main Activities have the same names. You even see that in the HUD's "activities" button (the one with a clock), the first eight buttons are those exact activities. The ones below them are sub-activities, simpler bricks the activities are built with. For example, the "gag" sub-activity is used by the "Bind" activity, while the "fuck pussy" sub-activity is part of the "Pleasure" and "Abuse" activities, and so on.

There are 8 Needs/Responses/Activities :

- Pleasure : The monster pleasures you mostly by teasing or fucking your pussy until you cum. He may also fuck your ass at the same time. If he needs to penetrate you, he will take care of pleasuring you first.

- Tease : The monster hugs or pleasures you but will be careful NOT to let you cum ! He will often tease you to the brink of orgasm then leave you wanting. Hehe.

- Breed : That one is pretty straightforward, the monster will fuck your pussy until he cums and impregnates you.

- Drug : The monster will put his tentacle in your mouth and either make you suck it or he will fuck it until he cums in your mouth. He may also fuck you in the ass at the same time. If you're already drugged enough, he will fuck your pussy instead.

- Pain : The monster may spank your ass, slap your pussy (if the tentacle is close enough because he is lazy), or even electrify you (provided you're not too pregnant as the monster does not want to hurt his baby).

- Abuse : This one is all about humiliating you and using you as his fuck toy. He will make you suck him, or fuck your mouth, or fuck your pussy (in which case he won't care if you cum, and if you are being punished, he won't even bother pleasuring you before penetrating you), or even force you to go through multiple orgasms !

- Bind : There are several ways to bind you. Find a more restrictive pose, coil more tentacles around your body, gag you, blindfold you... If the session ends and you are tightly bound, the monster will decide to toy with you a little more before releasing you.

- Strangle : The left leg tentacle coils up around your neck and strangles you until you yield, or if you're gagged by a tentacle over your mouth and nose, it will suffocate you instead. This activity can be chosen by itself without being a punishment for the moment, but this may change in the future.

As you may have noticed, half of the needs (hence activities) is positive ones while the other half is more suited for punishment. This is how the monster functions too. When you need to be punished, you can be sure one of the last four activities will be chosen to correct you. "Drug" is also one of the possible punishments. Some punishments are contextual, meaning they depend on what the monster wanted to do to you, or simply on where his tentacles are at the moment. For example, if you refuse to suck his cock, he will most likely strangle you. If you refuse to open your legs, he will most likely slap your pussy.

Between two activities, the monster may withdraw some tentacles to go back to a stable state.

There are plenty of cases where things won't or can't go as expected. For example, he can't drug you if you're gagged, he won't penetrate you if your gestation is too advanced, etc. When such a case arises, he switches to some contingency plan or another. This is where the AI shines, it adapts to the situation.

To calculate the final value of a Need (hence how many times it will be chosen as an activity), the AI adds the Need to your corresponding Response, factored by your Level.

I have hinted in the main blog post that your Level influences the way your own Responses were taken into account. To keep it simple, your Level is positive if it is Lady or above, negative if it is Heathen or below. Since your Responses are multiplied by your Level, this means a negative Level will make Xulabarthath have less need for activities that you responded positively to, and more need for the ones you responded negatively to. If your Level is positive, your Responses affect the monster's Needs the way you would expect and the monster will favor doing to you things that he knows you like. This is why keeping a good standing with the monster is important :)

The exception to this is the Response you give when Xulabarthath asks you what you want to avoid (that's the third question after starting a game). Any other choice than "Nothing" means the corresponding Response is considered to be a hard limit and the monster will not choose it because it inhibits the matching Need. For example, if you chose "Suffocation", you should never be strangled during this session even if the monster has a need for it (and even if strangulation was supposed to be chosen as a punishment). This inhibition does not depend on your Level either because a hard limit is a hard limit.



I have been very vague in the main blog post about this feature, which may lead to it being incorrectly used or not used at all (and in software development, a feature that is not used does not exist). But to explain it, you must know about Needs and Responses so here we are.

When you click on "Beg" on the book's menu during a game (you can't beg the monster if he's not here, right ?), you are presented with a menu with 8 buttons plus "nothing". Each of these 8 buttons corresponds to a Need/Response/Activity.

If you choose one which the monster has a high Need for, then the monster will appreciate you more, otherwise he will appreciate you less. And his appreciation is actually your Level. Please note that I wrote "has", not "had". This means that if you're begging to be made love to and the "Pleasure" Need is now low because it has been soothed, the monster will be irritated that you're so needy. It doesn't matter what the "Pleasure" Need was set to initially, what matters is its value at the time you beg.

Attention, each time you beg, the corresponding Need decreases a little so you will find out that begging for the same thing repeatedly is counter-productive since eventually your Level will take a hit. Better beg once for an activity you think the monster has a Need for. To guess that needs practice but if you read the descriptions of the activities above carefully, you will learn to recognize what the monster is doing at the time. Knowing that a Need is soothed (partially or completely) only when the activity ends, this helps you know when to beg and what to beg for.

In all cases, your chosen Response is increased by begging, as if you had responded positively to a dialog. In other words, begging is your way of making the monster ask you how you respond to the activity of your choice.


Choosing the next activity

When Xulabarthath must choose the next activity after the previous one has ended (or he must choose the first one), he looks at all his Needs, compounded by your Responses and Level and picks one of them randomly, weighted by the values of each Need (so a higher value has more chance to be chosen than a lower one).

Then he starts the corresponding activity, plays with you and then his Need is soothed, more or less depending on what happened and how you responded. When a Need is completely soothed, no matter your Response to it, it will no longer be chosen during this session.

When all the Needs are soothed, the session ends and Xulabarthath releases you. With the notable exception of being tightly bound, which will make the monster play with you a little more, because the "bind" need gets soothed progressively during the game (meaning the monster restrains you a little more, then does other things to you, then binds you further, etc). It would make no sense to end the game right after reaching the most restrictive bondage, right ? You want to enjoy it a little, I'm sure, so he takes advantage of you for a moment while you squirm in bondage.


When you start a game with the monster (not with the babies), a template is chosen. This template simply attributes values to the needs and this is what decides what will happen during the game. Some Needs are set higher than others to ensure they have a good chance of being chosen first. Likewise, other Needs are set lower than others to ensure they have a good chance of being chosen last. For example, the "breeder" template has a low (but not null) value in Breed, meaning the monster will do all kinds of things to you before going for the jackpot.

At the time of this writing, there are only a handful of templates and the choice is completely random, it does not depend on your Level. That's weak because one of the templates will make the monster be sadistic with you, which makes no sense if you're high Level.

So I'm currently working on it and will update this section once it's done. I want to add more templates and to make the monster choose one of them depending on your Level. It will still be random, but it will be a controlled random this time. Stay tuned.

I hope with all these explanations, you will no longer believe that Xulabarthath acts randomly anymore :)

Have fun !


PS : I repeat, I use the term "AI" loosely here. Technically the monster follows complex scripts (not in the LSL sense). There are a lot of "if we're in this situation then do this, and if it fails then do that instead, and if everything fails then here is the backup solution" instructions in the behavior trees. This is really like a video game AI, it is programmed exactly the same way. It is absolutely not a "I know the girl's pleasure is low and I want to make her cum, so let's examine my options" kind of AI. Let alone a "last time I punished her for being a brat, it went well so since she is a brat right now, let's punish her again" kind of AI.

In other words, this is a procedural AI instead of a declarative AI or a learning AI (except for the Responses which are taken into account, so there is a little bit of learning here). It is however still way beyond what we can do with a functional language like LSL (or even C#, C++, Python etc), because to write this sort of AI we need a language with a structure that is adapted for it, this is the structure we call "behavior trees".