Conviction Chronicles blog post #48 - Character planning system + Backend romance system
This was a good amount of code, but it ended up working better than I thought.
What is this?
Basically this is a forced planning system for the backend's character AI that forces them to use their past, relationships, perspectives, and more to determine what they should do.
Perspective system
Every time an AI meets with another or the player, they get a gathering of their susceptibility and charisma with some other factors to determine strength perspective. This changes every time an interactions happens as it's refreshed.
Group Intelligence
The intelligence system needs more work, but basically it determines the mental intelligence of someone from 1-200. The more intelligent they are, the more likely they will stick to a plan. And factors like doing certain actions will increase or decrease intelligence. This is mainly so there is more of a negative to getting injured and such for the character AI.
Relationship system
Every motive there is a chance for a relationship check, which determines how much everybody likes and dislikes each other with a tagging system. This also makes a rival the least liked and an obsession aka best friend the most liked. Romance is also defined here which has a temporary romance and a true romance.
Temporary romance happens when it's selected once. It's temporary and isn't fully committed into the code, but more of holding it for the future. If it makes the next temporary romance the same as the previous one, then it's converted into a true romance which cannot change. This means they have committed romantic feelings for another character. This is mainly so they can have some sort of romance events outside of the player automatically in the background. If the player romances them, it's set to the player no matter what unless their relationship is bad, which in case they can get out of their committed feelings.
Romance events mostly won't happen unless this true romance is set to both. Let's say Agatha and Cross have this committed romance for each other, then they would enter a romance. If Agatha has a committed romance for Cross but Cross doesn't for someone else, then she would make whoever Cross romanced a Romantic Rival. Romantic Rivals are more stronger than normal rivals, if the character has high susceptibility, they will almost always be aggressive against Romantic Rivals. Naturally, this does give characters, like Emma, a bias to have the potential to become a yandere. This isn't very forceful, so committed romances between characters won't be extremely common. A Yandere situation with a Romantic Rival is going to be extremely rare. It's fun to have the potential for it hidden away.
I'm hoping this add a very diverse set for romances overall to make this an extra layer of dynamic storytelling. I'll probably add some sort of bias system for romances as well to make it a little deeper.
Planning system
Plans never repeat and it uses a bunch of information from what items are being held, to what was done in the day, and more to determine what is the best plan. It also cannot repeat plans twice in a row. For example, if they interacted with their rival and saw that they seem stronger than themselves, they wouldn't be direct with attacking them. If they feel they don't have enough friends, they will try to hang out with as many people as possible if it fits their personality. Sometimes they will be defensive or actively try to install an airvent trap into someone else's room.
This doesn't run all of the time, depends on the intelligence levels it will use the code already made beforehand or will use this instead.
The way this works is it uses different events to run actions than what the base code does as an alterative way, and code is added to previous actions to be more forceful with certain things. If a plan needs a weapon, when crafting, the AI will attempt to craft a weapon first.
Once a plan is done, a new plan is created. If it takes too long, the character's can choose to make a new plan for themselves as well.
Anything else?
Parts of this makes it much easier to do future sorts of dialogue. Mainly with adding onto the interaction system for talking to people in the hallway, but also for seeing a dead body for the first time. I've had the art done for the corpses already for a while, so I might as well implement it. There is also the rest of the motives for the motive system before focusing on anything bigger. The corpse viewing and the new interaction system addon has to be done before the rest of the motives.
I'm also getting the cover art replaced with something new, the previous cover art doesn't showcase anything about what the game is about, along with being awful for certain capsule sizes. I've also replaced the logo with something so much better. Certain other things needs the art done before they can start as well. I figured out one thing I want to implement into the demo, but it's going to be a long while before I remotely even start doing that overall.
Still a massive chunk of work ahead of me. But every new thing of progress has been beneficial and worth it so far. I also did some bug checks and such for the character AI action system, I haven't gone through it all yet.
The demo is being updated with the new logo as well.
Comments
Post a Comment