Template:Chapters: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(120 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Note|Currently work in progress.}}
{{Doc}}
<includeonly><onlyinclude>
<includeonly><onlyinclude>
{{#switch:{{{game}}}
{{Table
|#default|hl2 = {{Table<!-- FOR HL2 -->
| align = {{{align|center}}}
| align = center
| class = mw-collapsible {{#switch:{{{state|}}}|collapsed=mw-collapsed|#default=}}
| {{tr
| id = mw-customcollapsible-{{{{{game|hl2}}}|name|nt=0}}
| {{th|colspan=3|{{hl2|4}} Chapters}}
| style = min-width: 770px; <!-- weird because the original width is 762px; but if its seamless then dont touch it -->
}}
|1= {{tr
{{tr
|bgcolor={{{{{game|hl2}}}|col}} <!-- game color is too intense as background, so overlay 60 % black below -->
| {{td|width = 25%| [[Point Insertion]] }}
| {{th
  {{td|width = 25%| [["A Red Letter Day"]] }}
|colspan = 99 <!--may vary per game, 99 is ok -->
  {{td|width = 25%| [[Route Kanal]] }}
|bgcolor = rgba(0,0,0,.7) <!-- 60 % black -->
}}
|1=<!--
{{tr
IMPORTANT: For now, this is how it centers it correctly, if there are translations, REPLACE IT HERE TO CENTER THE TITLE
| {{td|width = 25%| [[Water Hazard]] }}
--><span style="float: left; user-select:none; color: transparent">{{Chapters/strings|TOGGLE}}</span><span>{{#switch: {{{type}}}
  {{td|width = 25%| [[Black Mesa East]] }}
|#default
  {{td|width = 25%| [[Ravenholm|"We don't go to Ravenholm..."]] }}
|chapters={{Chapters/strings|ChaptersTitle1}}|missions={{Chapters/strings|MissionsTitle1}}|camp|campaign|campaigns={{Chapters/strings|CampaignsTitle1}}}} {{{{{game|hl2}}}|2}} {{#switch: {{{type}}}
}}
|#default
{{tr
|chapters={{Chapters/strings|ChaptersTitle2}}|missions={{Chapters/strings|MissionsTitle2}}|camp|campaign|campaigns={{Chapters/strings|CampaignsTitle2}}}}</span><span class="mw-customtoggle-{{{{{game|hl2}}}|name|nt=0}}" style="float: right; user-select:none;">{{Chapters/strings|TOGGLE}}</span>
| {{td|width = 25%| [[Highway 17]] }}
}}
  {{td|width = 25%| [[Sandtraps]] }}
  {{td|width = 25%| [[Nova Prospekt]] }}
}}
{{tr
| {{td|width = 25%| [[Entanglement]] }}
  {{td|width = 25%| [[Anticitizen One]] }}
  {{td|width = 25%| [["Follow Freeman!"]] }}
}}
{{tr
| {{td|width = 25%| [[Our Benefactors]] }}
  {{td|width = 25%| [[Dark Energy]] }}
}}
}}<!-- END OF TABLES FOR HL2 -->
|hl|hl1|hls = {{Table<!-- FOR HL1 -->
| align = center
| {{tr
| {{th|colspan=3|{{hl|4}} Chapters}}
}}
}}
{{tr
{{#switch: {{{game|hl2}}}
| {{td|width = 25%| [[Hazard Course]] }}
|#default = <!-- Undefined -->
  {{td|width = 25%| [[Black Mesa Inbound]] }}
{{tr|align = center
  {{td|width = 25%| [[Anomalous Materials]] }}
| {{td|width = 25%|font-size = 0.95em| There are no chapters/campaigns/missions for this game, or it is not defined on the template itself. }}
}}
}}
{{tr
<!-- GoldSrc -->
| {{td|width = 25%| [[Unforeseen Consequences]] }}
  {{td|width = 25%| [[Office Complex]] }}
|hl|hl1|hls = {{Chapters/Half-Life}}
  {{td|width = 25%| [[Weve_Got_Hostiles|"We've Got Hostiles!"]] }}
|hlop4|hlof = {{Chapters/Half-Life: Opposing Force}}
}}
    |hld|decay = {{Chapters/Half-Life: Decay}}
{{tr
    |hlbs = {{Chapters/Half-Life: Blue Shift}}
| {{td|width = 25%| [[Blast Pit]] }}
   
  {{td|width = 25%| [[Power Up]] }}
<!-- Source -->
  {{td|width = 25%| [[On a Rail]] }}
}}
|hl2 = {{Chapters/Half-Life 2}}
{{tr
|hl2ep1|ep1|episodic = {{Chapters/Half-Life 2: Episode One}}
| {{td|width = 25%| [[Apprehension]] }}
|hl2ep2|ep2 = {{Chapters/Half-Life 2: Episode Two}}
  {{td|width = 25%| [[Residue Processing]] }}
|l4d|left4dead= {{Chapters/Left 4 Dead}}
  {{td|width = 25%| [[Questionable Ethics]] }}
|l4d2|left4dead2= {{Chapters/Left 4 Dead 2|state1={{{state1|}}}}}
}}
|portal = {{Chapters/Portal}}
{{tr
|portal2|p2 = {{Chapters/Portal 2}}
| {{td|width = 25%| [[Surface Tension]] }}
  {{td|width = 25%| [["Forget About Freeman!"]] }}
    <!-- Source (third-party) -->
  {{td|width = 25%| [[Lambda Core]] }}
   
}}
|bms = {{Chapters/Black Mesa (Source)}}
{{tr
|portalrev = {{Chapters/Portal: Revolution}}
| {{td|width = 25%| [[Xen]] }}
|postal3|p3 = {{Chapters/Postal 3}}
  {{td|width = 25%| [[Gonarch's Lair]] }}
  {{td|width = 25%| [[Interloper]] }}
<!-- Source 2 -->
}}
{{tr
|hla = {{Chapters/Half-Life: Alyx}}
| {{td|width = 25%| [[Nihilanth]] }}
  {{td|width = 25%| [[Endgame]] }}
}}<!-- END OF SWITCH -->
}}
}}<!-- END OF TABLE -->
}}<!-- END OF TABLES FOR HL1 -->
}}<!-- END OF SWITCH -->
</onlyinclude></includeonly>
</onlyinclude></includeonly>
{{Doc}}

Latest revision as of 07:52, 26 October 2025

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
Page history
Icon-translate.png
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.
Number of strings:90
Approximate status of translation:English (en) 100% Deutsch (de) 57.78% Español (es) 22.22% Hrvatski (hr) 65.56% Русский (ru) 88.89% Tiếng Việt (vi) 6.67% 中文 (zh) 96.67% 
Gnome app science.png
This template uses a Testcases subpage
You can test how this page looks with its different skins and parsers.

This template is used to list all game chapters, campaign or missions. Chapters name (and titlebar itself) are also translated automatically, but users can add new translations on the strings subpage.

Parameters

Parameter Description Value Preview
None Default appearance
(By default its expanded, for the documentation, its collapsed)
N/A
{{{game}}} Game name, uses anything that are based off {{Software}} template.
| game = hl
{{{type}}} Changes the title bar to Chapters, campaigns or missions.
| type = chapters
| type = camp
| type = missions
{{{state}}} ~ {{{state<?>}}} Collapses the chapters.
(<?>: Unknown amount of states, used in "Template:Chapters/<game name>")
| state = collapsed

| state1 = collapsed