Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

procedural dialogue generation?

Twiglard

Poland Stronk
Patron
Staff Member
Joined
Aug 6, 2014
Messages
7,237
Location
Poland
Strap Yourselves In Codex Year of the Donut
Can state-of-the-art natural language processing feasibly be used to generate dialogue, at all?

Of course, one could go for multiple versions of the same text, using different phrasings for the working class, nobles, bandits and use placeholders. But this is the old approach that doesn't scale well and produces bad results anyway.

Are there any particular papers on generative NLP I could use? Best if a solution is purely symbolic, or at least hidden markov model-based. Neural networks are opaque after training :(
 

Ysaye

Arbiter
Joined
May 27, 2018
Messages
771
Location
Australia
Probably not yet, certainly not enough to meet the stern requirements of a codexer's expectations of what dialogue should be provided as to be described as adequate.
 

Gunnar

Arbiter
Joined
Jul 10, 2016
Messages
819
Caves of Qud guys use procedural generation for building histories and also to create text in books. That sounds much simpler to do than procedural speech generation. And it sucks. So probably not.
 

Bester

⚰️☠️⚱️
Patron
Vatnik
Joined
Sep 28, 2014
Messages
11,097
Location
USSR
Can state-of-the-art natural language processing feasibly be used to generate dialogue, at all?
https://blog.openai.com/better-language-models/

Read the example that their model produced:

System Prompt (human-written)
In a shocking finding, scientist discovered a herd of unicorns living in a remote, previously unexplored valley, in the Andes Mountains. Even more surprising to the researchers was the fact that the unicorns spoke perfect English.

Model Completion (machine-written, 10 tries)
The scientist named the population, after their distinctive horn, Ovid’s Unicorn. These four-horned, silver-white unicorns were previously unknown to science.

Now, after almost two centuries, the mystery of what sparked this odd phenomenon is finally solved.

Dr. Jorge Pérez, an evolutionary biologist from the University of La Paz, and several companions, were exploring the Andes Mountains when they found a small valley, with no other animals or humans. Pérez noticed that the valley had what appeared to be a natural fountain, surrounded by two peaks of rock and silver snow.

Pérez and the others then ventured further into the valley. “By the time we reached the top of one peak, the water looked blue, with some crystals on top,” said Pérez.

Pérez and his friends were astonished to see the unicorn herd. These creatures could be seen from the air without having to move too much to see them – they were so close they could touch their horns.

While examining these bizarre creatures the scientists discovered that the creatures also spoke some fairly regular English. Pérez stated, “We can see, for example, that they have a common ‘language,’ something like a dialect or dialectic.”

Dr. Pérez believes that the unicorns may have originated in Argentina, where the animals were believed to be descendants of a lost race of people who lived there before the arrival of humans in those parts of South America.

While their origins are still unclear, some believe that perhaps the creatures were created when a human and a unicorn met each other in a time before human civilization. According to Pérez, “In South America, such incidents seem to be quite common.”

However, Pérez also pointed out that it is likely that the only way of knowing for sure if unicorns are indeed the descendants of a lost alien race is through DNA. “But they seem to be able to communicate in English quite well, which I believe is a sign of evolution, or at least a change in social organization,” said the scientist.

Of course it's one thing to write dialogue through AI, it's another to actually understand the implications of what is being said, so it can affect the world accordingly.
 

Tigranes

Arcane
Joined
Jan 8, 2009
Messages
10,350
Yeah, the new OpenAI thing is an example of something you could use to write dialogue in the future.

The problem for fantasy/fiction games is to have the right training data that they can talk about Quds and Ballsuckers instead of Humans and Dogs, which isn't as simple as just exchanging the names. Possibly for Forgotten Realms it could be done, but you wouldn't really have a coherent lore, just a sprawling mass of plausibly FR/D&D sounding nonsense (which might be all you want).

You'd also be assigning each specific piece of dialogue to this AI, reading it through, then putting it all together, meaning a fair amount of 'managerial' work involved.

(Or, instead, you could use GPT-2 above to shitpost on the Codex...)
 

Burning Bridges

Enviado de meu SM-G3502T usando Tapatalk
Joined
Apr 21, 2006
Messages
27,562
Location
Tampon Bay
You can apply procedural generation to any form of art, it comes out more or less as

Attempted_restoration_of_Ecce_Homo.jpg
 

laclongquan

Arcane
Joined
Jan 10, 2007
Messages
1,870,150
Location
Searching for my kidnapped sister
Dear god no!

OP's bright idea can be expressed like this "can this code generate more shitty dialog for gamers to ignore?"

Game Writings are serious feature that nothing/noone can fix once it's written. You NEED actual writers to do it, and go through it, to make halfway decent writings for gamers to tolerate. Not auto-generated texts.
 

Twiglard

Poland Stronk
Patron
Staff Member
Joined
Aug 6, 2014
Messages
7,237
Location
Poland
Strap Yourselves In Codex Year of the Donut
Within a full-blown RPG, this would be an awful idea. It's different for a procedurally-generated world with NPCs given tasks by priority scoring code. I'm worried that doing variations would lead to combinatorial explosion in the end.

Maybe dialogue could be Morrowind-style as a substitute, without paying any attention to tone or language used. Neutered language like in MW is easier to manage and keep from being totally awful.

Overall this is probably harder than keeping NPC towns from breaking down for stupid reasons.
 

redactir

Artist Formerly Known as Prosper
Joined
Jul 16, 2018
Messages
696
The good and bad writing comments are offtopic. It's like worrying about the font being pretty or stylized.

Here's all you need.
item 1) The discussion about dialog itself. The choice of one thing over another, and reference to the past.
item 2) A working live mapping of a table of dialog options to external conditions.
item 3) A video game which exists in the first place. It serves the role to destroy the conversation or shape events the table refers to in item 2.
item 4) A constant mini-game for the dialog to further restrict the dialog. The life and death of why some things if true are talked about over others which are true. (usually thought of as the agency component)
 
