Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-19-2008, 08:34 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Mudlib

chompy explained how to make 1, but should i??
all i can see it does it set a flag on the server, why not set a flag in the players strings?? what are the benefits??
Reply With Quote
  #2  
Old 03-19-2008, 08:38 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by [email protected] View Post
chompy explained how to make 1, but should i??
all i can see it does it set a flag on the server, why not set a flag in the players strings?? what are the benefits??
The benefits to creating a MUDlib is that you can create several weapons and items without having to create a separate GUI script for each one. These weapons and items are stored in files on the NPC-Server, usually in .arc format, and are parsed by the NPC-Server to turn that archetype into a virtual addable item.

If you are confident in your skill level and are sure you know what you are doing when it comes to File I/O on the NPC-Server, and know how to parse strings from those files, then go for it. Otherwise, study up on those topics and experiment with them. When you feel comfortable, make one.


Good luck!
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #3  
Old 03-19-2008, 08:46 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by Programmer View Post
The benefits to creating a MUDlib is that you can create several weapons and items without having to create a separate GUI script for each one. These weapons and items are stored in files on the NPC-Server, usually in .arc format, and are parsed by the NPC-Server to turn that archetype into a virtual addable item.

If you are confident in your skill level and are sure you know what you are doing when it comes to File I/O on the NPC-Server, and know how to parse strings from those files, then go for it. Otherwise, study up on those topics and experiment with them. When you feel comfortable, make one.


Good luck!
it depends on how you script the main gui weapon to control your weapons and items. i am wondering if there is a point to making 1 or not
Reply With Quote
  #4  
Old 03-19-2008, 08:48 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by [email protected] View Post
it depends on how you script the main gui weapon to control your weapons and items. i am wondering if there is a point to making 1 or not
This is something I can't answer without knowing the details of your project's storyline or plan.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #5  
Old 03-19-2008, 08:51 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
there isn't 1, but would u? from what i see a mud is just a bunch of functions interacting with each other. i see no point in it tbh, i could just make alot of player joined classes for that.
Reply With Quote
  #6  
Old 03-19-2008, 08:53 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by [email protected] View Post
it depends on how you script the main gui weapon to control your weapons and items. i am wondering if there is a point to making 1 or not
It depends on what you want to do with the server. A full blown RPG with a few hundred different items would benefit. If you just need to pick up stones and throw them in a pit, just add the stuff you need in Weapon scripts.
Reply With Quote
  #7  
Old 03-19-2008, 08:55 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
i will make 1 for the fun of it, i have nothing more to do

wouldn't it be laggy??
Reply With Quote
  #8  
Old 03-19-2008, 08:57 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by [email protected] View Post
there isn't 1, but would u? from what i see a mud is just a bunch of functions interacting with each other. i see no point in it tbh, i could just make alot of player joined classes for that.
The point to it is to create a uniform, simple method of controlling player interactions, items, levels, etc. It is a way to keep your Class Scripts and GUI Scripts clean and provide a simple way to access player data. Archetypes are a way to create items that will be globally the same, but in their own way, unique.

For example,
Quote:

# Weapon: Axe
name=Axe
weapon=true
stackable=false
equipable=true
candrop=true
cantrade=true
#etc..
Compare this with having thousands of GUI Scripts that you would have to sort through. Makes sense to have things organized!

Of course, it all depends on your needs and how you plan to implement them, but I would personally create a MUDlib over having hundreds or thousands of GUI scripts.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #9  
Old 03-19-2008, 09:00 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
i see what u mean

when u store that data, do you store data in the players string list or do u keep it on the server where you cant read them??
Reply With Quote
  #10  
Old 03-19-2008, 09:06 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by [email protected] View Post
i see what u mean

when u store that data, do you store data in the players string list or do u keep it on the server where you cant read them??
In most MUDlibs, the player data is stored in a file in a similar format as the archetypes.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #11  
Old 03-19-2008, 09:07 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
yes, but why not store them in the players string list, makes no sense to me
Reply With Quote
  #12  
