User talk:Silarn/Template:Weapon

Variables
Wikia does not have variablesextension installed (yet). It seems possible to get it installed, but I so far I haven't felt enough need to go through the bureaucracy needed, and we'll have to wait until we get 1.12 anyhows. Just a heads-up. - Dashiva 12:06, 24 December 2007 (UTC)


 * A second note. Even if we did have vars, using   won't work. The contents are always evaluated, #if just determines which output to filter from the end page. By that time the vars have already done their work. - Dashiva 12:36, 24 December 2007 (UTC)


 * I was only trying to use it to calculate the number of used damage elements in order to calculate the table span, but entering the highest possible value works fine. It simply has the side affect of pointing out that something's wrong when something's going wrong. Which it is right now. I can't figure out why some of the element tables seem to be working just fine and others have issues. I'm fairly positive I have them all set up the same now. *sigh* Any help would be appreciated.
 * -- Silarn 14:12, 24 December 2007 (UTC)


 * I would probably split it into two templates. One to generate a single cell, and a row template which calls the cell template for each element supplied. Easier to maintain, less chance of errors. The problem on polarity guns looks like a pipe problem, so getting rid of all the nested calls should help. I also wonder about the need for #replace, I don't recall any weapon names with / in them. Also, you could pass the number of different elements as a parameter and use that in colspan. - Dashiva 14:21, 24 December 2007 (UTC)


 * Being rather newly-advanced, as it were, to Wiki editing, I'm not entirely sure how to do what you just said.
 * -- Silarn 14:27, 24 December 2007 (UTC)


 * I'm bit skeptic about what you are trying to accomplish, but I'll try to explain, what Dashiva meant by splitting the Template:
 * You can create second template which would take care of one cell and if you update it all the cells will get updated. I've used just the Physical part as an example (extra linebreaks added and may need to be removed):


 * And you can call it in your main template like this:


 * Hope I haven't made any mistakes in the code... → Zarevak 15:00, 24 December 2007 (UTC)


 * Well, filling in the damage values will be the dubious part, but I'm almost positive I can get the framework working properly in relatively short order. As it is now, I've either got oversized cells (extra spacing above the weapon columns), or pipe issues that create bad cells and occasionally mess up others. One or the other. I'm looking into the cell template idea.
 * Partially reverted, this is the point where I had it most 'correct'. The only issue with this revision is that I've got extra blank lines inflating the space above the text and one cell randomly top aligned when it should be bottom aligned. Any tips on how to fix this? I want to get the basic layout done before I try splitting it between templates.
 * -- Silarn 16:09, 24 December 2007 (UTC)
 * This is problem of the commands not generating any output. Because you added extralinebreak to clear up the code formating, the resulted wiki code is just many linebreaks and this create extra html paragraphs in actual output. One workaround is to use comments (I've used this in my tooltip example in User:Zarevak/Sandbox):


 * Using this will create one looong line of wiki output for the html-ation. Beware each cell needs to begin on the beginning of the line or with double pipes.
 * → Zarevak 16:33, 24 December 2007 (UTC)