This is my first contact with tag based scripting and i'm pretty new to all scripting actually. One of the ways I like to improve is see what others have done in the past. Recently I downloaded an old zombie survival module to examine some of their scripts since my module was going to feature zombies as well. One of the things I noticed really quickly is this module didn't use the default nwn zombie models. They actually used normal pc races and the races had different cloths. After searching a while I found an OnSpawn script that generated new cloths and equiped them to the npcs.
// Apply a random amount of damage to Zombie.
effect eEffect = EffectDamage(Random(4)+1);
// Make the Zombie have random clothes.
object oItem = GetFirstItemInInventory();
AssignCommand(OBJECT_SELF, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
The first thing that jumped out at me was #include "gls_clothing". None of my scripts had anything like that inside of it and I didn't see how a script that short could possibly do all the things it claimed to yet when I played the module and loaded in a high level character I noticed when I started killing the zombies sure enough new ones respawned with totally random cloths. I copied and pasted the code into my module and as i'm sure you're aware it didn't work. When I saved the script I got the error message "Script resource "gls_clothing" not found."
After looking online for a little while I found myself on the ever helpful nwnwiki looking at:https://nwnlexicon.com/index.php/Grimlar_-_Introduction_To_Tag_Based_Scripting
which helped explain to my smooth brain that #include "gls_clothing" was somehow going into a folder and finding something called gls_clothing (unless i'm mistaken) and then adding that script to the one listed. My first though was that that's super cool and I didn't even know it could be done. My second thought was so ugh... where's the damn folder with the "templates?" it doesn't do me a whole lot of good if I can't see the code. And that's kind where i'm at right now. Where is the folder? Do I need some kind of software to access it or can I open it up in word or notepad? Haaaaaalp!!! please!