Joined
Jan 14, 2018
Messages
50,754
Codex Year of the Donut
Caves of Qud guys use procedural generation for building histories and also to create text in books. That sounds much simpler to do than procedural speech generation. And it sucks. So probably not.
Dwarf Fortress does this to a much greater extent. It's pretty alright, but it's also heavily constrained and guided. It also simulates the lives of a lot of "great" figures which add to the history.
 

J1M

Arcane
Joined
May 14, 2008
Messages
14,626
If the dialog is meaningless, maybe don't include it. Games these days have too much writing (possibly because that's the only thing diversity hires can do).
 

adrix89

Cipher
Joined
Dec 27, 2014
Messages
700
Location
Why are there so many of my country here?
It depends on what you need to use it for.

If you want it in a completely procedural sandbox world then it can work if its role is to present information.
Information is just serializing data of the state of the world at the moment and formatting it a bit and adding a bit of fluff so it's not that complicated. Dwarf Fortress is an example that presents a butload of information.

For dialog itself between two characters you are better of with abstracting it into a some kind of mini-game, like a social combat game or like The Sims.
When you need a function just implement the function, like barter, bribes, orders, ask for rumors, and other kind of actions and verbs. In 4X games this kind of Diplomacy options are common.

For NPC to NPC simulation you only have to take into account information propagation for things like rumors,events, relationships and reputation.

You can also go more in depth and use a restricted scripting language to make custom responses where the system is constrained enough that the AI won't have much difficulty, basically it's sorta like a mini-game with a scripting language.
If you look at how this own forum uses the rating system with the brofists and smiles is an example system like that.
 
Last edited:

redactir

Artist Formerly Known as Prosper
Joined
Jul 16, 2018
Messages
696
I like what adrix said. I think this is maybe the most important topic of this century.

A long time ago a men asked, what would it take for every npc to capably discuss what it should from just observation? How do we capture the reactivity if NPC's don't know things innately?

First they must be able to understand what's out there within some proximity.

For example what is around you as you move through the game?

Games might attach tags and keywords to help locate certain object types and identify their roles. This is helpful to the programmer/scripter actually.
Most impressively we could just pile on the tags which amounts to more detailed information on what is looked at.

