Difference between revisions of "User:Sirrob01"

From Australis Ultima 30k
Jump to: navigation, search
m (Mainpage Summary)
m (Page form Test)
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
+
==Blog Posts==
[[Template:Army/Preload]]
+
{{Template:Blog Roll User}}
[[Template:Preset Army Data]]
+
[[Trial:Legio CIX]]
+
Template:.IArmy/Preload
+
  
[[new Sirrob01]]
+
==My Armies==
 +
{{getarmy|armyname=L-VII-3177}}{{getarmy|armyname=L-VII-3177}}{{getarmy|armyname=L-VII-3177}}{{getarmy|armyname=L-VII-3177}}
  
{{Template:New Template|value1=Sirrob01}}
+
[[Test Lucius]]
  
==Mainpage Summary==
+
===Page form Test===
{| style="width:100%; vertical-align:top; background:#EBEBEB;"
+
| style="padding:2px;" | <h2 style="margin:3px; background:#D9D9D9; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:center; color:#000; padding:0.2em 0.4em;">Australis UIltima Sector Status <span style="font-size:85%; font-weight:normal;"></span></h2>
+
<span id="enableTickers"></span>
+
<div class="isATicker Ticker_engine-std Ticker_speed-3 Ticker_strLinkText- Ticker_strLinkURI-Category:Battlereport">
+
<DynamicPageList>
+
category=News|Battlereport
+
notcategory=No Data
+
notnamespace=Template
+
count=10
+
mode=inline
+
ordermethod=lastedit
+
</DynamicPageList>
+
</div>
+
|-
+
| style="color:#000;" | <div style="padding:0px 0px">
+
  
{|style="color: black;" width="100%"
+
[[Page Form Test]]
|colspan="2"|
+
<imagemap>
+
    Image:Australis Ultima Sector Map30k.jpg|center|500px|Australis Ultima Sector Map
+
    circle 50 111 50 [[File:Australis_Ultima_Detailed_Sector_Map.jpg|Surprise]]
+
    poly 1245 350 1245 535 1400 535 1400 350 [[Loyalist]]
+
    poly 0 350 0 535 155 535 155 350 [[Traitor]]
+
    poly 875 575 850 600 850 625 875 625 875 635 900 635 900 625 950 625 950 575 [[Savage Reach]]
+
    poly 900 575 900 525 925 525 925 535 975 535 975 525 1000 525 1000 600 975 600 950 575 [[Pacificus Delta Sub-Sector]]
+
    poly 950 600 950 625 975 650 1050 650 1050 600 1025 575 1000 575 1000 600[[Helix Cluster]]
+
    poly 800 550 850 550 850 525 875 525 875 500 900 500 900 475 825 475 800 500[[Cambrius Sub-Sector]]
+
    poly 575 425 550 450 550 500 625 500 625 475 650 475 650 450 625 425 [[Hawcinus Sub-Sector]]
+
    rect 0 0 1400 875 [[Australis Ultima]]
+
    desc none
+
    </imagemap>
+
|-
+
|'''[[:Category:Sub-Sector|Sub-Sectors:]]'''
+
|{{PAGESINCATEGORY:Sub-Sector}}
+
|-
+
|'''[[:Category:Global Heresy System|Global Heresy Systems:]]'''
+
|{{PAGESINCATEGORY:Global Heresy System}}
+
|-
+
|.....''[[:Category:Global Heresy Planet|Planets:]]''
+
|{{PAGESINCATEGORY:Global Heresy Planet}}
+
|-
+
|'''[[:Category:Local System|Local Systems:]]'''
+
|{{PAGESINCATEGORY:Local System}}
+
|-
+
|.....''[[:Category:Local Planet|Planets:]]''
+
|{{PAGESINCATEGORY:Local Planet}}
+
|-
+
|'''[[:Category:Available System|Available Systems:]]'''
+
|{{PAGESINCATEGORY:Available System}}
+
|-
+
|.....''[[:Category:Available Planet|Planets:]]''
+
|{{PAGESINCATEGORY:Available Planet}}
+
|-
+
|colspan="3" style="text-align: center;"|<br>
+
|-
+
|colspan="3" style="text-align: center;"|
+
  
|}
+
__NOTOC__
</div>
+
|}
+
 
+
==Skirmish count==
+
{{#dpl:
+
|category=Skirmish
+
|notnamespace=Template
+
|mode=userformat
+
|resultsheader=Skirmishes Fought: %PAGES%
+
}}
+
 
+
{{#dpl:
+
|category=Skirmish
+
|category=Loyalist
+
|notnamespace=Template
+
|mode=userformat
+
|resultsheader=Loyalist Skirmish Victor: %PAGES%
+
}}
+
 
+
{{#dpl:
+
|category=Skirmish
+
|category=Traitor
+
|notnamespace=Template
+
|mode=userformat
+
|resultsheader=Traitor Skirmish Victor: %PAGES%
+
}}
+
 
