Reading from spreadsheets?
Displaying 1-7 of 7 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
timbecile

Hey guys, I've been absent for a while from asking dumb questions, so here's a new one...

I couldn't find this topic with the search function, so I thought I'd ask...

Is there a way to read in data from a spreadsheet? It's a lot easier to keep track and edit monster data and stuff like that through a spreadsheet than it is to have it all hard-coded in the game somewhere.

Anyone done stuff like this that has examples that I might be able to look at?

Thanks!

Timbo

Posted on 2005-03-03 13:20:52

Omni

Er...this may not really be worth your time. Proprietary spreadsheet formats would actually require you to write code to parse and extract data from these file types, and quite honestly it is probably so much more exponentially easier to get data from a .TXT than from an Excel file that it's not even funny.

You could, however, keep a source spreadsheet for your data, and then convert it to TXT using Excel. Verge could read the TXT, and you could generate a new TXT from a master copy XLS file if you ever wanted to make quick, simple changes. Actually _that_ sounds like a pretty good way to make data files. I may try that sometime.

Did this help?

Posted on 2005-03-03 19:33:02

timbecile

That's exactly what I'm looking for. When I worked at New World Computing we used to store most of the game data in excel spreadsheets and then export them as comma delimited or tab delimited.


So any ideas on how to read a txt file like that?

Posted on 2005-03-03 19:44:16

Omni

Verge has several functions that allow you to grab a line of text and return it as a string, or return a series of space-separated tokens from text files (which would allow you to organize text formatting in these TXT output files in tables). Check the file reading functions under the Docs -> V3 Manual section. I'm afraid I don't have any example code to offer, though. A lot of games made with Verge3 have TXT parsing, however, so if you pick a game that uses text save files or has its own monster data (programmers for Verge seem to store them in *.dat files, which are really just text files), you can see how they are formatted, and loaded in code.

In particular Phobos Project by Technetium comes to mind. It's not complete, but I know it's a traditional Final Fantasy style battle system and I believe it used external *.dat files for its monster and item data.

Posted on 2005-03-03 22:51:18

timbecile

Great, thx. I'll check it out. Is Phobos Project available here, or is it somewhere else?

Posted on 2005-03-03 23:54:05

Omni

I'm pretty sure you can get it here. Also, if you view the forums under the Pixel Election theme, then the Forum Search feature is available in the upper right corner of the page.

Alternately, Technetium could post here about his game so I don't have to figure out where to get it :)

You can probably find it in the Verge3 Files -- Demo section.

Actually, I think I have Technetium's web site here...

Yeah, try this.

http://technetium.freeyellow.com/main.html

Posted on 2005-03-04 09:35:45

blues_zodiakos

Comma delimited (.CSV) spreadsheets are a breeze to load, manipulate, and save in verge, thanks to the token functions. Every spreadsheet software worth the bits it's stored on can save that format.

Posted on 2005-03-09 10:58:34


Displaying 1-7 of 7 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.