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 is currently offline 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

Report message to a moderator

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

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

Report message to a moderator

Sergeant Major
Re: [WIP] Extended Music Mod Alpha[message #325259] Tue, 17 September 2013 03:51 Go to previous messageGo to next message
E3245 is currently offline 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

Report message to a moderator

Corporal
Re: [WIP] Extended Music Mod Alpha[message #325276] Tue, 17 September 2013 14:41 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
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.

Report message to a moderator

Sergeant Major

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

 
Messages:292
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.

Report message to a moderator

Master Sergeant
Re: [WIP] Extended Music Mod Alpha[message #325972] Mon, 30 September 2013 16:40 Go to previous messageGo to next message
E3245 is currently offline 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

Report message to a moderator

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

 
Messages:292
Registered:November 2008
oh, I think I I know what is wrong for me. How to compile the scripts?

Report message to a moderator

Master Sergeant
Re: [WIP] Extended Music Mod Alpha[message #325987] Mon, 30 September 2013 20:18 Go to previous messageGo to next message
E3245 is currently offline 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.

Report message to a moderator

Corporal
Re: [WIP] Extended Music Mod Alpha[message #326169] Thu, 03 October 2013 01:07 Go to previous messageGo to next message
Taro_M is currently offline Taro_M

 
Messages:292
Registered:November 2008
Nah, I think I will pass. I will wait till custom music feature will be added.

Report message to a moderator

Master Sergeant
Re: [WIP] Extended Music Mod Alpha[message #326175] Thu, 03 October 2013 02:03 Go to previous messageGo to next message
Faalagorn is currently offline Faalagorn

 
Messages:153
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 )

Report message to a moderator

Staff Sergeant
Re: [WIP] Extended Music Mod Alpha[message #326195] Thu, 03 October 2013 13:34 Go to previous messageGo to next message
Taro_M is currently offline Taro_M

 
Messages:292
Registered:November 2008
Would there be any chance for this fix to be added to SVN versions of 1.13?

Report message to a moderator

Master Sergeant
Re: [WIP] Extended Music Mod Alpha[message #326196] Thu, 03 October 2013 14:28 Go to previous messageGo to next message
E3245 is currently offline 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.

Report message to a moderator

Corporal
Re: [WIP] Extended Music Mod Alpha[message #357309 is a reply to message #326196] Thu, 25 April 2019 10:21 Go to previous message
MrStitch is currently offline MrStitch

 
Messages:21
Registered:September 2018
Hi i made a collection of tracks that i was using for JA2 and always wanted to know how to add a few more, i did this by merging .wav files together in Audacity and made one track playlists so to say as that was the only work around i could muster. I want to use this code to add a few more tracks the normal way. I also wondered if it was possible to randomize the battle muisc so that it would select one out of the four but for right now i just want to add some more music. please teach me.

Report message to a moderator

Private 1st Class
Previous Topic: 7609+AI: Merges.xml and advanced crafting
Next Topic: Realistic approach to replenish Queen's Army Reserve
Goto Forum:
  


Current Time: Tue Feb 18 21:55:07 GMT+2 2025

Total time taken to generate the page: 0.01703 seconds