Difference between revisions of "Creditstable"

From Sega Retro

 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><div style="font-size: 90%">{{{1|}}}</div>{{#if: {{{source|}}} |
+
<includeonly>{{clearvar|i|j}}<div style="font-size: 90%">{{{1|}}}</div>{{#if: {{{source|}}} |
: ''Source: {{{source}}}''{{#if: {{{pdf|}}} |{{fileref|{{{pdf}}}|page={{{pdfpage|}}}}}| [[Category:Credits without reference]] }} | [[Category:Credits without source]] }}
+
<dt class="creditsource">''Source'':</dt> <dd>''{{{source|}}}''{{#if:{{{pdf|}}}|{{UseFile|{{{pdf|}}}}}{{fileref|{{{pdf|}}}|page={{{pdfpage|}}}}}}}{{#if:{{{file|}}}|{{UseFile|{{{file|}}}}}{{fileref|{{{file|}}}}}}}{{#if:{{{ref|}}}|{{ref|1={{{ref|}}}}}}} | [[Category:Credits without source]] }}</dd>{{#if:{{{pdf|}}}{{{file|}}}{{{ref|}}}||[[Category:Credits without reference]]}}
<div style="display:none;">
+
{{rep|{{{1|}}}|'''||***|*|**|*|var=allLines}}{{#vardefine:i|1}}{{#iferror:{{#var:allLines}}|{{#var:allLines}}|
{{#vardefine:currentLine|NULL}}{{#vardefine:i|1}}
+
{{#while:|{{#vardefine:currentLine|{{#explode:{{#var:allLines}}|*|{{#var:i}}}}}}{{#var:currentLine}}
{{#vardefine:allLines|{{#replace:{{#replace:{{{1|}}}|'''}}|**|*}}}}
+
| {{incvar|i}}{{#vardefine:currentLine2|{{striphtml|1={{#var:currentLine}}|removediv=yes}}}}{{clearvar|currentRole|currentNames}}
{{#while:
+
{{#if:{{#pos:{{#var:currentLine2}}|:}}|{{let|currentRole={{#explode:{{#var:currentLine2}}|:|0}}|currentNames={{#explode:{{#var:currentLine2}}|:|1}}}}
| {{#ifexpr:{{#len:{{#var:currentLine}}}} > 3|true|}}
+
|{{#vardefine:currentNames|{{#var:currentLine2}}}}}}{{StoreCreditsLine
| {{#vardefine:currentLine|{{#explode:{{#var:allLines}}|*|{{#var:i}}}}}}{{incvar|i}}
+
| role={{#var:currentRole}}
 
+
| nameList={{#var:currentNames}}
{{#if:{{#pos:{{#var:currentLine}}|<}}|{{#vardefine:currentLine2|{{striphtml|1={{#var:currentLine}}|removediv=yes}}}}|{{#vardefine:currentLine2|{{#var:currentLine}}}}}}
+
| game={{#explode:{{PAGENAME}}|/Production credits|0}}
{{#vardefine:currentRole|{{#explode:{{#var:currentLine2}}|:|0}}}}{{#vardefine:currentNames|{{#explode:{{#var:currentLine2}}|:|1}}}}
+
| console={{#explode:{{{console|}}}|,|0}}
{{#vardefine:currentNames|{{#replace:{{#var:currentNames| |&#32;}}
+
| date={{{date|}}}
{{#vardefine:currentNames|{{#replace:{{#var:currentNames}}|&#32;&&#32;|,&#32;}}}}{{#vardefine:currentNames|{{#replace:{{#var:currentNames}}|&#32;and&#32;|,&#32;}}}}{{#vardefine:currentNames|{{#replace:{{#var:currentNames}}|/|,&#32;}}}}{{#replace:{{#var:currentNames}}|:|,&#32;}}}}{{#vardefine:currentNames|{{#replace:{{#var:currentNames}}|(|,&#32;(}}}}
+
| source={{{source|}}}
{{#ifexpr:{{#len:{{#var:currentNames}}}} > 0|
+
| pdf={{first|1={{{pdf|}}}|2={{{file|}}}}}
{{StoreCreditsLine|role={{#var:currentRole}}|nameList={{#var:currentNames}}|game={{PAGENAME}}|console={{{console|}}}|date={{{date|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}}}
+
| pdfpage={{{pdfpage|}}}
|}}
+
}}<!-- console loop is unrolled so we're not hitting the loop limit -->{{
}}{{#if:{{{console|}}}||[[Category:Creditstable with no console field]]}}</div></includeonly><noinclude>
+
#if:{{#explode:{{{console|}}}|,|1}}<!-- second console -->
{{#cargo_declare:_table=credits|role=Text|name=Text|game=Text|console=Text|date=Text|pdf=Text|pdfpage=Integer}}
+
|{{StoreCreditsLine
 +
| role={{#var:currentRole}}
 +
| nameList={{#var:currentNames}}
 +
| game={{#explode:{{PAGENAME}}|/Production credits|0}}
 +
| console={{#explode:{{{console|}}}|,|1}}
 +
| date={{{date|}}}
 +
| source={{{source|}}}
 +
| pdf={{first|1={{{pdf|}}}|2={{{file|}}}}}
 +
| pdfpage={{{pdfpage|}}}
 +
}}{{
 +
#if:{{#explode:{{{console|}}}|,|2}}<!-- third console -->
 +
|{{StoreCreditsLine
 +
| role={{#var:currentRole}}
 +
| nameList={{#var:currentNames}}
 +
| game={{#explode:{{PAGENAME}}|/Production credits|0}}
 +
| console={{#explode:{{{console|}}}|,|2}}
 +
| date={{{date|}}}
 +
| source={{{source|}}}
 +
| pdf={{first|1={{{pdf|}}}|2={{{file|}}}}}
 +
| pdfpage={{{pdfpage|}}}
 +
}}{{
 +
#if:{{#explode:{{{console|}}}|,|3}}<!-- fourth console -->
 +
|{{StoreCreditsLine
 +
| role={{#var:currentRole}}
 +
| nameList={{#var:currentNames}}
 +
| game={{#explode:{{PAGENAME}}|/Production credits|0}}
 +
| console={{#explode:{{{console|}}}|,|3}}
 +
| date={{{date|}}}
 +
| source={{{source|}}}
 +
| pdf={{first|1={{{pdf|}}}|2={{{file|}}}}}
 +
| pdfpage={{{pdfpage|}}}
 +
}}{{
 +
#if:{{#explode:{{{console|}}}|,|4}}<!-- fifth console -->
 +
|{{StoreCreditsLine
 +
| role={{#var:currentRole}}
 +
| nameList={{#var:currentNames}}
 +
| game={{#explode:{{PAGENAME}}|/Production credits|0}}
 +
| console={{#explode:{{{console|}}}|,|4}}
 +
| date={{{date|}}}
 +
| source={{{source|}}}
 +
| pdf={{first|1={{{pdf|}}}|2={{{file|}}}}}
 +
| pdfpage={{{pdfpage|}}}
 +
}}
 +
}}
 +
}}
 +
}}
 +
}}
 +
}}}}{{#if:{{{console|}}}||[[Category:Creditstable with no console field]]}}</includeonly><noinclude>
 +
{{#cargo_declare:
 +
_table=credits
 +
|role=Text
 +
|name=Page
 +
|game=Text
 +
|console=Text
 +
|date=Text
 +
|source=Text
 +
|pdf=File
 +
|pdfpage=Integer
 +
}}
 
==Usage==
 
==Usage==
 
===Example===
 
===Example===
Line 37: Line 95:
 
|source=In-game credits
 
|source=In-game credits
 
|console=32X
 
|console=32X
 +
|pdf=GamePro US 001.pdf
 +
|pdfpage=10
 
}}
 
}}
  
[[Category:Sega Retro templates]]</noinclude>
+
===Sources===
 +
The following are common sources for credits:
 +
* '''In-game credits:''' Credits displayed in-game, usually at the end of the game. For a single credits screenshot, upload the screenshot as a PNG. For multiple screenshots, compile the screenshots into a PDF.
 +
* '''xx manual:''' Credits printed in an instruction manual. Replace "xx" with the corresponding [[wikipedia:ISO 3166-1 alpha-2|ISO 3166-1 alpha-2]] code (e.g. JP or US) and specify what page the credits can be found at in the PDF.
 +
* '''Uncredited:''' Roles that are not credited anywhere in a game or its instruction manuals.
 +
 
 +
[[Category:Templates]]</noinclude>

Latest revision as of 11:25, 19 October 2024

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

Usage

Example

{{creditstable|
{{creditsheader|Header}}
* '''Role 1:''' Name
* '''Role 2:''' Name
|source=In-game credits
|console=MD
|pdf=GamePro US 001.pdf
|pdfpage=10
}}
Header
  • Role 1: Name
  • Role 2: Name
Source:
In-game credits[1]


Sources

The following are common sources for credits:

  • In-game credits: Credits displayed in-game, usually at the end of the game. For a single credits screenshot, upload the screenshot as a PNG. For multiple screenshots, compile the screenshots into a PDF.
  • xx manual: Credits printed in an instruction manual. Replace "xx" with the corresponding ISO 3166-1 alpha-2 code (e.g. JP or US) and specify what page the credits can be found at in the PDF.
  • Uncredited: Roles that are not credited anywhere in a game or its instruction manuals.
  • File:GamePro US 001.pdf, page 10