--- a/LuaAPI.wiki Wed Dec 03 05:58:47 2014 +0000
+++ b/LuaAPI.wiki Wed Dec 03 06:45:26 2014 +0000
@@ -942,7 +942,26 @@
== Stats functions ==
=== <tt>!SendStat(TStatInfoType, statMessage[, teamName])</tt> (0.9.20) ===
-<blockquote>Exposes the uIO SendStat to the lua scripts. Use it to produce custom stat pages.
+This function exposes the uIO SendStat to the Lua scripts. Use it to produce custom stat pages.
+
+`TStatInfoType` is the piece of information you want to manipulate. The result of this functions varies greatly for different `TStatInfoType`s. The parameter `statMessage` is mandatory and is a string used for the statistics, its meaning depends on the `TStatInfoType`. The parameter `teamName` contains the name of a team which is relevant to the chosen stat. This parameter is not always required, this also depends on `TStatInfoType`.
+
+This tables explains the different behaviours of this function for different values of `TStatInfoType`:
+
+|| `TStatInfoType` || Meaning of `statMessage` || Team parameter used? ||
+|| `siGraphTitle` || Title of the graph. If you use this, the health icon changes into a star. || No ||
+|| `siGameResult` || Title of the stats screen, used to show the result of the game, i.e. who won the game || No ||
+|| `siCustomAchievement` || A freeform text for a single “bullet point” in the “bullet point” list in the details section. For each time you call `SendStat` with this `TStatInfoType`, a new “bullet point” gets added to the list. || No ||
+|| `siPointType` || Replaces the word “kills” in the ranking list. Sadly, grammatical number is currently not respected at all here. || No ||
+|| `siPlayerKills` || The number of kills for the specified team (converted to a string), as shown in the ranking list. Unless the word “kills” has been replaced by `siPointType`, then that word is used instead. Only integers (converted to string) are possible. || Yes ||
+|| `siClanHealth` || Value of a data point (converted to a string). This sets a single data point on the graph for the specified team. Subsequent calls will draw the next point along the horizontal axis; the frontend will then simply connect the dots in the final graph. The graphs are treated independently for each other. Currently the graph only can display positive values. You also should have called `SendHealthStatsOff` if you use this to prevent the default health graphs to be drawn. || Yes ||
+|| `siMaxStepKills` || Most hedgehogs killed in a round. `statText` must be in format “`<kills> <name of killer hedgehog> (<team name of killer>)`”. || No ||
+|| `siMaxTeamDamage` || Hedgehog with most damage inflicted to his own team. `statText` must be in the format “`<damage> <hedgehog name>`”. || No ||
+|| `siKilledHHs` || Total number of killed hedgehogs (converted to string). || No ||
+|| `siTeamStats` || Increases the wins of local teams in case the given number is greater than 0. || No ||
+|| `siMaxStepDamage` || Best shot award (most damage in one turn). `statText` must be in format “`<damage> <hedgehog name> (<team name>)`”. || No ||
+|| `siMaxTurnSkips` || Team with most skips. `statText` must be of format “`<number> <teamName>`”. || No ||
+
<b>Examples:</b>
@@ -950,7 +969,7 @@
-- will automatically change the health icon to a star
SendStat(siGraphTitle,'Custom Graph Title')
SendStat(siGameResult,'Winner is Team A!')
-SendStat(siCustomAchievement,'This is a custom mesasge posted in the Details section!')
+SendStat(siCustomAchievement,'This is a custom message posted in the Details section!')
-- Changes the word kill to Point, call it just before sending kills/score for each hog
-- in case you want to change the word i.e. print Point or Points
SendStat(siPointType,'Point')
@@ -983,8 +1002,6 @@
* Calling just EndGame() won't produce any stats.
* If one would like to produce a custom graph see also SendHealthStatsOff().
-</blockquote>
-
=== <tt>!SendHealthStatsOff()</tt> (0.9.20) ===
<blockquote>Prevents the engine of sending health stats to the front end.