attributes.cfg

Archive of the older Feature Request Forum Posts

Moderator: POL Developer

Locked
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

attributes.cfg

Post by Pierce »

core-changes wrote: 06-16 Austin
Removed: Skills.cfg is no longer used.
Instead skill IDs will be read from uoskills.cfg and redirected to
attributes.cfg. The attributes.cfg file now has support for the old entries.
skills.cfg entries supported now in attributes.cfg are:
DELAY, UNHIDES and SCRIPT
First a question, not a suggestion.
Must DELAY, UNHIDES and SCRIPT be written in capital letters? :wink:

Code: Select all

checkpoint: load_attributes_cfg
From LogLevel i get this checkpoint in the log file, so i assume that the attributes.cfg is permanently loaded to memory. This leads to my suggestion, if that is right.
I put in some other members, e.g.

Code: Select all

Attribute DetectingHidden
{
	Alias		DetectHidden
                Test                          944949
	Delay		10
	Script		:detecthidden:detect_hidden
}
Is this "Test" also loaded on startup or only the "known" things like Alias ...?
If the "Test" is also loaded we could save some performance perhaps by a constant leading to this config in memory.

Something like:
const ATTRIBUTE_CFG := value; in uo.em

In combat related code you don't need to load a cfg at each hit with
ReadConfigFile();. If its already in memory for pol you could do something like that:

Code: Select all

FindConfigElem(ATTRIBUTE_CFG, whatever);
I don't know if this works or if i make a mistake in thinking :wink:
But if that works one could think about more constants like that,
e.g.
const NPCDESC_CFG := value; in uo.em

It is called a lot of times at least in our scripting and every script that wants something has to read it first again.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

No, I just wrote them in all caps so they stood out.
Locked