Archived

This topic is now archived and is closed to further replies.

Snowy

Handling text for an RPG like FinalFantasy

Recommended Posts

I''ve been pondering about this for weeks now, and decided to do a small rpg like FinalFantasy (just because it''s my favourite, and everyone always, say, write the genre you like best). Ok, I''ve got Windows and Menus, that worked quite nicely. The problem I''m facing is. How will i Handle the text in the game. Should I make one large textfile with every character''s text in it and reference it by entry numbers. Or is there another way that I didn''t think of. There must be a way to handle lots of text (easier than I''m thinking of anyway). Any help would gladly be appreciated. Thanx in advance. "To code, is an extension of the soul, creation of imagination by bits and funcs, mastering the machine and warping the registers. Controlling the way you see, think and feel on a pc...it is LIFE!"

Share this post


Link to post
Share on other sites
That would be a wise move, put all the text into a file or a database file format and reference all text by its ID number.
This has several advantages, like being able to edit or add text without recompiling, providing for more languages, and if you make a client-server game you just have to send a message that an NPC speaks text 31337 instead of sending the actual text.

Share this post


Link to post
Share on other sites
seperate character dialogue into individual text files per character. store every line of dialogue with an entry number or "value" associated with it.

then have a master dialogue sequence file that simply contains the entry numbers of all various lines to be spoken in logical order.

Share this post


Link to post
Share on other sites
Thanx guys, I guess I just have to code it

"To code, is an extension of the soul, creation of imagination by bits and funcs, mastering the machine and warping the registers. Controlling the way you see, think and feel on a pc...it is LIFE!"

Share this post


Link to post
Share on other sites
I agree with Joshu McLean. But I would take it a step further. Use VB(or whatever RAD GUI development tool) to quickly create an app that you will use to enter your characters'' dialogue. I was thinking of having a form where on the left is a tree view with all the characters in the game. This will allow you to group characters so:


+
|
+--Main Characters
+-- Bart
+-- Lisa
+-- Homer
+-- Marge
+--Minor Characters
+-- Mr Burns
+-- Apu
+-- Moe
+-- Comic Store Guy
+--Scene Extras
+-- Quickie Mart
+-- Female Customer 1
+-- Female Customer 2
+-- Male Customer 1
+-- Male Customer 2
+-- Male Customer 3
+-- Moe''s Tavern
+-- Drunk 1
+-- Drunk 2
+-- Drunk 3
+-- Hooker 1
+-- Springfield Elementary
+-- Teacher 1
+-- Student 1
+-- Student 2
+-- Student 3
+-- Student 4


This is your master character list. You can group characters all you want, create sub groups, create new characters, modify existing characters, whatever.

Then there will be scene list, on the right side of the form. It will also be a tree view. This will list the acts and the locations making up each act in the order in which they occur, like so:


+
|
+-- Act I
+ Moe''s Tavern
+ Snack room at Nuclear Plant
+ Mr Burn''s Office at Nuclear Plant
+ Simpson''s Living Room
+-- Act II
+ Etc
+-- Act III
+ Etc


Guess what? Now you need a location list. You could also make it a tree view, so you can organize and categorize locations.

Anyways, you build your game by adding scenes into your scene list. It will prompt you for the location of the scene(this is where you see the location list), which you will choose from your location list. With the scene highlighted, then you can drag and drop characters from your character list onto the dialogue area. The entire app would look something like this:


+------------+-------------------------------+-----------+
| | | |
| | | |
| Characters | Dialogue | Scenes |
| Tree View | | Tree View |
| | | |
| | | |
+------------+-------------------------------+-----------+


This dialog area will be a list of what is said in the scene. Each line in list will have the character''s name and the dialog he/she says. You can reorder the dialogue all you want, double click a line to change the text, change the character who spoke it, etc.

You can even make a print function so you can print the entire script in screen play format!!

Now here''s the fun part, you need to find a way of saving all this information out into a file(or files) that your game will understand. As others have suggested, you should give each line of dialogue a unique number. In fact, give everything a unique number. Every character has a unique number, every scene, location, and dialogue.

If you were going to do a separate file for each character, Homer''s dialogue file may look like this:


1: Doh!
2: Mmmmm, donuts!
3: Why you little!
4: I am evil Homer! I am evil Homer!


Notice that on each line there is a unique ID number and the text for the dialogue.

Say that Homer''s character ID is 5 and Marge''s ID is 7, your scene file will store the character ID followed by the dialogue''s ID.

A scene file may look like this:

7: 55
5: 456
7: 52
5: 535
7: 44


You can get as complicated as you want with this. But the main point is to create a GUI that allows you to work with the dialog rather than trying to edit files manually, because you will lose track of everything if you reference by numbers, especially with dozens of characters and tens of thousands of lines of dialogue.


Bob

Share this post


Link to post
Share on other sites
Haha, now that was what I was looking for, thanx cyansoft And all others. This week''s gonna be vb hell *g*. Thank you very much aswell cyansoft for that extra long post. You just made my day!

Later all

Share this post


Link to post
Share on other sites
I might recommend that you take a look at XML and some XML libraries for your language of choice. XML is MADE for handling this kind of data - and not only is it machine-readable, most of the time it''s human-readable as well.

Share this post


Link to post
Share on other sites