LuaStats.wiki
changeset 2020 823ccc573d62
parent 1931 d6ef1025d96f
child 2021 25a948f79196
equal deleted inserted replaced
2019:12cc62c0ae38 2020:823ccc573d62
    29 || `siMaxTurnSkips` || Team with most skips. `statMessage` must be of format “`<number> <teamName>`”. || No ||
    29 || `siMaxTurnSkips` || Team with most skips. `statMessage` must be of format “`<number> <teamName>`”. || No ||
    30 || `siTeamRank` || Overwrite rank of team. `statMessage` is the rank of your choice. Must be sent before `siPlayerKills` of the team in question. || No ||
    30 || `siTeamRank` || Overwrite rank of team. `statMessage` is the rank of your choice. Must be sent before `siPlayerKills` of the team in question. || No ||
    31 
    31 
    32 === Special values for `siPointType` (1.0.0) ===
    32 === Special values for `siPointType` (1.0.0) ===
    33 
    33 
    34 For `siPointType`, we support a few common point types. Just set `statMessage` to one of the following special values below:
    34 For `siPointType`, we support a few common point types. Just set `statMessage` to one of the following values below:
    35 
    35 
    36 || *Value of `statMessage`* || *Meaning* || *How it may appear in team rankings* ||
    36 || *Value of `statMessage`* || *Meaning* || *How it may appear in team rankings* ||
       
    37 || _Not set_ || Number of kills (default) || Team 1 (8 kills) ||
    37 || `"!POINTS"` || Number of points || Team 1 (25 points) ||
    38 || `"!POINTS"` || Number of points || Team 1 (25 points) ||
    38 || `"!CRATES"` || Number of crates || Team 1 (25 crates) ||
    39 || `"!CRATES"` || Number of crates || Team 1 (25 crates) ||
    39 || `"!TIME"` || Number of milliseconds, shown as seconds with 3 decimal places || Team 1 (0.025 seconds) ||
    40 || `"!TIME"` || Number of milliseconds, shown as seconds with 3 decimal places || Team 1 (0.025 seconds) ||
    40 || `"!TIME0"` … `"!TIME3"` || Number of milliseconds, shown as seconds with the decimal places specified in the number (e.g. `"!TIME2"` for 2 decimal places) || Team 1 (0.02 seconds) ||
    41 || `"!TIME0"` … `"!TIME3"` || Number of milliseconds, shown as seconds with the decimal places specified in the number (e.g. `"!TIME2"` for 2 decimal places) || Team 1 (0.02 seconds) ||
    41 || `"!EMPTY"` || Don't display anything besides the team name || Team 1 ||
    42 || `"!EMPTY"` || Don't display anything besides the team name || Team 1 ||
       
    43 || _Anything else_ || Custom text with number. Display `statMessage` after the number || Team 1 (25 stars) ||
    42 
    44 
    43 The special values will get properly localized in the frontend, like the proper translation of the numerus form and the decimal point.
    45 The default text is is “kill”/“kills” and is used when you didn't use `siPointType`.
    44 
    46 
    45 If you use any other value, Hedgewars will use this string literally, but there will be no proper localization of the numerus form.
    47 The default and the special values with the exclamation mark will get automatically localized in the frontend, like the proper translation of the numerus form and the decimal point. Do not enclose the special values in `loc()` (see [LuaLibraryLocale]).
    46 
    48 
    47 If you want to use the number of kills in the ranking list, you do not need to call `SendStat`. The number of kills is already the default.
    49 The custom text will not be automatically localized, so you can enclose it in `loc()`. But there's no support for the numerus form.
    48 
    50 
    49 === Examples ===
    51 === Examples ===
    50 
    52 
    51 <code language="lua">
    53 <code language="lua">
    52 -- will automatically change the health icon to a star
    54 -- will automatically change the health icon to a star