View previous topic :: View next topic |
Author |
Message |
ashtefere
Joined: 01 Oct 2010 Posts: 4
|
Posted: Fri Oct 01, 2010 7:11 Post subject: Need help with a workaround for "GetVoiceset" |
|
|
I know this function exists for NWN1 with NWNX2, but I cannot determine if this function exists in NWNX4.
I have looked here for the last couple days and cant find a list of functions in NWNx4.
If there isnt, I was wondering if there was a similar function I could hijack (for example, get value from BIC file) that will allow me to "get" the voiceset in use by a character.
I have been tearing my hair out trying to get my extended voicesets to work, and its a nightmare.
I cant find an SSF editor that will add extra voicechats to a standard ssf, so I have to use a script to "call" the voice chat by appending the name of the voice chat to the name of the soundfile and running a playsound on it.
Does anyone have any ideas?
Thanks
-Ash |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Fri Oct 01, 2010 16:35 Post subject: |
|
|
You could always use nwnx_leto or nwnx_ruby+nwn-lib to query the voiceset of a character. |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sat Oct 02, 2010 1:17 Post subject: |
|
|
That would work for NWN1, but the OP is asking about NWN2
I could rig up a quick xp_funcs with a GETSOUNDSET method, if necessary, but if anyone has a better idea before I get around to that, fire away. _________________ 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 |
|
|
ashtefere
Joined: 01 Oct 2010 Posts: 4
|
Posted: Sat Oct 02, 2010 2:50 Post subject: |
|
|
NWN2 has ALWAYS need a "getsoundset". Obsidian just didnt listen or didnt think it was necessary to add in such a simple query.
I assume its just a value in the bic file?
What I have been trying to do for a workaround is hook into the chargen screen and do a Code: | OnLeftClick1=UIButton_Input_SetCharGenInfo("CHARGEN","DEITY","SOUNDSET_LISTBOX") |
However, not matter what I do, I cant set any data from the selected item in the "SOUNDSET_LISTBOX".
The only thing that seems to work with it is the playsoundsample function.
Spent days on it now, so Zebranky, if you could do that and give me a brief bit of info (or just links) to what I need to do to install it on my server, I would bow down to you like a good little religious zealot.
-Ash |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sat Oct 02, 2010 5:20 Post subject: |
|
|
It's certainly in the bic, so xp_leto would probably do the trick. However, it's about time I made a working NWNX4 plugin of some sort, so: http://www.mercuric.net/nwn/nwnx/xp_funcs.dll
Test script:
Code: | void main()
{
object oPC = GetLastUsedBy();
int pc_objid = ObjectToInt(oPC);
int soundset = NWNXGetInt("FUNCS", "GETSOUNDSET", "", pc_objid);
SendMessageToPC(oPC, "soundset: " + IntToString(soundset));
} |
Quick and dirty, but it should do the trick. _________________ 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 |
|
|
ashtefere
Joined: 01 Oct 2010 Posts: 4
|
Posted: Sat Oct 02, 2010 10:00 Post subject: |
|
|
Oh wow you work fast.
So... how do I install that into my server? Which NWNX4 package do I use/etc?
I have always been meaning to install it but never got around to it.
Thanks
-Ash
EDIT:
Nvm, just installed and unzipped NWNX4, then set the ini files. Then I put XP_FUNCS in the same folders as the others, and everything is working.
You sir, are a god damned legend.
/bow in reverence.
-Ash |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sat Oct 02, 2010 15:07 Post subject: |
|
|
Glad to hear it's working _________________ 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 |
|
|
e.v
Joined: 23 Jun 2012 Posts: 1
|
Posted: Sun Sep 15, 2013 10:39 Post subject: |
|
|
Zebranky, Can you please tell me in this line
Code: | unsigned short (__fastcall *CNWSCreature__GetSoundSet)(void *) = (unsigned short (__fastcall *)(void *))0x005504A0; |
Is 0x005504A0 the memory address of the soundset property or something like that?
If so, how can I know what are the numbers for other values? Like the character's head id for example. |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Sun Sep 15, 2013 12:27 Post subject: |
|
|
e.v wrote: | Zebranky, Can you please tell me in this line
Code: | unsigned short (__fastcall *CNWSCreature__GetSoundSet)(void *) = (unsigned short (__fastcall *)(void *))0x005504A0; |
Is 0x005504A0 the memory address of the soundset property or something like that?
If so, how can I know what are the numbers for other values? Like the character's head id for example. | Im not Zebranky but...
0x005504A0 is a location of the function that returns soundset, its not a location of the soundset property value. That is pointer of the creature + some value I dont know from head. But you can indeed change a character body parts via nwnx easily, all you have to do is make a custom function in nwnx then in nwn setlocalstring on a player and then access object's (player's) properties via pThis->argument; _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
|