modding coop/mp map music

Locked
Jaro
Posts: 3
Joined: Sun Apr 17, 2016 11:16 pm

modding coop/mp map music

Post by Jaro » Sun Apr 17, 2016 11:25 pm

hello my first post here and i love this game.

i'm replaying the coop maps and i'm a bit dissapointed much maps don't fit the right music tracks, i find it would be more inmersive to set the entry and map music just like the single campaign does.

i figured out this could be handled from the script sndtracks.lua but i guess there's no lua4 decompiler atm to mod it, may it work with a hex editor?

did someone manage to find out where're the offsets and how to change the music id association with the coop and mp maps?

thanks a lot

User avatar
Dieter
Posts: 62
Joined: Sat Feb 20, 2016 12:11 am
Contact:

Re: modding coop/mp map music

Post by Dieter » Mon Apr 18, 2016 12:28 pm

Jaro wrote:hello my first post here and i love this game.

i'm replaying the coop maps and i'm a bit dissapointed much maps don't fit the right music tracks, i find it would be more inmersive to set the entry and map music just like the single campaign does.

i figured out this could be handled from the script sndtracks.lua but i guess there's no lua4 decompiler atm to mod it, may it work with a hex editor?

did someone manage to find out where're the offsets and how to change the music id association with the coop and mp maps?

thanks a lot
Hello,
You'll have to edit sndtrackstransitions.lua , also , so the songs will be fading out , mixing , etc.

User avatar
rupuzioks
Site Admin
Posts: 555
Joined: Sun Nov 13, 2011 2:57 pm

Re: modding coop/mp map music

Post by rupuzioks » Mon Apr 18, 2016 3:27 pm

actually I think it is in sndtracks.lua file

alternate method is to rename mp3 files, though you will need keep renaming them as you play different campaigns or coop
Tempus et vita, tempus et mortis

User avatar
Dieter
Posts: 62
Joined: Sat Feb 20, 2016 12:11 am
Contact:

Re: modding coop/mp map music

Post by Dieter » Mon Apr 18, 2016 7:20 pm

rupuzioks wrote:actually I think it is in sndtracks.lua file

alternate method is to rename mp3 files, though you will need keep renaming them as you play different campaigns or coop
It's in the both files
1 - sndtracks.lua (tracks themselves)
2 - sndtrackstransitions.lua (transitions between the tracks)
I know for sure because I went through this , I have Limited Edition with
.wav soundtracks CD 1411kbps, so I replaced poor bitrate .mp3 with .wav
for the better sound quality ,
I had to edit both of these files , so my game now has an astonishing CD sound.

Jaro
Posts: 3
Joined: Sun Apr 17, 2016 11:16 pm

Re: modding coop/mp map music

Post by Jaro » Thu Apr 21, 2016 9:25 pm

Dieter wrote:
rupuzioks wrote:actually I think it is in sndtracks.lua file

alternate method is to rename mp3 files, though you will need keep renaming them as you play different campaigns or coop
It's in the both files
1 - sndtracks.lua (tracks themselves)
2 - sndtrackstransitions.lua (transitions between the tracks)
I know for sure because I went through this , I have Limited Edition with
.wav soundtracks CD 1411kbps, so I replaced poor bitrate .mp3 with .wav
for the better sound quality ,
I had to edit both of these files , so my game now has an astonishing CD sound.

thanks

by editing both files you mean to edit them with an hex editor, right? or may be is there some already decompiled version available?

User avatar
Dieter
Posts: 62
Joined: Sat Feb 20, 2016 12:11 am
Contact:

Re: modding coop/mp map music

Post by Dieter » Fri Apr 22, 2016 1:19 pm

Jaro wrote:
Dieter wrote:
rupuzioks wrote:actually I think it is in sndtracks.lua file

alternate method is to rename mp3 files, though you will need keep renaming them as you play different campaigns or coop
It's in the both files
1 - sndtracks.lua (tracks themselves)
2 - sndtrackstransitions.lua (transitions between the tracks)
I know for sure because I went through this , I have Limited Edition with
.wav soundtracks CD 1411kbps, so I replaced poor bitrate .mp3 with .wav
for the better sound quality ,
I had to edit both of these files , so my game now has an astonishing CD sound.

thanks

by editing both files you mean to edit them with an hex editor, right? or may be is there some already decompiled version available?

You're welcome .

I suggest to edit decompiled versions , I'd gladly give mine to you , but I have another game
version . My game is Limited Edition v.1.38. The files are absolutely different , especially if you
have platinum 1.54 or 1.52.
But there are plenty of decompilers available , for example unluac , it
has pretty good support for Lua 5.0 , or luadec, it's even better.

Jaro
Posts: 3
Joined: Sun Apr 17, 2016 11:16 pm

Re: modding coop/mp map music

Post by Jaro » Wed Apr 27, 2016 9:11 pm

You're welcome .

I suggest to edit decompiled versions , I'd gladly give mine to you , but I have another game
version . My game is Limited Edition v.1.38. The files are absolutely different , especially if you
have platinum 1.54 or 1.52.
But there are plenty of decompilers available , for example unluac , it
has pretty good support for Lua 5.0 , or luadec, it's even better.

thanks i've been playing to replace a few bytes and test some maps but it would be great if you could sendme or post your sndtracks.lua and sndtrackstransitions.lua to get a closer approach on how are all music ids associated.

Unfortunatelly none of those decompilers work with lower versions than lua 5.0, just cfluadc worked fine to decompile just a few scritps.

i guess this won't help much to add music to custom maps but may be to play some different musics in coop mode.

User avatar
Dieter
Posts: 62
Joined: Sat Feb 20, 2016 12:11 am
Contact:

Re: modding coop/mp map music

Post by Dieter » Fri Apr 29, 2016 12:26 am

Jaro wrote:
You're welcome .

I suggest to edit decompiled versions , I'd gladly give mine to you , but I have another game
version . My game is Limited Edition v.1.38. The files are absolutely different , especially if you
have platinum 1.54 or 1.52.
But there are plenty of decompilers available , for example unluac , it
has pretty good support for Lua 5.0 , or luadec, it's even better.

thanks i've been playing to replace a few bytes and test some maps but it would be great if you could sendme or post your sndtracks.lua and sndtrackstransitions.lua to get a closer approach on how are all music ids associated.

Unfortunatelly none of those decompilers work with lower versions than lua 5.0, just cfluadc worked fine to decompile just a few scritps.

i guess this won't help much to add music to custom maps but may be to play some different musics in coop mode.

Sure , these are for the Limited Edition v.1.38. , keep in mind , some songs for the last addon (phoenix) are not included , also the coop mode will play music only up to coop30 map + marketplace

Locked