Music Modding

In the age of Pike and Shot, mighty struggles erupted across Europe for causes religious, political or dynastic. The Thirty Years War raged across Germany and beyond, leaving devastation in its wake, but saw the rise of great commanders such as Count Tilly, Wallenstein and King Gustavus Adolphus of Sweden, and rapid developments in battlefield tactics.
User avatar
rbodleyscott
Posts: 132
Joined: Fri Oct 17, 2014 10:17 am

RE: Music Modding

Post by rbodleyscott »

ORIGINAL: Javolenus

Thanks for this ... and so you are saying it should be:

MainMenu // emtMainMenu
MainMenu // emtCampaign
MainMenu // emtDeploy
Track0 // emtBattle
Track1
Track3
Won // emtWin
Lost // emtLose

... yes? If so, as already mentioned above, this doesn't work ... or I still misunderstand? Hmm ... I thought this would simple ...

No. It should be:

MainMenu // emtMainMenu
MainMenu // emtCampaign
MainMenu // emtDeploy
Track0 // emtBattle
Won // emtWin
Lost // emtLose

The program will find Track1, Track2 etc. automatically
Javolenus
Posts: 233
Joined: Fri Aug 13, 2010 12:19 pm

RE: Music Modding

Post by Javolenus »

Hi and many thanks. It doesn't work. I copied/pasted your text (above) & renamed the MP3 files accordingly. But now the "MainMenu" music just loops endlessly. Hmm ... I'm kind of bored with this. Seems like a hassle. Will just turn the music off. Thanks anyway.
User avatar
rbodleyscott
Posts: 132
Joined: Fri Oct 17, 2014 10:17 am

RE: Music Modding

Post by rbodleyscott »

ORIGINAL: Javolenus

Hi and many thanks. It doesn't work. I copied/pasted your text (above) & renamed the MP3 files accordingly. But now the "MainMenu" music just loops endlessly. Hmm ... I'm kind of bored with this. Seems like a hassle. Will just turn the music off. Thanks anyway.

There is a bug that makes the MainMenu music play during the battles if you reload a saved game. To test it you need to start a new game.
Javolenus
Posts: 233
Joined: Fri Aug 13, 2010 12:19 pm

RE: Music Modding

Post by Javolenus »

Aahhhh, OK, thanks for the info -- that might explain my problems!
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Music Modding

Post by berto »


No Pike & Shot music mod would be complete without one or more recordings of L'homme armé, "The Armed Man." Don't play Pike & Shot without it!
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Music Modding

Post by berto »


L'homme armé, by Jordi Savall's Hespèrion XXI
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Music Modding

Post by berto »


Pavanne 'La Bataille' ("The Battle") by Tylman Susato
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Music Modding

Post by berto »


La bataille ("The Battle") by Clément Janequin
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Music Modding

Post by berto »


Monteverdi's L'Orfeo toccata performed by Jordi Savall's Hesperion XX
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
DerGrenadier
Posts: 106
Joined: Sun Dec 11, 2011 6:59 am
Location: Germania Superior

RE: Music Modding

Post by DerGrenadier »

Thx berto for these links. Great music. I love the music from this period.
[center]Image
[center]



Philippeatbay
Posts: 867
Joined: Wed Dec 03, 2014 12:27 pm

RE: Music Modding

Post by Philippeatbay »

Now that I've learned how to convert YouTube music to MP3's, I've been attempting to mod the music in the game.

1) Is it really possible to have different pieces of music play for Campaign and Deployment? I've altered what I think is the relevant text file, but the only thing that plays in what should by the Campaign and Deployment slots is the MainMenu music. I don't need randomized tracks for the Battle slot since I'm already using a very long battle track.

2) I noticed in one of the earlier posts the comment that to get Win/Lose music to play you need to make a change to a file in the config folder. I've read through the file in question and am not sure where to insert the line that activates this music, or what the syntax should be.
User avatar
rbodleyscott
Posts: 132
Joined: Fri Oct 17, 2014 10:17 am

RE: Music Modding

