Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old May 29, 2009, 12:43   #1
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
How about ... replacing /edit/*.txt and /data/*.raw with SQLite ?

Serious question: Could, or should, the *_info loading routines and files be replaced with the use of SQLite and a small database?

Rationale: Reading the routines for *_info loading and export/import to *.raw files makes my head hurt.

Contraindications: If it is not possible to use SQLite with a major platform supported by Angband then this idea would probably have to be dropped (at least for Vanilla).
__________________
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote
Old May 29, 2009, 13:20   #2
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by PaulBlay View Post
Serious question: Could, or should, the *_info loading routines and files be replaced with the use of SQLite and a small database?
Undoubtedly it could be done, subject to your caveat about the availability of SQLite for supported platforms.

The question is, how easy will it be for the end user to tailor the game to his/her liking? At the moment the text files provide a (fairly) friendly interface for customising the game. IMO if we move to a database format, it is incumbent upon us to write a user interface to the database.

Otherwise I won't be able to mess with hound rarities!
Magnate is offline   Reply With Quote
Old May 29, 2009, 13:25   #3
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
Quote:
Originally Posted by Magnate View Post
IMO if we move to a database format, it is incumbent upon us to write a user interface to the database.

Otherwise I won't be able to mess with hound rarities!
Producing a utility that a) import/exports text files and b) allows easy editing of the data would seem to be an nice intermediate step between the current system and a possible replacement.

Quote:
Originally Posted by Magnate View Post
The question is, how easy will it be for the end user to tailor the game to his/her liking?
Theoretically it could be easier than the present system. In that automatic checking of max values, ID numbers, missing/malformed fields could be done. There are, however, a number of "hard coded" numbers in Angband so that needs to be born in mind. Any changes that add / remove records would also break earlier save games (but otherwise could be done with care).
__________________
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote
Old May 29, 2009, 13:55   #4
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
In fact I think I'll just go ahead and try it. The utility should be equally functional for JBand and Angband, and easily altered to other *band variants.

As always, assistance will be welcome.
__________________
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote
Old May 29, 2009, 15:50   #5
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 41
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by PaulBlay View Post
Producing a utility that a) import/exports text files and b) allows easy editing of the data would seem to be an nice intermediate step between the current system and a possible replacement.

Theoretically it could be easier than the present system. In that automatic checking of max values, ID numbers, missing/malformed fields could be done. There are, however, a number of "hard coded" numbers in Angband so that needs to be born in mind. Any changes that add / remove records would also break earlier save games (but otherwise could be done with care).
http://hellband.googlecode.com/svn/t...s/hellband.xls

I did away with index numbers, they are evil ;]
And it generates js, not x_info files, but that should be trivial to change.

Doing the exercise of creating this excel sheet has allowed me to find 'bugs' in the data files. Now I know why certain items would never appear ;]
It also was easier to see what pops up where and I adjusted some items more generously and some more stingily. I would advise a similar exercise to any variant maintainer who doesn't know what to do next ;]

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old May 29, 2009, 15:58   #6
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 37
Posts: 777
pav is on a distinguished road
Send a message via ICQ to pav
Using SQLite is always a bad idea.
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote
Old May 29, 2009, 15:59   #7
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
Quote:
Originally Posted by pav View Post
Using SQLite is always a bad idea.
So what would you recommend instead?
__________________
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote
Old May 29, 2009, 16:01   #8
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 37
Posts: 777
pav is on a distinguished road
Send a message via ICQ to pav
I think the current scheme works fine. I would say we can get rid of .raw files and just parse up .txt files on every startup. The main reason for .raw files -- speeding up startup times, is largely obsoleted by today hardware.
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote
Old May 29, 2009, 16:53   #9
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
Quote:
Originally Posted by pav View Post
I think the current scheme works fine.
Not very tinker friendly, but that's not your problem.

Quote:
Originally Posted by pav View Post
I would say we can get rid of .raw files and just parse up .txt files on every startup.
I would certainly welcome that.
__________________
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote
Old May 29, 2009, 20:36   #10
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,850
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by PaulBlay View Post
Serious question: Could, or should, the *_info loading routines and files be replaced with the use of SQLite and a small database?

Rationale: Reading the routines for *_info loading and export/import to *.raw files makes my head hurt.

Contraindications: If it is not possible to use SQLite with a major platform supported by Angband then this idea would probably have to be dropped (at least for Vanilla).
I don't think this is particularly useful, for several reasons:
1. text files are easier to edit than databases
2. with a database editor, you have to maintain a database editor too
3. sqlite takes up a lot more space than the current system for very little gain
4. sqlite will be slower than what we have now
5. for all the work it would take, the benefits of sqlite over text files are slim
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How much are the raw files needed? PaulBlay Development 4 May 30, 2009 05:37
Z+Angband export(decode) .raw files? PaulBlay Variants 2 February 7, 2009 00:06
Let me edit the sticky in the Vanilla forum? takkaria Oook! 4 January 26, 2008 17:10
making a semi-variant (more talk about modifying the /edit .txt files) will_asher Variants 20 December 2, 2007 10:38
Changes to lib/edit files Iemortal Vanilla 1 September 23, 2007 05:26


All times are GMT +1. The time now is 22:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.