Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes. edit

Thank you for your patience while we continue to upgrade DDOwiki to the latest MediaWiki LTS version. If you find any errors on the site, please visit the Discord chat server and let us know.

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:Aldyron/Sandbox/Template Monster habitat-specific data

From DDO wiki
Jump to navigation Jump to search
frameless link=
WARNING! You're in my sandbox.
This is just an experiment. You are advised *not* to rely on what you find here, which I could purposefully alter (even making it wrong) in order to experiment with formatting, coding and other wikiful things.
frameless link=
Work in progress
This is an incomplete, work-in-progress page. I routinely leave it half-functioning (and thus half-broken). I will remove this notice when the page's ready.


Chaotic notes[edit]

  • It all starts with User:Aldyron/Sandbox/Template List of monsters in area, if you can decode my notes. :-)
  • Reasoning goes something like this:
    • Use {{Monster}} as it is now
    • Skip parameters habitatNN and hnoteNN
    • Employ this template instead of habitatNN and hnoteNN
      • Employ multiple instances of this template for multiple habitats, one instance per habitat, covering all habitats of this particular monster
      • This template will support parameter "habitat" plus every parameter {{Monster}} supports, except for habitatNN and hnoteNN (would defy the template's meaning) and image (technically doable, but visually awkward, and few monsters would use that; only monster that comes to mind right now is Crooktooth; update: come to think of it, Crooktooth sports two different appearances in the same habitat, so not even him/them)
    • This template, by itself, will do little more than pretty-printing all parameters one after the other, and its output will look like what we currently can get out of a habitatNN + hnoteNN pair in {{Monster}}, so that main function should remain basically intact. Possibly, it will print nothing at all and just store some data.
    • But, when used with dpl, the data in this template will override the corresponding data in {{Monster}}
    • Different dpl queries will treat data in different ways:
      • As a primary objective, it should be able to display a horizontal table of habitat-specific data under the vertical list of default data in a single-monster page
      • Also a primary objective, User:Aldyron/Sandbox/Template List of monsters in area should eventually be able to display all habitat-specific data of each monster for the area in question, falling back to default data for each monster on a per-parameter basis (that is, if there's no habitat-specific "alignment", fall back to default {{Monster}}'s "alignment", if there's no habitat-specific "attack", fall back to default {{Monster}}'s "attack")
      • List of all Scorpions (for example) should somehow show all data about all scorpions in all habitats (secondary objective, will think about that later)

Coding[edit]