Fire Emblem Heroes Wiki
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Contributor's Guide
To‐do list
Build Center
Wiki Discord
Game info
Basics
Mechanics
Advanced mechanics
Skill interaction
Skill Inheritance
Sacred Seal Forge
Weapon Refinery
Confer Blessing
Quests
Summoning events
Game modes
Aether Raids
Aether Resort
Special Maps
Story Maps
Paralogue Maps
Tactics Drills
Heroic Ordeals
Chain Challenge
Squad Assault
Blessed Gardens
Summoner Duels
Resonant Battles
Allegiance Battles
Arena
Arena Assault
Training Tower
Events
Voting Gauntlet
Tempest Trials
Tap Battle
Grand Conquests
Forging Bonds
Røkkr Sieges
Lost Lore
Hall of Forms
Mjölnir's Strike
Frontline Phalanx
Pawns of Loki
Heroes Journey
Summoner Duels R/S
Binding Worlds
Seer's Snare
Affinity Auto-Battles
More
Heroes
Hero list
Level 1 stats table
Level 40 stats table
Hero skills table
Legendary/Mythic Heroes
Other charts
Arena score tier list
Skills
Weapons
Assists
Specials
Passives
Sacred Seals
Other
Items
Accessories
Orb distribution table
Background Music
Artists list
Voice actors list
Guides
Beginner's Guide
Technical Help
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Fire Emblem Heroes Wiki
24,345
pages
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Contributor's Guide
To‐do list
Build Center
Wiki Discord
Game info
Basics
Mechanics
Advanced mechanics
Skill interaction
Skill Inheritance
Sacred Seal Forge
Weapon Refinery
Confer Blessing
Quests
Summoning events
Game modes
Aether Raids
Aether Resort
Special Maps
Story Maps
Paralogue Maps
Tactics Drills
Heroic Ordeals
Chain Challenge
Squad Assault
Blessed Gardens
Summoner Duels
Resonant Battles
Allegiance Battles
Arena
Arena Assault
Training Tower
Events
Voting Gauntlet
Tempest Trials
Tap Battle
Grand Conquests
Forging Bonds
Røkkr Sieges
Lost Lore
Hall of Forms
Mjölnir's Strike
Frontline Phalanx
Pawns of Loki
Heroes Journey
Summoner Duels R/S
Binding Worlds
Seer's Snare
Affinity Auto-Battles
More
Heroes
Hero list
Level 1 stats table
Level 40 stats table
Hero skills table
Legendary/Mythic Heroes
Other charts
Arena score tier list
Skills
Weapons
Assists
Specials
Passives
Sacred Seals
Other
Items
Accessories
Orb distribution table
Background Music
Artists list
Voice actors list
Guides
Beginner's Guide
Technical Help
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Editing
Module:UnitData/doc
(section)
Back to page
Edit source
View history
Talk (0)
Edit Page
Module:UnitData/doc
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Usage== The entry point of this module is simply <code>main</code>. Two different sets of parameters are accepted by the module, depending on whether unit data is defined or retrieved from the database. ===Unit definitions=== To define units for a map, add the following to the map page itself: <pre> {{#invoke:UnitData|main |mapImage=<!-- map image, sometimes optional --> |Normal=[ {unit=;pos=;rarity=;slot=;level=;stats=[hp;atk;spd;def;res];weapon=;refine=;assist=;special=;a=;b=;c=;seal=;accessory=;cooldown=;properties=;ai={turn=;group=;delay=;break_walls=;tether=};spawn={turn=;count=;target=;remain=;kills=};}; {unit=;pos=;rarity=;slot=;level=;stats=[hp;atk;spd;def;res];weapon=;assist=;special=;a=;b=;c=;seal=}; <!-- less verbose --> <!-- other units --> ] |Hard=[<!-- more units -->] |Lunatic=[<!-- more units -->] |<!-- other tabs --> }} </pre> * '''mapImage''': ''(Optional)'' Map image using [[Template:MapLayout]] or {{LuaInvoke|MapLayout|map}}. Initial units should not be added, they are automatically populated by this module. The same map image is used for all unit tabs. This parameter is ''required'' if any unit specified in the module is a reinforcement unit. * '''globalai''': ''(Optional)'' The default AI setting for units that do not have their own '''ai''' specifications. This is mostly useful for manually inputted unit data. Apart from the values accepted for unit definitions, the following string values expand to commonly used settings: ** <code>activeall</code>: <code>{turn=1}</code>. This is also the default AI setting if this parameter is not given. ** <code>passivelinked</code>: <code>{group=1}</code> ** <code>passivesingle</code>: <code>{}</code> * '''no cargo''': ''(Optional)'' If true, do not store any units into the Cargo database. Random units (see below) are never stored regardless of whether this parameter is set. * '''no ai''': ''(Optional)'' If true, do not show the AI settings tables. * Other parameters: Any parameter name that isn't one of the parameters listed above or a derived map parameter is considered a tab name. The parameter value is an [[Module:ObjectArg|ObjectArg]] list of hashes defining the units for the Normal tab. The difficulty of the tab is automatically determined from the tab name. Unlike the old templates, units no longer need to be defined in separate groups depending on their armies and reinforcement settings; the module automatically groups units and generates multiple unit tables as necessary. ===Derived maps=== To display units for a derived map, use the following parameters instead: <pre> {{#invoke:UnitData|main |battle= |derived= |derivedMap= |derivedTabs={Normal=Normal;Hard=Lunatic} |mapImage= |allyPos= }} </pre> * '''battle''': Battle number for the derived map, e.g. 1 for the first battle. * '''derived''': One of the tags for derived maps. See below for a complete list of supported values. * '''derivedMap''': ''(Optional)'' Page name of the base map where the derived units were originally defined. Defaults to the current page (it is possible to display derived unit stats on the same page they are defined, but this is no longer done). * '''derivedTabs''': An [[Module:ObjectArg|ObjectArg]] hash which maps tab names from the original map to tab names of the derived map. In the example above, the Normal tab contains derived units from the original map at Normal difficulty, while the Lunatic tab contains derived units from Hard difficulty. The new tab names must be supported by the '''derived''' setting for unit promotion to occur. * '''mapImage''': Map image using [[Template:MapLayout]] or {{LuaInvoke|MapLayout|map}}. Initial units should not be added, they are automatically populated by this module. The same map image is used for all unit tabs. * '''allyPos''': Comma-separated list of ally starting positions, same as in [[Template:MapLayout]]. On derived maps with reinforcements, these starting positions ''must'' be declared outside the '''mapImage''' parameter, so that they will be placed only in the infobox but not in reinforcement layouts. ===List of derived map settings=== A list of values that can be used for the '''derived''' parameter, followed by the tab names supported by that setting. {|class="wikitable mw-collapsible mw-collapsed" ! Derived map settings |- | {{#invoke:UnitData|derivedSettingsList}} |} The tags have the following usage: * <code>blessed_gardens</code> is applied to all [[Blessed Gardens]]. * <code>blessed_grounds_odd</code> is applied to all odd-numbered Grounds (e.g. [[Grounds of Earth: Earth 1]], [[Grounds of Fire: Fire 3]]), similarly for <code>blessed_grounds_even</code>. * <code>cc_paralogue_odd*</code> is applied to odd-numbered Paralogue chapters with corresponding part numbers. <code>single</code> is for single-chapter [[Chain Challenge]]s, <code>double</code> is for double-chapter Chain Challenges. <code>cc_paralogue_even*</code> is for even-numbered chapters. * <code>cc_story_odd*</code> and <code>cc_story_even*</code> are used similarly but for story maps. Book number does not matter. * <code>squad_assault</code> is applied to all [[Squad Assault]] maps.
Summary:
Please note that all contributions to the Fire Emblem Heroes Wiki are considered to be released under the CC BY-NC-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab