Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
3.4 KiB

  1. create database gamestats_ep2;
  2. use gamestats_ep2;
  3. create table ep2
  4. (
  5. UserID CHAR(16),
  6. PRIMARY KEY( UserID ),
  7. LastUpdate DATETIME,
  8. KEY( LastUpdate ),
  9. Version TINYINT,
  10. Tag CHAR(8),
  11. KEY( Tag ),
  12. Count INT,
  13. Seconds INT,
  14. HDR INT,
  15. Captions INT,
  16. Commentary INT,
  17. Easy INT,
  18. Medium INT,
  19. Hard INT,
  20. nonsteam TINYINT,
  21. cybercafe TINYINT,
  22. hl2_chapter TINYINT,
  23. SecondsToCompleteGame INT, # Non-zero if user has completed game
  24. HighestMap CHAR(20),
  25. DXLevel INT,
  26. Deaths INT
  27. ) TYPE=MyISAM;
  28. create table ep2_maps
  29. (
  30. UserID CHAR(16),
  31. MapName CHAR(20),
  32. PRIMARY KEY( UserID,MapName ),
  33. LastUpdate DATETIME,
  34. KEY( LastUpdate ),
  35. Version TINYINT,
  36. Tag CHAR(8),
  37. KEY( Tag ),
  38. Count INT,
  39. Seconds INT,
  40. HDR INT,
  41. Captions INT,
  42. Commentary INT,
  43. Easy INT,
  44. Medium INT,
  45. Hard INT,
  46. nonsteam TINYINT,
  47. cybercafe TINYINT,
  48. Deaths INT
  49. ) TYPE=MyISAM;
  50. create table ep2_entities
  51. (
  52. UserID CHAR(16),
  53. Tag CHAR(8),
  54. KEY( Tag ),
  55. MapName CHAR(20),
  56. MapVersion INT,
  57. KEY( MapVersion ),
  58. Entity CHAR(32),
  59. PRIMARY KEY( UserID,Tag,MapName,Entity ),
  60. LastUpdate DATETIME,
  61. KEY( LastUpdate ),
  62. BodyCount INT,
  63. KilledPlayer INT
  64. ) TYPE=MyISAM;
  65. create table ep2_deaths
  66. (
  67. UserID CHAR(16),
  68. Tag CHAR(8),
  69. KEY( Tag ),
  70. MapName CHAR(20),
  71. MapVersion INT,
  72. KEY( MapVersion ),
  73. LastUpdate DATETIME,
  74. KEY( LastUpdate ),
  75. DeathIndex INT,
  76. X SMALLINT,
  77. Y SMALLINT,
  78. Z SMALLINT,
  79. PRIMARY KEY ( UserID, Tag, MapName, X, Y, Z )
  80. ) TYPE=MyISAM;
  81. create table ep2_weapons
  82. (
  83. UserID CHAR(16),
  84. Tag CHAR(8),
  85. KEY( Tag ),
  86. MapName CHAR(20),
  87. MapVersion INT,
  88. KEY( MapVersion ),
  89. Weapon CHAR(32),
  90. PRIMARY KEY( UserID,Tag, MapName,Weapon ),
  91. LastUpdate DATETIME,
  92. KEY( LastUpdate ),
  93. Shots INT,
  94. Hits INT,
  95. Damage DOUBLE
  96. ) TYPE=MyISAM;
  97. create table ep2_saves
  98. (
  99. UserID CHAR(16),
  100. Tag CHAR(8),
  101. KEY( Tag ),
  102. MapName CHAR(20),
  103. MapVersion INT,
  104. KEY( MapVersion ),
  105. LastUpdate DATETIME,
  106. KEY( LastUpdate ),
  107. FIRSTDEATH INT, # index into ep2_deaths
  108. NUMDEATHS INT,
  109. X SMALLINT,
  110. Y SMALLINT,
  111. Z SMALLINT,
  112. HEALTH SMALLINT,
  113. SAVETYPE TINYINT, # 0 unknown, 1 autosave, 2 user save (quick or other)
  114. PRIMARY KEY( UseriD, Tag, MapName, FirstDeath, NumDeaths )
  115. ) TYPE=MyISAM;
  116. create table ep2_counters
  117. (
  118. UserID CHAR(16),
  119. Tag CHAR(8),
  120. KEY( Tag ),
  121. MapName CHAR(20),
  122. MapVersion INT,
  123. KEY( MapVersion ),
  124. PRIMARY KEY( UserID,Tag,MapName ),
  125. LastUpdate DATETIME,
  126. KEY( LastUpdate ),
  127. CRATESSMASHED INT,
  128. OBJECTSPUNTED INT,
  129. VEHICULARHOMICIDES INT,
  130. DISTANCE_INVEHICLE BIGINT,
  131. DISTANCE_ONFOOT BIGINT,
  132. DISTANCE_ONFOOTSPRINTING BIGINT,
  133. FALLINGDEATHS INT,
  134. VEHICLE_OVERTURNED INT,
  135. LOADGAME_STILLALIVE INT,
  136. LOADS INT,
  137. SAVES INT,
  138. GODMODES INT,
  139. NOCLIPS INT,
  140. DAMAGETAKEN DOUBLE
  141. ) TYPE=MyISAM;
  142. create table ep2_generic
  143. (
  144. UserID CHAR(16),
  145. Tag CHAR(8),
  146. KEY( Tag ),
  147. MapName CHAR(20),
  148. MapVersion INT,
  149. KEY( MapVersion ),
  150. StatName CHAR(16),
  151. PRIMARY KEY( UserID,Tag, MapName,StatName ),
  152. LastUpdate DATETIME,
  153. KEY( LastUpdate ),
  154. Count INT,
  155. Value DOUBLE,
  156. X SMALLINT,
  157. Y SMALLINT,
  158. Z SMALLINT
  159. ) TYPE=MyISAM;