CreatorsOk
ShadowRx
ShadowRx

patreon


A (not so) far-fetched idea for gameplay...

I have a feature idea for way down the road... but it might be possible to add a light-weight version of it sooner.

Obviously there's a lot to parsing and interpreting text, but it generally needs to fall into a series of regular branches. It will either contain a command/sequence of actions, or be a message/reply. So if we have the system try to interpret the input one sentence at a time, and either take the action if it makes sense, or speak the message if it doesn't seem to be an action... and then respond to keywords/context in the message if it can make sense of it- then we should have a pretty fun and slightly crazy game mechanic.

The first version would simply be a custom dialogue response used in encounters/situations.

The next step would be to have the target used as a context and have it respond based on it's mood, loyalty, and knowledge of whatever topic keywords it can make out.

Over time we could make the system better at interpreting simple phrases...

At some point we will be ready to tie it in to the action system, and have it detect whether the phrase/sentence in question is a command.

We could use some basic syntax/structure rules, especially in the beginning, such as any sentence ending in "?" or "!" should be spoken, with the former being asked and the latter being a demand. Also, we might use a simpler to parse structure like:

[command] [target] [OPTIONAL: syntactic sugar, or command-modifier] [OPTIONAL: sub-action] [OPTIONAL: secondary or sub-target]

This could, in theory, handle phrases like:

tell | her | to | go | away

or 

kick | him | in the | nuts

such that, as a phrase without punctuation, or ending in a period, it should be interpreted as 

[action: kick] [target: him] [modifier: in the (invoke sub-targeting)] [sub-target: nuts]

The shorter phrase: "kick his nuts" should parse or alternate "kick him in his nuts" should parse to the same sequence, with "his" being the syntactical shortcut for "him in his". In any case this punctuation assumes you will be the one taking action.

Whereas "kick him in the nuts!" would shout-to/command your current (vocal) target to take said action, and "kick his nuts?" would ask your current (vocal) target about taking that action.

We could later add some common slang/alias commands...

For example, the phrase "kick his ass" would be interpreted as literally targeting his buttocks for a single kick-action. But, if we include that alias/slang with the translation "beat [target] until [target] cannot fight back".

That, along with building a general lexical database of targets, actions, etc., would be an ongoing process, but this isn't anything new; MUDs have been doing exactly this for a very long time.

Eventually, such a system could mature to the point that the entire game could be played from an input console, and one could use the microphone on their mobile device, or some other speech-to-text input for gameplay.

But, at the very least this could give you guys a way to add your own dialogue into whatever scenes/situations you encounter, which could be a lot of fun.


Implementation:

Phase 1: add a custom-input action to the action menu, invoke it in some scenes/situations for things like riddles and pass-phrases, and add a keyboard shortcut to bring up a/the console-input text-box (such as the backtick/tilde key `~ used by a lot of older FPS games); Later we might be able to have an input-context that is hidden and auto-submits after a few seconds of inactivity or the enter key, to flow better with speech-to-text input. During this phase all input would simply be given as dialogue, and your target would not react at all.

Phase 2: have your vocal target try to interpret keywords and context, weighing their response with their mood, loyalty, and other biases- eventually including a subject-knowledge system (they can't tell you what they don't know, after all). Here, your target would try to react if they understood part of the input, otherwise ignoring it. In either case it outputs as spoken dialogue from your character.

Phase 3: build a syntax parser and lexical database to begin actually interpreting the input, rather than just reacting to keywords... at this phase it will suggest the action it thinks you mean, without actually taking it, as we get the nuts and bolts of this cobbled together. We might use a modifier key during this phase to distinguish commands from dialogue, such as the "/" key used by WoW. Obviously our long-term goal is to be able to avoid these kind of pre and post punctuations, and allow the system to respond to spoken phrases as translated to text.

Phase 4: tie it into the action/command system, and have it try to interpret the phrasing as commands or dialogue, and pass them along to the appropriate handler on a sentence by sentence basis. Any unrecognized commands would have to be assumed as dialogue, while any recognized ones would be output to the log with a different formatting to distinguish it and not take away from the conversation.

Phase 5: expand upon it to allow custom alias/slang phrases for (typically longer) commands and messages. This is a fun phase as it opens up the opportunity to save custom aliases/slang, essentially becoming a macro system for custom actions. Any player-provided aliases would override game-default aliases (with the option to revert), so that newly added ones do not clash with any you've made.

Phase 6: build on the various components of this to allow richer gameplay... all the while expanding the lexical database to allow pronouns, slang-terms/jargon, etc.

...

(Phase 99: be able to pay a team of far more skilled devs to add support for the characters, words, grammar, colloquialisms, punctuation, and slang of other languages, professions, and cultures.)

...

(Phase 999: develop text-to-speech-to-text format that captures mood, emphasis, pronunciation, accent, and other subtleties of speech that are currently lost in translation.)

...

(Phase 9,999: develop/tie in to a voice-printing system that can split a voice/instrument from the message, kind of like being able to compress a song into a midi or tracker-module format, and combine it back with a different voice. Such as being able to have the dialogue read back in a celebrity voice.)

(Phase 10,000: spend the rest of my life hiding from the NSA, CIA, and other agencies who are far too interested in this kind of technology, and it's possible implications to fake speeches/etc...)



Anyway, phase 1 should be pretty simple to implement, and should probably be made into a basic feature of the new UI. The later phases build upon other engine features that are still in planning/development, and would be implemented over time as the engine matures.


This might seem like it came out of nowhere, but I'm been thinking about adding MUD & voice interaction to a PSL-based engine for more than a decade. And it's not so much of a direct feature, as a tie-in to other planned and existing features. But who hasn't, especially with RPGs, wanted to add in their own dialogue, or ask an NPC specific questions??? Even if they completely misinterpret your intent, or stare back dumbfounded, it ought to be pretty entertaining.



More Models and Creators