View previous topic :: View next topic |
Author |
Message |
Lady Abagail
Joined: 27 Jul 2006 Posts: 17
|
Posted: Fri Jul 28, 2006 9:20 Post subject: sqlite 3.3.6 Commands |
|
|
Is the NWNX2 plug-in compatable with sqlite 3.3.6? Im writing a bunch of new content for arranging unique databases for different purposes in-game. As far as I can see NWNX2 only takes the command in string format from the module local variable and runs it through the SQL application. If I put sqlite 3.3.6 into my NWN directory with the two speak to each other? In my nwnx.ini file would i need to change 'source' from 'sqlite' to 'sqlite3'?
Edit:
Is there a command or default for creating a new database? I see that sqlite3 can attach and detach additional databases under various variable names, but, is it possible for me to create a new database file from scratch? nwnx.ini only has one field to specify which database file to operate from.
Thanks for your support! _________________ "Pudding can't fill the emptiness inside me...but it will help!" |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Fri Jul 28, 2006 9:54 Post subject: |
|
|
SQLite support in the ODBC plugin is based on one of the early releases of version 3 (I think 3.0.something). I currently do not know the exact version from the top of my head and I am not in front of my development computer, so maybe someone else can comment on this.
You do not need to (and may not) change the "source", since it already uses SQLite 3 as database format. External programs like the control program or SQLiteCC (see links section) may open the database simultaneously, but do not expect to see changes to the DB while the server is running. Those would only be visible if the server periodically COMMITs the data or has been shutdown.
You can create new database files by just specifiying a new database name in nwnx.ini. You can not use multiple database files at the same time, though. _________________ Papillon |
|
Back to top |
|
|
Lady Abagail
Joined: 27 Jul 2006 Posts: 17
|
Posted: Fri Jul 28, 2006 10:18 Post subject: |
|
|
Hmmm...when I was speaking about the 'source' field of nwnx.ini being set to 'sqlite' what I was inquiring was that the version of sqlite I have has the exe file named 'sqlite3'. If I want to use that exe to run my commands, assuming I cant cahnge the 'source' field to represent the file name, should I just change the file name of my exe to sqlite?
Im sorry I cant remember what package I dled that included the exe that I currently have in my c:\neverwinternights\NWN folder. _________________ "Pudding can't fill the emptiness inside me...but it will help!" |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Fri Jul 28, 2006 15:29 Post subject: |
|
|
The plugin is based on 3.08
At least that is the version that worked correctly |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sat Jul 29, 2006 10:02 Post subject: |
|
|
NWNX does not care how the sqlite.exe file is named, since it does not depend on it. You do not need the exe for NWNX at all, in fact. _________________ Papillon |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Sat Jul 29, 2006 17:48 Post subject: |
|
|
Papillon wrote: | NWNX does not care how the sqlite.exe file is named, since it does not depend on it. You do not need the exe for NWNX at all, in fact. |
Nope, but when you make a new database with the utility you either have to use the correct .exe or you have to use another utility that creates it at the correct version. |
|
Back to top |
|
|
Lady Abagail
Joined: 27 Jul 2006 Posts: 17
|
Posted: Sat Jul 29, 2006 19:09 Post subject: |
|
|
Acrodania wrote: | Nope, but when you make a new database with the utility you either have to use the correct .exe or you have to use another utility that creates it at the correct version. |
Then I guess I better include the version of SQLite that Im using to Dev my Persistent World System base module...or at least provide documentation on how to make it work. SQLite is only the beginning, once Ive gotten this project running Ill add scripting to make it functional with other databases as well, especially MySQL. _________________ "Pudding can't fill the emptiness inside me...but it will help!" |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Sat Jul 29, 2006 23:56 Post subject: |
|
|
PrC is using a later version with their setup, you might consider using that version. Makes compatibility between major systems easier
But good luck in your project! Its good to see people still interested in doing major work on NWN1....
P.S.- I always use MySQL instead of SQLite because I like the remote administration capabilities, but the SQLite 0-install setup has definately increased interest in NWNX.... |
|
Back to top |
|
|
Lady Abagail
Joined: 27 Jul 2006 Posts: 17
|
Posted: Sun Jul 30, 2006 0:39 Post subject: |
|
|
Acrodania wrote: | PrC is using a later version with their setup, you might consider using that version. Makes compatibility between major systems easier
But good luck in your project! Its good to see people still interested in doing major work on NWN1....
P.S.- I always use MySQL instead of SQLite because I like the remote administration capabilities, but the SQLite 0-install setup has definately increased interest in NWNX.... |
Im pretty sure Im using the latest NWNX version, but Ill look into it to make sure. I have the hashset and functions script erfs as well but havent gotten too involved with reverse engineering their functionality. To be honest Im not very well versed in arrays and hashsets, though I sorta got the idea what they are all about from a Perl tutorial I was reading on Wikipedia to get comfortable with Perl syntax to try to write code for LetoScript Unicorn.
As far as NWN1, its more then software, its a work of art. It has limitations, but all in all, the beauty of what Bioware created far far exceeds the integrity of its sponser (namely Atari). The very fact that Bioware is seeing this software through to yet another patch, namely v1.69, completely astounds me in respect to the fact that funding for the project has been withdrawn by Atari. How could I turn my back on it when there is so much dedication to this product?
My Persistent World System is ambitious. Im starting small and working up from there. Soon Id like to get my own forums started so interested parties can check on my progress and offer assistence or advice. In the end I hope to achieve in scripting what CEP has done for custom content, or what CTP plans to do for Tilesets. It wont have everything, thats for sure, but it should have the basics all packaged up in one easy dl for the aspiring World Builder to add to and build on.
Remote Administration is definately going to be a must in the final release of the PWS base module. Just have to have some time to finish the SQLite 0 setup system first and dig into the MySQL stuff later on. _________________ "Pudding can't fill the emptiness inside me...but it will help!" |
|
Back to top |
|
|
Lady Abagail
Joined: 27 Jul 2006 Posts: 17
|
Posted: Sun Jul 30, 2006 18:06 Post subject: |
|
|
Hmmm, Ive run into a bug in the table setup for 'pwdata'. I mentioned before that Im reserving the 'pwdata' setup in the main database for other systems that use it, but one of its features is interesting to me, but it doesnt seem to be working.
When the table is created it creates the column last with the following;
Code: |
last timestamp NOT NULL default current_timestamp
|
But the database isnt writing a timestamp into the column it just inserts the string value "current_timestamp". How do I write the table schema to actually perform a timestamped entry by default? _________________ "Pudding can't fill the emptiness inside me...but it will help!" |
|
Back to top |
|
|
Lady Abagail
Joined: 27 Jul 2006 Posts: 17
|
Posted: Mon Jul 31, 2006 1:51 Post subject: |
|
|
Lady Abagail wrote: | Hmmm, Ive run into a bug in the table setup for 'pwdata'. I mentioned before that Im reserving the 'pwdata' setup in the main database for other systems that use it, but one of its features is interesting to me, but it doesnt seem to be working.
When the table is created it creates the column last with the following;
Code: |
last timestamp NOT NULL default current_timestamp
|
But the database isnt writing a timestamp into the column it just inserts the string value "current_timestamp". How do I write the table schema to actually perform a timestamped entry by default? |
Okay I cant make the changes in the schema, but if you create a null text field and set the variable to default to "datetime('now')" in NWScript it will work
Code: |
void SetPersistentString(object oObject, string sVarName, string sValue, int iExpiration =0, string sTable = "pwdata", sLast = "datetime('now')");
|
_________________ "Pudding can't fill the emptiness inside me...but it will help!" |
|
Back to top |
|
|
|