Monday, 4 January 2010

SetTag Makeover.

Just over a year ago I was pleased to announce I had worked out a rather convoluted system to allow a way of adding party members in such a way that they could still respond like companions. At the time, the problem had been not being able to easily assign a tag to the party member for accessibility when coding. However, not long ago a new function was added to the toolset to allow tags to be set on objects, and last week I decided to take advantage of the function to rewrite some of the core scripts around this part of the module. This is why this week's blog entry is both a little late and brief (as I am still making the final adjustments).

Using the new function has greatly increased the efficiency of the code. Here it is in use:

string sNewTag = GetRosterNameFromObject(oPC);
SetTag(oPC, sNewTag);
This small piece of code replaces a ton of scripting simply because I no longer have to replace the original created party members with copies and thereafter ensure variables are carefully maintained if anything should happen to them. It impacts the following systems:

1) Initial setup of PCs.
2) Death and resurrection of PCs.
3) Further rostering of party members.
4) Between module transfer of PCs.

Many functions and heartbeat checks have been removed and replaced with one off scripts because of these changes, making the whole module less CPU intensive and more efficient as a whole.

PLOT PREFERENCES: Do Not Forget To Vote!

If you have not yet voted, then I am still after your vote (and feedback?) on your gaming preferences as requested in this post.

No comments: