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 
 
nwnx_funcs for windows
Goto page Previous  1, 2, 3 ... 21, 22, 23 ... 27, 28, 29  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun May 15, 2011 21:51    Post subject: getting a weird error now with nwnx compiler Reply with quote

Code:

// dumps some information about all the effects applied to oObject to the log file
void NWNXFuncs_DumpEffects(object oObject);

// dumps all local variables of an object to the log file
void NWNXFuncs_DumpLocals(object oObject);

// Sets the gold pieces of oObject to iGold.
// No notification is given to a player whose gold is changed.
void NWNXFuncs_SetGold(object oCreature, int iGold);

// Sets a base ability score iAbility (ABILITY_STRENGTH, ABILITY_DEXTERITY, etc) to iValue
// The range of iValue is 3 to 255
// bAdjustCurrentHitPoints is only used when Constitution is set: if false a potential increase in hitpoints
// will only affect oCreature's maximum hit points. The missing hit points can be regained the normal way: resting,
// healing, regeneration, etc.
void NWNXFuncs_SetAbilityScore(object oCreature, int iAbility, int iValue, int bAdjustCurrentHitPoints = 1);



15/05/2011 20:49:43: Error. 'on_chat' did not compile.
nwnx_funcs_inc.nss(278): ERROR: FUNCTION IMPLEMENTATION AND DEFINTITION DIFFER


But when I check, the implimentation, and definition are identical.

The line in question being

NWNXFuncs_SetAbilityScore(object oCreature, int iAbility, int iValue, int bAdjustCurrentHitPoints = 1);
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Sun May 15, 2011 22:27    Post subject: Reply with quote

No return type specified for the function declaration? Can you post the whole thing (if you did not)?
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun May 15, 2011 22:29    Post subject: Reply with quote

Code:


// Sets a base ability score iAbility (ABILITY_STRENGTH, ABILITY_DEXTERITY, etc) to iValue
// The range of iValue is 3 to 255
// bAdjustCurrentHitPoints is only used when Constitution is set: if false a potential increase in hitpoints
// will only affect oCreature's maximum hit points. The missing hit points can be regained the normal way: resting,
// healing, regeneration, etc.
void NWNXFuncs_SetAbilityScore(object oCreature, int iAbility, int iValue, int bAdjustCurrentHitPoints = 1);




void NWNXFuncs_SetAbilityScore(object oCreature, int iAbility, int iValue, int bAdjustCurrentHitPoints = 1) {
   SetLocalString(oCreature, "NWNX!FUNCS!SETABILITYSCORE", IntToString(iAbility)+" "+IntToString(iValue)+ " 0"+ " "+IntToString(bAdjustCurrentHitPoints));
   DeleteLocalString(oCreature, "NWNX!FUNCS!SETABILITYSCORE");
}




This is both the def and the declaration.

Cant post the whole inc file as its too big,
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Sun May 15, 2011 22:44    Post subject: Reply with quote

This compiles for me with both the toolset compiler and the open source NWScript compiler.

Is it possible that you have (yet another) prototype definition somewhere else that conflicts?
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri May 20, 2011 15:31    Post subject: ta Reply with quote

late reply I know.

I think the reason it was failing was because I had copied a definition of Funcs SetAbilityScore into the Subrace Include file, because the Subrace include file is soooo huge, the Bioware compiler runs out of memory for additional includes etc.


So, because I copied it in there, it was conflicting with the nwnx_funcs version of it.

Solved
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sat May 28, 2011 19:01    Post subject: faction modification? Reply with quote

Is it likely to be possible through nwnx to add factions on the fly?


eg - NWNXFuncs_AddFaction("NEW_FACTION");
NWNXFuncs_SetCreatureToFaction("NEW_Faction");


I know its possible via the dm console to set npc faction to Commoner, Hostile or Neutral etc,
I was just wondering if it was possible to create the new faction groups in game, instead of having to make them in toolset.

