View previous topic :: View next topic |
Author |
Message |
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Aug 20, 2008 18:23 Post subject: |
|
|
Damn...i dont know what that is really. will it ever be posted as a download as the other plugins? |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Wed Aug 20, 2008 19:44 Post subject: |
|
|
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 |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Aug 20, 2008 21:34 Post subject: |
|
|
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 |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Tue Aug 26, 2008 1:07 Post subject: |
|
|
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 |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Tue Aug 26, 2008 20:56 Post subject: |
|
|
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 |
|
|
max196
Joined: 26 Jun 2008 Posts: 30
|
Posted: Wed Aug 27, 2008 15:02 Post subject: |
|
|
is there a way to read ranger bane of enemy feats? I mean to know who are the enemies chosen. |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Wed Aug 27, 2008 17:16 Post subject: |
|
|
Use GetHasFeat (bioware) or GetKnowsFeat (funcs). The consts for those feats range from 261 to 286.
Funky |
|
Back to top |
|
|
max196
Joined: 26 Jun 2008 Posts: 30
|
Posted: Wed Aug 27, 2008 17:49 Post subject: |
|
|
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 |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Thu Aug 28, 2008 5:42 Post subject: |
|
|
Newest function: GetPCFileName (object oPC). This returns the name of their bicfile in their player directory in the server vault.
Acaos |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Thu Aug 28, 2008 20:28 Post subject: |
|
|
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 |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Thu Aug 28, 2008 22:06 Post subject: |
|
|
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 |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Thu Aug 28, 2008 23:31 Post subject: |
|
|
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 |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Sun Aug 31, 2008 12:46 Post subject: |
|
|
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
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 |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Tue Sep 02, 2008 1:49 Post subject: |
|
|
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 |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Sep 02, 2008 14:58 Post subject: |
|
|
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 |
|
|
|
|
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
|