Difference between revisions of "Template:InfoBox UOSound"

m
m
Line 1: Line 1:
<includeonly>{{UOSoundData}}{{#vardefine: sound |{{#expr: {{#replace:{{PAGENAME}}|UO:Items that make sound |}} - 1}} }}
+
<includeonly>{{UOSoundData}}{{#vardefine: sound |{{#replace:{{PAGENAME}}|UO:Items that make sound |}} }}
 
{| class=infobox style="margin-top: 5em;"
 
{| class=infobox style="margin-top: 5em;"
 
|class=titlecell colspan="2"| Sound
 
|class=titlecell colspan="2"| Sound
 
|-
 
|-
|colspan="2" style="text-align:center;"|{{#ifeq:{{#arrayindex:sound{{#var:sound}}|0}}|unused|This sound number is not used by the client.|[[File:UO-Sound-{{#var:sound}}-1.mp3|File:UO-Sound-{{#var:sound}}-1.mp3]]
+
|colspan="2" style="text-align:center;"|{{#ifeq:{{#arrayindex:sound{{#var:sound}}|0}}|unused|This sound number is not used by the client.|[[File:UO-Sound-{{#expr: {{#var:sound}} - 1}}-1.mp3|File:UO-Sound-{{#expr: {{#var:sound}} - 1}}-1.mp3]]
 
{{!}}-
 
{{!}}-
 
{{!}}&nbsp;
 
{{!}}&nbsp;
Line 15: Line 15:
 
{{!}}Number (hex)*{{!!}}{{#ifeq: {{#var:sound}}|1|0x01|{{Dec2hex|{{#var:sound}}}}}}
 
{{!}}Number (hex)*{{!!}}{{#ifeq: {{#var:sound}}|1|0x01|{{Dec2hex|{{#var:sound}}}}}}
 
{{!}}-
 
{{!}}-
{{!}} colspan=2 {{!}} * Note that internally, a sound packet (packet 0x54) uses a [[Wikipedia:Word_(computer_architecture)|word]] index starting from 0, not 1.  This means that sound #1 internally has packet ID #0.
+
{{!}} colspan=2 {{!}} <div>* Note that internally, a sound packet (packet 0x54) uses a [[Wikipedia:Word_(computer_architecture)|word]]-sized index starting from 0, not 1.  This means that sound #1 internally has packet ID #0.<div>
 
{{!}}}[[Category:UO Items Using Specific Sounds]]}}</includeonly>
 
{{!}}}[[Category:UO Items Using Specific Sounds]]}}</includeonly>

Revision as of 15:50, 29 March 2020