View previous topic :: View next topic |
Author |
Message |
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Mon Jul 20, 2009 21:54 Post subject: |
|
|
virusman wrote: | NWNX won't build in 64-bit environment. You have to make a chrooted environment with 32-bit libs to compile and run NWNX on 64-bit Linux. |
_________________ 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 |
|
|
Campbell
Joined: 29 Jul 2008 Posts: 9
|
Posted: Mon Jul 20, 2009 21:55 Post subject: |
|
|
Thanks it's working now. Virusman responded last night |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Mon Sep 07, 2009 9:22 Post subject: |
|
|
GetIsWalkable dont work properly in all areas. In 90% areas it works flawlessly but in three areas it crashes server. I've been unable to found what is problem yet but there is what I know:
it crashes server at area done in tropical tileset 10x10
it crashes too at area done in city exterior tileset 18x10
it crashes too at area done in dungeon tileset 13x13 but it don't crash at area in the same tileset but 8x16 there isnt other difference between those two areas except size and name I can see
I added debug and the areas it crashes were always walkable and there wasnt any placeables near, just nothing.
code:
Code: | int _GetIsWalkable(object oArea, vector v)
{
string s = GetName(oArea)+"x: "+FloatToString(v.x)+" y: "+FloatToString(v.y)+" z: "+FloatToString(v.z);
WriteTimestampedLogEntry(s);
SendMessageToPC(GetFirstPC(),s);
return GetIsWalkable(oArea,v);
}
location RandomLocation(object oArea)
{
int X = GetAreaSize(AREA_WIDTH,oArea)*10+1;
int Y = GetAreaSize(AREA_HEIGHT,oArea)*10+1;
vector vPos;
do
{
vPos = Vector(IntToFloat(Random(X)),IntToFloat(Random(Y)));
vPos.z = GetGroundHeight(oArea,vPos);
}while(!_GetIsWalkable(oArea,vPos));
return Location(oArea,vPos,IntToFloat(Random(361)));
} |
_________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Mon Sep 07, 2009 10:34 Post subject: |
|
|
OK, I found out the missing piece of puzzle.
It those crashing area there were one more difference - there wasn't any NPC. It seems that this function uses NPC's walkmesh, and this missing in the location until any NPC spawns there.
So my problem is solved I guess.
EDIT: If i kill that NPC, so there isn't any NPC again, the GetIsWalkable continue to works. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Squatting Monk
Joined: 28 Jun 2007 Posts: 76
|
Posted: Wed Oct 07, 2009 22:15 Post subject: |
|
|
Accidentally posted this in the wrong thread, which, I suppose explains why it never got a response. Reposted here:
I'm curious about the Set/GetCreatureEventHandler() functions. When used on PCs, what events are available to set? Are they the same events used by NPCs? If so, do they function the same, or are they finicky? |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Wed Oct 07, 2009 22:54 Post subject: |
|
|
I believe they are the same as for NPCs, since PCs actually have a script called "default" assigned to each event handler. |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Wed Oct 07, 2009 23:51 Post subject: |
|
|
If 'default' works for that event for a PC, then it should work by changing it. I'm pretty sure it works for heartbeat, but I'm not sure for other events. You'd have to try it out.
Acaos |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Thu Oct 08, 2009 0:22 Post subject: |
|
|
OnPerception - useless
Other events should work but I didn't test them.
I'm intensively using OnDeath, because is much better then module event. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Oct 08, 2009 6:35 Post subject: |
|
|
The following event handlers work on PCs: OnDeath, OnHeartbeat, OnConversation. All other events don't fire. |
|
Back to top |
|
|
Squatting Monk
Joined: 28 Jun 2007 Posts: 76
|
Posted: Sat Oct 10, 2009 20:34 Post subject: |
|
|
Thanks guys. Was hoping to hook the perception and damage events for the PC. Guess that's not going to happen. |
|
Back to top |
|
|
Calan
Joined: 23 Mar 2009 Posts: 16
|
Posted: Mon Oct 12, 2009 5:35 Post subject: |
|
|
I keep hitting this error on compile, at revision 275:
Quote: | [a bunch removed]
gcc -mtune=i386 -pipe -g -O2 -Wall -Werror -D_REENTRANT -D_THREAD_SAFE -I. -I.. -I../.. -I ../../include -I/usr/local/include -mtune=i386 -pipe -Wall -Werror -D_REENTRANT -D_THREAD_SAFE -I. -I.. -I../.. -I ../../include -I/usr/local/include -c -o funcs/item/f_GetItemByPosition.o funcs/item/f_GetItemByPosition.c
gcc -mtune=i386 -pipe -g -O2 -Wall -Werror -D_REENTRANT -D_THREAD_SAFE -I. -I.. -I../.. -I ../../include -I/usr/local/include -mtune=i386 -pipe -Wall -Werror -D_REENTRANT -D_THREAD_SAFE -I. -I.. -I../.. -I ../../include -I/usr/local/include -c -o funcs/item/f_GetItemCount.o funcs/item/f_GetItemCount.c
gcc -mtune=i386 -pipe -g -O2 -Wall -Werror -D_REENTRANT -D_THREAD_SAFE -I. -I.. -I../.. -I ../../include -I/usr/local/include -mtune=i386 -pipe -Wall -Werror -D_REENTRANT -D_THREAD_SAFE -I. -I.. -I../.. -I ../../include -I/usr/local/include -c -o funcs/item/f_RestoreItemAppearance.o funcs/item/f_RestoreItemAppearance.c
make[1]: *** No rule to make target `funcs/item/f_SetBaseItemType.o', needed by `nwnx_funcs.so'. Stop.
make[1]: Leaving directory `/[somewhere]/nwnx/svn/plugins/funcs'
make: *** [plugins/funcs] Error 2
|
Any ideas what I'm doing wrong? |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Mon Oct 12, 2009 14:37 Post subject: |
|
|
Looks like acaos didn't upload the code for SetBaseItemType. Until he does, edit plugins/funcs/Makefile.in and remove line 90 ("funcs/item/f_SetBaseItemType.o \"). _________________ 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 |
|
|
Calan
Joined: 23 Mar 2009 Posts: 16
|
Posted: Wed Oct 14, 2009 0:59 Post subject: |
|
|
While the above fix did in fact allow the compile, I did get this error on load:
Quote: | * Loading modules...
ERROR: dlopen: ./nwnx_funcs.so: ./nwnx_funcs.so: undefined symbol: Func_SetBaseItemType
* NWNX2 activated.
|
I decided to wait until it got uploaded, but there was an update to 277 and the problem persists, might there be another fix until it gets uploaded? |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Wed Oct 14, 2009 1:50 Post subject: |
|
|
If you don't need any of the functionality added in the last three revs, I'd just grab r274 and use that for now. Otherwise, searching for all occurrences of SetBaseItemType and removing them should work, but I haven't tried it. _________________ 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 |
|
|
Mycohl
Joined: 21 Oct 2006 Posts: 8
|
Posted: Tue Dec 29, 2009 5:59 Post subject: |
|
|
FunkySwerve, is there any chance you could bug acaos to get SetRawQuickbarSlot() to support adding chat command strings ( type 18 )? This would be super awesome. Right now it only seems to take a list of integers, so there's no way to specify the label or command string. Or is there a way to do it that I'm just not seeing?
EDIT: Looking through the source, it seems that CNWSQuickbarButton_s has 3 uint32s and a uint8 that are unaccounted for, which is not enough space to store the label and command string. That must mean that these are stored in one of the other blocks in CNWSCreature_s that are unaccounted for. I have no idea how to start searching for where it might be stored, since I am not a programmer, but if anyone has any suggestions on tools to get me started, I am willing to learn.
EDIT 2: I seem to be having the same problem that Quixsilver was having a few months ago.
Quixsilver wrote: | Log file shows -1 returned for all calls to SetRawQuickBarSlot. |
In the script that Funky posted on the NWN forums, this seems to be the same thing you guys are doing on live servers; save the output of GetRawQuickBarSlot() as a string and then later restore it using SetRawQuickBarSlot(). Nothing seems to happen. This is probably a configuration error on my end again. Quixsilver, did you ever manage to get this function to work on your server?
EDIT 3: I am a big idiot, and didn't realize that the default source will only set a quickbar slot if the type is QUICKBAR_TYPE_SPELL. Editing out the type check, the plugin compiles and seems to work just fine. I am waiting to hear back from acaos on why that particular check was in place, but my limited testing has shown no server crashes or anything yet. |
|
Back to top |
|
|
|