Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:ConsoleCommand: Difference between revisions

Template page
Created page with "<includeonly>{{#if: {{{name|}}}| <div style="font-family: 'Consolas', 'Lucida Console', 'DejaVu Sans Mono', monospace; background-color: #0D0D0D; background: linear-gradient(180deg, #141414 0%, #0A0A0A 100%); color: #E0E0E0; padding: 10px 14px; border-radius: 6px; border: 1px solid #2A2A2A; box-shadow: 0 0 0 1px #1F1F1F, 0 4px 12px rgba(0,0,0,0.6); margin: 14px 0; overflow: hidden;"> <div style="display: flex; align-items: center; margin-bottom: 6px; border-bottom: 1px..."
 
No edit summary
 
Line 1: Line 1:
<includeonly>{{#if: {{{name|}}}|
<includeonly>{{#if: {{{name|}}}|
<div style="font-family: 'Consolas', 'Lucida Console', 'DejaVu Sans Mono', monospace; background-color: #0D0D0D; background: linear-gradient(180deg, #141414 0%, #0A0A0A 100%); color: #E0E0E0; padding: 10px 14px; border-radius: 6px; border: 1px solid #2A2A2A; box-shadow: 0 0 0 1px #1F1F1F, 0 4px 12px rgba(0,0,0,0.6); margin: 14px 0; overflow: hidden;">
<div style="margin:16px 0;background:#1c1c20;border:1px solid #2e2e35;border-radius:8px;overflow:hidden;font-family:-apple-system,'Segoe UI',Roboto,sans-serif;">
  <div style="display: flex; align-items: center; margin-bottom: 6px; border-bottom: 1px solid #222; padding-bottom: 4px;">
    <span style="color: #00AA00; font-weight: bold; margin-right: 6px;">&gt;</span>
    <span style="color: #FFFFFF; font-weight: bold; font-size: 1.05em; letter-spacing: 0.5px;">{{{name}}}</span>
    {{#if: {{{aliases|}}}|<span style="color: #888; font-size: 0.85em; margin-left: 10px;">(aliases: {{{aliases}}})</span>}}
    {{#if: {{{tags|}}}|<span style="margin-left: auto; font-size: 0.72em; color: #6699FF; background-color: #1A1A2E; padding: 1px 6px; border-radius: 3px; border: 1px solid #334455;">{{{tags}}}</span>}}
  </div>


  {{#if: {{{args|}}}|
<div style="background:#141417;padding:9px 14px;border-bottom:1px solid #2e2e35;display:flex;align-items:center;gap:8px;">&#x25cf;&nbsp;<span style="font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;font-size:15px;font-weight:600;color:#f0f0f2;">{{{name}}}</span>{{#if:{{{aliases|}}}|&nbsp;<span style="font-size:12px;color:#6b7280;">(also {{{aliases}}})</span>}}{{#if:{{{note|}}}|&nbsp;<span style="font-size:12px;color:#6b7280;">{{{note}}}</span>}}</div>
  <div style="margin-bottom: 6px;">
    <span style="color: #00CCFF; font-size: 0.9em;">Usage:</span>
    <span style="color: #AADDFF; font-size: 0.95em;">{{{name}}} {{{args}}}</span>
  </div>
  }}


  <div style="color: #CCCCCC; font-family: 'Segoe UI', system-ui, sans-serif; font-size: 0.95em; line-height: 1.35; padding-top: 2px;">
{{#if:{{{args|}}}|<div style="padding:7px 14px;border-bottom:1px solid #2e2e35;background:#111114;font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;font-size:13px;"><span style="color:#6b7280;">$</span>&nbsp;<span style="color:#f0f0f2;font-weight:600;">{{{name}}}</span>&nbsp;<span style="color:#67e8f9;">{{{args}}}</span></div>}}
    {{{desc|''No description available.''}}}
 
  </div>
<div style="padding:11px 14px;font-size:14px;line-height:1.6;color:#c9cdd4;">{{{desc|''No description provided.''}}}</div>
 
{{#if:{{{tag_launch|}}}{{{tag_game|}}}{{{tag_creative|}}}{{{tag_host|}}}{{{tag_mp|}}}{{{tag_sp|}}}|<div style="padding:6px 14px 10px;border-top:1px solid #2e2e35;display:flex;flex-wrap:wrap;gap:5px;align-items:center;"><span style="font-size:11px;color:#4b5563;margin-right:2px;">tags:</span>{{#if:{{{tag_launch|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#14532d;color:#86efac;border:1px solid #166534;">launch</span>}}{{#if:{{{tag_game|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#1e3a5f;color:#93c5fd;border:1px solid #1d4ed8;">requires game</span>}}{{#if:{{{tag_creative|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#3b1f6e;color:#d8b4fe;border:1px solid #7c3aed;">creative only</span>}}{{#if:{{{tag_host|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#451a03;color:#fcd34d;border:1px solid #b45309;">host / sp only</span>}}{{#if:{{{tag_mp|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#4a0d2e;color:#f9a8d4;border:1px solid #be185d;">multiplayer</span>}}{{#if:{{{tag_sp|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#064e3b;color:#6ee7b7;border:1px solid #059669;">singleplayer</span>}}</div>}}


  {{#if: {{{note|}}}|
  <div style="margin-top: 6px; font-size: 0.8em; color: #FFAA44; font-family: 'Segoe UI', system-ui, sans-serif;">
    Note: {{{note}}}
  </div>
  }}
</div>
</div>
}}</includeonly><noinclude>
}}</includeonly><noinclude>
== Documentation ==
== Template:ConsoleCommand ==


This template creates a console-styled entry for a single in-game console command. It is intended to be used on pages documenting the dev console.
Renders a console command as a dark terminal-style card.


=== Parameters ===
=== Parameters ===
* '''name''' (required): The primary command name (without the leading dash).
{| class="wikitable"
* '''args''': The argument list / syntax as shown by in-game help.
|-
* '''desc''': The description paragraph(s). Can contain wikitext.
! Parameter !! Required !! Description
* '''aliases''': Comma-separated list of alternative names.
|-
* '''tags''': Optional tags string, e.g. <code>[launch][game][creative]</code>.
| <code>name</code> || '''Yes''' || Command name, e.g. <code>unstuck</code>
* '''note''': Optional extra note (shown in amber).
|-
| <code>args</code> || No || Argument syntax, e.g. <code>&lt;x1&gt; &lt;y1&gt; &lt;z1&gt;</code>
|-
| <code>desc</code> || No || Description text. Supports wikitext (links, bold, <code>&lt;code&gt;</code>, etc.)
|-
| <code>aliases</code> || No || Alternate names shown in the header
|-
| <code>note</code> || No || Short note shown in the header (e.g. "Added with the Terrain Update")
|-
| <code>tag_launch</code> || No || Set to <code>1</code> to show the '''launch''' badge
|-
| <code>tag_game</code> || No || Set to <code>1</code> to show the '''requires game''' badge
|-
| <code>tag_creative</code> || No || Set to <code>1</code> to show the '''creative only''' badge
|-
| <code>tag_host</code> || No || Set to <code>1</code> to show the '''host / sp only''' badge
|-
| <code>tag_mp</code> || No || Set to <code>1</code> to show the '''multiplayer''' badge
|-
| <code>tag_sp</code> || No || Set to <code>1</code> to show the '''singleplayer''' badge
|}


=== Example ===
=== Example ===
<pre>
<pre>
{{ConsoleCommand
{{ConsoleCommand
|name=help
|name=copy (example command)
|args=commands, list (l), &lt;key&gt;, tofile
|aliases=cp
|desc=Displays helpful stuff. Use &lt;code&gt;-help &lt;command&gt;&lt;/code&gt; for details on a specific command.
|note=I am a note
|aliases=
|args=<x1> <y1> <z1> <x2> <y2> <z2>
|tags=
|desc=Copies the area defined by [[pos1]] and [[pos2]] into the clipboard. Paste with <code>paste</code>.
|tag_game=1
|tag_creative=1
|tag_host=1
}}
}}
</pre>
</pre>
{{ConsoleCommand
{{ConsoleCommand
|name=help
|name=copy (example command)
|args=commands, list (l), &lt;key&gt;, tofile
|aliases=cp
|desc=Displays helpful stuff. Use &lt;code&gt;-help &lt;command&gt;&lt;/code&gt; for details on a specific command.
|note=I am a note
|aliases=
|args=<x1> <y1> <z1> <x2> <y2> <z2>
|tags=
|desc=Copies the area defined by [[pos1]] and [[pos2]] into the clipboard. Paste with <code>paste</code>.
|tag_game=1
|tag_creative=1
|tag_host=1
}}
}}


[[Category:Templates]]
[[Category:Templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 00:10, 8 June 2026

Template:ConsoleCommand

Renders a console command as a dark terminal-style card.

Parameters

Parameter Required Description
name Yes Command name, e.g. unstuck
args No Argument syntax, e.g. <x1> <y1> <z1>
desc No Description text. Supports wikitext (links, bold, <code>, etc.)
aliases No Alternate names shown in the header
note No Short note shown in the header (e.g. "Added with the Terrain Update")
tag_launch No Set to 1 to show the launch badge
tag_game No Set to 1 to show the requires game badge
tag_creative No Set to 1 to show the creative only badge
tag_host No Set to 1 to show the host / sp only badge
tag_mp No Set to 1 to show the multiplayer badge
tag_sp No Set to 1 to show the singleplayer badge

Example

{{ConsoleCommand
|name=copy (example command)
|aliases=cp
|note=I am a note
|args=<x1> <y1> <z1> <x2> <y2> <z2>
|desc=Copies the area defined by [[pos1]] and [[pos2]] into the clipboard. Paste with <code>paste</code>.
|tag_game=1
|tag_creative=1
|tag_host=1
}}
● copy (example command) (also cp) I am a note
$ copy (example command) <x1> <y1> <z1> <x2> <y2> <z2>
Copies the area defined by pos1 and pos2 into the clipboard. Paste with paste.
tags:requires gamecreative onlyhost / sp only
Contents