Aller au contenu

Photo

Persistent world database?


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

#1
Who said that I

Who said that I
  • Members
  • 492 messages

Okay, anyone using the NDBE system of KNAT? http://nwn.wikia.com...Persistence_API

 

Can anyone tell me what your opinion/experience with this is? And if it is actually viable for me to use it?

 

(also a bit foggy on how to actually install it, since I tried but it does not work.....apparently....) 

 

in any case thank you for your help!



#2
Thayan

Thayan
  • Members
  • 244 messages

Yes, we've been using it on Thay for 7+ years now. Other than a strange problem with a rather large player housing furniture database -which I can't say definitively was due in any part to how the NBDE system works- it's worked very well.

 

Whether or not it will work for you depends on what you plan to use the databases for. Flushing the databases (actually writing the files to the disk) is what is the slowest and most resource intense, which is probably the main reason there is such a low opinion of Bioware DBs across most the community. So I'd recommend making sure you are only flushing/saving the databases when you really need them.

 

Just as an example of how we try to limit usage of NBDE and Bioware databases - persistent info that needs to possibly be recalled across players or PCs is stored in the database (such as who and how many people are in a faction, or in what areas player-owned merchants need to be recreated when the module loads, or where a player-owned house is located and all the furniture that needs to go into it if someone enters it, etc). Whereas almost anything that is PC-specific is stored on a non-droppable item in the PC's inventory (such as the amount of gold in their vault, or how various NPCs feel about the PC, their mount/horse info, and so on).



#3
Kato -

Kato -
  • Members
  • 392 messages

I have tried it in the past and had no problem. Still, if you're at the stage of planning/building your DB system, you should seriously consider using MySQL right from the start, talk about flexibility.

 

 

Kato 



#4
Who said that I

Who said that I
  • Members
  • 492 messages

@ Thayan Ah, thank you. My plans for the database are mainly for storing character data (preferably periodically). Right now not planning so much for it. So it will remember a character has died when he/she/it has not respawned before server resets. And saving faction reputation of the character.

 

@Kato Hmm, I never worked with MySQL  before.... but yes I am still very much in the process with building and scripting. :) 



#5
Kato -

Kato -
  • Members
  • 392 messages

Ah, well, considering you need to store only a few infos(without any special manipulation), the Bio DB could indeed do the job. If you anticipate your needs to grow, though, MySQL is unbeatable.

 

 

Kato



#6
Who said that I

Who said that I
  • Members
  • 492 messages

the problem I am having with this system is that I am a bit fuzzy on how to actually get this to work. I followed the instructions but it does not seem to do what it should. Also was not entirely sure into what files I had to add the #include "something something" in the script since I was not sure which actually were required to make the system running (also does not help that English is not my native language and that I at times struggle with the meaning of a sentence.....yay for challenge....) 



#7
Terrorble

Terrorble
  • Members
  • 194 messages

I never could get MySQL setup either.

 

Refering back to what Thayan said about storing data.  If you have information that is potentially needed by all players and it needs to persist between resets, then you need the DB.  If the information is specific to the player about their stats, quest progress, faction reputation, etc then the non-droppable inventory item is very good for that.



#8
Who said that I

Who said that I
  • Members
  • 492 messages

I never could get MySQL setup either.

 

Refering back to what Thayan said about storing data.  If you have information that is potentially needed by all players and it needs to persist between resets, then you need the DB.  If the information is specific to the player about their stats, quest progress, faction reputation, etc then the non-droppable inventory item is very good for that.

Yup! I am aware of this! However I am not entirely sure how to implement that system (The bio extender DB of KNAT) into my module. Seeing that it said that I have to add a certain line to specific DB-required scripts (or better said scripts that the DB needs to get its info from) 

 

So I am a bit puzzled how to do this, sure there is a tutorial on how to do it but.....it is not very clear in my honest opinion.

 

anyway thanks in advance people :) 



#9
Kato -

Kato -
  • Members
  • 392 messages

Tell you what, if you use nwnx and you ever choose to use MySQL and need help with the DB setup/design, send me a PM and we'll get through this at light speed.

 

 

Kato 



#10
Who said that I

Who said that I
  • Members
  • 492 messages

Tell you what, if you use nwnx and you ever choose to use MySQL and need help with the DB setup/design, send me a PM and we'll get through this at light speed.

 

 

Kato 

well, if you could that would be simply awesome! :) 



#11
Thayan

Thayan
  • Members
  • 244 messages

NBDE is not too difficult to use. Probably easier to figure out than installing and learning a bend new DB system if you've already been using the built-in DB functions. But do what you like, obviously. If you want to try and stick with NBDE, once you import the NBDE package into your module, there are three main steps -

 

