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 
 
retrieve an npc's voiceset name?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Sun Dec 13, 2009 16:24    Post subject: retrieve an npc's voiceset name? Reply with quote

hi all,

just wondering if anyone knows of an nwnx function that i can use to retrieve the id of a given npc's voiceset?

if not, could letoscript be used for this? this would be a read-only function which may be called quite frequently, so a func which is written load-savvy would be best.

thanks
Back to top
View user's profile Send private message
Paul R



Joined: 17 Apr 2009
Posts: 42

PostPosted: Mon Dec 14, 2009 3:20    Post subject: Reply with quote

These functions from nwnx_funcs can do Get/Set the soundset:

Code:
/* Get the soundset index for oCreature. */
int GetSoundset (object oCreature);

/* Set the soundset index for oCreature. */
int SetSoundset (object oCreature, int nSoundset);


The int returned in the index from the soundset.2da file.
Back to top
View user's profile Send private message
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Mon Dec 14, 2009 6:44    Post subject: Reply with quote

mahhhvelous! Very Happy
how do i get ahold of them??
i've d/l'd version 1.8.9 of nwnx_functions, which looks to be the latest version, and the funcs you mention aren't in there. is there a newer version someplace?

thanks!
Back to top
View user's profile Send private message
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Mon Dec 14, 2009 15:27    Post subject: Reply with quote

ok nvm think i found it:
http://nwn.virusman.ru/trac/nwnx2-linux/browser/trunk/plugins/funcs

if that's not the most up-to-date version please let me know.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Mon Dec 14, 2009 21:39    Post subject: Reply with quote

That's Linux-only, of course. If you need it for Windows, I started working on it last night, but ran into some issues. If you are on Windows, I'll keep working on it.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Tue Dec 15, 2009 19:17    Post subject: Reply with quote

Zebranky wrote:
That's Linux-only, of course. If you need it for Windows, I started working on it last night, but ran into some issues. If you are on Windows, I'll keep working on it.
that's great news. Smile in fact, even though the server runs on a linux box, all our development is done under windoze, and while it'll still compile regardless, it sure would be nice to be able to test it on the dev machines too rather than having to update the linux server every time.
Back to top
View user's profile Send private message
Paul R



Joined: 17 Apr 2009
Posts: 42

PostPosted: Tue Dec 15, 2009 21:22    Post subject: Reply with quote

Sorry, yes should have mentioned Linux only and that there was a nwnx_functions as well.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Tue Dec 22, 2009 22:24    Post subject: Reply with quote

NWNX!FUNCTIONS!GETSOUNDSET is in Win32 with revision 61. Updated http://mercuric.net/nwn/nwnx/ to r63.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Dec 23, 2009 0:42    Post subject: nice Reply with quote

Hey Zebby,

Is anything else in Functions working on Windows?
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Dec 23, 2009 1:18    Post subject: Reply with quote

Everything that's currently in Functions on Windows should be working on Windows. Smile
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Dec 23, 2009 1:32    Post subject: sound silly Reply with quote

This may sound silly, but is there an updated list of 'whats currently in functions'?

Its just that the plugin list thread has not been updated in a very long time, and it currently says that functions is not supported with 1.69.

I think at one point in time, I needed Functions for the SetTag method in it, but think I used a work around.

Any 'new' methods in it that might be of interest?
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Dec 23, 2009 2:29    Post subject: Reply with quote

I haven't actually tested all the functions, so it's possible some are broken. However, the current list:
SETLOCKDC
SETGOLDPIECEVALUE
SETTAG
SETARMORAC
GETARMORAC
GETDESCRIPTION
GETISPICKPOCKETABLE
SETISPICKPOCKETABLE
GETPCPORT
BOOTPCWITHMESSAGE
GETSOUNDSET

The last three I know work on 1.69 (and probably only on 1.69).
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Dec 23, 2009 2:42    Post subject: just tested Reply with quote

just tested the BOOTPC one.

It sounded interesting, it does indeed boot the player to the main menu, but it does it without any messages.

Eg - not even a message to say "You have been booted"

perhaps my implimentation is incorrect?

Code:

object oPC = GetLastUsedBy();
SetLocalString(oPC,"NWNX!FUNCTIONS!BOOTPCWITHMESSAGE","This is a test")


I guess the expected result was - "This is a test" being displayed on the client. Oh well.. still, sounds useful.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Dec 23, 2009 3:03    Post subject: Reply with quote

The message displayed is an ID from the talktable, so it can't be an arbitrary message (unless you're using a custom tlk? not sure).

Also, argh! Just noticed that using GETSOUNDSET results in a crash on logout. Looking into it now.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Dec 23, 2009 3:38    Post subject: Reply with quote

Ah, you just need to be sure you call DeleteLocalString() on the NWNX!FUNCTIONS!WHATEVER var after using the result. If you don't, when the player logs out, the server accesses that var again, triggers NWNX, and because the PC doesn't fully exist anymore... bad things happen.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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