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 03-10-2007, 05:37 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
MUDLibs

Hi,

yeah.. i kinda hate them :P

So can someone tell me how _exactly_ it works?

my current idea about it is like:

a .arc file for the items, like deserteagle.arc, ak47.arc etc
or named by ids 1.arc, 2.arc ... 6879457.arc

like the gun arcs can hold the damage of the gun, its max ammo clip size, reload time, ganis, etc

now the player has a arc file too, that holds the itemnames or id's of the arc files, now everytime the player comes on these id's are taken, the arc files are loaded and saved to clientr.strings

and the inventory and other stuff reads that strings to know the item's attributes and stuff :/

But now I'm missing the point of having items that are objects and have some class joined to them x.x
Reply With Quote
  #2  
Old 03-10-2007, 05:38 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
What the HELL are you talking about..

Edit (After carefully re-reading I understand): Well for OC I have it so each item file is saved in an ARC file relative to its ID (Item_id.arc). Whenever the Q Button is pressed it triggers the itemlib NPC with a function loadItemInfo(). And then that function triggers the client with the information
Reply With Quote
  #3  
Old 03-10-2007, 05:40 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
mudlibs Oo

edit after edit above:

what id? for every item thats created?
or for the base items?

so like the base item ak47
item_ak47?
x.x

uhm and ofc
wouldnt it be better to save the information of the item sin clientr. strings to avoid unneeded loading time when opening the inv?
Reply With Quote
  #4  
Old 03-10-2007, 05:51 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Huh. What's the obsession with people scripting their own mudlibs all the time? It's not really necessary. :|
__________________
Skyld
Reply With Quote
  #5  
Old 03-10-2007, 05:56 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Quote:
Originally Posted by Skyld View Post
Huh. What's the obsession with people scripting their own mudlibs all the time? It's not really necessary. :|

yeah, sure, what else to use that doesnt need 1000 wnpcs x.x
Reply With Quote
  #6  
Old 03-10-2007, 07:47 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Skyld View Post
Huh. What's the obsession with people scripting their own mudlibs all the time? It's not really necessary. :|
Read my mind
__________________
Reply With Quote
  #7  
Old 03-10-2007, 08:00 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by projectigi View Post
mudlibs Oo

edit after edit above:

what id? for every item thats created?
or for the base items?

so like the base item ak47
item_ak47?
x.x

uhm and ofc
wouldnt it be better to save the information of the item sin clientr. strings to avoid unneeded loading time when opening the inv?
my "base item" is the wnpc

like item_100 is an Apple and the itemWeapon var is +Food
Reply With Quote
  #8  
Old 03-10-2007, 11:37 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
>_>

It depends on how you want it to work, and hot it should affect the player, in-game and by systems I think

Quote:
Originally Posted by projectigi View Post
mudlibs Oo

edit after edit above:

what id? for every item thats created?
or for the base items?

so like the base item ak47
item_ak47?
x.x

uhm and ofc
wouldnt it be better to save the information of the item sin clientr. strings to avoid unneeded loading time when opening the inv?
bah,

ak47.arc = base item

then:

clientr.mud.item_1 = { ak47, weapon, dmg, spd, tps, description, icon}; etc...

ak47 is to load the file for info like equipping or whatever..

then do like getstringkeys( "clientr.mud.item_"); which would return an array of all the id (clientr.mud.item_*)

lalalalalalala (Tired and bored)

And an inventory doesn't need a timeout, only update it when needed
__________________

Last edited by Chompy; 03-10-2007 at 11:59 PM..
Reply With Quote
  #9  
Old 03-11-2007, 02:01 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
Quote:
Originally Posted by Chompy View Post
clientr.mud.item_1 = { ak47, weapon, dmg, spd, tps, description, icon}; etc...
Or you could set it up so
clientr.mud.item_1={"deagle",quantity,personal modifications};

It's annoying having 500 lines of unneeded information ^-^
Reply With Quote
  #10  
Old 03-11-2007, 02:04 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Hmm thats funny, I have mine setup as clientr.item_#=quantity...
Reply With Quote
  #11  
Old 03-11-2007, 02:32 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
Bah, don't use clientr flags for storing item data in anything but an extremely simple system, those should only reflect item data for large systems.

In my system I load all item data into TStaticVar's on the serverside. They're designed to only work in a mudcontainer object, if you want the variables for opening the inventory you use:
MudContainerObject.reflectInvObjects(str location, boo delete?);

Location is relative to the container so for me, the default is "this.player.clientr.mud.item" because in the container object this.player is a reference to the TServerPlayer object. This would write all items to that location ending up with clientr.mud.item<ItemID#>=<important data array>.
The reflected data only contains important things used when displaying the inventory, like the item's fullname which is calculated from the prefix, suffix, singular, and plural names.

The way I have mine set up I could rather easily open the objects in other containers (player's inventories or other world objects) by doing something like: findcontainer("player","RandomAccount").reflectInv Objects("MudPlayer_Inverness.player.clientr.mud.it emsof_RandomAccount", false);
And yes it may be long-winded but its a base level function and can be shortened for specific things with several higher-level functions.

And yes, I am bragging about my leet system :P
But my thanks go to Stefan for the idea.
__________________
Reply With Quote
  #12  
Old 03-11-2007, 03:06 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
I'd use that method if i constantly was moving information around (that system reminds me of encapsulation ) but it seems unneccessary for most basic to midrange mud systems.
Reply With Quote
  #13  
Old 03-13-2007, 08:48 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
Yea well, for basic mudlibs its fine to store data in clientr.flags as long as its small and use a function to access the right index depending on a variable name.

But for Aeon, the system is alot more extensive and I'm planning the revamp it anyhow. First we would have the base MudObject and it would have certain joinable Qualities which would be comparable to Interfaces in Java.

Qualities List:
  • Breakable - This quality is for objects that have a health and stop working properly when the health gets to 0 or so. This includes players, npcs, and certain world objects like gates that can be broken, and even weapons that degrade over time.
  • Class - This quality is for objects that have a player class. It controls attributes and skills for players and npcs.
  • Container - These are things that can hold inventory objects and has the functions to manage them like AddItem() and RemoveItem(). This would include players, npcs, and world objects like barrels and chests.
  • Drawable - This property is for objects that can appear in a level and would dictate how they appear in the level.
  • Enchantable - This is for objects that can be enchanted and would reference a magic effect list and determine how those effects apply to this object.
  • Equippable - This would obviously be for objects that can be equipped by the player or other npcs and would have have functions for finding slots and triggering events when an object is equipped.
  • Inventory - These are objects that can be stored in an inventory and would have certain values like GoldValue, Weight, Type, StaffItem.
  • Magic - This is for objects that have a group of magical effects like spells and potions.
  • Named - This is for objects have a name in the Mud System, players, npcs, world objects, items, spells.
  • Player - This is the player quality and controls things unique to players in the system.
__________________
Reply With Quote
  #14  
Old 03-13-2007, 12:33 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Woo, Thanks Inverness; You gave me an idea for MY MUD system o.o
-Coding-
__________________
What signature? I see no signature?
Reply With Quote
  #15  
Old 03-13-2007, 12:55 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
*Ego++*

Eh? Do tell...

I plan to release my MudLib to the public once I can get a stable and flexible system going that I'm satisfied with.
Though all my inspiration surely goes to Oblivion, its such a kickass game and I'm currently working on my first Mod for it. Its mostly scripting but its a spell that will allow you to Remove Enchantments or Switch Enchantments between items, which isn't normally possible obviously or I wouldn't be doing it.
__________________
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:20 AM.


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