Author Topic: NWNX ODBC - object storing  (Read 337 times)

Legacy_Alex Warren

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +0/-0
NWNX ODBC - object storing
« on: May 23, 2011, 03:25:03 pm »


               I was recently interested in this system: Markshire Portable Persistent Chest System

and also checked this: Aerisarn's edited Markshire Persistent Portable Chests

The second one requires NWNX with ODBC plugin installed.

Can someone tall me which one is better for PW use?

The first one uses Bioware DB, the second one is using ODBC + Bioware DB (I don't understand the code for object storing completely - don't use ODBC much, but it seems that it contains some NWNX operations + StoreCampaignObject())

How does SetPersistentObject() actually work? Is it faster/better than normal StoreCampaignObject()?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
NWNX ODBC - object storing
« Reply #1 on: May 23, 2011, 08:49:44 pm »


               The SetPersistenObject will do some NWNX setup and then call StoreCampaignObject, but the default function is altered in NWNX code and it does work faster. Much faster especially for object storage.

I think that all servers that used bio DB for persistent chest switched in the end to storing resref/additional info instead in single string. NWNX based servers dont have to. NWNX database is absolutely reliable and fast as hell, it allows not only everything bio can do but much much more like search in datas etc.

There are some special workarounds for BIO DB issues but NWNX is still faster/better. The only reason I have seen to not use NWNX DB was that the server didnt want to use NWNX at all since it have to be running all time. Without NWNX you can set the server the way that it is started with the first player logs in and quited when last player logs out.
               
               

               
            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
NWNX ODBC - object storing
« Reply #2 on: May 23, 2011, 09:28:57 pm »


               Genesis II RPG server uses the nwn odbc and it works pretty well,  The bigest thing you need to decide is how much storage or better said above by shadow is how much data do you want to store?
If not mass amouts but moderate or fair then it should do just fine.  Genesis II RPG uses it heavly and does ok.  I as a player have only experinced 2 crashes and the loss was min as far as items.  If mem I have copy of odbc i will look into more to better answer your question.  But over all its nicer to use the odbc when db use is moderate to heavy at min. if db use fair to mild either one is just fine in my opinion.  I my self use nwnx db anytime i can, but try to offer the nwndb option so others can take examples from nwn mods and better understand how to apply in scripting.
               
               

               
            

Legacy_Alex Warren

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +0/-0
NWNX ODBC - object storing
« Reply #3 on: May 24, 2011, 01:58:54 pm »


               Thank you both. I guess I will add NWNX support to my script '<img'>

Edit: The reason I asked - I tried Aerisarn's system with my module and it created NWNX.* files in my database folder. It turned out that my sql database was not configured properly (pwobjdata was missing). Now, when I fixed this, everything works and objects are stored in sql database (no nwnx db in database dir '<img'> )

Thanks again.
               
               

               


                     Modifié par Alex Warren, 24 mai 2011 - 01:57 .