LuaAPI: Fix very misleading description of siTeamStats
authorWuzzy
Mon, 03 Sep 2018 22:25:51 +0100
changeset 1535 9f33e3eb9798
parent 1534 38fa37ffb915
child 1536 c211178df020
LuaAPI: Fix very misleading description of siTeamStats
LuaAPI.wiki
--- a/LuaAPI.wiki	Mon Sep 03 22:09:05 2018 +0100
+++ b/LuaAPI.wiki	Mon Sep 03 22:25:51 2018 +0100
@@ -1500,7 +1500,7 @@
 || `siMaxStepKills` || Most hedgehogs killed in a round. `statMessage` must be in format “`<kills> <name of killer hedgehog> (<team name of killer>)`”. || No ||
 || `siMaxTeamDamage` || Team with most damage inflicted to self. `statMessage` must be in the format “`<damage> <team name>`”. || No ||
 || `siKilledHHs` || Total number of killed hedgehogs (converted to string). || No ||
-|| `siTeamStats` || Sets the ranking of each team. Use number 0 for default ranking. Format: “`<team name 1>:<rank 1>:<team name 2>:<rank 2>:`” (and so on) || No ||
+|| `siTeamStats` || Report a team rating (default: team health) of a single team. Higher = better. Format: “`<team name>:<team rating>:`”. || No ||
 || `siMaxStepDamage` || Most damage in one turn for the “best shot award”. `statMessage` must be in format “`<damage> <hedgehog name> (<team name>)`”. || No ||
 || `siMaxTurnSkips` || Team with most skips. `statMessage` must be of format “`<number> <teamName>`”. || No ||
 
@@ -1537,8 +1537,9 @@
 -- total number of killed hedgehogs
 SendStat(siKilledHHs, "1")
 
--- ranking: sets rank of Megateam to 1 and rank of Superteam to 2
-SendStat(siTeamStats, "Megateam:1:Superteam:2:")
+-- report team rating of Megateam to be 250 and that of Superteam to be 100.
+SendStat(siTeamStats, "Megateam:250:")
+SendStat(siTeamStats, "Superteam:100:")
 
 -- best shot award
 SendStat(siMaxStepDamage, "30 hedgehogName (teamName)")
@@ -1561,7 +1562,7 @@
 Prevents the engine of sending health stats to the frontend. 
 
 If any health stats haven’t been sent before this will cause the health graph to the stats page to be hidden. Use this function in the Lua scripts to produce custom graphs by calling it inside `onGameStart()` and using the `SendStat()` function.
-
+f
 === <tt>!SendAchievementsStatsOff()</tt> (0.9.23) ===
 Prevents the engine of populating the snarky comments in the “Details” section (internally known as “achievements”) of the stats screen, such as “best shot award”, etc. So you can start with a clean list when the game ends normally. This function needs to be called inside `onGameStart()`.