Imperator Dev Diary 12/06/2019 - Modding Part 2: Music!

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Showing developer posts only. Show all posts in this thread.

Audiomancer

Head of Audio
Paradox Staff
Feb 27, 2018
20
201
g4_rGypR-IIjTuqBUuUE-bpBJet4tV05FO5aAYhQCYzrVX9sWVRyJSmSqsMp99lXwKiVJAxC8exRWJwrb0idkAPCZubuMiiMyBB_01_JD3yW-a_HAUvtyRx214CEbMm-gjNbWQrA



Music Modding



Brief

Starting with version 1.3 Livy, Music Modding is now available on Imperator!

This is made possible thanks to a crucial under the hood improvement introduced by updating the Music System internally to a new version of our JominiMusicManager and also updating Fmod to version 2.x. Players won’t immediately notice any differences to the music playback, but there’s a bunch of cool stuff that this new Music System brings with it and we hope to make use of them more in the future.

The long story short is that one of our talented programmers (Will Jordan) has found a way to use the API from Fmod to playback mp3s, ogg, (or pretty much whatever audio filetype that FMOD supports) directly using just a filepath! For modders this means that if you want to add or replace music to the core game, it is as simple as adding a folder with the songs, adding a new txt file with music definitions and boom, all those tracks are now going to be available inside the game music player.


z8ZOQ4kwPqYt9Fd_pg_qDzLHl4VqHujoHnUXeQxSQvk2CA3QOq5G-_YRIdnCigW-f8ZLRIFCFxlQRN6TvJgVMqr4fnRDnS9FMd4znCFDRwva7jRGoaF_4BZKUUleoe2q3F1HVbKs



Try the Mod!
If you want to try it out yourself, a new mod has been uploaded to Steam today that adds all the soundtrack from
"Europa Universalis Rome" and changes the main track to be the one that shipped with the 2008 version. It should automatically extract itself on the “Documents > Paradox Interactive > Imperator > mod” folder, and from there you just need to enable it through the PDX launcher on Steam and then make sure the build is 1.3+ .

Also, with these new MusicManager comes new Debug Tools: Such as Music.PlayTrack nameOfTheTrack , Music.Pause, Music.Reset and Music.Weight which are all quite handy to test out specific songs, check spacing and pauses between them and so on. More info on that upon request ;)

PDX Launcher
Bs-pGv3ryosdnIlDBVot8gadosN_n9zg8tzkZlj_Vjx7_ht4PaHkqsbRlczV_cR6WH6ySRI-H4lGW4MDf0rk0VMI5xTRmBLvT0a-sEUVN5lmawSzWivU_KwK_9jZpgh1dfu1PRDU


Mod Contents

DoJ6ZyUJyCwjYz3i9ExWGCSJUKKRxBo0dFbVva0NvVU8tNyOi_xIb15u_s1GjtASdiseSTyrSLv5xQUGhnlvUTPIsnFptH6_CN-PRPup7y1GpWDazZw3D_lZNxB36CjEjQ1lp38R

ZtlEv4J8A9iShiSi7BMJLMAQu7GDEronevLTqrGh0W2dX1L8_l7Y-hoNR4ceITPbJUaxoPztPBRysrL8eiscaKTNXr78LTMYJCOGV17f_EYAgBvPGBYKJQumK8MFSONH4-htvTse


(These files will be added inside the game’s music folder, overwriting the main theme definition, and appending the extra songs)

Summary
When we started thinking about supporting Audio Modding for Imperator, we looked at what our community requested the most and prioritized our scope around that.

We learned then that the highest requested feature was to be able to add more music to the base game.

Also, we wanted to make it as simple as possible for anyone.

Adapting new tech and methods tends to create friction, and Fmod is an amazing tool that enables us to make our games sound even better, but from a modding perspective it definitely looks quite different to what our community has been accustomed to through all these years. Therefore, by providing a simple way that is as straightforward and familiar as it ever was, we hope Music Modding will be very well received and motivate any of you to create and share your own music mods.

So join us on a trip down memory lane and download this music mod that automatically adds an additional hour of music to the base game:

Europa Universalis: Rome Music Mod
Download Link
_________________________________________________________

Europa Universalis: Rome Soundtrack
Composed by: Andreas Waldetoft

  • Main Theme - Legions of Rome
  • Rome Goes to War
  • Riding to Battle
  • Auxiliaries
  • Rome is the Light
  • The Senate
  • Eagle Fly North
  • The Field
  • Vae Victis
  • To Victory
  • Citizens
  • Barbarians Approaching
  • Battle of Zama
  • Elysian Fields
  • Grief
  • All Trade Routes Lead to Rome
  • Rock and Rome
  • Imperator
  • Victorious - Rome Finale

Total runtime: 70 minutes
 
QUOTE="Cassilda, post: 26080094, member: 49543"]Just to ask, the Europa Universalis Rome soundtrack cannot be released as a free DLC so not to replace the Imperator one (like in Hearts of Iron IV)? I do really like EU: Rome soundtrack, but it's better a longer one composed by both (Imperator and EU: Rome) than having to choose either one or another.[/QUOTE]
Hey Cassilda! Just in case it wasn´t clear on the dev diary.

That´s exactly what´s happening right now! You have both, so it actually adds 70 minutes of new music!

Is it possible to place conditions on the weight of a song? Like war/peace or culture/country?

