![]() |
arc system questions
Hey , im trying to better understand arc systems. How does a arc based system find the vars from inside the arc file? Is it case senstive?
On another note , whats the best way to do it for when all armor/weapons are unique? would it be a bunch of arc files or a list stored inside the arc NPC libary? |
Some people (Ziro?) are going to tell you otherwise, but there's no reason to use an "arc" file. You might as well just use a text (.txt) file. Basically, what you're talking about is called a "MUDlib". I'd link you to a Wikipedia article, but I can't on these forums, so just go Google it.
Basically, it's a way to store unique items that can have custom properties. For example, you could easily create a sword with a custom name or stats. They're traditionally used for RPG servers, but can also be used for other types. You're going to want to do stuff like: PHP Code:
To save you'd do something like PHP Code:
There are tons of different ways to do it, and everyone likes to do it a different way. You might also want to look into SQLite for item storage. |
ok so also to load the files stats i could do like
temp.new_item.strength = item.item.power; for upgrades to change the file could i do something like temp.new_item.strength = item.strength; if(upgrade){ item.strength == item.strength+1; and for the saveing for the new changes something like temp.new_item.savevars("players/items/"@player.account@"/weapon1.file-format"); plz correct me if im wrong |
You may want to play around with Ziro's Item System in the Code Gallery, and get an idea how they typically work.
You're going find though that if you have to load text files for everything when they log on that it will be really slow, compared to one's using a Cache and/or SQL. I imagine a lot of this is going to fly right over your head right now but it'll hopefully make more sense after some experience with one. |
Let's say you have a class like 'item_functions' with a function like this:
PHP Code:
PHP Code:
|
thanks man , id leave rep if i knew how :P
|
Quote:
|
Quote:
|
Ini files are far superior :3
|
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 11:30 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.