Jump to content

Sound replacement possible?


TRekNexus

Recommended Posts

Seems like packages like Voice_FemaleVoice1_SF.upk and corresponding voice banks aren't actually used in EW and appear to be EU leftovers. Packages inside Voice folder can be referenced the same way as regular packages:

VoicePackageInfo=(VoiceType=eCharVoice_FemaleSoldier1, Language=5, isMec=false, ArchetypeName="FemaleVoice1_Polish.Voice_FemaleVoice1_Polish")
This example will replace first Russian female voice with Polish female voice.
Link to comment
Share on other sites

  • Replies 199
  • Created
  • Last Reply

Top Posters In This Topic

I can't reproduce the crashing part. :smile:

 

So, I made my own packages and I can hear customization UI sound, but I get speechless soldier at tactical layer.

 

First thing: when I add a bank package to voice package by referencing it inside XComCharacterVoice archetype, the whole bank package gets cooked into voice package. From what I know, it's normal UDK behavior, still, vanilla packages don't have bank references inside voice packages, but everything works perfectly.

 

Second thing: when I do add that bank reference and the whole reference object does get cooked into voice package, game manages to load that package, regardless of the fact, that there are no native serialized binary data for map variable. An interesting thing to see. Tactical soldier is still voiceless, as sounds are not mapped to events. No crashes here, that's what puzzles me, as tracktwo seems to have his game crashed at this point.

 

And finally: when I'm trying to add a new import variable to reference XComCharacterVoiceBank variable game still loads fine, but when I'm adding a serial data for map object it finally crashes.

Edited by wghost81
Link to comment
Share on other sites

OK, I'm an idiot. :smile: Bank names are actually tied to voice packages through VoiceBankNames string. I haven't paid enough attention to tracktwo post and to deserialization errors of my own tool. Sorry for misinformation.

 

So, one mystery is solved. :smile: Bank packages are connected with voice packages through VoiceBankNames array of XComCharacterVoice object. I believe, tracktwo already posted this, but I missed it somehow.

Link to comment
Share on other sites

I was able to play my custom sound in tactical game. Is is not fully functional method, but it confirms that package is indeed loaded and the new sounds are working properly.

 

First, log file shows that UDK created bank gets loaded properly by the reference provided in voice package:

[0029.41] XCom_Content: Loading MaleVoice1_Vulcan for eCharVoice_MaleSoldier1
[0029.41] XCom_Content: Loading package ..\..\XComGame\CookedPCConsole\NewVoices\MaleVoice1_Vulcan_SF.upk(MaleVoice1_Vulcan)
[0029.41] XCom_Content: Loading package ..\..\XComGame\CookedPCConsole\NewVoices\MaleVoice1_Vulcan_Bank0_SF.upk (0 remaining for ..\..\XComGame\CookedPCConsole\NewVoices\MaleVoice1_Vulcan_Bank0_SF.upk)
Game simply ignores the fact that native variable binary data are missing. Well, good for us. :smile:

 

But yet soldier remains speechless, because EventToPropertyMap variable is empty and SoundCue objects aren't connected to any events.

 

Voices are played with XComCharacterVoice.PlaySoundForEvent function. It calls native GetSoundCue(Event) function, which most probably uses EventToPropertyMap to return proper SoundCue reference. Quick and simple. We can't use this quick method, but since all the cues are there, we can bypass native GetSoundCue function and "map" events to SoundCue objects using switch-case. For my experiment I have replaced Cue = GetSoundCue(Event) with Cue = CurrentVoiceBank.Moving to make Moving sound being played for all the events:

 

