View previous topic :: View next topic |
Author |
Message |
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Apr 17, 2007 0:34 Post subject: NWNX4 Functions |
|
|
NWNX4 Functions 0.1.0 ALPHA
http://data.virusman.ru/nwn/nwnx4/xp_functions-0.1.0.rar
Code: | void SetTag(object oObject, string sNewTag);
string GetBICName(object oObject); |
Last edited by virusman on Tue Apr 17, 2007 23:52; edited 1 time in total |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Tue Apr 17, 2007 0:59 Post subject: Re: NWNX4 Functions |
|
|
virusman wrote: | string GetBICName(object oObject); |
Out of curiosity, how does this work? I've noticed that bic names in nwn2 are simply character first name + last name + .bic without blank spaces, so less complicated than nwn1 ones. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Apr 17, 2007 1:03 Post subject: Re: NWNX4 Functions |
|
|
TroveLord wrote: | virusman wrote: | string GetBICName(object oObject); |
Out of curiosity, how does this work? I've noticed that bic names in nwn2 are simply character first name + last name + .bic without blank spaces, so less complicated than nwn1 ones. | It gets bic file name directly from the player object in memory. |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Tue Apr 17, 2007 1:04 Post subject: Re: NWNX4 Functions |
|
|
virusman wrote: | TroveLord wrote: | virusman wrote: | string GetBICName(object oObject); |
Out of curiosity, how does this work? I've noticed that bic names in nwn2 are simply character first name + last name + .bic without blank spaces, so less complicated than nwn1 ones. | It gets bic file name directly from the player object in memory. |
Cunning. Btw great job with SetTag. |
|
Back to top |
|
|
Senalaya
Joined: 29 Dec 2004 Posts: 82 Location: Germany
|
Posted: Tue Apr 17, 2007 7:45 Post subject: |
|
|
My greedy wishlist:
SetScale(object oObject, vector vScale) or SetScale(object oObject, float X, float Y, float Z)
vector GetScale(object oObject) alternativly float GetScaleX, etc
Get/SetItemPropertyActivationPreference(object oItem)
Get/SetTint() |
|
Back to top |
|
|
Grumalg
Joined: 04 Nov 2005 Posts: 70
|
Posted: Tue Apr 17, 2007 10:23 Post subject: Re: NWNX4 Functions |
|
|
TroveLord wrote: | virusman wrote: | string GetBICName(object oObject); |
Out of curiosity, how does this work? I've noticed that bic names in nwn2 are simply character first name + last name + .bic without blank spaces, so less complicated than nwn1 ones. |
Actually, I requested this function to solve a specific issue. If a player creates a new PC with the same name as an already existing PC of theirs there's no reliable way to tell it's a new PC via any of the get info from PC functions.
This means the newly created PC inherits any DB stored values for the previous PC of that name. Yeah, there *are* ways to work around this, like a forced item in inven carrying a local on it.
Haveing the bic name allows distinguishing it directly as new PC's of same name get a numeric suffix added to the filename. If you store the bic name in the DB you can check for a match and tell if this PC already exists, or needs to be assigned a new unique ID.
At least that's my theory, I haven't tested it yet...
--- Grumalg --- |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Tue Apr 17, 2007 12:39 Post subject: Re: NWNX4 Functions |
|
|
Grumalg wrote: | This means the newly created PC inherits any DB stored values for the previous PC of that name. Yeah, there *are* ways to work around this, like a forced item in inven carrying a local on it. |
Makes sense. |
|
Back to top |
|
|
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Tue Apr 17, 2007 15:03 Post subject: |
|
|
Is this a production release? I installed it on my PW last night but experienced multiple crashes each within 4-5 minutes of start-up so I uninstalled the plugin and it stopped.
If there is any info/logs I can provide to help I'll be happy to gather them for you. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Apr 17, 2007 15:21 Post subject: |
|
|
Sorry for not mentioning that it's an alpha/unstable release
Yes, it'd be useful to know what function caused the crash (it must be the last in xp_functions.txt logfile) and when. |
|
Back to top |
|
|
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Tue Apr 17, 2007 21:14 Post subject: |
|
|
no problem with the beta - I'd have probably tried it anyway since Chat is beta too and I've been running that for months with no apparent issues.
Here is the log file from the last session:
Quote: | NWNX Functions Plugin V.0.1.0
(c) 2007 by virusman (virusman@virusman.ru)
visit us at http://www.nwnx.org
GetPCobjByOID found at 0x442df0
GetPlayerObj found at 0x42ec60
* Plugin initialized.
* GetBICName called
* pPlayer: 14DBD148
* BICName: leeroy
|
|
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Apr 17, 2007 23:51 Post subject: |
|
|
seed wrote: | no problem with the beta - I'd have probably tried it anyway since Chat is beta too and I've been running that for months with no apparent issues.
Here is the log file from the last session:
Quote: | NWNX Functions Plugin V.0.1.0
(c) 2007 by virusman (virusman@virusman.ru)
visit us at http://www.nwnx.org
GetPCobjByOID found at 0x442df0
GetPlayerObj found at 0x42ec60
* Plugin initialized.
* GetBICName called
* pPlayer: 14DBD148
* BICName: leeroy
|
| Hm.. nothing suspicious, the function returned the correct value, I don't see where the crash could happen...
//NWNX4 Chat is not beta since 0.3 RC1 or 0.3.1. |
|
Back to top |
|
|
abraxas77
Joined: 17 Nov 2006 Posts: 15
|
Posted: Wed Apr 18, 2007 1:00 Post subject: |
|
|
(using patch 1.05)
nwn2server crashes when a player logs out ... (after GetBICName is called OnClientEnter).
log before Player logs out (and after GetBICName is called)
Quote: | NWNX Functions Plugin V.0.1.0
(c) 2007 by virusman (virusman@virusman.ru)
visit us at http://www.nwnx.org
GetPCobjByOID found at 0x4505c0
GetPlayerObj found at 0x437b10
* Plugin initialized.
* GetBICName called
* pPlayer: 05D818A0
* BICName: abraxas |
log after Player logs (and after nwn2server crashes)
Quote: | NWNX Functions Plugin V.0.1.0
(c) 2007 by virusman (virusman@virusman.ru)
visit us at http://www.nwnx.org
GetPCobjByOID found at 0x4505c0
GetPlayerObj found at 0x437b10
* Plugin initialized.
* GetBICName called
* pPlayer: 05D818A0
* BICName: abraxas
* GetBICName called
* Plugin unloaded. |
I haven't tested this with more than one player. So I'm not sure if it crashes for every player logout or just the last player on the server. (the "reload when empty" server switch is disable, btw) Also, I can only test with one machine running both client and server.
GetBICName is called only once at OnClientLogin.
...
This is different than the results I got yesterday ... despite that nothing changed since then. I rebooted, that seemed to fix half the problems I had yesterday (it was crashing on client login whenever a servervault character joined). So now, I only have the crash issue on client logout. _________________ aka. twp_andrew
:: Lead Script Design :: The World of Paladium II ::
|
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Apr 18, 2007 7:12 Post subject: |
|
|
Thanks, abraxas77! |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Wed Apr 18, 2007 19:50 Post subject: |
|
|
It may be worth mentioning that I have also been seeing issues where the hashset plugin is getting invoked when a PC logs out, when I am making no calls from nwscript for it to do so. _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
GodBeastX
Joined: 09 Aug 2006 Posts: 65
|
Posted: Thu May 17, 2007 0:52 Post subject: |
|
|
Is get BIC Name working or still crashing? |
|
Back to top |
|
|
|