Template talk:Unique Spells Notes
Adding More Notes[edit]
In doing the tweaks to the template, I've tried to simplify the logic and in the process, I've done some of the work required to make it easier to add further notes if ever we need to:
- Additional asterisks can now simply be added to
stars
by copying the #local in the first note to the second and successive notes. The last note in the series does not require it, though it won't hurt anything if added. - Similarly, additional categories can be added to
cats
by extending the #local in the second note to any successive notes. In this case, the first note is the one that's slightly different, since there is no previous category definition at that point.
The unnamed parameter would need to be handled differently, however. Programmers would readily adapt to using 1, 2, 4, 8, etc., and adding them together to form a bit field of which notes to include (e.g., 1 + 4 = 5 to include notes 1 and 3). This could then be handled with, for example, #ifexpr:{{{1}}} and 4, I believe. That's very counter-intuitive for the non-programmer, though. It may be easier to use a binary string instead, with the unnamed parameter being changed to a expect a string like "1010" to include the first and third notes. #sub would then be used to test for 1 or 0 in each position.
All this is moot at the moment, as there are only two notes, so the exising 1 or 2 is sufficient. I just wanted to write down what I was thinking for any future template programmers should the need to add another note ever arise. ‒ Robin Hood↝talk 19:10, 29 June 2010 (UTC)
- Or it could be switched to something like
note1
,note2
, etc. (Duh!) ‒ Robin Hood↝talk 16:39, 1 July 2010 (UTC)