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.

escq(str)
Escapes all apostrophes in  with backslashes and performs HTML unescaping; equivalent to EscQ.

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

getHeroIcon(hero,size)

 * Input: Hero name and image size
 * Output: Icon of the Hero that links to the Hero page

getHeroLowestRarity(hero,key)

 * Input: Hero name and rarities to use ( to exclude reward rarities,   to exclude summon rarities, any other value (including nil) to use both)
 * Output: Lowest rarity at which the Hero can be summoned or rewarded
 * If Hero cannot be obtained at all, returns 6

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.  → ,   →.

getOriginSortOrder
Obtains the sort order of game titles. Uses the values from GameSortValue.

Return values
A table that maps game titles to sort 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.

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

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

trim(string)
Copied from http://lua-users.org/wiki/StringTrim

strsplit(separator,string)
Copied from http://lua-users.org/wiki/SplitJoin

getRarityText
Returns an array containing rarity texts from to.