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



Joined: 20 Aug 2005
Posts: 584

PostPosted: Mon Aug 09, 2010 10:14    Post subject: Reply with quote

I know that and that why Im using normal trigger which will respawn trap. Recover trap fires at least OnAcquire event, see mycode:
Code:
 if(GetLocalInt(oItem,"SETUP"))
 {
 return;
 }
 if(GetBaseItemType(oItem) == BASE_ITEM_TRAPKIT && nStackSize < 1 && oPreviousOwner == OBJECT_INVALID && !GetIsDM(oPC) && !GetIsDMPossessed(oPC))
 {//acquired by recover trap
 object oPartyMember = GetFirstFactionMember(oPC);
  while(oPartyMember != OBJECT_INVALID)
  {
  SetXP(oPartyMember,GetXP(oPartyMember)+10);
  oPartyMember = GetNextFactionMember(oPC);
  }
 int nTh = 2;
 object oTrigger = GetNearestObjectByTag("trap_static",oPC,1);
  while(oTrigger != OBJECT_INVALID)
  {
   if(!GetIsObjectValid(GetLocalObject(oTrigger,"TRAP")) && !GetLocalInt(oTrigger,"RESPAWN"))
   {
   SetLocalInt(oTrigger,"RESPAWN",1);
   ExecuteScript("sh_trap_static",oTrigger);
   nTh = -1;
   break;
   }
  oTrigger = GetNearestObjectByTag("trap_static",oPC,nTh++);
  }
  if(nTh > -1)//no static respawning trap found must be random one then
  {
  ExecuteScript("sh_trap_disarm",GetArea(oPC));
  }
 }
SetLocalInt(oItem,"SETUP",TRUE);
Its not totally clean, new event hook would be better, but it works...
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Tue Aug 10, 2010 1:03    Post subject: Reply with quote

still have problem seems to set my movement speed to very slow and says I cant carry any weight 0 in fact. surely this is a core nwn file?

Also this is a level one... I want to give players [ ability/skill/feat/etc ] actual pc lvls will be hard.

could character level be issue with NWNXFuncs_SetAbilityScore, NWNXFuncs_ModAbilityScore?


forgive me upon closer look... what i did was have all gear off and then no issues i will keep trying just to be sure and then edit this again.

// findings...
looks like 100 is the max str you can give someone otherwise it creates a error and when you equip item you become encumbered.

max invy weight 72053lb max str 100 all other stats so far ok set at 243

this all at lvl1 though. issues may not arise if higher lvl?

so is there a way to fix this?
Back to top
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Tue Aug 10, 2010 6:58    Post subject: Reply with quote

Max ability score is 255, though that - whatever it's possible to get from bonuses is a much better idea.

Carry weight, just pad out the 2da to 255 rows to see--encumbrance.2da. Works server side only, but client displays from its version.
_________________
Neversummer PW NWNx powered mayhem Wink
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Tue Aug 10, 2010 8:16    Post subject: Reply with quote

still have problem seems to set my movement speed to very slow and says I cant carry any weight 0 in fact. surely this is a core nwn file?

Also this is a level one... I want to give players [ ability/skill/feat/etc ] actual pc lvls will be hard.

could character level be issue with NWNXFuncs_SetAbilityScore, NWNXFuncs_ModAbilityScore?


forgive me upon closer look... what i did was have all gear off and then no issues i will keep trying just to be sure and then edit this again.

// findings...
looks like 100 is the max str you can give someone otherwise it creates a error and when you equip item you become encumbered.

max invy weight 72053lb max str 100 all other stats so far ok set at 243

this all at lvl1 though. issues may not arise if higher lvl?

so is there a way to fix this?

Lokey wrote:
Max ability score is 255, though that - whatever it's possible to get from bonuses is a much better idea.

Carry weight, just pad out the 2da to 255 rows to see--encumbrance.2da. Works server side only, but client displays from its version.
//
with explorer i found encumbrance.2da so run rows and numbers = to 255 and should fix, and players will need to download 2da patch to display and not have any ill effect then? That what your saying here?
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Aug 11, 2010 4:42    Post subject: Reply with quote

I think what lokey is trying to explain is, that the 2da file, probably doesnt have the rows in the 2da which details the weight restrictions for strength values as high as 200+


The 2da Source of Encumbrance looks like this sorta...

Code:

45         104530    160400         
46         115730    177800         
47         126930    195200         
48         138130    212600         
49         149330    230000         
50         160530    247400



If you want your strength values to work, you need to add them in to this 2da - in theory.

eg
Code:

STR           Normal    Heavy

45         104530    160400         
46         115730    177800         
47         126930    195200         
48         138130    212600         
49         149330    230000         
50         160530    247400
51         XXXXX    YYYYYY
52         XXXXX    YYYYYY
53         XXXXX    YYYYYY
54         XXXXX    YYYYYY
55         XXXXX    YYYYYY
56         XXXXX    YYYYYY
57         XXXXX    YYYYYY


