Thread: MUDlib
View Single Post
  #26  
Old 01-17-2007, 12:50 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Twinny View Post
Kinda similar. Thamhic was used as a reference for the original mudlib but than alot of changes were made in the second version .

Kuji insisted on making all the systems on Theed. I can only touch them after he has finished. To his credit though, the new mudlib is awesome.

However, i find having each var for an item in an array quite ugly. What you could do is have a DBNPC which has items like this
mudlib.sword=itemname=Hax,somevar=hax!
or perhaps an address to a .arc which can be loaded.

Then for players, you could have muditem_2=sword, followed by any modifications/buffs. eg.
muditem_2=sword,+2fire,-50sharpness,+200rust
When accessed, mud function can return either an array of vars or an object containing the vars for use.

If anyone has any questions regarding mud systems, pm my RC on GX. Or forum pm but gx is faster.

If alot of people poke me, I'll write a guide on the wiki and my site. (though still waiting for mysql reset on my site)

Depends what you like though
It's uglier when you load the player's attributes, but a lot more organised when you are coding with it :P The architypes in my mudlib were only used as a guide when creating the items. The original plan was to have each item have slightly different stats than others of the same type. Also, the overhead of having to load the archetype file, or access some DB NPC variables would be too much if players had a lot of items.

Quote:
Originally Posted by Inverness View Post
I don't like the idea of having the variable names in the array, considering arrays get cut off after a certain point. If I did that I'd make all variable names only 4 characters to limit length.
They only get cut off if you use the default RC client to open the player's attributes. Which is why scripted RC is for the win.

Quote:
Originally Posted by Inverness View Post
I'm still kinda iffy about using Objects for the mud items or anything since I don't know exactly how they work with the server and don't want to spend time trying to find out, its just easier for me to use the function mud_getitemvar() or mud_getitem().
If you take the time to learn them while they are fresh, they will save you more time in the future.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote