Jump to content

Recommended Posts

  • Replies 199
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Unlock sound cues and data are stored in SoundStrategyCollection_SF.upk. SoundStrategyUI.UnlockItemCue has multiplier set to 1, instead of default 0.75. I tried to change it, but I hear no difference:

 

UPK_FILE=SoundStrategyCollection_SF.upk

ALIAS=NewVolume:<%f 0.5>

OBJECT=SoundStrategyUI.NewFacilityUnlockedCue
FIND_CODE=<VolumeMultiplier> <FloatProperty> <%u 4> <%u 0>:END
MODDED_CODE=<!NewVolume>

OBJECT=SoundStrategyUI.NewFoundryProjectUnlockedCue
FIND_CODE=<VolumeMultiplier> <FloatProperty> <%u 4> <%u 0>:END
MODDED_CODE=<!NewVolume>

OBJECT=SoundStrategyUI.UnlockItemCue
FIND_CODE=<VolumeMultiplier> <FloatProperty> <%u 4> <%u 0>:END
MODDED_CODE=<!NewVolume>

OBJECT=SoundStrategyUI.UnlockObjectiveCue
FIND_CODE=<VolumeMultiplier> <FloatProperty> <%u 4> <%u 0>:END
MODDED_CODE=<!NewVolume>

 

Will continue my investigation.

Posted (edited)

LiQuiD911: I still owe you the patch details to make the combat music customizable. Here's the PatchUPK modfile:

MOD_NAME=Combat Music Config Enabler
AUTHOR=Tracktwo
DESCRIPTION=Allows setting customized combat music packages from DefaultContent.ini
Version: 1.0
Compatible with XCOM Enemy Within versions:
- all
UPK_FILE=XComGame.upk


// Make XComTacticalSoundManager Config(Content)
OBJECT=XComTacticalSoundManager
[BEFORE_CODE]
12 00 80 00 <Class.Core.Object> <None>
[AFTER_CODE]
16 00 80 00 <Class.Core.Object> <Content>

// Change XComTacticalSoundManager.CombatMusicCues from array<string> to config array<config string>
OBJECT=XComTacticalSoundManager.CombatMusicCues
FIND_HEX=00 00 40 00
MODDED_HEX= 00 40 40 00

OBJECT=XComTacticalSoundManager.CombatMusicCues.CombatMusicCues
FIND_HEX=00 00 40 00
MODDED_HEX= 00 40 40 00

After this you can add this section to defaultcontent.ini to set the combat music to the defaults. Change or add any element to the array to add more music or remove tracks.

[XComGame.XComTacticalSoundManager]
CombatMusicCues="CombatMusic1.ActionMusic1Cue"
CombatMusicCues="CombatMusic2.ActionMusic2Cue"
CombatMusicCues="CombatMusic3.ActionMusic3Cue"
CombatMusicCues="CombatMusic4.ActionMusic4Cue"
CombatMusicCues="CombatMusic5.ActionMusic5Cue"
CombatMusicCues="CombatMusic6.ActionMusic6Cue"
CombatMusicCues="CombatMusic7.ActionMusic7Cue"
CombatMusicCues="CombatMusic8.ActionMusic8Cue"
CombatMusicCues="CombatMusic9.ActionMusic9Cue"
Edited by tracktwo
Posted (edited)

I found the reason for unlock sound being so loud: it gets indeed stacked and amplified. UIDialogueBox calls for Realize() function each time a dialog gets added or removed. So, when 10 items are unlocked by one research, 10 dialog boxes get added simultaneously and 10 sounds are played at once, resulting in ridiculously loud "fanfare". As far as I can tell, no other important dialog uses "play sound when shown" functionality, so I simply disabled it:

 

UPK_FILE=XComGame.upk

OBJECT=UIDialogueBox.Realize
FIND_HEX=07 78 01 77 35 FD 08 00 00 06 09 00 00 00 00 00 26 09 00 00 2A 16
MODDED_HEX=06

 

This results in no "fanfare" played at all. But by adding PlaySound call to some place else, we can restore "fanfare" and make it play only once.

 

UPD: Can add PlaySound to XGResearchUI.OnLeaveReport, where all the unlocks are processed, but it has so-o-o many jumps, I kinda lazy to do it. :smile: Besides, I'm quite happy with no fanfare sound being played at all. :smile:

Edited by wghost81
Posted

Cool, that's great. I've been digging through this code but for some reason I can't easily search XComStrategyGame in UE explorer, so it's hard to find things. I did notice that XGMissionControlUI.OnAlertInput seems to be the place that handles clicking on the first "research complete" dialog. That's case 28, which jumps to the lab facility. I can't recall right now the order in which the dialogs appear here, but that or near there might be the right spot to insert the fanfare sound.

Posted
tracktwo, you can skip Geoscape research alert and view the result later, so the right place to insert sound will be inside a report itself. At any rate, both functions have too many jump offsets for my taste. :smile:
Posted
That's true... There must be a hook to trigger loading the report the next time you enter the labs, but I haven't seen it yet because its difficult to navigate around in UE explorer. I still don't know why ctrl-shift-f only seems to give me results in xcomgame.upk and not in xcomstrategygame.upk.
Posted (edited)
XGResearchUI.OnLeaveReport is responsible for creating a message boxes for unlocked items/facilities/mods and UIScienceLabs.OnAccept is responsible for skip/display the report. Edited by wghost81
Posted

As far as I can tell, no other important dialog uses "play sound when shown" functionality, so I simply disabled it:

 

 

OBJECT=UIDialogueBox.Realize
FIND_HEX=07 78 01 77 35 FD 08 00 00 06 09 00 00 00 00 00 26 09 00 00 2A 16
MODDED_HEX=06

 

 

This results in no "fanfare" played at all. But by adding PlaySound call to some place else, we can restore "fanfare" and make it play only once.

 

UPD: Can add PlaySound to XGResearchUI.OnLeaveReport, where all the unlocks are processed, but it has so-o-o many jumps, I kinda lazy to do it. :smile: Besides, I'm quite happy with no fanfare sound being played at all. :smile:

Many thanks for this!

But which file (and proper complete txt fix) should be used with your GUI-Patcher program to address such an issue within our own game setups?

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...