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 
 
Beta plugin: nwnx_funcs
Goto page Previous  1, 2, 3, ... 9, 10, 11  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Aug 20, 2008 18:23    Post subject: Reply with quote

Shocked Damn...i dont know what that is really. will it ever be posted as a download as the other plugins?
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Wed Aug 20, 2008 19:44    Post subject: Reply with quote

Yes, once it is out of beta.

If you're using Ubuntu, you can do apt-get install subversion to get the SVN client, then 'svn checkout <url>' where <url> is the Subversion repository URL in Virusman's post.

Acaos
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Aug 20, 2008 21:34    Post subject: Reply with quote

i am not sure if i am using that or not. but the issue i was having in the other post where SetSubrace was causing me issues has been worked around. So i will await the release

Keep up the kicka$$ work tho
Back to top
View user's profile Send private message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Tue Aug 26, 2008 1:07    Post subject: Reply with quote

I just wanted to say that I have been using some of these functions as a replacement to Letoscript all night with my subrace system, and it seems to work perfectly, not having to relog is a god send, great work Acos, and thanks for this fantastic plugin.

One question though.

I couldn't find a ModifySavingThrowBonus ( ) function, so I am having to check the players initial saves, then apply a new value with:

SetSavingThrowBonus ( oPC, SAVING_THROW_*, nSave + nValue )

It would make me feel better to use a function that does the adjustment for me just like ModifyAbilityScore ( ) as oposed to SetAbilityScore ( ), why isn't there a Modify function for saves also?

Cheers.
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Tue Aug 26, 2008 20:56    Post subject: Reply with quote

I'll add ModifySavingThrowBonus() - as you mention, there is Get/SetSavingThrowBonus() but not Modify.

The reason we actually have ModifyAbilityScore() is because, surprisingly, raw ability scores don't actually include racial adjustments. So your 20 Strength half-orc actually has a raw Strength of 18 under the hood. There's no such surprise with the saving throw bonuses since the raw bonuses are only visible with the funcs plugin anyway (whereas GetAbilityScore(oPC, ABILITY_STRENGTH, TRUE) and the raw ability score can differ).

Although I'm sure you know this, for the education of other people, the saving throw bonus being edited here is actually the 'under the hood' one seen editing creatures in the toolset, and not the saving throw bonus from classes/feats/buffs/etc.

Acaos
Back to top
View user's profile Send private message
max196



Joined: 26 Jun 2008
Posts: 30

PostPosted: Wed Aug 27, 2008 15:02    Post subject: Reply with quote

is there a way to read ranger bane of enemy feats? I mean to know who are the enemies chosen.
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Wed Aug 27, 2008 17:16    Post subject: Reply with quote

Use GetHasFeat (bioware) or GetKnowsFeat (funcs). The consts for those feats range from 261 to 286.

Funky
Back to top
View user's profile Send private message
max196



Joined: 26 Jun 2008
Posts: 30

PostPosted: Wed Aug 27, 2008 17:49    Post subject: Reply with quote

Lol, i didnt see that there are all the consts!
I was confused about name of the feats! nwn translated in Italian language change the name for many feats!
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Thu Aug 28, 2008 5:42    Post subject: Reply with quote

Newest function: GetPCFileName (object oPC). This returns the name of their bicfile in their player directory in the server vault.

Acaos
Back to top
View user's profile Send private message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Thu Aug 28, 2008 20:28    Post subject: Reply with quote

Hey acos, on our server we had to disallow non-alpha numeric character names after we switched over to Lunix, because Letoscript woul dfail when deleting characters or applying subracial stats. Since we now use your functions for subracial stats, we have no worry about that part, but we still use Letoscript for character deleting. With your new function, how would it work with unusual named characters?

I rememeber that bic files that had unusual names had alot of ? in the file names, perhaps that's because Linux didn't recognize those non-aplha characters, any idea on that?

