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 ... 26, 27, 28, 29  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
addicted2rpg



Joined: 01 Aug 2008
Posts: 106

PostPosted: Mon May 14, 2012 6:54    Post subject: Reply with quote

Well Baaleos, you could fix it and post patches.

I've heard GIT merges are more fun than SVN merges.....

but I think we are kind of a small dev community to really be having that discussion yet.
Back to top
View user's profile Send private message
werehound



Joined: 17 Aug 2010
Posts: 41

PostPosted: Thu May 17, 2012 0:46    Post subject: Reply with quote

Should post the nwnx_fixes fix for preventing stacking of items with differing variables from another thread, too. =)
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Tue Jun 05, 2012 18:58    Post subject: 0.94 Reply with quote

Hello...

I fixed a few things

- Instances where the Param string was overwritten before the parameters could be extracted (GetKnowsSpell, GetRemainingSpellSlots, GetMaxSpellSlots, GetSpellsGainedAtLevel, GetStatsGainedAtlevel)
- Shamelessly copied Flutterby's RemoveAllSpells solution Cool

I tried to reproduce a few things that I read too:

Can't get PopupMessage to crash, but I'm running my test server in Virtual PC Windows XP Mode (I assume it's 32 bit).

SetAbilityScore:
Technically it doesn't add any racial modifiers. They are added when an ability is read, e.g.: to display them in the char sheet.
The dm command dm_SetSTR/DEX/etc. does; which has the same problem.
It's possible to script around it by reading the modifier from racialtypes.2da and subtracting it before calling SetAbilityScore.

Also I found that AC seems to be updated in the char sheet just fine when changing Dexterity.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Kato



Joined: 05 Mar 2010
Posts: 47

PostPosted: Tue Jun 05, 2012 19:02    Post subject: Reply with quote

Great job!! Many thanks to you, MaxRock!

P.S.: Just out of curiosity, is SetMaxHitPoints() functional?


Kato
Back to top
View user's profile Send private message Send e-mail
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Tue Jun 05, 2012 23:42    Post subject: Reply with quote

Kato wrote:

P.S.: Just out of curiosity, is SetMaxHitPoints() functional?
Kato


It works for NPCs Confused

I might have a way to fix it for PCs but it wouldn't be permanent.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Jun 06, 2012 14:27    Post subject: Level Stats Reply with quote

the most simplistic way to make it work for PC's would be to make it call the SetHPForLevel function.


The only problem is that each level of the character, can only hold 255 hp.
Meaning if you tried to set the HP of Level1 to 256, it would crash the server.

I did this in a custom leveling system I made, using Pseudo Levels.

You could remain level 1, and gain pseudo levels, and the amount of Pseudo Levels you could gain was equal to (40 x 255)/ Whatever HP is gained per level.

The end result was, that I was able to fit in something like 15 Pseudo Levels for every 1 Bioware Level, and was able to get large MaxHP values by modifying the HP value for each level individually.

Granted - to roll this into a single function, it would need to perform alot of back end calls, to know when to add hp to level stat tiers etc.

I suppose the function could add all 40 Level Stat Tiers, and then modify them from level 1 upwards, adding hp to each one, until we get the Max HP Value desired - however, the downside of that, is that it would invalidate the whole purpose of level stats.

Eg Setting Level 4's lvel stats hp value to 100, just to get ( 255x3 )+ 100
Would mean that a single level loss, would cost those 100 points, or more level losses would cost 255 for the previously used levels.

eg - Level 5,
255 x 4 = 1020 hp

De-level to level 2 =
510 hp lost

The inverse of this is also true.
If you tried to set your HP to 2500, you would need to have a bioware level of at least 10
Levels 1-9 = 255 hp each
Level 10 = 5 hp

But the bonus is that Level 10 has enough room in it, or another 250 hp, before requiring another Bioware level to be added.

And if you wanted 2805+ hp, you would need a bioware level of 11+
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri Jun 08, 2012 1:57    Post subject: Crash on SetTag Reply with quote

Im getting the occasional Crash on SetTag
Faulting application nwserver.exe, version 1.6.9.0, faulting module nwnx_funcs.dll, version 0.0.8.9, fault address 0x00014530.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Note - My version of funcs might be a little old (few months)

I was just wondering if the SetTag function has had any work done to it that may resolve this?

Logs are as follows
Occurs when a player dies, and goes to the 'Spectral Realm' an area dynamically generated (a copy of the area they died in)

Quote:

[06/08/2012 00:28:05] [AddAreaToCreatures]Module Area Count: 710
[06/08/2012 00:28:05] pObject: 1A2ACEF8
[06/08/2012 00:28:05] [/AddAreaToCreatures]

[06/08/2012 00:28:05] [AddAreaToTURDS]
[06/08/2012 00:28:05] [/AddAreaToTURDS]

[06/08/2012 00:28:05] [/LoadArea] AreaCount: 710
[06/08/2012 00:28:05] + ObjReq: 0822806C Request: GET_LAST_AREA_ID
[06/08/2012 00:28:05] - StrReq: "SET_AREA_NAME" Params: "(Spectral Realm) - Thryndir Jungle"
[06/08/2012 00:28:05] o SetAreaName: 0001042A, '(Spectral Realm) - Thryndir Jungle'
[06/08/2012 00:28:05] o Module Language: 0

Thats the nwnx_areas log

But after the area is generated, it gets processed - which includes setting tags of the area, as well as destroying objects.
Quote:

[06/08/2012 00:28:05] - StrReq: "SETEVENT" Params: "12 spectral_door"
[06/08/2012 00:28:05] - StrReq: "SETTAG" Params: "SPECTRAL_DOOR"
[06/08/2012 00:28:05] - StrReq: "SETEVENT" Params: "0 spectral_hb"
[06/08/2012 00:28:05] - StrReq: "SETEVENT" Params: "3 spectral_exit"
[06/08/2012 00:28:06] - StrReq: "SETTAG" Params: "ThryndirJungle1_spec"



Quote:

[Fri Jun 08 00:28:05] Processing Object in Area:Door|thryndir_spine_enter||ObjType:8
[Fri Jun 08 00:28:05] Processing Object in Area:Gold|gold_ore|gold_ore|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Gold|gold_ore|gold_ore|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Crystal Gem|crystal_gem|crystalgem|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:White Helcifur|white_helcifur|white_helcifur|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_09|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|GLAC_DUMP|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:White Helcifur|white_helcifur|white_helcifur|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Obelisk Of Rhun|TELE_PORT_4|obelisk|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Map Note|NW_MAPNOTE001|nw_mapnote001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_07|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_06|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_02|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:New Area Transition|thryndir_jungle_north|newtransition|ObjType:4
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_01|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:|WP_thryndir_jungle_north||ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:New Area Transition|thryndir_jungle_south|newtransition|ObjType:4
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_05|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:|WP_thryndir_jungle_south||ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_08|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:Rakshasa Chest|Chest3|chest3|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:Rakshasa Chest|Chest3|chest3|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Rakshasa Chest|Chest3|chest3|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_04|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_10|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:Map Note|NW_MAPNOTE001|nw_mapnote001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:Gold|gold_ore|gold_ore|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Gold|gold_ore|gold_ore|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:Crystal Gem|crystal_gem|crystalgem|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Rakshasa Chest|Chest3|chest3|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Iron|Iron|iron|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Iron|Iron|iron|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:Iron|Iron|iron|ObjType:64
[Fri Jun 08 00:28:05] Processing Object in Area:thryndir_encounter|thryndir_encounter||ObjType:256
[Fri Jun 08 00:28:05] Processing Object in Area:Waypoint|WP_RHUN_STIRGE2_03|nw_waypoint001|ObjType:32
[Fri Jun 08 00:28:05] Processing Object in Area:New Area Transition|thryndir_jungle_east|newtransition|ObjType:4
[Fri Jun 08 00:28:05] Processing Object in Area:|WP_thryndir_jungle_east||ObjType:32


I put these debug messages in to try and ascertain a pattern.
Not always occuring on object type 32, but it does often occur in this area, as well as others.

Going based on the logs, the last thing to happen, was the area being given a new tag - which then caused the crash.
Advice anyone?
Back to top
View user's profile Send private message
Kato



Joined: 05 Mar 2010
Posts: 47

PostPosted: Fri Jun 08, 2012 17:04    Post subject: Reply with quote

Thanks for the infos/precisions on alternatives to SetMaxHitPoints(), Baaleos. (I have managed to code a working system from those infos) Smile

Kato
Back to top
View user's profile Send private message Send e-mail
Flutterby



Joined: 01 May 2012
Posts: 11

PostPosted: Wed Aug 01, 2012 11:41    Post subject: Reply with quote

Me again Smile I'm having a problem with NWNXFuncs_SetDomain. This will set the clerical domains properly and even add the domain powers, but it will not give the domain powers any uses. So, e.g., Trickery domain will grant Divine Trickery in the radial menu, but the uses will always be set to 0. I've tried using IncrementRemainingFeatUses to handle this, but no cookie. Any ideas?
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Thu Aug 02, 2012 0:10    Post subject: Possess Reply with quote

Hi Maxrock
I see that in the source, there is a prototype function ready, but not hooked up yet, that does Possess Creature.

Would it be possible to get it hooked up, along with the unpossess creature?
Pretty Please?
Back to top
View user's profile Send private message
Kato



Joined: 05 Mar 2010
Posts: 47

PostPosted: Fri Aug 31, 2012 19:24    Post subject: Reply with quote

Hi,

I'm having an issue with GetItemPropertyInteger() crashing the server, upon passing a standard IP. Is it because the function is intended to work with custom IPs only?

Thanks!


Kato
Back to top
View user's profile Send private message Send e-mail
Antegate



Joined: 20 Apr 2012
Posts: 100

PostPosted: Tue May 14, 2013 12:35    Post subject: Reply with quote

Whether it is possible to add function changing effect of a lightning in area properties?
Back to top
View user's profile Send private message
addicted2rpg



Joined: 01 Aug 2008
Posts: 106

PostPosted: Wed Sep 04, 2013 2:34    Post subject: Reply with quote

My internal tests have factions, message dialogues, and a few other things as not working while some functions are working.

How would anyone feel if this plugin were sundered into smaller plugins?
nwnx_stats, nwnx_messages, nwnx_items, etc.. At least good components of code could be distributed without (or with very little) error and ailing components could be considered under development.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Sep 04, 2013 9:11    Post subject: Reply with quote

addicted2rpg wrote:
My internal tests have factions, message dialogues, and a few other things as not working while some functions are working.

How would anyone feel if this plugin were sundered into smaller plugins?
nwnx_stats, nwnx_messages, nwnx_items, etc.. At least good components of code could be distributed without (or with very little) error and ailing components could be considered under development.
good idea, though best would be to synchronize windows nwnx funcs with the linux version and add anything extra into own plugins then imo
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
addicted2rpg



Joined: 01 Aug 2008
Posts: 106

PostPosted: Thu Sep 05, 2013 22:06    Post subject: Reply with quote

Ah yes, the Linux compat angle. I suppose it does make it easier for module maintainers to migrate between the two platforms as their hosting needs change. What a headache. Smile
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 ... 26, 27, 28, 29  Next
Page 27 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