Post by rbodleyscott »

ORIGINAL: Philippe at bay

Now that I've learned how to convert YouTube music to MP3's, I've been attempting to mod the music in the game.

1) Is it really possible to have different pieces of music play for Campaign and Deployment? I've altered what I think is the relevant text file, but the only thing that plays in what should by the Campaign and Deployment slots is the MainMenu music. I don't need randomized tracks for the Battle slot since I'm already using a very long battle track.

It should simply be a matter of putting the new .mp3 files in /Data/Music

and editing the music.txt file (in /Data) accordingly

But I am guessing you have already done that, so I am not sure what the answer is. If that does not work I will have to ask for advice for you from Pip the engine programmer.

It might be helpful if you post the contents of your music.txt file here.
2) I noticed in one of the earlier posts the comment that to get Win/Lose music to play you need to make a change to a file in the config folder. I've read through the file in question and am not sure where to insert the line that activates this music, or what the syntax should be.

I have not tried this myself but I am told that it will play win/lose over results screen if you enable with

USEWINLOSEMUSIC 1

in the system.txt file.

Philippeatbay
Posts: 867
Joined: Wed Dec 03, 2014 12:27 pm

RE: Music Modding

Post by Philippeatbay »

Thanks for the prompt reply. If you're where I think you are, you clearly don't limit yourself to business hours.

Here is the contents of the Music text file

Quote

MainMenu // emtMainMenu
Campaign // emtCampaign
Deploy // emtDeploy
Battle // emtBattle
Won // emtWin
Lost // emtLose

Unquote

I renamed two MP3's 'Campaign' and 'Deploy' to match the contents of the file. But no joy.

And just to be sure we're on the same page, the text file in question is located in the Data folder separate from the Music folder.

I note that there is an scc file named 'saws' inside the music folder. Perhaps that needs to be modified in some way?
Philippeatbay
Posts: 867
Joined: Wed Dec 03, 2014 12:27 pm

RE: Music Modding

Post by Philippeatbay »

Here is the contents of the system text file in the configuration folder:

Quote

AUTODOCS 1
//DebugMode 1
//DebugDisplay 1
//NOBLOOM 0
//DEBUGTEST 1
//QUICKSTART 1
//SCREENCAPTURE 1
//RECORDING 1
//HIDEFEEDBACK 1
//NOSHADERS 1
MOVIEMODE 1
DYNAMICENV 1
HEIGHTSTEP 6
AITEST 1
UseTileDrawCallback 1
LeftRightDefaultUI 1

//Left of force selection block
LayoutForceAreaLeft 70
//Top of force selection block
LayoutForceAreaTop 213
//Area width in buttons
LayoutForceAreaWidth 3
//Area height in buttons
LayoutForceAreaHeight 6
//Width of force selection buttons
LayoutForceButtonWidth 198
//Width of force selection buttons
LayoutForceButtonHeight 60

//Left of card type list
LayoutCardTypeLeft 0
//Top of card type list
LayoutCardTypeTop 187
//Width of card type buttons
LayoutCardTypeButtonWidth 160
//Height of card type buttons
LayoutCardTypeButtonHeight 117
//How many buttons wide is the type area
LayoutCardTypeWidth 1
//How many buttons high is the type area
LayoutCardTypeHeight 3

//Bonus button width. These are the images on the battle screen
LayoutBonusButtonWidth 96
//Bonus button height
LayoutBonusButtonHeight -40
//X pos on 1024x768 screen of top left of bonus button area
LayoutBonusAreaX 0
//Y pos on 1024x768 screen of top left of bonus button area
LayoutBonusAreaY 595
//How many buttons across the bonus area is
LayoutBonusButtonsAcross 1
//How many buttons deep the bonus area is
LayoutBonusButtonsDown 9



//Unit menu button width
LayoutUnitButtonWidth 32

//Unit menu button height
LayoutUnitButtonHeight 32

//Unit menu button width when expanded
LayoutUnitButtonWidthEx 48

