The Daily Click ::. Forums ::. Klik Coding Help ::. best way to store rpg text paragraphs in ext files
 

Post Reply  Post Oekaki 
 

Posted By Message

Koth



Registered
  21/02/2007
Points
  34
24th January, 2010 at 03:30:59 -

Hi I hope this hasnt been already asked
I'm making a text-based rpg and I'm trying to understand wich is the best way to store a very large amount of text paragraphs into external files, in order to share them to writers/translator etc, just like the dialog.tlk file of bioware games, which contains ALL the text data of the game. (examples = http://bgtlk.cpptea.com/)

I'd also need the archive to feature some group-like and paragraph numeration, the ini file would be ok but I wonder what's the memory limit of it.

arrays would be also great (I've made an editor to write/edit/save the dialogue paragraphs which is just fine)
but I wonder also stability and memory issues, plus any way to import-export array text into a txt/rtf file for backup and additional editing purposes.

thank you in advice

Edited by Koth

 
-K

Koth



Registered
  21/02/2007
Points
  34
24th January, 2010 at 03:59:25 -

ah, I just discovered INI files are useful but are limited to 64 Kb and each item text cannot exceed 1024 characters.

 
-K

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
24th January, 2010 at 05:23:57 -

I think I'd recommend inis, since you can always use multiple items for a reeeeeaaaaally long monolouge, plus that you can include how many inis you like. You could have a folder with hundreds of inis if you wanted to!

...though that would munch som memory.

But the fact that it's so easy to edit them makes up for it.

Arrays are also good, though a lot harder to edit manually.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
24th January, 2010 at 13:23:56 -

If you're just going to load data, use Lua. Exporting it into a saveable format is a bit of a hassle to learn. But if you just want to load then display stuff like dialogs, Lua is good. You don't even need to learn any of the scripting, just do something like:

Text[1] = "Hello"
Text[2] = "Hi, asl?"
Text[3] = "20 f phil, u?"


Then just load it into whatever alterable strings and display!

 
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

aphant



Registered
  18/05/2008
Points
  1242
24th January, 2010 at 15:16:27 -

If I recall, the Line Object can read lines of text, so you could just have a .txt file.

 

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
24th January, 2010 at 16:53:30 -

INIs - they're easy to edit, and it's easy to organize the data inside them.
64kb is a huge amount of plain text. You're being way too ambitious if you think you're going to make an RPG of such epic proportions that you need more.

The other good alternative would be delimited text files (eg. CSV), which are basically like 2d arrays. You can edit them easily in MS Excel, and use them in MMF2 with the Dynamic Array Extension.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click