Template talk:Grand Hero Battle quest

Future problems
There is a problem with this template. Before Alfonse: Spring Prince was added into the game, Alfonse: Prince of Askr was only referred to as "Alfonse" (same situation with Sharena). If another Anna (or Fjorm) is added to the game, that will change as well. If that happens and this template is updated, that would incorrectly affect all past usages of this template. Endilyn (talk) 01:37, 14 October 2018 (UTC)
 * If such a thing were to happen, could we fix it by adding a time check to the template? For example, if an Anna alt is released, then we could do something like this:
 * if from > (date of new Anna's release) and ally = "Anna", assign "Anna: Commander" to ally.
 * The template currently assigns every hero's name + title to allylong, and just the name to ally if the hero has no alts. The table then displays the short name (if no alts exist) while linking to the hero page with the full name. Adding this time check would override this process, while also limiting the change to quests released after a new Anna/Fjorm alt. Boblers7 (talk) 02:19, 14 October 2018 (UTC)
 * It's possible. What those codes does is check if more than one hero named Alfonse that was released before the quest's start date, and return   if it's True. You can replace   and   with actual values. RainThunder0 (talk) 06:36, 14 October 2018 (UTC)
 * I think I've fixed it, by combining that code with one of the switch statements to get the following: Essentially, this grabs the input name from the parameter   using a series of   statements, then runs the alt test. If at least one alt is found,   (which is the visible name on the tables) changes to the appropriate name + epithet. Else, if no alts are found,   stays just the unit's name.
 * Side note, I tried putting  in place of 'Alfonse' in an attempt to check the variable against the hero list directly (rather than using our exhaustive   block), but it gave me an error: "Expression error: Unexpected < operator". Does cargo_query's   field only take explicit strings, not variables? Boblers7 (talk) 10:12, 15 October 2018 (UTC)
 * It seems I spoke too soon. The code works for Alfonse and Sharena now, but it also switches Anna and Fjorm to full name + epithet if they pass the release date of Spring Alfonse/Sharena. Is  indicating that date specifically? Boblers7 (talk) 10:25, 15 October 2018 (UTC)
 * You have to surround the variables with quotes to use them with cargo:.
 * is used to calculate the correct date of the quests.  table only store release dates, but this template supports time, so we have to subtract 7 hours from the start time to get the correct date. You can drop it completely if you want though.
 * The Anna and Fjorm bug happened because of this: Name='Alfonse' OR Name='Sharena' OR Name='Anna' OR Name='Fjorm' With such conditions, the query would count every hero that named Alfonse, Sharena, Anna and Fjorm, so the result would always be greater than 1 (6 atm), and  is pretty much useless. You need to change it to  . RainThunder0 (talk) 13:53, 15 October 2018 (UTC)