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 
 
NWNX4 Functions

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Apr 17, 2007 0:34    Post subject: NWNX4 Functions Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Tue Apr 17, 2007 0:59    Post subject: Re: NWNX4 Functions Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Apr 17, 2007 1:03    Post subject: Re: NWNX4 Functions Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Tue Apr 17, 2007 1:04    Post subject: Re: NWNX4 Functions Reply with quote

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
View user's profile Send private message
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Tue Apr 17, 2007 7:45    Post subject: Reply with quote

My greedy wishlist: Razz

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
View user's profile Send private message
Grumalg



Joined: 04 Nov 2005
Posts: 70

PostPosted: Tue Apr 17, 2007 10:23    Post subject: Re: NWNX4 Functions Reply with quote

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
View user's profile Send private message
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Tue Apr 17, 2007 12:39    Post subject: Re: NWNX4 Functions Reply with quote

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
View user's profile Send private message
seed



Joined: 01 Dec 2006
Posts: 44

PostPosted: Tue Apr 17, 2007 15:03    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Apr 17, 2007 15:21    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
seed



Joined: 01 Dec 2006
Posts: 44

PostPosted: Tue Apr 17, 2007 21:14    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Apr 17, 2007 23:51    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
abraxas77



Joined: 17 Nov 2006
Posts: 15

PostPosted: Wed Apr 18, 2007 1:00    Post subject: Reply with quote

(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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Wed Apr 18, 2007 7:12    Post subject: Reply with quote

Thanks, abraxas77!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Wed Apr 18, 2007 19:50    Post subject: Reply with quote

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
View user's profile Send private message
GodBeastX



Joined: 09 Aug 2006
Posts: 65

PostPosted: Thu May 17, 2007 0:52    Post subject: Reply with quote

Is get BIC Name working or still crashing?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Page 1 of 1

 
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