PDA

View Full Version : Is this impractical?


Rapidwolve
03-10-2007, 05:21 PM
For the ItemLibrary on Oakdale, I have it set up so that each item has its own ARC file (e.g. Item_3.arc, Item_71.arc), and they all have variables inside the arc file (e.g. itemName=, itemWeight=). I know other servers have a more organized system where they have an ARC file for each catagory like guns.arc, food.arc, etc..

Is the way im doing it impractical? Im not very good with mudlibs x.x

godofwarares
03-10-2007, 05:34 PM
Not really. You can make it any format that seems practical to you. Example, In my mudlib, I put them in separate folders (archetypes/weapons/) and in their own name as the file (longsword.arc) for better understanding of where they go.

Chandler
03-10-2007, 07:21 PM
Why use arc files in general? I don't understand why.

godofwarares
03-10-2007, 07:42 PM
It holds information for weapons so you don't have a crapload of WNPCs to attend to.

Rapidwolve
03-10-2007, 07:44 PM
I think he's asking why not use a .txt file or something

godofwarares
03-10-2007, 08:58 PM
If he means that, It doesn't matter what you store it in -- Ini, txt, sys whatever you like. It only matters that the scripts can read it.

Chompy
03-10-2007, 11:48 PM
bah, I think it is possible to use DB's? :]

Also, to maybe make it more orginazed, do like

mud/weapons/*
mud/items/*
mud/armor/*
mud/items/* etc....

And inside the file in what folders you have like fileCategory=weapons if it is in mud/weapons/*..

:]

Inverness
03-11-2007, 02:37 AM
When loading from files its best to use a database npc to cache information so its not reloaded multiple times. Either that or do what I do and only parse the archetypes once and have their data loaded into objects on the server which are ready for accessing.

JkWhoSaysNi
03-11-2007, 02:41 AM
Is it a bad idea to have lots of WNPCs then?

most of my weapons are like this:


join("weapon_class");
this.firerate= 0.2;
this.damage = 2;
this.gani = "gani";
this.projectile = "projectile_gani";
//etc


Is this a bad idea?

Twinny
03-11-2007, 02:46 AM
It works but...it's annoying >_<. I tend to use a DBNPC / archetypes. Cleaner :D

Inverness
03-11-2007, 03:02 AM
With a mudlib you can add clutter items, stuff thats collectable and such.

zokemon
03-12-2007, 09:27 PM
I know other servers have a more organized system where they have an ARC file for each catagory like guns.arc, food.arc, etc..

I personally find that to be less organized. The way you suggested first is much more practical.

Rapidwolve
03-12-2007, 10:04 PM
I personally find that to be less organized. The way you suggested first is much more practical.

Alright just checking, because I didn't feel like re scripting it so it makes more sense to people if I'm ever gone. The only problem I had was getting the 'itemName' variable for each item in the folder 'mud/items/'. I used loadfolder() and all that to return all the itemNames' but it crashed the server. So right now what I have to do is use the edit text feature of RC so I can view each itemName until I find the one I want z_z