Minecraft Wiki
("-" support for sound/1, subtitle/2 and translationkey/6, removed code formatting from id and translationkey if not provided)
m (this should keep the references close to the table...)
Line 11: Line 11:
 
--></tr>}}<tr><!--
 
--></tr>}}<tr><!--
 
--><td>{{#ifeq: {{{sound|{{{1|}}}}}} | - | - | {{#if: {{{sound|{{{1|}}}}}} | {{Sound||{{{sound|{{{1}}}}}}|{{{sound2|}}}|{{{sound3|}}}|{{{sound4|}}}|{{{sound5|}}}|{{{sound6|}}}|{{{sound7|}}}|{{{sound8|}}}|{{{sound9|}}}|{{{sound10|}}}|{{{sound11|}}}|{{{sound12|}}}}} | ?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sounds]]}} }} }}</td><!--
 
--><td>{{#ifeq: {{{sound|{{{1|}}}}}} | - | - | {{#if: {{{sound|{{{1|}}}}}} | {{Sound||{{{sound|{{{1}}}}}}|{{{sound2|}}}|{{{sound3|}}}|{{{sound4|}}}|{{{sound5|}}}|{{{sound6|}}}|{{{sound7|}}}|{{{sound8|}}}|{{{sound9|}}}|{{{sound10|}}}|{{{sound11|}}}|{{{sound12|}}}}} | ?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sounds]]}} }} }}</td><!--
-->{{#if: {{{bedrock|{{{dungeons|}}}}}} ||<td>{{#ifeq: {{{subtitle|{{{2|}}}}}} | - | ''None''<ref name="nosubtitle">{{bug|MC-177082}}</ref> | {{{subtitle|{{{2|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing subtitles‎]]}} }}}}}}}}</td>}}<!--
+
-->{{#if: {{{bedrock|{{{dungeons|}}}}}} ||<td>{{#ifeq: {{{subtitle|{{{2|}}}}}} | - | ''None''<ref group="sound table note" name="nosubtitle">{{bug|MC-177082}}</ref> | {{{subtitle|{{{2|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing subtitles‎]]}} }}}}}}}}</td>}}<!--
 
-->{{#if: {{{bedrock|{{{dungeons|}}}}}} ||<td>{{{source|{{{3|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound source‎]]}} }}}}}}</td>}}<!--
 
-->{{#if: {{{bedrock|{{{dungeons|}}}}}} ||<td>{{{source|{{{3|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound source‎]]}} }}}}}}</td>}}<!--
 
--><td>{{{description|{{{4|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound description]]}} }}}}}}</td><!--
 
--><td>{{{description|{{{4|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound description]]}} }}}}}}</td><!--
 
--><td>{{#if: {{{id|{{{5|}}}}}} | {{code|{{{id|{{{5|}}}}}}}} | ?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound ID‎]]}} }}</td><!--
 
--><td>{{#if: {{{id|{{{5|}}}}}} | {{code|{{{id|{{{5|}}}}}}}} | ?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound ID‎]]}} }}</td><!--
-->{{#if: {{{bedrock|{{{dungeons|}}}}}} ||<td>{{#ifeq: {{{translationkey|{{{6|}}}}}} | - | ''None''<ref name="nosubtitle"/> | {{#if: {{{translationkey|{{{6|}}}}}} | {{code|{{{translationkey|{{{6|}}}}}}}} | ?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing subtitle key‎]]}} }} }}</td>}}<!--
+
-->{{#if: {{{bedrock|{{{dungeons|}}}}}} ||<td>{{#ifeq: {{{translationkey|{{{6|}}}}}} | - | ''None''<ref group="sound table note" name="nosubtitle"/> | {{#if: {{{translationkey|{{{6|}}}}}} | {{code|{{{translationkey|{{{6|}}}}}}}} | ?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing subtitle key‎]]}} }} }}</td>}}<!--
 
-->{{#if: {{{dungeons|}}} ||<td>{{{volume|{{{7|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound volume‎]]}} }}}}}}</td>}}<!--
 
-->{{#if: {{{dungeons|}}} ||<td>{{{volume|{{{7|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound volume‎]]}} }}}}}}</td>}}<!--
 
-->{{#if: {{{dungeons|}}} ||<td>{{{pitch|{{{8|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound pitch‎]]}} }}}}}}</td>}}<!--
 
-->{{#if: {{{dungeons|}}} ||<td>{{{pitch|{{{8|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound pitch‎]]}} }}}}}}</td>}}<!--
 
-->{{#if: {{{bedrock|{{{dungeons|}}}}}} ||<td>{{{distance|{{{9|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound attenuation distance‎]]}} }}}}}}</td>}}<!--
 
-->{{#if: {{{bedrock|{{{dungeons|}}}}}} ||<td>{{{distance|{{{9|?{{#ifeq: {{#var: nocat | 0 }} | 1 || [[Category:Pages missing sound attenuation distance‎]]}} }}}}}}</td>}}<!--
--></tr>{{#if: {{{foot|}}} | {{#vardefine: soundstable|}}{{#vardefine: nocat|}}</table>}}</includeonly><noinclude>{{Documentation}}</noinclude>
+
--></tr>{{#if: {{{foot|}}} | {{#vardefine: soundstable|}}{{#vardefine: nocat|}}</table>{{notelist|sound table note}}}}</includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 11:20, 9 April 2020

[view | edit | history | purge]Documentation
Lua logo
This template uses Module:Sound table, a script written in Lua.

A template that automatically generates a table for sounds.
Java Edition table:

SoundSubtitleSourceDescriptionNamespaced IDTranslation keyVolumePitchAttenuation distance
??? ? ??? ? ?

Historical table:

SoundSubtitleSourceDescriptionNamespaced IDTranslation keyVolumePitchAttenuation distance
??? ? ??? ? ?

Bedrock Edition table:

SoundSubtitleSourceDescriptionNamespaced IDTranslation keyVolumePitchAttenuation distance
??? ? ??? ? ?

Minecraft Dungeons and Minecraft Legends table:

SoundSubtitleSourceDescriptionNamespaced IDTranslation keyVolumePitchAttenuation distance
??? ? ??? ? ?

Arguments

Parameter Function
type bedrock, dungeons, legends or historical. Inserting a table with a type parameter, see above for corresponding output, if defined has to be defined in the first call (no need to define it on consecutive calls).
forcecollapsed Forces the table to begin collapsed. If defined, it must be defined in the first call (no need to define it on consecutive calls).
nocat Stops table from inserting categories, if defined has to be defined in the first call (no need to define it on consecutive calls).
sound The sound, set to "-" if none in this event.
sound2 - sound20 Additional sounds.
rowspan How many rows the Sound column for this row should take up.
subtitle The subtitle, set to "-" if none in this event.
source The sound category (slider in the sounds menu). Should be one of the following:
  • Master Volume (or master)
  • Music (or music)
  • Jukebox/Note Blocks (or record)
  • Weather (or weather)
  • Hostile Creatures (or hostile)
  • Friendly Creatures (or neutral)
  • Players (or player)
  • Blocks (or block)
  • Ambient/Environment (or ambient)
  • Voice/Speech (or voice)
  • Sound (or sound)
  • Entity-Dependent (or dependent)
  • None (or none or -)

"Sound" is exclusive to Bedrock Edition and historical Java Edition versions. "Entity-Dependent" is for entities that play sounds, such as footsteps, using their own sound sources. "None" is exclusive to unused sound events.

overridesource Set to any value for the source to use what is given to the template, rather than one of the values above.
description When the sound plays.
id The sound event/resource location (code formatting automatically added). Do not add anything other than the id here; that goes in idnote.
idnote Text, such as a reference, to be added after the id, without code formatting.
translationkey The subtitle key/translation key (code formatting automatically added), set to "-" if none in this event. Do not add anything other than the translation key here; that goes in translationkeynote.
translationkeynote Text, such as a reference, to be added after the translation key, without code formatting.
volume The volume the game plays this sound event at.
pitch The pitch the game plays this sound event at.
distance The attenuation distance the game plays this sound event at.
foot Inserting the table end, always has to be defined in the last call.

Predefined tables

[view | edit | history | purge]The above documentation is transcluded from Template:Sound table/doc.