+
==plain dpl==
+
{{#dpl:
+
|category=Cambrius
+
|category=Completed Planet
+
|includepage={Infobox Planets} dpl,#Population[200 ..more..<br><br>], #History[200 ..more..<br><br>],
+
|randomcount=1
+
|randomseed={{#time:Ymd}}
+
|mode=userformat
+
|format=,{¦\n!colspan="4" style="font-size:162%;text-align:left;"¦[[%PAGE%]]\n¦-\n¦align=left¦,,\n¦}
+
}}
+
 
+
 
+
==New Sub Footer==
+
<!----------------------------------->
+
<!--        Heading Box          -->
+
<!----------------------------------->
+
<h2 style="margin:4px 0px 3px 0px; background:#D9D9D9; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:center; color:#000; padding:0.1em 0.1em;">Global Heresy Systems</h2>
+
{| style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
+
<!----------------------------------->
+
<!--        Box one                -->
+
<!----------------------------------->
+
|style="width:33%; border:1px solid #cef2e0; background:#EBEBEB; vertical-align:top; color:#000;" |
+
{| style="width:100%; vertical-align:top; background:#EBEBEB;"
+
{{#dpl:
+
|category=Cambrius
+
|category=Completed Planet
+
|includepage={Infobox Planets} dpl,#Population[200 ..more..<br><br>], #History[200 ..more..<br><br>],
+
|randomcount=1
+
|randomseed={{#time:Ymd}}
+
|mode=userformat
+
|format=,\n¦colspan="2" style="font-size:162%;text-align:left;color:#000;padding:2px"¦<h2 style="margin:3px; background:#D9D9D9; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:center; color:#000; padding:0.2em 0.4em;">[[%PAGE%]]</h2>
+
\n¦-\n¦align=left¦,,\n
+
}}
+
|}
+
<!------------------------------------------>
+
<!--          Spacer                    -->
+
<!------------------------------------------>
+
| style="border:1px solid transparent;" |
+
 
+
<!-------------------------------------------->
+
<!--      Box Two                          -->
+
<!-------------------------------------------->
+
|style="width:33%; border:1px solid #cef2e0; background:#EBEBEB; vertical-align:top; color:#000;" |
+
{| style="width:100%; vertical-align:top; background:#EBEBEB;"
+
{{#dpl:
+
|category=Outpost Cambrius
+
|category=Completed Planet
+
|includepage={Infobox Planets} dpl,#Population[200 ..more..<br><br>], #History[200 ..more..<br><br>],
+
|randomcount=1
+
|randomseed={{#time:Ymd}}
+
|mode=userformat
+
|format=,\n¦colspan="2" style="font-size:162%;text-align:left;color:#000;padding:2px"¦<h2 style="margin:3px; background:#D9D9D9; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:center; color:#000; padding:0.2em 0.4em;">[[%PAGE%]]</h2>
+
\n¦-\n¦align=left¦,,\n
+
}}
+
|}
+
<!------------------------------------------>
+
<!--          Spacer                    -->
+
<!------------------------------------------>
+
| style="border:1px solid transparent;" |
+
<!-------------------------------------------->
+
<!--      Box Three                          -->
+
<!-------------------------------------------->
+
|style="width:33%; border:1px solid #cef2e0; background:#EBEBEB; vertical-align:top; color:#000;" |
+
{| style="width:100%; vertical-align:top; background:#EBEBEB;"
+
{{#dpl:
+
|category=Planets
+
|category=Completed Planet
+
|notnamespace=Template
+
|includepage={Infobox Planets} dpl,#Population[200 ..more..<br><br>], #History[200 ..more..<br><br>],
+
|randomcount=1
+
|randomseed={{#time:Ymd}}
+
|mode=userformat
+
|format=,\n¦colspan="2" style="font-size:162%;text-align:left;color:#000;padding:2px"¦<h2 style="margin:3px; background:#D9D9D9; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:center; color:#000; padding:0.2em 0.4em;">[[%PAGE%]]</h2>
+
\n¦-\n¦align=left¦,,\n
+
}}
+
|}
+
|}
+
 
+
==table==
+
{|
+
|style="text-align:center;"|test
+
|}
+
 
+
{|class="wikitable"
+
| style="text-align:center;"| <span style="text-align:left;">
+
Itemfdgfdgdfgdfgdfgdfgdfg
+
Item</span>
+
|style="text-align:center;"|[[Image:Undecided.png|50px]]
+
|}
+
 
+
==DPL FUN Two==
+
{{#vardefine:name|Outpost Cambrius}}
+
 
+
{{#vardefine:errcheck|{{#sub:{{#dpl:
+
|category =Skirmish
+
|category ={{#var:name}}
+
|notnamespace=Template
+
}}|3|9}}}}
+
{{#ifeq:{{#var:errcheck}}|Extension|{{DPL Error Message}}|{{#dpl:
+
|category =Skirmish
+
|category ={{#var:name}}
+
|include={Campaign Honour} imgmini,{Battlereport}:date,{Battlereport}:planet,{Battlereport}:victor,#Campaign Summary[100]
+
|notnamespace=Template
+
|format=,¶{¦class="wikitable" style="width:65%;" ¶¦colspan ="6" style="font-size:130%;"¦'''[[%PAGE%]]'''¶¦-,¶¦},
+
|secseparators=¶¦
+
}}
+
}}
+
 
+
{{#ifexpr:10>{{#expr:10+{{#ifeq:{{#var:planetype}}|Major|{{Template:Control Influence Major}}|{{Template:Control Influence Minor}}}}}}|true|false}}
+
 
+
== DPL Fun ==
+
<!------------------------------------------->
+
<!-- Initial DPL retrieval                  --> 
+
<!------------------------------------------->
+
<!--------------------------------------->
+
<!--1st DPLs retrieve Campaign Info    -->
+
<!--------------------------------------->
+
{{#arraydefine:campall|{{#sub:{{#dpl:
+
|category =Campaign
+
|category =Kildrech Prime
+
|notcategory=draw
+
|notnamespace=Template
+
|include={Battlereport}:victor
+
|escapelinks=true
+
|format=,$}}|1}}|$}}
+
<!------------------------------------->
+
<!--2nd DPL retrieve Battle Info    -->
+
<!------------------------------------->
+
{{#arraydefine:battleall|{{#sub:{{#dpl:
+
|category =Battle
+
|category =Kildrech Prime
+
|notcategory=draw
+
|notnamespace=Template
+
|include={Battlereport}:victor
+
|escapelinks=true
+
|format=,$}}|1}}|$}}
+
<!------------------------------------->
+
<!--3rd DPL retrieve Skirmish Info  -->
+
<!------------------------------------->
+
{{#arraydefine:skirmishall|{{#sub:{{#dpl:
+
|category =Skirmish
+
|category =Kildrech Prime
+
|notcategory=draw
+
|notnamespace=Template
+
|include={battlereportminor2}:faction victor
+
|escapelinks=true
+
|format=,$}}|1}}|$}}
+
<!---------------------------------------------->
+
<!--Duplicate arrays from above DPLS          -->
+
<!---------------------------------------------->
+
{{#arraymerge:subcampall|campall}}
+
{{#arraymerge:subbattleall|battleall}}
+
{{#arraymerge:subskirmishall|skirmishall}}
+
<!---------------------------------------------->
+
<!-- Set the inital variables and define requried
+
variables for the while loop, -->
+
<!---------------------------------------------->
+
{{#arrayunique:subcampall}}
+
{{#arrayunique:subbattleall}}
+
{{#arrayunique:subskirmishall}}
+
{{#vardefine:type|{{#ifeq:Major|Major|{{Template:Control Influence Major}}|{{Template:Control Influence Minor}}}}}}
+
<!--{{#arrayprint:campall}}for error checking -->
+
<!--{{#arrayprint:subcampall}}for error checking -->
+
<!--{{#arrayprint:battleall}}for error checking -->
+
<!--{{#arrayprint:subbattleall}}for error checking -->
+
{{#vardefine:subcallsize|{{#arraysize:subcampall}}}}
+
{{#vardefine:callsize|{{#arraysize:campall}}}}
+
{{#vardefine:subbatsize|{{#arraysize:subbattleall}}}}
+
{{#vardefine:batsize|{{#arraysize:battleall}}}}
+
{{#vardefine:subskisize|{{#arraysize:subskirmishall}}}}
+
{{#vardefine:skisize|{{#arraysize:skirmishall}}}}
+
<!---------------------------------------------->
+
<!-- While loop which runs through the array and
+
counts instances of the  specific faction/force name
+
and outputs in the form of
+
Faction1@3,Faction2@4,Faction3@1 1st loop for Campaings
+
2nd loop is for battles, essentially identical -->
+
<!---------------------------------------------->
+
{{ #vardefine: iac | 0 }}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: iac }} < {{ #var: subcallsize }} | true }}
+
  |{{#arraysearcharray:subcampcnt|campall|{{#arrayindex:subcampall|{{#var:iac}}}}}}
+
{{#vardefine:sumcampall|{{#var:sumcampall}}{{#arrayindex:subcampall|{{#var:iac}}}}@{{#arraysize:subcampcnt}}$}}
+
{{ #vardefine: iac | {{ #expr: {{ #var: iac }} + 1 }} }}
+
}}
+
{{#arraydefine:subsumcampall|{{#var:sumcampall}}|$|}}
+
{{ #vardefine: iab | 0 }}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: iab }} < {{ #var: subbatsize }} | true }}
+
  |{{#arraysearcharray:subbatcnt|battleall|{{#arrayindex:subbattleall|{{#var:iab}}}}}}
+
{{#vardefine:sumbatall|{{#var:sumbatall}}{{#arrayindex:subbattleall|{{#var:iab}}}}@{{#arraysize:subbatcnt}}$}}
+
{{ #vardefine: iab | {{ #expr: {{ #var: iab }} + 1 }} }}
+
}}
+
{{#arraydefine:subsumbatall|{{#var:sumbatall}}|$|}}
+
 
+
{{ #vardefine: ias | 0 }}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: ias }} < {{ #var: subskisize }} | true }}
+
  |{{#arraysearcharray:subskicnt|skirmishall|{{#arrayindex:subskirmishall|{{#var:ias}}}}}}
+
{{#vardefine:sumskiall|{{#var:sumskiall}}{{#arrayindex:subskirmishall|{{#var:ias}}}}@{{#arraysize:subskicnt}}$}}
+
{{ #vardefine: ias | {{ #expr: {{ #var: ias }} + 1 }} }}
+
}}
+
{{#arraydefine:subsumskiall|{{#var:sumskiall}}|$|}}
+
 
+
<!--{{#arrayprint:subsumcampall}}for error checking -->
+
<!--{{#arrayprint:subsumbatall}}for error checking -->
+
<!--{{#arrayprint:subsumskiall}}for error checking -->
+
<!---------------------------------------------->
+
<!-- The below two loops multiply the number of
+
campaigns, battles or Skirmishes by the current influence
+
value for each, influence values are stored in
+
Templates for easy maintenance/adjustment-->
+
<!---------------------------------------------->
+
{{ #vardefine: icp | 0 }}
+
{{#vardefine:sumcampall}}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: icp }} < {{#expr:{{#arraysize:subsumcampall}}-1}} | true }}
+
  |{{#vardefine:sumcampall|{{#var:sumcampall}}${{#explode:{{#arrayindex:subsumcampall|{{ #var: icp }}}}|@|0}}@{{#expr:{{#explode:{{#arrayindex:subsumcampall|{{ #var: icp }}}}|@|1}}*{{Campaign Influence}}}}}}
+
  {{ #vardefine: icp | {{ #expr: {{ #var: icp }} + 1 }} }}
+
}}
+
{{#arraydefine:subsumcampall2|{{#sub:{{#var:sumcampall}}|1}}|$}}
+
{{ #vardefine: ibp | 0 }}
+
{{#vardefine:sumbatall}}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: ibp }} < {{#expr:{{#arraysize:subsumbatall}}-1}} | true }}
+
  |{{#vardefine:sumbatall|{{#var:sumbatall}}${{#explode:{{#arrayindex:subsumbatall|{{ #var: ibp }}}}|@|0}}@{{#expr:{{#explode:{{#arrayindex:subsumbatall|{{ #var: ibp }}}}|@|1}}*{{Battle Influence}}}}}}
+
  {{ #vardefine: ibp | {{ #expr: {{ #var: ibp }} + 1 }} }}
+
}}
+
{{#arraydefine:subsumbatall2|{{#sub:{{#var:sumbatall}}|1}}|$}}
+
 
+
{{ #vardefine: isp | 0 }}
+
{{#vardefine:sumskiall}}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: isp }} < {{#expr:{{#arraysize:subsumskiall}}-1}} | true }}
+
  |{{#vardefine:sumskiall|{{#var:sumskiall}}${{#explode:{{#arrayindex:subsumskiall|{{ #var: isp }}}}|@|0}}@{{#expr:{{#explode:{{#arrayindex:subsumskiall|{{ #var: isp }}}}|@|1}}*{{Skirmish Influence}}}}}}
+
  {{ #vardefine: isp | {{ #expr: {{ #var: isp }} + 1 }} }}
+
}}
+
{{#arraydefine:subsumskiall2|{{#sub:{{#var:sumskiall}}|1}}|$}}
+
 
+
<!--{{#arrayprint:subsumbatall2}}for error checking -->
+
<!--{{#arrayprint:subsumcampall2}}for error checking -->
+
<!--{{#arrayprint:subsumskiall2}}for error checking -->
+
<!-------------------------------------------------------->
+
<!-- Merge the three arrays together to make one large array
+
with the total Influence earnt for each Faction/Force on
+
this planet -->
+
<!-------------------------------------------------------->
+
{{#arraymerge:subsumall|subsumbatall2|subsumcampall2|subsumskiall2}}
+
{{#arraymerge:subsumunqall|subcampall|subbattleall|subskirmishall}}
+
{{#arrayunique:subsumunqall}}
+
<!--{{#arrayprint:subsumall}}for error checking -->
+
<!--{{#arrayprint:subsumunqall}}for error checking -->
+
{{#vardefine:subsumunqallcnt|{{#arraysize:subsumunqall}}}}
+
{{#vardefine:issua | 0 }}
+
{{#while:
+
  | {{ #ifexpr: {{ #var:issua  }} < {{#var:subsumunqallcnt}} | true }}
+
  |{{#arraysearcharray:temparray|subsumall|*{{#arrayindex:subsumunqall|{{#var:issua}}}}*}}
+
{{#vardefine:ita | 0 }}
+
{{#vardefine:tat|{{#arraysize:temparray}}}}
+
{{#while:
+
  |{{ #ifexpr: {{ #var:ita }} < {{#var:tat}} | true }}
+
  |{{#vardefine:totstring|{{#expr:{{#var:totstring}}+{{#explode:{{#arrayindex:temparray|{{#var:ita}}}}|@|1}}}}}}
+
{{ #vardefine: ita | {{ #expr: {{ #var: ita }} + 1 }}}}
+
}}
+
{{#vardefine:allsum|{{#var:allsum}}${{#arrayindex:subsumunqall|{{#var:issua}}}}@{{#var:totstring}}}}
+
{{#vardefine:totstring|0}}{{#vardefine:issua | {{ #expr: {{ #var:issua  }} + 1 }} }}
+
}}
+
{{#arraydefine:arrallsum|{{#sub:{{#var:allsum}}|1}}|$}}
+
<!--{{#arrayprint:arrallsum}}for error checking -->
+
<!-------------------------------------------------------->
+
<!-- The below goes through the total array and compares
+
each of the current influence totals to find the highest
+
and second highest. -->
+
<!-------------------------------------------------------->
+
{{#vardefine:highfaction|0@0}}
+
{{#vardefine:2ndhighfaction|0@0}}
+
{{#vardefine:arrallsz|{{#arraysize:arrallsum}}}}
+
{{#vardefine: iaas | 0 }}
+
{{#while:
+
  | {{#ifexpr: {{#var:iaas}}<{{#var:arrallsz}} | true }}
+
  |{{#ifexpr:{{#explode:{{#var:highfaction}}|@|1}}>{{#explode:{{#arrayindex:arrallsum|{{#var:iaas}}}}|@|1}}
+
      |{{#ifexpr:{{#explode:{{#var:2ndhighfaction}}|@|1}}>{{#explode:{{#arrayindex:arrallsum|{{#var:iaas}}}}|@|1}}
+
        |
+
        |{{#vardefine:2ndhighfaction|{{#arrayindex:arrallsum|{{#var:iaas}}}}}}
+
      }}
+
      |{{#vardefine:2ndhighfaction|{{#var:highfaction}}}}{{#vardefine:highfaction|{{#arrayindex:arrallsum|{{#var:iaas}}}}}}
+
    }}
+
{{#vardefine:iaas | {{#expr:{{#var:iaas}}+1}}}}
+
}}
+
<!--2nd highest faction:{{#var:2ndhighfaction}}for error checking -->
+
<!--Highest faction: {{#var:highfaction}}for error checking -->
+
<!-------------------------------------------------------->
+
<!--The 2nd highest and highest faction are now compared to check
+
if highest is the value required away from the 2nd highest to
+
have control of the planet. -->
+
<!-------------------------------------------------------->
+
{| class="" style="width:290px; background-color:;float:left;"
+
|-
+
!colspan="2" scope="col"| Influence Summary
+
|-
+
! scope="col"|Faction
+
! scope="col"|Influence
+
{{ #vardefine: if | 0 }}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: if }} < {{#var:arrallsz}} | true }}
+
  |{{!-}}
+
{{!}}style="text-align:center;"{{!}}{{#explode:{{#arrayindex:arrallsum|{{#var:if}}}}|@|0}}
+
{{!}}style="text-align:center;"{{!}}{{#explode:{{#arrayindex:arrallsum|{{#var:if}}}}|@|1}}
+
{{!-}}
+
{{ #vardefine: if | {{ #expr: {{ #var: if }} + 1 }} }}
+
}}
+
|}
+
 
+
<!--Display Controlling Factions Image-->
+
{{#vardefine:planetype|Major}}
+
{{#ifexpr:{{#explode:{{#var:highfaction}}|@|1}}>{{#expr:{{#explode:{{#var:2ndhighfaction}}|@|1}}+{{#ifeq:{{#var:planetype}}|Major|{{Template:Control Influence Major}}|{{Template:Control Influence Minor}}}}}}
+
|{{#switch:{{#explode:{{#var:highfaction}}|@|0}}
+
| traitor =[[Image:Traitor.png]]
+
| Traitor =[[Image:Traitor.png]]
+
| loyalist =[[Image:Loyalist.png]]
+
| Loyalist =[[Image:Loyalist.png]]
+
| ork =[[Image:Ork.png]]
+
| Ork =[[Image:Ork.png]]
+
|[[Image:Undecided.png]]
+
}}
+
|[[Image:Undecided.png]]
+
}}
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
<br>
+
 
+
==junk 3==
+
<!---------------------------------------------->
+
<!-- While loop which runs through the array and
+
counts instances of the  specific faction/force name
+
and outputs in the form of
+
Faction1@3,Faction2@4,Faction3@1 1st loop for Campaings
+
2nd loop is for battles, essentially identical -->
+
<!---------------------------------------------->
+
{{ #vardefine: iac | 0 }}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: iac }} < {{ #var: subcallsize }} | true }}
+
  |{{#arraysearcharray:subcampcnt|campall|{{#arrayindex:subcampall|{{#var:iac}}}}}}
+
{{#vardefine:sumcampall|{{#var:sumcampall}}{{#arrayindex:subcampall|{{#var:iac}}}}@{{#arraysize:subcampcnt}}$}}
+
{{ #vardefine: iac | {{ #expr: {{ #var: iac }} + 1 }} }}
+
}}
+
{{#arraydefine:subsumcampall|{{#var:sumcampall}}|$|}}
+
{{ #vardefine: iab | 0 }}
+
{{#while:
+
  | {{ #ifexpr: {{ #var: iab }} < {{ #var: subbatsize }} | true }}
+
  |{{#arraysearcharray:subbatcnt|battleall|{{#arrayindex:subbattleall|{{#var:iab}}}}}}
+
{{#vardefine:sumbatall|{{#var:sumbatall}}{{#arrayindex:subbattleall|{{#var:iab}}}}@{{#arraysize:subbatcnt}}$}}
+
{{ #vardefine: iab | {{ #expr: {{ #var: iab }} + 1 }} }}
+
}}
+
{{#arraydefine:subsumbatall|{{#var:sumbatall}}|$|}}
+
<!--{{#arrayprint:subsumcampall}}for error checking -->
+
<!--{{#arrayprint:subsumbatall}}for error checking -->
+
<!---------------------------------------------->
+
<!-- The below two loops multiply the number of
+
campaigns or battles by the current influence
+
value for each, influence values are stored in
+
Templates for easy maintenance/adjustment-->
+
<!---------------------------------------------->
+
 
+
==junk2==
+
{{ #vardefine: i | 0 }}
+
{{
+
  #while:
+
  | {{ #ifexpr: {{ #var: i }} < 3 | true }}
+
  |{{#ifexpr: }}
+
* {{ #var: i }}{{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}
+
}}
+
 
+
→ yes
+
 
+
for(int i = 0; i < size; i++) with an if statement inside it, like this
+
1
+
2
+
if(num > largets)
+
largest = num;
+
 
+
==Legio Topper ==
+
 
+
 
+
 
+
<div id="mp-topbanner" style="width:100%; text-align:center; background:#F7F7F7; margin:0 0 0 0; border:0px solid #ddd;">
+
<!-- unused  <div style="font-size: 130%;text-align:center;">Armies in {{PAGENAME}}</div> -->
+
{{#vardefine:msize|63px}}
+
{{#vardefine:cyclecnt|{{#dpl:
+
|category =Player
+
|category =Legio I
+
|notnamespace=Template
+
|mode=userformat
+
|resultsheader=%PAGES%
+
}}
+
}}
+
{{#ifexpr: {{#var:cyclecnt}} < 10
+
| {{#dpl:
+
|category =Player
+
|category =Legio I
+
|notnamespace=Template
+
|include= {Infobox Army}:image
+
|escapelinks=true
+
|format=,<div style="display:inline;">[[,|{{#var:msize}}|bottom|link=%PAGE%]]</div>
+
}}
+
{{ #vardefine: icc |{{#var:cyclecnt}}}}{{
+
  #while:
+
  | {{ #ifexpr: {{ #var: icc }} < 10 | true }}
+
  |<div style="display:inline;">[[File:Legio Nil.png|bottom|link=Legio I - The Dark Angels Legion|frameless|{{#var:msize}}|Dark Angels]]</div>
+
{{ #vardefine: icc | {{ #expr: {{ #var: icc }} + 1 }} }}
+
}}
+
| {{#dpl:
+
|category =Player
+
|category =Legio I
+
|notnamespace=Template
+
|include= {Infobox Army}:image
+
|escapelinks=true
+
|format=,<div style="display:inline;">[[,|{{#var:msize}}|bottom|link=%PAGE%]]</div>
+
}}
+
}}
+
</div>
+
 
+
==== Break ====
+
 
+
{{#vardefine:switch|trair}}
+
 
+
{{#switch: {{#var:switch}}
+
| traitor = [[Image:Traitor.png]]
+
| Traitor = [[Image:Traitor.png]]
+
| loyalist = [[Image:Loyalist.png]]
+
| default [[Image:Loyalist.png]]
+
}}
+
 
+
===Initial Array setup===
+
 
+
{{#arraydefine:all|apple@red,apple@green,green@apple,apple@red,apple@purple,purple@apple,apple@purple,apple@purple,apple@purple,apple@purple}}
+
{{#arraydefine:suball|apple@red,apple@green,green@apple,apple@red,apple@purple,purple@apple,apple@purple,apple@purple,apple@purple,apple@purple}}
+
{{#arrayprint:all}}
+
{{#arrayunique:suball}}
+
{{#arrayprint:suball}}
+
 
+
{{#vardefine:armyname|apple}}
+
{{#vardefine:allsize|{{#arraysize:all}}}}
+
{{#vardefine:suballsize|{{#arraysize:suball}}}}
+
{{#vardefine:subwl}}
+
{{ #vardefine: i | 0 }}
+
{{
+
  #while:
+
  | {{ #ifexpr: {{ #var: i }} < {{ #var: suballsize }} | true }}
+
  |
+
{{
+
{{ #vardefine: ii | 0 }}
+
{{ #vardefine: iii | 0 }}
+
#while:
+
  | {{ #ifexpr: {{ #var: ii }} < {{ #var: allsize }} | true }}
+
  |{{#ifeq:{{#arrayindex:suball|{{ #var: i }}}} | {{#arrayindex:all|{{ #var: ii }}}}|{{ #vardefine: iii | {{ #expr: {{ #var: iii }} + 1 }}}}|}}
+
{{ #vardefine: ii | {{ #expr: {{ #var: ii }} + 1 }} }}
+
}}
+
{{#vardefine:subwl |{{#var:subwl}}{{#arrayindex:suball|{{ #var: i }}}}@{{ #var: iii }}$}}
+
{{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}
+
}}
+
{{#arraydefine:subwinlose|{{#var:subwl}}|$|}}
+
{{#arrayindex:subwinlose|0}}<br>
+
{{#arrayindex:subwinlose|1}}<br>
+
{{#arrayindex:subwinlose|2}}
+
 
+
===unique list enemys ===
+
{{#vardefine:subwlc|{{#arraysize:subwinlose}}}}
+
 
+
{{ #vardefine: ei | 0 }}
+
{{
+
  #while:
+
  | {{ #ifexpr: {{ #var: ei }} < {{#var:subwlc}} | true }}
+
  |
+
{{#ifeq:{{#var:armyname}}|{{#explode:{{#arrayindex:subwinlose|{{#var:ei}}}}|@|0}}
+
|{{#vardefine:enemy|{{#var:enemy}}{{#explode:{{#arrayindex:subwinlose|{{#var:ei}}}}|@|1}}@}}
+
|{{#ifeq:{{#var:armyname}}|{{#explode:{{#arrayindex:subwinlose|{{#var:ei}}}}|@|1}}
+
|{{#vardefine:enemy|{{#var:enemy}}{{#explode:{{#arrayindex:subwinlose|{{#var:ei}}}}|@|0}}@}}}}}}
+
{{ #vardefine: ei | {{ #expr: {{ #var: ei }} + 1 }} }}
+
}}
+
{{#arraydefine:enemy|{{#var:enemy}}|@}}
+
{{#arrayunique:enemy}}
+
{{#arrayprint:enemy}}
+
 
+
===Final Array===
+
{{#vardefine:enemyct|{{#arraysize:enemy}}}}
+
{{ #vardefine: e2 | 0 }}
+
{{
+
  #while:
+
  | {{ #ifexpr: {{ #var: e2 }} < {{ #var:enemyct }} | true }}
+
  |
+
  {{#vardefine: e3 | 0 }}
+
  {{#vardefine:ewin|0}}
+
  {{#vardefine:elose|0}}
+
  {{#vardefine:allstat}}
+
  {{ 
+
  #while:
+
  | {{#ifexpr: {{ #var: e3 }} < {{ #var:subwlc }} | true }}
+
  |{{#ifeq:{{#arrayindex:enemy|{{#var:e2}}}}|{{#explode:{{#arrayindex:subwinlose|{{#var:e3}}}}|@|0}}
+
|{{#vardefine:name{{#arrayindex:enemy|{{#var:e2}}}}}}{{#vardefine:ewin|{{#expr:{{#var:ewin}}+{{formatnum:{{#explode:{{#arrayindex:subwinlose|{{#var:e3}}}}|@|2}}}}|R}}}} {{#vardefine:allstat|{{#arrayindex:enemy|{{#var:e2}}}}@{{#var:elose}}@{{#var:ewin}}}}
+
|{{#ifeq:{{#arrayindex:enemy|{{#var:e2}}}}|{{#explode:{{#arrayindex:subwinlose|{{#var:e3}}}}|@|1}}
+
|{{#vardefine:name{{#arrayindex:enemy|{{#var:e2}}}}}}{{#vardefine:elose|{{#expr:{{#var:elose}}+{{formatnum:{{#explode:{{#arrayindex:subwinlose|{{#var:e3}}}}|@|2}}}}|R}}}} {{#vardefine:allstat|{{#arrayindex:enemy|{{#var:e2}}}}@{{#var:elose}}@{{#var:ewin}}}}
+
|}}}}
+
    {{#vardefine: e3 | {{ #expr: {{ #var: e3 }} + 1 }} }}
+
  }} {{#vardefine:allstatstring|{{#var:allstatstring}}{{#var:allstat}}$}}
+
 
+
{{ #vardefine: e2 | {{ #expr: {{ #var: e2 }} + 1 }} }}
+
}}
+
 
+
<!-- string format at this point is enemyname@theylost@theywon -->
+
{{#var:allstatstring}}
+
 
+
=== Final Output ===
+
{{#arraydefine:allstatarray|{{#var:allstatstring}}|$}}
+
{{#arrayprint:allstatarray}}
+
 
+
{| class="wikitable"
+
|-
+
!colspan="3" scope="col"| {{#var:armyname}} fought
+
|-
+
|-
+
! scope="col"| Combatants
+
! scope="col"| Won
+
! scope="col"| Lost
+
|-
+
{{ #vardefine: fi | 0 }}
+
 
+
{{
+
  #while:
+
  | {{ #ifexpr: {{ #var: fi }} < {{#expr:{{#arraysize:allstatarray}}-1}} | true }}
+
  |{{!-}}
+
{{!}}{{#explode:{{#arrayindex:allstatarray|{{#var:fi}}}}|@|0}}
+
{{!}}{{#explode:{{#arrayindex:allstatarray|{{#var:fi}}}}|@|1}}
+
{{!}}{{#explode:{{#arrayindex:allstatarray|{{#var:fi}}}}|@|2}}
+
{{!-}}
+
{{ #vardefine: fi | {{ #expr: {{ #var: fi }} + 1 }} }}
+
}}
+
 
+
|}
+
 
+
=== Top Banner ===
+
<!--<div id="mp-topbanner" style="width:100%; background:#EBEBEB; border:1px solid #ddd; padding:5px 0px 5px 0px;">-->
+
<!--<div id="mp-topbanner" style="width:940px; background:#EBEBEB; text-align: justify; -ms-text-justify: text-justify: distribute-all-lines; margin-top:90px; margin-left:auto; margin-right:auto; height:90px; display:inline; border:1px solid #ddd; padding:5px 0px 5px 0px;">-->
+
 
+
<div id="mp-topbanner" style="width:100%; background:#EBEBEB; text-align: justify; -ms-text-justify: text-justify: distribute-all-lines; border:0px solid #ddd; padding:0px 0px 0px 0px;">{{#vardefine:msize|x95px}}
+
<span style="display: inline-block;">[[File:Legio I.png|bottom|link=Legio I - The Dark Angels Legion|frameless|{{#var:msize}}|Dark Angels]]</span>
+
<span style="display: inline-block;">[[File:Legio V.png|bottom|link=Legio V - The White Scars Legion|frameless|{{#var:msize}}|White Scars]]</span>
+
<span style="display: inline-block;">[[File:Legio VI.png|bottom|link=Legio VI - The Space Wolves Legion|frameless|{{#var:msize}}|Space Wolves]]</span>
+
<span style="display: inline-block;">[[File:Legio VII.png|bottom|link=Legio VII - The Imperial Fists Legion|frameless|{{#var:msize}}|Imperial Fists]]</span>
+
<span style="display: inline-block;">[[File:Legio IX.png|bottom|link=Legio IX - The Blood Angels Legion|frameless|{{#var:msize}}|Blood Angels]]</span>
+
<span style="display: inline-block;">[[File:Legio X.png|bottom|link=Legio X - The Iron Hands Legion|frameless|{{#var:msize}}|Iron Hands]]</span>
+
<span style="display: inline-block;">[[File:Legio XIII.png|bottom|link=Legio XIII - The Ultramarines Legion|frameless|{{#var:msize}}|Ultramarines]]</span>
+
<span style="display: inline-block;">[[File:Legio XVIII.png|bottom|link=Legio XVIII - The Salamanders Legion|frameless|{{#var:msize}}|Salamanders]]</span>
+
<span style="display: inline-block;">[[File:Legio XIX.png|bottom|link=Legio XIX - The Raven Guard Legion|frameless|{{#var:msize}}|Raven Guard]]</span>
+
<span style="display: inline-block;">[[File:Mechanicus.png|super|link=Adeptus Mechanicus|frameless|{{#var:msize}}|Adeptus Mechanicus]]</span>
+
<span style="display: inline-block;">[[File:Legio III.png|bottom|link=Legio III - The Emperor's Children Legion|frameless|{{#var:msize}}|Emperor's Children]]</span>
+
<span style="display: inline-block;">[[File:Legio IV.png|bottom|link=Legio IV - The Iron Warriors Legion|frameless|{{#var:msize}}|Iron Warriors]]</span>
+
<span style="display: inline-block;">[[File:Legio VIII.png|bottom|link=Legio VIII - The Night Lords Legion|frameless|{{#var:msize}}|Night Lords]]</span>
+
<span style="display: inline-block;">[[File:Legio XII.png|bottom|link=Legio XII - The World Eaters Legion|frameless|{{#var:msize}}|World Eaters]]</span>
+
<span style="display: inline-block;">[[File:Legio XIV.png|bottom|link=Legio XIV - The Death Guard Legion|frameless|{{#var:msize}}|Death Guard]]</span>
+
<span style="display: inline-block;">[[File:Legio XV.png|bottom|link=Legio XV - The Thousand Sons Legion|frameless|{{#var:msize}}|Thousand Sons]]</span>
+
<span style="display: inline-block;">[[File:Legio XVI.png|bottom|link=Legio XVI - The Sons of Horus Legion|frameless|{{#var:msize}}|Sons of Horus]]</span>
+
<span style="display: inline-block;">[[File:Legio XVII.png|bottom|link=Legio XVII - The Word Bearers Legion|frameless|{{#var:msize}}|Word Bearers]]</span>
+
<span style="display: inline-block;">[[File:Legio XX.png|bottom|link=Legio XX - The Alpha Legion|frameless|{{#var:msize}}|Alpha Legion]]</span>
+
<span style="width: 100%; display: inline-block; font-size: 0; line-height: 0;"></span>
+
</div>
+
 
+
<div id="mp-topbanner" style="width:100%; background:#EBEBEB; text-align: justify; -ms-text-justify: text-justify: distribute-all-lines; border:1px solid #ddd; padding:5px 0px 5px 0px;">
+
{{#vardefine:msize|60px}}
+
<div style="display:inline;">[[File:Legio I.png|bottom|link=Legio I - The Dark Angels Legion|frameless|{{#var:msize}}|Dark Angels]]</div>
+
<div style="display:inline;">[[File:Legio V.png|bottom|link=Legio V - The White Scars Legion|frameless|{{#var:msize}}|White Scars]]</div>
+
<div style="display:inline;">[[File:Legio VI.png|bottom|link=Legio VI - The Space Wolves Legion|frameless|{{#var:msize}}|Space Wolves]]</div>
+
<div style="display:inline;">[[File:Legio VII.png|bottom|link=Legio VII - The Imperial Fists Legion|frameless|{{#var:msize}}|Imperial Fists]]</div>
+
<div style="display:inline;">[[File:Legio IX.png|bottom|link=Legio IX - The Blood Angels Legion|frameless|{{#var:msize}}|Blood Angels]]</div>
+
<div style="display:inline;">[[File:Legio X.png|bottom|link=Legio X - The Iron Hands Legion|frameless|{{#var:msize}}|Iron Hands]]</div>
+
<div style="display:inline;">[[File:Legio XIII.png|bottom|link=Legio XIII - The Ultramarines Legion|frameless|{{#var:msize}}|Ultramarines]]</div>
+
<div style="display:inline;">[[File:Legio XVIII.png|bottom|link=Legio XVIII - The Salamanders Legion|frameless|{{#var:msize}}|Salamanders]] </div>
+
<div style="display:inline;">[[File:Legio XIX.png|bottom|link=Legio XIX - The Raven Guard Legion|frameless|{{#var:msize}}|Raven Guard]]</div>
+
<div style="display:inline;">[[File:Mechanicus.png|super|link=Adeptus Mechanicus|frameless|{{#var:msize}}|Adeptus Mechanicus]]</div>
+
<div style="display:inline;">[[File:Legio III.png|bottom|link=Legio III - The Emperor's Children Legion|frameless|{{#var:msize}}|Emperor's Children]]</div>
+
<div style="display:inline;">[[File:Legio IV.png|bottom|link=Legio IV - The Iron Warriors Legion|frameless|{{#var:msize}}|Iron Warriors]]</div>
+
<div style="display:inline;">[[File:Legio VIII.png|bottom|link=Legio VIII - The Night Lords Legion|frameless|{{#var:msize}}|Night Lords]]</div>
+
<div style="display:inline;">[[File:Legio XII.png|bottom|link=Legio XII - The World Eaters Legion|frameless|{{#var:msize}}|World Eaters]]</div>
+
<div style="display:inline;">[[File:Legio XIV.png|bottom|link=Legio XIV - The Death Guard Legion|frameless|{{#var:msize}}|Death Guard]]</div>
+
<div style="display:inline;">[[File:Legio XV.png|bottom|link=Legio XV - The Thousand Sons Legion|frameless|{{#var:msize}}|Thousand Sons]]</div>
+
<div style="display:inline;">[[File:Legio XVI.png|bottom|link=Legio XVI - The Sons of Horus Legion|frameless|{{#var:msize}}|Sons of Horus]]</div>
+
<div style="display:inline;">[[File:Legio XVII.png|bottom|link=Legio XVII - The Word Bearers Legion|frameless|{{#var:msize}}|Word Bearers]]</div>
+
<div style="display:inline;">[[File:Legio XX.png|bottom|link=Legio XX - The Alpha Legion|frameless|{{#var:msize}}|Alpha Legion]]</div>
+
</div>
+
 
+
 
+
 
+
 
+
<!--extract the dpl this is done strangely so the page name is attached at the end
+
of each string of minor battle report allows for a link back to the main battle report below.
+
Then its a bunch of find and replace stuff so that all the wikitable formatting is removed or most of it,
+
very painful to remove | had to use bracketed {{!}}-->
+
 
+
{{#vardefine:x|{{#dpl:|category=S01 dpl oanp|category=Battlereport|category=Major|includepage={battlereportminor2}:Lplayer:Tplayer:Outcome:Skirmish name:%PAGE%|table= ,- }}}}
+
{{#vardefine:x|{{#replace:{{#var:x}}|{{!}}|@}}}}
+
{{#vardefine:x|{{#replace:{{#var:x}}|{@class=wikitable|}}}}
+
{{#vardefine:x|{{#replace:{{#var:x}}|}|}}}}
+
{{#vardefine:x|{{#replace:{{#var:x}}|@-|$}}}}
+
{{#vardefine:x|{{#replace:{{#var:x}}|$ |$}}}}
+
{{#var:x}}
+
<!-- Builds the array splitting on dollar sign, this leaves a string in the rough format of @Lplayer @Tplayer @Outcome @Text @BattlereportPage, there are few vagrant spaces around the place but these get ignored below --> 
+
{{#arraydefine:minorall|{{#var:x}}|$}}
+
{{#arrayindex:minorall|1}}<br>
+
{{#arrayindex:minorall|2}}<br>
+
{{#arrayindex:minorall|3}}
+
 
+
 
+
<!-- This is the loop to filter out and rebuild the report list so that only those skirmishes relating to this army are displayed-->
+
{{ #vardefine: i | 0 }}
+
{{ #vardefine: asize |{{#arraysize:minorall}}}}
+
{{
+
  #while:
+
  | {{ #ifexpr: {{ #var: i }} < {{ #var: asize }} | true }}
+
  |<nowiki/>
+
{{#ifeq: {{#var:armyname}} | {{#explode:{{#arrayindex:minorall|{{ #var: i }}}}|@|1}} |
+
{{#vardefine: Lplayer |{{#explode:{{#arrayindex:minorall|{{ #var: i }}}}|@|1}}}}
+
{{#vardefine: Tplayer |{{#explode:{{#arrayindex:minorall|{{ #var: i }}}}|@|2}}}}
+
{{#vardefine: Outcome |{{#explode:{{#arrayindex:minorall|{{ #var: i }}}}|@|3}}}}
+
{{#vardefine: Text |{{#explode:{{#arrayindex:minorall|{{ #var: i }}}}|@|4}}}}
+
{{#vardefine: Mainbattle |{{#explode:{{#arrayindex:minorall|{{ #var: i }}}}|@|5}}}}
+
* {{#var:Text}} - {{#var:Lplayer}} vs {{#var:Tplayer}} - {{#ifeq: {{#var:Outcome}} | TW | Traitor Victory | {{#ifeq: {{#var:Outcome}} | LW | Loyalist Victory| Stalemate }}  }} - Fought as part of Major Batlle:[[{{#var:Mainbattle}}]]
+
|}}
+
{{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}
+
}}
+
 
+
 
+
-----------------
+
 
+
[[Sirrob01 Battle Major]]
+
 
+
[[Sirrob01 Battle Minor]]
+
 
+
 
+
________________________________
+
<div class="isATicker Ticker_engine-std Ticker_speed-3 Ticker_strLinkText- Ticker_strLinkURI-Category:Completed Planet">
+
<DynamicPageList>
+
category=Uncompleted Army
+
count=10
+
mode=inline
+
ordermethod=lastedit
+
</DynamicPageList>
+
</div>
+
 
+
-------
+

Latest revision as of 18:18, 11 February 2017

Blog Posts

Blog Posts




Random Wiki Blog Post

I have just put the final touches to an upgrade to the User Page and the Army profile. For the latter I have added an additional line called Owner, this is where people populate their User Name which

My Armies

Imperial Search....No Result


Imperial Search....No Result


Imperial Search....No Result


Imperial Search....No Result

Test Lucius

Page form Test

Page Form Test