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!

Template:Generate variable

From DDO wiki
Jump to navigation Jump to search

Usage[edit]

This is a simple template that takes a parameter and generates a variable with the parameter's value.

  • 1st parameter or value contains the value.
  • prefix is the prefix of the variable's name.
  • num is the suffix of the variable's name. Default suffix is 0.

The template produces a variable: {{#var: <prefix><num>}} This template is mostly useful when passed to another template as a parameter, like Template:Distinct values. What this achieves is transforming a list of values collected from parameters to variables for use later.

Examples[edit]

{{Generate variable|prefix=hello|num=1000|Hello World}}
{{#var: hello1000}} <!-- This will print the variable -->

Hello World

{{Generate variable|prefix=x|value=42}}
{{#var: x0}}

42

CODE[edit]