Cfg files pseudoclasses

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
User avatar
AxelDominatoR
New User
Posts: 27
Joined: Sat Jul 28, 2007 4:37 pm

Cfg files pseudoclasses

Post by AxelDominatoR »

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?
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

So basically it sounds like you are suggesting the ability to define child objects within the cfg files or something like that. On the surface it looks like this might save memory by reducing redundancy at least with the door example anyway.
User avatar
AxelDominatoR
New User
Posts: 27
Joined: Sat Jul 28, 2007 4:37 pm

Post by AxelDominatoR »

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.
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

This sounds like a really good idea to me. It would make things alot easier in the configuration files, not to mention alot cleaner.
User avatar
AxelDominatoR
New User
Posts: 27
Joined: Sat Jul 28, 2007 4:37 pm

Post by AxelDominatoR »

There's something I can do to eventually help with this? I could program and/or test with detailed reports. Core is still closed source, right?

Oh, and should we move this post to "Feature Suggestions", maybe?
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

Yes core is closed source. I don't think that will change.

Yeah if the moderators can it might be better in Features forum.
User avatar
AxelDominatoR
New User
Posts: 27
Joined: Sat Jul 28, 2007 4:37 pm

Post by AxelDominatoR »

Ahem... a moderator can please move that in the feature suggestions forum? Thanks!
Post Reply