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.
(Please note: Due to bugs with the distribution system, this reward is temporarily unavailable.)edit

Game mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


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

Template:ConvertValueToPercent

From DDO wiki
Jump to navigation Jump to search

Usage[edit]

{{ConvertValueToPercent | (Value)}}

  • 1 = (Value) should be :
    • String value ( 1% - 100% )
    • Numerical value ( 1 - 100 )

Examples[edit]

  • {{ConvertValueToPercent|1%}} = 1%
  • {{ConvertValueToPercent|5%}} = 5%
  • {{ConvertValueToPercent|5}} = 5%

Categorization[edit]

Category:Meta templates

Coding[edit]

  • If value of first parameter is undefind or empty, return 0%
  • If value of first parameter is defined and is not an integer, return first parameter
  • If value of first parameter is defined and is an integer, return first parameter appended with a % sign
  • To do more specific variable validation ( to determine if string is an integer + % sign ), StringFunctions extension will need to be installed

0%