Difference between revisions of "Template:Metrics/Capture return/doc"

From Team Fortress Wiki
Jump to: navigation, search
m
m (also, fix the link)
 
(7 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
|-
 
|-
 
| align = "center" | x1
 
| align = "center" | x1
| align = "center" | {{Control Point Timing/Decay|1}}
+
| align = "center" | {{Metrics/Capture return|1}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|1}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|1}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x2
 
| align = "center" | x2
| align = "center" | {{Control Point Timing/Decay|2}}
+
| align = "center" | {{Metrics/Capture return|2}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|2}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|2}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x3
 
| align = "center" | x3
| align = "center" | {{Control Point Timing/Decay|3}}
+
| align = "center" | {{Metrics/Capture return|3}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|3}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|3}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x4
 
| align = "center" | x4
| align = "center" | {{Control Point Timing/Decay|4}}
+
| align = "center" | {{Metrics/Capture return|4}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|4}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|4}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x5
 
| align = "center" | x5
| align = "center" | {{Control Point Timing/Decay|5}}
+
| align = "center" | {{Metrics/Capture return|5}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|5}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|5}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x6
 
| align = "center" | x6
| align = "center" | {{Control Point Timing/Decay|6}}
+
| align = "center" | {{Metrics/Capture return|6}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|6}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|6}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x7
 
| align = "center" | x7
| align = "center" | {{Control Point Timing/Decay|7}}
+
| align = "center" | {{Metrics/Capture return|7}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|7}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|7}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x8
 
| align = "center" | x8
| align = "center" | {{Control Point Timing/Decay|8}}
+
| align = "center" | {{Metrics/Capture return|8}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|8}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|8}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x9
 
| align = "center" | x9
| align = "center" | {{Control Point Timing/Decay|9}}
+
| align = "center" | {{Metrics/Capture return|9}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|9}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|9}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x10
 
| align = "center" | x10
| align = "center" | {{Control Point Timing/Decay|10}}
+
| align = "center" | {{Metrics/Capture return|10}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|10}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|10}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x11
 
| align = "center" | x11
| align = "center" | {{Control Point Timing/Decay|11}}
+
| align = "center" | {{Metrics/Capture return|11}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|11}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|11}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x12
 
| align = "center" | x12
| align = "center" | {{Control Point Timing/Decay|12}}
+
| align = "center" | {{Metrics/Capture return|12}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|12}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|12}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x13
 
| align = "center" | x13
| align = "center" | {{Control Point Timing/Decay|13}}
+
| align = "center" | {{Metrics/Capture return|13}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|13}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|13}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x14
 
| align = "center" | x14
| align = "center" | {{Control Point Timing/Decay|14}}
+
| align = "center" | {{Metrics/Capture return|14}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|14}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|14}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x15
 
| align = "center" | x15
| align = "center" | {{Control Point Timing/Decay|15}}
+
| align = "center" | {{Metrics/Capture return|15}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|15}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|15}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x16
 
| align = "center" | x16
| align = "center" | {{Control Point Timing/Decay|16}}
+
| align = "center" | {{Metrics/Capture return|16}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|16}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|16}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x17
 
| align = "center" | x17
| align = "center" | {{Control Point Timing/Decay|17}}
+
| align = "center" | {{Metrics/Capture return|17}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|17}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|17}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x18
 
| align = "center" | x18
| align = "center" | {{Control Point Timing/Decay|18}}
+
| align = "center" | {{Metrics/Capture return|18}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|18}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|18}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x19
 
| align = "center" | x19
| align = "center" | {{Control Point Timing/Decay|19}}
+
| align = "center" | {{Metrics/Capture return|19}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|19}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|19}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x20
 
| align = "center" | x20
| align = "center" | {{Control Point Timing/Decay|20}}
+
| align = "center" | {{Metrics/Capture return|20}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|20}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|20}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x21
 
| align = "center" | x21
| align = "center" | {{Control Point Timing/Decay|21}}
+
| align = "center" | {{Metrics/Capture return|21}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|21}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|21}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x22
 
| align = "center" | x22
| align = "center" | {{Control Point Timing/Decay|22}}
+
| align = "center" | {{Metrics/Capture return|22}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|22}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|22}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x23
 
| align = "center" | x23
| align = "center" | {{Control Point Timing/Decay|23}}
+
| align = "center" | {{Metrics/Capture return|23}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|23}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|23}} * 100 round 0 }}%
 
|-
 
|-
 
| align = "center" | x24
 
| align = "center" | x24
| align = "center" | {{Control Point Timing/Decay|24}}
+
| align = "center" | {{Metrics/Capture return|24}}
| align = "center" | {{#expr: 1 / {{Control Point Timing/Decay|24}} * 100 round 0 }}%
+
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|24}} * 100 round 0 }}%
 +
|-
 +
| align = "center" | x25
 +
| align = "center" | {{Metrics/Capture return|25}}
 +
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|25}} * 100 round 0 }}%
 +
|-
 +
| align = "center" | x26
 +
| align = "center" | {{Metrics/Capture return|26}}
 +
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|26}} * 100 round 0 }}%
 +
