Module:Reward/Tables/doc

Lua metamodule to generate common reward tables.


 * score (args, defineFn, header = 'Score', frame = nil)
 * Displays and defines a list of rewards ordered by a score value. All rewards on the table are defined.
 * args: The arguments table. It may contain the following fields: (all keys are strings, even numeric ones)
 * 1, 2, etc.: The reward given at a particular score.
 * iconsize: (Optional) The size of the item and Sacred Seal icons on the reward table. Defaults to x20px.
 * columns: (Optional) The number of columns on the reward table. Defaults to 1.
 * no cargo: (Optional) If true, do not define any rewards.
 * reverse: (Optional) If true, sorts scores in reverse order.
 * defineFn: Callback function invoked whenever a reward needs to be defined. It accepts a reward object and the corresponding score as arguments, and should call to actually store the reward into the Cargo database.
 * header: Title for the score column.
 * frame: Frame object. Uses the current frame if not given.


 * rank (args, defineFn, header = 'Rank', frame = nil)
 * Displays and defines a list of rewards ordered by rank. Only the best reward on the table is defined.
 * args: The arguments table. It may contain the following fields:
 * 1~100, 101~500, etc.: The reward given at a particular rank range.
 * iconsize: (Optional) The size of the item and Sacred Seal icons on the reward table. Defaults to x20px.
 * columns: (Optional) The number of columns on the reward table. Defaults to 1.
 * no cargo: (Optional) If true, do not define any rewards.
 * reverse: (Optional) If true, sorts ranks in reverse order.
 * arena tiers: (Optional) If true, displays ranks as Arena Tiers.
 * intervals: (Optional) If true, displays ranks as Resonant Battles Intervals.
 * defineFn: Callback function invoked whenever a reward needs to be defined. It accepts the best reward object determined by as its sole argument, and should call  to actually store the reward into the Cargo database.
 * header: Title for the score column.
 * frame: Frame object. Uses the current frame if not given.


 * createTable (rewards, header, columns = 1)
 * Displays a list of rewards.
 * rewards: The list of rewards. Each elements of the list must be a two-elements list. The first one is the value for the score column, the second one for the reward column.
 * header: Title for the score column.
 * columns: The number of columns on the reward table. Defaults to 1.