Difference between revisions of "Nookipedia:Project Items/Table Templates"

From Nookipedia, the Animal Crossing wiki
m (SuperHamster moved page Nookipedia:Project Furniture/Table Templates to Nookipedia:Project Items/Table Templates: Expanded scope to all items, per talk page)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:ModernEndTableGold.png|thumb|Not THAT table! Even if it is shiny!]]
+
[[File:Modern End Table (Gold Nugget) NL Model.png|thumb|100px|Not THAT table! Even if it is shiny!]]
The following sections show you how each template works to create different parts of the table.<ref>'''Important''': Figuring out how {{t|TableHeader}} works doesn't guarantee you getting those overpriced GracieGrace furniture.</ref> If you're still confused on how to use these templates, head over to some of the more completed furniture pages and edit the page to study the coding structure. If you need any one-on-one help, you can contact any of our members, preferably our more active, experienced ones (or [[User:Sunmarsh|sunmarsh]], he's the <s>complete moron</s> absolute genius who made them). Oh, and remember to use the preview button before you save!
+
The following sections show you how each template works to create different parts of the table.<ref>'''Important''': Figuring out how {{t|TableTop}} works doesn't guarantee you getting those overpriced GracieGrace furniture.</ref> If you're still confused on how to use these templates, head over to some of the more completed furniture pages and edit the page to study the coding structure. If you need any one-on-one help, you can contact any of our members, preferably our more active, experienced ones (or [[User:Sunmarsh|sunmarsh]], he's the <s>complete moron</s> absolute genius who made them). Oh, and remember to use the preview button before you save!
 +
__TOC__
 +
==Template:TableTop==
 +
This template will automatically create a collapsible container for the table as well as its column heading labels. By inputting the correct parameters, the table will automatically generate a table with the appropriate amount of columns for the list you are creating. It is generally advisable however to create a new template using TableTop, with the ability to change the name of the template (e.g. [[Template:TableTop NH Furniture]]).
  
==Template:TableHeader==
+
===Usage===
This template will automatically create a collapsible container for the table as well as its column heading labels. By inputting the correct parameters, the table will automatically generate a table with the appropriate amount of columns for the list you are creating. The template accepts several parameters as outlined in its documentation; however, I will be going over only the required parameters here.
+
<pre>
 +
{{TableTop
 +
|color          = items, bug, or fish (default is items)
 +
|title          =  
 +
|collapsible   = (default is not collapsible)
 +
|collapsed      = (default is not collapsed)
 +
|sortable      = (default is not sortable)
 +
|column1        =
 +
|column2        =
 +
...
 +
|columnX        =
 +
}}
 +
</pre>
  
*'''game''' - Specifies the game the item list is referencing. Possible values: DnM, DnM+, ACGC, DnMe+, ACWW, ACCF, ACNL
+
*'''title''' - Specifies the title of the subject in question. Recommended to format parameter as <code><nowiki>{{{name|<subject>}}} in {{<game abbreviation>|nolink}}</nowiki></code> if creating a template using TableTop.
*'''type''' - Specifies the type of item(s) the table will contain. Possible values: accessory, carpet, clothing, fish, fossil, furniture, gyroid, insect, misc, music, seafood, stationery, wallpaper
+
*'''color''' - Specifies the color of the TableTop. List of colors is available [[Help:Tables#Styling|here]].
*'''collection''' - Specifies the type of list being created/the type of page the page the list will be on. Possible values: category, other, series, set, theme
+
*'''collapsible''' - Specifies if the table can be collapsed.
*'''title''' - The table's name that will appear at the top of the collapsible container.
+
*'''collapsed''' - Specifies if the table is collapsed by default.
 +
*'''sortable''' - Specifies if the table can sort values.
 +
*'''column1''', '''column2''', etc. - Species the column's name when in use.
  
'''Example:''' Let's say you want to create a furniture table for the Pirate theme in ACWW because you like pirates and you want your villagers to mistake you for a pirate. You would use the following wikitext code:
+
===Example===
 +
Let's say you want to create a furniture table for the Antique Series in {{NH}}. You would first create a template using TableTop, such as with [[Template:TableTop NH Furniture]], and then output the following wikitext code:
  
<pre>{{TableHeader|game=ACWW|type=furniture|collection=Theme|title=Pirate Theme in ''Animal Crossing: Wild World''}}</pre>
+
<pre>{{TableTop NH Furniture|name=Antique Series}}</pre>
  
 
and it produces:
 
and it produces:
{{TableHeader|game=ACWW|type=furniture|collection=Theme|title=Pirate Theme in ''Animal Crossing: Wild World''}}
+
{{TableTop NH Furniture|name=Antique Series}}
 
{{TableFooter}}<br>
 
{{TableFooter}}<br>
  
 
==Template:TableContent==
 
==Template:TableContent==
This template formats each cell's contents appropriately and automatically creates new rows. It does not have any required parameters. If you are creating a critter table, however, you will want to use the type parameter to specify insect, fish, or seafood, so it can change the cell border color appropriately.
+
This template formats each cell's contents appropriately and automatically creates new rows. It does not have any required parameters. This template is only advisable for games that do not currently have Cargo data.
  
'''Example:''' Let's try the template out on a bug table...
+
===Example===
 +
Let's try the template out on a bug table...
  
 
<pre>{{TableHeader|game=ACCF|type=insect|collection=other|title=List of bugs in ''Animal Crossing: City Folk''}}
 
<pre>{{TableHeader|game=ACCF|type=insect|collection=other|title=List of bugs in ''Animal Crossing: City Folk''}}
Line 58: Line 77:
  
 
==Template:TableFooter==
 
==Template:TableFooter==
This template will produce the appropriate closing tags for a table and its container. If you don't end your tables with this tag, they will take up the entire page and may 'swallow' other elements on the page. That's not good! Your tables don't deserve this! If you look at the wikitext code for this page, you will see I closed the tables in the examples above using this template. This template accepts an optional div parameter which may be set to true or false (default is true). If set to false it will not insert closing div tags. This allows you to embed other tables inside the container before closing it, like in the example below.
+
This template will produce the appropriate closing tags for a table and its container. If you don't end your tables with this tag, they will take up the entire page and may 'swallow' other elements on the page. That's not good! Your tables don't deserve this!
{{TableHeader|game=ACNL|type=furniture|collection=Series|title=Blue Series in ''Animal Crossing:New Leaf''}}
+
 
 +
Optionally, the TableFooter can also use the parameter <code>note</code> either to provide attribution or to annotate some parts of the table. There is also an optional <code>div</code> parameter provided, though its use will soon be deprecated following consolidation of the two separate tables for furniture and interior items into one.
 +
 
 +
===Example===
 +
<pre>
 +
{{TableTop NH Furniture|name=Antique Series}}
 +
 
 +
{{#invoke:NHFurnitureCargoQuery|main|limit=1|group by=nh_furniture.en_name|where=item_series='Antique'|order by=nh_furniture.catalog_num}}
  
{{TableContent
+
{{TableFooter|note={{Community:ACNH Spreadsheet/Attribution}}}}
| Blue Bed
+
</pre>
| [[File:Bed Blue.jpg]]
 
| 2,100
 
| 525
 
| [[Nookling Stores|Timmy & Tommy]]
 
| {{yellow}} / {{blue}}
 
| Rustic
 
| Basic
 
| {{Medium}}
 
| Bed
 
| Yes
 
}}
 
{{TableFooter|div=false}}
 
{{TableHeader|game=ACNL|type=wallpaper|collection=series}}
 
  
{{TableContent
+
Output:
| Blue Wall
+
{{TableTop NH Furniture|name=Antique Series}}
| [[File:Wall Blue.jpg]]
 
| 1,260
 
| 315
 
| {{blue}}
 
| -
 
| Basic
 
| [[Nookling Stores|Nooklings]]
 
}}
 
{{TableFooter}}<br>
 
  
==Table style guide==
+
{{#invoke:NHFurnitureCargoQuery|main|limit=1|group by=nh_furniture.en_name|where=item_series='Antique'|order by=nh_furniture.catalog_num}}
Because Template:TableHeader can generate so many different tables it's not really feasible to provide examples of every possible type. Instead the following list provides a style guide for how a cell's contents should be formatted depending on the type of information they contain.
 
  
*'''Item:''' Capitalize the first letter of every word in an item's name, except for articles or prepositions.
+
{{TableFooter|note={{Community:ACNH Spreadsheet/Attribution}}}}
*'''Song Title:''' Used in place of 'Item' on music tables. Capitalization rules still apply.
 
*'''Name:''' Used in place of 'Item' on insect, fish, and seafood tables. Capitalization rules still apply.
 
*'''Listen:''' Used on music tables; insert the appropriate audio file. See [[Help:Audio]] for more info.
 
*'''Image:''' Image width should be set to 75px. If the item is missing an image use the template <tt><nowiki>{{MIA}}</nowiki></tt>.
 
*'''Buy price:''' Always use Nook's catalog buy price (or other NPC's, if applicable), not Redd's buy price. If buy price is not Bells, note the currency used. (e.g. 40 medals)
 
*'''Sell price:''' Always use Nook's base sale price. If buy price is not Bells (e.g. 40 medals), note the currency in the sell price (e.g. 250 Bells).
 
*'''Available from:''' How does one acquire the item? Make sure this content links to the appropriate Nookipedia article.
 
*'''Group:''' (A, B, C, or -) Only applicable to ACWW and older games.
 
*'''Feng Shui:''' (Red, Orange, Yellow, Green, Special, Lucky, or -) Only applicable to DnMe+ and older games.
 
*'''Color:'''  (Red, Green, Yellow, Orange, Purple, Blue, Aqua, Beige, Pink, White, Gray, Black, Brown and/or Colorful) Be sure to put the color name in brackets to call the appropriate template. If an item has more than one color, list them in alphabetical order with a "/" between each one. (e.g. {{green}} / {{red}}). In specific color lists, however, list the article's color first (e.g. in "List of pink furniture", always list {{pink}} first). Applicable to ACWW and newer games.
 
*'''Genre(s):'''(Old School, Modern, Chic, and/or Lovely) Applicable to ACWW & ACCF only.
 
*'''HHA Theme(s):''' (Harmonious, Antique, Rustic, Trendy, Fairy Tale, Toy Shop, Sci-Fi, or Quirky) If an item has more than one then list them in alphabetical order with a "&" between each one. (e.g. Antique & Trendy) Applicable to ACNL only.
 
*'''Style:''' (Basic, Cute, Flashy, Historical, Iconic, Modern, Official, Ornate, Rock 'n' Roll, or Sporty) Applicable to ACNL only.
 
*'''Size:''' How much space an item takes up. (<nowiki>{{Small}}, {{Medium}} or {{Large}}</nowiki>). On fish and seafood tables indicates shadow size instead.
 
*'''Location:''' Used in insect and fish tables. Notes where the critter can be caught.
 
*'''Time:''' Used in insect, fish, and seafood tables. Notes which times & months the critter can be caught.
 
*'''Months:''' Used in insect and fish tables. Notes which months the critter can be caught. The contents will automatically be formatted to be grey and small. Add the appropriate color formatting to months the critter is available in. Remember that equals signs must be placed in brackets to avoid breaking the template.
 
*'''Info:''' Can the item do anything special? (e.g. Table, Stereo, Storage, Lamp, TV, Wall furniture, Can place on table etc.)
 
*'''Customize:''' Can Cyrus customize the item? ('''Yes''' or '''No'''). Applicable to ACNL only.
 
  
 
==References==
 
==References==
<references/>
+
{{Reflist}}

Latest revision as of 22:01, June 15, 2024

Not THAT table! Even if it is shiny!

The following sections show you how each template works to create different parts of the table.[1] If you're still confused on how to use these templates, head over to some of the more completed furniture pages and edit the page to study the coding structure. If you need any one-on-one help, you can contact any of our members, preferably our more active, experienced ones (or sunmarsh, he's the complete moron absolute genius who made them). Oh, and remember to use the preview button before you save!

Template:TableTop[edit]

This template will automatically create a collapsible container for the table as well as its column heading labels. By inputting the correct parameters, the table will automatically generate a table with the appropriate amount of columns for the list you are creating. It is generally advisable however to create a new template using TableTop, with the ability to change the name of the template (e.g. Template:TableTop NH Furniture).

Usage[edit]

{{TableTop
|color          = items, bug, or fish (default is items)
|title          = 
|collapsible    = (default is not collapsible)
|collapsed      = (default is not collapsed)
|sortable       = (default is not sortable)
|column1        =
|column2        =
...
|columnX        =
}}
  • title - Specifies the title of the subject in question. Recommended to format parameter as {{{name|<subject>}}} in {{<game abbreviation>|nolink}} if creating a template using TableTop.
  • color - Specifies the color of the TableTop. List of colors is available here.
  • collapsible - Specifies if the table can be collapsed.
  • collapsed - Specifies if the table is collapsed by default.
  • sortable - Specifies if the table can sort values.
  • column1, column2, etc. - Species the column's name when in use.

Example[edit]

Let's say you want to create a furniture table for the Antique Series in Animal Crossing: New Horizons. You would first create a template using TableTop, such as with Template:TableTop NH Furniture, and then output the following wikitext code:

{{TableTop NH Furniture|name=Antique Series}}

and it produces:

Antique Series in Animal Crossing: New Horizons

# Item Image Buy price Sell price Available from HHA theme(s) Interact Customizable Size


Template:TableContent[edit]

This template formats each cell's contents appropriately and automatically creates new rows. It does not have any required parameters. This template is only advisable for games that do not currently have Cargo data.

Example[edit]

Let's try the template out on a bug table...

{{TableHeader|game=ACCF|type=insect|collection=other|title=List of bugs in ''Animal Crossing: City Folk''}}

{{TableContent|type=insect
| 1
| Common Butterfly
| [[File:Common Butterfly CF Icon.png|64px]]
| 90
| Common
| 50mm
| Near flowers
| <small>March - June:</small> 4AM - 7PM<br><small>September:</small> 8AM - 4PM
| J F <font color{{=}}"#32B311">'''M A M J'''</font> J A <font color{{=}}"#32B311">'''S'''</font> O N D
| -
}}
Important: Notice how the equals signs for the text in the months column are enclosed in brackets (<font color{{=}}...). This is because cell contents cannot contain a raw equals sign due to how the template is coded.


Produces:

List of bugs in Animal Crossing: City Folk

# Name Image Price Rarity Size Location Time Months Peak
1 Common butterfly Common Butterfly CF Icon.png 90 Common 50mm Near flowers March - June: 4 AM - 7 PM
September: 8 AM - 4 PM
J F M A M J J A S O N D -


Template:TableFooter[edit]

This template will produce the appropriate closing tags for a table and its container. If you don't end your tables with this tag, they will take up the entire page and may 'swallow' other elements on the page. That's not good! Your tables don't deserve this!

Optionally, the TableFooter can also use the parameter note either to provide attribution or to annotate some parts of the table. There is also an optional div parameter provided, though its use will soon be deprecated following consolidation of the two separate tables for furniture and interior items into one.

Example[edit]

{{TableTop NH Furniture|name=Antique Series}}

{{#invoke:NHFurnitureCargoQuery|main|limit=1|group by=nh_furniture.en_name|where=item_series='Antique'|order by=nh_furniture.catalog_num}}

{{TableFooter|note={{Community:ACNH Spreadsheet/Attribution}}}}

Output:

Antique Series in Animal Crossing: New Horizons

# Item Image Buy price Sell price Available from HHA theme(s) Interact Customizable Size
34 Antique bed antique bed  28,000 Bells  7,000 Bells  Nook's Cranny (upgraded)
Retro / Expensive Bed No 2.0×2.0
Includes data sourced from the Data Spreadsheet for Animal Crossing New Horizons, compiled and edited by 6480, noizhub, Ricky, chaiinchomp, saberslime, robotic_scarab, mollumisc, sunmarsh, kyrokey, obstinateRixatrix, jackiwi, Zalex, SuperHamster, kait, hyuum, Azarro, Czarcasm, cinnamon_swirlix, astronomyfortwo, Welcius, glowtopia, BriKun, Alyrei, dodocodes.com, StevieCoops, sneeze, Shiny190, TwistedPeach, LavaToaster, capstone, vmario, rocklamp, Alexis, Aeon, and PanchamBro.

References[edit]

  1. Important: Figuring out how {{TableTop}} works doesn't guarantee you getting those overpriced GracieGrace furniture.