Jump to content

Sound replacement possible?


TRekNexus

Recommended Posts

@dubious Uh yes, CombatMusicCues="Pic_BossFight.Pic_BossFight_Cue" would be more consistent. I'm pretty new to the UDK too xD Most of this steps are easely made than done. Instead of rightclicking on the content browser and selecting "new soundnodewave" in the menu , pressing the NEW button near the IMPORT has the same effect, but you have to set the Factory field to "soundnodewave". This creates an empty soundnodewave and soundnodewave_cue. IMPORT loads the WAV in the UDK. You could name the soundnodewave anyway you like as long as the Cue has the right one.

We could put as an example some other combat music name instead of my deus ex examples, if you think it would be easier to understand.

CombatMusicCues="CombatMusic42.ActionMusic42Cue"
Link to comment
Share on other sites

  • Replies 199
  • Created
  • Last Reply

Top Posters In This Topic

Here's a list of the music packages I modified with the file names within each package. Could be good to have around so people don't need to decompress the upk's themselves to find out what they are. If I understand right it's just the cue name that needs to be exactly the same? Anyways I included the wav file names as well just in case.

 

[Combat Music / "Battlescape"]

 

CombatMusic1_SF.upk:

ActionMusic1Cue (cue file)

CombatMusic1 (wav file)

 

CombatMusic2_SF.upk:

ActionMusic2Cue (cue file)

CombatMusic2 (wav file)

(the rest have the same naming, only thing that differs is the numbers)
[XCom Base Music / "Geoscape"]
HQSound_Act1Music_SF.upk:
HQSoundtrackAct1Cue (cue file)

HQ1McCann (wav file)

 

HQSound_Act2Music_SF.upk:
HQSoundtrackAct2Cue (cue file)

HQ2McCann (wav file)

 

HQSound_Act3Music_SF.upk:
HQSoundtrackAct3Cue (cue file)

HQ3McCann (wav file)

 

 

[Air Battle Music / Intercept Music]

 

HQSound_InterceptionMusic_SF.upk:

InterceptionMusicCue (cue file)

McCannInterceptionMusic (wav file)

 

 

[soldier Select / Mission Prepare Music]

 

HQSound_SoldierSelect_SF.upk:

ReadyForBattleMusicCue (cue file)

ReadyForBattleMusic (wav file)

Link to comment
Share on other sites

 

@dubious Uh yes, CombatMusicCues="Pic_BossFight.Pic_BossFight_Cue" would be more consistent.

Good, article updated. As long as the description conforms to the illustrating image, the actual names don't really matter. Just trying to eliminate possible points of confusion.

 

Right now you are one of our primary "guinea pigs" with the UDK. Every little bit of usage you discover helps someone else get further into it. Slowly but surely it all builds up. Heck, we didn't even have a wiki in early 2013.

 

 

@TRekNexus: Thanks. Added to the article.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

An update on better organizing/configuring new voice files.

 

Unreal Engine supports incremental changes to configuration files, as I'm sure some people on the forum are aware.

 

Basically what happens is that on launch the Unreal Engine starts with the "Default<type>.ini" file located in the XComGame/Config folder, and then merges additional config data located in "XCom<type>.ini" config files that can be in any other subfolder within the XComGame folder.

 

As an example, I created a new "Long War Voices" folder which I put in the CookedPCConsole folder (analgous to the vanilla Voices folder). So far we have "testing files" which are :

  • MaleVoice1_Australian_Bank0_SF.upk
  • MaleVoice1_Australian_SF.upk
  • MaleVoice1_British_Bank0_SF.upk
  • MaleVoice1_British_SF.upk

Note that these aren't complete voices (complete ones like vanilla have 15 banks per voice), but are valid for testing purposes.

 

