Module:Util/doc

This module blackboxes several FEH-related operations (eg. Fetching heroes, skills, skill info) and is intended for use by other Lua modules. This module should not be called from  directly.

mf(str)
Removes special characters from  so that it is usable as a file name; equivalent to MF.

isNilOrEmpty(val)
Checks if the specified value is nil or empty

returnDefaultIfEmpty(val)
Returns '-' if the specified value is nil or empty

getHeroIcon(hero,size,resplendent)

 * Input: Hero name, image size, whether to obtain the Resplendent Attire (default false)
 * Output: Icon of the Hero that links to the Hero page

getWeaponSortOrder
Obtains the sort order of weapon types, by color then by weapon. Uses WeaponTypes.

Return values
A table that maps full weapon types to increasing values, e.g.  → ,   →.

getMoveSortOrder
Obtains the sort order of move types. Uses MoveTypes.

Return values
A table that maps move types to increasing values, e.g.  → ,   →.

getSkillChains(skills)
Returns two tables representing dependencies between the given skills. The first table contains  of skills as keys and lists of the skill's prerequisites as values; the second table is for descendants of skills.

If a table is passed as an argument, it must be a list that contains only the s of skills to be queried. Otherwise all existing skills are used.

getRarityText
Returns an array containing rarity texts from to.

getDifficulties
Returns a sorted array of difficulties.

difficultySort(x, y)
Returns the relative order between two unit tab names, based on their difficulties. Can be used as the comparison function to.