Procedural RPG OT: every action has consequences

Viewing single post

Started by Legend, Apr 20, 2019, 09:02 PM

previous topic - next topic

Legend

I'm reworking the conversation system to make it more accessible and simultaneously deeper.

It is now a more traditional conversation where the NPC gives you a text response and you have a few text options to respond with.


Code: [Select]

NPC "Hello traveller"

"It's nice to see a friendly face"
"Show me your wares"
"Anything I can help you with?"
CUSTOM



I might quickly abandon this idea but along with a few default options, I'm going with full on freeform conversations where you can say whatever you would like!!!

It's not as crazy as it sounds. The game uses an internal language for all communication. This language is essentially a programing language with how it is set up. Only very specific words can be used and the structure is rigidly defined.

This internal language can be translated to English with some flavour text thrown in depending on the speaker and the situation. It cannot translate from English to this language.

The above conversation in the internal language could look like:


Code: [Select]

NPC "Greeting"

"Greeting"
"Ask wares"
"Ask help"
CUSTOM



It's a very simple internal language. From the game's point of view, it is very easy to understand what is being said and how things should react.

As the player, it allows the game to be quick and traditional when it's acceptable and slow and methodological when specific things are desired.

Instead of clicking on a response and directly saying/executing it, the player can click to edit the response first. For example.

Code: [Select]

NPC "Here is all I have to sell"

"Buy apple for 10 gold"
"Buy bread for 15 gold"
CUSTOM


Code: [Select]

NPC "Response wares"

"You give me apple and I give you 10 gold"
"You give me bread and I give you 15 gold"
CUSTOM


The response could be edited to "You give me apple and I give you 9 gold" if the player wants to haggle for example. Then all the calculations behind the scenes can determine if the NPC accepts.

By writing a custom response from scratch, the player could say "You give me your shoes or else I cut your legs off" and take the conversation in a completely different direction. Once the internal language is set, it can be parsed into a less wordy representation in English.


I'm not sure how exactly the internal language should be written, but I'd probably go with drag and drop blocks. Verb will have one or two slots for subjects and they can be joined with logical connectives. Essentially it is ((clause && clause) || clause) > clause which the AI can evaluate without a problem.


Because this system makes dialogue such a powerful tool, a lot of actions can be handled exclusively through dialogue. Talk to party members to give them instructions, talk to yourself to do things or initiate an auto pilot of sorts, leave notes around the game world, etc.



Heck if you thought custom dialogue was crazy, I'm even thinking of having all communications go through messengers. If a king is killed, everyone does not instantly know. Instead messenger birds would need to be sent out. On that note, I should also program it so that communication can work across species. Simple commands could work with animals but more complicated ones would not (unless the speaker is speaking the animals language).

This game is so bloody over the top and yet I think I'm going forward with it lol.