Discuss Template:Crafting

From PZwiki
Revision as of 02:09, 7 August 2014 by Hemilash (talk | contribs) (→‎How To Add New Recipes: Fixed the whole RecipeLookup template problem, hopefully before it gave anyone any trouble. Phew.)

Template talk:RecipeLookup
  • Oh god help me! I can see there's a mistake somewhere in the code but can't bloody find it. Help, anyone? :D Ravelair 19:05, 18 March 2012 (UTC)
    • Nevermind. Just try and remove the }} from the template page. Somehow. I cant do it. When I do it, recipes get completely messed up. Ravelair 19:31, 18 March 2012 (UTC)

Recipe changes

I'm not 100% sure on how to go about it, but the recipes have changed. For example, for a bowl of Ramen, you need an empty bowl, dry ramen, and some water. You can NOT make a bowl of ramen from a bowl of water and dry ramen. This holds true for all recipes requiring water.

This problem has been fixed as of build 27 (or earlier possibly).Hemilash (talk) 01:12, 6 August 2014 (BST)

How To Add New Recipes

Can someone add a little more detail on how to use the template to add new recipes? I'm trying to make a recipe for lookup, but honestly I can't figure out where the code should go or how to use it properly. Does it literally go in the template itself? Do I put it on the page with the recipe? Halp. Hemilash (talk) 01:10, 6 August 2014 (BST)


Click the edit button at the very top of the page, then copy one of the templates to the bottom of the group your new item is a part of, and give it an index one larger than the last one. Then go back to the recipelookup page and click the inner edit button (at the top of the green part of the page). The green part of the page is for showing all the recipes and editing that won't change or delete any recipes. In this section, at the bottom of the section you put your recipe into (food, I'm assuming), put the code

{{RecipeLookup|NewRecipeIndex}}|NewRecipeIndex

and it'll show up on the page, allowing you to see if your recipe code is working correctly. Put that same code into the item's page itself to have it show up in the same way. Pat Bren (talk) 13:16, 6 August 2014 (BST)


Okay, I somehow really f*cked things up. I added the new recipe (as you can see in the recent changes), and the code looks fine*, but now every single recipe lookup calls that recipe and then every single one after the new one I entered. I don't even know what went wrong. It keeps giving me a "Warning: Template include size is too large. Some templates will not be included" Error when I try to preview any changes to a page with a template on it. Hemilash (talk) 21:13, 6 August 2014 (BST)
...
I found the problem: I put too many "}"s in my recipe. Every time I try to remove it, the page freezes, gives me a 503 error, or just loads a blank page. Hemilash (talk) 22:27, 6 August 2014 (BST)
...
OKAY, I fixed the problem. I'll describe what happened and then what I fixed in the hopes that no one ever does it again, but if so, it can be fixed:

  • So I tried to add a new recipe to the RecipeLookup template, but when I copied it, I included too many }}'s. This ended the template code early, and inserted every recipe from molotov down, into EVERY recipe lookup, effectively ruining a lot of pages. When I tried to undo the edit or delete the code, a secondary error was preventing me from saving changes. Furthermore, no page that used the RecipeLookup template could be edited.
  • The problem was that the documentation page, which makes use of the RecipeLookup template, still had the error and was over-flowing the included template (or I think that's what that--^ error means). Since the documentation was part of the template page, the error in the documentation was being included in the template and prevented me from saving the template. Sorta like a Catch-22.
  • So once I had finally figured out the interaction between the two, here's what I did:
    • Removed the problem-causing brackets so that the code was fine on the RecipeLookup template page
    • Removed the
      {{documentation}}
      template call from the RecipeLookup template page
    • Saved the RecipeLookup template page
    • Inserted the RecipeLookup 2028 template call into the documentation file (the "green box" from above [blue on my screen])
    • Saved the documentation file
    • Re-added the documentation template call back into the RecipeLookup template page
    • Saved the RecipeLookup template page
  • Now both the RecipeLookup template and the documentation pages look as they should and can be edited again.

Hemilash (talk) 02:09, 7 August 2014 (BST)