Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying recipes #18

Open
pentabulge opened this issue Dec 4, 2019 · 4 comments
Open

Displaying recipes #18

pentabulge opened this issue Dec 4, 2019 · 4 comments
Labels
➕ Addition Someone wants to add a new entry to the Wiki

Comments

@pentabulge
Copy link
Contributor

Description

It could be helpful to display recipes on wiki pages. Some people may enjoy having the option to browse recipes online. People like images, and internal linking can only be a positive thing.

This would mean displaying each ingredient in a grid, with a link to the wiki pages for these ingredients.

Github wikis don't support custom CSS or transclusion, and I'm going to try to work with these limitations. So, the simplest way to achieve this would probably be to use Markdown tables. Take the Lumber Axe recipe for instance:

## Obtaining
### [Magic Workbench](https://github.com/TheBusyBiscuit/Slimefun4/wiki/Magic-Workbench)
| <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Synthetic-Diamond"><img alt="Synthetic Diamond" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-diamond-x32.png" /></a> | <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Synthetic-Diamond"><img alt="Synthetic Diamond" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-diamond-x32.png" /></a> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> |
| --- | --- | --- | --- | --- |
| <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Synthetic-Emerald"><img alt="Synthetic Emerald" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-emerald-x32.png" /></a> | <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Gilded-Iron"><img alt="Gilded Iron" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-gold-ingot-x32.png" /></a> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Output arrow" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-output-arrow-x32.png" /> | <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Lumber-Axe"><img alt="Lumber Axe" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-diamond-axe-x32.png" /></a> |
| <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Gilded-Iron"><img alt="Gilded Iron" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-gold-ingot-x32.png" /></a> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> |

gives:


Obtaining

Magic Workbench

Synthetic Diamond Synthetic Diamond Empty slot Empty slot Empty slot
Synthetic Emerald Gilded Iron Empty slot Output arrow Lumber Axe
Empty slot Gilded Iron Empty slot Empty slot Empty slot

But I can think of a few issues with this:

  1. This could potentially increase the workload, since you'd have to update or add recipes as the plugin evolves.
  2. Even in its simplest form, it seems difficult to work with if you're a newcomer.

To be fair, though, the plugin is constantly evolving anyway, and info which is true today might be outdated tomorrow.

As for 2, I was thinking of maybe having some sort of online tool that'd generate the recipe code for you, and then you'd just have to copy and paste it under the right section. After all, the structure should always be the same, with only attributes changing.

With all this in mind, is this is worth looking into? Can you think of a simpler way to do it within Github's limitations? Please share your thoughts and ideas.

@pentabulge pentabulge added the ➕ Addition Someone wants to add a new entry to the Wiki label Dec 4, 2019
@WalshyDev
Copy link
Member

WalshyDev commented Dec 4, 2019

Mmmh, having a good way to write recipes would be good. If this was in node then there could have been a way to define recipes which gets parsed. I was talking about this on Discord a month or so ago. Just something where you can see the items in a crafting table with the result, can hover over them and see the whole item (name, lore). Maybe also clicking on the item to see how that is made. Basically a SF guide in web.

Cookie worked on something for images/recipes a bit ago (https://github.com/TheBusyBiscuit/minecraft-svg) but not looked into it much.

@pentabulge
Copy link
Contributor Author

Yeah, a SF web guide would be really handy! It would probably be easier to set up as a separate project, but I think it'd still be great to be able to display recipes on the wiki.

@Phoenix-Starlight
Copy link
Member

Sorry if this is necroposting, but we could use minecraft.gamepedia.com crafting template (with the lua module crafting which is needed as well). Only issue is that if the items that can be made using slimefun have different textures and name we would have to edit the crafting module. And also the lua module has a bunch of other lua module dependencies. and dependencies of dependencies.

@ItsTheSky
Copy link
Contributor

Maybe it's a bad idea, but I could try to add an image API for my website, so the final image URL will be like
https://itsthesky.info/sf/?recipe=iron_ingot,null,null,null,null,null,null,iron_ingot,null&result=diamond
I'll ble able to manage back end after that, so the wiki will just load one image.
What do you think about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
➕ Addition Someone wants to add a new entry to the Wiki
Projects
None yet
Development

No branches or pull requests

4 participants