Welcome to the Command & Conquer Wiki! Log in and join the community.

Template:UnitBox

From Command & Conquer Wiki
Jump to: navigation, search
UnitBox
Picture and caption goes here
Unit
Internal name

Internal name of the object in the game's code

Affiliation

Which faction the unit belongs to

Base unit

If a unit is made by upgrading/modifying another unit then the original goes here.

Role

The niche the unit fills

Armament

The unit's armaments according to lore

Protection

The unit's armor/protection according to lore

Tier

The tier necessary to obtain the unit

Tech level

The tech level necessary to obtain the unit

Properties
Hit points

The unit's health points

Shields

The unit's shield

Energy

The unit's energy

Life span

The unit's lifespan, if it's time-limited

Armour type

The unit's armour type according to the game files

Transport slots

The unit's number of transportation spots

Amphibious

Whether or not the unit or structure is amphibious

Production
Cost

The unit's cost

Build time

The unit's build time

Produced by

Where the unit is constructed

Requires

What's required before production/construction of the unit can begin

Hotkey

The unit's hotkey

Combat
Squad size

How many people are in this unit's squad, if it comes in squads

Ground attack

The unit's ground attack according to game data

Air attack

The unit's air attack according to game data

Cooldown

The cooldown of the unit's weapons

Air speed

The unit's speed while in the air

Speed

The unit's speed on the ground

Sea speed

The unit's air speed on the seas

Attack range

The range of the unit's weapons

Sight range

The size of the unit's sight radius

Function
Parent

The unit's parent (e.g. Aircraft carrier for Sky Knights)

Add-ons

Any addons the unit/structure has (e.g. the component tower)

Upgrades to

What the unit upgrades into

Upgrades

The upgrades available for the unit

Power

How much power does the structure use or produce (+ for power producing structures, - for power using structures)

Produces

What the unit/structure constructs

Allows

What the presence of this unit/structure allows to be built

Research

What research is available for it

Abilities

The unit's special abilities

Elite upgrade

The unit's Elite Ability

Notes

Anything else about the unit that's worth mentioning

This infobox displays gameplay information for both units and structures.

Usage[edit source]

Copy and paste the code into the article and fill in the fields.

Replacing a Building, Unit or Structure Template[edit source]

If you've been asked to change a Building, Unit or Structure template then:

  1. Copy the blank unitbox (below) into the page
  2. Copy the parameter values from the old template to the new UnitBox template code. Please check the defunct template's code to see which value is assigned to which parameter.
    E.g. the following means you should copy whatever value is currently assigned to "function" parameter in the page that uses the old template and assign it to "role" parameter in the new UnitBox template code.
    |role = {{#if:{{{function|}}}|{{{function}}}}}
    You can find the template code below, click the defunct template you've been asked to change:
    1. Building
    2. Unit
    3. Structure
  3. Remove the old template code from the page
  4. Do not remove any blank or unused parameters from the UnitBox template code. This is to expedite any future expansion.

Code[edit source]

{{UnitBox
|name         = 
|image        = 
|slides       = 
|imgsize      = autosize
|imgdesc      = 
|internalname =
|faction      = 
|baseunit     = 
|role         = 
|eliteability = 
|useguns      = 
|usearmor     = 
|tier         = 
|hp           = 
|shield       = 
|energy       = 
|timedlife    = 
|armortype    = 
|trans        = 
|amphibious   = 
|techlvl      = 
|cost         = 
|time         = 
|produced     = 
|req          = 
|hotkey       = 
|squadsize    = 
|groundattack = 
|airattack    = 
|cooldown     = 
|airspeed     = 
|landspeed    = 
|seaspeed     = 
|range        = 
|sight        = 
|parent       = 
|addons       = 
|evolvesto    = 
|upgrades     = 
|power        = 
|produce      = 
|allows       = 
|research     = 
|ability      = 
|structure    = 
|notes        = 
|margin       = 
}}

Optional Fields[edit source]

The following are some notes on optional fields.

  • image
    • Set's an image. Default width it 300px. This parameter is ignored if slides is defined.
  • slides
    • Set's a slide show. Enter one or more pictures separated by newlines. Add a {{!}} to separate individual slide captions and link parameters. More info here. E.g.
Avatar.png {{!}} INSER CAPTION HERE {{!}} link=TEST LINK {{!}} linktext=TEST LINK TEXT
  • imgdesc
    • Set's the image's/slideshows caption. It DOES NOT set the caption for individual slides (see above).
  • imgsize
    • Manually sets the width of image, otherwise image uses its default size of 250px.
    • Requires units to be set. 200px is a valid entry. 200 is not.
      • Percentages are ok
      • Horizontal sizes can be set with "200x100px" or "x100px"
    • Enter any invalid size entry (e.g. "autosize") to make the image display in it's default size.
  • useguns
    • The unit's armament in lore.
  • usearmor
    • The unit's armor in lore.
  • structure
    • Set to any value to mark the unit as a structure,
  • notes
    • For any misc information
  • margin
    • To change the margins for custom layouts