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?
Code:
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:
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:
FindConfigElem(ATTRIBUTE_CFG, whatever);
I don't know if this works or if i make a mistake in thinking
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.