Hearthstone Wiki
Hearthstone Wiki
m
m
Line 1: Line 1:
 
<includeonly><!--
 
<includeonly><!--
   
// Step 1: Import data
+
// Importing data
 
// Users can use one of these where parameters as a where clause to find the sound data page: id, pagename, data_page, dbfId. Then, the template will return id of card and find the corresponding sound data.
 
// Users can use one of these where parameters as a where clause to find the sound data page: id, pagename, data_page, dbfId. Then, the template will return id of card and find the corresponding sound data.
// If no where parameter is defined, the template will automatically find it through the pagename. Possible errors include page name with special characters, such as '
+
// If no where parameter is defined, the template will automatically find it through the pagename. Possible errors include page name with special characters, such as '.
  +
// If no sound data page with such id is found, the template will temporarily query through the official database, which is stored at Template:Sounds table.
   
 
-->{{#cargo_query:tables=Cards
 
-->{{#cargo_query:tables=Cards
 
|fields=Cards.id=id
 
|fields=Cards.id=id
|where=cost>="0" <!--
+
|where=cost>="0"
  +
{{#if:{{{id|}}}{{{data_page|}}}{{{dbfId|}}}||AND _pageName="{{{pageName|{{FULLPAGENAME}}}}}"}}
// Where clauses
 
-->{{#if:{{{id|}}}{{{data_page|}}}{{{dbfId|}}}||AND _pageName="{{{pageName|{{FULLPAGENAME}}}}}"}}<!--
+
{{#if:{{{id|}}}|AND id="{{{id|}}}"}}
-->{{#if:{{{id|}}}|AND id="{{{id|}}}"}}<!--
+
{{#if:{{{dbfId|}}}|AND dbfId="{{{dbfId}}}"}}
-->{{#if:{{{dbfId|}}}|AND dbfId="{{{dbfId}}}"}}<!--
+
{{#if:{{{data_page|}}}|AND data_page="{{{data_page}}}"}}
 
|limit=1
-->{{#if:{{{data_page|}}}|AND data_page="{{{data_page}}}"}}<!--
 
-->|limit=1
 
 
|format=template
 
|format=template
 
|template=Card article sounds/Get data
 
|template=Card article sounds/Get data
Line 20: Line 20:
 
}}<!--
 
}}<!--
   
  +
// Layout
// Step 2: Implement a layout/display template, as well as custom parameters
 
 
// Custom parameters: summon, trigger, attack, death, TRANSCRIPT_play, TRANSCRIPT_trigger, TRANSCRIPT_attack, TRANSCRIPT_death, TRANSCRIPT_VO, TRANSCRIPT_UNKNOWN, TRANSCRIPT_other, TYPE_VO (for heroes), TYPE_UNKNOWN (for heroes)
 
// Custom parameters: summon, trigger, attack, death, TRANSCRIPT_play, TRANSCRIPT_trigger, TRANSCRIPT_attack, TRANSCRIPT_death, TRANSCRIPT_VO, TRANSCRIPT_UNKNOWN, TRANSCRIPT_other, TYPE_VO (for heroes), TYPE_UNKNOWN (for heroes)
 
// Custom parameter for layout: style. (hero)
 
// Custom parameter for layout: style. (hero)
Line 50: Line 50:
 
}}<!--
 
}}<!--
   
// Step 3: Store the sound data into the table
+
// Storing data to CustomSounds table
 
// While the data is here, they are not actually imported into the wiki's table/database; therefore this step is required.
 
// While the data is here, they are not actually imported into the wiki's table/database; therefore this step is required.
 
// Transcripts are not stored
 
// Transcripts are not stored
Line 68: Line 68:
 
| CUSTOM_trigger = {{#var:sound_CUSTOM_trigger}}
 
| CUSTOM_trigger = {{#var:sound_CUSTOM_trigger}}
 
| CUSTOM_other = {{#var:sound_CUSTOM_other}}
 
| CUSTOM_other = {{#var:sound_CUSTOM_other}}
}}}}<!--
+
}}}}</includeonly><noinclude><!--
   
 
// Delcaring table part. Recreate data if this part is modified.
// The end.
 
 
--></includeonly><noinclude><!--
 
 
// This is the delcaring table part. Recreate data if this part is modified.
 
   
 
-->{{#cargo_declare:
 
-->{{#cargo_declare:
_table=CustomSounds<!--
+
_table=CustomSounds
 
// Official parameters used to compare user data with official data Sounds
 
 
-->
 
 
| id = String
 
| id = String
 
| BASIC_play = List (,) of String
 
| BASIC_play = List (,) of String
Line 88: Line 80:
 
| SPELL = List (,) of String
 
| SPELL = List (,) of String
 
| VO = List (,) of String
 
| VO = List (,) of String
| UNKNOWN = List (,) of String<!--
+
| UNKNOWN = List (,) of String
 
// Custom parameters
 
   
-->
 
 
| CUSTOM_BASIC_play = List (,) of String
 
| CUSTOM_BASIC_play = List (,) of String
 
| CUSTOM_BASIC_attack = List (,) of String
 
| CUSTOM_BASIC_attack = List (,) of String
Line 100: Line 89:
 
}}<!--
 
}}<!--
   
  +
// Documentation
// Displaying this template page for documentation and categorizing template.
 
   
 
-->{{documentation}}[[Category:Formatting templates|{{PAGENAME}}]][[Category:Semantics|{{PAGENAME}}]]</noinclude>
 
-->{{documentation}}[[Category:Formatting templates|{{PAGENAME}}]][[Category:Semantics|{{PAGENAME}}]]</noinclude>

Revision as of 16:11, 12 June 2021

This template defines the table "CustomSounds". View table.

The following documentation is transcluded from Template:Card article sounds/doc (edit):

This template allows you to:

  • Format the Sounds section in Category:Cards articles.
  • Find sound data from custom Data:Sounds pages. If not found, it queries sound data from official database in Template:Sounds table.
  • Insert transcripts of the sounds.
  • Store custom information into database/table if the card has a Data:Sounds page.

Usage

For most minion cards
{{Use sounds
 |summon=Transcripts
 |trigger=Transcripts
 |attack=Transcripts
 |death=Transcripts
}}
For most hero cards / full format
{{Card article sounds
 |TRANSCRIPT_play=
 |TYPE_trigger=
 |TRANSCRIPT_trigger=
 |TRANSCRIPT_attack=
 |TRANSCRIPT_death=
 |TYPE_VO=
 |TRANSCRIPT_VO=
 |TYPE_UNKNOWN=
 |TRANSCRIPT_UNKNOWN=
 |TYPE_other=
 |TRANSCRIPT_other=
 |style=hero
}}

Parameters

No description.

Template parameters

ParameterDescriptionTypeStatus
Card pageNamepageName

pageName of the card. Must have one of these required parameters to search card. Default search parameter.

Example
Boulderfist Ogre
Stringrequired
Card idid

Id of the card. Must have one of these required parameters to search card.

Example
EX_001
Stringrequired
Card dbfIddbfId

DbfId of the card. Must have one of these required parameters to search card.

Example
60000
Numberrequired
Card data pagedata_page

Data page of the card. Must have one of these required parameters to search card.

Example
Garrosh Hellscream(1)
Stringrequired
Layout stylestyle

Style for layout on card pages. Currently has values: hero

Example
hero
Stringsuggested
Play transcriptTRANSCRIPT_play summon

Transcript of play/summon sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;

Example
AAA, BBB, CC&#44;CC
Stringsuggested
Trigger transcriptTRANSCRIPT_trigger trigger

Transcript of triggering sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;

Stringsuggested
Attack transcriptTRANSCRIPT_attack attack

Transcript of attacking sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;

Stringsuggested
Death transcriptTRANSCRIPT_death death

Transcript of death sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;

Stringsuggested
VO transcriptTRANSCRIPT_VO

Transcript of VO sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;

Stringsuggested
UNKNOWN transcriptTRANSCRIPT_UNKNOWN

Transcript of UNKNOWN sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;

Stringsuggested
Other transcriptTRANSCRIPT_other

Transcript of other sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;

Stringsuggested
VO typesTYPE_VO

Types of VO sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44; Usually with Template:VO with a list of common definitions.

Example
{{VO|Picked}}, {{VO|SUMMON_SICKNESS}}
Stringsuggested
UNKNOWN typesTYPE_UNKNOWN

Types of UNKNOWN sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;.

Stringsuggested
Trigger typesTYPE_trigger

Types of Triggering sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;.

Example
Trigger: [[Upgrade!]], Trigger: [[Condemn (Rank 1)]]
Stringsuggested
Other typesTYPE_other

Types of Other sounds. Lists of strings separated by ,. Each string with comma can be replaced with &#44;.

Stringsuggested