Im guessing that Normal means - anything less than this, is normal,
and Heavy means anything less than this, but greater than normal, is heavy, and anything over heavy, is sooo heavy, that the character cannot move.


And no, your players 'shouldnt' need to download the 2da, the server is what will calculate if you are encumbered or not, however, the weight restrictions in inventory of players, may get screwed up if they do not have the 2da.
Eg - It may display 0, even though they are not encumbered.
Back to top
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Wed Aug 11, 2010 5:34    Post subject: Reply with quote

Why guess?


STR: the strength score (not modifier)
Normal: in 1/10 of a lb. Carry more than this you move slower (bugs notwithstanding)
Heavy: in 1/10 of a lb. Carry more than this and move even more slowly (bugs, etc)
_________________
Neversummer PW NWNx powered mayhem Wink
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Wed Aug 11, 2010 5:55    Post subject: Reply with quote

Ok, that's what I started to do wasn't sure of the number increase 1/10 is what your saying increase should be. Thank you for that info.
I thought about just making all the numbers the same 999,999 figuring not many PC will get 255 base 243 is highest you want to give them if they have any items that have 12 abil bonus or it will put there ability to 12... that would make the players mad.

normal=encumbered, heavy= heavily encumbered, that how I understood it

and if that is all I change and players want to see there weight they can carry I can offer the 2da. I will try to calculate numbers and post ability 2da on vaults.
//
my eyes and mind are blurry, was 1/10 the number to in crease the 2da value2
IE: take previous number or multiply.10 or divide by .10 add to number. I just can't seem to find the equation perhaps I should call it for today.

thank you lok and bal you have both been very helpful.
//
after 50 normal add 1120 each in crease heavy add 1740

EXAMPLE:

50 160530 247400
51 171730 264800
52 182930 282200
53 194130 299600
54 205330 317000
55 goes like so...

20533+1020=21653 add 0 for 1/10 amount 216530

31700+1740=33440 add 0 for 1/10 amount 334400

50 160530 247400
51 171730 264800
52 182930 282200
53 194130 299600
54 205330 317000
55 216530 334400
56 repeat process until 255

if this is wrong let me know please.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Aug 11, 2010 13:58    Post subject: Reply with quote

well those values at least at the end were always increased by some number, if you want I have 2da that keeps continuing in that until 255

ok HERE if you want and the file is named "patch70_2da.zip"
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Thu Aug 12, 2010 1:15    Post subject: Reply with quote

I went to your link but it says no file, did I miss it?

I will keep looking I like the idea of 2da fixes for the nwnx_funcs, there seems like there may be a few fixes with the 2da to insure nwnx_funcs.
Back to top
View user's profile Send private message
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Fri Aug 13, 2010 13:22    Post subject: Reply with quote

I'm looking for a function to get/set the map-pin text from them. I'd do it with memory editing but I can't find it so I figured it has to be handled elsewhere. Any clues?
_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Sat Aug 14, 2010 1:59    Post subject: Reply with quote

Im not 100% sure going to test it but you could use set tag...

object oMapPin;
int nEnabled=1;
string sTag="my map pin";
NWNXFuncs_SetTag(oMapPin,sTag);
SetMapPinEnabled(oMapPin,nEnabled);

just a quick bit of script to show you can also...

NWNXFuncs_SetTag(oMapPin,"my map pin");
SetMapPinEnabled(oMapPin,1);

GetTag(oMapPin);

if tag doesn't work try setting name

SetName(oMapPin,"my map pin name");

GetName(oMapPin,FALSE);

both ways compiled in toolset I hope this helps
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Sat Aug 14, 2010 17:48    Post subject: Reply with quote

Terra_777 wrote:
I'm looking for a function to get/set the map-pin text from them. I'd do it with memory editing but I can't find it so I figured it has to be handled elsewhere. Any clues?


You could try using custom map pins. These are just local variables set on the player. See the NWN Wiki entry for details on how this works. All you need to do is set one on client enter, then you can change the text simply by altering the local variable.
Back to top
View user's profile Send private message
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Sun Aug 15, 2010 1:37    Post subject: Reply with quote

Mostly I where looking for functionality to get map-pin text from existing waypoints so they can me merged into a database. 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
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sun Aug 15, 2010 19:33    Post subject: Reply with quote

Terra_777 wrote:
Mostly I where looking for functionality to get map-pin text from existing waypoints so they can me merged into a database. Smile
I got another nwscript/letoscript solution if you don't mind. Use modeo/letoscript to go through all waypoints in module. If there is mappin, set name of the waypoint to mappin text, if not set name to empty string. Then it would be easy.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Tue Aug 17, 2010 3:48    Post subject: Reply with quote

What leto script are you talking about shadoow?
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 ... 16, 17, 18 ... 27, 28, 29  Next
Page 17 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