Page 2 of 2

Re: Test your NPCs/Testet eure eigenen NPCs!

Posted: Wed Jul 27, 2011 9:21 am
by Dyluck
Oh really, it does not reset even for these test characters? Huh strange, I didn't seem to notice that when I tested it a few days ago. But anyways, yeah I'll just manually make it 0 first then.

Re: Test your NPCs/Testet eure eigenen NPCs!

Posted: Wed Jul 27, 2011 9:43 am
by martin
Queststatus is permanent, it gets written into the database as soon as you set it and stays ther until you change/remove it.

Martin

Re: Test your NPCs/Testet eure eigenen NPCs!

Posted: Wed Jul 27, 2011 10:07 am
by Estralis Seborian
...and that is what makes it so powerful and versatile!

The server never forgets the values you set there. You can access these values from any script. This is totally different with e.g. normal variables like "state"; they are forgotten with every server reload/crash and you cannot access them from outside the module (e.g. the cooking spoon script cannot access the variables you set with the cook NPC). Persistent, global variables are on the "to do" list for Illarion, though; but using queststatus for quests is and will be the best method. I gave you, Dyluck, that skeleton script which changes a queststatus upon using an item ("setQuestProgress"); this change can be recognised by any NPC or script. A change of a variable (e.g. usedTheSkeleton=true) can only be recognised by... other skeletons.

Re: Test your NPCs/Testet eure eigenen NPCs!

Posted: Wed Jul 27, 2011 10:23 am
by Dyluck
Yep I understand, I just thought that the NPC tester character resets because he's special. Guess not :wink:
But it's good, because it means I can just test related NPCs one after another.