Feed The Beast Wiki

Follow the Feed The Beast Wiki on Discord or Mastodon!

READ MORE

Feed The Beast Wiki
(→‎Code Explanation: replaced: tt> → code> (8))
 
(13 intermediate revisions by 6 users not shown)
Line 5: Line 5:
   
 
== Goals ==
 
== Goals ==
* Remove the animation frames limit
 
* Introduce oreDict support.
 
 
* Increase the implementation of stuff that grids support.
 
* Increase the implementation of stuff that grids support.
* Improve the readability of templates in articles.
 
 
* Ease the creation of crafting grid templates.
 
* Ease the creation of crafting grid templates.
 
* ...and more...
 
* ...and more...
Line 16: Line 13:
   
 
== Progress ==
 
== Progress ==
</noinclude><div class="plainlinks" style="text-align:right">'''[http://wiki.feed-the-beast.com/index.php?title={{FULLPAGENAMEE}}&action=purge [Purge&#93;]'''</div>
+
</noinclude><div class="plainlinks" style="text-align:right">'''[https://ftb.gamepedia.com/index.php?title={{FULLPAGENAMEE}}&action=purge [Purge&#93;]'''</div>
{{Project:Template documentation project/Progress bar|24|25}}
+
{{Project:Template documentation project/Progress bar|25|25}}
 
<noinclude>
 
<noinclude>
 
=== Preparations ===
 
=== Preparations ===
Line 52: Line 49:
 
* {{Status|done|Done.}} Unprotect crafting grid templates. [[{{FULLPAGENAME}}/Error log]]
 
* {{Status|done|Done.}} Unprotect crafting grid templates. [[{{FULLPAGENAME}}/Error log]]
 
* {{Status|done|Done.}} Document templates.
 
* {{Status|done|Done.}} Document templates.
* {{Status|partlydone|In progress...}} Update templates associated with grids. (Infoboxes)
+
* {{Status|done|Done.}} Update templates associated with grids. (Infoboxes)
   
 
== Crafting grids ==
 
== Crafting grids ==
<div class="plainlinks" style="text-align:right">'''[http://wiki.feed-the-beast.com/index.php?title={{FULLPAGENAMEE}}&action=purge [Purge&#93;]'''</div>
+
<div class="plainlinks" style="text-align:right">'''[https://ftb.gamepedia.com/index.php?title={{FULLPAGENAMEE}}&action=purge [Purge&#93;]'''</div>
 
{{Project:Template documentation project/Progress bar|42|42}}
 
{{Project:Template documentation project/Progress bar|42|42}}
 
* {{Status|done|Done.}} {{Tl|Cg/Alloy Furnace}} creates a crafting grid for the [[Alloy Furnace]].
 
* {{Status|done|Done.}} {{Tl|Cg/Alloy Furnace}} creates a crafting grid for the [[Alloy Furnace]].
* {{Status|done|Done.}} {{Tl|Cg/Alloy Smelter}} creates a crafting grid for the [[Allow Smelter]].
+
* {{Status|done|Done.}} {{Tl|Cg/Alloy Smelter}} creates a crafting grid for the [[Alloy Smelter]].
 
* {{Status|done|Done.}} {{Tl|Cg/Assembling Machine}} creates a crafting grid for the [[Assembling Machine]].
 
* {{Status|done|Done.}} {{Tl|Cg/Assembling Machine}} creates a crafting grid for the [[Assembling Machine]].
 
* {{Status|done|Done.}} {{Tl|Cg/Automatic Canning Machine}} creates a crafting grid for the [[Automatic Canning Machine]].
 
* {{Status|done|Done.}} {{Tl|Cg/Automatic Canning Machine}} creates a crafting grid for the [[Automatic Canning Machine]].
Line 68: Line 65:
 
* {{Status|done|Done.}} {{Tl|Cg/Coke Oven}} creates a crafting grid for the [[Coke Oven]].
 
* {{Status|done|Done.}} {{Tl|Cg/Coke Oven}} creates a crafting grid for the [[Coke Oven]].
 
