I was wondering if it's possible ( or if it would be without too much trouble ) to use some sort of pseudo-class mechanism in config files. Let me explain better. There are cfg files such as npcdesc and itemdesc that often contains many similar entries, for example doors, lights, etc. Every entry has much of the properties and scripts identical to the others. I find that maybe a class "door" can contain generic properties and scripts and so derivate subclasses may declare just differences. For example, a "wooden door" subclass will only need to declare the "wooden" material, having the same scripts as the metal one.
What do you think about?
Cfg files pseudoclasses
- AxelDominatoR
- New User
- Posts: 27
- Joined: Sat Jul 28, 2007 4:37 pm
Yes, something like child objects... it might save time to the developer, too. Think about changing a single thing that should be updated in all or most doors, or maybe armors, weapons ( most of these items have the same props and scripts, they just have different graphics and a few stats )... it seems too much redundant to me.
Another place where this could be useful may be NPCs, for example. Think about all human NPCs like merchants. They have similar traits and most of them just change clothing, buy/sell inventory and some skills. Animals could be grouped in "families", like birds, felines, herbivores. Monsters, too... orcs, undeads, mindless, rat-men...
Maybe using a "child" will not be much useful if you have just three or four similar entries, but grouping them will at least look nicer and easier to search for and edit to me.
Another place where this could be useful may be NPCs, for example. Think about all human NPCs like merchants. They have similar traits and most of them just change clothing, buy/sell inventory and some skills. Animals could be grouped in "families", like birds, felines, herbivores. Monsters, too... orcs, undeads, mindless, rat-men...
Maybe using a "child" will not be much useful if you have just three or four similar entries, but grouping them will at least look nicer and easier to search for and edit to me.
- AxelDominatoR
- New User
- Posts: 27
- Joined: Sat Jul 28, 2007 4:37 pm
- AxelDominatoR
- New User
- Posts: 27
- Joined: Sat Jul 28, 2007 4:37 pm