User talk:Seppi333

Issue with Template:Mixed type
Hi, it's been brought to my attention that when viewing Dagger Boomerang and other abilities that receive ability awakenings, the Mixed type template will break. This behavior can also be viewed on their respective unit pages (e.g. Rem) and the Ability Awakening page. Since I'm not well versed in templates and that is one you made, it would very much be appreciated if it could be addressed. Otherwise within the week, I'll be reverting affected pages to just using tip-info. Thanks. --FencerTJ (talk) 02:02, 3 December 2018 (UTC)
 * Hmm. I'll look into this in the next 24 hours, but based upon the locations where this is appearing, I'm assuming the issue is coming from the module that generates the text for those ability awakenings. I might be able to fix that, but if I can't, changing it back to the tip-info tooltip on those pages seems like the only viable option.  Seppi  333  (Insert 2¢) 08:22, 3 December 2018 (UTC)
 * Yeah, I'm virtually certain it's coming from the module. Replace the mixed type template in Dagger Boomerang with  and then preview the edit. You'll see the tooltip display normally under the effect, but it'll just display the text "ABC", sans the tooltip, in the ability awakening section. The module isn't compatible with Tooltip. I'll see if I can troubleshoot it tomorrow.  Seppi  333  (Insert 2¢) 08:46, 3 December 2018 (UTC)
 * @FencerTJ: I've asked CodeHydro to look into the problem with the module not rendering the tooltip in the Ability Awakening section. Hopefully he's still around and will respond to my query. Otherwise, I'll have to troubleshoot the module myself; in order to troubleshoot it, I'll need to be assigned to a user group that's able to edit protected pages or have the protection level of Module:Data reduced temporarily.
 * Fixing this issue isn't urgent since I've coded a temporary workaround in Mixed type – just replace  with   on the pages where this problem appears. I figure we should give him a couple of days to respond in the event he's still around. If there's no response after several days, I'll pore through the module code and see if I can fix it.  Seppi  333  (Insert 2¢) 11:08, 3 December 2018 (UTC)

@FencerTJ: I don't know Lua very well (this is the 2nd time I've ever read/debugged Lua code; never written any Lua scripts), but I know enough programming/markup languages with similar syntax to be able to read Module:Data's source code. elseif args.mode == 'awaken' then local function bold(v) return v and ((v:find"" or v:find'') and v or ("%s'"):format(v)) or  end local function unbold(v, manual_bold)--removes striked text and all tags except those that start with a t (table) if manual_bold then return v end return v and (v					:gsub("", )					:gsub('  ' ', '\n')					:gsub(' ', '')					:gsub('%b<>', function(tag) if tag == ' ' or tag:find'^</?t' then return tag elseif tag:sub(2, 3) == 'br' then return '\n' end return '' end)					:gsub('font-weight:bold;', '')				) end The block of code above is causing the problem. The removal of the tooltip is occurring because html span tags aren't being returned along with the reformatted input strings (template:tooltip is generated via a span tag). The tooltip's text is displayed without the tooltip because that text is a string.

I'm not sure if returning all span tags would create formatting issues, but I could avoid that possibility just by returning the tag if the class is tip or ttip. This would be a little more difficult for me to implement since I need to look up the correct Lua syntax to use.

Anyway, if you can give me access to the module's source code for 24 hours, I'll implement this fix.  Seppi  333  (Insert 2¢) 08:56, 6 December 2018 (UTC)


 * @Seppi333: Access has been granted. Good luck and hopefully you don't break too many things in the process. ;D --FencerTJ (talk) 09:20, 6 December 2018 (UTC)


 * Lol. Well, whether or not the code I write works as intended should be readily apparent when I run it on testcases. I promise I won't bork the Wiki though. :)  Seppi  333  (Insert 2¢) 09:54, 6 December 2018 (UTC)


 * I have a testcase of Dagger Boomerang in User:Seppi333/sandbox using the test version at Module:Sandbox/Seppi333. I'll look at other testcases later; if I don't see any bugs - and I really doubt I will - then I'll make the changes to Module:Data.
 * Anyway, that was much more of a pain in the ass to fix than I expected.  Seppi  333  (Insert 2¢) 18:08, 6 December 2018 (UTC)
 * I've been procrastinating on this since I noticed earlier that the functions I modified are used in other parts of the module that I haven't read through yet (this is a lot of lua code to read through). It'd be pretty clunky to include both the original functions and my modified ones just for the ability awakenings; so, I'm not going to implement this unless I'm certain that my modifications won't bork other parts of the module where the functions that I revised are used.  Seppi  333  (Insert 2¢) 03:34, 3 January 2019 (UTC)


 * From what I've been told, it's more a matter of modifying the template itself rather than md to solve the issue. Thanks for taking a look though. But yes, in the grand scheme of things it's a minor issue that in fixing it may have unintended repercussions. However even that small fix of adding that yes functionality was a nice addition to have as a fallback for the few abilities it would be apart of. --FencerTJ (talk) 04:27, 3 January 2019 (UTC)