Newbie database questions

Post Reply
Thorne
Posts: 2
Joined: Sun Sep 21, 2014 6:26 pm

Newbie database questions

Post by Thorne »

Hey everyone, I'm Thorne, and I play a DIKU dale mud called Shadowdale, which is loosely based on the forgotten realms stuff. The question I have pertains to automatically populating a database file with statistics and information gained from an Identify spell cast on objects obtained in our realm. If I, for example, pick up a ring, purchase a scroll of identify, and recite said scroll on the ring, my mud could return the following..

You recite a scroll of identify.
Object 'birchwood ring protection', Item type: WORN
Item is: MAGIC BLESS ANTI-DRUID ONLY-CLASS
Worn on: TAKE FINGER
Weight: 1, Value: 3000, Rent cost: 400 [LIMITED]
Can affect you as :
Affects : ARMOR By -5
Affects : MANA-REGEN By 10

I would like this to automatically populate a database file to store the data.

The questions I have are the following..

Do I need to already have SQLlite?
If I already have SQLlite can I use that in conjunction with Mudlet?
Is it smart to use SQLlite with Mudlet? Does it make any difference?
Are the commands I'd use to control SQLlite the same in Mudlet as the typical dbase commands already in Mudlet?
What's the most efficient way to set this up?

Thanks in advance. I hope this isn't too newbie a request. I would eventually like the file to be usable in SQLlite so I can tie it to a search function online on my Shadowdale page so people can look up item stats.

Thorne

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Newbie database questions

Post by Vadi »

Mudlet already has SQLite and you can either use it with functions that make it easier: http://wiki.mudlet.org/w/Manual:Database_Functions or it it directly: http://keplerproject.org/luasql/manual.html

Thorne
Posts: 2
Joined: Sun Sep 21, 2014 6:26 pm

Re: Newbie database questions

Post by Thorne »

Hey Vadi,

First off, thanks so much for the heads up on this. It helped me tremendously, as did all the videos you put on youtube! Very very helpful, thank you so much. If you don't mind, I have a few more questions that are driving me nuts..

I made a table in MS Excel that already has about 400 items already identified in the syntax of my original post. I converted it into a database via filemaker pro and I want to use this already existing table when I capture data from the mud on new items. The question is, if I use triggers to populate up all variables I need to fill a complete record, can I use my table from filemaker pro and just add records directly to it from mudlet? If so, what format does the table need to be in and where do I place it on my macbook pro so mudlet knows where to find it? Do I need to have any special drivers added to run any of the dbase functions? If so, which, and where do I find/put them?

Thanks a bazillion. Mudlet is so great, but its challenging if you don't have a programming background like me.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Newbie database questions

Post by Vadi »

The stuff you are doing isn't exactly beginner level. The database file needs to be in SQLite format, placed in in the ~/mudlet-data/profiles/<profile> folder and named Database_<name>.db. From there on, if all goes well Mudlet will be able to see it and use it.

Post Reply