Kyrah Abattoir Posted April 27, 2020 Share Posted April 27, 2020 Allright, this is old as hell, but fairly underused. Rather than using a configuration notecard, which is slow and requires asynchronous parsing, there is a trick you can use: Rather than using notecard lines, you use the inventory directly. Instead of looking for notecard lines, you read the names of the inventory items and use that as your lines. You can quickly iterate through llGetInventoryName(INVENTORY_NOTECARD, i) and fetch the name of every notecard in inventory. Then it's just a matter of coming up with a configuration format, such as "key=value" (example: "operation_mode=owner"). As an added bonus, you can use the card description and content as a help file for this specific configuration entry. But it doesn't stop there! For configuration options that are essentially "flags" (on/off or other values the system expects), you don't even necessarily have to "load" the configuration, since reading it is pretty much instant: if( llGetInventoryType("operation_mode=owner") == INVENTORY_NOTECARD) will give you instantly whether the flag is set or not. The object inventory itself can potentially be seen as a quick access "rom", so long as you know in advance what you are looking for, or that you are willing to iterate through every entry of a given inventory object type. It is obviously not limited to notecards, in some items i use texture names for each entry. 5 3 Link to comment Share on other sites More sharing options...
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now