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 next 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

Re: New feature: profile-independent voicesets[message #348280 is a reply to message #348276] Sat, 14 January 2017 23:50 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
As it is highly likely a modder would like to add the new tag to his highly modified MercProfiles.xml, without having to manually insert and edit that stuff 255 times - you can use regular expressions with Notepad++. In the edito, press [Ctrl] + [H], seach for <ubFaceIndex>(.)</ubFaceIndex> and replace it with <ubFaceIndex>\1</ubFaceIndex>\n<usVoiceIndex>\1</usVoiceIndex> while the option regular expessions is ticked on. Then replace all in the file, this will create the new tags. The (.) part searches for one symbol and stores it, \1 then places that previously stored symbol. You then need to repeat that with (..) and (...), of course.

Also, to further demonstrate how voices are no longer limited to 256, the new voices in IMPVoices.xml have numbers 300-304.



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

Re: New feature: profile-independent voicesets[message #348720 is a reply to message #348280] Sun, 05 February 2017 16:02 Go to previous messageGo to next message
Parkan is currently offline Parkan

 
Messages:438
Registered:April 2010
Location: Russia,Sevastopol

So,if i install last SCI with this new function i can create 15 IMPs without any additional editing of ini or xml files?or we have no limit at all?


1.Serve the public trust
2.Protect the innocent
3.Uphold the law(c)Robocop

Report message to a moderator

Master Sergeant
Re: New feature: profile-independent voicesets[message #348721 is a reply to message #348720] Sun, 05 February 2017 21:52 Go to previous messageGo to next message
Parkan is currently offline Parkan

 
Messages:438
Registered:April 2010
Location: Russia,Sevastopol

Well, i answer to my quesion myself.With little editing in ja2_option.ini and Impvoices.xml player can made a lot of IMPs without problems.I checked even imps with same voices no problems found even during travelling with such mercs.Added to game Shepard,Lara croft and one male voice from vengence to mod so 18 imps with different voices now =)


1.Serve the public trust
2.Protect the innocent
3.Uphold the law(c)Robocop

Report message to a moderator

Master Sergeant
Re: New feature: profile-independent voicesets[message #348835 is a reply to message #348276] Sun, 12 February 2017 20:39 Go to previous messageGo to next message
Sniki Hor is currently offline Sniki Hor

 
Messages:15
Registered:August 2006
Location: Croatia
@Parkan
Can you tell me exactly what you did?
I'm playing aimnas and I added this in ja2options.ini (in vanilla, 1.13 and Data-AIM dirs).
I needed to use text editor because INI editor doesn't allow me to select more than 3 females. Also when I load externally edited ja2options.ini IMP_FEMALE_4 is totaly greyed out for editing.

IMP_MALE_CHARACTER_COUNT = 5
IMP_FEMALE_CHARACTER_COUNT = 5

IMP_MALE_1 = 51
IMP_MALE_2 = 52
IMP_MALE_3 = 53
IMP_MALE_4 = 169

;IMP_MALE_5 = 192
;IMP_MALE_6 = 193
;IMP_MALE_7 = 194
;IMP_MALE_8 = 164

IMP_FEMALE_1 = 54
IMP_FEMALE_2 = 55
IMP_FEMALE_3 = 56
IMP_FEMALE_4 = 300
IMP_FEMALE_5 = 301
---

I'downloaded (SVN with tortoise) 8384 build and had everyone sounds like Barry problem but fixed all that.
And I can make 5 female imps, voices work and can be heard in IMP creation but ingame 4th female character with extra voice is silent.
I also get this error at game start:
recruitment settings 300 in imp_female4=300 in ja2options.ini is outside of valid range 1-254, 254 will be used instead

Report message to a moderator

Private
Re: New feature: profile-independent voicesets[message #348837 is a reply to message #348835] Mon, 13 February 2017 08:24 Go to previous messageGo to next message
Parkan is currently offline Parkan

 
Messages:438
Registered:April 2010
Location: Russia,Sevastopol

Impvoices.xml in tabledata directory.This file you must edit.or add to aimnas directory.You don't need to add this
IMP_FEMALE_4 = 300
IMP_FEMALE_5 = 301 to ja2_option.ini only change this to needed count
IMP_MALE_CHARACTER_COUNT = 5
IMP_FEMALE_CHARACTER_COUNT = 5.that's all.

[Updated on: Mon, 13 February 2017 08:25]




1.Serve the public trust
2.Protect the innocent
3.Uphold the law(c)Robocop

Report message to a moderator

Master Sergeant
Re: New feature: profile-independent voicesets[message #348847 is a reply to message #348837] Tue, 14 February 2017 02:17 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
What Parkan said, basically. Not entirely sure how many slots get default values if not entered, but if it works for him, it will do so for you, too.

As to your error message: Up until this feature, profile slot and voiceset number were the same. This is no longer the case. The voiceset number is only used in the 2 xmls quoted in the first post. IMP_FEMALE_4 and so on refer to a profile slot. As profiles are limited to 1 - 254, you get an error message for putting in 300.



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

Re: New feature: profile-independent voicesets[message #349471 is a reply to message #348847] Mon, 10 April 2017 15:20 Go to previous messageGo to next message
Parkan is currently offline Parkan

 
Messages:438
Registered:April 2010
Location: Russia,Sevastopol

Well,something goes a little bit strange.If few month ago after releasing this feature i managed to add to game more voices and working IMPs(more than 10).Now this feature not work as before.Without editing mercprofiles, only editing impvoice.xml not i still cant go more than 10 imps if i changed maximum in ja2_option.ini.Does this feature goes broke or something else come?


1.Serve the public trust
2.Protect the innocent
3.Uphold the law(c)Robocop

Report message to a moderator

Master Sergeant
Re: New feature: profile-independent voicesets[message #349757 is a reply to message #349471] Thu, 11 May 2017 07:20 Go to previous messageGo to next message
Julix is currently offline Julix

 
Messages:105
Registered:June 2010
Location: Canada

Parkan, did you ever sort that out? - Anyone else try it? - The video above isn't loading for me...

Report message to a moderator

Sergeant
Re: New feature: profile-independent voicesets[message #349854 is a reply to message #349757] Sun, 21 May 2017 23:39 Go to previous message
Jakub is currently offline Jakub

 
Messages:40
Registered:January 2014
HI & Hello !

In My INI Ja file looks that :

IMP_MALE_CHARACTER_COUNT = 7

IMP_FEMALE_CHARACTER_COUNT = 3

IMP_MALE_1 = 51
IMP_MALE_2 = 52
IMP_MALE_3 = 53
IMP_MALE_4 = 169
IMP_MALE_5 = 192
IMP_MALE_6 = 193
IMP_MALE_7 = 194
IMP_MALE_8 = 164


(I wish 20 IMPS angry )


; The following are empty in standard JA2 1.13 but do not have full voice sets.

;IMP_MALE_5 = 192
;IMP_MALE_6 = 193
;IMP_MALE_7 = 194
;IMP_MALE_8 = 164

IMP_FEMALE_1 = 54
IMP_FEMALE_2 = 55
IMP_FEMALE_3 = 56

Report message to a moderator

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


Current Time: Thu Nov 28 15:43:13 GMT+2 2024

Total time taken to generate the page: 0.00992 seconds