logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
[request] nwnx4 INI Read/Write functions

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Thu Oct 08, 2009 9:26    Post subject: [request] nwnx4 INI Read/Write functions Reply with quote

So I was browsing the vault and I happen to see a nwnx plugin
http://nwvault.ign.com/View.php?view=Other.Detail&id=1428

that allows you to write to INI files. Which is VERY INTEGRAL with the program i'm writing (it's an external program that interacts with the data from the PW)

Since I dont know MySQL code and can make use of the reading and writing of INI files I'd love for NWN2 to be able to write to custom INI files (of my own) and have my program read/write to that INI then have NWN2 read the changes and reflect that back in NWN2.

It could be one way but as long as NWN2/NWNX4 can read ini's i'd be happy Smile

Any takers?
I would do it myself but I dont know where to start.
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Thu Oct 08, 2009 13:44    Post subject: Reply with quote

Haven't fidgeted with nwnx4, but it should be relatively easy to port the ini wappers in the sourcecode: read_ini.cpp, read_ini.h write_ini.cpp and write_ini.h to nwnx4.

Reading a int is then pretty much stright forward:

Code:
      CIniReader CRIni( cFileToRead );
      int nReturnToNwn = CRIni.ReadInteger( cSection, cKey, nDefault ) );


Writing is the same:

Code:
      CIniWriter CWIni( cFileToWriteTo );
      CWIni.WriteInteger( cSection, cKey, nIntToWrite ) );


I can look at it, I assume nwnx4 is quite the same as nwnx2 it should be no problems. Smile
_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Fri Oct 09, 2009 1:37    Post subject: Reply with quote

Yes please, I tried to compile it myself but I am encountering a lot of issues in setting up the Developing Environment. how soon do you think this can be done?
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Fri Oct 09, 2009 2:46    Post subject: Reply with quote

