Template:KemoTalkTable: Difference between revisions

From Japari Library, the Kemono Friends Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
KemoTalkTable is a Template that allows users to fill in a large table with the IDs and participants of KemoTalks . i swear it works - listen this style guide is wip it works i promise look
'''WARNING:''' This template uses the [[Template:PavFace|PavFace]] template in both its code and its usage. Please read PavFace's style guide before reading this style guide!
 
KemoTalkTable is a template that allows users to fill in a large table with the IDs and participants of KemoTalks. KemoTalkTable may a little confusing, due to a necessary but mechanically unusual step that isn't often found in such templates, but at its core it is an extremely simple template that will allow you to easily fill out a full table without having to fiddle around with the code. For this demonstration, we will be using {{sbpg|Komodo Dragon|Pavilion}}, because the person who made this template and this style guide loves her. Note that because the talks haven't been imported to the wiki as of this writing, the examples being used are not what will actually be on Komodo Dragon's page.
 
<pre>{{KemoTalkTable
|friend=Komodo Dragon
|friendid=0029
}}</pre>
{{KemoTalkTable
|friend=Komodo Dragon
|friendid=0029
}}
 
 
In KemoTalkTable, the parameters '''friend''' and '''friendid''' make up the table's header. Because the table is collapsible, when you first open a Friend's page, these will be the only things they are able to see. If you expand the template with only these two values having been defined, then the first row of the template will just be a mess of code and rot and whatnot. The parameter "friend" defines the name of the Friend, while the parameter "friendid" prints the icon. The value of friendid should be equal to the ID value that is used when using the PavFace template - in Komodo Dragon's case, this is 0029.
 
 
<pre>{{KemoTalkTable
|friend=Komodo Dragon
|friendid=0029
|talk1=549
|talk1friends={{PavFace|id=0007|link=Asian Small-Clawed Otter/Pavilion}}
|talk2=551
|talk2friends={{PavFace|id=0002|link=Raccoon/Pavilion}} {{PavFace|id=0002|link=Fennec Fox/Pavilion}}
}}</pre>
{{KemoTalkTable
|friend=Komodo Dragon
|friendid=0029
|talk1=549
|talk1friends={{PavFace|id=0007|link=Asian Small-Clawed Otter/Pavilion}}
|talk2=551
|talk2friends={{PavFace|id=0002|link=Raccoon/Pavilion}} {{PavFace|id=0003|link=Fennec Fox/Pavilion}}
}}
 
 
The values '''talk1''' and '''talk1friends''' turn that mess into an actual functional table. However, it isn't as easy just filling in the numbers all at once. As you can see, only two talks on the table are filled in - '''talk2''' and '''talk2friends''' allow for the second talk to work. Because different Friends in Pavilion have different amounts of KemoTalks, the table is designed to have talks entered one by one, with each cell on the table defined by their equivalent parameter. The talk# and talk#friends parameters are currently coded to support up to 100 separate talks, but this will likely be expanded in the future as Pavilion updates to accommodate however many talks Serval will end up getting. She'll have a lot.
 
You may also ask why KemoTalkTable standardizes to using PavFace rather than simply using text to define which Friends are involved. There's the honest answer, which is that I think it's cooler, and I didn't code PavFace for nothing, or the technical answer, which is that I think it's more user-friendly. Using images rather than text allows users to quickly determine which Friends are used at a glance, as all that text put so closely together could make it difficult to distinguish what information belongs where.


<pre>{{KemoTalkTable
<pre>{{KemoTalkTable
|friend=Wife
|friend=Komodo Dragon
|friendid=0029
|friendid=0029
|talk1=1
|talk1=549
|talk1friends={{PavFace|id=0029}}
|talk1friends={{PavFace|id=0007|link=Asian Small-Clawed Otter/Pavilion}}
|talk2=1
|talk2=551
|talk2friends={{PavFace|id=0029}}
|talk2friends={{PavFace|id=0002|link=Raccoon/Pavilion}} {{PavFace|id=0003|link=Fennec Fox/Pavilion}}
|talk3=1
|talk3=553
|talk3friends={{PavFace|id=0029}}
|talk3friends={{PavFace|id=0001|link=Serval/Pavilion}}
|talk4=1
|talk4=559
|talk4friends={{PavFace|id=0029}}
|talk4friends={{PavFace|id=0029}}
|row2=yes
|row2=y
|talk5=33
|talk5=560
|talk5friends={{PavFace|id=0029}}
|talk5friends={{PavFace|id=0029}}
|row3=yes
|talk9=69
|talk9friends={{PavFace|id=0029|faceid=08}}
}}</pre>
}}</pre>
{{KemoTalkTable
{{KemoTalkTable
|friend=Wife
|friend=Komodo Dragon
|friendid=0029
|friendid=0029
|talk1=1
|talk1=549
|talk1friends={{PavFace|id=0029}}
|talk1friends={{PavFace|id=0007|link=Asian Small-Clawed Otter/Pavilion}}
|talk2=1
|talk2=551
|talk2friends={{PavFace|id=0029}}
|talk2friends={{PavFace|id=0002|link=Raccoon/Pavilion}} {{PavFace|id=0003|link=Fennec Fox/Pavilion}}
|talk3=1
|talk3=553
|talk3friends={{PavFace|id=0029}}
|talk3friends={{PavFace|id=0001|link=Serval/Pavilion}}
|talk4=1
|talk4=559
|talk4friends={{PavFace|id=0029}}
|talk4friends={{PavFace|id=0029}}
|row2=yes
|row2=Komodo Dragon is 100% my wife
|talk5=33
|talk5=560
|talk5friends={{PavFace|id=0029}}
|talk5friends={{PavFace|id=0029}}
|row3=yes
|talk9=69
|talk9friends={{PavFace|id=0029|faceid=08}}
}}
}}


you can do this up to 100 separate talks and 25 rows. yes the row number parameters are 100% necessary its annoying. if you dont use it the talks on that row do not appear at all even if you fill in their info so do NOT forget to use the row parameters. i tried to just use the talk5 parameter and it made ugly blank white space within the template so i had to do this i apologize. [[Template:PavFace]] isnt necessary but it looks so much nicer and more informative at a glance than
{{KemoTalkTable
|friend=Wife
|friendid=0029
|talk1=1
|talk1friends=Komodo Dragon
|talk2=1
|talk2friends=Dragon
|talk3=1
|talk3friends=Komodo
|talk4=1
|talk4friends=Weed
|row2=yes
|talk5=33
|talk5friends=Komodo Duragon
|row3=yes
|talk9=69
|talk9friends=Komomo
}}


ok ill update this style guide to actually look professional when i get home from work have fun kids
This example contains a few new concepts, the first and most important of which being the '''row2''' parameter. The "row" series of parameters tell the template that it's allowed to add a new row, This may seem silly, but it's genuinely required to get the template to work properly. Without the row parameters, the table would display all 100 potential talks - that's 200 cells and 25 rows - at once, even if they're all blank. Because of the row parameters, these entire blocks of code are told to simply not exist at all unless given the go-ahead, and end the table right there. There's three other important things about the row parameters that must be kept in mind:
 
# '''There is no row1 parameter.''' The row parameters start at row2, because all Friends have at least four Talks. Why? Because all Friends have been shown to have at least five Archive Talks achieved by level-up. As such, the first row will always, without fail, exist, no matter what Friend the table is being used for. The parameters thus start with row2, so that when filling in information, you are aware which row on the table you are telling it to create.
# '''The input for row parameters can be almost anything.''' I'm serious, it can. Check it out for yourself - I lied and didn't use "y" on the actual template above, even though I did in the code example. The template simply needs text input of any kind at all to be told to allow the row to exist. While this means you can input something silly if you'd like, I strongly recommend avoiding it. Future editors may see while attempting to update the page and become confused. Also, I did say ''almost'' anything - you should avoid using wiki markup or templates, as that may confuse MediaWiki when attempting to parse the page. Or it could not. You really shouldn't try either way.
# '''There can only be four KemoTalks per row.''' That means eight cells - four talk# cells and four talk#friends cells. Once you fill these in, you ''must'' begin a new row, or any talks you enter will simply not display. If you're wondering why you can still only see two rows after putting in 20 talks, not remembering to use row parameters past 2 such as row3 or row4 might be why. Also, the code breaks if you try to use the same parameter twice. The row2 parameter will only create the second row, the row3 parameter will only create the third, and so on, and do ''not'' use them out of order for the same reason.
 
Now then, there are some other important things to note in this example.
 
* '''From row 2 onward, talk# and talk#friends parameters without values do not display text.''' The reason for this also has to do with why there is no row1 parameter - as there are a minimum of five KemoTalks for every Friend, there will always be at least four KemoTalks to fill up that first row. There's simply no need to code this hiding thing into it. The first talk of every row also lacks this, so don't start new rows unless you have a talk to fill it in with.
* '''Archive Talks use the Friend's own image.''' They also do not require to link to any pages. This is because even if other Friends appear in the talk, the game itself only counts the Friend the talk belongs to as a participant. However, because it's redundant, the Friend will not be listed as a participant on the table for any other Talk. The differences between Talk 551 and Talk 560 illustrate the difference between a normal talk and an Archive Talk.
 