When you have a module of 600 areas, it takes along time to make new factions. Sad
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun May 29, 2011 21:52    Post subject: Reply with quote

also - Being able to modify areas and set Is Natural, Interior etc flags would be useful.
Back to top
View user's profile Send private message
The Amethyst Dragon



Joined: 21 Jun 2011
Posts: 20

PostPosted: Tue Jun 21, 2011 7:08    Post subject: Reply with quote

Just have to say that this is some superb work so far. I run my server on a Windows XP machine, and having access to these functions is a vast improvement over what I had available to use before.

My thanks goes out to those who've done both the original coding and the work to get it working for Windows.
Back to top
View user's profile Send private message Visit poster's website
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Tue Jun 21, 2011 22:10    Post subject: Reply with quote

Hey, just a heads up. I may have found a bug.

I have a script named "rotd_mod_leaving". This is obviously 16 characters long. However, I don't think it's firing on the OnLeaving event because it's not reading the last character ("g").

This is what the NWNX.ini line looks like:

OnPlayerLeavingScript=rotd_mod_leaving


And this is what appears in the log file:

[06/21/2011 16:03:39] * CServerExoAppInternal__RemovePCFromWorld hooked; script to run: rotd_mod_leavin.nss


Hope it helps.
Back to top
View user's profile Send private message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Wed Jun 22, 2011 0:33    Post subject: Reply with quote

IIRC, there is a 15 character limit on resource names, which causes what you are describing.

The script would be saved, but the name truncated on the back end.

Solution is to use names that don't exceed that length.
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Mon Jun 27, 2011 0:27    Post subject: Reply with quote

Ah ok. That explains that. Thanks for the clarification.
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Mon Jul 25, 2011 0:38    Post subject: Reply with quote

I'm trying to make a item property that changes the critical threat range of a weapon. I've messed with the 2da and dialog.tlk, and it comes up in properties...
+Critical Threat
(20-20)
(19-20)
(18-20) etc

then you can select actual threat range 20-20,19-20...etc

I noticed this function...
// These don't do anything (yet)
void NWNXFuncs_SetItemPropertyInteger(itemproperty ip, int nInt, int iValue)

is there any function that will allow me to change the critical threat range of a weapon?

Or whats a better way to alter the keen property, if possible to change the multiplyer...

But the upper would be my prefered choice
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Fri Jul 29, 2011 0:12    Post subject: Reply with quote

I was told to do what I posted above I need linux and nwnx_weapon plugin is anyone working on a windows version? or maybe its time for me to format reinstall and use linux huh?
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Thu Aug 11, 2011 23:58    Post subject: Immunity Override hook - can it be turned off? Reply with quote

Is there any ini value that can be used to disable Immunity Override hook?

Im crashing quite frequently during certain fights where I am teleporting etc.

And more often than not, event viewer says that it is nwnx_funcs as the faulting module.

Code:

Faulting application nwserver.exe, version 1.6.9.0, faulting module nwnx_funcs.dll, version 0.0.8.9, fault address 0x000141e0.


The only thing that was going on at the time, according to logs, was
Quote:

[08/11/2011 22:47:21] ImmunityOverride: 0 a2: 27 [override: 0]
[08/11/2011 22:47:30] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:31] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:31] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:32] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:32] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:33] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 27 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 27 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 27 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 27 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 27 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 27 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]
[08/11/2011 22:47:35] ImmunityOverride: 0 a2: 22 [override: 0]



Which seems kinda excessive
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri Aug 12, 2011 0:29    Post subject: not that then Reply with quote

I've disabled the Immunity Override in my version,
but it still crashes.

Somewhat repeatable.

I have teleport powers that can be triggered via playertool feats.

I am teleporting around a specific boss, launching isaacs greater missile storm.

It seems to consistently cause the server to stall
Sad

Any idea what that memory offset in nwnx_funcs is?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3 ... 21, 22, 23 ... 27, 28, 29  Next
Page 22 of 29

 
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