UPK_FILE=XComGame.upk
OBJECT=XComCharacterVoice.PlaySoundForEvent:AUTO
[REPLACEMENT_CODE]
//Cue = CurrentVoiceBank.Moving
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Moving> 00 01 <XComCharacterVoiceBank.Moving>
//if(Cue != none)
07 [@NoCue] 77 00 <.Cue> 2A 16
//Owner.PlaySound(Cue, true)
19 00 <.Owner> 18 00 <NullRef> 00 1C <Engine.Actor.PlaySound> 00 <.Cue> 27 4A 4A 4A 4A 16
//StreamNextVoiceBank(true)
1C <@StreamNextVoiceBank> 27 16
[#NoCue]
//return
04 0B
//EOS
53

 

Now my test soldier is saying "Live long and prosper" before killing an alien. :smile: He actually says this same phrase for all the other events too, but that's exactly what I was trying to do.

 

switch-case method is obviously slower than just extracting a map entry, so we need to test if this will cause noticeable sound delays. At any rate, this is the only way I see at present to add new voice packages in XCOM.

Link to comment
Share on other sites

Amineri: Yes, the random cues are used in a few places. The customization cue generally uses a random cue to choose between 2 or 3 sounds to play when you select the voice in the customization UI, and the move and dash cues in the sound banks have random cues between two sounds for most of the banks. I believe they did this to have more than 15 move/dash sounds even though there are only 15 banks, likely because they are such common events they wanted more diversity in the sounds that play. No other event I looked at used random nodes.

 

WGhost: That's fantastic that you got the sounds to play in the tactical game with your method! I'm still trying to get them to play natively, but if we can't get it to work that's an excellent back up plan. Congrats!

 

I'm still working on getting custom banks working. When I patch in the native blob of data at the end of the bank, the game always crashes with a de-serialization error saying that it expected to get N bytes of data but only got M. N is the adjusted size of the bank object (object + default property array + native blob), and M is the unadjusted size (object + default property array). So it is either refusing to read the native blob, or it tries to and fails, and therefore only de-serialized the part before the blob.

 

Other things I've tried:

 

  • Editing a real sound bank to change its size to be slightly larger than the true size repros the crash and error log message. That is, male english bank 0 has an archetype of size 0x81f. Change that to 0x820 and it fails the same way I expect.
  • Copying the English bank to the custom (Robotic) bank file name and editing the name table to replace occurrences of English with Robotic (happily, they're the same size!) works. I select my language in the customization screen and can successfully load the tactical game. Only one instance of each sound plays, and its the instance from the english bank I copied. So the game *is* able to load custom banks with custom names and have them work, as long as they're entirely set up correctly.
  • Copying the native blob from the english package to the custom package and adjusting the object size to the expected size (0x81f) does not work, it still crashes with the same error. The object looks fine in UE explorer, except the import indices are slightly different so the mappings are not the same as they would be for english.

 

I'll keep you posted as I try more things and hopefully figure out the problem :smile:

 

 

Link to comment
Share on other sites

Here's the whole switch-case thing:

 

UPK_FILE=XComGame.upk
OBJECT=XComCharacterVoice.PlaySoundForEvent:AUTO
[REPLACEMENT_CODE]
//if(XComOnlineProfileSettings(class'Engine'.static.GetEngine().GetProfileSettings()).Data.bDisableSoldierChatter || XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.m_kDesc.m_bDisableSoldierChatter)
07 [@VoicesEnabled]
84 19 19 2E <Class.XComOnlineProfileSettings>
19 12 20 <Engine.Engine> 0A 00 <Engine.Engine.GetEngine.ReturnValue> 00 1C <Engine.Engine.GetEngine> 16
0A 00 <Engine.Engine.GetProfileSettings.ReturnValue> 00 1B <GetProfileSettings> 16
09 00 <XComOnlineProfileSettings.Data> 00 01 <XComOnlineProfileSettings.Data>
0A 00 <XComOnlineProfileSettingsDataBlob.bDisableSoldierChatter> 00 2D 01 <XComOnlineProfileSettingsDataBlob.bDisableSoldierChatter>
18 7E 00
19 19 19 2E <Class.XComTacticalGRI>
19 12 20 <Engine.Engine>
0A 00 <Engine.Engine.GetCurrentWorldInfo.ReturnValue> 00 1C <Engine.Engine.GetCurrentWorldInfo> 16
09 00 <Engine.WorldInfo.GRI> 00 01 <Engine.WorldInfo.GRI>
09 00 <XComTacticalGRI.m_kBattle> 00 01 <XComTacticalGRI.m_kBattle>
09 00 <XGBattle.m_kDesc> 00 01 <XGBattle.m_kDesc>
0A 00 <XGBattleDesc.m_bDisableSoldierChatter> 00 2D 01 <XGBattleDesc.m_bDisableSoldierChatter> 16
//return
04 0B
[#VoicesEnabled]
//if (CurrentVoiceBank != none)
07 [@Play] 77 01 <@CurrentVoiceBank> 2A 16
//switch(Event)
05 <.Event> 00 00 <.Event>
//case 1:
0A [@case2] 24 <%b 1>
//Cue = CurrentVoiceBank.HunkerDown
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.HunkerDown> 00 01 <XComCharacterVoiceBank.HunkerDown>
//break
06 [@Play]
[#case2]
//case 2:
0A [@case3] 24 <%b 2>
//Cue = CurrentVoiceBank.Reload
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Reload> 00 01 <XComCharacterVoiceBank.Reload>
//break
06 [@Play]
[#case3]
//case 3:
0A [@case4] 24 <%b 3>
//Cue = CurrentVoiceBank.Overwatching
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Overwatching> 00 01 <XComCharacterVoiceBank.Overwatching>
//break
06 [@Play]
[#case4]
//case 4:
0A [@case5] 24 <%b 4>
//Cue = CurrentVoiceBank.Moving
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Moving> 00 01 <XComCharacterVoiceBank.Moving>
//break
06 [@Play]
[#case5]
//case 5:
0A [@case6] 24 <%b 5>
//Cue = CurrentVoiceBank.Dashing
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Dashing> 00 01 <XComCharacterVoiceBank.Dashing>
//break
06 [@Play]
[#case6]
//case 6:
0A [@case7] 24 <%b 6>
//Cue = CurrentVoiceBank.JetPackMove
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.JetPackMove> 00 01 <XComCharacterVoiceBank.JetPackMove>
//break
06 [@Play]
[#case7]
//case 7:
0A [@case8] 24 <%b 7>
//Cue = CurrentVoiceBank.LowAmmo
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.LowAmmo> 00 01 <XComCharacterVoiceBank.LowAmmo>
//break
06 [@Play]
[#case8]
//case 8:
0A [@case9] 24 <%b 8>
//Cue = CurrentVoiceBank.OutOfAmmo
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.OutOfAmmo> 00 01 <XComCharacterVoiceBank.OutOfAmmo>
//break
06 [@Play]
[#case9]
//case 9:
0A [@case10] 24 <%b 9>
//Cue = CurrentVoiceBank.Suppressing
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Suppressing> 00 01 <XComCharacterVoiceBank.Suppressing>
//break
06 [@Play]
[#case10]
//case 10:
0A [@case13] 24 <%b 10>
//Cue = CurrentVoiceBank.AreaSuppressing
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.AreaSuppressing> 00 01 <XComCharacterVoiceBank.AreaSuppressing>
//break
06 [@Play]
[#case13]
//case 13:
0A [@case14] 24 <%b 13>
//Cue = CurrentVoiceBank.FlushingTarget
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.FlushingTarget> 00 01 <XComCharacterVoiceBank.FlushingTarget>
//break
06 [@Play]
[#case14]
//case 14:
0A [@case15] 24 <%b 14>
//Cue = CurrentVoiceBank.HealingAlly
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.HealingAlly> 00 01 <XComCharacterVoiceBank.HealingAlly>
//break
06 [@Play]
[#case15]
//case 15:
0A [@case16] 24 <%b 15>
//Cue = CurrentVoiceBank.StabilizingAlly
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.StabilizingAlly> 00 01 <XComCharacterVoiceBank.StabilizingAlly>
//break
06 [@Play]
[#case16]
//case 16:
0A [@case17] 24 <%b 16>
//Cue = CurrentVoiceBank.RevivingAlly
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.RevivingAlly> 00 01 <XComCharacterVoiceBank.RevivingAlly>
//break
06 [@Play]
[#case17]
//case 17:
0A [@case19] 24 <%b 17>
//Cue = CurrentVoiceBank.CombatStim
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.CombatStim> 00 01 <XComCharacterVoiceBank.CombatStim>
//break
06 [@Play]
[#case19]
//case 19:
0A [@case20] 24 <%b 19>
//Cue = CurrentVoiceBank.FragOut
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.FragOut> 00 01 <XComCharacterVoiceBank.FragOut>
//break
06 [@Play]
[#case20]
//case 20:
0A [@case21] 24 <%b 20>
//Cue = CurrentVoiceBank.SmokeGrenadeThrown
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.SmokeGrenadeThrown> 00 01 <XComCharacterVoiceBank.SmokeGrenadeThrown>
//break
06 [@Play]
[#case21]
//case 21:
0A [@case23] 24 <%b 21>
//Cue = CurrentVoiceBank.SpyGrenadeThrown
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.SpyGrenadeThrown> 00 01 <XComCharacterVoiceBank.SpyGrenadeThrown>
//break
06 [@Play]
[#case23]
//case 23:
0A [@case24] 24 <%b 23>
//Cue = CurrentVoiceBank.FiringRocket
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.FiringRocket> 00 01 <XComCharacterVoiceBank.FiringRocket>
//break
06 [@Play]
[#case24]
//case 24:
0A [@case26] 24 <%b 24>
//Cue = CurrentVoiceBank.GhostModeActivated
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.GhostModeActivated> 00 01 <XComCharacterVoiceBank.GhostModeActivated>
//break
06 [@Play]
[#case26]
//case 26:
0A [@case27] 24 <%b 26>
//Cue = CurrentVoiceBank.JetPackDeactivated
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.JetPackDeactivated> 00 01 <XComCharacterVoiceBank.JetPackDeactivated>
//break
06 [@Play]
[#case27]
//case 27:
0A [@case28] 24 <%b 27>
//Cue = CurrentVoiceBank.ArcThrower
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.ArcThrower> 00 01 <XComCharacterVoiceBank.ArcThrower>
//break
06 [@Play]
[#case28]
//case 28:
0A [@case29] 24 <%b 28>
//Cue = CurrentVoiceBank.RepairSHIV
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.RepairSHIV> 00 01 <XComCharacterVoiceBank.RepairSHIV>
//break
06 [@Play]
[#case29]
//case 29:
0A [@case30] 24 <%b 29>
//Cue = CurrentVoiceBank.Kill
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Kill> 00 01 <XComCharacterVoiceBank.Kill>
//break
06 [@Play]
[#case30]
//case 30:
0A [@case31] 24 <%b 30>
//Cue = CurrentVoiceBank.MultiKill
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.MultiKill> 00 01 <XComCharacterVoiceBank.MultiKill>
//break
06 [@Play]
[#case31]
//case 31:
0A [@case32] 24 <%b 31>
//Cue = CurrentVoiceBank.Missed
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Missed> 00 01 <XComCharacterVoiceBank.Missed>
//break
06 [@Play]
[#case32]
//case 32:
0A [@case33] 24 <%b 32>
//Cue = CurrentVoiceBank.TargetSpotted
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.TargetSpotted> 00 01 <XComCharacterVoiceBank.TargetSpotted>
//break
06 [@Play]
[#case33]
//case 33:
0A [@case34] 24 <%b 33>
//Cue = CurrentVoiceBank.TargetSpottedHidden
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.TargetSpottedHidden> 00 01 <XComCharacterVoiceBank.TargetSpottedHidden>
//break
06 [@Play]
[#case34]
//case 34:
0A [@case35] 24 <%b 34>
//Cue = CurrentVoiceBank.HeardSomething
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.HeardSomething> 00 01 <XComCharacterVoiceBank.HeardSomething>
//break
06 [@Play]
[#case35]
//case 35:
0A [@case36] 24 <%b 35>
//Cue = CurrentVoiceBank.TakingFire
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.TakingFire> 00 01 <XComCharacterVoiceBank.TakingFire>
//break
06 [@Play]
[#case36]
//case 36:
0A [@case37] 24 <%b 36>
//Cue = CurrentVoiceBank.FriendlyKilled
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.FriendlyKilled> 00 01 <XComCharacterVoiceBank.FriendlyKilled>
//break
06 [@Play]
[#case37]
//case 37:
0A [@case38] 24 <%b 37>
//Cue = CurrentVoiceBank.Panic
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Panic> 00 01 <XComCharacterVoiceBank.Panic>
//break
06 [@Play]
[#case38]
//case 38:
0A [@case39] 24 <%b 38>
//Cue = CurrentVoiceBank.PanickedBreathing
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.PanickedBreathing> 00 01 <XComCharacterVoiceBank.PanickedBreathing>
//break
06 [@Play]
[#case39]
//case 39:
0A [@case40] 24 <%b 39>
//Cue = CurrentVoiceBank.Wounded
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Wounded> 00 01 <XComCharacterVoiceBank.Wounded>
//break
06 [@Play]
[#case40]
//case 40:
0A [@case41] 24 <%b 40>
//Cue = CurrentVoiceBank.Died
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Died> 00 01 <XComCharacterVoiceBank.Died>
//break
06 [@Play]
[#case41]
//case 41:
0A [@case42] 24 <%b 41>
//Cue = CurrentVoiceBank.Flanked
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Flanked> 00 01 <XComCharacterVoiceBank.Flanked>
//break
06 [@Play]
[#case42]
//case 42:
0A [@case44] 24 <%b 42>
//Cue = CurrentVoiceBank.Suppressed
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Suppressed> 00 01 <XComCharacterVoiceBank.Suppressed>
//break
06 [@Play]
[#case44]
//case 44:
0A [@case51] 24 <%b 44>
//Cue = CurrentVoiceBank.PsiControlled
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.PsiControlled> 00 01 <XComCharacterVoiceBank.PsiControlled>
//break
06 [@Play]
[#case51]
//case 51:
0A [@case49] 24 <%b 51>
//Cue = CurrentVoiceBank.CivilianRescued
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.CivilianRescued> 00 01 <XComCharacterVoiceBank.CivilianRescued>
//break
06 [@Play]
[#case49]
//case 49:
0A [@case50] 24 <%b 50>
//Cue = CurrentVoiceBank.MeldSpotted
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.MeldSpotted> 00 01 <XComCharacterVoiceBank.MeldSpotted>
//break
06 [@Play]
[#case50]
//case 50:
0A [@case57] 24 <%b 50>
//Cue = CurrentVoiceBank.MeldCollected
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.MeldCollected> 00 01 <XComCharacterVoiceBank.MeldCollected>
//break
06 [@Play]
[#case57]
//case 57:
0A [@case70] 24 <%b 57>
//Cue = CurrentVoiceBank.RunAndGun
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.RunAndGun> 00 01 <XComCharacterVoiceBank.RunAndGun>
//break
06 [@Play]
[#case70]
//case 70:
0A [@case52] 24 <%b 70>
//Cue = CurrentVoiceBank.GrapplingHook
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.GrapplingHook> 00 01 <XComCharacterVoiceBank.GrapplingHook>
//break
06 [@Play]
[#case52]
//case 52:
0A [@case53] 24 <%b 52>
//Cue = CurrentVoiceBank.AlienRetreat
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.AlienRetreat> 00 01 <XComCharacterVoiceBank.AlienRetreat>
//break
06 [@Play]
[#case53]
//case 53:
0A [@case54] 24 <%b 53>
//Cue = CurrentVoiceBank.AlienMoving
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.AlienMoving> 00 01 <XComCharacterVoiceBank.AlienMoving>
//break
06 [@Play]
[#case54]
//case 54:
0A [@case55] 24 <%b 54>
//Cue = CurrentVoiceBank.AlienNotStunned
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.AlienNotStunned> 00 01 <XComCharacterVoiceBank.AlienNotStunned>
//break
06 [@Play]
[#case55]
//case 55:
0A [@case56] 24 <%b 55>
//Cue = CurrentVoiceBank.AlienReinforcements
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.AlienReinforcements> 00 01 <XComCharacterVoiceBank.AlienReinforcements>
//break
06 [@Play]
[#case56]
//case 56:
0A [@case60] 24 <%b 56>
//Cue = CurrentVoiceBank.AlienSighting
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.AlienSighting> 00 01 <XComCharacterVoiceBank.AlienSighting>
//break
06 [@Play]
[#case60]
//case 60:
0A [@case64] 24 <%b 60>
//Cue = CurrentVoiceBank.DisablingShot
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.DisablingShot> 00 01 <XComCharacterVoiceBank.DisablingShot>
//break
06 [@Play]
[#case64]
//case 64:
0A [@case66] 24 <%b 64>
//Cue = CurrentVoiceBank.ShredderRocket
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.ShredderRocket> 00 01 <XComCharacterVoiceBank.ShredderRocket>
//break
06 [@Play]
[#case66]
//case 66:
0A [@case67] 24 <%b 66>
//Cue = CurrentVoiceBank.PsionicsMindfray
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.PsionicsMindfray> 00 01 <XComCharacterVoiceBank.PsionicsMindfray>
//break
06 [@Play]
[#case67]
//case 67:
0A [@case68] 24 <%b 67>
//Cue = CurrentVoiceBank.PsionicsPanic
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.PsionicsPanic> 00 01 <XComCharacterVoiceBank.PsionicsPanic>
//break
06 [@Play]
[#case68]
//case 68:
0A [@case69] 24 <%b 68>
//Cue = CurrentVoiceBank.PsionicsInspiration
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.PsionicsInspiration> 00 01 <XComCharacterVoiceBank.PsionicsInspiration>
//break
06 [@Play]
[#case69]
//case 69:
0A [@case73] 24 <%b 69>
//Cue = CurrentVoiceBank.PsionicsTelekineticField
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.PsionicsTelekineticField> 00 01 <XComCharacterVoiceBank.PsionicsTelekineticField>
//break
06 [@Play]
[#case73]
//case 73:
0A [@case74] 24 <%b 73>
//Cue = CurrentVoiceBank.SoldierControlled
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.SoldierControlled> 00 01 <XComCharacterVoiceBank.SoldierControlled>
//break
06 [@Play]
[#case74]
//case 74:
0A [@case75] 24 <%b 74>
//Cue = CurrentVoiceBank.StunnedAlien
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.StunnedAlien> 00 01 <XComCharacterVoiceBank.StunnedAlien>
//break
06 [@Play]
[#case75]
//case 75:
0A [@case76] 24 <%b 75>
//Cue = CurrentVoiceBank.Explosion
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Explosion> 00 01 <XComCharacterVoiceBank.Explosion>
//break
06 [@Play]
[#case76]
//case 76:
0A [@case77] 24 <%b 76>
//Cue = CurrentVoiceBank.RocketScatter
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.RocketScatter> 00 01 <XComCharacterVoiceBank.RocketScatter>
//break
06 [@Play]
[#case77]
//case 77:
0A [@case78] 24 <%b 77>
//Cue = CurrentVoiceBank.PsiRift
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.PsiRift> 00 01 <XComCharacterVoiceBank.PsiRift>
//break
06 [@Play]
[#case78]
//case 78:
0A [@case79] 24 <%b 78>
//Cue = CurrentVoiceBank.Poisoned
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Poisoned> 00 01 <XComCharacterVoiceBank.Poisoned>
//break
06 [@Play]
[#case79]
//case 79:
0A [@case80] 24 <%b 79>
//Cue = CurrentVoiceBank.HiddenMovement
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.HiddenMovement> 00 01 <XComCharacterVoiceBank.HiddenMovement>
//break
06 [@Play]
[#case80]
//case 80:
0A [@case82] 24 <%b 80>
//Cue = CurrentVoiceBank.HiddenMovementVox
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.HiddenMovementVox> 00 01 <XComCharacterVoiceBank.HiddenMovementVox>
//break
06 [@Play]
[#case82]
//case 82:
0A [@case83] 24 <%b 82>
//Cue = CurrentVoiceBank.ExaltChatter
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.ExaltChatter> 00 01 <XComCharacterVoiceBank.ExaltChatter>
//break
06 [@Play]
[#case83]
//case 83:
0A [@case25] 24 <%b 83>
//Cue = CurrentVoiceBank.Strangled
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Strangled> 00 01 <XComCharacterVoiceBank.Strangled>
//break
06 [@Play]
[#case25]
//case 25:
0A [@case43] 24 <%b 25>
//Cue = CurrentVoiceBank.CollateralDamage
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.CollateralDamage> 00 01 <XComCharacterVoiceBank.CollateralDamage>
//break
06 [@Play]
[#case43]
//case 43:
0A [@case45] 24 <%b 43>
//Cue = CurrentVoiceBank.ElectroPulse
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.ElectroPulse> 00 01 <XComCharacterVoiceBank.ElectroPulse>
//break
06 [@Play]
[#case45]
//case 45:
0A [@case46] 24 <%b 45>
//Cue = CurrentVoiceBank.Flamethrower
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.Flamethrower> 00 01 <XComCharacterVoiceBank.Flamethrower>
//break
06 [@Play]
[#case46]
//case 46:
0A [@case47] 24 <%b 46>
//Cue = CurrentVoiceBank.JetBoots
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.JetBoots> 00 01 <XComCharacterVoiceBank.JetBoots>
//break
06 [@Play]
[#case47]
//case 47:
0A [@case48] 24 <%b 47>
//Cue = CurrentVoiceBank.KineticStrike
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.KineticStrike> 00 01 <XComCharacterVoiceBank.KineticStrike>
//break
06 [@Play]
[#case48]
//case 48:
0A [@case58] 24 <%b 48>
//Cue = CurrentVoiceBank.OneForAll
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.OneForAll> 00 01 <XComCharacterVoiceBank.OneForAll>
//break
06 [@Play]
[#case58]
//case 58:
0A [@default] 24 <%b 58>
//Cue = CurrentVoiceBank.ProximityMine
0F 00 <.Cue> 19 01 <@CurrentVoiceBank> 09 00 <XComCharacterVoiceBank.ProximityMine> 00 01 <XComCharacterVoiceBank.ProximityMine>
//break
06 [@Play]
[#default]
//default:
0A FF FF
//break
06 [@Play]
[#Play]
//if(Cue != none)
07 [@NoCue] 77 00 <.Cue> 2A 16
//Owner.PlaySound(Cue, true)
19 00 <.Owner> 18 00 <NullRef> 00 1C <Engine.Actor.PlaySound> 00 <.Cue> 27 4A 4A 4A 4A 16
//StreamNextVoiceBank(true)
1C <@StreamNextVoiceBank> 27 16
[#NoCue]
//return
04 0B
//EOS
53

 

 

Seems to work properly. No need for event map, UDK packages are working directly without additional editing. Haven't noticed any delays while playing voices and I have an old PC.

Link to comment
Share on other sites

I am an idiot. Again. :smile:

 

I know why inserting an import entry to cooked bank package crashes the game. That's because it shifts ogg data references for sound nodes. And updating all those references will be a real pain, so it is safe to say we won't be able to add hand-made event table to new packages.

Link to comment
Share on other sites

In my cooked package, the ogg data all occurs before the bank object. As long as I don't add anything to the tables, the ogg data doesn't shift so it should still work. I had to do some funny business to get the cook process to add all the needed XComCharacterVoiceBank variables into the import table so I didn't need to add them later with patchupk, though. This basically involved creating a dummy script that just assigned each cue variable in the XComCharacterVoiceBank to a dummy local variable. That script is never called, but it was enough to cause all the needed variables to be referenced so they all show up in the import table.

 

Still no joy, though. It really doesn't want to read my native table for some reason. But your solution will work, and doesn't rely on any voice bank post-processing, or weird script requirements to force-import all the locals, so it might be even better than using the native blob!

Link to comment
Share on other sites

Here it is. You need to put this in a package that's listed as being an editor package, but not as a native package in the packagestoalwayscook section, compile it, and then create an archetype of its type to add to your voice bank. That will force it to be included in the cooked package, but since the "Junk" class isn't part of any cooked package it has to directly include it in the bank instead of just referencing the cooked package. Still doesn't work though :smile:

 

One thing I noticed is there are extra properties in the stock cues but not in mine. SoundClass and SoundClassName. Next I'll experiment with adding properties to the cues to see if that helps. They seem to be xcom specific.

 

 

 

class Junk extends object;



function Junk()

{
    local SoundCue c;
    local XComCharacterVoiceBank b;

    c = b.HunkerDown;

    c = b.Reload;

    c = b.Overwatching;

    c = b.Moving;

    c = b.Dashing;

    c = b.JetPackMove;

    c = b.LowAmmo;

    c = b.OutOfAmmo;

    c = b.Suppressing;

    c = b.AreaSuppressing;

    c = b.FlushingTarget;

    c = b.HealingAlly;

    c = b.StabilizingAlly;

    c = b.RevivingAlly;

    c = b.CombatStim;

    c = b.FragOut;

    c = b.SmokeGrenadeThrown;

    c = b.SpyGrenadeThrown;

    c = b.FiringRocket;

    c = b.GhostModeActivated;

    c = b.JetPackDeactivated;

    c = b.ArcThrower;

    c = b.RepairSHIV;

    c = b.Kill;

    c = b.MultiKill;

    c = b.Missed;

    c = b.TargetSpotted;

    c = b.TargetSpottedHidden;

    c = b.HeardSomething;

    c = b.TakingFire;

    c = b.FriendlyKilled;

    c = b.Panic;

    c = b.PanickedBreathing;

    c = b.Wounded;

    c = b.Died;

    c = b.Flanked;

    c = b.Suppressed;

    c = b.PsiControlled;

    c = b.CivilianRescued;

    c = b.MeldSpotted;

    c = b.MeldCollected;

    c = b.RunAndGun;

    c = b.GrapplingHook;

    c = b.AlienRetreat;

    c = b.AlienMoving;

    c = b.AlienNotStunned;

    c = b.AlienReinforcements;

    c = b.AlienSighting;

    c = b.DisablingShot;

    c = b.ShredderRocket;

    c = b.PsionicsMindfray;

    c = b.PsionicsPanic;

    c = b.PsionicsInspiration;

    c = b.PsionicsTelekineticField;

    c = b.SoldierControlled;

    c = b.StunnedAlien;

    c = b.Explosion;

    c = b.RocketScatter;

    c = b.PsiRift;

    c = b.Poisoned;

    c = b.HiddenMovement;

    c = b.HiddenMovementVox;

    c = b.ExaltChatter;

    c = b.Strangled;

    c = b.CollateralDamage;

    c = b.ElectroPulse;

    c = b.Flamethrower;

    c = b.JetBoots;

    c = b.KineticStrike;

    c = b.OneForAll;

    c = b.ProximityMine;

}

 

 

Edited by tracktwo
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...