Adding music to games

  • Hello everyone. Is it possible to add music to the Classic Map? I grew up playing the Hasbro CD of Axis and Allies and wanted to add the music from that game which I have on my computer. I'm new to modding so if there are any links or tutorials you can point me too I would appreciate it! Thanks!

  • Moderators Admin

    @JoeyP Moved to Feature Requests & Ideas.

    Having some background music (or at least an option for mapmakers and powergamers to add some) would be cool.

  • Admin

    Would need to be MP3's, probably as add-ons. I think the feature request would be to allow a folder where such background music could be found, add a download category for it, in which case you could select any of the downloaded MP3s (so not bundled with maps, but make background sounds their own download bundles).

  • Admin

    Though, moderating/ensuring that soundpack bundles were okay could be trouble. In which case, if we are just playing an mp3 from in-game, why not just use a sound player to do the same?

  • @Cernel Thanks! I didn't know this wasn't an existing feature. Like I said I am new to modding/programming, so pardon the ignorance.

  • Admin

    @JoeyP caution this is moved to the forum section of 'features we would like' rather than have.

    While I can see it being really nice to have background music, we have to weigh really how useful it would be. Getting custom music from the game would be really great, but perhaps we could have a youtube channel? I know it being in game is ideal, though it might not be as useful as it seems. Notably we'd need someone to listen to all music uploaded before it is made available, we might have trouble finding the labor to do that.

  • Moderators Admin

    Not my own feature request, but I definitely believe mapmakers should be able adding a specific background sound for their own map within the skin of the map. Of course, each map could have as many sounds as the number of its mapskins, and each map or mapskin could have multiple background sounds (one of them playing randomly each time the sound is called).

  • @LaFayette Could I send the MP3 files via google drive link and you can let me know what you think? They are from the 1988 CD and have themes for Russia, Germany, UK, Japan, and United States (all appx 4 min long and 7MB). Otherwise, let me know how else I can help!

  • Admin

    @JoeyP I'm pretty sure we could only include sound that was in the public domain or were personal creations that could be licensed to TripleA for general use.

    The problem is also not really in any specific sounds/capabilities, but how to distribute and manage the distribution of background music. We could create a new download category for it, but then we have to deal with managing the files and making sure what is uploaded is okay.

    We could on the other hand create a folder where background music is found and then played, but it does open a can of worms and work items:

    • we have to find that folder from the game
    • there needs to be a menu to select which files to play
    • need to decide if we cycle through the sounds or loop one
    • need to see if we create a default by maps
    • if sound files are not available for download, the user has to be aware of where the folder is so they can drop sound files in to the folder

    If someone needs to manually drop in sound files to a background music folder, I just wonder at what point is really just easier to open the sound file and just play it?

  • @LaFayette That makes sense, plus I'm sure keeping files as small as possible is a priority as well. I appreciate the thought and maybe someday it would be implemented. I'll poke around in the mean time and see if i can come up with a plausible solution. Thanks again and stay healthy!

  • Admin

    I have also always missed music in TripleA. In my maps I often make use of the "required your turn series" sound and use this to make the engine play player/nation specific or just generic map themed music. Good example is Iron War map. Star Trek has small short generic music played by every player turn.

    It does works but comes with a few issues, like the potential of music being played on top of each other if the player has turns many times/many nations in a row fairly quickly.

    For this reason I have the sound files be short, like 10-60 seconds sometimes.

    Also this approach requires me to make "fake steps" in the XML so that a player controlling several nations with a turn sequence that has the nations set up in a row, still get a "required your turn series" sound played when the new nation has its turn, so that music is played for every nation, not just the first in the row.

    If TripleA is to expand on the music side, I would love to se a "music player" feature. Many strategy games/games with slow pace has this. Like a small player that can be quickly opened via the on screen controls / UI, and that just looks to find a certain dir on the PC to read and play mp3 from, with scroll, repeat, sound level etc. options.

    Maybe if TripleA was to have this, it would allow for for sellecting an alternative custom dir, maybe have a standard "music" dir in the sub-dir of the TripleA install dir and maybe allow maps to have a "music" dir that was automatically chosen if files where present?

    (If an in-game player was to be implemented, then I would think that it was obvious to reawake the "minimap shortcut icons" feature idea, and have a small music icon that opened up a music player. ☺ )

  • Moderators Admin

    @Frostion said in Adding music to games:

    Also this approach requires me to make "fake steps" in the XML so that a player controlling several nations with a turn sequence that has the nations set up in a row, still get a "required your turn series" sound played when the new nation has its turn, so that music is played for every nation, not just the first in the row.

    Yeah, that's really sad. Off topic, but I would fix that so that the "required your turn series" plays each time a new game power starts a phase (except if you are loading the game, of course), instead of only when it is also played by a different player than the previous one. The counter argument, however, that the current behaviour is based upon, is that you need to have that sound only when you need to do your turn after having been inactive, therefore it doesn't play if you were already the active player (the original intent of that sound, as Veqryn said in the past, was as an automatically given "slap", to inform a previously inactive player that it is now its turn to play the game).

  • @Frostion I just tried the Iron War map, and that's almost exactly what I was asking for (the only difference would be to play the music on a loop). Since I'm new to this, does the map/game making tutorial do a good job to explain how to implement sound and music as you did, or should I look for supplementary information? Is that something you can provide? The graphics are great btw, good job! I appreciate the dialogue.

  • Moderators Admin

    @JoeyP Long story short, that is just a "start turn" sound that plays for a long time, thus gives the feeling of a background sound, but it would still not work in case your turn comes after another turn of yours (like if you are both Americans and Russians), since TripleA doesn't actually have "start turn" sounds, but just sounds that play when it is your turn, after someone else turn (you could assign a sound to the first phase, as long as it is never skipped alone, but that would require removing the start game sound, to avoid them playing over each other).

    The first question would be how long your sounds actually play, without looping, and how long you would want them actually playing (remember that, if you end the turn too fast, the sounds will mix in a cacophony). Once these are answered, I assume @Frostion could teach you how to obtain a final result similar to Iron War.

  • @Cernel Yea, I played through an entire round, some slower than others, and there is definitely music overlap when moving quickly. It works well when enough for the initial effect as @Frostion noted. It's a very nice touch/feature and certainly breathes life into the game giving it some nice immersive properties. Kind of turns the game from a virtual board game to an interactive experience. Now if Battle sound effects can loop during each battle turn/round that would increase immersion as well.

  • Admin

    @JoeyP I have no knowledge of any sound tutorial / documentation that can explain and guide the mapmaker to utilize all the (limited) possibilities the engine supports. I can only advise you to study other maps extensively and in detail. Study the XML when it comes to how to make use of notification sounds and study the notification and sound .properties files in regards to just what sounds can be played, how and what to name them.

    One thing to learn is what code to write in the files to make use of sounds, but another thing is ofcours also to be able to construct/edit the actual sound files, so that they sound good and fit the theme/game. YouTube and Google is your friend. Also, get a usable sound file/mp3 editor.

    Iron War is a good map to study and "reverse engineer", but I am sure that there are other maps that are worth studying also. You could download as many maps as you can, then go to map directory and sort the map zip files by size. As MP3 files tend to increase the map zips in size, most of the larger map zips could be maps that use custom sounds.

    Map making is complex work with a lot of manual editing, trial and error and very few short cuts (besides the collection of map making tools you find in the engine). So I hope you are up for a looong endeavour ☺

  • @Frostion Thanks for the info and pep talk! Keep up the great work, it's really amazing what you all have accomplished on your own time, it's good to see passionate people doing what they love. Stay Healthy and Safe

  • @JoeyP so you are just adding sounds to a mod you play or are you making a mod that we can play and try some day?

  • Moderators Admin

    @Captain-Crunch Well, if he intends to use copyrighted sounds, it may only be for personal use (at most).

  • @Captain-Crunch The endgame would be to achieve the latter; however, for the time being, it would be the former to play with friends and family.

Log in to reply