I configured these (along with some hex mods which I'm working on making generally usable with only config file changes) by creating a NEW "XComContent.ini" file in the "Long War Voices" folder.

 

This file contains :

; add Voice Banks
[XComGame.XComContentManager]
;;;;;;;;;;;;;;;;;;; British (7) ;;;;;;;;;;;;;;;;;;;
;male soldier
+VoicePackageInfo=(VoiceType=eCharVoice_MaleSoldier1, Language=7, isMec=false, ArchetypeName="MaleVoice1_British.Voice_MaleVoice1_British")

;;;;;;;;;;;;;;;;;;; Australian (8) ;;;;;;;;;;;;;;;;;;;
;male soldier
+VoicePackageInfo=(VoiceType=eCharVoice_MaleSoldier1, Language=8, isMec=false, ArchetypeName="MaleVoice1_Australian.Voice_MaleVoice1_Australian")

Note the prefixed '+' symbol preceding each line, which indicates the UE launcher that the lines are to be appended to the merged XComContent.ini file that is put in the My Games folder. No changes were made to the DefaultContent.ini folder in the XComGame/Config folder at all.

 

The resultant merged XComContent.ini in the My Games folder has the following VoicePackageInfo section :

 

 

VoicePackageInfo=(VoiceType=eCharVoice_FemaleSoldier1_Brash,ArchetypeName="Voice_AnnetteVoice1.AnnetteVoice1")
VoicePackageInfo=(VoiceType=eCharVoice_MaleBlueshirt1,ArchetypeName="Voice_BSMVoice1.BSMVoice1")
VoicePackageInfo=(VoiceType=eCharVoice_FemaleBlueshirt1,ArchetypeName="Voice_BSFVoice1.BSFVoice1")
VoicePackageInfo=(VoiceType=eCharVoice_MaleSoldier1, Language=7, isMec=false, ArchetypeName="MaleVoice1_British.Voice_MaleVoice1_British")
VoicePackageInfo=(VoiceType=eCharVoice_MaleSoldier1, Language=8, isMec=false, ArchetypeName="MaleVoice1_Australian.Voice_MaleVoice1_Australian")

 

 

 

This has appended the additional VoicePackage info onto the voices defined in DefaultContent.ini.

 

Launching the game, the new voices are available in the StrategyGame customize UI and play properly.

Link to comment
Share on other sites

Yup and *THAT* means... Japanese (Kanji) & Chinese (Mandarin) & any others (Arabic?? ) could be added as well.

Customization power to the people. :smile:

Edited by Zyxpsilon
Link to comment
Share on other sites

@Amineri: Thanks. Added to the article.

 

@Zyxpsilon: These are for voices, so: Japanese, yes. "Kanji" is a written script form (one of three in common use in Japan), so no. (Don't want to confuse anyone.) The written text would be implemented via the INT files. But agreed, this is "customization power to the people" indeed.

 

-Dubious-

Link to comment
Share on other sites

Some more notes regarding "single hex change" to enable flexible configuration of additional voices :

 

Working with Tracktwo, and borrowing from all the great work done before, I think we've assembled a set of hex changes that defines pretty much every possible language desired into a single set of hex/localization changes.

 

Here's the set of languages and language values that are being proposed :

 

 

m_arrLanguages[0]="American English"
m_arrLanguages[1]="French"
m_arrLanguages[2]="German"
m_arrLanguages[3]="Italian"
m_arrLanguages[4]="Polish"
m_arrLanguages[5]="Russian"
m_arrLanguages[6]="Spanish"
m_arrLanguages[7]="British English"
m_arrLanguages[8]="Australian English"
m_arrLanguages[9]="Scottish"
m_arrLanguages[10]="Irish"
m_arrLanguages[11]="South African"
m_arrLanguages[12]="Canadian"
m_arrLanguages[13]="Chinese"
m_arrLanguages[14]="Japanese"
m_arrLanguages[15]="Hindi"
m_arrLanguages[16]="Korean"
m_arrLanguages[17]="Bosnian"
m_arrLanguages[18]="Hebrew"
m_arrLanguages[19]="Egyptian"
m_arrLanguages[20]="Brazilian"
m_arrLanguages[21]="UNUSED"
m_arrLanguages[22]="Mexican"
m_arrLanguages[23]="Ukrainian"
m_arrLanguages[24]="Nigerian"
m_arrLanguages[25]="Argentinian"
m_arrLanguages[26]="Greek"
m_arrLanguages[27]="Honduran"
m_arrLanguages[28]="Swedish"
m_arrLanguages[29]="Norwegian"
m_arrLanguages[30]="Dutch"
m_arrLanguages[31]="Belgian"
m_arrLanguages[32]="UNUSED"
m_arrLanguages[33]="UNUSED"
m_arrLanguages[34]="UNUSED"
m_arrLanguages[35]="UNUSED" 

 

 

 

The first 7 languages are the vanilla languages, unchanged. The total number of languages is 36, with five of them unused and reserved for future use. That means 22 new languages are defined. Some of these may never see a voice pack created for them, but I thought I'd include them for the sake of completeness (e.g. "Canadian" is defined as a separate 'language' in case someone wants to create special voice packs for canadian soldiers).

 

How the system works :

 

1) The native GetPossibleVoices function was rewritten in unrealscrip so that it works properly for female voices with new languages

2) The customization UI spinner will only show languages that have voices configured, accounting for gender/mec (e.g. if a Japanese male soldier voice is added, female soldier/mecs won't show Japanese in the spinner)

3) With the language option turned on, newly created soldiers (on campaign start or hired/FC Reward/Abduction Reward) will attempt to use the particular language for their country. If no voices are configured (again considering gender/mec), the language will default to the vanilla cases (e.g. UK/Canada/etc will default to American English)

 

