View previous topic :: View next topic |
Author |
Message |
QuintellaRosa
Joined: 07 Jun 2009 Posts: 4
|
Posted: Sat Jun 27, 2009 22:00 Post subject: Does "SetPersistentObject" really stores objects i |
|
|
Looking into nwnx_sql I've found:
Code: | sSQL = "UPDATE " + sTable + " SET val=%s,expire=" + IntToString(iExpiration) + " WHERE player='" + sPlayer + "' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SetLocalString(GetModule(), "NWNX!SQL!SETSCORCOSQL", sSQL);
StoreCampaignObject ("NWNX", "-", oObject); |
So: will it really store the object or SetCampaignObject will store the object?
Additionally: I'm really a newbee on PWs, so I don't know: what are common uses for storing an object? |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sun Jun 28, 2009 9:27 Post subject: |
|
|
NWNX hooks StoreCampaignObject() to store objects, but the other pieces of code in SetPersistentObject() are necessary to tell it where to store the object data. Basically, you should use SetPersistentObject() in almost all cases.
The most common uses for storing objects are persistent chests, merchants, and corpses. If you only store by resref, modifications made to the item in-game (variables; changes to name, appearance, etc.) will be lost. Storing the entire object avoids this problem.
(Disclaimer: this is based on my knowledge of NWN1, it might be different for NWN2.) _________________ Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/
<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.
<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|