That should be it. It's a long explanation, but using this template really is as simple as inputting some values. There's simply a lot to cover when it comes to explaining why it works.


</noinclude>
</noinclude>

Revision as of 01:26, 16 February 2018

WARNING: This template uses the PavFace template in both its code and its usage. Please read PavFace's style guide before reading this style guide!

KemoTalkTable is a template that allows users to fill in a large table with the IDs and participants of KemoTalks. KemoTalkTable may a little confusing, due to a necessary but mechanically unusual step that isn't often found in such templates, but at its core it is an extremely simple template that will allow you to easily fill out a full table without having to fiddle around with the code. For this demonstration, we will be using Komodo Dragon, because the person who made this template and this style guide loves her. Note that because the talks haven't been imported to the wiki as of this writing, the examples being used are not what will actually be on Komodo Dragon's page.

{{KemoTalkTable
|friend=Komodo Dragon
|friendid=0029
}}
Komodo Dragon's KemoTalks Kemotalk 010029001 01.png
Kemotalk ID Friends Involved Kemotalk ID Friends Involved Kemotalk ID Friends Involved Kemotalk ID Friends Involved
[[KemoTalk {{{talk1}}}]] {{{talk1friends}}} [[KemoTalk {{{talk2}}}]] {{{talk2friends}}} [[KemoTalk {{{talk3}}}]] {{{talk3friends}}} [[KemoTalk {{{talk4}}}]] {{{talk4friends}}}


