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

From Team Fortress Wiki
Jump to: navigation, search
(Got the data to three decimal points, up to 24 captures (go team scout))
(Exact values for 1..32 from Wolfram Alpha)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{#switch: {{{1}}}
 
{{#switch: {{{1}}}
| 1 = 1.000
+
|1={{#expr:1}}
| 2 = 0.666
+
|2={{#expr:2/3}}
| 3 = 0.546
+
|3={{#expr:6/11}}
| 4 = 0.480
+
|4={{#expr:12/25}}
| 5 = 0.438
+
|5={{#expr:60/137}}
| 6 = 0.408
+
|6={{#expr:20/49}}
| 7 = 0.386
+
|7={{#expr:140/363}}
| 8 = 0.368
+
|8={{#expr:280/761}}
| 9 = 0.353
+
|9={{#expr:2520/7129}}
| 10 = 0.342
+
|10={{#expr:2520/7381}}
| 11 = 0.331
+
|11={{#expr:27720/83711}}
| 12 = 0.322
+
|12={{#expr:27720/86021}}
| 13 = 0.315
+
|13={{#expr:360360/1145993}}
| 14 = 0.307
+
|14={{#expr:360360/1171733}}
| 15 = 0.302
+
|15={{#expr:360360/1195757}}
| 16 = 0.296
+
|16={{#expr:720720/2436559}}
| 17 = 0.290
+
|17={{#expr:12252240/42142223}}
| 18 = 0.286
+
|18={{#expr:4084080/14274301}}
| 19 = 0.282
+
|19={{#expr:77597520/275295799}}
| 20 = 0.278
+
|20={{#expr:15519504/55835135}}
| 21 = 0.275
+
|21={{#expr:5173168/18858053}}
| 22 = 0.271
+
|22={{#expr:5173168/19093197}}
| 23 = 0.268
+
|23={{#expr:118982864/444316699}}
| 24 = 0.265
+
|24={{#expr:356948592/1347822955}}
 +
|25={{#expr:8923714800/34052522467}}
 +
|26={{#expr:8923714800/34395742267}}
 +
|27={{#expr:80313433200/312536252003}}
 +
|28={{#expr:80313433200/315404588903}}
 +
|29={{#expr:2329089562800/9227046511387}}
 +
|30={{#expr:2329089562800/9304682830147}}
 +
|31={{#expr:72201776446800/290774257297357}}
 +
|32={{#expr:144403552893600/586061125622639}}
 
}}
 
}}
 
<noinclude>{{clr}}
 
<noinclude>{{clr}}
 
{{Template doc}}
 
{{Template doc}}
[[Category:Templates|{{PAGENAME}}]]
+
[[Category:Game mechanics|{{SUBPAGENAME}}]]
 
 
</noinclude>
 

Latest revision as of 13:23, 14 February 2013

Template documentation [view] [edit] [history] [purge]

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
}