User:Ferretwings/Sandbox/Transclusion Test

From Terraria Wiki
Jump to navigation Jump to search

Time for some database management.
(because this wiki has none)

This is a major task, but this is what will be accomplished:

The recipe for each item will be stored in one place. If a recipe changes, which can happen in any update, changing that one recipe will change all it's occurrences throughout the wiki. No more hunting for all the occurrences of a single recipe.

This is a 3-step process:
1. All the recipe sections need to be named (edit the page to see how this is done in the examples below).
2. The crafts template needs some work to accommodate this change (without breaking any recipes that may get missed).
3. The item recipes need to be transcluded throughout the wiki (see the examples below).

If done carefully, no pages will be broken during this transition, and we/I can take our time making this transition.

When deciding where to store the recipe:

Wherever possible, the item's recipe should be stored on the item's page.
For items that have been grouped with identically functioning items (and armor sets), and have no page of their own (there is no Palm Wood Table page), the recipes should be stored on the group page.
This seems the most logical, however, the recipes will be spread out throughout the wiki.

Say these are wiki pages:

Beds page

Would contain the recipes for all items with "Bed" in the name.


id=


testing...

| tool = Sawmill | result = Rich Mahogany Bed | link = no | | Rich Mahogany | 15 | Silk | 15

Tables page

| tool = Work Bench | toolspan = 1 | result = Rich Mahogany Table | link = no | id = 639 | | Rich Mahogany | 8


| Rich Mahogany Bed


| Rich Mahogany Platform | Rich Mahogany Wood


| result=Rich Mahogany Bed


| result=Rich Mahogany Bed

result parameter missing see documentation | Rich Mahogany Bed

sucess
Template:Crafts top

Template:Crafts row

Template:Crafts row

Template:Crafts row

Template:Crafts row

Template:Crafts row Template:Crafts bottom Template:Crafts top

Template:Crafts row

Template:Crafts row Template:Crafts bottom

{{crafts row | tool = Sawmill | result = Rich Mahogany Bed | link = no | = | 15

|  Silk 

| 15 | }}

{{crafts row | tool = Work Bench | toolspan = 1 | result = Rich Mahogany Table | link = no |

|  Rich Mahogany 

| 8 | }}

{{crafts row | result=Rich Mahogany Bed | = | = | = | | | | }}

result parameter missing see documentation | Rich Mahogany Bed

result parameter missing see documentation | Rich Mahogany Platform | Rich Mahogany Wood

Template:Crafts top

tool= Sawmill ,toolspan= Sawmill | result = Rich Mahogany Bed | link = no | | Rich Mahogany | 15 | S,result= Rich Mahogany Bed

tool= Work Bench ,toolspan= 1 ,result= Rich Mahogany Table ,id= 639 Template:Crafts row Template:Crafts bottom
end of hope
tr{{crafts row

| tool = Sawmill | toolspan = toolspanerror
| result = Rich Mahogany Bed | link = no |
| 15

|  Silk 
| 12 | 6error

}} tlTemplate:Crafts row l{{crafts row

| tool = Sawmill | result = Rich Mahogany Bed | link = no | | Rich Mahogany | 15 | Silk | 15

}} Template:Crafts row Template:Crafts bottom this should be the list

| tool = Sawmill | result = Rich Mahogany Bed | link = no | | Rich Mahogany | 15 | Silk | 15

end

end test

| tool = toolerror | toolspan = toolspanerror
| result = resulterror |
| 3error | 4error
| 5error | 6error
test - this should be a table:

tool = Sawmill link = no | 15 15


end table test

craft table test
Template:Crafts top {{crafts row

Template:Crafts first sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub rowTemplate:Crafts sub row }} Template:Crafts bottom
end craft table test
Template:Crafts top Template:Crafts row

Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts bottom

Wood page

Would contain the recipes for all items made of normal Wood.
There is already a section on this page for "any wood" (recipes that use any combination of the various forms of wood).
The Living Wood recipes are already transcluded into this page. (a rather clumsy translusion) Template:Crafts top Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts bottom

Sofa page

This page would contain NO actual recipes. All recipes are transcluded into the page. Template:Crafts top Template:Crafts row


Template:Crafts row Template:Crafts bottom

Table page

This page would contain NO actual recipes. All recipes are transcluded into the page. Template:Crafts top Template:Crafts row Template:Crafts row Template:Crafts bottom

Bed page

This page would contain NO actual recipes. All recipes are transcluded into the page. Template:Crafts top Template:Crafts row Template:Crafts row Template:Crafts bottom

Work Bench page

This page would contain NO actual recipes. All recipes are transcluded into the page. Template:Crafts top Template:Crafts row Template:Crafts row Template:Crafts bottom

Sawmill page

This page would contain NO actual recipes. All recipes are transcluded into the page. Template:Crafts top Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts bottom

Notes tool = Sawmill 0 crafts row
Template:Crafts top Template:Crafts bottom

Idea #2

Recipes would be stored on their crafting station page. The crafting stations already contain recipes, so this should be simple.
Maybe pull the ids from the id lists.

Recipe Table template

By Hand 2

Work Bench 2

Template:Crafts top Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts row Template:Crafts bottom

Anvil 2

Template:Crafts top Template:Crafts row Template:Crafts bottom

Harmode Anvil

Furnace 2

Template:Crafts top Template:Crafts row Template:Crafts row Template:Crafts bottom

===[[Harmode Furnace]]===
===[[Sawmill]]===
{DisplayRecipe}}
===[[Wooden Yoyo]]===
{DisplayRecipe}}
===[[Fishing Pole]]===
{DisplayRecipe|Wood Fishing Pole}}
===[[Table]] and [[Chair]]=== -could put these recipes under chair
===[[Work Bench]] and [[Chair]]=== -could put these recipes under chair
===[[Chair]]===
{DisplayRecipe|Wood Chair}}
--Work Bench and Chair--
recipes
--Table and Chair--
recipes
===[[Table]]===
{DisplayRecipe|Wood Table}}
{DisplayRecipe|Boreal Wood Table}}
{{UsedToCraft}}
===[[Wooden Armor]]===
{DisplayRecipe|Wood Helmet}}
{UsedIn}} - should return sections for console & mobile as well
===[[Crimtane Bar]]===
{DisplayRecipe}} - should return sections for console & mobile as well
{UsedIn}} - should return sections for console & mobile as well