Template talk:Crafting Box SMW

Icons on the table
I'm not sure how to do the sizes for the icons on the table. If it was just by type that would be easy. I would add a type param to Template:Infobox Item and then have a switch in here that would makes Tools = 75px, Molds =42px, etc. But Stag head, and I am sure others, don't play well with that.

Maybe we should do it by type but have exceptions for certain icons. But where would the exceptions be entered? Directly in Template:Crafting Box? Maybe as a property on the icon itself (i.e. File:Stag Head.png)? -- &#91;&#91;User:Fenyx4&#124;Fenyx4&#93;&#93; (talk) 21:39, 28 February 2014 (MST)


 * Okay, decided I'd stop wringing my hands over less than a dozen exceptions to the size of icons on the table. So I just threw them directly in the template. It means we'll have to edit the template if any more exceptions come up. And if a lot of exceptions come up we'll probably have to redesign it but that can wait.
 * There are two different topics I think needs discussing so I'm gonna drop them into different sections below. But long story short; I think this is ready to be moved into production. -- Fenyx4 (talk) 08:05, 2 March 2014 (MST)
 * Since there have been no voices of dissent I'm gonna go ahead and get started. -- Fenyx4 (talk) 12:04, 3 March 2014 (MST)

Implementation of SMW properties
I'm afraid this is jumping right into the deepend of properties. Normally they don't get this complicated. If you aren't already familiar with them you might want to read this. I'm pretty happy with how the ingredients are now implemented. You can see for Iron Hilt that has a series of Property:Has_ingredient. Property:Has ingredient has a datatype of Record which allows both the ingredient and its quantity to be relatable to eachother.

All these properties are getting assigned by the Crafting Box template so our normal user never has to be concerned with 'em. They fill out the recipe here and the rest happens by magic.

There is one problem I see with how this is implemented. There are items that have multiple recipes. See Iron Bar and Iron Bar (alternate) (I couldn't find the alternate recipe on this wiki or I woulda linked there).

I feel like the proper way to display this would be two Crafting Box templates on the same page. But that would put all the ingredients in the same list so when we query it later it would look like one big recipe and not two separate recipes. We could solve this like it is on the old wiki by giving them their own pages. (and maybe that is what we should do for the short term.) But I think a better way would be using Subobjects which should allow us to split the recipes up.

If we do end up switching subobjects we shouldn't have to change how people use Crafting Box. It would all be under covers.

Thoughts? -- Fenyx4 (talk) 08:05, 2 March 2014 (MST)

Template implementation
I was already able to leverage semantic properties to query for the ingredient icons. This removed the need for the big list of SotAWiki:Craftbox_Resources. So I changed it so users just enter the pagenames which actually cut out 30k characters of code. The biggest benefit is we won't have to edit Crafting Box everytime a new item is added. Can anyone think of problems with this change? -- Fenyx4 (talk) 08:05, 2 March 2014 (MST)