List of possible sounds in sounds.properties
I am in the works of building the sound set of my map Warcraft: War Heroes.
So where can I find a list of all the correct and possible custom sound codes to put in the sounds.properties?
Like a list of codes that correspond with the sounds shown in the Sound Options window.
And is this window the full set / only possible sounds in the game? And do they all work?
If there is a list, I would suggest it being included in the pact of steel sounds.properties.
@Frostion Good question. I'm not really sure as I haven't ever really played around with sounds or the sound code.
The best thing I found besides the in game sound options is this: https://github.com/triplea-game/assets/tree/master/game_headed_assets/sounds
That lists all the various sound files included with the engine. My assumption is that list and the sounds options probably are all the default available sounds. I can take a look at the code to see if that seems to line up with those as well.
Here is a list of all the sound paths in the engine:
public static final String CLIP_BATTLE_X_HIT = "_hit"; public static final String CLIP_BATTLE_X_MISS = "_miss"; public static final String CLIP_BATTLE_X_PREFIX = "battle_"; public static final String CLIP_CHAT_MESSAGE = "chat_message"; public static final String CLIP_CHAT_SLAP = "chat_slap"; public static final String CLIP_CHAT_JOIN_GAME = "chat_join_game"; public static final String CLIP_CLICK_BUTTON = "click_button"; public static final String CLIP_CLICK_PLOT = "click_plot"; public static final String CLIP_TRIGGERED_DEFEAT_SOUND = "defeat_"; public static final String CLIP_TRIGGERED_VICTORY_SOUND = "victory_"; public static final String CLIP_BATTLE_AA_HIT = "battle_aa_hit"; public static final String CLIP_BATTLE_AA_MISS = "battle_aa_miss"; public static final String CLIP_BATTLE_AIR = "battle_air"; public static final String CLIP_BATTLE_AIR_SUCCESSFUL = "battle_air_successful"; public static final String CLIP_BATTLE_BOMBARD = "battle_bombard"; public static final String CLIP_BATTLE_FAILURE = "battle_failure"; public static final String CLIP_BATTLE_LAND = "battle_land"; public static final String CLIP_BATTLE_RETREAT_AIR = "battle_retreat_air"; public static final String CLIP_BATTLE_RETREAT_LAND = "battle_retreat_land"; public static final String CLIP_BATTLE_RETREAT_SEA = "battle_retreat_sea"; public static final String CLIP_BATTLE_RETREAT_SUBMERGE = "battle_retreat_submerge"; public static final String CLIP_BATTLE_SEA_NORMAL = "battle_sea_normal"; public static final String CLIP_BATTLE_SEA_SUBS = "battle_sea_subs"; public static final String CLIP_BATTLE_SEA_SUCCESSFUL = "battle_sea_successful"; public static final String CLIP_BATTLE_STALEMATE = "battle_stalemate"; public static final String CLIP_BOMBING_ROCKET = "bombing_rocket"; public static final String CLIP_BOMBING_STRATEGIC = "bombing_strategic"; public static final String CLIP_GAME_START = "game_start"; public static final String CLIP_GAME_WON = "game_won"; public static final String CLIP_TRIGGERED_NOTIFICATION_SOUND = "notification_"; public static final String CLIP_PHASE_BATTLE = "phase_battle"; public static final String CLIP_PHASE_END_TURN = "phase_end_turn"; public static final String CLIP_PHASE_MOVE_COMBAT = "phase_move_combat"; public static final String CLIP_PHASE_MOVE_NONCOMBAT = "phase_move_noncombat"; public static final String CLIP_PHASE_PLACEMENT = "phase_placement"; public static final String CLIP_PHASE_POLITICS = "phase_politics"; public static final String CLIP_PHASE_PURCHASE = "phase_purchase"; public static final String CLIP_PHASE_TECHNOLOGY = "phase_technology"; public static final String CLIP_PHASE_USER_ACTIONS = "phase_user_actions"; public static final String CLIP_PLACED_AIR = "placed_air"; public static final String CLIP_PLACED_INFRASTRUCTURE = "placed_infrastructure"; public static final String CLIP_PLACED_LAND = "placed_land"; public static final String CLIP_PLACED_SEA = "placed_sea"; public static final String CLIP_POLITICAL_ACTION_FAILURE = "political_action_failure"; public static final String CLIP_POLITICAL_ACTION_SUCCESSFUL = "political_action_successful"; public static final String CLIP_REQUIRED_ACTION = "required_action"; public static final String CLIP_REQUIRED_YOUR_TURN_SERIES = "required_your_turn_series"; public static final String CLIP_TECHNOLOGY_FAILURE = "technology_failure"; public static final String CLIP_TECHNOLOGY_SUCCESSFUL = "technology_successful"; public static final String CLIP_TERRITORY_CAPTURE_BLITZ = "territory_capture_blitz"; public static final String CLIP_TERRITORY_CAPTURE_CAPITAL = "territory_capture_capital"; public static final String CLIP_TERRITORY_CAPTURE_LAND = "territory_capture_land"; public static final String CLIP_TERRITORY_CAPTURE_SEA = "territory_capture_sea"; public static final String CLIP_USER_ACTION_FAILURE = "user_action_failure"; public static final String CLIP_USER_ACTION_SUCCESSFUL = "user_action_successful";
Here is a description of how sounds work (some of it is a little technical but might be helpful):
* How it works: <br> * <b>Sound.Default.Folder</b>=ww2 <br> * This is the "key" that tells the engine which sound folder to use as the DEFAULT sound folder. * <br> * The default folders are as follows: <br> * "<b>ww2</b>" (which should cover ww1 - ww2 - ww3 sounds), <br> * "<b>preindustrial</b>" (anything from muskets/cannons (1500) to right before ww1 (1900), <br> * "<b>classical</b>" (the ancient era, anything before cannons became a mainstay (10,000 bce - 1500 * ad) <br> * "<b>future</b>" (sci-fi, spaceships, lasers, etc) <br> * <br> * After this, you can specify specific sounds if you want, using the "sound key location" (aka: * sound map folder). <br> * The sound key location is the exact folder name for a sound you want, located under the "generic" * folder. What I mean by this is that all sound key locations that triplea supports, are the names * of all the folders in the "assets/sounds/generic/" folder. <br> * example: <br> * <b>battle_aa_miss</b>=ww2/battle_aa_miss;future/battle_aa_miss/battle_aa_miss_01_ufo_flyby.mp3 * <br> * "battle_aa_miss" is one of the folders under "generic", therefore it is a "sound location key" * <br> * We can set this equal to any list of sounds paths, each separated by a semicolon (;). The engine * will pick one at random each time we need to play this sound. <br> * The "sound path" can be a "folder" or a "file". If it is a folder, we will use all the sounds in * that folder. If it is a file, we will only use that file. We can use a file and folder and * another file and another folder, all together. <br> * Example: "<b>ww2/battle_aa_miss</b>" is the sound path for a folder, so we will use all the * sounds in that folder. "<b>future/battle_aa_miss/battle_aa_miss_01_ufo_flyby.mp3</b>" is a * specific file, so we will use just this file. Because we use both of these together, the engine * will make a list of all the files in that folder, plus that single file we specified, then it * will randomly pick one of this whole list every time it needs to play the "battle_aa_miss" sound. * <br> * <br> * So, lets say that you want to play 2 sounds, for the "battle_land" sound key. One of them is * located at "tripleainstallfolder/assets/sounds/generic/battle_land_01_angry_drumming_noise.mp3". * The other is located at * "tripleainstallfolder/assets/sounds/classical/battle_land_02_war_trumpets.mp3". Then the entry * would look like this: <br> * battle_land= * generic/battle_land_01_angry_drumming_noise.mp3;classical/battle_land_02_war_trumpets.mp3 <br> * If you wanted it to also play every single sound in the * "tripleainstallfolder/assets/sounds/ww2/battle_land/" folder, then you would add that folder to * path: <br> * battle_land= generic/battle_land_01_angry_drumming_noise.mp3; * classical/battle_land_02_war_trumpets.mp3;ww2/battle_land <br> * <br> * Furthermore, we can customize the sound key by adding "_nationName" onto the end of it. So if you * want a specific sound for a german land attack, then use: <br> * battle_land<b>_Germans</b>=misc/battle_land/battle_land_Germans_panzers_and_yelling_in_german.mp3 * <br> * You can use nation specific sound keys for almost all sounds, though things like game_start, or * chat_message, will never use them. <br> * <br> * <br> * <b>You do not need to specify every single "sound key". This is why/because we have the * "Sound.Default.Folder".</b> <br> * <br> * The logic is as follows: <br> * Engine needs to play the "game_start" sound. <br> * 1. Check for a sound.properties file. <br> * 2. If none exists, pretend that one exists and that it only contains this line: * "Sound.Default.Folder=ww2" <br> * 3. Look in the sound.properties file for the specific sound key "game_start" <br> * 4. Create a list of all sounds that the key includes. If no key, then just use all the sounds in * "Sound.Default.Folder/sound_key/" (which for us would be "ww2/game_start/" folder). <br> * 5. If no sounds are found, then use all the sounds located at "generic/sound_key/" (which for us * would be "generic/game_start"). (if any sounds are found in step 4 above, then we ignore the * generic folder completely) <br> * 6. Randomize the list's order, then pick one, and play the sound.
Thanks a lot now we got something to work with with.
It seems that all the sound options in the sound options window is represented in the engine sound paths. I am not sure if they also work, but I will maybe find out. If they dont work, you can espect some fix requests!
But your list has 3 additional 3 sound paths, not represented in the window:
public static final String CLIP_BATTLE_X_HIT = "_hit"; public static final String CLIP_BATTLE_X_MISS = "_miss"; public static final String CLIP_BATTLE_X_PREFIX = "battle_";
What are they? Is it dice miss and hit? And what is prefix / battle_ ???
@Frostion Those 3 paths appear to be related to AA unit hit/miss sounds when AA type is not the default "AA". So you could have say an anti-tank unit with type=AntiTankType with a custom hit/miss sound by specifying:
So essentially custom AA type sounds instead of:
public static final String CLIP_BATTLE_AA_HIT = "battle_aa_hit"; public static final String CLIP_BATTLE_AA_MISS = "battle_aa_miss";
This is the code which always makes the XML AA type lowercase as well:
SoundPath.CLIP_BATTLE_X_PREFIX + aaType.toLowerCase() + SoundPath.CLIP_BATTLE_X_HIT
@redrum I believe I know or can easily imagine everything of at least what any of these are generally doing except only "required action" and "click plot". What are those for?
@Cernel "required action" and "click plot" appear to do nothing.
@redrum Very nice that we can possibly make custom AA type sounds! I hope it works.
I would have hoped that the "click plot" was a sound played when the player was setting up the waypoints of a multi movement unit that is to go through a ctrl click planned path. It is a route "plotted" in by the player
@Frostion That could have been the intention, I don't really know. That or it was for maybe one of the games that was removed like chess or it just was never fully implemented.
@redrum Any other cases? It would be particularly good documenting (in pos2, I suppose) everything that is pointless (if not removing it from the engine and the assets).
@redrum I guess required action was meant to be a sound that you would be getting when someone else makes a politic or user action that requires your approval. It would be fairly useful, in some games, I suppose. Getting a politic request from the AI in Feudal Japan comes to mind.
But either way, sound properties should be better documented in POS2.
@redrum You know that both those sounds have actual sounds in "generic" right?
These are the sounds:
@Frostion The problem with custom sounds for AA is that they play each time the AA shoots, so, if you have an AA that shoots after the first round, you keep hearing the sound, which doesn't make sense with the fact that the battle sound is only at the start of the battle instead, thus overlapping with the first AA sound. Either they should both play at the start of each round of combat or they should both play only on the first one.
@Cernel Well, I have never used custom AA sounds, but I will try it out in the Warcraft map. As some weird coincidence, I think all AA firing on the map is only done in the first round. No AA is capable of firing more than 1 round
@Frostion Good for you, then be sure that the first AA firing mixes well with the battle sound, as they will play at once. Probably the following ones will too, unless the battle sound is short or players have to think during AA casualties selection (unless it is random).
I am right now sitting a long way apart from my computer, on my phone, thinking of TripleA map map making, so please excuse that I do not just test this out via an xml. But...
If I want to add a specific custom sound to a notification, is it as simple as just:
... adding a triggered notification to a trigger. Like a notification called "niceSound"
... then add, to the sound.properties file, a line called
... and ofcours have the mp3 file in the "sounds" directory.
??? Or does there have to be something written in the notifications txt file also???
I am asking as I have been playing around with sound files lately, but not so much with custom condition and triggered "event" like sounds.
Michael Hoover last edited by
@Frostion Did you test this out to see if it works as you thought?
I am making a map and am getting into the sounds now so I am curious!
@Michael-Hoover Custom AA sounds work nicely
So like when a battle runs, it plays normal battle sound.
But when there are units with a certain type of AA, it also plays the sound fitting that “type”. So <option name="typeAA" value="Wall-Archer"/> plays the sound file named aa_wall-archer.mp3
The battle sound only plays once during the first battle round, but the aa sounds play ever battle round they are active.
I use the same sound on both hits and mis, so I have this in my sounds file:
I hope I am using the sound option correctly ? @devs
I have not tested out if it can actually plays different sounds on hit and miss. But it would make sense if you are going for units with like "anti-tank guns" that both files included a fire sound, but only the hit had an explosion sound at the end.
@Michael-Hoover Also, notification sounds work (If you want to know how)
You can have a sound play when a notification pops up on screen like this:
In the XML:
<option name="notification" value="GreatBattleArthur"/>
In the notification file:
GreatBattleArthur=<body><center><img src="GreatBattleArthur.png"/></center><h3><img src="textdotsmall_00.png"/>Humans under Arthur win a great battle!</h3><img src="textdotsmall_00.png"/>Humans gain 100 Veterans<br><br></body>
In the sounds file:
The sound dir has the above mention files, of course. One random one i played.