View previous topic :: View next topic |
Author |
Message |
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Mon Jun 29, 2009 18:45 Post subject: |
|
|
I don't think there's a hook for learning spells from scrolls at the moment. Sounds like a candidate for nwnx_events, though. _________________ 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 |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
|
Back to top |
|
|
garrison
Joined: 16 Feb 2009 Posts: 4
|
Posted: Mon Jun 29, 2009 20:34 Post subject: |
|
|
I think in all cases I still have to deal with Sorcerers who cannot learn spells from scrolls, so at the moment I'm setting the MySQL based on oItem from either EVENT_TYPE_EXAMINE or EVENT_TYPE_USE_ITEM, this seems to work quite well, and in time for our next release.
Again, my thanks. |
|
Back to top |
|
|
Undertowe
Joined: 03 Jan 2005 Posts: 33
|
Posted: Thu Jul 16, 2009 4:56 Post subject: |
|
|
First, I'd like to thank acaos for his work on this plugin. It's greatly reduced the amount of work I have to do.
However, I'm having a puzzling problem. Here's the facts. I'm running NWServer 1.69.8109 and NWNX2 v2.7.1-dev on Ubuntu 8.04 Server. I'm not sure which version of nwnx_funcs I'm using. The log file doesn't state the version. Suffice to say, I compiled NWNX2 and plugins from the SVN trunk about 2 weeks ago. I'm also using nwnx_chat and nwnx_odbc and they both seem to be working fine.
I haven't tested all the functions but GetClassByLevel(), AddKnownFeat(), GetTotalKnownFeatsByLevel(), and GetKnownFeatByLevel() all seem to be working fine.
The problem began when I tried to call GetFirstArea() and it returned an invalid object. When the function is called, NWNX2 reports:
FAILED: NWNX!INIT(O) has not been initialized.
Yes, I am calling SQLInit() before this, and the other plugins are working fine. GetPortrait() also gives the same message, and returns an empty string. I haven't tested any other functions.
Incidentally, I tried using GetFirstArea() from nwnx_functions and I get the same message.
This may or may not be related, but I'm also occasionally getting messages of the type:
REJECTED: (S) ret=0x081c97fc but we wanted ret=0x082041ec!
I haven't pinpointed what's triggering those yet.
Any help would be appreciated.
UPDATE:
On a whim, in nwnx2.ini I set:
disablenwnxinit=y
and now GetFirstArea() is working. Additionally, when it's called, NWNX2 says:
NWNX!INIT enforcement disabled, using 0x08203e79
So what's the deal? Does NWNX!INIT enforcement have to be disabled for GetFirstArea() to work? The README file in the SVN trunk says:
Quote: | It is STRONGLY recommended that you do not enable this feature UNLESS you make APS or NWNX calls in your OnLoad script.
|
I've always left disablenwnxinit=n because of this warning. What's the danger? |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Fri Jul 17, 2009 0:57 Post subject: |
|
|
I've actually never had that set to anything but disablenwnxinit=y. I think it's more important on Windows servers.
Acaos |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Fri Jul 17, 2009 1:37 Post subject: |
|
|
Or just add to your onload script:
GetLocalObject(OBJECT_SELF, "NWNX!INIT"); |
|
Back to top |
|
|
Quixsilver
Joined: 20 Jan 2009 Posts: 30
|
Posted: Fri Jul 17, 2009 4:23 Post subject: |
|
|
BroadcastProjectileToObject/Location seems to have a problem.
The error message below "Unrecognized string request" is generated in the funcs logfile using both the ToObject and ToLocation variants of this function.
Code: |
StrReq: "BROADCASTPROJECTILE"
Params: "0 7.8467 8.6324 -0.0000 600 260"
Unrecognized string request: "BROADCASTPROJECTILE" "0 7.8467 8.6324 -0.0000 600 260"
Return: "0 7.8467 8.6324 -0.0000 600 260" |
|
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Fri Jul 17, 2009 4:35 Post subject: |
|
|
acaos wrote: | I've actually never had that set to anything but disablenwnxinit=y. I think it's more important on Windows servers.
Acaos |
I don't think it exists on Windows. _________________ 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 |
|
|
PlasmaJohn
Joined: 04 Mar 2005 Posts: 70 Location: The Garage
|
Posted: Fri Jul 17, 2009 5:25 Post subject: |
|
|
Windows never needed it. Linux needed a pointer initialized before certain plugins were run. I've quite lost track what of the details |
|
Back to top |
|
|
Undertowe
Joined: 03 Jan 2005 Posts: 33
|
Posted: Fri Jul 17, 2009 7:30 Post subject: |
|
|
Thanks for the responses. I suspected there was a way to manually initialize the object stuff, but couldn't find it documented anywhere. |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Sat Jul 18, 2009 10:28 Post subject: |
|
|
Quixsilver wrote: | BroadcastProjectileToObject/Location seems to have a problem.
The error message below "Unrecognized string request" is generated in the funcs logfile using both the ToObject and ToLocation variants of this function. |
I couldn't duplicate this in our running version, but I'll try a fresh checkout. Could you make sure BROADCASTPROJECTILE is in your FuncsStrCmds.h file?
Thanks,
Acaos |
|
Back to top |
|
|
Quixsilver
Joined: 20 Jan 2009 Posts: 30
|
Posted: Sat Jul 18, 2009 18:35 Post subject: |
|
|
acaos wrote: | Quixsilver wrote: | BroadcastProjectileToObject/Location seems to have a problem.
The error message below "Unrecognized string request" is generated in the funcs logfile using both the ToObject and ToLocation variants of this function. |
I couldn't duplicate this in our running version, but I'll try a fresh checkout. Could you make sure BROADCASTPROJECTILE is in your FuncsStrCmds.h file?
Thanks,
Acaos |
Thanks for looking into this Acaos, I really appreciate it.
I was trying to find the FuncsStrCmds.h file but the gperf stuff is confusing to me. Is FuncsStrCmds.h built dynamically at run time from FuncsStrCmds.gperf? BROADCASTPROJECTILE is in the gperf file. |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Sun Jul 19, 2009 11:23 Post subject: |
|
|
You must have the gperf package installed in your linux distribution to compile nwnx2. I don't think that the gperf stuff is recompiled at runtime...
To compile the whole package use ./install.sh in the base directory. _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
Quixsilver
Joined: 20 Jan 2009 Posts: 30
|
Posted: Sun Jul 19, 2009 18:16 Post subject: |
|
|
Mikel of Avalon wrote: | You must have the gperf package installed in your linux distribution to compile nwnx2. I don't think that the gperf stuff is recompiled at runtime...
To compile the whole package use ./install.sh in the base directory. |
I don't have any problems compiling anything and can muddle through the c and c++ code. I've never used gperf though and FuncsStrCmds.h doesn't seem to exist so I'm guessing, from code in the makefile, that its built from FuncsStrCmds.gperf at compile time. |
|
Back to top |
|
|
Campbell
Joined: 29 Jul 2008 Posts: 9
|
Posted: Mon Jul 20, 2009 4:10 Post subject: Help. Won't compile |
|
|
I saw someone else is having a similar error, but nobody has answered it yet. I dl from the svn and tried to compile, but get an error when trying to configure. The following message is at the bottom after running ./configure
checking for sys/wait.h that is POSIX.1 compatible... no
checking fcntl.h usability... no
checking fcntl.h presence... no
checking for fcntl.h... no
configure cannot find necessary include files.
Any help would be appreciated. |
|
Back to top |
|
|
|