Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Tue Jan 16, 2007 8:24 am   

Databases
 
I've used the DB variable for several things which have now begun to really slow down the whole system when I'm doing searches and open and close the settings editor. Also, sometimes my triggers "forget" to fire and I'm not totally sure why but this may have some effect on it.

I was thinking that there might be a way to put this into an actual database like the map is and save it to an actual file.

Couple of questions:

- Is this a reasonable thing for me to try to do? Can anyone point me to some info on how to get started?

- Are the lookup commands comparable or will it be a pain modifying my code to use the new database?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Jan 16, 2007 5:58 pm   
 
The short answer is yes. zMUD has a built in database. You can use some of the predefined DB templates or you can design your own. This is a good place to start. As always, this info can also be found in the zMUD manual.

#DBLOAD
#DBCLOSE
#DBGET
#DBSAVE
#DBOFFLINE
#DBONLINE
#NEW
%query

Are all good commands to know.
_________________
Asati di tempari!
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Tue Jan 16, 2007 7:07 pm   
 
Do I need to load all my databases at start with #DBLOAD in my atconnect alias or are they automatically loaded?

There's a lot of definitions that state that they work on the current database. Will I continuously need to switch which database is current?
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Jan 16, 2007 9:01 pm   
 
Yes you need to continuously change which database is current by using DBLoad.

No for the loading them all with DBLoad at startup. Except that loading a database does take a few moments and you could save the lag time by doing this.
The most important thing to remember is that you need the database window to be open when you are trying to use database commands.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Tue Jan 16, 2007 9:59 pm   
 
Arminas wrote:

The most important thing to remember is that you need the database window to be open when you are trying to use database commands.


Aha! That's probably why a lot of this isn't working for me. What do you to automate this? You don't actually have to click on things manually every time you load up Zmud do you?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jan 16, 2007 11:05 pm   
 
Sort of, ReedN. The DB window is a window you can have in your layout, just like the mapper. Most people don't really find it all that helpful, however, so they just open it up and then manually cover it up with other windows (or maybe just keep it minimized) so it doesn't get in the way.

Once saved to your layout in the opened position, I don't believe you need to click on the DB button anymore.
_________________
EDIT: I didn't like my old signature
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Jan 17, 2007 3:21 am   
 
This is what I do...

Code:
#MENU {windows|Database}
#alarm +.5 {
  #DBLOAD dbname
  #DBRESET
  Do my other db commands here.
  #MENU {Database|file|exit without saving}
  }


This opens the database window, waits half a second, loads the database that you want, (You can use the full file path too if you want), and puts the database in the default order. Then you add whatever database commands you want before it closes the database without saving. There is a save option but this came from my data access alias and you did ask how I did it...

The wait is necessary if you want to open and close the database each time. If you don't then you can leave it out.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net