User:Boundbylife/template:npcwh
Syntax
To use this template, simply use the following syntax:
Code | Explanation |
---|---|
{{npcwh|start}} | This begins the table and adds headers. |
{{npcwh|wave|Wave 1}} | Inserts a wave header. Whatever you pass as the second parameter ends up in the title. |
{{npcwh|Sleepless Warden|2x|{{trigger}}}} | Here we specify the NPC's name, number, and trigger status. Passing {{trigger}} inserts a red "x" after the name. |
{{npcwh|end}} | This tells the table to stop. |
Shortened Syntax
You can use short names for convenience:
- {{npcwh|swar|2x|{{trigger}}}}
- {{npcwh|suph|3x}}
- {{npcwh|skee|4x}}
The short name takes the first letter of the first word (eg. "Sleepless" becomes "s") and adds the first three letters of the second word (eg. "Warden" becomes "war").
No Headers
Alternatively you can start a table with no headers:
- {{npcwh|start2}}
Example Usage
Headers
name | data | more data |
---|---|---|
cats | 273 | 53 |
dogs | 65 | 8,492 |
mice | 1,649 | 548 |
<style> .toggle-column {
display: none;
} </style> <script> document.addEventListener('DOMContentLoaded', function () {
// Create a toggle button var toggleButton = document.createElement('button'); toggleButton.textContent = 'Advanced View'; toggleButton.onclick = function() { // Select all toggleable columns in tables with 'wikitable' and/or 'sortable' classes var columns = document.querySelectorAll('.wikitable .toggle-column, .sortable .toggle-column'); for (var i = 0; i < columns.length; i++) { // Toggle display state columns[i].style.display = columns[i].style.display === 'none' ? : 'none'; } // Toggle button text this.textContent = this.textContent === 'Advanced View' ? 'Hide Advanced View' : 'Advanced View'; };
// Select all tables to potentially insert the toggle button before each var tables = document.querySelectorAll('.wikitable, .sortable'); tables.forEach(function(table) { var buttonClone = toggleButton.cloneNode(true); // Clone the button for each table table.parentNode.insertBefore(buttonClone, table); // Insert the button above each table });
}); </script>
|- | class=icon | | {{{2}}} x start {{{3}}} | class=icon | | class=icon | | class=icon | |-
Sleeper Ship Name | Effect(s) | Sig | Speed | Attack | Orbit | DPS/Volley | DPS/Volley | EHP | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Wave 1 | ||||||||||||||
|
400 |
1,305 m/s |
255 km |
55 km 145 m/s |
58 288 (5 s) |
340 6,092 (18 s) |
134,933 |
|||||||
3x Sleepless Upholder |
|
400 |
800 m/s |
225 km |
65 km 100 m/s |
382 1,904 (5 s) |
60 1,052 (18 s) |
56,400 |
||||||
4x Emergent Keeper |
|
35 |
2,880 m/s |
15 km |
5 km 320 m/s |
8 36 (5 s) |
16 136 (9 s) |
4,400 |
||||||
|
16x Awakened Keeper |
|
150 |
2,115 m/s |
105 km |
30 km 235 m/s |
36 180 (5 s) |
18 270 (15 s) |
19,250 |
|||||
|
2x Wakeful Sentry Tower |
50 |
0 m/s |
250 km |
0 km 0 m/s |
74 1,092 (15 s) |
0 0 (0 s) |
15,167 |
||||||
Capital Escalation 1 | ||||||||||||||
10x Sleepless Warden |
|
400 |
1,305 m/s |
255 km |
55 km 145 m/s |
58 288 (5 s) |
340 6,092 (18 s) |
134,933 |
No Headers
Sleepless Upholder |
|
400 |
800 m/s |
225 km |
65 km 100 m/s |
382 1,904 (5 s) |
60 1,052 (18 s) |
56,400 |