* {{Status|done|Done.}} {{Tl|Cg/Compressor}} creates a crafting grid for the [[Compressor]].
 
* {{Status|done|Done.}} {{Tl|Cg/Compressor}} creates a crafting grid for the [[Compressor]].
* <s>{{Status|notdone|Won't create.}} {{Tl|Grid/Crafting Table}} creates a crafting grid for the [[Crafting Table]].</s>
+
* <s>{{Status|notdone|Won't create.}} Grid/Crafting Table creates a crafting grid for the [[Crafting Table]].</s>
 
* {{Status|done|Done.}} {{Tl|Cg/Crafting Table}} creates an alternative crafting grid for the [[Crafting Table]].
 
* {{Status|done|Done.}} {{Tl|Cg/Crafting Table}} creates an alternative crafting grid for the [[Crafting Table]].
 
* {{Status|done|Done.}} {{Tl|Cg/Distillation Tower}} creates a crafting grid for the [[Distillation Tower]].
 
* {{Status|done|Done.}} {{Tl|Cg/Distillation Tower}} creates a crafting grid for the [[Distillation Tower]].
Line 101: Line 98:
   
 
== Crafting grids documentation ==
 
== Crafting grids documentation ==
<div class="plainlinks" style="text-align:right">'''[http://wiki.feed-the-beast.com/index.php?title={{FULLPAGENAMEE}}&action=purge [Purge&#93;]'''</div>
+
<div class="plainlinks" style="text-align:right">'''[https://ftb.gamepedia.com/index.php?title={{FULLPAGENAMEE}}&action=purge [Purge&#93;]'''</div>
 
{{Project:Template documentation project/Progress bar|42|42}}
 
{{Project:Template documentation project/Progress bar|42|42}}
 
* {{Status|done|Done.}} {{Tl|Cg/Alloy Furnace/doc}} creates a crafting grid for the [[Alloy Furnace]].
 
* {{Status|done|Done.}} {{Tl|Cg/Alloy Furnace/doc}} creates a crafting grid for the [[Alloy Furnace]].
Line 114: Line 111:
 
* {{Status|done|Done.}} {{Tl|Cg/Coke Oven/doc}} creates a crafting grid for the [[Coke Oven]].
 
* {{Status|done|Done.}} {{Tl|Cg/Coke Oven/doc}} creates a crafting grid for the [[Coke Oven]].
 
* {{Status|done|Done.}} {{Tl|Cg/Compressor/doc}} creates a crafting grid for the [[Compressor]].
 
* {{Status|done|Done.}} {{Tl|Cg/Compressor/doc}} creates a crafting grid for the [[Compressor]].
* {{Status|notdone|Won't create.}} <s>{{Tl|Cg/Crafting Table/doc}} creates a crafting grid for the [[Crafting Table]].</s>
+
* {{Status|notdone|Won't create.}} <s>Cg/Crafting Table/doc creates a crafting grid for the [[Crafting Table]].</s>
 
* {{Status|done|Done.}} {{Tl|Cg/Crafting Table/doc}} creates an alternative crafting grid for the [[Crafting Table]].
 
* {{Status|done|Done.}} {{Tl|Cg/Crafting Table/doc}} creates an alternative crafting grid for the [[Crafting Table]].
 
* {{Status|done|Done.}} {{Tl|Cg/Distillation Tower/doc}} creates a crafting grid for the [[Distillation Tower]].
 
* {{Status|done|Done.}} {{Tl|Cg/Distillation Tower/doc}} creates a crafting grid for the [[Distillation Tower]].
Line 170: Line 167:
 
* {{Status|done|Documented.}} {{Tl|Cg}} - Crafting grid components.
 
* {{Status|done|Documented.}} {{Tl|Cg}} - Crafting grid components.
 
* {{Status|notdone|Deprecated.}} {{Tl|G/Dict}} - Ore Dictionary.
 
* {{Status|notdone|Deprecated.}} {{Tl|G/Dict}} - Ore Dictionary.
* {{Status|done|Documented.}} {{Tl|G/Mods}} - Resolves mod names.
 
 
* {{Status|done|Documented.}} {{Tl|G/T}} > {{Tl|G/Tank}} - Single tank wrapper.
 
* {{Status|done|Documented.}} {{Tl|G/T}} > {{Tl|G/Tank}} - Single tank wrapper.
 
* {{Status|done|Documented.}} {{Tl|Gc}} > {{Tl|G/Cell}} - Grid display logic.
 
* {{Status|done|Documented.}} {{Tl|Gc}} > {{Tl|G/Cell}} - Grid display logic.
Line 194: Line 190:
 
</pre>
 
</pre>
 
===== Code Explanation =====
 
===== Code Explanation =====
* Line 1: No more <tt>Grid/</tt> prefix in front of crafting grid templates.
+
* Line 1: No more <code>Grid/</code> prefix in front of crafting grid templates.
 
* Line 2-4: Instead of providing a list of items to the crafting grid template, you give it a list of grids that can be fully customized. A redirect will be made for less typing (G->Grid).
 
* Line 2-4: Instead of providing a list of items to the crafting grid template, you give it a list of grids that can be fully customized. A redirect will be made for less typing (G->Grid).
* <tt><nowiki>{{G|Oak Wood}}</nowiki></tt> and <tt><nowiki>{{G|Oak Wood Planks|...}}</nowiki></tt>: A animation will display ore dict compatible items.
+
* <code><nowiki>{{G|Oak Wood}}</nowiki></code> and <code><nowiki>{{G|Oak Wood Planks|...}}</nowiki></code>: A animation will display ore dict compatible items.
* <tt><nowiki>{{G|Oak Wood Planks|tooltiptext=$1<br><span class="tcAspectTooltipDesc">Can smelt 1.5 items.</span>}}</nowiki></tt>: Demonstrates that grids in crafting grids can be fully customized. And that tooltips will support variables.
+
* <code><nowiki>{{G|Oak Wood Planks|tooltiptext=$1<br><span class="tcAspectTooltipDesc">Can smelt 1.5 items.</span>}}</nowiki></code>: Demonstrates that grids in crafting grids can be fully customized. And that tooltips will support variables.
 
==== Multiple crafting grids ====
 
==== Multiple crafting grids ====
 
This is what the code to create multiple crafting grids will look like in the future. Instead of flipping through animations automatically by the script, the user must flip through them manually with the controls provided.
 
This is what the code to create multiple crafting grids will look like in the future. Instead of flipping through animations automatically by the script, the user must flip through them manually with the controls provided.
Line 219: Line 215:
 
{{Crafting grid/End}}
 
{{Crafting grid/End}}
 
</pre>
 
</pre>
  +
  +
{{Navbox portals}}
  +
  +
[[Category:Projects]]
 
</noinclude>
 
</noinclude>

Latest revision as of 13:21, 25 November 2018

Welcome to the Template documentation project.

Warning

The new system will not be backwards compatible, old crafting grids will be automatically converted to the new crafting grids. You are safe to continue to use the current system but please do not modify the old grid templates.

Goals

  • Increase the implementation of stuff that grids support.
  • Ease the creation of crafting grid templates.
  • ...and more...

Links

Progress

 
100% (25/25)
100% (25/25)

Preparations

  • Yes checkDone. Protect crafting grid templates.

Code

  • Black checkAlready done. Code animation.
  • Yes checkDone. Code crafting grid controls.

Grid

  • Yes checkDone. Style grids.
  • Yes checkDone. Create grids template.

Animation

  • Yes checkDone. Create crafting grid controls to flip through different crafting recipes.
  • Yes checkDone. Create "activate animation" wrapping metatemplate.
  • Yes checkDone. Create "activate controls" wrapping metatemplate.

Tooltips

  • Yes checkDone. Code support for variables in tooltips.

Ore Dictionary

  • Yes checkDone. Create Ore Dictionary template
  • Yes checkDone. Create Ore Dictionary activation template
  • Yes checkDone. Populate Ore Dictionary

Tanks

  • Yes checkDone. Create tanks template.
  • Yes checkDone. Tank image truncation script.
  • Yes checkDone. Tank image helper.

Crafting Grids

  • Yes checkDone. Create "cells" metatemplate for crafting grid creation.
  • Yes checkDone. Create "tanks" metatemplate for crafting grid creation.
  • Yes checkDone. Create a crafting grid metatemplate.
  • Yes checkDone. Recreate all crafting grids.
  • Yes checkDone. Create documentation cell.

Cleanup

Crafting grids

 
100% (42/42)
100% (42/42)

Crafting grids documentation

 
100% (42/42)
100% (42/42)

Scope

  • Crafting grids and related templates.

Project Members

Please add your name to the list if you wish to participate in this project.

Template list

This is a list of experimental and final templates that the project is currently using.

Experimental templates

Final templates

  • Yes checkDocumented. {{G}} - Main grid wrapper.
  • Yes checkDocumented. {{Cg}} - Crafting grid components.
  • X markDeprecated. {{G/Dict}} - Ore Dictionary.
  • Yes checkDocumented. {{G/T}} > {{G/Tank}} - Single tank wrapper.
  • Yes checkDocumented. {{Gc}} > {{G/Cell}} - Grid display logic.
  • Yes checkDocumented. {{Gcd}} > {{G/Cell doc}} - Documentation cell
  • Yes checkDocumented. {{I}} - Creates a image wrapped in the span tag, used in crafting grids.
  • Yes checkDocumented. {{N}} - Animation/slideshow wrapper
  • Yes checkDocumented. {{O}} > {{G/O}} - Ore dictionary wrapper, call by tag.
  • Yes checkDocumented. {{S}} - Creates a string wrapped in the span tag, used in crafting grids.
  • Yes checkDocumented. {{T}} - Liquid display logic, used in crafting grids.

Prototypes

Working prototypes

Future code example

Single crafting grids

This is what the code to create single crafting grids will look like in the future.

{{Furnace
 |I={{G|Oak Wood}}
 |O={{G|Charcoal}}
 |F={{G|Oak Wood Planks|tooltiptext=$1<br><span class="tcAspectTooltipDesc">Can smelt 1.5 items.</span>}}
}}
Code Explanation
  • Line 1: No more Grid/ prefix in front of crafting grid templates.
  • Line 2-4: Instead of providing a list of items to the crafting grid template, you give it a list of grids that can be fully customized. A redirect will be made for less typing (G->Grid).
  • {{G|Oak Wood}} and {{G|Oak Wood Planks|...}}: A animation will display ore dict compatible items.
  • {{G|Oak Wood Planks|tooltiptext=$1<br><span class="tcAspectTooltipDesc">Can smelt 1.5 items.</span>}}: Demonstrates that grids in crafting grids can be fully customized. And that tooltips will support variables.

Multiple crafting grids

This is what the code to create multiple crafting grids will look like in the future. Instead of flipping through animations automatically by the script, the user must flip through them manually with the controls provided.

{{Furnace
 |I={{G|Oak Wood|16}}{{G|Clay|9}}
 |O={{G|Charcoal|16}}{{G|Brick|9}}
 |F={{G|Charcoal|2|tooltiptext=Charcoal<br><span class="tcAspectTooltipDesc">Can smelt 8 items.</span>}}{{G|Oak Wood Planks|6|tooltiptext=$1<br><span class="tcAspectTooltipDesc">Can smelt 1.5 items.</span>}}
}}

Crafting grid creation

This is an example of how crafting grids will be created in the future. Ideally, templates used here should be substituted to allow for shallower expansion depth, however, by not substituting the templates you increase the maintainability of these crafting grids.

{{Crafting grid/Start}}
{{Crafting grid/Image|Link to image|style=Additional styles|class=Additional classes}}
{{Crafting grid/Cell|{{{1|{{{A1}}} }}}|X position|Y position|style=Additional styles|class=Additional classes}}
...
{{Crafting grid/Cell|{{{9|{{{C3}}} }}}|X position|Y position|style=Additional styles|class=Additional classes}}
...
{{Crafting grid/Tank|{{{liquid}}}|X position|Y position|style=Additional styles|class=Additional classes}}
{{Crafting grid/End}}