Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-11-2009, 03:45 AM
thatdwarf thatdwarf is offline
Former UN Dev Admin
Join Date: Nov 2005
Posts: 42
thatdwarf is on a distinguished road
MUD assistance

Alright, I have virtually no experiece with "MUD's", or anything relating to the system (that I am aware of)

I wanted to ask if anybody would mind telling me what subjects I should research to get started?

(And if you have links to documentation on those subjects, that would be even better! )

Thanks in advance!
Reply With Quote
  #2  
Old 02-11-2009, 04:09 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Go to wikipedia.org and search for "MUD," I'd link it but it discusses some of the games that are MUDs.

That'll show you what MUD is, but a mudlib is the library which contains all of the account information & stuff for the mud.

A mudlib is a library of interpreted code used to create a MUD game.

There are pretty uncommon instances where it's necessary to use a MUDLIB on Graal.

Most people confuse MUDLIB for any form of text file storage.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 02-11-2009, 04:17 AM
thatdwarf thatdwarf is offline
Former UN Dev Admin
Join Date: Nov 2005
Posts: 42
thatdwarf is on a distinguished road
hmm
I suppose it was a bad idea for me to use the term MUD
I'm refering to the method that certain servers use to create Item Systems, etc

An example

I cant really make heads or tails of what is going on in there, so I was wondering if someone could basically strip it down to the methods used to create something like that

Does that make sense a bit better than my first post?
Reply With Quote
  #4  
Old 02-11-2009, 04:27 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Sure, let's break it down into simple terms.

Here is a method to create some sort of simple storage system.

First, you need to give yourself and your NPC-Server rights to your item system.

HTML Code:
rw items/*.txt"

Now, let's say your item format is (Let's say the document name is sword.txt, herein is your variables):
HTML Code:
title=Broad Sword
damage=5
strength=3
id=1234
You can read that information by loading your file with Graal's built in parser for text-file strings.

PHP Code:
  temp.variables.loadvars("items/sword.txt");
  echo(
"The sword's name is" SPC temp.variables.title); 
You can also make changes to your loaded variables & save them to the sword file.

PHP Code:
  temp.variables.loadvars("items/sword.txt");
  echo(
"The sword's name is" SPC temp.variables.title);
  
temp.variables.title "Magic Sword";
  echo(
"The sword's new name is" SPC temp.variables.title);
  
temp.variables.savevars("items/sword.txt"0); 
Let's say you want a list of all of your item files for item searching, etc.

PHP Code:
  temp.folder.loadfolder("items/*.txt"0); 
This will return an array of all of the files within 'items/'.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #5  
Old 02-11-2009, 05:09 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Yeah, the term "MUD" is honestly one of the worst misnomers in scripting here; people keep on using it as a term for a data storage system while it more or less has nothing to do with that.

Note that what was done above by Tigairius is good for something like an item system or anything that needs to be persistent through a restart of the NPC server.

However, if you need something that only needs to be kept in memory, it would be much faster to just store it as flags on an NPC and also help rid yourself of potential I/O problems.
Reply With Quote
  #6  
Old 02-11-2009, 05:56 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by WhiteDragon View Post
it would be much faster to just store it as flags on an NPC and also help rid yourself of potential I/O problems.
I agree.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #7  
Old 02-12-2009, 08:06 PM
thatdwarf thatdwarf is offline
Former UN Dev Admin
Join Date: Nov 2005
Posts: 42
thatdwarf is on a distinguished road
Agreed.
I am in the process of constructing an "item" system that will hopefully curtail the use of many different types of these items, not as complex as, say, zodiac, but still pretty hefty in size.

I figured it'd be easier to do the items this way when it came to storing, searching, and updating



By the way, is there any formal name for a text file storage system?
Reply With Quote
  #8  
Old 02-12-2009, 09:12 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by thatdwarf View Post
By the way, is there any formal name for a text file storage system?
Just call it Custom Item System and there you go.
__________________
Reply With Quote
Reply


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


All times are GMT +2. The time now is 02:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.