The reason I'm asking is, we would love players to be able to customize their names again as they used to, any suggestions?
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Thu Aug 28, 2008 22:06    Post subject: Reply with quote

Code:
string sFile = NWN_SERVERVAULT + "/" + GetPCPlayerName(oPC) + "/" + GetPCFileName(oPC) + ".bic";
LetoScript("FileDelete q<" + sFile + ">");


You will have to disallow the '<', '>', and '/' characters in player/character names still (I don't even think those are allowed in player names, though). On Higher Ground we also disallow '"' and '~'.

Acaos
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Thu Aug 28, 2008 23:31    Post subject: Reply with quote

I just added ModifySavingThrowBonus() to nwnx_funcs. It could be implemented entirely in nwscript, so it is only in the nss.

Acaos
Back to top
View user's profile Send private message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Sun Aug 31, 2008 12:46    Post subject: Reply with quote

acaos wrote:
Code:
string sFile = NWN_SERVERVAULT + "/" + GetPCPlayerName(oPC) + "/" + GetPCFileName(oPC) + ".bic";
LetoScript("FileDelete q<" + sFile + ">");


You will have to disallow the '<', '>', and '/' characters in player/character names still (I don't even think those are allowed in player names, though). On Higher Ground we also disallow '"' and '~'.

Acaos


Works great thanks Smile

Is it possible to set a players name without the need for relog? ( I have seen the disguise system, but that's not what I want, I mean REALLY change a players name ).
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Tue Sep 02, 2008 1:49    Post subject: Reply with quote

I haven't tried yet, but I will do some experimenting. Not sure if it will mess up the bic file name to change a player's name.

Also, new function: SetPlaceableAppearance(). Placeables changed won't update for viewers until they leave and re-enter the area, but it does work for non-static placeables.

Acaos
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Tue Sep 02, 2008 14:58    Post subject: Reply with quote

Could you do a new functions:

vector GetPositionFromBic(string sFileName)
float GetFacingFromBic(string sFileName)

?

Look at my letoscript function I using for build the last location in player enter. (location tag I'm saving in every area onenter event)

I found out that bic file contain those information so I left any "exit item" or other ways like "bind altars".

Code:
location GetEnteringPlayerLastLocation(object oPlayer)
{
string script = "%char = '"+NWN_DIR+"servervault/"+GetPCPlayerName(oPlayer)+"/"+GetPCBicFileName(oPlayer)+"';"+
                "print /XPosition;"+
                "print '|';"+
                "print /YPosition;"+
                "print '|';"+
                "print /ZPosition;"+
                "print '|';"+
                "print /XOrientation;"+
                "print '|';"+
                "print /YOrientation;"+
                "print '|';"+
                "print /ZOrientation;"+
                "print '|';"+
                "close %char;";
string result = LetoScript(script);
WriteTimestampedLogEntry("[DEBUG] GetEnteringPlayerLocation: "+result);
//result from letoscript is not compatible with nwscript, so lets repair it
float vx = StringToFloat(ReplaceFirstFoundChar(MultiStringGetNth(result,1),",","."));
float vy = StringToFloat(ReplaceFirstFoundChar(MultiStringGetNth(result,2),",","."));
float vz = StringToFloat(ReplaceFirstFoundChar(MultiStringGetNth(result,3),",","."));
float x = StringToFloat(ReplaceFirstFoundChar(MultiStringGetNth(result,4),",","."));
float y = StringToFloat(ReplaceFirstFoundChar(MultiStringGetNth(result,5),",","."));
float z = StringToFloat(ReplaceFirstFoundChar(MultiStringGetNth(result,6),",","."));
return Location(GetObjectByTag(GetPlayerPersistentString(oPlayer,"LAST_KNOWN_AREA")),Vector(vx,vy,vz),VectorToAngle(Vector(x,y,z)));
}

_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, ... 9, 10, 11  Next
Page 2 of 11

 
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