PenUltima Online

It is currently Sat Sep 06, 2008 1:24 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Cfg files pseudoclasses
PostPosted: Sat Aug 11, 2007 10:22 am 
Offline
Distro Developer
User avatar

Joined: Sat Jul 28, 2007 4:37 pm
Posts: 25
Location: HellCat Realms
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 13, 2007 10:20 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1127
Location: Southern Central USA
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.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 14, 2007 1:03 am 
Offline
Distro Developer
User avatar

Joined: Sat Jul 28, 2007 4:37 pm
Posts: 25
Location: HellCat Realms
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 14, 2007 9:06 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 137
Location: Illinois, USA
This sounds like a really good idea to me. It would make things alot easier in the configuration files, not to mention alot cleaner.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 12:45 am 
Offline
Distro Developer
User avatar

Joined: Sat Jul 28, 2007 4:37 pm
Posts: 25
Location: HellCat Realms
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?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 21, 2007 7:29 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1127
Location: Southern Central USA
Yes core is closed source. I don't think that will change.

Yeah if the moderators can it might be better in Features forum.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 2:02 am 
Offline
Distro Developer
User avatar

Joined: Sat Jul 28, 2007 4:37 pm
Posts: 25
Location: HellCat Realms
Ahem... a moderator can please move that in the feature suggestions forum? Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl