mel, thanks for your help (as usual) but I fear this will be too complicated for me too understand.
I thought there must be an easier way.
I have a blackboard in our module where players can leave messages. These messages remain even after the mod reloads. Is there a way to do the same with LocalInts???
[snapback]15263[/snapback]
That board use things like GetCampaingString and SetCampaignString (string,int,ect..). They work like GetLocalString and SetLocalString. With the difference you don't apply it to a object but a string named to a database. (if the database doesn't exist it gets created)
It works different when you wish to delete a entry, with DeleteCampaignVariable, it won't even delete but just flag as deleted (makes huge db files) and deletes all types it mach for (string,int,ect..).
You also can use StoreCampaignObject to store a object in the database and get it back with RetrieveCampaignObject. And to end, you can delete the whole database with DestroyCampaignDatabase.
I didn't knew these function were used for a database
it's also new for me. The database itself gets stored in the directory "database" in your nwserver's root directory. You can know what database is used for what thing as it's named to the string you enter in the nwnfunction like GetCampaingString.
It's quite limited and it can't do as much as the sql database (and it's not suited for useing a lot). Making a ban list prolly is ok with it, writing a load of data that has to be changed daily is bad idea. (use sql for that) But as it's provided standard with the game and it's easy to use, you better take that for your idea's.
If you plan to use sql later you still can convert the .dbf database to a sql one (if you have a tool for it) Also, remeber that when you say to delete a entry it stays in the database, it just get's flagged as 'deleted'. This will make huge databases if you use it a lot. Making things slower and eating resources. I think there's no way to delete a existing entry so that it doesn't exist in the database anymore, if someone has a idea to do it, I'd like to know.
And btw, if you know you have something that can store code in your mod and could slove your problem ... why you don't look at it's code :glare:
About tools for the databse outside nwn, I only have good comercial editors/vieuwers. The only opensource one I found is way too limited to be useful and needs gtk+ installed on your system. You can find it here
http://sourceforge.net/projects/gtkdbfeditor/-Mel