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 talk:Corgrind/Sandbox

From DDO wiki
Jump to navigation Jump to search

Please comment:[edit]

As I mentioned on discord I’m checking on a template for quest items. For that I browsed several Named item templates and especially the “work in progress” T:Named Item. I found that this template has an issue with matching equip slot with item types and other things in that scope. I have the same issue with several quest items which can or must be equipped.

So I decided to approach this issue and came up with a variable based table in a template U:Corgrind/Sandbox/T:GetItemType

These are the intensions and ToDos of that template:

  • The template generates no visible output
  • The template does not categorize
    • It is my strong conviction, that data processing, presentation (output) and categorization should be strictly separated
  • The template defines several variables to be used in the following code
    • A set of attribute variables “ItemTypeAttrib_<type>” containing a “;” separated list which are global by design. In another language I would use a dictionary and define it local.
      • a) Display name of the item type
      • b) Proficiency or other requirements to use the item
      • c) A item “class”, this is intended to be used selecting/processing the correct attributes for the item
      • d) Suffix for the Min Level category (“Min level XX weapons”, “Min level XX items” …)
      • e) Equipment slot(s); at the moment intended as display value
      • f) The name of the icon file
    • A variable “ItemType”. This is the result of the parameter analysis and is the key to the attribute variables
    • A set of “result” variables “ItemType_Name”, “ItemType_Proficiency”, “ItemType_AttributeSet”, “ItemType_MinLevelCatSuffix”, “ItemType_EquipsTo”, “ItemType_IconFile”
  • None of the names is fixed right now; even “Type” may have a better wording
    • Especially “Proficiency” has to be discussed.
  • The template name itself is not fixed. I’m not sure if this shall be a normal template page or a subpage to “Named Item” for example

On a later stage it may be useful to add non equipable items.
Because the "table variables" are global it is possible to access them directly; this may be useful in an overview page. I think of fitting this code snippet into an own template on that behalf:

{{Trim| {{#explode: {{#var:ItemTypeAttrib_{{#var:ItemType}} }}|;|1}}}}

Corgrind (ContribsMessage) 15:44, March 16, 2021 (EDT)