The Daily Click ::. Forums ::. Klik Coding Help ::. Creating a solid, dynamic RPG dialogue system.
 

Post Reply  Post Oekaki 
 

Posted By Message

Rob Rule

Rusten Crating

Registered
  22/12/2007
Points
  532
6th October, 2008 at 01:17:12 -

Hullo,

With the wonders of the Text Blitter I've begun work on the dialogue system for my sandbox rpg,(within the animal crossing 'genre') with various character portraits with differing emotions, dialogue paragraphs determined upon the time of the ingame clock, weather and other ingame variables. I'm by no means an experienced user and need help to progress.

Naming your character:

At the beginning of the game, I'd like the player to be able to choose their avatar's name, and I to have a particular text character within a string so the game . Something like "name" inserted into and then later drawn from a seperate global string, I'd imagine, but I'm not sure.

NPC portraits:

Y'know, the drawn portraits that flash up in many RPG dialogue boxes. I currently have it as one active that appears when prompted, with animations such as individual characters; orange guy, green guy, etc. Their various facial expressions, or 'emotions', are mapped to a consistent direction, eg right = sad, left = happy, and so on. I've considered prompting the required emotion by having various invisible text characters at the beginning of each paragraph so the game knows which emotion (assigned to directions atm) to play: for example = sad, = happy, = constipated, etc.

I'm hoping there's some 'search string' for my character name and emotion game feature requirements.


Also, to load character portraits depending on who they're facing. Eg, when detector is overlapping Orange guy and c (to talk) is pressed, change animation sequence to Orange guy. All well in theory, but as soon as I add a second npc and try to change anim sequence to, say, green guy, it flickers and reverts back to the portrait of the orange guy. I suspect this is a quick fix, but is one of a few small things that needs looking at with an expert eye.

I'm using the latest build of MMF2 and I have all required resources and have done some work toward this, so am hoping someone will be willing to work with me to get this completed.

Thanks,
Rob.

.

 
It'll all blow over.

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
6th October, 2008 at 03:08:28 -

Um.. all that sounds quite easy, but difficult to write it so that you'll understand. I think it'd be easier for me to make an example for it. But, yeah, since you're new, it's probably difficult, because it's a bit like learning a new language. You get used to it in time.

I'm making something of the sort - a combat engine that'll give out the input of the combat in text. I'm going to put a dialog engine on top of it, so maybe I'll do something like that. But if you're waiting for my example, it's gonna be a while, since I'm busy up to final exams next month :/

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
6th October, 2008 at 03:11:49 -

I'll take a look at it if you PM me the source. Otherwise...

For the name, it should be saved in the file you are using (INI, array, etc.) and loaded into a global value when the file is loaded by the game. Then when people need to use the name, the string requiring the name (if you aren't having them generated in the event) should be saved as two separate strings, the words before and the words after, and they should be put together using the Change alterable string action, like this

Change alterable string:

Alterable String A("Mr.Monkey")plus Global String A plus Alterable String B("Mr.Monkey")


...where plus is actually '+'. For the portraits, I think it would be better if each different person had all their emotions on the same direction, and you forced the frame for each emotion. Unless you need the picture to animate. For referencing emotion, if you organize the alterable strings (or INI strings, or whatever) so that all the normal ones are next to each other, all the angry ones are together, etc. Then put into your events one that allows it to check what string it is, and if it is in a certain range, it changes it to the corresponding animation. For the detector, you should probably make it smaller so it can only overlap one person at any time.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

]Alpha[



Registered
  19/09/2003
Points
  245
6th October, 2008 at 16:25:44 -


Originally Posted by Robert Rule
Also, to load character portraits depending on who they're facing. Eg, when detector is overlapping Orange guy and c (to talk) is pressed, change animation sequence to Orange guy. All well in theory, but as soon as I add a second npc and try to change anim sequence to, say, green guy, it flickers and reverts back to the portrait of the orange guy. I suspect this is a quick fix, but is one of a few small things that needs looking at with an expert eye.



I think I can help you with this.
The green guy reverts back to the orange guy because probabily you didn't flagged the "loop" option in your animation.
Make sure that every animation has the "loop" option flagged and the problem should be solved.

Now, talking about the whole avatar display system, I reccomend you to use alterable values, as they should be more reliable.

 
All that I see is the years...

Rob Rule

Rusten Crating

Registered
  22/12/2007
Points
  532
9th October, 2008 at 01:42:37 -

Thanks Muz (wait, you're 'M' now?), and thanks Jon and Alpha - I've directly applied bits of your advice to the engine and have made great progress. Jon, I am indeed animating the portraits (blinking and figeting, possibly mouth movements when blitting), which is why I chose not to force relevant frames exactly as you suggested. Alpha, you reminded me of the schoolboy error I made with the lack of loop and it was a quick fix, so cheers. Jon I'm about to tackle your ini suggestion, which seems like a better way of doing things, and will keep you updated with the success/problems I have with it, if that's okay.

Image Edited by the Author.

 
It'll all blow over.

]Alpha[



Registered
  19/09/2003
Points
  245
9th October, 2008 at 08:47:06 -


Originally Posted by Robert Rule
Alpha, you reminded me of the schoolboy error I made with the lack of loop and it was a quick fix, so cheers.



You're welcome
If you need some more help, just ask

 
All that I see is the years...

Rob Rule

Rusten Crating

Registered
  22/12/2007
Points
  532
15th October, 2008 at 23:29:28 -

Okay, so. I've realised that using ini is simply not possible, because the game is very dialogue heavy and I've read of a limit on characters and size (1046 char and 64kb respectiely, iirc). So I need to find an alternative string storage method, but am struggling. Should I consider storing them in an array? I notice there is a 'Text of a paragraph' function in retrieve data, could I simply store strings to be pulled when needed, and if so, how would I then go about achieving the emotions feature?

It's more than possible array isn't the way forward at all; guidance needed on this one please...

 
It'll all blow over.

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
16th October, 2008 at 00:19:52 -

I'd try to use a text file for storage on dialogue heavy games. I think there were a few games that have done it before. It's a bit of extra coding though, and I don't know how to make it so that it reads different lines, separately.

Also, you might want to check out the dialogue engine in the downloads recently and E++. See how they do it.

Image Edited by an Administrator.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image
   

Post Reply



 



Advertisement

Worth A Click