YES! It is possible. <3 Expect more on that in the future. (It's already available for anyone who wants to go and tweak the script files)

@Audiomancer - thank you for this, Andreas Waldetoft is one of the best composers that I know (on top of him, IMO, are only Kirill Pokrovsky, Darren Korb and Marcin Przybyłowicz).

One very important question though: when can we expect to hear main theme during loading game? You know, like a most NORMAL thing one could expect from a game on its audio side - is this like a bug or you intentionally made so that we only hear main theme once we see main menu? For me, it's hilarious. Music during game launching is there to make you immerse, start thinking about your gameplay. It works like that with every other PDS game. What is wrong with Imperator??

You know what? It was by design, but actually, now that you mention it... It does make sense to use it as a "mood setter". The reason was that the main theme for I:R has this really nice low drum roll when it starts and we all felt it was great with the Logo appearing for the first time. But hey...might be time to revisit it and change it ;)

Thanks for the feedback!

Perfect, much appreciated
However, it would be better to have it built-in to the game as a free DLC instead of a mod.

Well, it was designed to showcase how you can make a Music Mod, the most straight-forward way. That's its main purpose. Adding music to the game is a side-effect, hahaha...

How this was not noticed and overlooked is absolutely beyond me...
It was one of the first things to pop up in the mod workshop ffs!

The goal has always been to have the music react to Gameplay... Get the music to be as adaptive as possible for a Paradox GSG title. For that reason, the game needs to be the music player itself. It needs to be able to play and pause and change the songs, depending on the events that are triggered by the game session.

That's always been the reason for the music player not to be there :)

Thanks for the feedback though! Keep it coming!
 
  • 1
Reactions:
I understand that current scripting would have to be changed to support the following, but wouldn't it make more sense if the music crossfades into a more noticeable one once you get a special event? Most obvious would be switch between war and peace music - with tracks taking several minutes there's a clear disconnect between those. Also for rarer occurrences like switching between cultures or religions (probably much more appropriate in Crusader Kings 2) so that you immediately hear that everything has changed.

As I've said, I'm not sure how to enable this even script-wise, cause as far I see it the current system makes a random roll on a weighted list when the time comes and makes no distinction between unique and generic music. Also you can have dynamic music for any situation so it'd be hard for the game to know if a new unique track wants to kick in unless it checks for that all the time.

Yes... Well... Stay tuned! I think something like that will be much more clear on another project that has recently been announced ;)

In any case, thanks for your feedback, and we'll have a look at how to improve what we currently have also.
 
[...] Imperator Rome seems to be missing some sounds for buttons added in a patch, but I guess it will be fixed sooner or later.
If you would like to help us speed up that process, feel free to make a bug report in the related subforum.
Dankeschön! :)
 
(...) Is there a compromise where we can still have an in-game player, AND the music can be reactive to events and triggers and such? (...)

Hey Carroarmato! Thanks for your kind words. I don't know if this would work for you, but I just tried "New Game", selected "Ironman", and then once inside I hit Tab to get the game console: In there you can use a command called Music.PlayTrack and tab again, revealing the names of all the songs available for the MusicManager to play. Then you can do something like "Music.Playtrack track16" and skip to the song you want. It should work fine, and not affect your Ironman scores, but please have a look and let me know since I might be wrong.

Hope it helps! :)

2019-12-12 11_24_40-Imperator.png
 
  • 1
Reactions:
@Audiomancer could you please show us how to add our own custom banks to the sounds folder? :)

i tried adding my own fmod build to the MOD_banks folder, but every time i try to play an event from my custom banks, it's completely silent. they do show up when you type 'audio.listevents' in console though. so i suspect it's a mixing issue.

the only time it works is if i replace the games master bank with my own, but that's not really an ideal solution because it throws away all of the games audio.

any help you could give me would be greatly appreciated :)

Hello! At the moment we are not fully supporting fmod modding, but what you did it's perfectly correct and your assumption as well: For you to be able to hear the events properly they need to be routed to the original Master channel's GUID. In the future we will share a template fmod session that will contain those channels pre-installed so that you can route everything to the correct place and hear it in the game.

Having two Master.banks is actually possible and recommended if you want to add your own extra-routing to the game, but all the new events need to still go to the same Master.

-----
Good work all of you figuring out how the whole system works! Happy Holidays :)
 
Hey guys! If you're having problems hearing the tracks from the EU Rome Soundtrack mod, can you please try playing the tracks from inside the game using the debug console and the command "Music.Playtrack track16" for instance? It should be one of the tracks that are added to the music playlist. The music folder should have a new file called eu_rome_music.txt where the new tracks are added. Please confirm that this is so :) Thanks!
 
Hey guys! It's been a while since I checked on you here.

If you're still having problems with the music not playing on its own among the other tracks, make sure you get the latest update on the mod. I updated it at the beginning of March, and this should have fixed the issue.

Download link: https://steamcommunity.com/sharedfiles/filedetails/?id=1929682011&searchtext=EU+Rome

Update: 3 Mar @ 12:37pm
**Fixed** In/Game Music should now include the tracks from the EU Rome Mod in its playlist randomizer when the mod is enabled.


Regarding the volume difference, this is something that I cannot really fix. The volume they play is the volume the original files have, and are not mixed for Imperator but EU:Rome.
I hope this is not too frustrating.

Cheers!