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:21 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Is this impractical?

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
Reply With Quote
  #2  
Old 03-10-2007, 05:34 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
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.
__________________
What signature? I see no signature?
Reply With Quote
  #3  
Old 03-10-2007, 07:21 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Why use arc files in general? I don't understand why.
Reply With Quote
  #4  
Old 03-10-2007, 07:42 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
It holds information for weapons so you don't have a crapload of WNPCs to attend to.
__________________
What signature? I see no signature?
Reply With Quote
  #5  
Old 03-10-2007, 07:44 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
I think he's asking why not use a .txt file or something
Reply With Quote
  #6  
Old 03-10-2007, 08:58 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
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.
__________________
What signature? I see no signature?
Reply With Quote
  #7  
Old 03-10-2007, 11:48 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
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/*..

:]
__________________
Reply With Quote
  #8  
Old 03-11-2007, 02:37 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
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.
__________________
Reply With Quote
  #9  
Old 03-11-2007, 02:41 AM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Is it a bad idea to have lots of WNPCs then?

most of my weapons are like this:

PHP Code:
join("weapon_class");
this.firerate0.2;
this.damage 2;
this.gani "gani";
this.projectile "projectile_gani";
//etc 
Is this a bad idea?
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #10  
Old 03-11-2007, 02:46 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
It works but...it's annoying . I tend to use a DBNPC / archetypes. Cleaner
Reply With Quote
  #11  
Old 03-11-2007, 03: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
With a mudlib you can add clutter items, stuff thats collectable and such.
__________________
Reply With Quote
  #12  
Old 03-12-2007, 09:27 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
Quote:
Originally Posted by Rapidwolve View Post
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.
__________________
Do it with a DON!
Reply With Quote
  #13  
Old 03-12-2007, 10:04 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 zokemon View Post
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
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 10:16 PM.


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