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 19: Line 19:
</div>
</div>
== Navbox ==
== Navbox ==
<div class="mw-collapsible mw-collapsed">
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.
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.


Line 171: Line 170:
|}
|}
and yes the links doesn't work because these does not exist.
and yes the links doesn't work because these does not exist.
</div>


=== another row for a collum ===
=== another row for a collum ===
Line 389: Line 387:
| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
| colspan="2" class="zombie-navbox-data" |[[Abnormal]] • [[Quick]]
|}
|}
great! we got what we wanted, but didn't I said I'll be teaching how the polluted wasteland row works? welp, check the next tutorial.
great! we got what we wanted, but didn't I said I'll be teaching how the polluted wasteland row works? welp, check the next expandable tutorial.
</div>
</div>
=== polluted wasteland row ===
=== polluted wasteland row ===
Line 396: Line 394:
</div>
</div>
== Colored/Coloured text ==
== Colored/Coloured text ==
<div class="mw-collapsible mw-collapsed">
this whole thing is taken from [[User:Mentin123|Mentin]]'s blog, because i am a lazy dumbass, this is used if you want to check for colors code. i added this here for the fact that if youre going to use this manual for some editing shit then might aswell get the colors right here without opening another blog.
this whole thing is taken from [[User:Mentin123|Mentin]]'s blog, because i am a lazy dumbass, this is used if you want to check for colors code. i added this here for the fact that if youre going to use this manual for some editing shit then might aswell get the colors right here without opening another blog.


this text seperate my blog with the added "template blog" i guess
this text seperate my blog with the added "template blog" i guess
{{User_blog:Mentin123/Colour_codes}}
{{User_blog:Mentin123/Colour_codes}}

</div>
[[Category:Blog posts]]
[[Category:Blog posts]]

Revision as of 13:02, 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.

Table of Contents:

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 (words/numbers before something important) 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 the "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. -->
| 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.

another row for a collum

welp, you really want to make a row like the golden and fallen mode version eh?

We will be using our existing code:

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|-
MOD| class="zombie-navbox-label" | [[placeholder|<span style="color:#ffffff;">stupid mode enemeies</span>]]
MOD| colspan="2" class="zombie-navbox-data" |[[example]]  [[ex2]]
MOD|-
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|}

now for the action, we'll be adding a ggez, jjez and jej subrow

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|-
<!-- basically we'll be adding a rowspan. adding it after the class is fine,
we'll do behind just for the sake of it being consistent -->
MOD| rowspan="4" class="zombie-navbox-label" | [[placeholder|<span style="color:#ffffff;">stupid mode enemeies</span>]]
MOD| colspan="2" class="zombie-navbox-data" |[[example]]  [[ex2]]
MOD|-
<!-- after this we'll do a class again with ! and a label class (just copy and paste bro)
or a special polluted wasteland but we'll get to that later-->
MOD! class="zombie-navbox-label" |[[ggez mode aka placeholder|<span style="color:#{{TextColour}};">ggez</span>]]
<!-- after this we'll back to the good old class navbox data -->
MOD| class="zombie-navbox-data" |[[ex]]  [[hsegadag]]
|-
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|}

after this incomplete piece of trash we'll get:

as you can see, something isn't right. the stupid mode is merging with molten and golden!

this is because of the rowspan we used. the rowspan is expecting 4 rows, but we have only gave it 2 (1 line of text and 1 ggez) that's why it is merging. what we have to do now is add more. I'll add all of these in without any comments, go figure it out youself it should be easy.

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|-
MOD| rowspan="4" class="zombie-navbox-label" | [[placeholder|<span style="color:#ffffff;">stupid mode enemeies</span>]]
MOD| colspan="2" class="zombie-navbox-data" |[[example]]  [[ex2]]
MOD|-
MOD! class="zombie-navbox-label" |[[ggez mode aka placeholder|<span style="color:#{{TextColour}};">ggez</span>]]
MOD| class="zombie-navbox-data" |[[ex]]  [[hsegadag]]
MOD|-
MOD! class="zombie-navbox-label" |[[jjez mode |<span style="color:#{{TextColour}};">jjez</span>]]
MOD| class="zombie-navbox-data" |[[ex222]]  [[bsads]]
MOD|-
MOD! class="zombie-navbox-label" |[[jej|<span style="color:#{{TextColour}};">jej</span>]]
MOD| class="zombie-navbox-data" |[[ed]]  [[ex22231]]
|-
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 we get:

great! we got what we wanted, but didn't I said I'll be teaching how the polluted wasteland row works? welp, check the next expandable tutorial.

polluted wasteland row

wip

Colored/Coloured text

this whole thing is taken from Mentin's blog, because i am a lazy dumbass, this is used if you want to check for colors code. i added this here for the fact that if youre going to use this manual for some editing shit then might aswell get the colors right here without opening another blog.

this text seperate my blog with the added "template blog" i guess Template:User blog:Mentin123/Colour codes