Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a section about looping custom menu tracks #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/custom-music/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,26 @@ Once done, save and repackage your mod, and you'll find your audio replacement p
| AMB_MainMenu_Loop | 259073131 | Played in the background of the Main Menu |
| PD3_MainTheme_Option02 | 1028929042 | Identical to 1033817546, but not used by the game |
| PD3_MainTheme_Option02 | 1033817546 | Main menu theme used in game |

### Looping Custom menu tracks
The way your 1033817546.ubulk is going to be handled in-game depends on
values contained within a .uexp file located in

`PAYDAY3\Content\WwiseAudio\Events\Music\Menus` called `MusicMenu_MainMenu`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this only the case for the main menu music? Or also heist tracks?


Editing the values inside the uexp using a hex editor like HxD lets you set your own duration, loop times and fade in/fade out times.


| Offset | Value Type | Value Scale | Function | Notes
|:---------|:-----------------|:-------------|:-----------------------|:-------------------------------------------------------------------------------------------------------|
| 0x146 | float64 (Double) | milliseconds | Music Duration | |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are fixed offsets that only apply to the main menu track? I'd much rather have instructions that allow people to find these offsets for any track.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example on the main menu track wouldn't go amiss. For example, the main menu song is 192593 miliseconds long according to wwise. Just giving an example on that for the default uexp values should at least point complete hex editing newbies in the correct direction, maybe? I've passing knowledge about hex editing but this one just eludes me.

image
Apparently this part got removed at one point, which again helps at least pointing people at the solution I guess.

| 0x162 | float32 (Single) | seconds | Fade in Start | |
| 0x16E | float32 (Single) | seconds | Fade in End | |
| 0x192 | float32 (Single) | seconds | Fade out Start | |
| 0x19E | float32 (Single) | seconds | Fade out End | |
| 0x221 | float64 (Double) | milliseconds | Music Maximum Duration | You'll typically want to set it to the same value as 0x146 |
| 0x231 | float64 (Double) | milliseconds | Loop Start | This is where your track will loop from on every subsequent replay |
| 0x23E | float64 (Double) | milliseconds | Loop End | This is where your track will end, you can set it to be lower than the duration of the track if needed |

Once you are done, you can pack both your music file contained in `Media` and this one into your mod,
feel free to tinker with it until you're satisfied with it!