|-
 +
| align = "center" | x27
 +
| align = "center" | {{Metrics/Capture return|27}}
 +
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|27}} * 100 round 0 }}%
 +
|-
 +
| align = "center" | x28
 +
| align = "center" | {{Metrics/Capture return|28}}
 +
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|28}} * 100 round 0 }}%
 +
|-
 +
| align = "center" | x29
 +
| align = "center" | {{Metrics/Capture return|29}}
 +
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|29}} * 100 round 0 }}%
 +
|-
 +
| align = "center" | x30
 +
| align = "center" | {{Metrics/Capture return|30}}
 +
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|30}} * 100 round 0 }}%
 +
|-
 +
| align = "center" | x31
 +
| align = "center" | {{Metrics/Capture return|31}}
 +
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|31}} * 100 round 0 }}%
 +
|-
 +
| align = "center" | x32
 +
| align = "center" | {{Metrics/Capture return|32}}
 +
| align = "center" | {{#expr: 1 / {{Metrics/Capture return|32}} * 100 round 0 }}%
 
|}
 
|}
  
These decay rates were determined by creating a map with a 100 second capture point, then using [[Bots#Puppet_Bots|Puppet Bots]] to capture said point. I am unable to derive a simple equasion that explains these values. These times were generated using a SourceMod script as follows:
+
The values are computed using the equation sum(1/<var>i</var> for <var>i</var>=1 to <var>n</var>), where <var>n</var> is the number of capturing players, a [[Wikipedia:Harmonic number|harmonic number]]. This equation is derived from the source file <code>trigger_area_capture.cpp</code> that is available as part of the Source SDK. Values generated from [http://www.wolframalpha.com WolframAlpha] using the input <code>Table[1/HarmonicNumber[n], {n, 32}]</code>
  
ADDITION: Using the data provided by Org, Excel comes up with a logarithmic regression formula of y = 0.9019ln(x) + 0.8738 with a coefficient of determination of R² = 0.9975. This is the closest formula to date that matches the data points provided.
+
----
 +
'''Previous experimental results'''
 +
 
 +
These decay rates were determined by creating a map with a 100 second capture point, then using [[Bots#Puppet_Bots|Puppet Bots]] to capture said point. I am unable to derive a simple equation that explains these values. These times were generated using a SourceMod script as follows:
  
 
<pre>
 
<pre>
 
#include <sourcemod>
 
#include <sourcemod>
+
 
 
public Plugin:myinfo =
 
public Plugin:myinfo =
 
{
 
{
Line 136: Line 171:
 
return Plugin_Continue
 
return Plugin_Continue
 
}
 
}
</pre>
+
</pre><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 22:48, 30 May 2014

Multiplier Adjustment Rate
x1 1 100%
x2 0.66666666666667 150%
x3 0.54545454545455 183%
x4 0.48 208%
x5 0.43795620437956 228%
x6 0.40816326530612 245%
x7 0.38567493112948 259%
x8 0.36793692509855 272%
x9 0.35348576237902 283%
x10 0.34141715214741 293%
x11 0.33113927679755 302%
x12 0.3222468932005 310%
x13 0.31445218251769 318%
x14 0.30754446618812 325%
x15 0.30136557845783 332%
x16 0.29579419172694 338%
x17 0.29073549347409 344%
x18 0.28611418520599 350%
x19 0.2818696118207 355%
x20 0.2779522965244 360%
x21 0.27432142650145 365%
x22 0.27094299608389 369%
x23 0.26778841368733 373%
x24 0.26483344171861 378%
x25 0.26205737940994 382%
x26 0.25944242548188 385%
x27 0.25697317570452 389%
x28 0.25463622288863 393%
x29 0.25241983552654 396%
x30 0.25031369744854 399%
x31 0.24830869526721 403%
x32 0.24639674358231 406%

The values are computed using the equation sum(1/i for i=1 to n), where n is the number of capturing players, a harmonic number. This equation is derived from the source file trigger_area_capture.cpp that is available as part of the Source SDK. Values generated from WolframAlpha using the input Table[1/HarmonicNumber[n], {n, 32}]


Previous experimental results

These decay rates were determined by creating a map with a 100 second capture point, then using Puppet Bots to capture said point. I am unable to derive a simple equation that explains these values. These times were generated using a SourceMod script as follows:

#include <sourcemod>

public Plugin:myinfo =
{
	name = "Capture Timing",
	author = "Org",
	description = "Console out debug info",
	version = "1.0.0.2",
	url = "example.org"
};

public OnPluginStart()
{
	HookEvent("controlpoint_starttouch", Event_StartCapture)
	HookEvent("teamplay_point_captured", Event_EndCapture)
}

public Action:Event_StartCapture(Handle:event, const String:name[], bool:dontBroadcast)
{
	new Float:time = GetEngineTime()
	PrintToServer("Control Point Entered : %f", time)
	return Plugin_Continue
}

public Action:Event_EndCapture(Handle:event, const String:name[], bool:dontBroadcast)
{
	new Float:time = GetEngineTime()
	PrintToServer("Control Point Captured: %f", time)
	return Plugin_Continue
}