Thread:Catinthedark/@comment-3225604-20170722082846/@comment-26235098-20170724000748

Hi Wildones

I was getting mixed up ... between EPISODE and LEVEl pages. DUh. Anyway I looked at the code went, huh??? OH! So now I understand what you say I was missing... which I was! WHOOSH!

On a separate note, I am perplexed to find a copy of difficulty level function in the new module. This is not only unnecessary, but having duplicate code is pretty undesirable. If the two pieces of information (difficulty, hexagon stuff) are required together, better then to place the hexagon functionality into the difficulty level module, rather than have a separate one. Indeed I was thinking to start with this might be a good idea.

I see what you mean about the hexagon levels template being tricky, but to automate it I would rework it. The way one does things manually does not lend itself to the way one might automate.

I note that we need to know the type of level here too, and this reminds me of the project that Imamadmad and I started to talk about which was to create a master table (or several) to function in a data-base like manner. At the time, it was to make the list of level pages load faster (this has been solved by tabbing), but the same problem pops up in many places: requiring multiple attributes about a given level, principally, type, difficulty, sometimes other things. To this end it would be nice to have a more integrative Lua-back end with a simple API to query this info efficiently.

I will have a think on this and see, perhaps we can work towards this incrementally, starting with what is needed to automate Template:Hexagon levels, so as to make that available quickly.

I see there are already #invokes in some templates. It's not strictly 'bad' to do this, but it is advantageous not to. to underline earlier point, it facilitates transparent changes to Lua API. So as to having an intermediate template to 'wrap' the Lua API: Necessary? No. '''Useful? Yes'''.