What kind of issues? I think it should compile out of the box on VS2008 (or VC++ Express Edition '0Cool?
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Fri Oct 09, 2009 8:46    Post subject: Reply with quote

Well. it's giving me the setup.h missing files.

it's really giving me a headache. i'm going to download the entire depository again.

Code:

1>------ Build started: Project: XP Time, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>log.cpp
1>c:\nwnx_compile\misc\stdwx.h(3) : fatal error C1083: Cannot open include file: 'wx/wx.h': No such file or directory
1>plugin.cpp
1>time.cpp
1>c:\nwnx_compile\misc\log.h(24) : fatal error C1083: Cannot open include file: 'wx/log.h': No such file or directory
1>Generating Code...
1>Build log was saved at "file://c:\NWNX_Compile\plugins\time\Debug\BuildLog.htm"
1>XP Time - 2 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Considering I installed the wxWidgets-2.8.10 program.

man where is a video tutorial when ya need one

I'm using Visual C++ 2008 Express edition
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Fri Oct 09, 2009 11:22    Post subject: Reply with quote

Separate posting to keep things organized:

So I managed to get them to build the final projects (after experimenting with the program.. it was building the debug info instead of the final dll's and such)


I managed to do a full build and do all the dll's + the nwnx4 program.

I tried using the nwnx 4 ver 1.09

* Loading plugin xp_time.dll: Error 14001. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.


gonna try it with the build I just did. I havnt merged the ini file of the nwn1 original yet. i'm just building a existing file to see if i'm doing things right.

Couple Hours Later


Ok. Using the NWNX compiled worked from the Depository. Now. importing the code from NWN1's (the original code above ) to NWN2.


.. Any tips?
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Fri Oct 09, 2009 14:14    Post subject: Reply with quote

ChassOfIsandor wrote:
* Loading plugin xp_time.dll: Error 14001. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.


To fix that, download this: http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en

I havent looked at the nwnx4 code but I'll see if I can get ahold of the demo-plugin. If there are any?
_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Fri Oct 09, 2009 22:42    Post subject: Reply with quote

Here is the depository I got the NWNX4 code from

http://www.nwnx.org/phpBB2/viewtopic.php?t=620

it comes with the base plugin code such as sql lite / time and a few others.

I just compiled them all and got that version.


now it's just a matter of tying in your code to a plugin.
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Mon Oct 12, 2009 13:18    Post subject: Reply with quote

Any luck here anyone? or possible help on merging a plugin's code with the ini's code?

I basically stopped due to hopeful help Razz
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Sun Nov 01, 2009 9:42    Post subject: Reply with quote

Sorry to Bump this one but I really need the INI read and Write functions. I can donate 5$ to the person who does it? cause I cannot Sad
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Wed Nov 04, 2009 23:14    Post subject: Reply with quote

So me and Shadow over ICQ have been working at this. we got stopped at this error:

Code:

Build Log
        

Build started: Project: XP INI, Configuration: Release|Win32

Command Lines
        

Creating temporary file "c:\NWNX_Compile\plugins\time\Release\RSP00001B5904412.rsp" with contents
[
/OUT:"C:\NWNX_Compile\..\bin\Release\xp_time.dll" /INCREMENTAL:NO /LIBPATH:"C:\NWNX_Compile\..\lib\wxwidgets\lib\vc_lib" /DLL /MANIFEST /MANIFESTFILE:"Release\xp_time.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\bin\Release\xp_time.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE:NO /MACHINE:X86 wxmsw28_core.lib wxbase28_net.lib wxbase28.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "..\..\..\bin\release\xp_mysql.lib" "..\..\..\bin\release\nwnx4_hook.lib" "..\..\..\bin\release\xp_sqlite.lib"

".\Release\log.obj"

".\Release\plugin.obj"

".\Release\read_ini.obj"

".\Release\time.obj"

".\Release\write_ini.obj"
]
Creating command line "link.exe @c:\NWNX_Compile\plugins\time\Release\RSP00001B5904412.rsp /NOLOGO /ERRORREPORT:PROMPT"

Output Window
        

Linking...
   Creating library C:\NWNX_Compile\..\bin\Release\xp_time.lib and object C:\NWNX_Compile\..\bin\Release\xp_time.exp
time.obj : error LNK2001: unresolved external symbol "public: int __thiscall CIniFile::ReadInteger(char const *,char const *,int)" (?ReadInteger@CIniFile@@QAEHPBD0H@Z)
time.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CIniFile::~CIniFile(void)" (??1CIniFile@@UAE@XZ)
time.obj : error LNK2001: unresolved external symbol "public: __thiscall CIniFile::CIniFile(char const *)" (??0CIniFile@@QAE@PBD@Z)
C:\NWNX_Compile\..\bin\Release\xp_time.dll : fatal error LNK1120: 3 unresolved externals

Results
        

Build log was saved at "file://c:\NWNX_Compile\plugins\time\Release\BuildLog.htm"
XP INI - 4 error(s), 0 warning(s)




what does anyone think of this?
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ladydesire



Joined: 25 Oct 2009
Posts: 1

PostPosted: Thu Nov 05, 2009 3:21    Post subject: Reply with quote

It looks to me like it's not finding references to those functions in any of the libraries it's trying to link to, since NWNx4 might not have those exact functions in it compared to NWNx2.
Back to top
View user's profile Send private message Yahoo Messenger
ChassOfIsandor



Joined: 16 Jun 2005
Posts: 12
Location: Michigan

PostPosted: Thu Mar 18, 2010 3:48    Post subject: Reply with quote

Sorry for bringing this topic back up. but i'm going to see if I can get some people from the vault to help me with this one. Just coming back to this project as I am getting back into NWN2.

Still offering a donation to those who can solve this issue for me though.
_________________
Hey, If your interested in a realm where you can build and do just about anything in a freeform environment. visit the website at:
http://www.worldofisandor.tk
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group