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 01-06-2007, 06:27 PM
ArushenP2P ArushenP2P is offline
Graal Developer
ArushenP2P's Avatar
Join Date: Feb 2006
Location: Oakland, Calif. USA
Posts: 336
ArushenP2P is on a distinguished road
Send a message via AIM to ArushenP2P
MUDlib

Can someone post a tutorial link or care to get me started on how to make a
mudlib system?
__________________


Your abilities to create wonder relies on your level of imagination.

Reply With Quote
  #2  
Old 01-07-2007, 07:50 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Same here, can someone explain it in detail aswell or point us to thread that will.
__________________
Deep into the Darkness peering...
Reply With Quote
  #3  
Old 01-07-2007, 08:16 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
http://forums.graalonline.com/forums...=1#post1262165

Look at the mud system Thamhic used.
Reply With Quote
  #4  
Old 01-07-2007, 10:38 AM
ArushenP2P ArushenP2P is offline
Graal Developer
ArushenP2P's Avatar
Join Date: Feb 2006
Location: Oakland, Calif. USA
Posts: 336
ArushenP2P is on a distinguished road
Send a message via AIM to ArushenP2P
It still don't teach me the exact thing about mudlibs and how to make them.
Reply With Quote
  #5  
Old 01-07-2007, 12:11 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Sort of helps, thanks
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 01-14-2007, 01:47 AM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
yeah an articles covering:
Quote:
-basic mudlib idea
-what fields?
sure an item is like name, description
but then like bonuses, whats smarter?
bonus.str = 3
bonus.int = -2
or bonus = {"str", 3}, {"int", -2 }

etc
would be nice =/
Reply With Quote
  #7  
Old 01-14-2007, 06:53 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 projectigi View Post
yeah an articles covering:

would be nice =/
PHP Code:
function onCreated()
{
  array = { 
"str"2"int", -1"dex"1"luck"0};
  for( 
08+= 2;)
    echo( array.
subarrayi2));

Outputs:

str,2
int,-1
dex,1
luck,0
__________________
Reply With Quote
  #8  
Old 01-14-2007, 10:36 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
huh?
Reply With Quote
  #9  
Old 01-14-2007, 11:23 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
Was just an example, array can be good, if you know a good way to get info from it. Else normal variables should be fine.
__________________
Reply With Quote
  #10  
Old 01-14-2007, 11:40 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
I prefer to use some other character to divide the values.
So bonus would be: "str:3:luk:3"
Then we use itemarray[index].tokenize(":");
__________________
Reply With Quote
  #11  
Old 01-15-2007, 03:57 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
The way I did it was something like:

temp.stats = { "str=10", "dex=6", .. };
temp.player_stats.loadvarsfromarray(temp.stats);
echo("Str: " @ temp.player_stats.str);

Not sure of the exact function name, but it was something like that. It can all be found in the link Twinny posted, in the 'mudclient' and 'mudfunctions' classes.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #12  
Old 01-15-2007, 04:07 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The way it is done on Kingdoms is to separate each part of the mudlib and use the best way to implement it:

- The items are some kind of TStaticVar, real objects, using normal variable names
- When saving or loading you can write your own function to make the file look good (separate file for each player)
- For displaying the items on clientside you write a function which takes the visible items and useful item attributes (e.g. name, icon) and set some client. strings; this function is called each time an item is changed or modiified
- For being able to communicate between server and client you assign each object you create an unique id which only works as long as the server is up (should not be saved) (client.mud_item123 on clientside, player.items[0].id==123 on serverside)
- The available item types are stored in archetypes; when saving an item of the player then you only save the differences between the current item and the original archetype to minimize the file size and to make it possible to change the archetype without changing each player item file (changing the icon of the archetype will change the icon for all item instances in players inventories except for items that got an unique icon (icon has been changed))

It would probably be good if there would be some item system which can be used on each server, I have not checked yet the zip that has been attached though.
Reply With Quote
  #13  
Old 01-16-2007, 02:02 AM
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
Are this TStaticVar objects clientside or serverside?

I don't think i'm satisfied with the mudlib I made, i'm thinking of a way to make a general data-handling system that could be applied to items and many other things.
__________________
Reply With Quote
  #14  
Old 01-16-2007, 02:29 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
This could a very newbish question but where are the actual vars for the MUDitem itself stored, is it stored in a folder in the file browser maybe or some class?
__________________
Deep into the Darkness peering...
Reply With Quote
  #15  
Old 01-16-2007, 02:46 AM
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
In folder in filebrowser.
__________________
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 01:45 AM.


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