In KemoTalkTable, the parameters friend and friendid make up the table's header. Because the table is collapsible, when you first open a Friend's page, these will be the only things they are able to see. If you expand the template with only these two values having been defined, then the first row of the template will just be a mess of code and rot and whatnot. The parameter "friend" defines the name of the Friend, while the parameter "friendid" prints the icon. The value of friendid should be equal to the ID value that is used when using the PavFace template - in Komodo Dragon's case, this is 0029.


{{KemoTalkTable
|friend=Komodo Dragon
|friendid=0029
|talk1=549
|talk1friends={{PavFace|id=0007|link=Asian Small-Clawed Otter/Pavilion}}
|talk2=551
|talk2friends={{PavFace|id=0002|link=Raccoon/Pavilion}} {{PavFace|id=0002|link=Fennec Fox/Pavilion}}
}}
Komodo Dragon's KemoTalks Kemotalk 010029001 01.png
Kemotalk ID Friends Involved Kemotalk ID Friends Involved Kemotalk ID Friends Involved Kemotalk ID Friends Involved
KemoTalk 549 Kemotalk 010007001 01.png KemoTalk 551 Kemotalk 010002001 01.png Kemotalk 010003001 01.png [[KemoTalk {{{talk3}}}]] {{{talk3friends}}} [[KemoTalk {{{talk4}}}]] {{{talk4friends}}}


The values talk1 and talk1friends turn that mess into an actual functional table. However, it isn't as easy just filling in the numbers all at once. As you can see, only two talks on the table are filled in - talk2 and talk2friends allow for the second talk to work. Because different Friends in Pavilion have different amounts of KemoTalks, the table is designed to have talks entered one by one, with each cell on the table defined by their equivalent parameter. The talk# and talk#friends parameters are currently coded to support up to 100 separate talks, but this will likely be expanded in the future as Pavilion updates to accommodate however many talks Serval will end up getting. She'll have a lot.

You may also ask why KemoTalkTable standardizes to using PavFace rather than simply using text to define which Friends are involved. There's the honest answer, which is that I think it's cooler, and I didn't code PavFace for nothing, or the technical answer, which is that I think it's more user-friendly. Using images rather than text allows users to quickly determine which Friends are used at a glance, as all that text put so closely together could make it difficult to distinguish what information belongs where.

