Aller au contenu

Photo

Yet another MySQL tale..


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
EzRemake

EzRemake
  • Members
  • 118 messages

Hey everyone!

 

I've taken it upon myself to learn MySQL for any database needs I may run into in the future, it's pretty straightforward so far and I've had no problems doing the basics with the NWN ODBC functions.

 

I am wanting to use this personal storage system: http://neverwinterva...-storage-system

 

with MySQL but I'm hitting a few bumps.

 

 

Here's the original of what I'm trying to change

 

http://pastebin.com/eRwAY9bu

 

 

Here's my attempt

 

http://pastebin.com/iQuLEUnJ

 

 

I've managed to get the object stored, and called properly with the proper inventory, but a problem I'm having now is running StorageClose() on PCs who have left (OBJECT_INVALID), which means duping is easily possible.

 

 

 

Also, something else I've been wondering: what is the limit on variables stored on items?

 

I know storing many variables on a PC items will slowly slowly raise the BIC size, but is there a limit or really any observable effect to having too many variables stores on items?

 

Thanks to anyone willing to take a quick look!



#2
EzRemake

EzRemake
  • Members
  • 118 messages

I've discovered NWNX_Funcs which has a nice hook into leaving clients, so you can actually run things based on clients that are no longer there. Using this, I can now run StorageClose() on the PC who has left, and not run into any issues with the DB not saving.


  • henesua aime ceci

#3
EzRemake

EzRemake
  • Members
  • 118 messages

Everything seems to be running smoothly so far, this database stuff really isn't so scary once you get used to it a little.

 

I'm still curious though, whether there's a limit to PC Item databases? I'm wondering if I should worry about transferring that type of storage to a DB.



#4
Kato -

Kato -
  • Members
  • 392 messages

IIRC the max reasonable number of variables per object is around 5000, not entirely sure though.

 

I have also used MySQL for storage (among several other things) in the past and I don't recall having met any kind of limit. I personally prefer MySQL over the bioware DB since the latter is a bit less flexible and needs to be periodically cleaned.

 

 

Kato 


  • EzRemake aime ceci