- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
Difference between revisions of "Audio"
m (updated setting link) |
Putnam3145 (talk | contribs) |
||
Line 10: | Line 10: | ||
{{main|modding}} | {{main|modding}} | ||
− | All sound and [[Soundtrack|music]] files used by ''Dwarf Fortress'' are stored in the [https://en.wikipedia.org/wiki/Ogg .ogg] format within the <code>[[Game folder|<Dwarf Fortress>]]/data/sound/</code> subfolders. You can replace the existing ogg files with different ones. That has to be performed manually and isn't actually supported by the game. You can also change some of the definitions of when certain musical cues are played, using available music tokens and sound tokens in the [[raw file]]s found in <code>[[Game folder|<Dwarf Fortress>]]\data\vanilla\vanilla_music\</code>. | + | All sound and [[Soundtrack|music]] files used by ''Dwarf Fortress'' are stored in the [https://en.wikipedia.org/wiki/Ogg .ogg] format within the <code>[[Game folder|<Dwarf Fortress>]]/data/sound/</code> subfolders. You can replace the existing ogg files with different ones. That has to be performed manually and isn't actually supported by the game. You can also change some of the definitions of when certain musical cues are played, using available music tokens and sound tokens in the [[raw file]]s found in <code>[[Game folder|<Dwarf Fortress>]]\data\vanilla\vanilla_music\</code>. You can add new music and sounds with raws in the sound folder{{version|0.50.09}}, formatted like so: |
+ | |||
+ | sound_file_example | ||
+ | [OBJECT:SOUND_FILE] | ||
+ | [SOUND_FILE:<identifier>] | ||
+ | [FILE:file name] | ||
+ | |||
+ | music_file_example | ||
+ | [OBJECT:MUSIC_FILE] | ||
+ | [MUSIC_FILE:<identifier>] | ||
+ | [FILE:file name] | ||
+ | [AUTHOR:author name] | ||
+ | [LOOPS] optional | ||
+ | [TITLE:piece title] | ||
;Sound effects | ;Sound effects | ||
Line 17: | Line 30: | ||
[SOUND:<identifier>] | [SOUND:<identifier>] | ||
− | [FILE:< | + | [FILE:<file identifier>] |
[ANNOUNCEMENT:<announcement>] | [ANNOUNCEMENT:<announcement>] | ||
... | ... | ||
[ANNOUNCEMENT:<announcement n>] | [ANNOUNCEMENT:<announcement n>] | ||
− | * | + | * Identifiers can be any arbitrary string, just like any other raw object |
* [[announcement]]s trigger condition, can use more than one announcement in the list. | * [[announcement]]s trigger condition, can use more than one announcement in the list. | ||
+ | * File identifiers can be any of various hardcoded sounds (all present in the vanilla raws) or custom sounds. | ||
; Music tracks | ; Music tracks | ||
Line 38: | Line 52: | ||
[FREQUENCY:UNCOMMON] | [FREQUENCY:UNCOMMON] | ||
+ | * File - Can be any of the many hardcoded files, or it can be a custom MUSIC_FILE defined file | ||
+ | * Card - same as file, but intended to be used for short interludes etc | ||
* Event/Context - These are the triggers for the music | * Event/Context - These are the triggers for the music | ||
− | * Frequency (optional) can be set to 'UNCOMMON' to set the frequency half as often as the other candidates | + | * Frequency (optional) can be set to 'UNCOMMON' to set the frequency half as often as the other candidates or 'RARE' to make it 1/5 as often as other candidates |
− | + | Possible events: | |
[EVENT:JUST_EMBARKED] | [EVENT:JUST_EMBARKED] | ||
[EVENT:SIEGE] | [EVENT:SIEGE] | ||
Line 52: | Line 68: | ||
[EVENT:LOST_FORT] | [EVENT:LOST_FORT] | ||
− | + | Possible context : | |
[CONTEXT:ANY] | [CONTEXT:ANY] | ||
[CONTEXT:MAIN] | [CONTEXT:MAIN] | ||
Line 58: | Line 74: | ||
[CONTEXT:SECOND_YEAR_PLUS] | [CONTEXT:SECOND_YEAR_PLUS] | ||
[CONTEXT:CAVERNS_OPENED] | [CONTEXT:CAVERNS_OPENED] | ||
+ | [CONTEXT:SPRING] | ||
+ | [CONTEXT:SUMMER] | ||
+ | [CONTEXT:AUTUMN] | ||
[CONTEXT:WINTER] | [CONTEXT:WINTER] | ||
Revision as of 20:14, 30 June 2023
This article is a stub. You can improve the article by expanding it. |
Dwarf Fortress contains music tracks which play at various points in game, including the main menu theme. Some types of audio seem to be triggered by events, while others play randomly while certain criteria are met. These seem to include some weather sounds, wild ambience, building sounds, river etc.
According to Tarn, there are different settings for every track. One depends on the caverns being opened, one plays only after the second year, one is a first year track. Strike the Earth plays when you first embark, and then gets mixed in with the others afterward. And so forth; there's a raw format for this so you can change it if you like.[1]
Game Audio settings can be adjusted in the settings menu.
Modding
All sound and music files used by Dwarf Fortress are stored in the .ogg format within the <Dwarf Fortress>/data/sound/
subfolders. You can replace the existing ogg files with different ones. That has to be performed manually and isn't actually supported by the game. You can also change some of the definitions of when certain musical cues are played, using available music tokens and sound tokens in the raw files found in <Dwarf Fortress>\data\vanilla\vanilla_music\
. You can add new music and sounds with raws in the sound folderv0.50.09, formatted like so:
sound_file_example [OBJECT:SOUND_FILE] [SOUND_FILE:<identifier>] [FILE:file name]
music_file_example [OBJECT:MUSIC_FILE] [MUSIC_FILE:<identifier>] [FILE:file name] [AUTHOR:author name] [LOOPS] optional [TITLE:piece title]
- Sound effects
All vanilla sound tokens are found within sound_standard.txt
. All sound files must begin with the file name[Verify], followed by the [OBJECT:SOUND]
token that tells the game that the file contains sound definitions.
[SOUND:<identifier>] [FILE:<file identifier>] [ANNOUNCEMENT:<announcement>] ... [ANNOUNCEMENT:<announcement n>]
- Identifiers can be any arbitrary string, just like any other raw object
- announcements trigger condition, can use more than one announcement in the list.
- File identifiers can be any of various hardcoded sounds (all present in the vanilla raws) or custom sounds.
- Music tracks
All vanilla music tokens are found within music_standard.txt
. All music files must begin with the file name[Verify], followed by the [OBJECT:MUSIC]
token that tells the game that the file contains music definitions.
[MUSIC:TRACK_02] [FILE:EXPANSIVE_CAVERN] [CARD:EXPANSIVE_CAVERN_CARD_1] for the shuffled deck of short bits [CARD:EXPANSIVE_CAVERN_CARD_2] [CARD:EXPANSIVE_CAVERN_CARD_3] [CARD:EXPANSIVE_CAVERN_CARD_4] [EVENT:FIRST_CAVERN_OPENED] [CONTEXT:CAVERNS_OPENED] [FREQUENCY:UNCOMMON]
- File - Can be any of the many hardcoded files, or it can be a custom MUSIC_FILE defined file
- Card - same as file, but intended to be used for short interludes etc
- Event/Context - These are the triggers for the music
- Frequency (optional) can be set to 'UNCOMMON' to set the frequency half as often as the other candidates or 'RARE' to make it 1/5 as often as other candidates
Possible events:
[EVENT:JUST_EMBARKED] [EVENT:SIEGE] [EVENT:FIRST_CAVERN_OPENED] [EVENT:MEGABEAST_ATTACK] [EVENT:FORGOTTEN_BEAST_ATTACK] [EVENT:DEATH_SPIRAL] [EVENT:TAVERN_MUSIC_PRESENT] [EVENT:TAVERN_DANCE_PRESENT] [EVENT:LOST_FORT]
Possible context :
[CONTEXT:ANY] [CONTEXT:MAIN] [CONTEXT:FIRST_YEAR] [CONTEXT:SECOND_YEAR_PLUS] [CONTEXT:CAVERNS_OPENED] [CONTEXT:SPRING] [CONTEXT:SUMMER] [CONTEXT:AUTUMN] [CONTEXT:WINTER]