Jump to content

Sound replacement possible?


TRekNexus

Recommended Posts

Ah, I found the problem. I had incorrectly applied the patch from Amineri to fix the meld spotted issue, which corrupted the structure of the switch statement. It only crashed when trying to play events that occured further down the list from meld spotted. I noticed this when it crashed consistenly when I tried to use RunAndGun, and looking at the function in UE explorer it decompiled with a weird jump in the middle of the switch. Fixed now :)

Link to comment
Share on other sites

  • Replies 199
  • Created
  • Last Reply

Top Posters In This Topic

Seems, we have another problem: voice bank packages are not loaded in tactical layer for females.

 

I have created a new language called "Ghost" and made my custom packages with my own recorded voice. When I assign this package to female, customization sound plays, but banks are not loaded in tactical layer and soldier is voiceless. When I assign the exact same package to male, it works.

Link to comment
Share on other sites

Thanks Drakous79 :)

 

Do you see anything in the log file, WGhost? For males it usually logs a line about loading a particular bank, do you see anything at all that would point in the right direction? Does force-loading the bank packages in the .ini file help? It could be that the content manager is hardcoded for females - it certainly seemed that way for returning the voice lists always with 6 elements. Also, have you tried using your bank in one of the existing languages instead of a new one? I believe you mentioned before you did successfully swap two existing languages.

Link to comment
Share on other sites

Yes, I just tried. Results are not encouraging: female voices seem to be hard-coded.

 

I tried replacing English voice with my voice:

VoicePackageInfo=(VoiceType=eCharVoice_FemaleSoldier1, Language=0, isMec=false, ArchetypeName="FemaleVoice1_Ghost.Voice_FemaleVoice1_Ghost")
Got myself on strategy layer, but default English voice on tactical.

 

Then I replaced English voice with Polish voice:

VoicePackageInfo=(VoiceType=eCharVoice_FemaleSoldier1, Language=0, isMec=false, ArchetypeName="FemaleVoice1_Polish.Voice_FemaleVoice1_Polish")
Got Polish on strategy, but English on tactical.

 

Seems like I'll need to learn disassembling after all. :smile:

Edited by wghost81
Link to comment
Share on other sites

Found the bug. For whatever reason voice index was set to 2 instead of 1. Three times in a row. I can't explain it, I'm sure I haven't misclicked. I was altering a language only and I haven't touched voice number (number 1 is set by default). I was getting correct customization voice (#1), but tactical game was in fact trying to load #2 voice. That's why I was getting no voice for new language (none was defined in my case) and English voice for English language (#2 was used instead of #1). I'm trying to reproduce this bug, but I can't. Edited by wghost81
Link to comment
Share on other sites

OK, I was able to reproduce the bug and it is consistent.

 

In my game the soldier I was experimenting with were originally assigned English Female #2 voice. I changed the English language to newly added Ghost language, voice number #1 was shown and sample #1 was played, but since I haven't actually touched the controls for voice number, only language index was saved and voice index wasn't updated for the character. This wasn't the issue with male voices, as engine returns correct max available voices number for males and index probably got auto-clamped to bounds.

 

Anyway, after changing a language you must change voice number to make sure it gets saved properly. Vanilla bug, I don't know if it can be fixed by force-saving all the values when exiting customization screen. Probably involves actionscript magic, I know very little about. :smile:

Link to comment
Share on other sites

Anyway, after changing a language you must change voice number to make sure it gets saved properly. Vanilla bug, I don't know if it can be fixed by force-saving all the values when exiting customization screen. Probably involves actionscript magic, I know very little about. :smile:

I doubt that fiddling around with the Flash UI would help here. The ActionScript setup for the soldier customization menu is super generic, its 'widget helpers' are for display and interaction purposes only, the actual logic resides in the UnrealScript classes UISoldierCustomize for setting up the helpers and handling input callbacks (i.e. the front-end part) as well as XGCustomizeUI which deals with manipulating the underlying data model (i.e. the back-end).

 

In particular the function XGCustomizeUI.AdvanceLanguage() should be of interest here as it handles the language selection and automatically assigns the first member of what the content manager deems 'possible voices':

	XComContentManager(class'Engine'.static.GetEngine().GetContentManager())
		.GetPossibleVoices(byte(m_kSoldier.m_kSoldier.kAppearance.iGender),
				NewLanguage, m_kSoldier.IsAugmented(), m_kPawn.PossibleVoices);
	m_kPawn.SetVoiceSilently(m_kPawn.PossibleVoices[0]);
(sorry for the indentation, that's a pretty long line there)

 

As it was already mentioned that determining the possible voices for female soldiers is bugged, it seems this applies to the indexing of voices as well, i.e. voice #2 is internally referred as the first possible voice and the UI doesn't properly reflect that.

Edited by XMarksTheSpot
Link to comment
Share on other sites

Although AdvanceLanguage appears to be setting a new voice with m_kPawn.SetVoiceSilently(m_kPawn.PossibleVoices[0]) call, for whatever reason actual voice number doesn't get changed until you click the arrow.

 

I have recorded my own awful voice, created a complete voice bank and tested it in game. Everything seems to work fine both for males and females both on strategy and tactical maps.

 

I used Audacity for recording, it was pretty simple and fast. I normalized all the sounds to 0 dB with Audacity and set volume multiplier of sound cue to 1.0. I got in game new sound volume roughly the same as original sounds volume. Overall quality is bad, because I have a simple cheap microphone and not a pro at recording. :smile:

 

Sounds can be tested with console command:

SoldierSpeak Speech
Where Speech is a ECharacterSpeech enum string without eCharSpeech_. Example:

SoldierSpeak Moving
I was also able to make a random cue with UDK cue editor and it was played fine in game, selecting one of the three sounds randomly. Edited by wghost81
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...