Old 03-19-2008, 09:14 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by [email protected] View Post
yes, but why not store them in the players string list, makes no sense to me
Think about account transfers, account resets, etc.

The string lists would be wiped. These files provide a 'safeguard'.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #13  
Old 03-19-2008, 09:22 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
is that generally all...?
Reply With Quote
  #14  
Old 03-19-2008, 09:30 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
You don't need to name the files .arc, .txt is fine and those files are already set in windows to open with a text editor like they should be. I think people use .arc to feel cool or something
__________________
Reply With Quote
  #15  
Old 03-19-2008, 10:01 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Inverness View Post
You don't need to name the files .arc, .txt is fine and those files are already set in windows to open with a text editor like they should be. I think people use .arc to feel cool or something
Agreed.

I use .txt for mine ...
__________________
Reply With Quote
  #16  
Old 03-19-2008, 10:36 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I'm not sure if it does it with .txt, but I know Notepad++ will make it so categories in .arc's can collapse and such(much like xml), making it much more organized and such.
Reply With Quote
  #17  
Old 03-20-2008, 02:07 AM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by Inverness View Post
You don't need to name the files .arc, .txt is fine and those files are already set in windows to open with a text editor like they should be. I think people use .arc to feel cool or something
.txt files are what we use on Symphonia. I've seen quite a few variations on the archetype format, including .xml, .arc, .txt, .arch, .mud, etc. .txt seems to be the most reliable.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #18  
Old 03-20-2008, 05:30 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by [email protected] View Post
yes, but why not store them in the players string list, makes no sense to me
There's tons of reasons but here are some:
  1. Client. and Clientr. variables must be loaded on login when the player connects to the server which can be very stressful on the server if there is a ton of archetypes and variables to load.
  2. When using the rc command, /open, When you apply the changes, variables are reduced down to 255 or so characters which can screw up player data. Having it stored on the player variable clientside (I usually create a TStaticVar linked from player.mud) removes the chance of data being accidentally trimmed.
  3. As with #2, having the data not with a client. or clientr. prefix prevents people with simple /open rights to both read and modify archetype/player data that you might want to keep secret.
  4. A cool thing about MUDs is you can script it so that a high staff member could load the account data of someone else instead of him self for the purpose of fixing problems and seeing the world from that player's eyes. Just a small feature that I always loved. Doing this would require data to be stored in files though.
  5. As stated before, having the account reset would screw up the player data which you might not want reset.
  6. MUD data stored in text files on the server can be read from and written to even while the said account is offline.

There's way more but that's just some of the reasons off the top of my head.
__________________
Do it with a DON!
Reply With Quote
  #19  
Old 03-20-2008, 10:42 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by zokemon View Post
MUD data stored in text files on the server can be read from and written to even while the said account is offline.
Couldn't you load from accounts/whatever?
__________________
Reply With Quote
  #20  
Old 03-20-2008, 10:46 PM
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 cbkbud View Post
Couldn't you load from accounts/whatever?
To my knowledge, scripts can't access the accounts/ folder.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #21  
Old 03-20-2008, 10:51 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Tigairius View Post
To my knowledge, scripts can't access the accounts/ folder.
The accounts folder is available on servers using the newer system, the ones with an internal name like account_<owneraccount> which would be the ones named like "Dev <owneraccount>". I believe the accounts folder should be read only though even if you have RW rights to it.
__________________
Reply With Quote
  #22  
Old 03-20-2008, 11:09 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Ah, can't say I've ever tried.
__________________
Reply With Quote
  #23  
Old 03-21-2008, 05:45 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Only in extreme cases should the NPC-Server get any rights to the accounts folder and it is not something you should plan for.

You have to remember that rights, comments and everything else is stored in there which is not something you want to give anyone with access to a npc the ability to view/manipulate.
__________________
Do it with a DON!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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


All times are GMT +2. The time now is 06:12 PM.


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