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 
 
Need help with a workaround for "GetVoiceset"

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
ashtefere



Joined: 01 Oct 2010
Posts: 4

PostPosted: Fri Oct 01, 2010 7:11    Post subject: Need help with a workaround for "GetVoiceset" Reply with quote

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



Joined: 17 Feb 2008
Posts: 323

PostPosted: Fri Oct 01, 2010 16:35    Post subject: Reply with quote

You could always use nwnx_leto or nwnx_ruby+nwn-lib to query the voiceset of a character.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sat Oct 02, 2010 1:17    Post subject: Reply with quote

That would work for NWN1, but the OP is asking about NWN2 Smile

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



Joined: 01 Oct 2010
Posts: 4

PostPosted: Sat Oct 02, 2010 2:50    Post subject: Reply with quote

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



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sat Oct 02, 2010 5:20    Post subject: Reply with quote

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



Joined: 01 Oct 2010
Posts: 4

PostPosted: Sat Oct 02, 2010 10:00    Post subject: Reply with quote

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



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sat Oct 02, 2010 15:07    Post subject: Reply with quote

Glad to hear it's working 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
e.v



Joined: 23 Jun 2012
Posts: 1

PostPosted: Sun Sep 15, 2013 10:39    Post subject: Reply with quote

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



Joined: 20 Aug 2005
Posts: 581

PostPosted: Sun Sep 15, 2013 12:27    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules 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