Full Version : Arte - Looking for Advice on Coding System
xmlspawner >>Scripting Support >>Arte - Looking for Advice on Coding System
<< Prev | Next >>
HellRazor- 01-29-2007
I'm just looking for advice on the best way to code something.
Basically I am going to have a fairly large number of special abilities like "Stone Mining" and "Sand Mining". These abilities will either be "on" or "off", same as Stone Mining and Sand Mining. There will be quite a few of them.
What would be the most efficient way to add these? Should I use the same enum that Stone and Sand Mining use? Something similar? Each ability have its own prop? Or all of them stored in an array?
(I'll have XMLSpawner installed so if the best solution involves use of XMLSpawner that is fine too!)
ArteGordon- 01-30-2007
sorry, my computer died so I cant check this out at the moment. I'll take a look when I get things back up again.
HellRazor- 01-31-2007
Thanks Arte, hope your system is back on its feet again soon.
Xarlon- 02-01-2007

QUOTE (HellRazor @ January 29, 2007 10:04 am)
What would be the most efficient way to add these? Should I use the same enum that Stone and Sand Mining use? Something similar? Each ability have its own prop? Or all of them stored in an array?

Stone Mining and Sand Mining have their own props, they're separate from each other to allow people to have one or both. I don't recommend putting it into an enum unless you intend to make a setting for each ability, and every combo of abilities.
What I would recommend is making a section similar to the weapon abilities. When you [props a wep, the abilities only take one property slot, but when you open it, there's 2 pages abilities. Making your system like this would allow it to only take one slot on the props window, and hold as many abilities as you want without cluttering the [props window for the chars.
I hope this made sense.
HellRazor- 02-02-2007

QUOTE (Xarlon @ February 01, 2007 02:39 pm)

QUOTE (HellRazor @ January 29, 2007 10:04 am)
What would be the most efficient way to add these? Should I use the same enum that Stone and Sand Mining use? Something similar? Each ability have its own prop? Or all of them stored in an array?

Stone Mining and Sand Mining have their own props, they're separate from each other to allow people to have one or both. I don't recommend putting it into an enum unless you intend to make a setting for each ability, and every combo of abilities.
What I would recommend is making a section similar to the weapon abilities. When you [props a wep, the abilities only take one property slot, but when you open it, there's 2 pages abilities. Making your system like this would allow it to only take one slot on the props window, and hold as many abilities as you want without cluttering the [props window for the chars.
I hope this made sense.
Thanks for that advice, I'll take a look at BaseWeapon and see how that is being done!
I could easily do what I want the way they do stone mining, etc. but I'm thinking that having dozens of these things may result in that method not being a very good way to do it.