NWN-FF is the fastest solution available on NWN to access data into a MySQL DataBase, and it also provides many additionnal unique features.
NWN-FF 4.1.0 is a set of complementary projects with all sources included. An erf and a demo module are also provided. It's fully compatible with APS/NWNX 2 and can use NWNX 2 plugin.
It is very easy to start with NWN-FF: the documentation has been rethought, and you don't need to worry about database or table creation; NWN-FF will handle that for you.
If you want to use a real database in you NWN module, then take this: it's fast,it's easy to use, and it's free :)
I hope you'll like it.
FF
Please share your experience on NWN-FF Bioware guild: http://nwn.bioware.com/guilds_registry/viewguild.html?gid=7729
Posted by Tinkerbell ( 68.93.xxx.xxx ) at 2006-04-03 09:05:39
I am having trouble with FF auto loading my mod. the INI file has the mod name i start FF and it finds the mod opens nwn server but alas does no load the mod i have to select it and then click load. When the server resets i have to manually select the mod and hit load. Any suggestions?
Posted by lylver at 2006-03-20 13:27:18 Voted 9.50 on 03/20/06
Je récupère la 4.1.00 pour les fonctions de coffres persistants et les autres outils sympathiques pour les descriptions et les noms d'objets. Par contre j'aime pas du tout les boucles pcloops à cause de la fonction de randomization et de l'écriture trop fréquente (export des personnages). C'est devenu un excellent travail communautaire, encore sujet à amélioration. _________________________ TN Bouchon 2 (PW-RP), un des "bouchons lyonnais"
Posted by Anonymous ( 212.171.xxx.xxx ) at 2006-02-09 14:15:48
Does NwN-ff work with MySql 5?
Is there any compatibility issue?
Hello i run a PW with persisten access to MYSQL database. I used NWNX2 and i try this NWN-FF.
FastFrench you made a good work: Server monitor tool is much better than NWNX2 and NWN-FF is really faster.
But i have found some bugs and i have some ideas.
1) you profiler need an option to limit result file txt size (like nwnx2). This txt become 100 mb in few hours in my server.
2) your profiler reports only script times not area and npc timings like nwnx2 profiler (nwnx2 uses @ and $ characters for npc and area times)
It is very important because pathfinding of areas is very CPU intensive in NWN, and if you have an area with many o bad placed placeables and npcs, your cpu is drained and you profiler does not say this to me.
3) I install all using instructions but for me all PC ff functions dont work. ff_GetPCpersistentInt does not work, but ff_GEtPersistentInt works.
I dont known why, i had no time to investigate)
4) I find a bug (i think).
In your ff_ functions you dont Sqlencode the valuename so if i write for example ff_getpersistentint("bla ' bla") i create an sql syntax error.
Insted in customized aps_include, all is ok.
5) In your html istruction file when you write about conversion from nwnx2 to nwn-ff you don mention new Sqlencode function. SO initially my old tables dont work (then i see that i must convert tables in new format,adding in ff_buildtable)
Honestly i think that new encode/decode function are NOT a good idea.
Encode is not faster at all. Decode is used ONLY when i getpersistentstring and it is faster ONLY when i have a "'" in string i retrieve from database.
I think it is a very very minimal speed gain for breaking nwnx2 tables compatibility and to make addizional functions in ff_buidtable to convert all tables. But it is only a my idea.
Posted by Fleshmelter at 2005-10-27 02:13:26 Voted 10.00 on 10/27/05
@scott1uol
If you still check in on this board, you need to have Mysql running inorder to avoid the freeze at the player screen.
Ya prolly already got the answer, but eh...maybe someone else needs it :) _________________________ PW Action Server:
| Chaosgate |
Posted by Fleshmelter at 2005-10-27 02:13:06 Voted 10.00 on 10/27/05
@scott1uol
If you still check in on this board, you need to have Mysql running inorder to avoid the freeze at the player screen.
Ya prolly already got the answer, but eh...maybe someone else needs it :) _________________________ PW Action Server:
| Chaosgate |
Posted by Fleshmelter at 2005-10-27 02:09:58 Voted 10.00 on 10/27/05
First off I've never posted on your contribution to the NWN community, I shall remedy that now.
I've always had trouble trying to implement a Mysql database, but through alot of trial and error and your very well written document I was able to thumb it out. Mysql tables was still a problem, and then you solved that with the buildtables script in your system.
No slight to NWNX, but i truly found your system very user friendly. After I had my issues with Bioware database(lags like the devil) I pretty much gave up on my PW. You have given me back my love for building cause now I can use the very fast Mysql database, and that I truly thank you for.
I'm not a scripting genius, but definetly I can pick up things or two by looking at other peoples work and you made it that much easier, cause the installment of your system was almost hands free. Well I guess thats enough from me on how I love this NWN-FF, so I'll just say thanks again for putting out this wonderful tool.
PS.
You might want to work on the persistent chest though, it has a ridiculous dupe bug.....put an item in close chest it saves, open chest take it out....open chest again and hey! its there again. I did this with a stack of 9 potions, didn't really try anything else. Just thought i'd report it...although you prolly know already. _________________________ PW Action Server:
| Chaosgate |
With this version 4.1.0, NWN-FF now supports saving and retrieving objects from a MySQL database (RCO/SCO). This new feature is an adaptation of NWNx/APS equivalent, with of course some additional optimizations.
All rarely used parts of NWN-FF have been removed: mainly all ODBC stuff, so now NWN-FF only works either with MySQL or no database. Also FF_translator.exe and the archaic versions of Speech support (only NWNx_FFSpeech is now provided and supported).
In this version, I�ve mainly integrated all the interesting points from NWNX/APS into NWN-FF, the same way NWNX/APS included several features first introduced into NWN-FF.
Thanks to Papillon, Xildjian, Dazzle, Isilweo for their work.
I�ve also added the several functions from NWNX/APS into NWNX_Functions plug-in : SetDescription (only usable for items and placeables) and SetName (Item, placeables and MapNotes). I�ve also included many new functions, written by different NWN community member (thanks to Xildjian, [email protected] for DeleteChar, Isilweo for SetName / SetDescription, Dazzle and NWNx team for most of the other functions).
I�ve also included in the package (both demo module and erf importation file), a ready-to-use persistent chest. All you have to do is to get it from the palette (magical chest) and put it on the map. If you want to have several chests, better give a unique tag for each one.
As I�ve found it convenient, I�ve also included Papillon�s NWNx_Resman.dll. This is the exact original, I�ve done no adaptation on this one. Like all NWNx plugins, it works with no trouble on NWN-FF.
Here is the list of all new functions coming with NWN-FF:
Database related functions, dealing with objects
// Store an object for that PC on a specific Placable (chest...)
void ff_SetPersistentObject(object oOwner, object oObject, object oPlacable=OBJECT_INVALID, string sTable = "RCO_SCO");
// Retrieve the first object for that PC on a specific Placable (chest...)
object ff_GetPersistentObjectFirst(object oOwner, object oPlacable=OBJECT_INVALID, string sTable = "RCO_SCO");
// Retrieve the next objects ('til return NULL)
object ff_GetPersistentObjectNext(object oOwner, object oPlacable=OBJECT_INVALID);
// Remove all objects associated with that player on a given placable
void ff_CleanPersistentObject(object oOwner, object oPlacable=OBJECT_INVALID, string sTable = "RCO_SCO");
//And the following functions are provided for NWNx/APS compatibility:
object GetPersistentObject(object oObject, string sVarName, object oOwner = OBJECT_INVALID, string sTable = "pwobjdata");
void SetPersistentObject(object oOwner, string sVarName, object oObject, int iExpiration = 0, string sTable = "pwobjdata");
//Plus this bonus function, very useful to handle persistent inventories (chests�)
void DeleteAllPersistentObject(object oObject, string sTable = "pwobjdata");
New helper set of functions, coming with NWNx functions plugin.
void ff_SetGoldPieceValue(object oObject, int iValue);
void ff_SetName(object oObject, string NewName);
void ff_SetDescription(object oObject, string NewDescription);
string ff_GetDescription(object oObject);
void ff_SetBodyPart(object oPlayer, int nPart, int nType);
int ff_GetBodyPart(object oPlayer, int nPart);
void SetLockDC(object oChest, int DC);
void ff_ChangePlayerAppearance(object oPlayer, int nPart, int nType);
void ff_ChangePlayerAppearance(object oPlayer, int nPart, int nType);
void ff_DeleteThisChar(object oPC);
help i need to use a database for the crafting sys on my server but i dont know how can any help me plz [email protected] or post here really need help have no idea where to start.... _________________________ Time is the Fre in Which we Burn
I installed NWN-FF following the instructions carefully, was able to pull up the sample module, however when I try to test the module or to play it, it gets to the player select screen and then freezes.
Has anyone else encountered this? All I am looking to do is create, drop, maintain and retrieve data from SQL tables in my modules.
Posted by red teflon ( 68.32.xxx.xxx ) at 2005-07-10 14:07:41
French I love this system thanks for this it is fast and reliable and pretty easy to set up. I wondering if you would be able to help me with a script adaptation I am working on. it is under "Help needed in adapting a script please" in the fast french forum. Thanks.
Recipes? You should tell me more about your mod to get some help. Depends what kind of recipes you're talking about. Your problem doesn't seem to be very database-related.
I've been trying to figure out a way to leverage this system to make racial and subrace based recipes...so far the best I've come up with is recipes that require a tool only usable by the race or subrace...
any idea for a more elegant solution? Perhaps adding the race/subrace info to a table?
Thanks to Garrath suggestion, SQLDecode/SQLEncode changed to work faster: SQLEncode is as slow as before, but SQLDecode is now very fast (it does nothing at all). If you have existing tables which are not NWN-FF standard, and if you use fields with texts that may have quotes in them (or �~�), then you may need to edit the end of ff_buildtable.nss and add some new FixQuotes instruction to convert those fields into the new NWN-FF 4.0.15+ format. If you may prefer to do it manually, you may use this SQL instruction for each text field that may have quotes (replace TableName and FieldName with the proper value). In that case, do it just before launching the new version of your module:
UPDATE TableName SET FieldName = REPLACE(FieldName,'~', '\'') WHERE LOCATE('~', FieldName)>0
Some bugs reported by Hacknisty are fixed (errors in a couple of SQL instructions).
The following nss files have changed: aps_include.nss, ff_buildtable, ff_include
The option [FFSpeech] Debug will now trace the detail of all speech only for a Debug value of 2 or higher. (before, was 1 or 2 for more details).
Here is the meaning for each value: 0 = only critical errors traced. 1 = details on Interface selection and some important warnings. 2 = detailed traced, including all text contents. 3 = very detailed traces.
Some new tries to avoid that @@@ error message when NWServer.exe is restarted. Unfortunately this message still sometimes occurs.
A new instruction NWNX!ODBC!DEBUG. This instruction will allow you to change the debug level of nwn-MySQL.dll or nwn-ODBC.dll from the scripts. It may be useful for instance when you want to get full debug information for only some specific parts of your script. A value of 0 will put the old value back ([MySQL] Debug).
The instruction NWNX!DLL introduced in version 4.0.14 didn�t work properly. It�s now fixed.
The plug-ins dll had sometimes a wrong name when compiled (nwnx-* instead of nwnx_*). This is fixed.
When no module activity is detected, the server still do not restart now until CPU usage drops to 0%.
7.6.2005: v 4.0.15
Thanks to Garrath suggestion, SQLDecode/SQLEncode changed to work faster: SQLEncode is as slow as before, but SQLDecode is now very fast (it does nothing at all �º ). If you have existing tables which are not NWN-FF standard, and if you use fields with texts that may have quotes in them (or ¡§~¡¨), then you may need to edit the end of ff_buildtable.nss and add some new FixQuotes instruction to convert those fields into the new NWN-FF 4.0.15+ format. If you may prefer to do it manually, you may use this SQL instruction for each text field that may have quotes (replace TableName and FieldName with the proper value). In that case, do it just before launching the new version of your module:
UPDATE TableName SET FieldName = REPLACE(FieldName,'~', '\'') WHERE LOCATE('~', FieldName)>0
Some bugs reported by Hacknisty are fixed (errors in a couple of SQL instructions).
The following nss files have changed: aps_include.nss, ff_buildtable, ff_include
The option [FFSpeech] Debug will now trace the detail of all speech only for a Debug value of 2 or higher. (before, was 1 or 2 for more details).
Here is the meaning for each value: 0 = only critical errors traced. 1 = details on Interface selection and some important warnings. 2 = detailed traced, including all text contents. 3 = very detailed traces.
Some new tries to avoid that @@@ error message when NWServer.exe is restarted. Unfortunately this message still sometimes occurs.
A new instruction NWNX!ODBC!DEBUG. This instruction will allow you to change the debug level of nwn-MySQL.dll or nwn-ODBC.dll from the scripts. It may be useful for instance when you want to get full debug information for only some specific parts of your script. A value of 0 will put the old value back ([MySQL] Debug).
The instruction NWNX!DLL introduced in version 4.0.14 didn¡¦t work properly. It¡¦s now fixed.
The plug-ins dll had sometimes a wrong name when compiled (nwnx-* instead of nwnx_*). This is fixed.
When no module activity is detected, the server still do not restart now until CPU usage drops to 0%.
Posted by Graftark ( 24.151.xxx.xxx ) at 2005-05-13 13:50:42
I have just tried to get NWN-FF 4.0.14 working with a new module. I have used 4.0.12 before... I think thats what it was and had no problems implementing it. Now it seems that the ff_include code is broken. Here's what I got...
Error I am getting when I compile any script that uses this file:
ff_include.nss(140): ERROR: PARSING VARIABLE LIST
This is the part of "ff_include" the error is tied to. line 140 is: object oLocal = GetNWNMySQLWP();
int SQLLocalFetch()
{
object oLocal = GetNWNMySQLWP();
SetLocalString(oLocal, "NWNX!ODBC!FETCH", GetLocalString(oLocal, "NWNX!ODBC!SPACER"));
LOCAL_BUFFER = GetLocalString(oLocal, "NWNX!ODBC!FETCH");
if (GetStringLength(LOCAL_BUFFER) > 0)
return SQL_SUCCESS;
else
return SQL_ERROR;
}
Posted by Graftark ( 24.151.xxx.xxx ) at 2005-05-13 13:36:00
I have just tried to get NWN-FF 4.0.14 working with a new module. I have used 4.0.12 before... I think thats what it was and had no problems implementing it. Now it seems that the ff_include code is broken. Here's what I got...
Error I am getting when I compile any script that uses this file:
ff_include.nss(140): ERROR: PARSING VARIABLE LIST
This is the part of "ff_include" the error is tied to. line 140 is: object oLocal = GetNWNMySQLWP();
int SQLLocalFetch()
{
object oLocal = GetNWNMySQLWP();
SetLocalString(oLocal, "NWNX!ODBC!FETCH", GetLocalString(oLocal, "NWNX!ODBC!SPACER"));
LOCAL_BUFFER = GetLocalString(oLocal, "NWNX!ODBC!FETCH");
if (GetStringLength(LOCAL_BUFFER) > 0)
return SQL_SUCCESS;
else
return SQL_ERROR;
}
Two versions in a row... so here is version 4.0.14.
15.4.2005: v 4.0.14
New function: NWNX!DLL that allows to check if a given plug-in is available.
I�ve found and corrected a bug in NWNx-FFSpeech. Now it should better take into account the NIC_IP option in [FFSpeech] section.
I forgot to mention another change in 4.0.13: BinTracer, the application that you can use to display binary performance traces (*.bi4 files), as a much better interface now.
Oh, by the way, I'm glad to see that Avlis team likes NWN-FF so much that they copy some of the old features of NWN-FF in APS/NWNX. A shame that it took them over 1 year to do it, but I confess my sources were not very well commented. Too bad they forgot such tiny details on the credits... but well, doesn't matter.
Just an idea: when you copy or reproduce a feature, please try to keep the same API to be used from NWN Script. It may help the builders to have some kind of standard and switch from one product to the other.
One last word about NWN-FF 4.0.13: I strongly suggest to upgrade MySQL to the latest release version (currently 4.1.11), as it brings some nice and more powerfull instructions.
New with version 4.0.13:
13.4.2005: v 4.0.13
Some parts of the code rewritten to be cleaner (no compiler warnings anymore, smaller code with less redundancy) and faster (some more optimizations).
Now fully support MySQL 4.1, with all new functionalities coming with it (subqueries�). Also the script part should be much more compatible with non-MySQL Databases (Access, PostgresSQL� via ODBC).
Some improvements in the monitoring tools, to make the parameters more obvious and coherent.
Documentation: More points covered within the F.A.Q. and a complete new chapter �When does the monitoring tool decide to restart the NWN Server?�
Script changes:
ff_pc_loops.nss and ff_inc_options.nss: added a new option, FF_PLAYERFILE_SAVE, used to avoid the periodical saving of the players files (mainly for local vault servers).
ff_inc_other.nss: removed ff_GetResRef(object oItem); declaration (was never defined or used). Thanks to �The Guardian of Orlanthia� for reporting this.
Aps_include.nss, ff_include.nss, ff_inc_server.nss and ff_inc_options.nss: added the options, FF_MYSQL_4_1, that will enable specific MySQL 4.1 optimizations and FF_MYSQL that (if set to 0) will replace all MySQL specific instructions with more standard (but slower) equivalents.
ff_inc_options, ff_on_cl_enter.nss, ff_buildtable.nss, ff_inc_server.nss: FF_NO_BAN option. If you set this one, NWN-FF won�t ban or reject any player, for any reason. Use this one at your own risk: you renounce to all NWN-FF coherency checking by setting this option.
New with version 4.0.13:
13.4.2005: v 4.0.13
Some parts of the code rewritten to be cleaner (no compiler warnings anymore, smaller code with less redundancy) and faster (some more optimizations).
Now fully support MySQL 4.1, with all new functionalities coming with it (subqueries�). Also the script part should be much more compatible with non-MySQL Databases (Access, PostgresSQL� via ODBC).
Some improvements in the monitoring tools, to make the parameters more obvious and coherent.
Documentation: More points covered within the F.A.Q. and a complete new chapter �When does the monitoring tool decide to restart the NWN Server?�
Script changes:
ff_pc_loops.nss and ff_inc_options.nss: added a new option, FF_PLAYERFILE_SAVE, used to avoid the periodical saving of the players files (mainly for local vault servers).
ff_inc_other.nss: removed ff_GetResRef(object oItem); declaration (was never defined or used). Thanks to �The Guardian of Orlanthia� for reporting this.
Aps_include.nss, ff_include.nss, ff_inc_server.nss and ff_inc_options.nss: added the options, FF_MYSQL_4_1, that will enable specific MySQL 4.1 optimizations and FF_MYSQL that (if set to 0) will replace all MySQL specific instructions with more standard (but slower) equivalents.
ff_inc_options, ff_on_cl_enter.nss, ff_buildtable.nss, ff_inc_server.nss: FF_NO_BAN option. If you set this one, NWN-FF won�t ban or reject any player, for any reason. Use this one at your own risk: you renounce to all NWN-FF coherency checking by setting this option.
Posted by Anonymous ( 67.102.xxx.xxx ) at 2005-03-31 16:13:00
Has anyone considered enhancing the current user interface? I have to say it's the one thing I don't like about NWN-FF along with some of the language issues. No offense meant for this is certainly a technical marvel, but status and error messages are just not well presented or articulated nor is the documentation the cleareast (which makes it difficult to understand at times). I just think it could use a bit of polish to match what the folks at Avlis accomplished with NWNX. Given the guild membership numbers I'm seeing (168 at last count), I think there is likely enough participation here to give this tool a nice face lift. :)
Posted by Confused-cious ( 67.102.xxx.xxx ) at 2005-03-31 15:46:00
Ok, I've gotten to the bottom of the problem. It was the NWN-FF Speech module. Not sure why or what it was doing, but disabling the speech option, disabling the dead speaking option, and removing the speech dll remedied the crashing. Now all is well.
I know the documentation mentioned the speech system not working properly in-game IF the NWN server and the NWN client were on the same machine, but is there a technical limitation as well that prevents this from functioning? Bear in mind that NWNServer crashed as it attempted to LOAD the module so I never had a chance to run or connect with the client. Seems like it's a bug with the speech dll.
Anyway, that's not a critical component. I'm just thrilled it's finally working.