Thread:Mhommer/@comment-5153939-20160123004341/@comment-15636815-20160125232452

The table you linked is a little bit complex because of the image in the first column, but only a little bit. Here's what I would do.

1) Clean up the crap.

a) Currently, the table uses in-line styling for every single cell:    This is completely unnecessary. Instead of 5.000 copies of the same thing, use one copy on the first line of the table (the line that starts with  ). Please note that styling in the first line does not affect the header row. On the other hand, I believe that   automatically centres the headers, anyway, so you still may be able to remove the extra styling there.

b) Having the table sortable is fine. Not every column should be sorted, though, and the images can't be sorted. Use for those headers.
 * Icon
 * Time (This can't be sorted if you keep the sec/min format. If you change to a format like 00:10, then it will be sortable, but you may lose user-friendliness).
 * any other columns your users do not use to find the items they want to cook

2) Reduce each row's input to the minimum necessary. The image should be separate, so the input for the first row could look like this: |- a) I added spaces between the parameters so you can read them more easily, but you don't need them.
 * [[File:Hamburger.jpg]]

b) Each cell's output is centred already, so you don't need to specify  in the file link.

c) Instead of giving input for 9 columns of data, you give input for only 1 column, with only 7 pieces of data, in a template call, and you avoid all maths calculations (and, obviously, all maths errors). The template will build all the other cells in the row. Yes, it can do that.

3) The template itself can be basic, complex, or anywhere in between, mostly depending on how much error-checking you want to do. Here is the most basic template  that will do the job. a) The first line is correct. It doesn't need the pipe (|) character because it's already there in the main table, in front of the template call.

b) It is opossible to use a variable to store the result of the Profit column, which reduces the amount of code needed in the final column. For your purposes, I don't recommend this. Variables will add more complexity than you need, and, to be honest, the amount of code saved isn't really all that much because Wikitext handles variables inefficiently.

c) Since I have a business degree, I can tell you that the final column should be "Profit / XP". Income = all the money received, before costs.

Most likely, my example template is too basic for you. You will need to add some error checking and formatting. There's no need to go to extremes, though. In fact, formatting may be all you need.

Does that help, or did I make things worse? LOL ... Let me know if you have more questions.