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.

2399 lines
74 KiB

  1. //====== Copyright 1996-2010, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: The file defines our Google Protocol Buffers which are used in over
  4. // the wire messages between servers as well as between the TF GC and TF gameservers
  5. // and clients.
  6. //
  7. //=============================================================================
  8. // We care more about speed than code size
  9. option optimize_for = SPEED;
  10. // We don't use the service generation functionality
  11. option cc_generic_services = false;
  12. //
  13. // STYLE NOTES:
  14. //
  15. // Use CamelCase CMsgMyMessageName style names for messages.
  16. //
  17. // Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
  18. // but plays nice with the Google formatted code generation.
  19. //
  20. // Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
  21. // Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
  22. // your message and wants to remove or rename fields.
  23. //
  24. // Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
  25. // going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
  26. // than 2^56 as it will safe space on the wire in those cases.
  27. //
  28. // Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
  29. // 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
  30. // An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
  31. // time.
  32. //
  33. // Note: to make something a key field, list it like so:
  34. // optional uint32 account_id = 1 [ (key_field) = true ];
  35. import "steammessages.proto";
  36. import "base_gcmessages.proto";
  37. enum ETFGCMsg
  38. {
  39. k_EMsgGCReportWarKill = 5001; //War kill tracking. No longer in use
  40. k_EMsgGCVoteKickBanPlayer = 5018; // client => GC
  41. k_EMsgGCVoteKickBanPlayerResult = 5019; // game server => GC
  42. k_EMsgGCKickPlayer_DEPRECATED = 5020; // GC => game server & client
  43. k_EMsgGCStartedTraining_DEPRECATED = 5021; // client => GC
  44. k_EMsgGCFreeTrial_ChooseMostHelpfulFriend = 5022; // client => GC
  45. k_EMsgGCRequestTF2Friends = 5023; // client => GC
  46. k_EMsgGCRequestTF2FriendsResponse = 5024; // GC => client
  47. k_EMsgGCReplay_SubmitContestEntry = 5026; // client => GC
  48. k_EMsgGCReplay_SubmitContestEntryResponse = 5027; // client => GC
  49. k_EMsgGCSaxxy_Awarded = 5029; // GC => client
  50. k_EMsgGCFreeTrial_ThankedBySomeone = 5028; // GC => client
  51. k_EMsgGCFreeTrial_ThankedSomeone = 5030; // GC => client
  52. k_EMsgGCFreeTrial_ConvertedToPremium = 5031; // GC => client
  53. k_EMsgGCMeetThePyroSilliness_BananaCraft_DEPRECATED = 5032; // GC => client (was part of the pre-Meet-the-Pyro silliness)
  54. k_EMsgGCMVMARG_HighFiveSuccessResponse_DEPRECATED = 5033; // GC => client (was part of the pre-MVM silliness)
  55. k_EMsgGCMVMARG_HighFiveOnClient_DEPRECATED = 5034; // client => GC (was part of the pre-MVM silliness)
  56. // Coaching
  57. k_EMsgGCCoaching_AddToCoaches = 5200; // client is requesting that they be added to a list of eligible coaches
  58. k_EMsgGCCoaching_AddToCoachesResponse = 5201;
  59. k_EMsgGCCoaching_RemoveFromCoaches = 5202; // client is requesting to be removed from list of eligible coaches
  60. k_EMsgGCCoaching_RemoveFromCoachesResponse =5203; // sent by GC to client
  61. k_EMsgGCCoaching_FindCoach = 5204; // sent by client to GC requesting a coach be found
  62. k_EMsgGCCoaching_FindCoachResponse = 5205; // sent by GC to client looking for a coach
  63. k_EMsgGCCoaching_AskCoach = 5206; // sent by GC to coach asking if they want to coach a student
  64. k_EMsgGCCoaching_AskCoachResponse = 5207; // (coach) client's response to whether they want to coach the found student
  65. k_EMsgGCCoaching_CoachJoinGame = 5208; // sent by GC to (coach) client to tell them to join the server
  66. k_EMsgGCCoaching_CoachJoining = 5209; // sent by GC to game session to tell them who is going to coach whom
  67. k_EMsgGCCoaching_CoachJoined = 5210; // sent by GC to game server letting them know a coach has joined
  68. k_EMsgGCCoaching_LikeCurrentCoach = 5211; // sent by (student) client to GC to indicate that they like their coach
  69. k_EMsgGCCoaching_RemoveCurrentCoach = 5212; // sent by (student) client to GC to indicate that they want to get rid of their coach, and eventually to game server
  70. k_EMsgGCCoaching_AlreadyRatedCoach = 5213; // sent by GC to (student) client
  71. // mini-games:
  72. // duel
  73. k_EMsgGC_Duel_Request = 5500; // GC => target (all clients?)
  74. k_EMsgGC_Duel_Response = 5501; // challenged client => GC and GC => all clients
  75. k_EMsgGC_Duel_Results = 5502; // gameserver => GC
  76. k_EMsgGC_Duel_Status = 5503; // GC => client
  77. // halloween (deprecated GCMsg types)
  78. k_EMsgGC_Halloween_ReservedItem_DEPRECATED = 5600; // GC => clients
  79. k_EMsgGC_Halloween_GrantItem_DEPRECATED = 5601; // client(s) => GC
  80. k_EMsgGC_Halloween_GrantItemResponse_DEPRECATED = 5604; // GC => client(s)
  81. k_EMsgGC_Halloween_Cheat_QueryResponse_DEPRECATED = 5605; // clients => GC
  82. k_EMsgGC_Halloween_ItemClaimed_DEPRECATED = 5606; // GC => clients
  83. // Halloween (new CProtoBufMsg types)
  84. k_EMsgGC_Halloween_ReservedItem = 5607; // GC => clients
  85. k_EMsgGC_Halloween_GrantItem = 5608; // client(s) => GC
  86. k_EMsgGC_Halloween_GrantItemResponse = 5609; // GC => client(s)
  87. k_EMsgGC_Halloween_Cheat_QueryResponse_DEPRECATED_2 = 5610; // clients => GC
  88. k_EMsgGC_Halloween_ItemClaimed_DEPRECATED_2 = 5611; // GC => clients
  89. k_EMsgGC_Halloween_ServerBossEvent = 5612; // server => GC
  90. k_EMsgGC_Halloween_Merasmus2012 = 5613; // server => GC
  91. k_EMsgGC_Halloween_UpdateMerasmusLootLevel = 5614; // Client => GC
  92. // Game Server stuff
  93. k_EMsgGC_GameServer_LevelInfo = 5700; // game server => GC
  94. k_EMsgGC_GameServer_AuthChallenge = 5701; // GC => game server
  95. k_EMsgGC_GameServer_AuthChallengeResponse = 5702; // game server => GC
  96. k_EMsgGC_GameServer_CreateIdentity = 5703; // client => GC
  97. k_EMsgGC_GameServer_CreateIdentityResponse =5704; // GC => client
  98. k_EMsgGC_GameServer_List = 5705; // client => GC
  99. k_EMsgGC_GameServer_ListResponse = 5706; // GC => client
  100. k_EMsgGC_GameServer_AuthResult = 5707; // GC => client
  101. k_EMsgGC_GameServer_ResetIdentity = 5708; // GC => client
  102. k_EMsgGC_GameServer_ResetIdentityResponse = 5709; // GC => client
  103. // Game-server-modifying client items
  104. k_EMsgGC_Client_UseServerModificationItem = 5710; // client => GC
  105. k_EMsgGC_Client_UseServerModificationItem_Response = 5711; // GC => client
  106. k_EMsgGC_GameServer_UseServerModificationItem = 5712; // GC => game server
  107. k_EMsgGC_GameServer_UseServerModificationItem_Response = 5713; // game server => GC
  108. k_EMsgGC_GameServer_ServerModificationItemExpired = 5714; // game server => GC
  109. k_EMsgGC_GameServer_ModificationItemState = 5715; // GC => game server
  110. k_EMsgGC_GameServer_AckPolicy = 5716; // client => GC
  111. k_EMsgGC_GameServer_AckPolicyResponse = 5717; // GC => client
  112. // Quickplay
  113. k_EMsgGC_QP_ScoreServers = 5800; // client => GC
  114. k_EMsgGC_QP_ScoreServersResponse = 5801; // client => GC
  115. k_EMsgGC_QP_PlayerJoining = 5802; // GC => server
  116. // Cheat challenge (deperecated GCMsg types)
  117. k_EMsgGC_PickupItemEligibility_Query_DEPRECATED = 6000; // GC => clients
  118. // Cheat challenge (new CProtoBufMsg types)
  119. k_EMsgGC_PickupItemEligibility_Query_DEPRECATED_2 = 6001; // GC => clients
  120. // Leveling Weapons
  121. k_EMsgGC_IncrementKillCountAttribute_DEPRECATED = 6100; // client => GC (a player killed) (deprecated: moved to econ)
  122. k_EMsgGC_IncrementKillCountResponse_DEPRECATED = 6101; // GC => client (deprecated: moved to econ)
  123. //
  124. // Coop matchmaking
  125. //
  126. //k_EMsgGCGameMatchSignOut= 6204;
  127. //k_EMsgGCGameMatchSignOutResponse = 6205;
  128. //k_EMsgGCJoinChatChannel = 6209;
  129. //k_EMsgGCJoinChatChannelResponse = 6210;
  130. //k_EMsgGCLeaveChatChannel = 6211;
  131. //k_EMsgGCChatMessage = 6212;
  132. //k_EMsgGCOtherJoinedChannel = 6213;
  133. //k_EMsgGCOtherLeftChannel = 6214;
  134. k_EMsgGCCreateOrUpdateParty = 6233; // sent from party leader to GC to create party, and/or start/stop the search
  135. //k_EMsgGCConnectedPlayers = 6234;
  136. k_EMsgGCAbandonCurrentGame = 6235;
  137. //k_EMsgGCStopFindingMatch = 6236;
  138. k_EMsgForceSOCacheResend = 6237;
  139. k_EMsgGCRequestChatChannelList = 6260;
  140. k_EMsgGCRequestChatChannelListResponse = 6261;
  141. k_EMsgGCReadyUp = 6270; // sent to acknowledge lobby readiness
  142. k_EMsgGCKickedFromMatchmakingQueue = 6271; // player has been removed from the matchmaking queue (for not readying up)
  143. k_EMsgGCLeaverDetected = 6272; // sent from server to GC when a player has been AFK/disconnected too long
  144. k_EMsgGCLeaverDetectedResponse = 6287;
  145. // Removed
  146. // k_EMsgGCPlayerFailedToConnect = 6288; // Response message added later as 6520 below
  147. k_EMsgGCExitMatchmaking = 6289;
  148. //k_EMsgGCAdjustMatchSearchCriteria = 6290;
  149. k_EMsgGCAcceptInvite = 6291;
  150. k_EMsgGCAcceptInviteResponse = 6292;
  151. k_EMsgGCMatchmakingProgress = 6293;
  152. k_EMsgGCMvMVictoryInfo = 6294;
  153. k_EMsgGCGameServerMatchmakingStatus = 6295;
  154. k_EMsgGCCreateOrUpdatePartyReply = 6296; // GC -> client, to acknowledge party change request
  155. k_EMsgGCMvMVictory = 6297; // game server -> GC, report MvM Victory
  156. k_EMsgGCMvMVictoryReply = 6298; // GC -> game server, acknowledge of recieving MvM Victory
  157. k_EMsgGCGameServerKickingLobby = 6299; // Game server is finished running match, please destroy lobby.
  158. // Reply message added later as 6521
  159. k_EMsgGCLeaveGameAndPrepareToJoinParty = 6300; // GC -> client. Disconnect from the server and go to the lobby UI; I'm putting you in a party
  160. // Deprecated, see PlayerAbandonedMatch
  161. // k_EMsgGCRemovePlayerFromLobby = 6301; // Game server wants this player removed from the lobby.
  162. // Response added later as 6514 below
  163. // Deprecated
  164. // k_EMsgGCSetLobbySafeToLeave = 6302; // Game server indicates that all players in the lobby are safe to leave
  165. k_EMsgGC_UpdatePeriodicEvent = 6400; // game server => GC
  166. k_EMsgGC_DuckLeaderboard_IndividualUpdate = 6401; // Client -> GC
  167. k_EMsgGC_Client2GCEconPreviewDataBlockRequest = 6402;
  168. k_EMsgGC_Client2GCEconPreviewDataBlockResponse = 6403;
  169. k_EMsgGC_ClientVerificationChallenge = 6500; // GC -> client
  170. k_EMsgGC_ClientVerificationChallengeResponse = 6501; // client -> GC
  171. k_EMsgGC_ClientVerificationVerboseResponse = 6502; // client -> GC
  172. k_EMsgGC_ClientSetItemSlotAttribute = 6503; // client -> GC
  173. // k_EMsgGC_PlayerSkillRating_Adjustment = 6504; // game server -> GC
  174. k_EMsgGC_War_IndividualUpdate = 6505; // game server -> GC
  175. k_EMsgGC_War_JoinWar = 6506; // client -> GC
  176. k_EMsgGC_War_RequestGlobalStats = 6507; // client -> GC
  177. k_EMsgGC_War_GlobalStatsResponse = 6508; // GC -> client
  178. k_EMsgGC_WorldItemPlacement_Attribute = 6510; //
  179. k_EMsgGC_WorldItemPlacement_Update = 6511; // client -> GC
  180. k_EMsgGC_Match_Result = 6512; // game server -> GC. Response message added later as 6520 below
  181. k_EMsgGCVoteKickPlayerRequest = 6513; // game server -> GC
  182. k_EMsgGCVoteKickPlayerRequestResponse = 6514; // GC -> game server
  183. k_EMsgGC_DailyCompetitiveStatsRollup = 6516; // game server -> GC
  184. k_EMsgGC_DailyCompetitiveStatsRollup_Response = 6517; // GC -> game server
  185. k_EMsgGC_WorldStatusBroadcast = 6518; // GC -> client
  186. k_EMsgGC_ReportPlayer = 6519; // client -> GC
  187. k_EMsgGC_Match_ResultResponse = 6520; // GC -> game server. Response message for 6512 above
  188. k_EMsgGCGameServerKickingLobbyResponse = 6521; // GC -> game server. Response message for 6299 above
  189. k_EMsgGCPlayerLeftMatch = 6522; // game server -> GC, a player left this match
  190. k_EMsgGCPlayerLeftMatchResponse = 6523; // GC -> game server. Response message for above
  191. k_EMsgGCRequestMatchMakerStats = 6524; // Client -> GC. Request for the below message
  192. k_EMsgGCMatchMakerStatsResponse = 6525; // GC -> Client. Response to above message
  193. k_EMsgGCMatchHistoryLoad = 6526; // Client -> GC.
  194. k_EMsgGC_AcknowledgeXP = 6527; // Client -> GC. Acknowledge pending XP
  195. k_EMsgGCDataCenterPing_Update = 6528; // client -> GC.
  196. k_EMsgGC_NotificationAcknowledge = 6529; // Client -> GC. Acknowledge notifications
  197. k_EMsgGC_NotificationAcknowledgeReply = 6530; // GC -> Client. Let client know if we've received the acknowledgement
  198. k_EMsgGC_KickPlayerFromLobby = 6531; // GC -> game server. Tell the server to kick a player
  199. // Rematch is deprecated by NewMatchForLobby stuff
  200. // k_EMsgGC_RematchRequest = 6532; // game server -> GC. Request a rematch
  201. // k_EMsgGC_RematchRequestResponse = 6533; // GC -> game server
  202. k_EMsgGC_SurveyQuestionRequest = 6534; // GC -> Client. Ask the client to fill out a survey
  203. k_EMsgGC_SurveyQuestionResponse = 6535; // Client -> GC. Client response to the request
  204. k_EMsgGC_TFClientInit = 6536; // Client -> GC. Clients send this in response to
  205. // ClientWelcome with initial data such as language and
  206. // version.
  207. k_EMsgGC_NewMatchForLobbyRequest = 6537; // Game server -> GC.
  208. k_EMsgGC_NewMatchForLobbyResponse = 6538; // GC -> Game server
  209. k_EMsgGC_ChangeMatchPlayerTeamsRequest = 6539; // Game server -> GC.
  210. k_EMsgGC_ChangeMatchPlayerTeamsResponse = 6540; // GC -> Game server
  211. k_EMsgGCPlayerVoteKickedAfterLeavingMatch = 6551; // game server -> GC, a player was votekicked after they left a match
  212. k_EMsgGCPlayerVoteKickedAfterLeavingMatchResponse = 6552; // GC -> game server. Response message for above
  213. // Development only messages
  214. k_EMsgGCDev_GrantWarKill = 10001; //War kill tracking. No longer in use
  215. };
  216. //
  217. // k_EMsgGCTFGoldenWrenchBroadcast
  218. //
  219. message CMsgTFGoldenWrenchBroadcast
  220. {
  221. optional int32 wrench_number = 1; // number of the deleted wrench
  222. optional bool deleted = 2; // true if the wrench was deleted
  223. optional string user_name = 3; // name of the user who deleted the wrench
  224. };
  225. //
  226. // k_EMsgGCTFSaxxyBroadcast
  227. //
  228. message CMsgTFSaxxyBroadcast
  229. {
  230. optional int32 category_number = 1; // number of the deleted wrench
  231. optional string user_name = 2; // name of the user who deleted the wrench
  232. };
  233. //
  234. // k_EMsgGCTFSpecificItemBroadcast
  235. //
  236. message CMsgGCTFSpecificItemBroadcast
  237. {
  238. optional uint32 item_def_index = 1;
  239. optional bool was_destruction = 2; // true if this item was destroyed, false if a new one was created
  240. optional string user_name = 3; // name of the user who deleted the wrench
  241. };
  242. //
  243. // k_EMsgGC_WorldStatusBroadcast
  244. //
  245. // This is the global heartbeat the GC sends to clients periodically. It should only contain live data that clients need
  246. // to always be aware of, such as used on the global menu or to control global client state.
  247. //
  248. // I am obliged to mention, due to a certain email thread, that once TF is making better use of its WebAPI, this would
  249. // be better served as a GetWorldStatus call clients can scrape, to take full advantage of caching and so on.
  250. // Fletcher bloviated on this fact.
  251. //
  252. // !! Consider updating ITFGlobalStatus::GetWorldStatus when you change this
  253. message CMsgTFWorldStatus
  254. {
  255. optional bool beta_stress_test_event_active = 1 [ default = false ];
  256. };
  257. //
  258. // CTFDuelSummary
  259. //
  260. message CSOTFDuelSummary
  261. {
  262. optional uint32 account_id = 1 [ (key_field) = true ];
  263. optional uint32 duel_wins = 2;
  264. optional uint32 duel_losses = 3;
  265. optional uint32 last_duel_account_id = 4;
  266. optional uint32 last_duel_timestamp = 5;
  267. optional uint32 last_duel_status = 6;
  268. };
  269. //
  270. // CTFMapContribution
  271. //
  272. message CSOTFMapContribution
  273. {
  274. optional uint32 account_id = 1 [ (key_field) = true ];
  275. optional uint32 def_index = 2 [ (key_field) = true ];
  276. optional uint32 contribution_level = 3;
  277. };
  278. //
  279. // CMsgTFVoteKickBanPlayer
  280. //
  281. message CMsgTFVoteKickBanPlayer
  282. {
  283. optional uint32 account_id_subject = 1;
  284. optional uint32 kick_reason = 2;
  285. };
  286. //
  287. // CMsgTFVoteKickBanPlayerResult
  288. //
  289. message CMsgTFVoteKickBanPlayerResult
  290. {
  291. optional uint32 account_id_initiator = 1;
  292. optional uint32 account_id_subject = 2;
  293. optional uint32 kick_reason = 3;
  294. optional bool kick_successful = 4;
  295. optional uint32 num_yes_votes = 5;
  296. optional uint32 num_no_votes = 6;
  297. optional uint32 num_possible_votes = 7;
  298. };
  299. //
  300. // CMsgTFFreeTrialChooseMostHelpfulFriend
  301. //
  302. message CMsgTFFreeTrialChooseMostHelpfulFriend
  303. {
  304. optional uint32 account_id_friend = 1;
  305. };
  306. //
  307. // CMsgTFRequestTF2Friends
  308. //
  309. message CMsgTFRequestTF2Friends
  310. {
  311. repeated uint32 account_ids = 1;
  312. };
  313. //
  314. // CMsgTFRequestTF2FriendsResponse
  315. //
  316. message CMsgTFRequestTF2FriendsResponse
  317. {
  318. repeated uint32 account_ids = 1;
  319. };
  320. //
  321. // CSOTFPlayerInfo
  322. //
  323. message CSOTFPlayerInfo
  324. {
  325. optional uint32 num_new_users_helped = 1;
  326. // optional bool trial_account = 2 [ default = false ]; // DEPRECATED
  327. };
  328. //
  329. // k_EMsgGCFreeTrial_ThankedBySomeone
  330. //
  331. message CMsgTFThankedBySomeone
  332. {
  333. optional uint64 thanker_steam_id = 1;
  334. };
  335. //
  336. // k_EMsgGCFreeTrial_ThankedSomeone
  337. //
  338. message CMsgTFThankedSomeone
  339. {
  340. };
  341. //
  342. // k_EMsgGCFreeTrial_ConvertedToPremium
  343. //
  344. message CMsgTFFreeTrialConvertedToPremium
  345. {
  346. };
  347. // k_EMsgGCSaxxy_Awarded
  348. message CMsgSaxxyAwarded
  349. {
  350. optional uint32 category = 1;
  351. repeated string winner_names = 2;
  352. };
  353. //
  354. // CMsgReplaySubmitContestEntry
  355. //
  356. message CMsgReplaySubmitContestEntry
  357. {
  358. optional string youtube_url = 1;
  359. optional uint32 category = 2;
  360. };
  361. //
  362. // CMsgReplaySubmitContestEntryResponse
  363. //
  364. message CMsgReplaySubmitContestEntryResponse
  365. {
  366. optional bool success = 1;
  367. };
  368. //
  369. // CReplayCachedContestData
  370. // Tom Bui: stored in memcached by account id
  371. //
  372. message CReplayCachedContestData
  373. {
  374. optional fixed32 timestamp = 1;
  375. optional uint32 num_votes_last_day = 2;
  376. repeated uint32 video_entry_ids = 3;
  377. optional uint32 num_flags_last_day = 4;
  378. };
  379. //=============================================================================
  380. // Coaching
  381. // k_EMsgGCCoaching_AddToCoaches
  382. message CMsgTFCoaching_AddToCoaches
  383. {
  384. };
  385. // k_EMsgGCCoaching_RemoveFromCoaches
  386. message CMsgTFCoaching_RemoveFromCoaches
  387. {
  388. };
  389. // k_EMsgGCCoaching_FindCoach
  390. message CMsgTFCoaching_FindCoach
  391. {
  392. optional uint32 account_id_friend_as_coach = 1;
  393. // @todo fill with criteria to match coach?
  394. };
  395. // k_EMsgGCCoaching_FindCoachResponse
  396. message CMsgTFCoaching_FindCoachResponse
  397. {
  398. optional bool found_coach = 1;
  399. optional uint32 num_likes = 2;
  400. optional string coach_name = 3;
  401. };
  402. // k_EMsgGCCoaching_AskCoach
  403. message CMsgTFCoaching_AskCoach
  404. {
  405. optional uint32 account_id_student = 1;
  406. optional bool student_is_friend = 2;
  407. };
  408. // k_EMsgGCCoaching_AskCoachResponse
  409. message CMsgTFCoaching_AskCoachResponse
  410. {
  411. optional bool accept_coaching_assignment = 1;
  412. };
  413. // k_EMsgGCCoaching_CoachJoinGame
  414. message CMsgTFCoaching_CoachJoinGame
  415. {
  416. optional bool join_game = 1;
  417. optional uint32 server_address = 2;
  418. optional uint32 server_port = 3;
  419. optional uint32 account_id_student = 4;
  420. };
  421. // k_EMsgGCCoaching_CoachJoining
  422. message CMsgTFCoaching_CoachJoining
  423. {
  424. optional uint32 account_id_coach = 1;
  425. optional uint32 account_id_student = 2;
  426. };
  427. // k_EMsgGCCoaching_CoachJoined
  428. message CMsgTFCoaching_CoachJoined
  429. {
  430. optional uint32 account_id_coach = 1;
  431. };
  432. // k_EMsgGCCoaching_LikeCurrentCoach
  433. message CMsgTFCoaching_LikeCurrentCoach
  434. {
  435. optional bool like_coach = 1;
  436. };
  437. // k_EMsgGCCoaching_RemoveCurrentCoach
  438. message CMsgTFCoaching_RemoveCurrentCoach
  439. {
  440. optional uint32 account_id_coach = 1;
  441. };
  442. // End Coaching
  443. //=============================================================================
  444. //=============================================================================
  445. // Quickplay
  446. // k_EMsgGC_QP_ScoreServers
  447. message CMsgTFQuickplay_ScoreServers
  448. {
  449. message ServerInfo
  450. {
  451. optional uint32 server_address = 1;
  452. optional uint32 server_port = 2;
  453. optional uint32 num_users = 3; // number of users the server is reporting to us
  454. optional uint64 steam_id = 4;
  455. optional uint32 max_users = 5; // max number of users the server reported
  456. optional float user_score = 6; // what the client scored the server based on ping, preferences, etc
  457. };
  458. repeated ServerInfo servers = 1; // a list of servers
  459. };
  460. // k_EMsgGC_QP_ScoreServersResponse
  461. message CMsgTFQuickplay_ScoreServersResponse
  462. {
  463. message ServerInfo
  464. {
  465. optional uint32 server_address = 1;
  466. optional uint32 server_port = 2;
  467. optional float total_score = 3;
  468. optional uint64 steam_id = 4;
  469. optional uint32 options_score = 5;
  470. };
  471. repeated ServerInfo servers = 1; // list of servers
  472. };
  473. // k_EMsgGC_QP_PlayerJoining
  474. message CMsgTFQuickplay_PlayerJoining
  475. {
  476. optional uint32 account_id = 1;
  477. };
  478. // End Quickplay
  479. //=============================================================================
  480. //=============================================================================
  481. // GameServer Auth
  482. // k_EMsgGC_GameServer_LevelInfo
  483. message CMsgGC_GameServer_LevelInfo
  484. {
  485. optional bool level_loaded = 1;
  486. optional string level_name = 2;
  487. };
  488. // k_EMsgGC_GameServer_AuthChallenge
  489. message CMsgGC_GameServer_AuthChallenge
  490. {
  491. // challenge string to be md5 hashed
  492. optional string challenge_string = 1;
  493. };
  494. // k_EMsgGC_GameServer_AuthResult
  495. message CMsgGC_GameServer_AuthResult
  496. {
  497. optional bool authenticated = 1;
  498. optional int32 game_server_standing = 2;
  499. optional int32 game_server_standing_trend = 3;
  500. optional bool is_valve_server = 4;
  501. optional string message = 5; // error message to explain failure or success.
  502. };
  503. // k_EMsgGC_GameServer_AuthChallengeResponse
  504. message CMsgGC_GameServer_AuthChallengeResponse
  505. {
  506. optional uint32 game_server_account_id = 1;
  507. optional bytes hashed_challenge_string = 2;
  508. };
  509. // k_EMsgGC_GameServer_CreateIdentity
  510. message CMsgGC_GameServer_CreateIdentity
  511. {
  512. optional uint32 account_id = 1;
  513. };
  514. // k_EMsgGC_GameServer_CreateIdentityResponse
  515. message CMsgGC_GameServer_CreateIdentityResponse
  516. {
  517. optional bool account_created = 1;
  518. optional uint32 game_server_account_id = 2;
  519. optional string game_server_identity_token = 3;
  520. enum EStatus
  521. {
  522. kStatus_GenericFailure = 0;
  523. kStatus_TooMany = -1;
  524. kStatus_NoPrivs = -2;
  525. kStatus_Created = 1;
  526. };
  527. optional EStatus status = 4;
  528. };
  529. // k_EMsgGC_GameServer_List
  530. message CMsgGC_GameServer_List
  531. {
  532. optional uint32 account_id = 1;
  533. };
  534. // k_EMsgGC_GameServer_ListResponse
  535. message CMsgGC_GameServer_ListResponse
  536. {
  537. message GameServerIdentity
  538. {
  539. optional uint32 game_server_account_id = 1;
  540. optional string game_server_identity_token = 2;
  541. optional int32 game_server_standing = 3;
  542. optional int32 game_server_standing_trend = 4;
  543. };
  544. repeated GameServerIdentity owned_game_servers = 1;
  545. };
  546. // k_EMsgGC_GameServer_ResetIdentity
  547. message CMsgGC_GameServer_ResetIdentity
  548. {
  549. optional uint32 game_server_account_id = 1;
  550. };
  551. // k_EMsgGC_GameServer_ResetIdentityResponse
  552. message CMsgGC_GameServer_ResetIdentityResponse
  553. {
  554. optional bool game_server_identity_token_reset = 1;
  555. optional uint32 game_server_account_id = 2;
  556. optional string game_server_identity_token = 3;
  557. };
  558. // k_EMsgGC_GameServer_AckPolicy
  559. message CMsgGC_GameServer_AckPolicy
  560. {
  561. };
  562. // k_EMsgGC_GameServer_AckPolicyResponse
  563. message CMsgGC_GameServer_AckPolicyResponse
  564. {
  565. optional uint32 result = 1;
  566. optional string message = 2;
  567. };
  568. // GameServer Auth
  569. //=============================================================================
  570. // k_EMsgGC_Client_UseServerModificationItem
  571. message CMsgGC_Client_UseServerModificationItem
  572. {
  573. optional uint64 item_id = 1;
  574. };
  575. // k_EMsgGC_Client_UseServerModificationItem_Response
  576. message CMsgGC_Client_UseServerModificationItem_Response
  577. {
  578. enum EServerModificationItemResponse
  579. {
  580. kServerModificationItemResponse_AlreadyInUse = 1;
  581. kServerModificationItemResponse_NotOnAuthenticatedServer = 2;
  582. kServerModificationItemResponse_ServerReject = 3;
  583. kServerModificationItemResponse_InternalError = 4;
  584. kServerModificationItemResponse_EventAlreadyActive = 5;
  585. };
  586. optional EServerModificationItemResponse response_code = 1;
  587. };
  588. enum EServerModificationItemType
  589. {
  590. kGameServerModificationItem_Halloween = 1;
  591. };
  592. // k_EMsgGC_GameServer_UseServerModificationItem
  593. message CMsgGC_GameServer_UseServerModificationItem
  594. {
  595. optional EServerModificationItemType modification_type = 1;
  596. };
  597. // k_EMsgGC_GameServer_UseServerModificationItem_Response
  598. message CMsgGC_GameServer_UseServerModificationItem_Response
  599. {
  600. enum EServerModificationItemServerResponse
  601. {
  602. kServerModificationItemServerResponse_Accepted = 1;
  603. kServerModificationItemServerResponse_NoVoteCalled = 2;
  604. kServerModificationItemServerResponse_VoteFailed = 3;
  605. };
  606. optional EServerModificationItemType modification_type = 1;
  607. optional EServerModificationItemServerResponse server_response_code = 2;
  608. };
  609. // k_EMsgGC_GameServer_ServerModificationItemExpired
  610. message CMsgGC_GameServer_ServerModificationItemExpired
  611. {
  612. optional EServerModificationItemType modification_type = 1;
  613. };
  614. // k_EMsgGC_GameServer_ModificationItemState
  615. message CMsgGC_GameServer_ServerModificationItem
  616. {
  617. optional EServerModificationItemType modification_type = 1;
  618. optional bool active = 2;
  619. };
  620. // Halloween
  621. //=============================================================================
  622. // k_EMsgGC_Halloween_ReserveItem
  623. message CMsgGC_Halloween_ReservedItem
  624. {
  625. // position in the world where the item will spawn
  626. repeated float x = 1;
  627. repeated float y = 2;
  628. repeated float z = 3;
  629. // what type of package is this? where did it spawn? etc.
  630. optional uint32 spawn_meta_info = 7;
  631. };
  632. // k_EMsgGC_Halloween_GrantItem
  633. message CMsgGC_Halloween_GrantItem
  634. {
  635. optional uint32 recipient_account_id = 1;
  636. optional uint32 level_id = 2;
  637. optional bool flagged = 3; // This is ambiguously named on purpose. It means flagged as a cheater (noclipper). Used for logging cheaters in the backend.
  638. };
  639. // k_EMsgGC_Halloween_GrantItemResponse
  640. message CMsgGC_Halloween_GrantItemResponse
  641. {
  642. optional uint32 recipient_account_id = 1;
  643. };
  644. // k_EMsgGC_Halloween_ItemClaimed
  645. message CMsgGC_Halloween_ItemClaimed
  646. {
  647. };
  648. // PVS
  649. //=============================================================================
  650. // k_EMsgGC_PickupItemEligibility_Query
  651. message CMsgGC_PickupItemEligibility_Query
  652. {
  653. optional uint32 account_id = 1;
  654. optional uint32 seconds_ago = 2; // positive, how many seconds ago was the item claimed
  655. };
  656. message CMsgGC_PickupItemEligibility_QueryResponse
  657. {
  658. optional uint32 account_id = 1;
  659. optional bool was_eligible = 2;
  660. optional uint32 level_id = 3; // we can't trust the level that the server reports as so we have clients vote
  661. };
  662. //
  663. // CSOTFPartyMember
  664. //
  665. message CSOTFPartyMember
  666. {
  667. // optional fixed64 steamid = 1; // SteamID of player
  668. optional bool owns_ticket = 2; // Do they have a ticket in their inventory?
  669. optional uint32 completed_missions = 3; // Which missions have they completed (of the currently selected tour)
  670. optional uint32 badge_level = 4; // Level of their badge
  671. optional bool squad_surplus = 5; // Presenting voucher for the team to get "surplus"
  672. // optional float latitude = 6; // approxmimate world location of this player
  673. // optional float longitude = 7;
  674. optional bool is_banned = 8 [ default = false ]; // mark the player as banned for abandoning MannUp mode
  675. optional bool competitive_access = 9; // access to ranked ladder mode
  676. // These two no longer shared with clients in favor of competitive_beta_access flag
  677. // optional bool phone_verified = 10 [ default = false ]; // account is phone verified on Steam
  678. // optional bool two_factor_enabled = 11 [ default = false ]; // two-factor auth
  679. optional uint32 ladder_rank = 12;
  680. optional bool is_low_priority = 13 [ default = false ];
  681. optional uint32 experience = 14;
  682. optional uint32 skillrating = 15 [ default = 10000 ];
  683. };
  684. enum TF_MatchmakingMode
  685. {
  686. TF_Matchmaking_INVALID = 0; // dummy sentinel value
  687. TF_Matchmaking_MVM = 1;
  688. TF_Matchmaking_LADDER = 2;
  689. TF_Matchmaking_CASUAL = 3;
  690. };
  691. enum TF_Matchmaking_WizardStep
  692. {
  693. TF_Matchmaking_WizardStep_INVALID = 0;
  694. TF_Matchmaking_WizardStep_MVM_PLAY_FOR_BRAGGING_RIGHTS = 1;
  695. TF_Matchmaking_WizardStep_MVM_TOUR_OF_DUTY = 2;
  696. TF_Matchmaking_WizardStep_MVM_CHALLENGE = 3;
  697. TF_Matchmaking_WizardStep_SEARCHING = 4;
  698. TF_Matchmaking_WizardStep_LADDER = 5;
  699. TF_Matchmaking_WizardStep_CASUAL = 6;
  700. }
  701. //
  702. // Search criteria
  703. //
  704. message CMsgMatchSearchCriteria
  705. {
  706. optional TF_MatchmakingMode matchmaking_mode = 7;
  707. optional bool late_join_ok = 5; // Is my party willing to join late?
  708. optional uint32 custom_ping_tolerance = 13 [ default = 0 ]; // 0 == no custom tolerance
  709. // MvM options
  710. //LEGACY: optional string challenge = 4; // Requested pop file (empty string for "any")
  711. optional string mvm_mannup_tour = 10; // Selected Mann Up tour. (Mann UP only)
  712. repeated string mvm_missions = 9; // Pop files we are willing to play. NOTE: An empty list means "no change", it doesn't mean "none". We pass "invalid" to indicate an empty list
  713. optional bool play_for_bragging_rights = 6; // Are we going to play for bragging rights? If false, we are just playing for fun
  714. // Quickplay options
  715. optional uint32 quickplay_game_type = 8; // eQuickplayGameType
  716. // Ladder
  717. optional uint32 ladder_game_type = 11; //
  718. // Casual
  719. optional CMsgCasualMatchmakingSearchCriteria casual_criteria = 12; // Search criteria for casual games
  720. };
  721. //
  722. // CMsgCasualMatchmakingSearchCriteria
  723. //
  724. message CMsgCasualMatchmakingSearchCriteria
  725. {
  726. repeated fixed32 selected_maps_bits = 3; // Bitfield of selected maps from the "master_maps_list" in _maps.txt
  727. }
  728. //
  729. // Message used for these purposes:
  730. // - Create a party to start matchmaking
  731. // - Update match search criteria or party properties
  732. // - Leave the queue, but keep the party intact
  733. // - Adjust whether a particular player in the lobby wants to cash in their squad surplus voucher
  734. message CMsgCreateOrUpdateParty
  735. {
  736. optional CMsgMatchSearchCriteria search_criteria = 1;
  737. //optional bool search_active = 2;
  738. optional fixed64 steam_lobby_id = 3;
  739. optional bool squad_surplus = 4;
  740. optional TF_Matchmaking_WizardStep wizard_step = 5;
  741. optional uint32 client_version = 6 [ default = 1225 ];
  742. };
  743. message CMsgCreateOrUpdatePartyReply
  744. {
  745. optional uint32 result = 1; // EResult code
  746. optional string message = 2; // Diagnostic
  747. optional TF_Matchmaking_WizardStep wizard_step = 3; // current wizard step
  748. }
  749. //
  750. // CSOTFParty
  751. //
  752. message CSOTFParty
  753. {
  754. optional uint64 party_id = 1 [ (key_field) = true ];
  755. optional fixed64 leader_id = 2;
  756. repeated fixed64 member_ids = 3;
  757. repeated CSOTFPartyMember members = 13;
  758. // optional uint32 game_mode = 4;
  759. repeated fixed64 pending_invites = 5;
  760. optional uint64 associated_lobby_id = 35;
  761. enum State
  762. {
  763. UI = 0;
  764. FINDING_MATCH = 1;
  765. IN_MATCH = 2;
  766. AWAITING_RESERVATION_CONFIRMATION = 3;
  767. }
  768. optional State state = 6;
  769. optional TF_Matchmaking_WizardStep wizard_step = 29;
  770. optional uint32 started_matchmaking_time = 7;
  771. // optional uint32 searching_players = 8; // how many players are currently searching in the matchmaking system
  772. repeated uint32 searching_players_by_group = 10; // how many players are currently searching in the matchmaking system
  773. optional fixed64 steam_lobby_id = 27; // Steam lobby associated with this party
  774. //
  775. // Search criteria
  776. //
  777. optional TF_MatchmakingMode matchmaking_mode = 30; // high level search mode.
  778. optional bool search_late_join_ok = 23; // Is my party willing to join late?
  779. optional string search_mvm_mannup_tour = 32; // Selected Mann Up tour. (Mann UP only)
  780. repeated string search_mvm_missions = 31; // MvM: Pop files we are willing to play. list must not be empty, if we are in MvM mode!
  781. optional bool search_play_for_bragging_rights = 26; // Do we want to play for loot?
  782. optional uint32 search_quickplay_game_type = 28; // eQuickplayGameType
  783. optional uint32 search_ladder_game_type = 33; //
  784. optional CMsgCasualMatchmakingSearchCriteria search_casual = 34;
  785. optional uint32 custom_ping_tolerance = 36;
  786. //
  787. // Search status
  788. //
  789. // optional uint32 matching_players = 14; // how many players are currently matching us
  790. // optional float search_fraction = 15; // fraction of search range (expands over time)
  791. optional uint32 matchmaking_ban_time = 18; // party can't matchmake until this time
  792. optional uint32 matchmaking_ban_account_id = 19; // accountID of the player preventing matchmaking
  793. optional uint32 matchmaking_low_priority_time = 20; // if set, any official matchmaking mode will treat this party as low priority (superceded by prevent_match_until_date)
  794. };
  795. //
  796. // CSOTFPartyInvite - sent from the GC to possible new party member
  797. //
  798. message CSOTFPartyInvite
  799. {
  800. message PartyMember
  801. {
  802. optional string name = 1;
  803. optional fixed64 steam_id = 2;
  804. optional uint32 avatar = 3;
  805. };
  806. optional uint64 group_id = 1 [ (key_field) = true ];
  807. optional fixed64 sender_id = 2;
  808. optional string sender_name = 3;
  809. repeated PartyMember members = 4;
  810. };
  811. enum TF_GC_GameState
  812. {
  813. TF_GC_GAMESTATE_STATE_INIT = 0;
  814. TF_GC_GAMESTATE_WAIT_FOR_PLAYERS_TO_LOAD = 1;
  815. TF_GC_GAMESTATE_STRATEGY_TIME = 3;
  816. TF_GC_GAMESTATE_GAME_IN_PROGRESS = 5;
  817. TF_GC_GAMESTATE_POST_GAME = 6;
  818. TF_GC_GAMESTATE_DISCONNECT = 7;
  819. TF_GC_GAMESTATE_LAST = 8; // keep this as the last index
  820. }
  821. enum TF_GC_TEAM
  822. {
  823. TF_GC_TEAM_DEFENDERS = 0; // Mann (used as red in ladder games)
  824. TF_GC_TEAM_INVADERS = 1; // Machine (used as blue in ladder games)
  825. TF_GC_TEAM_BROADCASTER = 2;
  826. TF_GC_TEAM_SPECTATOR = 3;
  827. TF_GC_TEAM_PLAYER_POOL = 4; // players that haven't been assign to a team yet
  828. TF_GC_TEAM_NOTEAM = 5;
  829. }
  830. //enum TF_CM_PICK
  831. //{
  832. // TF_CM_RANDOM = 0;
  833. // TF_CM_GOOD_GUYS = 1;
  834. // TF_CM_BAD_GUYS = 2;
  835. //}
  836. enum TFMatchLeaveReason
  837. {
  838. TFMatchLeaveReason_UNSPECIFIED = 0; // No idea
  839. TFMatchLeaveReason_VOTE_KICK = 1; // Vote kicked by teammates
  840. TFMatchLeaveReason_IDLE = 2; // Idle kick
  841. TFMatchLeaveReason_ADMIN_KICK = 3; // Admin kick
  842. TFMatchLeaveReason_AWOL = 4; // Player left the match and did not return in time
  843. TFMatchLeaveReason_NO_SHOW = 5; // Player never showed up
  844. TFMatchLeaveReason_GC_REMOVED = 6; // Dropped via GC (e.g. refused to rejoin, removed themselves from the lobby, but wasn't clear to leave)
  845. };
  846. enum TFLobbyReadyState
  847. {
  848. TFLobbyReadyState_UNDECLARED = 0;
  849. TFLobbyReadyState_ACCEPTED = 1;
  850. TFLobbyReadyState_DECLINED = 2;
  851. }
  852. //enum TFBotDifficulty
  853. //{
  854. // BOT_DIFFICULTY_EASY = 0;
  855. // BOT_DIFFICULTY_MEDIUM = 1;
  856. // BOT_DIFFICULTY_HARD = 2;
  857. // BOT_DIFFICULTY_UNFAIR = 3;
  858. //};
  859. //
  860. //enum TFGameVersion
  861. //{
  862. // GAME_VERSION_CURRENT = 0;
  863. // GAME_VERSION_STABLE = 1;
  864. //};
  865. //
  866. // CTFLobbyMember
  867. //
  868. message CTFLobbyMember
  869. {
  870. enum ConnectState
  871. {
  872. INVALID = 0; // Dummy / sentinel value used for debugging
  873. RESERVATION_PENDING = 1; // GC is telling gameserver it wants to add a player, and is asking gameserver to acknowledge
  874. RESERVED = 2; // Gameserver has acknowledged reservation
  875. CONNECTED = 3; // Is currently connected (and joined through matchmaking)
  876. //CONNECTED_AD_HOC = 4; // Connected ad-hoc.
  877. DISCONNECTED = 5; // Connected at somepoint via match making but is no longer connected
  878. };
  879. optional fixed64 id = 1 [ (key_field) = true ];
  880. optional TF_GC_TEAM team = 3;
  881. // optional bool connected_to_game_server = 4;
  882. optional ConnectState connect_state = 13;
  883. optional string name = 6;
  884. // Deprecated, not used by clients or servers, moved to memcache object
  885. // optional float latitude = 8; // approxmimate world location of this player
  886. // optional float longitude = 9;
  887. // optional bool ready = 10; // Is this player ready
  888. optional TFLobbyReadyState ready_state = 11;
  889. optional uint64 party_id = 12;
  890. optional bool squad_surplus = 14;
  891. optional uint32 badge_level = 15;
  892. optional uint32 skillrating = 16 [ default = 10000 ];
  893. optional uint32 last_connect_time = 17; // last time player was online
  894. // Deprecated, abandons are handled by the gameserver match management logic now
  895. // optional bool quitting_results_in_penalty = 18; // If true, then if the player quits, it wil result in a penalty of some sort.
  896. };
  897. //
  898. // CTFLobbyGCPrivate
  899. //
  900. // Data stored in the lobby object that is private to the GC
  901. // it will not be networked to clients
  902. //
  903. //message CTFLobbyGCPrivate
  904. //{
  905. // optional string search_key = 1; // key used to find servers, optional
  906. // optional string pass_key = 2; // key used to find lobbies, optional
  907. //}
  908. /// cosmetic details for radiant/dire
  909. //message CLobbyTeamDetails
  910. //{
  911. // optional string team_name = 1;
  912. // optional string team_logo = 2;
  913. //}
  914. // pending player report that is waiting for a matchID
  915. message CLobbyPendingPlayerReport
  916. {
  917. optional uint32 account_id = 1;
  918. optional fixed32 date = 2;
  919. }
  920. //
  921. // Match sign out message (deprecated)
  922. //
  923. // message CMsgGameMatchSignOut
  924. // {
  925. // // Team definition
  926. // message CTeam
  927. // {
  928. // // Player on a team
  929. // message CPlayer
  930. // {
  931. // optional fixed64 account_id = 1;
  932. // optional uint32 fake_client_id = 2;
  933. // optional uint32 hero_id = 3;
  934. // repeated uint32 items = 4;
  935. // optional uint32 gold = 5;
  936. // optional uint32 kills = 6;
  937. // optional uint32 deaths = 7;
  938. // optional uint32 assists = 8;
  939. // optional uint32 leaver_status = 9;
  940. // optional uint32 last_hits = 10;
  941. // optional uint32 denies = 11;
  942. // optional uint32 gold_per_min = 12;
  943. // optional uint32 xp_per_minute = 13;
  944. // optional uint32 gold_spent = 14;
  945. // optional uint32 level = 15;
  946. // optional uint32 hero_damage = 16;
  947. // optional uint32 tower_damage = 17;
  948. // optional uint32 hero_healing = 18;
  949. // optional uint32 time_last_seen = 19;
  950. // optional uint32 support_ability_value = 20;
  951. // optional uint64 party_id = 21;
  952. // optional bool idle_in_fountain = 22;
  953. // optional bool logged_in_elsewhere = 23;
  954. // optional float scaled_kills = 24;
  955. // optional float scaled_deaths = 25;
  956. // optional float scaled_assists = 26;
  957. // };
  958. //
  959. // repeated CPlayer players = 1;
  960. // }
  961. //
  962. // optional uint64 match_id = 1 [ (key_field) = true ];
  963. // optional uint32 duration = 2;
  964. // optional bool good_guys_win = 3;
  965. // optional fixed32 date = 4;
  966. // repeated uint32 num_players = 5; // Number of players per-team
  967. // repeated CTeam teams = 6; // Two teams per match
  968. // optional string computer_name = 7; // Which computer submitted stats
  969. // repeated uint32 tower_status = 8; // Which towers were destroyed per-team
  970. // repeated uint32 barracks_status = 9; // Which barracks were destroyed per-team
  971. // optional uint32 cluster = 10; // sv_cluster setting, this is the data center cluster the game was played on
  972. // optional string server_addr = 11; // string representing the server address
  973. // optional uint32 first_blood_time = 12;
  974. // optional float game_balance = 13; // average team balance over the game - 0.0 = completely balanced 1.0 = complete imbalance (should be impossible)
  975. // };
  976. //
  977. // CSOTFGameServerLobby
  978. //
  979. message CSOTFGameServerLobby
  980. {
  981. optional uint64 lobby_id = 1 [ (key_field) = true ];
  982. repeated CTFLobbyMember members = 2; // members assigned to this lobby
  983. // Moved to GC-only CTFMemcachedLobby
  984. // repeated CTFLobbyMember left_members = 7; // members who purposefully quit the lobby (declined the rejoin request or clicked the 'finish game' button at game end)
  985. optional fixed64 leader_id = 11;
  986. optional fixed64 server_id = 6 [default = 0 ]; // game server assigned to this lobby
  987. //optional uint32 game_mode = 3;
  988. repeated fixed64 pending_invites = 10;
  989. enum State
  990. {
  991. UNKNOWN = 0; // Broken/bad lobby state. Lobbies can be in this state if we go down and restore from
  992. // memcache during their setup, for instance
  993. SERVERSETUP = 1; // selecting a server and getting it ready
  994. RUN = 2; // server is ready, connect to it and play!
  995. // POSTGAME = 3; // game is over, server is uploading stats, will signal when its free
  996. // READYUP = 4; // waiting for all players to ready up
  997. // NOTREADY = 5; // lobby wasn't ready
  998. // SERVERASSIGN = 6; // selecting a server for a MATCH lobby, occurs before ready up
  999. }
  1000. optional State state = 4 [ default = UNKNOWN ];
  1001. optional string connect = 5; // connect string usually something like "ip:port", only valid during state RUN
  1002. //REMOVED optional string search_key = 8 [ (hidden) = true ]; // key used to find servers, optional
  1003. // optional CTFLobbyGCPrivate gc_private = 9 [ (hidden) = true ]; // private lobby data on the GC not sent to clients or servers
  1004. enum LobbyType
  1005. {
  1006. INVALID = -1;
  1007. MATCH = 0; // lobby was created by the matchmaking system
  1008. PRACTICE = 1; // practice lobby with members chosen by the players
  1009. TOURNAMENT = 2; // special type of practice lobby where we record stats and only allow tournament flagged players in
  1010. TUTORIAL = 3;
  1011. }
  1012. optional LobbyType lobby_type = 12;
  1013. optional bool allow_cheats = 13;
  1014. //optional bool fill_with_bots = 14;
  1015. //optional bool intro_mode = 15;
  1016. optional string game_name = 16; // practice/tournament lobbies can have custom game names (shown in the Watch tab, etc.)
  1017. //repeated CLobbyTeamDetails team_details = 17; // cosmetic details for radiant/dire
  1018. //optional uint32 tutorial_lesson = 18; // tutorial lobbies set the lesson to start on
  1019. //optional uint32 tournament_id = 19; // If this is a tournament game, which tournament
  1020. //optional uint32 tournament_game_id = 20;// If this is a tournament game, which game in the tournament
  1021. optional uint32 server_region = 21 [ default = 0 ]; // region to use for the server, 0 means automatic using geo location avg distance
  1022. optional TF_GC_GameState game_state = 22; // This isn't set by the lobby, but is networked up from the gameserver when it changes
  1023. // hidden since we don't need to network to clients, they get it via packet entities
  1024. optional uint32 num_spectators = 23; // sent up from the game server
  1025. //optional uint32 tower_state = 24; // bitfield describing destroyed state of the towers in the map
  1026. //optional uint32 matchgroup = 25; // DEPRECATED. No longer used. Use match_group below instead.
  1027. optional float readyup_remaining_time = 26; // remaining time left in READYUP in seconds
  1028. // DEPRECATED, handled by gameserver management logic now
  1029. // optional bool leaver_detected = 27; // if set, a player has been detected as a leaver. other players can safely abandon without getting a leaver count
  1030. //optional TF_CM_PICK cm_pick = 28 [ default = TF_CM_RANDOM ]; // which team gets to pick first in CM mode
  1031. // repeated CLobbyPendingPlayerReport pending_player_reports = 29 [ (hidden) = true ]; // player feedback reports that are waiting for this lobby's matchID (assigned on match signout)
  1032. optional bool allow_spectating = 31 [ default = true ]; // option for practice games to allow them to show up on the spectator list
  1033. optional uint32 average_rank = 32; // average rank of the players (skillrating in TF)
  1034. optional fixed64 load_game_lobby_id = 33; // if set, the server will try to load a match lobby/save number
  1035. optional uint32 load_game_save_number = 34;
  1036. //optional TFBotDifficulty bot_difficulty = 36 [ default = BOT_DIFFICULTY_MEDIUM ];
  1037. //optional TFGameVersion game_version = 37 [ default = GAME_VERSION_CURRENT ];
  1038. optional string mannup_tour_name = 42; // MvM tour we're playing for bragging rights. (Should not be set if not playing for bragging rights.)
  1039. optional string map_name = 38; // Map we're currently playing
  1040. optional string mission_name = 39; // Challenge we're currently playing
  1041. optional uint32 match_group = 41;
  1042. optional uint64 match_id = 30 [ default = 0 ]; // if this lobby has signed out, this is its matchID
  1043. optional fixed32 replay_salt = 35; // if this lobby has signed out, this is its replay salt
  1044. optional uint32 formed_time = 36; // timestamp of when we created this lobby
  1045. optional uint32 flags = 43; // general bitfield (see tf_matchmaking_shared.h for flags, e.g. LOBBY_FLAG_LOWPRIORITY)
  1046. optional bool late_join_eligible = 44; // If this lobby is entered into the late join system
  1047. // What the proper-size of this match should be, passed from the GC so it doesn't need to be hard-coded on clients
  1048. // per match group.
  1049. // Should be set at match creation time if applicable, but may not be present.
  1050. optional uint32 fixed_match_size = 45;
  1051. enum WarMatch
  1052. {
  1053. NOPE = 0;
  1054. INVADERS_ARE_PYRO = 1;
  1055. INVADERS_ARE_HEAVY = 2;
  1056. };
  1057. optional WarMatch is_war_match = 46 [ default = NOPE ];
  1058. repeated uint32 next_maps_for_vote = 47;
  1059. // When certain actions are taken on the lobby, this is incremented, to determine if server heartbeats are aware of
  1060. // the most recent version.
  1061. optional uint32 lobby_mm_version = 48;
  1062. };
  1063. message CMsgExitMatchmaking
  1064. {
  1065. // This parameter guards a race condition where we ask to leave in parallel with a match being assigned.
  1066. optional bool explicit_abandon = 1;
  1067. // These are an additional guard against the same race condition
  1068. optional uint64 party_id = 2;
  1069. optional uint64 lobby_id = 3;
  1070. };
  1071. message CMsgAcceptInvite
  1072. {
  1073. optional uint64 party_id = 1;
  1074. optional fixed64 steamid_lobby = 2;
  1075. optional uint32 client_version = 3 [ default = 1225 ];
  1076. };
  1077. message CMsgAcceptInviteResponse
  1078. {
  1079. optional int32 result_code = 1;
  1080. };
  1081. //
  1082. // CMsgReadyUp - sent to acknowledge lobby readiness
  1083. //
  1084. message CMsgReadyUp
  1085. {
  1086. optional TFLobbyReadyState state = 1;
  1087. };
  1088. // request how many people are searching in each matchgroup
  1089. message CMsgMatchmakingSearchCountRequest
  1090. {
  1091. };
  1092. message CMsgMatchmakingSearchCountResponse
  1093. {
  1094. repeated uint32 searching_players_by_group = 1;
  1095. };
  1096. message CMsgKickedFromMatchmakingQueue
  1097. {
  1098. };
  1099. // Deprecated
  1100. // message CMsgTFPlayerFailedToConnect
  1101. // {
  1102. // repeated fixed64 failed_loaders = 1;
  1103. // };
  1104. //// game client wants to abandon his current game (be removed from the lobby)
  1105. //message CMsgAbandonCurrentGame
  1106. //{
  1107. //};
  1108. //// sent from server to GC when a player has been AFK/disconnected too long
  1109. //message CMsgLeaverDetected
  1110. //{
  1111. // optional fixed64 steam_id = 1;
  1112. // optional uint32 leaver_status = 2; // TFLeaverStatus_t
  1113. //};
  1114. //
  1115. //message CMsgLeaverDetectedResponse
  1116. //{
  1117. // optional uint32 result = 1;
  1118. //};
  1119. // GC Chat
  1120. // for identifying special channel types
  1121. enum ChatChannelType_t
  1122. {
  1123. ChatChannelType_Regional = 0;
  1124. ChatChannelType_Custom = 1;
  1125. ChatChannelType_Party = 2;
  1126. ChatChannelType_Lobby = 3;
  1127. };
  1128. message CMsgTFJoinChatChannel
  1129. {
  1130. optional string persona_name = 1;
  1131. optional string channel_name = 2;
  1132. optional string password = 3;
  1133. optional ChatChannelType_t channel_type = 4;
  1134. };
  1135. message CMsgTFLeaveChatChannel
  1136. {
  1137. optional string channel_name = 1;
  1138. };
  1139. message CMsgTFJoinChatChannelResponse
  1140. {
  1141. message ChatMember
  1142. {
  1143. optional fixed64 steam_id = 1;
  1144. optional string persona_name = 2;
  1145. };
  1146. optional uint32 response = 1;
  1147. optional string channel_name = 2;
  1148. optional fixed64 channel_id = 3;
  1149. optional uint32 max_members = 4;
  1150. repeated ChatMember members = 5;
  1151. };
  1152. message CMsgTFOtherJoinedChatChannel
  1153. {
  1154. optional fixed64 channel_id = 1;
  1155. optional string persona_name = 2;
  1156. optional fixed64 steam_id = 3;
  1157. };
  1158. message CMsgTFOtherLeftChatChannel
  1159. {
  1160. optional fixed64 channel_id = 1;
  1161. optional fixed64 steam_id = 2;
  1162. };
  1163. message CMsgTFRequestDefaultChatChannel
  1164. {
  1165. };
  1166. message CMsgTFRequestDefaultChatChannelResponse
  1167. {
  1168. optional string channel_name = 1;
  1169. optional fixed64 channel_id = 2;
  1170. };
  1171. message CMsgTFRequestChatChannelList
  1172. {
  1173. };
  1174. message CMsgTFRequestChatChannelListResponse
  1175. {
  1176. message ChatChannel
  1177. {
  1178. optional string channel_name = 1;
  1179. optional uint32 num_members = 2;
  1180. optional ChatChannelType_t channel_type = 3;
  1181. }
  1182. repeated ChatChannel channels = 1;
  1183. };
  1184. enum ServerMatchmakingState
  1185. {
  1186. ServerMatchmakingState_INVALID = 0; // Dummy value used for sentinel / debugging
  1187. ServerMatchmakingState_NOT_PARTICIPATING = 1;
  1188. ServerMatchmakingState_EMPTY = 2;
  1189. // Running a matchmaking match, have room for late joiners
  1190. ServerMatchmakingState_ACTIVE_MATCH_REQUESTING_LATE_JOIN = 3;
  1191. // Running a matchmaking match
  1192. ServerMatchmakingState_ACTIVE_MATCH = 4;
  1193. };
  1194. //
  1195. // CMsgGameServerMatchmakingStatus - server status and connected players
  1196. //
  1197. message CMsgGameServerMatchmakingStatus
  1198. {
  1199. optional uint32 server_version = 16 [ default = 1225 ];
  1200. optional ServerMatchmakingState matchmaking_state = 1 [ default = ServerMatchmakingState_INVALID ];
  1201. optional TF_MatchmakingMode matchmaking_mode = 2; // Which pool do we want to be in?
  1202. optional string map = 3; // Current map
  1203. optional string tags = 4; // Current tags
  1204. optional uint32 bot_count = 5; // Number of bots
  1205. optional uint32 num_spectators = 6;
  1206. optional uint32 max_players = 7; // Advertised max number of players
  1207. optional uint32 slots_free = 8; // Biggest possible lobby we could accept right now
  1208. optional uint32 server_region = 9; // Region value that matches regions.txt in the GC
  1209. optional float server_loadavg = 10; // current load average
  1210. optional bool server_trusted = 11; // server requests to be put into the trusted pool
  1211. optional bool server_dedicated = 12; // Is this a dedicated server? (As opposed to a listen server)
  1212. optional uint32 strict = 17; // Current value of tf_mm_strict
  1213. enum PlayerConnectState
  1214. {
  1215. INVALID = 0; // Dummy / sentinel value used for debugging
  1216. CONNECTED = 1; // Is currently connected
  1217. RESERVED = 2; // I have a reservation ready for this guy and am acknowledging that you are expecting him
  1218. };
  1219. message Player
  1220. {
  1221. optional fixed64 steam_id = 1;
  1222. optional PlayerConnectState connect_state = 2;
  1223. }
  1224. repeated Player players = 13;
  1225. optional TF_GC_GameState game_state = 14;
  1226. //
  1227. // Particular event that prompted us to send this message, if any
  1228. //
  1229. enum Event
  1230. {
  1231. None = 0;
  1232. MvMVictory = 1;
  1233. MvMDefeat = 2;
  1234. AcknowledgePlayers = 3;
  1235. };
  1236. optional Event event = 15 [ default = None ];
  1237. // MvM metrics, possibly interesting for quality adjustments
  1238. optional uint32 mvm_wave = 18; // Current MvM wave number
  1239. optional uint32 mvm_credits_acquired = 19; // Cash collected
  1240. optional uint32 mvm_credits_dropped = 20; // Cash failed to collect and lost
  1241. // optional uint32 skillrating_force_average = 21; // Servers can force their skillrating average
  1242. // optional uint32 ladder_game_type = 22;
  1243. optional sint32 match_group = 23 [ default = -1 ]; // The current match group. -1 if none. Type sint since it'll be negative often
  1244. // Echo the last lobby version back with our heartbeat. GC uses this to reason about the last update we had a chance
  1245. // to respond to.
  1246. optional uint32 lobby_mm_version = 24;
  1247. };
  1248. ////
  1249. //// CMsgPingListRequest - GC is requesting client to ping some game servers
  1250. ////
  1251. //message CMsgPingListRequest
  1252. //{
  1253. //
  1254. // message Address
  1255. // {
  1256. // required fixed32 ip = 1;
  1257. // required uint32 port = 2;
  1258. // };
  1259. //
  1260. // optional uint32 server_pool = 1; // which pool do these servers belong to?
  1261. // repeated Address servers = 2;
  1262. //};
  1263. //
  1264. ////
  1265. //// CMsgPingListResponse - Client replies with list of servers
  1266. ////
  1267. //message CMsgPingListResponse
  1268. //{
  1269. //
  1270. // message Server
  1271. // {
  1272. // required fixed32 ip = 1;
  1273. // required uint32 port = 2;
  1274. // required uint32 ping_ms = 3; // ping time, in MS
  1275. // };
  1276. //
  1277. // optional uint32 server_pool = 1; // which pool do these servers belong to?
  1278. // repeated Server servers = 2;
  1279. //};
  1280. //
  1281. // k_EMsgGCMatchmakingProgress
  1282. // Server is sending party estimate of wait times, etc
  1283. //
  1284. message CMsgMatchmakingProgress
  1285. {
  1286. optional uint32 avg_wait_time_new = 4; // Average wait time for a new game for people with similar search criteria
  1287. optional uint32 avg_wait_time_join_late = 5; // Average wait time for a late join for people with similar search criteria
  1288. optional uint32 your_wait_time = 6; // Time that we think you have been waiting
  1289. optional uint32 matching_worldwide_searching_players = 8;
  1290. optional uint32 matching_near_you_searching_players = 9;
  1291. optional uint32 total_worldwide_searching_players = 13;
  1292. optional uint32 total_near_you_searching_players = 14;
  1293. optional uint32 matching_worldwide_active_players = 15;
  1294. optional uint32 matching_near_you_active_players = 16;
  1295. optional uint32 total_worldwide_active_players = 17;
  1296. optional uint32 total_near_you_active_players = 18;
  1297. optional uint32 matching_worldwide_empty_gameservers = 19;
  1298. optional uint32 matching_near_you_empty_gameservers = 20;
  1299. optional uint32 total_worldwide_empty_gameservers = 21;
  1300. optional uint32 total_near_you_empty_gameservers = 22;
  1301. optional uint32 urgency_pct = 1;
  1302. };
  1303. //
  1304. // k_EMsgGCMvMVictoryInfo
  1305. //
  1306. // Server is letting players know who got what at the end of MvM
  1307. //
  1308. message CMsgMvMVictoryInfo
  1309. {
  1310. enum GrantReason
  1311. {
  1312. INVALID = 0;
  1313. BADGE_LEVELED = 1;
  1314. SQUAD_SURPLUS = 2;
  1315. MANN_UP = 3;
  1316. HELP_A_NOOB = 4;
  1317. };
  1318. message Item
  1319. {
  1320. optional GrantReason grant_reason = 1; // why are we receiving this?
  1321. optional bytes item_data = 2; // buffer that can be parsed by CEconItem::BParseCreateFromMessage
  1322. optional fixed64 squad_surplus_claimer_steam_id = 3; // for squad surplus, whose voucher is responsible for this?
  1323. };
  1324. message Player
  1325. {
  1326. optional fixed64 steam_id = 1;
  1327. //optional string player_name = 2;
  1328. optional bool badge_granted = 3;
  1329. optional bool badge_progress_updated = 4;
  1330. optional bool badge_leveled = 5;
  1331. optional uint32 badge_level = 6;
  1332. optional uint32 badge_progress_bits = 7;
  1333. repeated Item items = 8;
  1334. optional bool voucher_missing = 9;
  1335. optional uint32 badge_points = 10;
  1336. };
  1337. repeated Player players = 1;
  1338. optional string tour_name = 2;
  1339. optional string mission_name = 3;
  1340. };
  1341. //
  1342. // CGCMsgTFHelloResponse
  1343. //
  1344. message CGCMsgTFHelloResponse
  1345. {
  1346. optional uint32 version_check = 1;
  1347. repeated uint64 version_checksum = 2;
  1348. optional uint32 version_verbose = 3;
  1349. };
  1350. //
  1351. // CGCMsgTFSync
  1352. //
  1353. message CGCMsgTFSync
  1354. {
  1355. optional bytes version_checksum = 1;
  1356. optional uint32 version_check = 2;
  1357. optional uint32 version_check_ex = 3;
  1358. optional uint32 version_check_ex2 = 4;
  1359. optional bytes version_checksum_ex = 5;
  1360. };
  1361. //
  1362. // CGCMsgTFSync
  1363. //
  1364. message CGCMsgTFSyncEx
  1365. {
  1366. optional string version_checksum = 1;
  1367. optional bytes version_checksum_ex = 2;
  1368. optional uint32 version_check = 3;
  1369. };
  1370. // gameserver -> GC message used to notify GC of victory
  1371. message CMsgMvMVictory
  1372. {
  1373. optional uint32 legacy_mission_index = 1; // needed for the first prop, when old gameservers may report victory to a new GC. After we update the gameservers, delete it
  1374. optional string tour_name_mannup = 5; // Only present if we're playing for bragging rights (Mann Up)
  1375. optional string mission_name = 6;
  1376. message Player
  1377. {
  1378. optional fixed64 steam_id = 1;
  1379. optional bool squad_surplus = 2;
  1380. };
  1381. repeated Player players = 2;
  1382. optional uint64 lobby_id = 3;
  1383. optional fixed32 event_time = 4;
  1384. };
  1385. //
  1386. // Message used to tell the GameServer the GC received the VictoryMessage
  1387. message CMsgMvMMannUpVictoryReply
  1388. {
  1389. // No longer used
  1390. // optional uint32 result = 1; // EResult code
  1391. };
  1392. //
  1393. // Game server is letting us know that it is booting the lobby off of the server
  1394. //
  1395. message CMsgGameServerKickingLobby
  1396. {
  1397. repeated fixed64 connected_players = 1; // list of players that are still connected
  1398. optional bool create_party = 2 [ default = true ];
  1399. optional uint64 lobby_id = 3;
  1400. optional uint64 match_id = 4;
  1401. };
  1402. // GC -> server; confirmation that we processed above reliable message
  1403. message CMsgGameServerKickingLobbyResponse
  1404. {};
  1405. //
  1406. // GC -> client: Leave your current game; I am about to put you into a party
  1407. //
  1408. message CMsgLeaveGameAndPrepareToJoinParty
  1409. {
  1410. optional fixed64 party_id = 1; // The party that has been created that you are now a member of
  1411. };
  1412. //
  1413. // Server -> GC : Telling the GC this player abandoned a match, and should be removed from the lobby if applicable
  1414. //
  1415. message CMsgPlayerLeftMatch
  1416. {
  1417. optional fixed64 steam_id = 1;
  1418. optional TFMatchLeaveReason leave_reason = 2;
  1419. optional bool was_abandon = 3; // Player was not cleared to leave, this is abandoning
  1420. optional uint64 lobby_id = 4;
  1421. optional uint64 match_id = 5;
  1422. repeated CMsgTFXPSource xp_breakdown = 6;
  1423. };
  1424. //
  1425. // GC -> Server - empty confirmation of reliable message
  1426. //
  1427. message CMsgPlayerLeftMatchResponse
  1428. {};
  1429. //
  1430. // Server -> GC : Telling the GC this player was vote-kicked after leaving a match, e.g. they left before it passed
  1431. //
  1432. message CMsgPlayerVoteKickedAfterLeavingMatch
  1433. {
  1434. optional fixed64 steam_id = 1;
  1435. optional fixed64 lobby_id = 2;
  1436. optional fixed64 match_id = 3;
  1437. };
  1438. //
  1439. // GC -> Server - empty confirmation of reliable message
  1440. //
  1441. message CMsgPlayerVoteKickedAfterLeavingMatchResponse
  1442. {};
  1443. //
  1444. // Server -> GC : Telling the GC that players in this lobby are safe to leave
  1445. //
  1446. // Deprecated
  1447. // message CMsgSetLobbySafeToLeave
  1448. // {
  1449. // optional fixed64 lobby_id = 1;
  1450. // };
  1451. //
  1452. // k_EMsgGC_Halloween_ServerBossEvent (Server -> GC)
  1453. //
  1454. message CMsgHalloween_ServerBossEvent
  1455. {
  1456. optional uint32 event_counter = 1; // uint8
  1457. optional uint32 timestamp = 2; // sent up from server for consistency
  1458. optional uint32 boss_type = 3; // uint8
  1459. optional uint32 boss_level = 4; // uint16
  1460. optional uint32 event_type = 5; // uint8
  1461. optional uint32 players_involved = 6; // uint8
  1462. optional float elapsed_time = 7;
  1463. };
  1464. //
  1465. // k_EMsgGC_Halloween_Merasmus2012 (Server -> GC)
  1466. //
  1467. message CMsgHalloween_Merasmus2012
  1468. {
  1469. optional uint32 event_counter = 1; // uint8
  1470. optional fixed32 time_submitted = 2; // sent up from server for consistency
  1471. optional bool is_valve_server = 3;
  1472. optional uint32 boss_level= 4;
  1473. optional uint32 spawned_health = 5;
  1474. optional uint32 remaining_health = 6; // 0 == Boss was killed
  1475. optional uint32 life_time = 7; // Amount of time in seconds, boss was alive for
  1476. optional uint32 bomb_kills = 8; // Kills from Bombs
  1477. optional uint32 staff_kills = 9; // kills from staff attack
  1478. optional uint32 pvp_kills = 10; // Number of kills from players while Boss is out (Jerk factor)
  1479. optional uint32 prophunt_time1 = 11;
  1480. optional uint32 prophunt_time2 = 12;
  1481. optional uint32 dmg_scout = 13; // Amount of damage done by each class
  1482. optional uint32 dmg_sniper = 14;
  1483. optional uint32 dmg_soldier = 15;
  1484. optional uint32 dmg_demo = 16;
  1485. optional uint32 dmg_medic = 17;
  1486. optional uint32 dmg_heavy = 18;
  1487. optional uint32 dmg_pyro = 19;
  1488. optional uint32 dmg_spy = 20;
  1489. optional uint32 dmg_engineer = 21;
  1490. optional uint32 scout_count = 22; // Class and player break down at the point of boss despawn
  1491. optional uint32 sniper_count = 23;
  1492. optional uint32 solider_count = 24;
  1493. optional uint32 demo_count = 25;
  1494. optional uint32 medic_count = 26;
  1495. optional uint32 heavy_count = 27;
  1496. optional uint32 pyro_count = 28;
  1497. optional uint32 spy_count = 29;
  1498. optional uint32 engineer_count = 30;
  1499. };
  1500. // k_EMsgGC_UpdateMerasmusItem
  1501. // Client -> GC. Request to update the itemlevel of the merasmus hat
  1502. message CMsgUpdateHalloweenMerasmusLootLevel
  1503. {
  1504. message Player
  1505. {
  1506. optional fixed64 steam_id = 1;
  1507. };
  1508. repeated Player players = 1;
  1509. optional uint32 merasmus_level = 2; // uint8
  1510. };
  1511. message CAttribute_String
  1512. {
  1513. optional string value = 1;
  1514. };
  1515. message CAttribute_DynamicRecipeComponent
  1516. {
  1517. optional uint32 def_index = 1;
  1518. optional uint32 item_quality = 2;
  1519. optional uint32 component_flags = 3;
  1520. optional string attributes_string = 4;
  1521. optional uint32 num_required = 5;
  1522. optional uint32 num_fulfilled = 6;
  1523. };
  1524. message CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT
  1525. {
  1526. optional uint32 def_index = 1;
  1527. optional uint32 item_def = 2;
  1528. optional uint32 item_quality = 3;
  1529. optional uint32 component_flags = 4;
  1530. optional uint32 item_flags = 5;
  1531. optional string attributes_string = 6;
  1532. optional uint32 num_required = 7;
  1533. optional uint32 item_count = 8;
  1534. optional uint32 num_fulfilled = 9;
  1535. optional uint32 items_fulfilled = 10;
  1536. };
  1537. message CAttribute_ItemSlotCriteria
  1538. {
  1539. optional string tags = 1;
  1540. };
  1541. message CMsgSetItemSlotAttribute
  1542. {
  1543. optional uint64 item_id = 1;
  1544. optional uint64 slot_item_original_id = 2;
  1545. optional uint32 slot_index = 3;
  1546. };
  1547. //
  1548. // CSOWarData
  1549. //
  1550. message CSOWarData
  1551. {
  1552. optional uint32 account_id = 1 [ (key_field) = true ]; // Account of who's data this belongs to
  1553. optional uint32 war_id = 2 [ (key_field) = true ]; // ID of the war
  1554. optional uint32 affiliation = 3; // Which side they're affiliated with
  1555. optional uint32 points_scored = 4; // How many points they've scored
  1556. };
  1557. //
  1558. // k_EMsgGC_War_IndividualUpdate
  1559. //
  1560. message CGCMsgGC_War_IndividualUpdate
  1561. {
  1562. optional fixed64 steam_id = 1; // Who scored
  1563. optional uint32 war_id = 2; // Which war
  1564. optional uint32 score = 3; // How many points did they score
  1565. };
  1566. //
  1567. // k_EMsgGC_War_JoinWar
  1568. //
  1569. message CGCMsgGC_War_JoinWar
  1570. {
  1571. optional uint32 affiliation = 1; // Which side we're joining
  1572. optional uint32 war_id = 2; // Which war
  1573. };
  1574. //
  1575. // k_EMsgGC_War_RequestGlobalStats
  1576. //
  1577. message CGCMsgGC_War_RequestGlobalStats
  1578. {
  1579. optional uint32 war_id = 1;
  1580. };
  1581. //
  1582. // k_EMsgGC_War_GlobalStatsResponse
  1583. //
  1584. message CGCMsgGC_War_GlobalStatsResponse
  1585. {
  1586. message SideScore
  1587. {
  1588. optional uint32 side = 1;
  1589. optional uint64 score = 2;
  1590. };
  1591. repeated SideScore side_scores = 1;
  1592. optional uint32 war_id = 2;
  1593. }
  1594. //
  1595. // k_EMsgGC_DuckLeaderboard_IndividualUpdate
  1596. //
  1597. message CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate
  1598. {
  1599. //optional fixed64 steam_id = 1; // Who scored
  1600. optional uint32 score = 2;
  1601. optional uint32 type = 3;
  1602. optional bytes score_id = 4;
  1603. optional uint32 score_check = 5;
  1604. }
  1605. // k_EMsgGC_WorldItemPlacement_Attribute
  1606. message CAttribute_WorldItemPlacement
  1607. {
  1608. optional uint64 original_item_id = 1;
  1609. optional float pos_x = 2;
  1610. optional float pos_y = 3;
  1611. optional float pos_z = 4;
  1612. optional float ang_x = 5;
  1613. optional float ang_y = 6;
  1614. optional float ang_z = 7;
  1615. };
  1616. // k_EMsgGC_WorldItemPlacement_Update
  1617. message CGCMsg_WorldItemPlacement_Update
  1618. {
  1619. optional uint64 original_item_id = 1; // Passing INVALID_ITEM_ID will reset this attribute
  1620. optional float pos_x = 2;
  1621. optional float pos_y = 3;
  1622. optional float pos_z = 4;
  1623. optional float ang_x = 5;
  1624. optional float ang_y = 6;
  1625. optional float ang_z = 7;
  1626. optional bool force_remove_all = 8; // Reset every attribute of this type on the owning item (make separate msg?)
  1627. optional string attrib_name = 9; // The attribute we're applying the update to
  1628. };
  1629. //
  1630. // CMsgAcknowledgeXP
  1631. //
  1632. message CMsgAcknowledgeXP
  1633. {
  1634. // Message clients sent to the GC to acknowledge any pending XP sources
  1635. optional int32 match_group = 1;
  1636. optional uint32 predicted_experience = 2;
  1637. }
  1638. //
  1639. // CMsgTFXPSource
  1640. //
  1641. message CMsgTFXPSource
  1642. {
  1643. enum XPSourceType
  1644. {
  1645. SOURCE_SCORE = 0;
  1646. SOURCE_OBJECTIVE_BONUS = 1;
  1647. SOURCE_COMPLETED_MATCH = 2;
  1648. SOURCE_COMPETITIVE_ABANDON = 3;
  1649. SOURCE_COMPETITIVE_WIN = 4;
  1650. SOURCE_COMPETITIVE_LOSS = 5;
  1651. SOURCE_AUTOBALANCE_BONUS = 6;
  1652. // Make sure this is at the end!
  1653. NUM_SOURCE_TYPES = 7;
  1654. };
  1655. optional XPSourceType type = 1 [ (key_field) = true ];
  1656. optional int32 amount = 2;
  1657. optional int32 match_group = 3;
  1658. optional uint32 account_id = 4 [ (key_field) = true ];
  1659. optional uint64 match_id = 5 [ (key_field) = true ];
  1660. }
  1661. message CMsgTFXPSourceBreakdown
  1662. {
  1663. repeated CMsgTFXPSource sources = 1;
  1664. }
  1665. //
  1666. // Client send this in response to client welcome This is separate from hello, which is only sent if we don't have a
  1667. // session and haven't heard from the GC, as keep-alive.
  1668. message CMsgTFClientInit
  1669. {
  1670. optional uint32 client_version = 1;
  1671. optional int32 language = 2; // ELanguage
  1672. };
  1673. //
  1674. // CMsgGCNotification
  1675. //
  1676. message CMsgGCNotification
  1677. {
  1678. // Message GC sends to clients when they have a pending notification
  1679. enum NotificationType
  1680. {
  1681. NOTIFICATION_REPORTED_PLAYER_BANNED = 0;
  1682. NOTIFICATION_CUSTOM_STRING = 1;
  1683. NOTIFICATION_MM_BAN_DUE_TO_EXCESSIVE_REPORTS = 2;
  1684. NOTIFICATION_REPORTED_PLAYER_WAS_BANNED = 3;
  1685. // A must-confirm-as-seen pop-up notification with a custom support message. If the string is a localization
  1686. // token, comes from the *GC* localized strings table, and is sent down based on client's current locale
  1687. NOTIFICATION_SUPPORT_MESSAGE = 4;
  1688. // Make sure this is at the end
  1689. NOTIFICATION_NUM_TYPES = 5;
  1690. };
  1691. optional uint64 notification_id = 1 [(key_field) = true ];
  1692. optional uint32 account_id = 2;
  1693. // 0 -> doesn't expire
  1694. optional fixed32 expiration_time = 3;
  1695. optional NotificationType type = 4 [ default = NOTIFICATION_CUSTOM_STRING ];
  1696. optional string notification_string = 5;
  1697. }
  1698. message CMsgGCNotificationQueue
  1699. {
  1700. repeated CMsgGCNotification notifications = 1;
  1701. }
  1702. // k_EMsgGC_NotificationAcknowledge
  1703. message CMsgNotificationAcknowledge
  1704. {
  1705. // Message client sends to GC upon receipt of their notification queue
  1706. optional uint32 account_id = 1;
  1707. optional uint64 notification_id = 2;
  1708. }
  1709. // k_EMsgGC_NotificationAcknowledgeReply
  1710. message CMsgNotificationAcknowledgeReply
  1711. {
  1712. // Empty confirmation message that this was processed, and the server can stop trying to send it
  1713. }
  1714. // k_EMsgGC_Match_Result
  1715. message CMsgGC_Match_Result
  1716. {
  1717. enum Status
  1718. {
  1719. MATCH_SUCCEEDED = 0;
  1720. MATCH_FAILED_GC = 1;
  1721. MATCH_FAILED_TRUSTED = 2;
  1722. MATCH_FAILED_ABANDON = 3;
  1723. // Deprecated
  1724. // MATCH_FAILED_RATING = 4;
  1725. MATCH_FAILED_UNKNOWN = 5;
  1726. MATCH_FAILED_TIMEOUT = 6;
  1727. MATCH_FINISHED_ABANDON = 7; // When we allow games to continue after an abandon
  1728. };
  1729. optional uint64 match_id = 1 [ (key_field) = true ];
  1730. optional int32 match_group = 2;
  1731. optional Status status = 3;
  1732. optional uint32 duration = 4;
  1733. optional uint32 red_score = 5;
  1734. optional uint32 blue_score = 6;
  1735. optional uint32 winning_team = 7;
  1736. optional uint32 map_index = 8;
  1737. optional uint32 game_type = 9 [default = 0 ];
  1738. message Player
  1739. {
  1740. optional fixed64 steam_id = 1;
  1741. optional uint64 party_id = 2;
  1742. optional uint32 team = 3;
  1743. optional uint32 score = 4;
  1744. optional uint32 ping = 5;
  1745. optional uint32 flags = 6;
  1746. // Deprectated - ratings are now computed GC side, no need to send this up.
  1747. // optional uint32 rating = 7;
  1748. // optional int32 rating_change = 8;
  1749. optional uint32 rank = 9;
  1750. optional uint32 classes_played = 10; // bit field
  1751. optional uint32 kills = 11;
  1752. optional uint32 deaths = 12;
  1753. optional uint32 damage = 13;
  1754. optional uint32 healing = 14;
  1755. optional uint32 support = 15;
  1756. optional uint32 score_medal = 16;
  1757. optional uint32 kills_medal = 17;
  1758. optional uint32 damage_medal = 18;
  1759. optional uint32 healing_medal = 19;
  1760. optional uint32 support_medal = 20;
  1761. repeated CMsgTFXPSource xp_breakdown = 21;
  1762. optional uint32 leave_time = 22;
  1763. optional TFMatchLeaveReason leave_reason = 23;
  1764. optional uint32 connect_time = 24;
  1765. };
  1766. repeated Player players = 10;
  1767. // Deprecated -- handled GC-side
  1768. // optional uint32 red_skillrating = 11;
  1769. // optional uint32 blue_skillrating = 12;
  1770. optional uint32 win_reason = 13;
  1771. optional uint32 flags = 14; // bit field
  1772. // Deprecated - Unused
  1773. // optional uint32 server_version = 15;
  1774. optional uint32 bots = 16; // count of bots added during match
  1775. // Deprecrated - The reliable message queue for matches requires the new match get acknowledged before we send up
  1776. // its corresponding result, so this logic was removed.
  1777. // optional bool server_created = 17 [ default = false ];
  1778. };
  1779. message CMsgGC_Match_ResultResponse
  1780. {
  1781. // Empty confirmation message that this was processed, and the server can stop trying to send it
  1782. };
  1783. //
  1784. // Data structure holding information for item preview
  1785. //
  1786. message CEconItemPreviewDataBlock
  1787. {
  1788. optional CSOEconItem econitem = 1;
  1789. };
  1790. //
  1791. // k_EMsgGC_Client2GCEconPreviewDataBlockRequest
  1792. //
  1793. message CMsgGC_Client2GCEconPreviewDataBlockRequest
  1794. {
  1795. // econ item asset preview integration with Steam Community params
  1796. optional uint64 param_s = 1;
  1797. optional uint64 param_a = 2;
  1798. optional uint64 param_d = 3;
  1799. optional uint64 param_m = 4;
  1800. };
  1801. //
  1802. // k_EMsgGC_Client2GCEconPreviewDataBlockResponse
  1803. //
  1804. message CMsgGC_Client2GCEconPreviewDataBlockResponse
  1805. {
  1806. optional CEconItemPreviewDataBlock iteminfo = 1;
  1807. };
  1808. //
  1809. // CSOTFLadderPlayerStats
  1810. //
  1811. message CSOTFLadderPlayerStats
  1812. {
  1813. optional uint32 account_id = 1 [ (key_field) = true ];
  1814. optional int32 match_group = 2 [ (key_field) = true ];
  1815. optional uint32 season_id = 3 [ (key_field) = true ];
  1816. // Deprecated, now stored separately from ladder data
  1817. // optional uint32 rating = 4;
  1818. // optional uint32 last_ackd_rating = 31;
  1819. // optional int32 last_rating_change = 5;
  1820. optional uint32 rank = 6;
  1821. optional uint32 highest_rank = 7;
  1822. optional uint32 experience = 8; // Used to determine season level, which is different from (skill) rank
  1823. optional uint32 last_ackd_experience = 32;
  1824. // Stats - season total
  1825. optional uint32 games = 9;
  1826. optional uint32 score = 10;
  1827. optional uint32 kills = 11;
  1828. optional uint32 deaths = 12;
  1829. optional uint32 damage = 13;
  1830. optional uint32 healing = 14;
  1831. optional uint32 support = 15;
  1832. // Medals - season total
  1833. optional uint32 score_bronze = 16;
  1834. optional uint32 score_silver = 17;
  1835. optional uint32 score_gold = 18;
  1836. optional uint32 kills_bronze = 19;
  1837. optional uint32 kills_silver = 20;
  1838. optional uint32 kills_gold = 21;
  1839. optional uint32 damage_bronze = 22;
  1840. optional uint32 damage_silver = 23;
  1841. optional uint32 damage_gold = 24;
  1842. optional uint32 healing_bronze = 25;
  1843. optional uint32 healing_silver = 26;
  1844. optional uint32 healing_gold = 27;
  1845. optional uint32 support_bronze = 28;
  1846. optional uint32 support_silver = 29;
  1847. optional uint32 support_gold = 30;
  1848. };
  1849. //
  1850. // CSOTFRatingData
  1851. //
  1852. // !! Shared object - keep in sync with CSchRatingData and CTFRatingData's adapters
  1853. message CSOTFRatingData
  1854. {
  1855. optional uint32 account_id = 1 [ (key_field) = true ];
  1856. optional int32 rating_type = 2 [ (key_field) = true ]; // int16 in the db
  1857. // Corresponds to MMRatingData_t
  1858. optional uint32 rating_primary = 3;
  1859. optional uint32 rating_secondary = 4;
  1860. optional uint32 rating_tertiary = 5;
  1861. };
  1862. //
  1863. // k_EMsgGCVoteKickPlayerRequest
  1864. //
  1865. message CMsgGC_TFVoteKickPlayerRequest
  1866. {
  1867. optional uint32 account_id = 1;
  1868. optional uint64 target_id = 2;
  1869. };
  1870. //
  1871. // k_EMsgGCVoteKickPlayerRequestResponse
  1872. //
  1873. message CMsgGC_VoteKickPlayerRequestResponse
  1874. {
  1875. optional bool allowed = 1;
  1876. };
  1877. //
  1878. // k_EMsgGC_DailyCompetitiveStatsRollup
  1879. //
  1880. message CMsgGC_DailyCompetitiveStatsRollup
  1881. {
  1882. };
  1883. //
  1884. // k_EMsgGC_DailyCompetitiveStatsRollup_Response
  1885. //
  1886. message CMsgGC_DailyCompetitiveStatsRollup_Response
  1887. {
  1888. message RankBucketEntry
  1889. {
  1890. optional uint32 rank = 1;
  1891. optional uint32 records = 2;
  1892. optional uint32 avg_score = 3;
  1893. optional uint32 stdev_score = 4;
  1894. optional uint32 avg_kills = 5;
  1895. optional uint32 stdev_kills = 6;
  1896. optional uint32 avg_damage = 7;
  1897. optional uint32 stdev_damage = 8;
  1898. optional uint32 avg_healing = 9;
  1899. optional uint32 stdev_healing = 10;
  1900. optional uint32 avg_support = 11;
  1901. optional uint32 stdev_support = 12;
  1902. };
  1903. repeated RankBucketEntry rankdata = 1;
  1904. };
  1905. //
  1906. // k_EMsgGC_ReportPlayer
  1907. //
  1908. message CMsgGC_ReportPlayer
  1909. {
  1910. enum EReason
  1911. {
  1912. kReason_INVALID = 0;
  1913. kReason_CHEATING = 1;
  1914. kReason_IDLE = 2;
  1915. kReason_HARASSMENT = 3;
  1916. kReason_GRIEFING = 4;
  1917. // add more reasons above this and update the count
  1918. kReason_COUNT = 5;
  1919. };
  1920. optional uint32 account_id_target = 1;
  1921. optional EReason reason = 2;
  1922. };
  1923. //
  1924. // CSOTFMatchResultPlayerStats
  1925. //
  1926. message CSOTFMatchResultPlayerStats
  1927. {
  1928. optional uint64 match_id = 1 [ (key_field) = true ];
  1929. optional uint32 account_id = 2 [ (key_field) = true ];
  1930. optional int32 match_group = 3 [ (key_field) = true ];
  1931. optional uint32 endtime = 4;
  1932. optional uint32 season_id = 5;
  1933. optional uint32 status = 6;
  1934. optional uint32 party_id = 7;
  1935. optional uint32 team = 8;
  1936. optional uint32 score = 9;
  1937. optional uint32 ping = 10;
  1938. optional uint32 flags = 11;
  1939. optional uint32 display_rating = 12;
  1940. optional int32 display_rating_change = 13;
  1941. optional uint32 rank = 14;
  1942. optional uint32 classes_played = 15;
  1943. optional uint32 kills = 16;
  1944. optional uint32 deaths = 17;
  1945. optional uint32 damage = 18;
  1946. optional uint32 healing = 19;
  1947. optional uint32 support = 20;
  1948. optional uint32 score_medal = 21;
  1949. optional uint32 kills_medal = 22;
  1950. optional uint32 damage_medal = 23;
  1951. optional uint32 healing_medal = 24;
  1952. optional uint32 support_medal = 25;
  1953. optional uint32 map_index = 26;
  1954. };
  1955. //
  1956. // k_EMsgGCRequestMatchMakerStats
  1957. //
  1958. message CMsgGCRequestMatchMakerStats
  1959. {};
  1960. message CMsgGCDataCenterPopulation
  1961. {
  1962. optional string name = 1; // data center name
  1963. optional float health_ratio = 2; // population health ratio with best ping in the data center
  1964. };
  1965. message CMsgGCMatchGroupDataCenterPopulation
  1966. {
  1967. repeated CMsgGCDataCenterPopulation data_center_population = 1;
  1968. };
  1969. //
  1970. // k_EMsgGCMatchMakerStatsResponse
  1971. //
  1972. message CMsgGCMatchMakerStatsResponse
  1973. {
  1974. repeated uint32 map_count = 1;
  1975. repeated CMsgGCMatchGroupDataCenterPopulation matchgroup_data_center_population = 2;
  1976. };
  1977. //
  1978. // k_EMsgGCMatchHistoryLoad
  1979. //
  1980. message CMsgGCMatchHistoryLoad
  1981. {
  1982. };
  1983. //
  1984. // k_EMsgGCDataCenterPing_Update
  1985. //
  1986. message CMsgGCDataCenterPing_Update
  1987. {
  1988. enum Status
  1989. {
  1990. Invalid = 0;
  1991. Normal = 1;
  1992. Unreachable = 2; // Value is stale or not provided, DC is unreachable
  1993. FallbackToDCPing = 3; // Couldn't ping router directly, this is a less-accurate DC ping value
  1994. };
  1995. message PingEntry
  1996. {
  1997. optional string name = 1; // data center name
  1998. optional uint32 ping = 2; // ping to the data center
  1999. // If omitted, assume we have a normal ping.
  2000. optional Status ping_status = 3 [ default = Normal ];
  2001. };
  2002. repeated PingEntry pingdata = 1;
  2003. };
  2004. //
  2005. // k_EMsgGC_KickPlayerFromLobby
  2006. //
  2007. message CMsgGC_KickPlayerFromLobby
  2008. {
  2009. optional uint64 targetID = 1; // kick target ID
  2010. };
  2011. //
  2012. // k_EMsgGC_RematchRequest
  2013. // DEPRECATED - New path is NewMatchForLobby
  2014. //
  2015. // message CMsgGCRematchRequest
  2016. // {
  2017. // message PartyEntry
  2018. // {
  2019. // optional uint64 party_id = 1; // party's ID
  2020. // optional uint32 team = 2; // party's assigned team
  2021. // optional uint64 leader_steam_id = 3; // party leader's steamID
  2022. // };
  2023. // repeated PartyEntry party = 1; // all of the parties who want a rematch
  2024. // optional uint32 match_group = 2; // match group that we want
  2025. // optional CMsgCasualMatchmakingSearchCriteria casual_criteria = 3; // casual criteria for the new match
  2026. // };
  2027. //
  2028. // k_EMsgGC_RematchRequestResponse
  2029. // DEPRECATED - New path is NewMatchForLobby
  2030. //
  2031. // message CMsgGCRematchRequestResponse
  2032. // {
  2033. // optional bool success = 1; // Did we succeed?
  2034. // }
  2035. enum SurveyQuestionType
  2036. {
  2037. QUESTION_MATCH_QUALITY = 0;
  2038. QUESTION_MAP_QUALITY = 1;
  2039. QUESTION_COMP_INQUIRY = 2;
  2040. QUESTION_CASUAL_INQUIRY = 3;
  2041. }
  2042. //
  2043. // k_EMsgGC_SurveyQuestionRequest
  2044. //
  2045. message CMsgGCSurveyRequest
  2046. {
  2047. optional SurveyQuestionType question_type = 1;
  2048. optional uint64 match_id = 2;
  2049. }
  2050. //
  2051. // k_EMsgGC_SurveyQuestionResponse
  2052. //
  2053. message CMsgGCSurveyResponse
  2054. {
  2055. optional SurveyQuestionType question_type = 1;
  2056. optional uint64 match_id = 2;
  2057. optional int32 response = 3;
  2058. }
  2059. //
  2060. // k_EMsgGC_NewMatchForLobbyRequest
  2061. //
  2062. message CMsgGCNewMatchForLobbyRequest
  2063. {
  2064. optional uint64 current_match_id = 1;
  2065. optional uint32 next_map_id = 2;
  2066. optional uint64 lobby_id = 3;
  2067. }
  2068. //
  2069. // k_EMsgGC_NewMatchForLobbyResponse
  2070. //
  2071. message CMsgGCNewMatchForLobbyResponse
  2072. {
  2073. optional bool success = 1;
  2074. }
  2075. //
  2076. // k_EMsgGC_ChangeMatchPlayerTeamsRequest
  2077. //
  2078. message CMsgGCChangeMatchPlayerTeamsRequest
  2079. {
  2080. message Member
  2081. {
  2082. optional uint64 member_id = 1;
  2083. optional TF_GC_TEAM new_team = 2 [ default = TF_GC_TEAM_NOTEAM ];
  2084. }
  2085. optional uint64 match_id = 1;
  2086. optional uint64 lobby_id = 2;
  2087. repeated Member member = 3;
  2088. }
  2089. //
  2090. // k_EMsgGC_ChangeMatchPlayerTeamsResponse
  2091. //
  2092. message CMsgGCChangeMatchPlayerTeamsResponse
  2093. {
  2094. optional bool success = 1;
  2095. }
  2096. // End of File