Forum:Centralize spirit battles

Spirit Battle tables in their current state are a little... messy. If a user feels that it is necessary to make an edit to a battle entry, they will need to hunt down every usage of that battle entry. Here's a hypothetical: I want to make an edit to the 'Hungry Luma' spirit battle (wrong type, song, whatever). Easy, I go to the list of Super Mario spirits and change it. Done? Nope. Now I go to Rosalina's page, edit, go to Kirby's page, edit, and now I'm hopefully done. A recent headache came from Cuphead's spirit battle where it changes if you have DLC, now the edit needs to be made on Ready%3F_Wallop!, Peach_(SSBU), Mega_Man_(SSBU), Mii_Gunner_(SSBU), and List_of_spirits_(Others). This will only grow as we have about two more years of content coming.

I think we should move the battles into a large template so that we can make an edit in one place, and if we want to add a battle to a table we just say "give me the entry for spirit number x". I'm not too familiar with how templates work, however I imagine it will be similar to Template:SSB4_to_SSBU_changelist where it is a switch condition. Inspirations can be omitted from the template and added as a cell on the table. The only thing I don't know how to do is making the fighter's name bold on their pages like the navbox.

Along with making edits easier it should allow for adding hidden data easy--such as hidden conditions, stats, and modifiers--if we get our hands on them. A similar thing could also be done for Fighter Battles, where if we decide one format is better we can change it in one place instead of 80+ pages. --CanvasK (talk) 18:20, February 18, 2020 (EST)

Support

 * Support--CanvasK (talk) 18:20, February 18, 2020 (EST)
 * Support. Spirit Battles are gonna keep happening and the more they do, the more pages that have to be made. It's gonna definitely bloat the wiki. I do not believe a list of Conquest battles were ever made though, so is it even necessary? If we do keep these as a list, I feel going through Conquest results and uploading them to a list would be necessary. --King K. Rool SSBU.png Plague  von Karma King K. Rool SSBU.png 23:19, February 29, 2020 (EST)
 * Support. I can only imagine how tedious Spirit Battle editing is going to get in the future... a template / solution like this is bound to save us tons of time, if you ask me. Acgamer28  08:24, April 14, 2020 (EDT)
 * I recently went through the Fighter and "List of spirits (Series)" pages to collect and correct the Spirit Battle information between them. 3 days to collect and curate and another day to make the edits.--CanvasK (talk) 09:47, April 14, 2020 (EDT)
 * Support. I never knew that editing spirit battle tables can be frustrating. I agree that templates can help fix this problem. Derekblue1SigHead1.png Derekblue1   (talk)  Derekblue1SigHead2.png 10:00, April 14, 2020 (EDT)
 * Support. Templates are a good idea. --Meester Tweester (talk) 01:28, April 20, 2020 (EDT)

Comments
I've done some research and have made a mock-up of what I was thinking (below). It is based around the rows that are currently used for spirit battles with the only changes being the image size and how numbers are displayed, but that can easily be changed. There are 2 parts: SpiritBattleRow and SpiritBattleTable. SpiritBattleRow is used to construct the rows with quite a few parameters. SpiritBattleTable has 2 parameters: number, which controls the switch function (currently only a few spirits are programmed); and seriesoff, which removes the 'series' cell if it is filled, which will make it look like the rows on the "List of Spirits (___ Series)".  Currently it isn't able to handle spirits like Cuphead where they are different if you have DLC. But I do have a WIP design that incorporates it into SpiritBattleRow, but I'm thinking a separate SpiritBattleRowDLC would be cleaner. --CanvasK (talk) 17:03, March 20, 2020 (EDT)
 * Not long ago I corrected the information between the Fighter and Series Lists, which lead me to compile all of the information from the pages. This means I already have all of the data needed to make the full template/list. Thinking on it, I do acknowledge that me correcting the information partially defeats the purpose of this proposal, however there is still the point of adding hidden data (such as stats or unknown conditions) if it becomes available.--CanvasK (talk) 09:47, April 14, 2020 (EDT)

Despite the support this proposal has gained I have decided to close it. Recently there was an issue with the SSB4 to SSBU changelist that caused server issues; the cause being a single missing curly bracket. I fear that a similar thing could happen with this proposed template.

By my estimations the template would be around 600K bytes, which is less than the changelist's 1000K bytes. However, with my current test implementations the template would be called dozens of times on each page it is used on, and there are about twice as many pages that include Spirit battles than there are fighter pages. On "List of Spirits (Others)" there are over 200 battles, if each one had to load the 600K bytes due to the template breaking then a potential 120000K bytes would be loaded on that page alone.

As such I'm closing this proposal. Other alternatives would be a page or a spreadsheet where the battles can be copy-pasted. If I ever decide to do one of those I will probably link it on the Spirit talk page. The best thing to do right now would be to keep on top of edits made to battles (which thankfully there are very few now) and make sure they are reflected to other pages with those battles. --CanvasK (talk) 08:34, June 2, 2020 (EDT)