View previous topic - View next topic |
Author |
Message |
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Tue Nov 02, 2004 3:15 pm Post subject: "Random" dialogs? |
[quote] |
|
Hi,
once I tried to make a space exploration game. I had a generator to create a whole galaxy of solar systems, all very nice - but then I hit the problem: scripting NPC dialogs for several 100.000 NPCs is impossible.
Reusing the same dialogs all over is boring.
Basically there are only few NPC types. Traders, public officers, barkeepers ... and finally some unimportant random people to fill the towns.
I'm looking for suggestions how to create non-repetitive dialogs for the NPCs types. I don't expect algorithmically (randomly?) generated dialogs to be very high quality, I just look for something that doesn't appall the players too much.
Any ideas?
|
|
Back to top |
|
|
Mandrake elementry school minded asshole
Joined: 28 May 2002 Posts: 1341 Location: GNARR!
|
Posted: Tue Nov 02, 2004 3:28 pm Post subject: |
[quote] |
|
The easist way to do it is to create a generic sentance structure for each character "type" and replace a few random words here and there. I mean, how many different things is a trader going to say? One way to trip up the character (and to spice up the game a bit) would be to also allow for random ancedotes from the traders life. This could add a bit a of background, but be much more work on your behalf. It would also have to be used rarely or else teh ancedotes would get repetitive. Mayb one out of every 100 times you talk to a trader he will throw in a random daily ancedote (like, "I wish I was at home with my wife and kids instead of trolling across the universe selling junk to people like you", or "How's the space weather outside? Cold and empty?"...heh, of course yours would be a bit more serious).
The idea for a generic sentance structure would be like this:
"%greeting, We have a %object on sale today. %closure"
And then it would randomly replace %greeting with "Hello", or "How are you?", etc etc. %object could be replaced with "Heal potion", "Space Slave Oil", etc etc, and closre could be "So what would you like to buy today?" or "Can I help you".
You could then have four or five sentance structures that it randomly picks from and randomly inserts words into. This wouldn't be perfect, but not completely repetitive either. _________________ "Well, last time I flicked on a lighter, I'm pretty sure I didn't create a black hole."-
Xmark
http://pauljessup.com
|
|
Back to top |
|
|
Bjorn Demon Hunter
Joined: 29 May 2002 Posts: 1425 Location: Germany
|
Posted: Tue Nov 02, 2004 3:30 pm Post subject: |
[quote] |
|
Well, one thing I'd like to say about this is that when you somehow manage to produce interesting things to say by NPCs at random, you'll want to make it so that the player can't learn all there is to your system by just talking to a single character. You'll have to do something to make each character only so interesting so that it'll still be interesting to talk to another one.
Other than that, there's probably going to be a limited amount of topics the player can ask an NPC about. I'd suggest listing these and putting down related useful knowledge and how it can be obtained from your generated universe.
Finally, when you have determined what somebody will talk about, you'll have to put the information into sentences. There's grammar and sentence structure to worry about here, but also speaking style. Again, you'll want a certain character to keep to its talking style, possibly based on the region it's from.
I probably haven't said anything you didn't know already, but I tried to give a description of the problems involved. I'm interested in this matter as well, only in the sense of a regular fantasy world instead of a universe.
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Tue Nov 02, 2004 4:01 pm Post subject: |
[quote] |
|
One thing I'd link to the dialogs is the non-combat AI. My NPCs have an idea if they are hungry, tired, dirty, want to go learning/training, want to meet other NPC.
I think this should be a basis to create simple smalltalk. Hungry -> talk about eating, maybe ask where to find a restaurant? Unfortunatley my ideas are much too blurry to code them.
The other idea was to keep a history of world events. E.g. the players ship was attacked by space pirates -> local news reports it, and the NPCs will say things related to latest space pirate activities?
It sounds easy, but I didn't really found a way to code it. The problem is the visibility of events. A NPC should not talk about events he can't know about.
Mandrake, your sentance template idea should at least solve the worst problems. I can use it immediately. Thank you!
|
|
Back to top |
|
|
Mandrake elementry school minded asshole
Joined: 28 May 2002 Posts: 1341 Location: GNARR!
|
Posted: Tue Nov 02, 2004 4:11 pm Post subject: |
[quote] |
|
No problem. Well, that other idea will be a bit tricky when randomly generating characters (giving them world knowledge)...but could be be approximated by using regions of knowledge for an NPC and each action that the player has also has fame factor. Now, when the player performs X action, it would use a message board style system, which is basically a que of actions that could be done in either a class or a struct. example in psudeo code:
Code: |
struct message
{
string action, string did, string object;
int area, int fame;
}
|
and this could be put onto the que whever an action is committed. How would this be used in game? Well, back to our old friend the sentance structure. When a player talks to an NPC that lives in an area that would know about the action (each NPC has an area int that would cover an area of knowledge), and the NPC has a knowledge rating less then or equal to the fame rating (ie: how well he would pay attn to such things), then it would call up an action sentance structure and replace words with the message above. So we could do:
"$greeting, I heard you $did $action to $object, impressive"
And that could be replaced with a random gretting and then the varaibles above describing the action. You could even give each action a karma basis so that it can effect the reaction of the NPC to being either negative or positive. _________________ "Well, last time I flicked on a lighter, I'm pretty sure I didn't create a black hole."-
Xmark
http://pauljessup.com
|
|
Back to top |
|
|
Mandrake elementry school minded asshole
Joined: 28 May 2002 Posts: 1341 Location: GNARR!
|
Posted: Tue Nov 02, 2004 4:41 pm Post subject: |
[quote] |
|
I just read about your H-world project just now, and I must admit it's pretty interesting from an AI-random world point of view. Very nifty. If you need help, just ask. I can't do anything too time consuming, but I can code some snippets or just suggest solutions to problems. _________________ "Well, last time I flicked on a lighter, I'm pretty sure I didn't create a black hole."-
Xmark
http://pauljessup.com
|
|
Back to top |
|
|
Rainer Deyke Demon Hunter
Joined: 05 Jun 2002 Posts: 672
|
Posted: Tue Nov 02, 2004 4:43 pm Post subject: |
[quote] |
|
In games with a reasonable number of npcs (less than 100), the player will talk to every one of them, and expect different dialogue from every one of them. In a game with 100000 npc, this is obviously ridiculous, so the question is, what purpose do the npcs serve? Why would the player want to talk to them?
I think randomized dialogue is probably not the right approach here, as it will lead to the player either ignoring your npcs (wasting all of your hard work) or brute force attempts to see every line of dialogue (wasting the player's time). If the npcs have nothing important to say, it would be better if the player can't talk to them at all.
|
|
Back to top |
|
|
Mandrake elementry school minded asshole
Joined: 28 May 2002 Posts: 1341 Location: GNARR!
|
Posted: Tue Nov 02, 2004 4:56 pm Post subject: |
[quote] |
|
Actually, if you would read teh kind of game he's trying to create you would see that it makes sense. He's not creating a console-style RPG with heavy NPC-based plot interaction, but more of the older exploration based RPG's (with an emphasis on random world creation). It makes sense. He is trying to create a random persistant world with a very high level of interaction between player and world and trying to create a persistant realistic world where NPC's get hungry and sleepy and enemies can move in packs or alone. _________________ "Well, last time I flicked on a lighter, I'm pretty sure I didn't create a black hole."-
Xmark
http://pauljessup.com
|
|
Back to top |
|
|
Rainer Deyke Demon Hunter
Joined: 05 Jun 2002 Posts: 672
|
Posted: Tue Nov 02, 2004 6:41 pm Post subject: |
[quote] |
|
I've played a fair number of "random world" rpgs. (I wouldn't call them exploration based, since exploration is only interesting when you find designed content, not random generic dungeons.) I've never found the npc dialogue in them to be interesting, even when it wasn't randomized, but especially when it was. If an npc doesn't have something interesting to say, it is better if he doesn't say anything than if he gives the player more useless information to process.
|
|
Back to top |
|
|
Mandrake elementry school minded asshole
Joined: 28 May 2002 Posts: 1341 Location: GNARR!
|
Posted: Tue Nov 02, 2004 6:47 pm Post subject: |
[quote] |
|
Still, it's an interesting idea programming wise. _________________ "Well, last time I flicked on a lighter, I'm pretty sure I didn't create a black hole."-
Xmark
http://pauljessup.com
|
|
Back to top |
|
|
white_door Icemonkey
Joined: 30 May 2002 Posts: 243 Location: New Zealand
|
Posted: Tue Nov 02, 2004 7:27 pm Post subject: |
[quote] |
|
An example of such is in morrowind. It used the word topic conversation system, where you could pick words and the npc would respond. This works fine for most generic npcs.. my only problem was it was frustraiting dealing with important plot characters where they would still say the same old things.
Personally I would give all the npcs generic titles ("Angry Scientist", "White Chick", ... etc) except for important and interesting ones in which I would give unique names and custom dialog. This comes down to what you want to do. For the generic npcs, maybe one could have an bank of information about their planet and area, and the game could choice which types of topics they would discuss based on their personality, race, professian, wealth level, status, ..etc.. Hopefully there would be enough mix and matchs that it would take conversations with a wide number of different npcs before you started to get bored with total repeats.
|
|
Back to top |
|
|
LeoDraco Demon Hunter
Joined: 24 Jun 2003 Posts: 584 Location: Riverside, South Cali
|
Posted: Tue Nov 02, 2004 8:51 pm Post subject: |
[quote] |
|
You might want to look into Markov Chains; with a sufficient database of sample data, they can produce interesting, amusing, and (at times) grammatically correct sentences in the style of the original data.
I have an example program here; while it really isn't as polished as it could be, and lacks a sufficient amount of sample data to do anything overly fantastic, it does get the point across. _________________ "...LeoDraco is a pompus git..." -- Mandrake
|
|
Back to top |
|
|
Mandrake elementry school minded asshole
Joined: 28 May 2002 Posts: 1341 Location: GNARR!
|
Posted: Tue Nov 02, 2004 9:01 pm Post subject: |
[quote] |
|
two years ago I wrote a scripted chaos engine, which could create random text from an input text and used lua to script it. It was supposed to be a tool for experimental novelists I knew. It included a markhov chain algorythm.
But, I don't think it would work quite right- heh. It's still very gibberish sounding, just a bit more grammatically correct, and can actually become repetitve after awhile.
I was going to use a markhov chain algorythm for a character in one my games who was insane, using Dubliners and Alice: Through the Looking Glass as input for the text. _________________ "Well, last time I flicked on a lighter, I'm pretty sure I didn't create a black hole."-
Xmark
http://pauljessup.com
|
|
Back to top |
|
|
biggerUniverse Mage
Joined: 18 Nov 2003 Posts: 326 Location: A small, b/g planet in the unfashionable arm of the galaxy
|
Posted: Tue Nov 02, 2004 9:15 pm Post subject: |
[quote] |
|
Markov generator wrote: |
It doesn't matter if you are to believing that I'm some self-important elitist intellectual or something. I'm really impressed. :P
It's an ALGORITHM for cryin' out loud! Its use depends on your own or you don't use a webstart client yet or not? Although the reason I wanted to use Tiled is that some players actually make adequate use of the reasons why.
Also- it is meritous, I will continue to share INTP understanding with the rest of the design and concept to RPGDX. It’s a half-assed wannabe hack.
Bjørn:
Although I realize your position on "reinventing the wheel", I must take issue with SoC III. I'll try again, though. You're a legend, if you are gunning for in terms of the question. Even if we should start coding until we have crippleware that can't even run a mouse in its IDE; DARKBASIC, NBASIC, and a crop of still others so fraught with bugs that no one seriously considers them as being non-destructive personility leanings, or destructive personility leanings.
|
Tiled, RPGDX, SoCIII, and the word "Bjørn". Genius. It's like putting Mandrake and LordGalbalan in a blender and sprinkling the result with sugar. _________________ We are on the outer reaches of someone else's universe.
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Wed Nov 03, 2004 8:40 am Post subject: |
[quote] |
|
Mandrake wrote: | Actually, if you would read teh kind of game he's trying to create you would see that it makes sense. He's not creating a console-style RPG with heavy NPC-based plot interaction, but more of the older exploration based RPG's (with an emphasis on random world creation). It makes sense. He is trying to create a random persistant world with a very high level of interaction between player and world and trying to create a persistant realistic world where NPC's get hungry and sleepy and enemies can move in packs or alone. |
H-World/The Jungle is a bit different from the space exploration game idea. Both use the same engine, but the ideas are different.
"The Jungle" is a fairly traditional hack&slash dungeon crawler, with a simple (almost nonexisting) background story and a few NPCs thrown in to display the engine dialog features. It currently has less than a dozen NPCs and all use fixed, scripted dialogs. It'S not even a game, more or less a demo of the H-World engines features.
The space exploration game is inspired by games like "Sundog: The frozen legacy", "Elite" and "Frontier". It features a rather large game world, too large to have a noticeable amount of scripted content. The idea is gain social reputation by doing research of alien artifacts. Combat shall not be a core part of the game, but it will be unavoidable at some point. The players activities will be searching for alien artifacts to research, doing the research and publishing the results to gain reputation.
Side tasks are to get money to upgrade the ship and the research equipment. That means to accept (random) missions from NPCs who will pay the player. Some of the missions could be intersing and/or dangerous, thus be an intersting part of the game, too.
I'm thinking about side careers as head-hunter or space miner, but that's just thrown in for diversity and to suit different playing styles.
NPCs in that game server mostly as a background stage - a city has to have inhabitants, and the major number of NPCs will just be "fillers". I'd still like to give them sensible dialogs. No markov chain gibberish (sorry). I hope to be able to use the AI and the mentioned event system to let them do some smalltalk with the player.
The other important classes of NPCs are traders and public officers. The traders sell the things the player needs. Dialogs are mostly there to get the things. Public officers are like traders just that they don't sell goods but licences, e.g. a mining license for a certain space body, or for example hand out head hunter jobs. The can use premade dialogs that get slightly randomized using templates lie Mandrake suggested in the beginning.
I had started to work on the space exploration game, but got stuck with a lot of technical and other problems. There are some screenshots here:
http://h-world.simugraph.com/space/index.html
and a few old ideas here.
http://h-world.simugraph.com/space/data/space.txt
I want to discourage trying the downloads. What you get is more than one year old, and in no way able to show the current capabilities of the H-World engine.
Currently the project is put on halt, until I find solutions. E.g. the question about "randomised" dialogs was a try to solve one of the problems with your help :)
Another unsolved problem are map scales. On some maps (inside buildings) the scale is 1x1 sqaures, outside buildings 10x10m squares ... up to space maps where a square is rather 10000 km² or more. The transitions between the different scaled levels are beyond the capabilities of the current H-World engine and I have no idea how to make it.
A problem linked to this is that objects that are levels on one scale (the players space ship, on a 1x1 m scale) are objects on bigger scale levels (a space map e.g.). The abilities of the space ship object must depend on the installed equipment. Installation is done on the 1x1m scale interior level. Currently the H-World engine can't link level contents to object abilities.
Other games could solve this by a specialized ship data structure and some hardcoded links. Since H-World is an engine, I need to craete kind of a link that works with any kind of map and level. This is quite difficult.
A third problem is how to make research intersting. But I got a lot of suggestions on that topic already, I think enouigh to provide a solution that is interesting to the player.
The map scale problems are a KO criteria. The link between ships map contents and ship object abilities is a serious stumbling block. As long as that doesn't work, the project can't be done.
|
|
Back to top |
|
|
|
Page 1 of 2 |
All times are GMT Goto page 1, 2 Next
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|