1. Place the NBDE Database container (placeable container) somewhere in the module that players cannot get to so they cannot open it.

 

2. Do a find across all the scripts in your module for the Get or SetCampaign functions. At the top of all those scripts, add the NBDE library by putting this at the top of the script:

#include "nbde_inc"

 

3. Finally, you replace all the regular Get/SetCampaign functions with the NBDE_ wrapper version of them. Or basically, just put NBDE_ in front of all those functions. For any of the SetCampaign functions, you will all need to place the FlushCampaignDatabase("DB_NAME") function after them at some point to physically save them from where they are temporarily store in that NBDE container to the actual database file.

 

As with everything, there are various things that might pop up or problems you might encounter. But if you read the instructions at the top of the nbde_inc, Kant did a very good job documenting the system and it should explain, in much more detail than this, the details of that system.



#12
Kato -

Kato -
  • Members
  • 392 messages

Okay, I'll need to send you a few files and technical infos and you'll be ready to go. If you don't mind, I prefer to team work via email instead of PM, so, when you're ready, email me: yoda2157@gmail.com.

 

 

EDIT: Beaten by the punch, choose as you wish :)

 

 

Kato



#13
Who said that I

Who said that I
  • Members
  • 492 messages

NBDE is not too difficult to use. Probably easier to figure out than installing and learning a bend new DB system if you've already been using the built-in DB functions. But do what you like, obviously. If you want to try and stick with NBDE, once you import the NBDE package into your module, there are three main steps -

 

1. Place the NBDE Database container (placeable container) somewhere in the module that players cannot get to so they cannot open it.

 

2. Do a find across all the scripts in your module for the Get or SetCampaign functions. At the top of all those scripts, add the NBDE library by putting this at the top of the script:

#include "nbde_inc"

 

3. Finally, you replace all the regular Get/SetCampaign functions with the NBDE_ wrapper version of them. Or basically, just put NBDE_ in front of all those functions. For any of the SetCampaign functions, you will all need to place the FlushCampaignDatabase("DB_NAME") function after them at some point to physically save them from where they are temporarily store in that NBDE container to the actual database file.

 

As with everything, there are various things that might pop up or problems you might encounter. But if you read the instructions at the top of the nbde_inc, Kant did a very good job documenting the system and it should explain, in much more detail than this, the details of that system.

Hmm sounds like it might be a bit of a brainer that one, seeing that on my module I do not really have scripts with campaign stuff in it (hell I build it all from scratch so most are still empty slots honestly)  

 

Only managed to fill up the respawn slot since I wrote my rather basic but nifty (even if I say so myself) respawn script.

 

but will let you know which one I will end up on using :) 



#14
Who said that I

Who said that I
  • Members
  • 492 messages
Hello again! So i have taken a little break from like....everything and now i am back and with renewed energy to keep building on my module. Now the db is STILL not setup (i know shame on me) so I would like to have some help with what I should have and with the implementation of it (preferably on a step by step basis since i am rather slow on this subject xD)

What I currently am trying to work on the module which will probably requires a db to store it all is the following:

- player storage
- persistant housing
- rp reward system

Though not entirely sure if ilthe last one needs the db but just adding it for the just in case scenario.

Currently have the knat system half installed (meaning i imported the erf.)

Any help on this part would be grand obviously :) (i apologie if i seem slow since english is not my first language so it will be a bit of a vhallenge for me)

#15
Thayan

Thayan
  • Members
  • 244 messages

The first two are pretty big requests for one thread to really address it all. I'd suggest searching the new vault for Hunter's Housing and the storage system by Ophidios for persistent storage - I think it was called Secure Persistent Chest System. Although that storage system needs modifications to avoid certain exploits where unscrupulous players could duplicate items placed in storage containers, so maybe there are better ones than that. I know there are a number available so look through them and take your pick of which one might work best for you.

 

For your reward system, you might want to lay out in more detail what you want to accomplish with it and any limitations or guidelines you want to impose.



#16
henesua

henesua
  • Members
  • 3 878 messages

What is your server's OS? If you are using a linux server you should avoid using the Bioware DB. Eventually the strings in the DB will replicate so much that the files reach their maximum size and fail to work.

 

Some simple persistence systems use items in the PC's inventory including PC Skin's.

 

And of course there is NWNX with its hooks to a database.

 

If you are using a windows or osx server, the Bio DB with Knat's improvements is a fine choice.



#17
Who said that I

Who said that I
  • Members
  • 492 messages

I am using windows.

 

well just looking for an easier way since I do not think this is actually working at the moment....