Starting a new topic for it, as Rolo suggested, so that the UoA thread can stay for if anyone gets any more info on it.
Edit: Updated Erf download link
Here:
This system is set up for using Set/GetPersistentString under the table "pwrumors", which it will create and initialize if hooked into the OnModule load.
If the persistence isn't needed, or someone wants to use it without NWNX, those calls can be commented out, and the Get/SetLocalString calls can be commented instead. I use those for quick testing of changes, but they would work for SP module use since the variables on the PC would be saved in that case.
I'll be expanding the options for what the NPCs will say later, that's the only part that's still quite obviously unfinished. It works, but there's only three variations at the moment. I figured out how I want to do it now though, so in a day or two I'll have an easily expandable and customizable framework in for that part of it as well.
If there are any suggestions for other rumour worthy acts, I'll expand that as well. I just went with the obvious ones to start. Here's the ones in now:
const int RUMOR_TYPE_SLAY_ENEMY = 1;
const int RUMOR_TYPE_ROB_ENEMY = 2;
const int RUMOR_TYPE_BETRAYAL = 3;
const int RUMOR_TYPE_DEFEAT_BY_ENEMY = 4;
const int RUMOR_TYPE_SAVE_ALLY = 5;
There's an option to have it check for only a specific rumor type that I haven't finished writing in. At the moment it only finds the highest weighted one that the NPC can make the lore check for. It's just a few if statements to add that I haven't gotten around to yet.
The biggest drawback of the system, is that creatures named by type are "spoken back" in a very fluid way, since they're missing the "a" or "the" needed. There's a variable check in to allow for giving them a more fluid name for rumours, but that's only an option for non-default creatures.
The biggest advantage, is that it can hook into any existing system without affecting others, since it just stores and writes variables, and occasionally makes an NPC speak a string.
Modifié par Failed.Bard, 30 octobre 2011 - 10:01 .