//Unit menu button height when expanded
LayoutUnitButtonHeightEx 48

//Campaign Screen button numbers
LayoutCampaignListCount 9

//campaign list icon width
LayoutCampaignListIconWidth 36

//campaign list icon height
LayoutCampaignListIconHeight 36


//campaign list - how far is the icon from the left edge
LayoutCampaignListIconLeft 0

//campaign list - how far is the icon from the top edge
LayoutCampaignListIconTop 2

//campaign list - how far from the left edge does the text start
LayoutCampaignListTextLeft 56


//left of my kills
LayoutKillsMeX 380

//top of my kills
LayoutKillsMeY 20

//left of enemy kills
LayoutKillsEnemyX 380

//top of enemy kills
LayoutKillsEnemyY 355

//icon size
LayoutKillsSize 32

//vertical space between icons
LayoutKillsDeltaY 30

//width a given set of kills can take up
LayoutKillsWidth 180

//max spacing for icons on the same line
LayoutKillsDefault 12

//Height we allow the list to go down to before it creates another row
LayoutKillsHeight 290

// should the skirmish UI allow force selection to be turned off when army lists are used (meaningless unless the scripts actually implement auto-select)
SkirmishArmyListAllowNoForceSel 1

//Default turn limit for skirmishes
SkirmishDefaultTurns 20

Unquote

Do I just add a line that reads USEWINLOSEMUSIC 1, or does that need to be preceded by something like //Activate music for victory and defeat? I guess what's giving me pause is the // syntax, and whether you even need a line that starts with // in the text file.

I suppose I could just try changing it and see what happens.

By the way, I'm only playing around with my non-steam installation. I'm leaving the steam version in its original state in case something untoward happens.
Philippeatbay
Posts: 867
Joined: Wed Dec 03, 2014 12:27 pm

RE: Music Modding

Post by Philippeatbay »

As an addendum, I decided to ignore the fact that I didn't really know what I was doing, and added the USEWINLOSEMUSIC 1 line to the system file in the configuration folder. It seems to have worked. I guess the // just means that the program shouldn't read that particular line.

So that's one out of two. Now if I could just get the deployment and campaign music to play...
User avatar
rbodleyscott
Posts: 132
Joined: Fri Oct 17, 2014 10:17 am

RE: Music Modding

Post by rbodleyscott »

I guess the // just means that the program shouldn't read that particular line.

That is correct, it denotes the rest of that line as being a comment.
I note that there is an scc file named 'saws' inside the music folder. Perhaps that needs to be modified in some way?

No, that is just part of the version control system we use internally.

Assuming you have put your renamed music files in /Data/Music and the names match exactly, it ought to work. Note that the code may be case sensitive.

If that is not it, I am not sure what the problem is.

I will ask Pip.
User avatar
PipFromSlitherine
Posts: 1520
Joined: Wed Jun 23, 2010 7:11 pm

RE: Music Modding

Post by PipFromSlitherine »

The data you have set up should work correctly as far as I can see - we use campaign and deploy music in BA2 and it is set up just like yours. Try some debugging. Does the music you expect play if you set the first (main menu) line to be one of your new pieces, etc.

Note that you should ensure that the campaign you are testing on doesn't have its own over-riding music.txt file.

Cheers

Pip
follow me on Twitter here
Philippeatbay
Posts: 867
Joined: Wed Dec 03, 2014 12:27 pm

RE: Music Modding

Post by Philippeatbay »

Much to my astonishment, today (as opposed to yesterday) it is working.

The main menu tune was always playing, what wasn't playing were the campaign and deployment tunes (they were just repeating the main menu).

Perhaps the old configuration was still lurking in my computer's ram, and turning it off last night and back on again this morning flushed it out.

[In case you were wondering, yes, I am a computer primitive, and periodically sacrifice virgins to the bad disc sector god].

Anyway, thanks for the help, now I can focus on deciding whether my selections are really the ones I should be using, and perhaps running them through my sound editor to trim the sound tracks.
Post Reply

Return to “Pike & Shot Series”