View previous topic :: View next topic |
Author |
Message |
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Sun Dec 13, 2009 16:24 Post subject: retrieve an npc's voiceset name? |
|
|
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 |
|
|
Paul R
Joined: 17 Apr 2009 Posts: 42
|
Posted: Mon Dec 14, 2009 3:20 Post subject: |
|
|
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 |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Mon Dec 14, 2009 6:44 Post subject: |
|
|
mahhhvelous!
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 |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Mon Dec 14, 2009 21:39 Post subject: |
|
|
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 |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Tue Dec 15, 2009 19:17 Post subject: |
|
|
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. 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 |
|
|
Paul R
Joined: 17 Apr 2009 Posts: 42
|
Posted: Tue Dec 15, 2009 21:22 Post subject: |
|
|
Sorry, yes should have mentioned Linux only and that there was a nwnx_functions as well. |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Tue Dec 22, 2009 22:24 Post subject: |
|
|
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 |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Dec 23, 2009 0:42 Post subject: nice |
|
|
Hey Zebby,
Is anything else in Functions working on Windows? |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Wed Dec 23, 2009 1:18 Post subject: |
|
|
Everything that's currently in Functions on Windows should be working on Windows. _________________ 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 |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Dec 23, 2009 1:32 Post subject: sound silly |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Wed Dec 23, 2009 2:29 Post subject: |
|
|
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 |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Dec 23, 2009 2:42 Post subject: just tested |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Wed Dec 23, 2009 3:03 Post subject: |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Wed Dec 23, 2009 3:38 Post subject: |
|
|
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 |
|
|
|