Eventually this will get folded into Long War, which will allow easier "end-user" configuration of voice banks for users of the mod. Once the code is stable enough I'd expect a standalone version compatible with PatchGUI to be developed.

 

For developer reference, here's the complete set of functions that ended up being modded :

  • XComCharacterVoice.PlaySoundForEvent -- builds mapping of ECharacterSpeech to SoundCue into unrealscript to work around inability to build native code into new UDK voice banks
  • XComContentManager.GetPossibleVoices -- rebuilt native function into unrealscript to fix issue with female voices always returning 6 possible voices regardless of configuration
  • XGCharacterGenerator.CreateTSoldier -- modified so newly created soldiers will attempt to use new languages, but default to others if no voices are defined
  • XGCharacterGenerator.GetLanguageByCountry -- rewritten to provide mapping from country to extended language set
  • XGCharacterGenerator.GetNextMaleVoice/GetNextFemaleVoice -- modified to return status about available languages for use in CreateTSoldier
  • XGCharacterGenerator.m_aLastMaleVoice/m_aLastFemaleVoice -- array size extended from 7 to 36 to support extended language set
  • XGGameData.ECharacterLanguage -- enum extended from 7 to 36 to support extended language set
  • XGCustomizeUI.AdvanceLanguage -- rewritten to loop over all possible languages (36), but skip any languages without voices defined

 

Note that the UNUSED languages can have voices defined (and presumable the XComStrategyGame.int modified) and such language will show up in the customize UI with no further hex changes, but will not be automatically assigned to newly created soldiers based on nationality.

 

 

----------------------------

 

P.S. I fairly quickly put together the list of "Language Names", so please don't go crazy. I recognize for example that Argentinian isn't a completely distinct language, but I'm not sure if "Rioplatenese Spanish" will fit within the spinner in the Customization UI, plus it made it easier for me to work out the switch/case statements while I was working. There's still some more experimentation to do in regarding language naming :smile:

Link to comment
Share on other sites

Oh - but, i'll sure go crazy!

 

Canadian (From Québec, if you shall be aware of such a tricky precision) here. We all live in a superb and vast bilingual country. Quebec French, the rest of Canada mostly English.

Don't want to start a political debate over anything. It's just that even within the pool of Troopers from Canada, both distinct cultures are represented. I normally get the reflex to simply switch the custom number(s) once i realize a fellow Quebecer has been recruited while Joe from Ontario certainly keeps his very own precious briton accent.

 

Not asking for two different slots... it's just a weird effect of our complex history since 1867 -- or less.

 

Move along. Everything is alright. :D

 

PS; Saudi-Arabia got the shaft with the inclusion of Poland for EW expansion. While Turkey and Columbia used to be Bosnia and Honduras. Kenya, Portugal, Venezuela and Zimbabwe even once barely skimmed the sharp edge of probabilities, i gather.

But you sure knew all about that tricky bunch of decisions by Firaxis staff, right?

Yet... -- ,,

Edited by Zyxpsilon
Link to comment
Share on other sites

  • 4 weeks later...

Okay, I got it working. I've replaced the combat tracks, "geoscape" tracks, mission soldier select, and intercept track with the PSX Ufo Enemy Unknown music so far. The only music track that didn't want to play the replaced music is the main menu track. But no biggie. I'll be posting this on the mod page soon-ish. It plays pretty seamlessly with the original tracks too. Sweet!

 

Thanks again for the help guys :smile: LiQuid911's step-by-step is good material for the tutorial/wiki page, no?

 

EDIT: Hmm, I don't actually have permission from the copyright holders to re-distribute these files in a mod. Will I get myself banned if I do?

Did you ever get around to replacing the music with the free remixed versions of the UFO Defense soundtrack? I'd love to get my hands on a mod that did that.

Link to comment
Share on other sites

Distributing mods with contents for which you don't own the copyright is tricky. Even if the content is basically freely available (and I'm not sure of the status of the UFO defense music) that doesn't mean anyone else has the right to redistribute it. The best chance for a music mod is one with original music that the author owns the copyright on, otherwise express permission is needed for nexus.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...