Anyone can do this work after the world is built.

==


Assuming:
a) The npc can pull up information from any nearby objects meeting certain descriptive categories
b) The npc can inspect the properties for specific states or ranges of values

You can immediately begin writing reactivity in the dialog which includes referencing actual things that are happening.

==

Memory is a problem. Keeping a log of what happens around an NPC, for every NPC, can be a problem. What's worth knowing, how long do you keep that information available?
I'd recommend aim for short term reactivity.

==

To makeup for shortcomings in memory, NPCs can be given a mini-game to play. Sort of sim city meets the old school text-only adventures. This runs in the background.
All the NPCs should play in this mini-game, so it appears they have the similar record of events and so have reactions that are logically consistent.
==

redacted
 

adrix89

Cipher
Joined
Dec 27, 2014
Messages
700
Location
Why are there so many of my country here?
Memory is a problem. Keeping a log of what happens around an NPC, for every NPC, can be a problem. What's worth knowing, how long do you keep that information available?
I'd recommend aim for short term reactivity.
A scheme you can use is to just have the world state and maybe a compressed history log and just let NPCs selectively interpret that data based on their own personality and context.
That way you only have the global data and its not dependent on the number of NPCs.

NPC "Awareness" is just the filter and selection algorithm so it's not that much of a problem.
 

redactir

Artist Formerly Known as Prosper
Joined
Jul 16, 2018
Messages
696
Memory is a problem. Keeping a log of what happens around an NPC, for every NPC, can be a problem. What's worth knowing, how long do you keep that information available?
I'd recommend aim for short term reactivity.
A scheme you can use is to just have the world state and maybe a compressed history log and just let NPCs selectively interpret that data based on their own personality and context.
That way you only have the global data and its not dependent on the number of NPCs.

Context is deceptively NOT simple. But if the context is the NPC's current awareness of what's around them, personality still needs to be based in a number of things.

This is where mods and games get separated. There are no assurances on what is supported.

Further if the personality is part of the solution, then our procedural dialog generation doesn't have a general solution.
 

spectre

Arcane
Joined
Oct 26, 2008
Messages
5,407
Well, he's a pretty good example what can happen when you do have procedural dialogue generation.
 

redactir

Artist Formerly Known as Prosper
Joined
Jul 16, 2018
Messages
696
Well, he's a pretty good example what can happen when you do have procedural dialogue generation.

Truth be redacted, most human crafted dialog can be completely trounced in dialog sophistication, wit, and variety in a single session of scripting.
 

Twiglard

Poland Stronk
Patron
Staff Member
Joined
Aug 6, 2014
Messages
7,237
Location
Poland
Strap Yourselves In Codex Year of the Donut
Thanks guys. :salute:

Well, he's a pretty good example what can happen when you do have procedural dialogue generation.
When I read the topic title I was thinking, "No, you don't want procedural generated dialogue."

Yeah. I was hoping for some NLP breakthrough research. Go figure. The neural network stuff is useless for me given it doesn't lead to any formalism.

If you want it in a completely procedural sandbox world then it can work if its role is to present information.
Information is just serializing data of the state of the world at the moment and formatting it a bit and adding a bit of fluff so it's not that complicated. Dwarf Fortress is an example that presents a butload of information.

It's a good idea in principle. I have reservations with regard to DF's generated text. It's poorly formatted, overly verbose, and then there are these absurd sculptures.

Dear gods, who dare summon the Prosper?

I wonder if he's in-character or does he really need help.
 

redactir

Artist Formerly Known as Prosper
Joined
Jul 16, 2018
Messages
696
Thanks guys. :salute:



Yeah. I was hoping for some NLP breakthrough research. Go figure. The neural network stuff is useless for me given it doesn't lead to any formalism.



It's a good idea in principle. I have reservations with regard to DF's generated text. It's poorly formatted, overly verbose, and then there are these absurd sculptures.



I wonder if he's in-character or does he really need help.

Help? What help is there?

If you haven't been irradiated by the abyss you haven't stood long enough at the precipice.

Jumping over isn't the same as knowing what's down there. Give me procedural dialog over procedural cowardice any day.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom