User blog:Gabonnie/Advanced TDSW Coding Manual: Difference between revisions

From Tower Defense Simulator Wiki
Jump to navigation Jump to search
Content deleted Content added
imported>Gabonnie
No edit summary
imported>Gabonnie
No edit summary
Line 10: Line 10:
---------
---------
<center><big><b>This blog ensures the people that wants to contribute to the wiki can self help themself using this blog for the advanced part of the wiki like templates, code tags, and many more. This blog however, will only teaches you things that are used on the wiki itself, not complex stuffs that aren't going to be use on the wiki.</b></big></center>
<center><big><b>This blog ensures the people that wants to contribute to the wiki can self help themself using this blog for the advanced part of the wiki like templates, code tags, and many more. This blog however, will only teaches you things that are used on the wiki itself, not complex stuffs that aren't going to be use on the wiki.</b></big></center>
== Navbox ==
Navbox, usually these are locked, but some aren't. Still, I will be teaching you how you can modify these if you really needed to.

In a navbox you must NOT delete "{|", "|}", "|", "|-", "!" and any text with that if you're only going to make slight changes. If you need to delete those, make sure you add one back after deleting or change the important ones like "colspan" to a lower number. Vice versa with a higher number.

Now let's say you want to add an emeny mode, let's go with a "stupid mode" for example.

(for dummies, don't add the numbers in or the "<nowiki><!-- --></nowiki>". those are for easy "reading" on the examples)
<syntaxhighlight lang="genshi">
1{| class="navbox mw-collapsible" data-expandtext="&#9660;" data-collapsetext="&#9650;"
2| colspan="3" class="anglednavbox" |[[File:EnemiesNewHeader.png|200px|center|link=Enemies]]
3|-
4! colspan="3" class="zombie-navbox-header" |Regular Enemies
5|-
6! class="zombie-navbox-label" |[[Normal Mode Waves|<span style="color:#{{TextColour}};">Normal Mode</span>]]
7| colspan="2" class="zombie-navbox-data" |[[Normal]] • [[Speedy]]
8|-
9! class="zombie-navbox-label" |[[Molten Mode Waves|<span style="color:#{{TextColour}};">Molten Mode</span>]]
10| colspan="2" class="zombie-navbox-data" |[[Normal]] • [[Speedy]]
11|-
12! rowspan="2" class="zombie-navbox-label" |[[Golden Mode Waves|<span style="color:#{{TextColour}};">Golden Mode</span>]]
13| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
14|-
15! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
16| class="zombie-navbox-data" |[[Radioactive]] • [[Wasted Boss]] • [[Splitter]] • [[Split]]
17|-
18! rowspan="3" class="zombie-navbox-label" |[[Fallen Mode Waves|<span style="color:#{{TextColour}};">Fallen Mode</span>]]
19| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
20|-
21! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
22| class="zombie-navbox-data" |[[Radioactive]] • [[Wasted Boss]]
23|-
24! class="zombie-navbox-label" |[[Hidden Wave|<span style="color:#{{TextColour}};">Hidden Wave</span>]]
25| class="zombie-navbox-data" |[[Glitched Giant]] • [[Bug]]
26|-
27! class="zombie-navbox-label" |[[Hardcore Mode Waves|<span style="color:#{{TextColour}};">Hardcore Mode</span>]]
28| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
29|}
</syntaxhighlight>
This whole code makes this:
{| class="navbox mw-collapsible" data-expandtext="&#9660;" data-collapsetext="&#9650;"
| colspan="3" class="anglednavbox" |[[File:EnemiesNewHeader.png|200px|center|link=Enemies]]
|-
! colspan="3" class="zombie-navbox-header" |Regular Enemies
|-
! class="zombie-navbox-label" |[[Normal Mode Waves|<span style="color:#{{TextColour}};">Normal Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Normal]] • [[Speedy]]
|-
! class="zombie-navbox-label" |[[Molten Mode Waves|<span style="color:#{{TextColour}};">Molten Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Normal]] • [[Speedy]]
|-
! rowspan="2" class="zombie-navbox-label" |[[Golden Mode Waves|<span style="color:#{{TextColour}};">Golden Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
|-
! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
| class="zombie-navbox-data" |[[Radioactive]] • [[Wasted Boss]] • [[Splitter]] • [[Split]]
|-
! rowspan="3" class="zombie-navbox-label" |[[Fallen Mode Waves|<span style="color:#{{TextColour}};">Fallen Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
|-
! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
| class="zombie-navbox-data" |[[Radioactive]] • [[Wasted Boss]]
|-
! class="zombie-navbox-label" |[[Hidden Wave|<span style="color:#{{TextColour}};">Hidden Wave</span>]]
| class="zombie-navbox-data" |[[Glitched Giant]] • [[Bug]]
|-
! class="zombie-navbox-label" |[[Hardcore Mode Waves|<span style="color:#{{TextColour}};">Hardcore Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
|}

Now, to get he "stupid mode" in we need to add another "class" and "! colspan".

<syntaxhighlight lang="genshi">
1{| class="navbox mw-collapsible" data-expandtext="&#9660;" data-collapsetext="&#9650;"
2| colspan="3" class="anglednavbox" |[[File:EnemiesNewHeader.png|200px|center|link=Enemies]]
3|-
4! colspan="3" class="zombie-navbox-header" |Regular Enemies
5|-
6! class="zombie-navbox-label" |[[Normal Mode Waves|<span style="color:#{{TextColour}};">Normal Mode</span>]]
7| colspan="2" class="zombie-navbox-data" |[[Normal]] • [[Speedy]]
8|-
<!-- we'll be adding a stupid mode here -->
| class="zombie-navbox-label" | [[placeholder|<span style="color:#ffffff;">stupid mode enemeies</span>]]
<!-- the class should be copied from the navbox as it is different for each navbox you may edit
as for the color, you may use a template color as seen with the others one. Though if you like to you can use
a custom one as seen in the example. THIS IS NOT RECOMMENDED THOUGH -->
| colspan="2" class="zombie-navbox-data" |[[example]] • [[ex2]]
<!-- the colspan is used to allows how much a cell should span, hence colspan.
This should usually be 2. Though you may want to change it depends on your situation. -->
|- <!-- this right here ends a row. always remember to use these if you haven't -->
9! class="zombie-navbox-label" |[[Molten Mode Waves|<span style="color:#{{TextColour}};">Molten Mode</span>]]
10| colspan="2" class="zombie-navbox-data" |[[Normal]] • [[Speedy]]
11|-
12! rowspan="2" class="zombie-navbox-label" |[[Golden Mode Waves|<span style="color:#{{TextColour}};">Golden Mode</span>]]
13| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
14|-
15! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
16| class="zombie-navbox-data" |[[Radioactive]] • [[Wasted Boss]] • [[Splitter]] • [[Split]]
17|-
18! rowspan="3" class="zombie-navbox-label" |[[Fallen Mode Waves|<span style="color:#{{TextColour}};">Fallen Mode</span>]]
19| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
20|-
21! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
22| class="zombie-navbox-data" |[[Radioactive]] • [[Wasted Boss]]
23|-
24! class="zombie-navbox-label" |[[Hidden Wave|<span style="color:#{{TextColour}};">Hidden Wave</span>]]
25| class="zombie-navbox-data" |[[Glitched Giant]] • [[Bug]]
26|-
27! class="zombie-navbox-label" |[[Hardcore Mode Waves|<span style="color:#{{TextColour}};">Hardcore Mode</span>]]
28| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
29|}
</syntaxhighlight>
and with that we should get:.
{| class="navbox mw-collapsible" data-expandtext="&#9660;" data-collapsetext="&#9650;"
| colspan="3" class="anglednavbox" |[[File:EnemiesNewHeader.png|200px|center|link=Enemies]]
|-
! colspan="3" class="zombie-navbox-header" |Regular Enemies
|-
! class="zombie-navbox-label" |[[Normal Mode Waves|<span style="color:#{{TextColour}};">Normal Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Normal]] • [[Speedy]]
|-
<!-- we'll be adding a stupid mode here -->
| class="zombie-navbox-label" | [[placeholder|<span style="color:#ffffff;">stupid mode enemeies</span>]]
<!-- the class should be copied from the navbox as it is different for each navbox you may edit
as for the color, you may use a template color as seen with the others one. Though if you like to you can use
a custom one as seen in the example. THIS IS NOT RECOMMENDED THOUGH -->
| colspan="2" class="zombie-navbox-data" |[[example]] • [[ex2]]
<!-- the colspan is used to allows how much a cell should span, hence colspan.
This should usually be 2. Though you may want to change it depends on your situation. -->
|-
! class="zombie-navbox-label" |[[Molten Mode Waves|<span style="color:#{{TextColour}};">Molten Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Normal]] • [[Speedy]]
|-
! rowspan="2" class="zombie-navbox-label" |[[Golden Mode Waves|<span style="color:#{{TextColour}};">Golden Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
|-
! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
| class="zombie-navbox-data" |[[Radioactive]] • [[Wasted Boss]] • [[Splitter]] • [[Split]]
|-
! rowspan="3" class="zombie-navbox-label" |[[Fallen Mode Waves|<span style="color:#{{TextColour}};">Fallen Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
|-
! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
| class="zombie-navbox-data" |[[Radioactive]] • [[Wasted Boss]]
|-
! class="zombie-navbox-label" |[[Hidden Wave|<span style="color:#{{TextColour}};">Hidden Wave</span>]]
| class="zombie-navbox-data" |[[Glitched Giant]] • [[Bug]]
|-
! class="zombie-navbox-label" |[[Hardcore Mode Waves|<span style="color:#{{TextColour}};">Hardcore Mode</span>]]
| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
|}
and yes the links doesn't work because these does not exist.
[[Category:Blog posts]]
[[Category:Blog posts]]

Revision as of 10:42, 30 August 2021

page will be completed in 1 week.
https://static.wikia.nocookie.net/abd-stand-archive/images/a/a0/Gabonnniescod.png/revision/latest?cb=20210830090104

NOTICE
Please, before reading this blog make sure that you have already read the TDSW Manual of Style. You need to learn the basics before going for advanced coding.

This blog ensures the people that wants to contribute to the wiki can self help themself using this blog for the advanced part of the wiki like templates, code tags, and many more. This blog however, will only teaches you things that are used on the wiki itself, not complex stuffs that aren't going to be use on the wiki.

Navbox, usually these are locked, but some aren't. Still, I will be teaching you how you can modify these if you really needed to.

In a navbox you must NOT delete "{|", "|}", "|", "|-", "!" and any text with that if you're only going to make slight changes. If you need to delete those, make sure you add one back after deleting or change the important ones like "colspan" to a lower number. Vice versa with a higher number.

Now let's say you want to add an emeny mode, let's go with a "stupid mode" for example.

(for dummies, don't add the numbers in or the "<!-- -->". those are for easy "reading" on the examples)

1{| class="navbox mw-collapsible" data-expandtext="&#9660;" data-collapsetext="&#9650;"
2| colspan="3" class="anglednavbox" |[[File:EnemiesNewHeader.png|200px|center|link=Enemies]]
3|-
4! colspan="3" class="zombie-navbox-header" |Regular Enemies
5|-
6! class="zombie-navbox-label" |[[Normal Mode Waves|<span style="color:#{{TextColour}};">Normal Mode</span>]]
7| colspan="2" class="zombie-navbox-data" |[[Normal]]  [[Speedy]]
8|-
9! class="zombie-navbox-label" |[[Molten Mode Waves|<span style="color:#{{TextColour}};">Molten Mode</span>]]
10| colspan="2" class="zombie-navbox-data" |[[Normal]]  [[Speedy]]
11|-
12! rowspan="2" class="zombie-navbox-label" |[[Golden Mode Waves|<span style="color:#{{TextColour}};">Golden Mode</span>]]
13| colspan="2" class="zombie-navbox-data" |[[Abnormal]]  [[Quick]]
14|-
15! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
16| class="zombie-navbox-data" |[[Radioactive]]  [[Wasted Boss]]  [[Splitter]]  [[Split]]
17|-
18! rowspan="3" class="zombie-navbox-label" |[[Fallen Mode Waves|<span style="color:#{{TextColour}};">Fallen Mode</span>]]
19| colspan="2" class="zombie-navbox-data" |[[Abnormal]]  [[Quick]]
20|-
21! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
22| class="zombie-navbox-data" |[[Radioactive]]  [[Wasted Boss]]
23|-
24! class="zombie-navbox-label" |[[Hidden Wave|<span style="color:#{{TextColour}};">Hidden Wave</span>]]
25| class="zombie-navbox-data" |[[Glitched Giant]]  [[Bug]]
26|-
27! class="zombie-navbox-label" |[[Hardcore Mode Waves|<span style="color:#{{TextColour}};">Hardcore Mode</span>]]
28| colspan="2" class="zombie-navbox-data" |[[Abnormal]]  [[Quick]]
29|}

This whole code makes this:

Now, to get he "stupid mode" in we need to add another "class" and "! colspan".

1{| class="navbox mw-collapsible" data-expandtext="&#9660;" data-collapsetext="&#9650;"
2| colspan="3" class="anglednavbox" |[[File:EnemiesNewHeader.png|200px|center|link=Enemies]]
3|-
4! colspan="3" class="zombie-navbox-header" |Regular Enemies
5|-
6! class="zombie-navbox-label" |[[Normal Mode Waves|<span style="color:#{{TextColour}};">Normal Mode</span>]]
7| colspan="2" class="zombie-navbox-data" |[[Normal]]  [[Speedy]]
8|-
<!-- we'll be adding a stupid mode here -->
| class="zombie-navbox-label" | [[placeholder|<span style="color:#ffffff;">stupid mode enemeies</span>]]
<!-- the class should be copied from the navbox as it is different for each navbox you may edit
as for the color, you may use a template color as seen with the others one. Though if you like to you can use
a custom one as seen in the example. THIS IS NOT RECOMMENDED THOUGH -->
| colspan="2" class="zombie-navbox-data" |[[example]]  [[ex2]]
<!-- the colspan is used to allows how much a cell should span, hence colspan.
This should usually be 2. Though you may want to change it depends on your situation. -->
|- <!-- this right here ends a row. always remember to use these if you haven't -->
9! class="zombie-navbox-label" |[[Molten Mode Waves|<span style="color:#{{TextColour}};">Molten Mode</span>]]
10| colspan="2" class="zombie-navbox-data" |[[Normal]]  [[Speedy]]
11|-
12! rowspan="2" class="zombie-navbox-label" |[[Golden Mode Waves|<span style="color:#{{TextColour}};">Golden Mode</span>]]
13| colspan="2" class="zombie-navbox-data" |[[Abnormal]]  [[Quick]]
14|-
15! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
16| class="zombie-navbox-data" |[[Radioactive]]  [[Wasted Boss]]  [[Splitter]]  [[Split]]
17|-
18! rowspan="3" class="zombie-navbox-label" |[[Fallen Mode Waves|<span style="color:#{{TextColour}};">Fallen Mode</span>]]
19| colspan="2" class="zombie-navbox-data" |[[Abnormal]]  [[Quick]]
20|-
21! style="padding:4px;margin:2px;background:#{{PrimaryColour}}; width:15%;"|[[Polluted Wasteland|<span style="color:#{{TextColour}};">Nuclear</span>]]
22| class="zombie-navbox-data" |[[Radioactive]]  [[Wasted Boss]]
23|-
24! class="zombie-navbox-label" |[[Hidden Wave|<span style="color:#{{TextColour}};">Hidden Wave</span>]]
25| class="zombie-navbox-data" |[[Glitched Giant]]  [[Bug]]
26|-
27! class="zombie-navbox-label" |[[Hardcore Mode Waves|<span style="color:#{{TextColour}};">Hardcore Mode</span>]]
28| colspan="2" class="zombie-navbox-data" |[[Abnormal]]  [[Quick]]
29|}

and with that we should get:.

and yes the links doesn't work because these does not exist.