Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: profile-independent voicesets
New feature: profile-independent voicesets[message #348276] Sat, 14 January 2017 23:05 Go to previous message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Since the beginning of (JA2-) time, there are up to 256 profiles (for mercs, NPCs etc.). Each profile comes with their own voice. This is somewhat limiting for IMPs:
  • Not only do we need a profile slot for them, we also need a slot for each voice. As a result, the scarcity of profile slots limits the number of voicesets we can have.
  • As a result of this mechanic, each voice can only be used once (not sure why you want to use a voice several times though). This also means that if you load a previously created IMP via the website, their voice can change. Not sure why this has never been reported as a bug, but it sure is one...
  • You also can't use merc voices for IMPs as a result.
I think it would be good to have more freedom: to have voicesets be independent of profile slots. So I've just coded this.



As seen in the above video, there are now 5 more voicesets for IMPs. They were created by merc05 and ratpaz from Wizardy8. For those of you who don't know this, Wizardry8 was a game made by Sir-Tech, the same company that made JA2. Quite a few voice actors worked on both games (and there are even some references to Wizardry in the code). As a result, these voices wok quite well, I think. They are a bit flavored and not so bland like vanilla IMPs, which is a plus in my eyes.

Which voices can be used by IMPs is set in a new xml, TableData/IMPVoices.xml:
<IMPVOICELIST>
	<VOICE>
		<szVoiceSetName>Male 1</szVoiceSetName>
		<voiceset>51</voiceset>
		<bSex>0</bSex>
	</VOICE>

<voiceset> determines the number of the voice set. <bSex> determines whether its for males (0) or females (1). <szVoiceSetName> is the name you see in the IMP voice selection process. At the moemnt I ignorantly assume that 100 IMP voicesets are enough, but changing that is only ne define away, so no problem there.

Oh, btw, we can now handle up to 2^32 different voicesets. I am optimistic that will be enough for the foreseeable future.

As you've probably guessed, we also have a new tag in TableData/MercProfiles.xml:
<PROFILE>
		<uiIndex>188</uiIndex>
		<Type>2</Type>
		<zName>Lance Fisher</zName>
		<zNickname>Lance</zNickname>
		<ubFaceIndex>188</ubFaceIndex>
		<usVoiceIndex>188</usVoiceIndex>
                ...

<usVoiceIndex> determines the voiceset. So far, this will always be <uiIndex> - When loading an older savegame, I also assume that. But you can now set that however you like. Note that changes in MercProfiles.xml will only affect new campaigns started. If you start a new game with an xml without these tags, it will always use voice 0 - which will cause every person ingame to have Barry's voice big grin

This is savegame compatible.

This has been added to the trunk in r8364 & GameDir r2357. Using the new exe without the new GameDir will cause the people of Munich to legalize meth, but illegalize milk. I hope you're proud of yourself.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New feature: Spotter
Next Topic: New feature: non-profile merchants
Goto Forum:
  


Current Time: Thu Nov 28 20:42:17 GMT+2 2024

Total time taken to generate the page: 0.00754 seconds