{{KemoTalkTable
|friend=Komodo Dragon
|friendid=0029
|talk1=549
|talk1friends={{PavFace|id=0007|link=Asian Small-Clawed Otter/Pavilion}}
|talk2=551
|talk2friends={{PavFace|id=0002|link=Raccoon/Pavilion}} {{PavFace|id=0003|link=Fennec Fox/Pavilion}}
|talk3=553
|talk3friends={{PavFace|id=0001|link=Serval/Pavilion}}
|talk4=559
|talk4friends={{PavFace|id=0029}}
|row2=y
|talk5=560
|talk5friends={{PavFace|id=0029}}
}}
Komodo Dragon's KemoTalks Kemotalk 010029001 01.png
Kemotalk ID Friends Involved Kemotalk ID Friends Involved Kemotalk ID Friends Involved Kemotalk ID Friends Involved
KemoTalk 549 Kemotalk 010007001 01.png KemoTalk 551 Kemotalk 010002001 01.png Kemotalk 010003001 01.png KemoTalk 553 Kemotalk 010001001 01.png KemoTalk 559 Kemotalk 010029001 01.png
KemoTalk 560 Kemotalk 010029001 01.png


This example contains a few new concepts, the first and most important of which being the row2 parameter. The "row" series of parameters tell the template that it's allowed to add a new row, This may seem silly, but it's genuinely required to get the template to work properly. Without the row parameters, the table would display all 100 potential talks - that's 200 cells and 25 rows - at once, even if they're all blank. Because of the row parameters, these entire blocks of code are told to simply not exist at all unless given the go-ahead, and end the table right there. There's three other important things about the row parameters that must be kept in mind:

  1. There is no row1 parameter. The row parameters start at row2, because all Friends have at least four Talks. Why? Because all Friends have been shown to have at least five Archive Talks achieved by level-up. As such, the first row will always, without fail, exist, no matter what Friend the table is being used for. The parameters thus start with row2, so that when filling in information, you are aware which row on the table you are telling it to create.
  2. The input for row parameters can be almost anything. I'm serious, it can. Check it out for yourself - I lied and didn't use "y" on the actual template above, even though I did in the code example. The template simply needs text input of any kind at all to be told to allow the row to exist. While this means you can input something silly if you'd like, I strongly recommend avoiding it. Future editors may see while attempting to update the page and become confused. Also, I did say almost anything - you should avoid using wiki markup or templates, as that may confuse MediaWiki when attempting to parse the page. Or it could not. You really shouldn't try either way.
  3. There can only be four KemoTalks per row. That means eight cells - four talk# cells and four talk#friends cells. Once you fill these in, you must begin a new row, or any talks you enter will simply not display. If you're wondering why you can still only see two rows after putting in 20 talks, not remembering to use row parameters past 2 such as row3 or row4 might be why. Also, the code breaks if you try to use the same parameter twice. The row2 parameter will only create the second row, the row3 parameter will only create the third, and so on, and do not use them out of order for the same reason.

Now then, there are some other important things to note in this example.

  • From row 2 onward, talk# and talk#friends parameters without values do not display text. The reason for this also has to do with why there is no row1 parameter - as there are a minimum of five KemoTalks for every Friend, there will always be at least four KemoTalks to fill up that first row. There's simply no need to code this hiding thing into it. The first talk of every row also lacks this, so don't start new rows unless you have a talk to fill it in with.
  • Archive Talks use the Friend's own image. They also do not require to link to any pages. This is because even if other Friends appear in the talk, the game itself only counts the Friend the talk belongs to as a participant. However, because it's redundant, the Friend will not be listed as a participant on the table for any other Talk. The differences between Talk 551 and Talk 560 illustrate the difference between a normal talk and an Archive Talk.

That should be it. It's a long explanation, but using this template really is as simple as inputting some values. There's simply a lot to cover when it comes to explaining why it works.


{{{friend}}}'s KemoTalks [[File:Kemotalk 01{{{friendid}}}001 01.png|35px|link=]]
Kemotalk ID Friends Involved Kemotalk ID Friends Involved Kemotalk ID Friends Involved Kemotalk ID Friends Involved
[[KemoTalk {{{talk1}}}]] {{{talk1friends}}} [[KemoTalk {{{talk2}}}]] {{{talk2friends}}} [[KemoTalk {{{talk3}}}]] {{{talk3friends}}} [[KemoTalk {{{talk4}}}]] {{{talk4friends}}}