Home » MODDING HQ 1.13 » v1.13 Coding Talk » [WIP] Extended Music Mod Alpha
[WIP] Extended Music Mod Alpha[message #325127] Fri, 13 September 2013 01:29 Go to next message
E3245

 
Messages:46
Registered:August 2013
I made a small modification to the Jagged Alliance 2 Source Code that extends the amount of music that plays a few weeks ago.

Right now, this only extends the battle music from 2 to 5. Plus, TENSOR B does not play anymore. It's now replaced as BATTLE B. I tested it and it works 100%.

[color:#FF0000]The prerequisites to this mod requires 4 .wav files of songs(See Below on what to add). If this is not met, then there will be silence until the music mode changes (i.e from BATTLE to NOTHING).[/color]

Feel free to post any suggestions, I'll try my best.

Notes:
  • Tensor B.wav will no longer play during Battle Mode.
  • All Must be in the Music folder of the Data directory
The four track that I added are:
  • BATTLE B.WAV
  • BATTLE C.WAV
  • BATTLE D.WAV
  • BATTLE E.WAV

I'll post the code here.
Feel free to use it. Credit is not required but it's appreciated.

Utils/Music Control.h
Toggle Spoiler

Utils/Music Control.cpp
Toggle Spoiler

Re: [WIP] Extended Music Mod Alpha[message #325181] Sat, 14 September 2013 16:38 Go to previous messageGo to next message
Slax

 
Messages:1448
Registered:July 2006
Location: People riding polar bears...
A simple xml to handle this would be nice. Basically a playlist.

Re: [WIP] Extended Music Mod Alpha[message #325259] Tue, 17 September 2013 03:51 Go to previous messageGo to next message
E3245

 
Messages:46
Registered:August 2013
I noticed that there is already a Externalized Music Example in the Docs folder that I have, (Not sure if it's still in the repository), but it looks like that you'll need to manually define each region on the map if you want to play it all the time.

Although, it can be useful if the map requires different music to match.

EDIT: Oh, it seems that the music is externalized, but it's broken. That means my snippet is useless once the externalization is fixed.

[Updated on: Tue, 17 September 2013 03:55] by Moderator

Re: [WIP] Extended Music Mod Alpha[message #325276] Tue, 17 September 2013 14:41 Go to previous messageGo to next message
RoWa21

 
Messages:2039
Registered:October 2005
Location: Austria
E3245
I noticed that there is already a Externalized Music Example in the Docs folder that I have, (Not sure if it's still in the repository), but it looks like that you'll need to manually define each region on the map if you want to play it all the time.

Although, it can be useful if the map requires different music to match.

EDIT: Oh, it seems that the music is externalized, but it's broken. That means my snippet is useless once the externalization is fixed.


Hello, yes the music is externalized to the "Music.lua" script file. There are still some bugs which need to be fixed by the creator (Jazz) of the externalization. Currently the game uses still uses the hardcoded music until the bugs are fixed.


Re: [WIP] Extended Music Mod Alpha[message #325953] Mon, 30 September 2013 09:44 Go to previous messageGo to next message
Taro_M

 
Messages:297
Registered:November 2008
Hi, I think Ive done something wrong when installing your scripts. When enemy is spotted the tensor music keeps playing.

Could you upload working cpp and h files? I already have music, but it seems Ive done something wrong when installing the script files.
Re: [WIP] Extended Music Mod Alpha[message #325972] Mon, 30 September 2013 16:40 Go to previous messageGo to next message
E3245

 
Messages:46
Registered:August 2013
Here are the new files, since the recent revoked change of Music Control messed up the music modes somewhat.

Place it in Utils, compile, and check to see if it works.

Music Control r1
Re: [WIP] Extended Music Mod Alpha[message #325978] Mon, 30 September 2013 18:19 Go to previous messageGo to next message
Taro_M

 
Messages:297
Registered:November 2008
oh, I think I I know what is wrong for me. How to compile the scripts?
Re: [WIP] Extended Music Mod Alpha[message #325987] Mon, 30 September 2013 20:18 Go to previous messageGo to next message
E3245

 
Messages:46
Registered:August 2013
You need an IDE. Visual Studio 2010. This is not an external script by the way. You need the Ja2 1.13 source code to compile to an exe.
Re: [WIP] Extended Music Mod Alpha[message #326169] Thu, 03 October 2013 01:07 Go to previous messageGo to next message
Taro_M

 
Messages:297
Registered:November 2008
Nah, I think I will pass. I will wait till custom music feature will be added.
Re: [WIP] Extended Music Mod Alpha[message #326175] Thu, 03 October 2013 02:03 Go to previous messageGo to next message
Faalagorn

 
Messages:157
Registered:February 2012
Location: Poland
Taro
Nah, I think I will pass. I will wait till custom music feature will be added.

...back. Externalized music is courtesy of Jazz, so either he'll have to fix the bug or someone else do that, and both options may take some time (we still have issues with Encyclopedia Sad )
Re: [WIP] Extended Music Mod Alpha[message #326195] Thu, 03 October 2013 13:34 Go to previous messageGo to next message
Taro_M

 
Messages:297
Registered:November 2008
Would there be any chance for this fix to be added to SVN versions of 1.13?
Re: [WIP] Extended Music Mod Alpha[message #326196] Thu, 03 October 2013 14:28 Go to previous message
E3245

 
Messages:46
Registered:August 2013
I don't think so. Unless you have 4 extra .wav files, it will not play music for the entire battle until it switches to the next music mode.
Previous Topic: [FIX] improve loading speed of stash
Next Topic: Create Cyborg IMP(half robot,half human)
Goto Forum:
  


Current Time: Sun Dec 16 16:01:34 EET 2018

Total time taken to generate the page: 0.01887 seconds