Thread:Catinthedark/@comment-26388711-20170826051631

Dear Catinthedark,

I have finished creating a synchronized version of the Hexagon Levels template, in response to the Lua issue. Note that the colors are temporarily changed with a gold header to reflect that this is a synchronized version. This template is now Template:Hexagon Levels Sync with its parameter ep as the episode you referred to.

The synchronized template is actually a table whose values depend on the episode you chose, and the results of whether a level is hexagonal or not.

The Hexagon Levels Sync calls the corresponding SyncHexagonEpisode template, which generates the source code snippet so that the table functions dynamically. Each SyncHexagonEpisode calls the corresponding SyncHexagonEntry, which then generates either an individual snippet for the table entry if it is a hexagon, or nothing at all if it is not a hexagon.

Unfortunately, it took considerably longer than usual, and I wasted around 50 edits just to fix the formatting issues. What I did before is I put each SyncHexagonEntry line-by-line in a SyncHexagonEpisode to improve readability. However, it generated extra new lines if there are several consecutive empty results for SyncHexagonEntries. Therefore, I have to put the Entries on one line, facing the clutter of word wrap, and I have to use double pipe notation to separate the table entries. Finally, I have to trim the last pipe of the output from SyncHexagonEpisode so the final output will not have a residual pipe.

To see all the test cases, see Forum:Hexagonal Level Synchronization. In the end are several custom test cases, including some really bizarre ones.

Please leave any feedback and points of improvement regarding my synchronized template.

a mulligan. (talk) 05:16, August 26, 2017 (UTC) 