 |
golgepapaz Beginner
Joined: 09 Sep 2010 Posts: 13
|
Posted: Wed Dec 01, 2010 4:29 pm
more database and mapper questions |
Hi all;
Well sometimes, when I create rooms with mapper I add some info to the notes fields. My question is
How can I see that notes, when I mouse-over the rooms? I think i need to write some function
that fetches note field from the mapper database and than add it to the hint area in the mapper preferences
but I have no idea how to conjure one.Any help would be greatly appreciated..
Also, I've created a database for dumping item information , but it seems like that database
is not a SQLITE db. Is this intentional ?why there are two different database formats?
if that's the case what kind of a database it is so I'll be able to view it with something other than the
database module, like a script that creates a html page etc..
Thanks again.. |
|
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Dec 01, 2010 5:14 pm |
Well you've asked alot there. First I am going to assume you are using the latest version of CMUD (3.32) but you never specified.
The easiest way to create an SQLite database is with the #SQLDB command. The section on SQL Scripting should give you more info.
The mouse-over information is controlled by the Hint field on the Other Properties tab under Room Properties.
You can programmatically set the roomint, but you will need to use CMUD Pro and the COM scripting available via the %map COM object. You can find more info about in this thread. |
|
_________________ Asati di tempari! |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Dec 01, 2010 5:32 pm |
The reason the database module is different is because Zugg has not yet converted the old database module from Zmud. It is still running essentially the code from Zmud. That is on the ToDo list, and will be a major project.
|
|
|
|
 |
golgepapaz Beginner
Joined: 09 Sep 2010 Posts: 13
|
Posted: Wed Dec 01, 2010 5:55 pm |
I know how to set mouse-over hint.. what I need is the function itself. something along the lines
of %roomnotes(roomid) that will return the notes of the room, and I'll paste it to hint field and hope
it will evaluate the function. Do I need to know COM scripting for this? Or can it be done in a much simpler way.
For the first question I am using the #addkey and #new commands to write records.
Does this mean I need to rewrite my triggers to use a SQLite database? |
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Dec 01, 2010 8:39 pm |
| Quote: |
The mouse-over information is controlled by the Hint field on the Other Properties tab under Room Properties.
|
This is for setting the hint for each room specifically. If you want this to apply to all rooms, there's also a Hint field in the Configuration Settings window. In either case, you can use any combination of text and functions. To refer to the specified room, you can use the <name>, <id>, <vnum>, <x>, <y>, and <z> entities.
In your case, since you want the notes field you would do something like %roomnote(<id>).
As for the DB Module database format, it's just a flat text file. Full of gibberish that you'll end up having to parse the bejesus out of, but otherwise just text. If you want to be able to view your data outside of CMud, your only options are to write/find/get ahold of some script or plugin that translates the file or rewrite your script to use a real DB format. |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
|
|
|