Year of the Dragon: Through June 26th, claim free Ground Bound Green Dragon Mount! Speak to Xatheral in the Hall of Heroes. edit

Game mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


Please create an account or log in to remove ads, build a reputation, and unlock more editing privileges and then visit DDO wiki's IRC Chat/Discord if you need any help!

User talk:ChickenMobile

From DDO wiki
Jump to navigation Jump to search

Generating class spell lists using DPL[edit]

Hey there. I am copying the context from discord (part of your message).

"Planned to create a #DPL generated list for those pages, however the way Spell Components are makes it impossible to generate the little images for them. Also generating the Metamagics icons make the loading of the table much too intensive. Will probably have to split metamagics into separate variables: e.g. | maximize = 1 | empower = 1 instead of | metamagics = {{Maximize}} {{Empower}} .
I have no solution for generating Component Images yet. Suggestions appreciated."

So... instead of modifying {{Infobox-spell}} like that (and all spell pages together).... I wonder if the metamagic templates in Category:Metamagic templates could be modified to define flag variables, like {{#vardefine:maximizeflag|1}} in {{Maximize}}. This would tell whenever they have been transcluded. Then, in the phantom infobox-spell template you will probably use with DPL, you verify {{#varexists:maximizeflag}} then add icons accordingly. Big problem is, I am not sure if the "timeline" of transclusion and these variables definitions will allow this, or even how efficient this is. But it is an idea, from a non-expert. MrLizard (ContribsMessage) 23:47, June 12, 2024 (EDT)

  • It is probably worth a try, however I've previously had massive troubles trying to interact with variables outside their scope, especially when using the #DPL plugin. Will fiddle with some sandboxes and see if it works. ChickenMobile (Contribs⇑ top ⇑) 00:55, June 13, 2024 (EDT)

Another idea for the metamagic part... at least regarding the icons. Instead of adding icons if the spell accepts the metamagic (like it is done now), put all the icons in the table header and make the header sticky. This way the icons are always visible when scrolling and are added only once, not for every spell. Replace with Y and N in the rows (maybe with different background color) or anything that is not the icons. Maybe this help with the computational part if using DPL. MrLizard (ContribsMessage) 12:59, June 15, 2024 (EDT)


Still think it would be easier to split the metamagic links into their own parameters. I can see weird things happening with sticky headers with overlapping elements. The benefits:

  • Metamagics will always be listed in order on page. RN it is a editing nightmare
  • Can filter in other #DPL queries (e.g. Spells that can apply Maximize)
  • Quick check such as: {{#if:{{{maximize|}}}|YAY WE HAVE MAXIMIZE|No :(}} means for non-laggy easy code in the #DPL phantom template

I've never fiddled around with bots or know how to use them, but think this would be possible to do with one. This might literally be a regex code replace ChickenMobile (Contribs⇑ top ⇑) 20:50, June 15, 2024 (EDT)

  • I do agree with you... as long as someone can run a bot for it LoL, I was just trying to avoid having to modify the spell pages. About sticky elements overlapping with other page elements (assuming I read your comment correctly), I think it is about setting the z-index parameters correctly. I have played with sticky header/column/footer in this table, where I managed to correctly order the sticky elements through z-index, so the ones that should be in top are in top, including one sticky element relatively to another. At least it is working for the example. MrLizard (ContribsMessage) 21:32, June 15, 2024 (EDT)