npcUtil.inc Functions |
|
NPC_GetAllTemplateNames |
|
Parameters | |
() | |
Name | Type |
This function has no parameters. | |
Explanation | |
Retrieves a list of all NPC templates in
the shard's npcdesc.cfg files. This includes packaged NPCs. |
|
Return Values | |
Returns an array of strings. | |
NPC_GetNPCConfig |
|
Parameters | |
(template) | |
Name | Type |
template | Template info from NPC_ParseTemplateName(). |
Explanation | |
Retrieves a config elem for an NPC template. | |
Return Values | |
Config elem | |
NPC_ParseTemplateName |
|
Parameters | |
(template_name) | |
Name | Type |
template_name |
Name of the npc template to load settings
for. If an NPC reference is used it will also load custom script settings set on it. |
Explanation | |
Finds the appropriate npcdesc.cfg to
load. This enables NPCs to be placed in packages and not just the ::npcdesc file. ReadConfigFile(":*:npcdesc") does not work in this case because packaged npcs have the package name at the begining of their .npctemplate member. Reading the correct config file also helps to avoid possible elem name collisions. E.g. "rabbit" in two packages. |
|
Return Values | |
Returns struct with the members: .package and .template |