Complex template
The code of this template is really complex, please use your sandbox before editing this template
This template is designed to cover all battles that occur in the many wars in the New World without taking up too much article space.
Usage Instructions
Template:Battle (This page) is not the actual template, merely the centre of many templates. Therefore never put {{Battle}} on a page. Instead, read below to see how the template works.
Start and End
Whenever using Template:Battle, you must have {{Battlestart}} at the beginning of the template and {{Battleend}} at the end.
Template:Battlestart has one requirement, the name of the war. For example, below the coding is:
{{Battlestart|Example War}}
{{Battleend}}
Battles of the Example War
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
As you can see, this gives the top bar and the headers. (Note the template is automatically collapsed, this saves lots of space on the war pages. Click [show] to expand.)
Adding battles
Start and End give the basic framework, however the actual battles require more input.
For a normal battle there are two templates, {{Battlewin}} and {{Battlelose}}. These operate in exactly the same way, the difference being whether the attacker won or lost the battle.
Here is the coding for Template:Battlewin:
{{Battlewin|Region|Attacker|Attacker's Allies|Defender|Defender's Allies|Link}}
- Region: Is the eRepublik region where the battle took place.
- Attacker: is the attacking country (in this battle, not necessarily the war).
- Attacker's Allies: are the countries who had an active MPP with the attacker, often not used unless in complicated wars. Use the format [[Allie 1]], [[Allie2]], [[Allie3]], etc...
- Defender: is the country whose region was attacked.
- Defender's Allies: are the countries that were allied with the defending country. Uses the same formatting as the attacker's allies.
- Link: is the url link to the eRepublik page, following the format: http://www.erepublik.com/en/battles/show/NUMBER. Paste the whole link out of your browser.
Here is an example:
{{Battlestart|PEACE invasion of North America}}
{{Battlewin|District of Columbia|Portugal|[[Brazil]], [[Turkey]], [[Indonesia]], [[Russia]], [[Netherlands]], [[Iran]], [[France]], [[Bulgaria]]|USA|[[Romania]], [[Norway]], [[Canada]], [[Spain]], [[Israel]], [[Switzerland]], [[Bosnia and Herzegovina]], [[Greece]], [[Czech Republic]], [[Finland]], [[Poland]], [[China]], [[Sweden]], [[Croatia]], [[North Korea]]|http://www.erepublik.com/en/battles/show/7077}}
{{Battleend}}
Battles of the PEACE invasion of North America
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
|
|
USA
|
Romania, Norway, Canada, Spain, Israel, Switzerland, Bosnia and Herzegovina, Greece, Czech Republic, Finland, Poland, China, Sweden, Croatia, North Korea
|
|
|
|
Remember that as this was a particularly large battle, both sides had many alliances. You can see them by clicking on the [show] after the names of the main countries.
However, what if the USA had won in Washington DC? Then, use Battlelose (as the attacker lost) in exactly the same way.
{{Battlestart|PEACE invasion of North America}}
{{Battlelose|District of Columbia|Portugal|[[Brazil]], [[Turkey]], [[Indonesia]], [[Russia]], [[Netherlands]], [[Iran]], [[France]], [[Bulgaria]]|USA|[[Romania]], [[Norway]], [[Canada]], [[Spain]], [[Israel]], [[Switzerland]], [[Bosnia and Herzegovina]], [[Greece]], [[Czech Republic]], [[Finland]], [[Poland]], [[China]], [[Sweden]], [[Croatia]], [[North Korea]]|http://www.erepublik.com/en/battles/show/7077}}
{{Template:Battleend}}
Battles of the PEACE invasion of North America
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
|
|
USA
|
Romania, Norway, Canada, Spain, Israel, Switzerland, Bosnia and Herzegovina, Greece, Czech Republic, Finland, Poland, China, Sweden, Croatia, North Korea
|
|
|
|
There you are. Instead of Portugal occupying Washington, the template changes it to the USA securing it.
So, that is the basic working of Template:Battle. However, there are more tricks you can do with the template...
Whole Wars
Template:Battle is designed to easily show the progression of a war in eRepublik. Of course, one battle does not make a war, and almost all wars last for more than one day. Let us use the Belgium-United Kingdom War as an example.
As the war lasted from the 10th to the 13th of April, we will need to use {{Battledate}} to show the progression. It is simple, just put the date in the format Day Month Year. For Example:
{{Battlestart|Example War}}
{{Battledate|2 December 2009}}
{{Battleend}}
Battles of the Example War
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
2 December 2009
|
For the annexation of Belgium, this is what the template would look like:
{{Battlestart|Belgium-United Kingdom War}}
{{Battledate|10 April 2008}}
{{Battlelose|South East of England|Belgium||UK|[[USA]], [[Ireland]], [[Romania]], [[China]]|http://www.erepublik.com/en/battles/show/81}}
{{Battlelose|East of England|Belgium||UK|[[USA]], [[Ireland]], [[Romania]], [[China]]|http://www.erepublik.com/en/battles/show/91}}
{{Battledate|11 April 2008}}
{{Battlewin|Flanders|UK|[[USA]], [[Ireland]], [[Romania]], [[China]]|Belgium||http://www.erepublik.com/en/battles/show/192}}
{{Battledate|12 April 2008}}
{{Battlewin|Brussels|UK|[[USA]], [[Ireland]], [[Romania]], [[China]]|Belgium||http://www.erepublik.com/en/battles/show/341}}
{{Battlewin|Wallonia|UK|[[USA]], [[Ireland]], [[Romania]], [[China]]|Belgium||http://www.erepublik.com/en/battles/show/351}}
{{Battleend}}
Battles of the Belgium-United Kingdom War
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
10 April 2008
|
|
|
|
Secured by UK
|
|
|
|
|
|
Secured by UK
|
|
|
11 April 2008
|
|
|
|
Occupied by UK
|
|
|
12 April 2008
|
|
|
|
Occupied by UK
|
|
|
|
|
|
Occupied by UK
|
|
|
Retreating
Not in all cases will a battle last the whole 24 hours. Sometimes the defender will decide he might gain the initiative by retreating from a battle. In other times allied nations might swap regions to assist each other, give them access to a different border or deny an enemy a line of attack.
Putting retreats=yes after the retreater will show this battle as being won or lost due to their president deciding to hit the big red button.
Example:
{{Battlestart|PEACE invasion of North America}}
{{Battlewin|Nova Scotia|UK||France|retreats=yes|[[Hungary]], [[Portugal]], [[Serbia]], [[Russia]]|http://www.erepublik.com/en/battles/show/6876}}
{{Battleend}}
Battles of the PEACE invasion of North America
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
|
|
|
Occupied by UK
| (France Retreated)
|
|
Of course, it also works the other way around, if the attacker decided to cancel the assault:
{{Battlestart|PEACE invasion of North America}}
{{Battlelose|Nova Scotia|UK|retreats=yes||France|[[Hungary]], [[Portugal]], [[Serbia]], [[Russia]]|http://www.erepublik.com/en/battles/show/6876}}
{{Battleend}}
Battles of the PEACE invasion of North America
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
|
|
|
(UK Retreated)
|
|
Nullified Attacks
Sometimes a region might change hands whilst an attack is underway. This cancels the attack. Use {{Battlenon}} to show this.
{{Battlestart|PEACE invasion of North America}}
{{Battlenon|Nova Scotia|UK||France|[[Hungary]], [[Portugal]], [[Serbia]], [[Russia]]|http://www.erepublik.com/en/battles/show/6876}}
{{Battleend}}
Battles of the PEACE invasion of North America
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
|
|
|
|
|
Resistance Wars
Although not part of any war in game terms, Resistance wars are often important within any war in eRepublik. Use {{BattleRwin}} and {{BattleRlose}} to include these in the battle template. They work just like {{Battlewin}} and {{Battlelose}}, and the information is in the same order. However, the Allies fields are always blank.
Examples:
{{Battlestart|PEACE invasion of North America}}
{{BattleRwin|Georgia|USA||Portugal||http://www.erepublik.com/en/battles/show/7067}}
{{Battleend}}
Battles of the PEACE invasion of North America
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
|
|
|
Returned to USA
|
|
|
{{Battlestart|PEACE invasion of North America}}
{{BattleRlose|Tennessee|USA||Portugal||http://www.erepublik.com/en/battles/show/7015}}
{{Battleend}}
Battles of the PEACE invasion of North America
|
Region
|
Attackers
|
Defenders
|
Outcome
|
Link
|
|
|
|
|
|
List of Templates
Template:Battle