Difference between revisions of "Counter-Strike: Global Offensive UserMessages"

From AlliedModders Wiki
Jump to: navigation, search
(Finally finished the last one, however we need to copy netmessages.proto at some point)
(Added missing submessages from netmessages.proto)
Line 2: Line 2:
 
Counter-Strike: Global Offensive uses Google's [[Protobuf|Protocol Buffers]] instead of Valve's traditional UserMessages.
 
Counter-Strike: Global Offensive uses Google's [[Protobuf|Protocol Buffers]] instead of Valve's traditional UserMessages.
  
The data on this page was read from [http://hg.alliedmods.net/hl2sdks/hl2sdk-csgo/file/tip/public/game/shared/csgo/protobuf/cstrike15_usermessages.proto cstrike15_usermessages.proto] which was provided by Valve.
+
The data on this page was read from [http://hg.alliedmods.net/hl2sdks/hl2sdk-csgo/file/tip/public/engine/protobuf/netmessages.proto netmessages.proto] and [http://hg.alliedmods.net/hl2sdks/hl2sdk-csgo/file/tip/public/game/shared/csgo/protobuf/cstrike15_usermessages.proto cstrike15_usermessages.proto] which were provided by Valve.
  
 
=== Valve Copyright Notice ===
 
=== Valve Copyright Notice ===
Line 34: Line 34:
 
//
 
//
 
//=============================================================================</pre>
 
//=============================================================================</pre>
 +
 +
Note: Some of the Messages here are actually sub-messages of other message types rather than standalone UserMessages
 +
 +
== CMsgVector ==
 +
{{qnotice|This is a submessage, not a UserMessage}}
 +
 +
{{begin-hl2msg|CMsgVector|string}}
 +
{{hl2msg|float|x|}}
 +
{{hl2msg|float|y|}}
 +
{{hl2msg|float|z|}}
 +
{{end-hl2msg}}
 +
 +
== CMsgVector2D ==
 +
{{qnotice|This is a submessage, not a UserMessage}}
 +
 +
{{begin-hl2msg|CMsgVector2D|string}}
 +
{{hl2msg|float|x|}}
 +
{{hl2msg|float|y|}}
 +
{{end-hl2msg}}
 +
 +
== CMsgQAngle ==
 +
{{qnotice|This is a submessage, not a UserMessage}}
 +
 +
{{begin-hl2msg|CMsgQAngle|string}}
 +
{{hl2msg|float|x|}}
 +
{{hl2msg|float|y|}}
 +
{{hl2msg|float|z|}}
 +
{{end-hl2msg}}
 +
 +
== CMsgRGBA==
 +
{{qnotice|This is a submessage, not a UserMessage}}
 +
 +
{{begin-hl2msg|CMsgRGBA|string}}
 +
{{hl2msg|int32|r|}}
 +
{{hl2msg|int32|g|}}
 +
{{hl2msg|int32|b|}}
 +
{{hl2msg|int32|a|}}
 +
{{end-hl2msg}}
  
 
== VGUIMenu ==
 
== VGUIMenu ==

Revision as of 10:07, 26 March 2013

Counter-Strike: Global Offensive uses Google's Protocol Buffers instead of Valve's traditional UserMessages.

The data on this page was read from netmessages.proto and cstrike15_usermessages.proto which were provided by Valve.

Valve Copyright Notice

//====== Copyright (c) 2013, Valve Corporation, All rights reserved. ========//
//
// Redistribution and use in source and binary forms, with or without 
// modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// Redistributions in binary form must reproduce the above copyright notice, 
// this list of conditions and the following disclaimer in the documentation 
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
// THE POSSIBILITY OF SUCH DAMAGE.
//===========================================================================//
//
// Purpose: The file defines our Google Protocol Buffers which are used in over 
// the wire messages for the Source engine.
//
//=============================================================================

Note: Some of the Messages here are actually sub-messages of other message types rather than standalone UserMessages

CMsgVector

Note: This is a submessage, not a UserMessage

Name: CMsgVector
Structure:
float x
float y
float z


CMsgVector2D

Note: This is a submessage, not a UserMessage

Name: CMsgVector2D
Structure:
float x
float y


CMsgQAngle

Note: This is a submessage, not a UserMessage

Name: CMsgQAngle
Structure:
float x
float y
float z


CMsgRGBA

Note: This is a submessage, not a UserMessage

Name: CMsgRGBA
Structure:
int32 r
int32 g
int32 b
int32 a


VGUIMenu

Name: SubKey
Structure:
string name
string str


Name: VGUIMenu
Structure:
string name
bool show
repeated SubKey subkeys


Geiger

Name: Geiger
Structure:
int32 range


Train

Name: Train
Structure:
int32 train


HudText

Name: HudText
Structure:
string text


SayText

Name: SayText
Structure:
int32 ent_idx
string text
bool chat
bool textallchat


SayText2

Name: SayText2
Structure:
int32 ent_idx
bool chat
string msg_name
repeated string params
bool textallchat


TextMsg

Name: TextMsg
Structure:
int32 msg_dst
repeated string params


HudMsg

Name: HudMsg
Structure:
int32 channel
CMsgVector2D pos
CMsgRGBA clr1
CMsgRGBA clr2
int32 effect
float fade_in_time
float fade_out_time
float hold_time
float fx_time
string text


Shake

Name: Shake
Structure:
int32 command
float local_amplitude
float frequency
float duration


Fade

Name: Fade
Structure:
int32 duration
int32 hold_time
int32 flags fade type (in / out)
CMsgRGBA clr


Rumble

Name: Rumble
Structure:
int32 index
int32 data
int32 flags


CloseCaption

Name: CloseCaption
Structure:
uint32 hash
int32 duration
bool from_player {{{3}}}


CloseCaptionDirect

Name: CloseCaptionDirect
Structure:
uint32 hash
int32 duration
bool from_player {{{3}}}


SendAudio

Name: SendAudio
Structure:
string radio_sound


RawAudio

Name: RawAudio
Structure:
int32 pitch
int32 ent_index
float duration
string voice_filename


VoiceMask

Name: PlayerMask
Structure:
int32 game_rules_mask
int32 ban_masks


Name: VoiceMask
Structure:
repeated PlayerMask player_masks
bool player_mod_enable


Damage

Name: Damage
Structure:
int32 amount
CMsgVector inflictor_world_pos


RadioText

Name: RadioText
Structure:
int32 msg_dst
int32 client
string msg_name
repeated string params


HintText

Name: HintText
Structure:
string text


KeyHintText

Name: KeyHintText
Structure:
string hints


ProcessSpottedEntityUpdate

Note: gurjeets - Message below is slightly bigger in size than the non-protobuf version, by around 8 bits.

Name: SpottedEntityUpdate
Structure:
int32 entity_idx
int32 class_id
int32 origin_x
int32 origin_y
int32 origin_z
int32 angle_y
bool defuser
bool player_has_defuser
bool player_has_c4


Name: ProcessSpottedEntityUpdate
Structure:
repeated SpottedEntityUpdate entity_updates


ReloadEffect

Name: ReloadEffect
Structure:
int32 entidx


AdjustMoney

Name: AdjustMoney
Structure:
int32 amount


KillCam

Name: KillCam
Structure:
int32 obs_mode
int32 first_target
int32 second_target


DesiredTimescale

Name: DesiredTimescale
Structure:
float desired_timescale
float duration_realtime_sec
int32 interpolator_type
float start_blend_time


CurrentTimescale

Name: CurrentTimescale
Structure:
float cur_timescale


AchievementEvent

Name: AchievementEvent
Structure:
int32 achievement
int32 count
int32 user_id


MatchEndConditions

Name: MatchEndConditions
Structure:
int32 fraglimit
int32 mp_maxrounds
int32 mp_winlimit
int32 mp_timelimit


PlayerStatsUpdate

Name: Stat
Structure:
int32 idx
int32 delta


Name: PlayerStatsUpdate
Structure:
int32 version
int32 official_server
repeated Stat stats
int32 user_id
int32 crc


DisplayInventory

Name: DisplayInventory
Structure:
bool display
int32 user_id


XRankGet

Name: XRankGet
Structure:
int32 mode_idx
int32 controller


XRankUpd

Name: XRankUpd
Structure:
int32 mode_idx
int32 controller
int32 ranking


CallVoteFailed

Name: CallVoteFailed
Structure:
int32 reason
int32 time


VoteStart

Name: VoteStart
Structure:
int32 team
int32 ent_idx
int32 vote_type
string disp_str
string details_str
string other_team_str
bool is_yes_no_vote


VotePass

Name: VotePass
Structure:
int32 team
int32 vote_type
string disp_str
string details_str


VoteFailed

Name: VoteFailed
Structure:
int32 team
int32 reason


VoteSetup

Name: VoteSetup
Structure:
repeated string potential_issues


SendLastKillerDamageToClient

Name: SendLastKillerDamageToClient
Structure:
int32 num_hits_given
int32 damage_given
int32 num_hits_taken
int32 damage_taken


ServerRankUpdate

Name: RankUpdate
Structure:
int32 account_id
int32 rank_old
int32 rank_new
int32 num_wins
float rank_change


Name: ServerRankUpdate
Structure:
repeated RankUpdate rank_update


ItemPickup

Name: ItemPickup
Structure:
string item


ShowMenu

Name: ShowMenu
Structure:
int32 bits_valid_slots
int32 display_time
string menu_string


BarTime

Name: BarTime
Structure:
string time


AmmoDenied

Name: AmmoDenied
Structure:
int32 ammoIdx


MarkAchievement

Name: MarkAchievement
Structure:
string achievement


MatchStatsUpdate

Name: MatchStatsUpdate
Structure:
string update


ItemDrop

Name: ItemDrop
Structure:
int64 itemid
bool death


GlowPropTurnOff

Name: GlowPropTurnOff
Structure:
int32 entidx


Note: Messages where the data seems to e irrelevant

ResetHud

Name: ResetHud
Structure:
bool reset


GameTitle

Name: GameTitle
Structure:
int32 dummy


RequestState

Name: RequestState
Structure:
int32 dummy


StopSpectatorMode

Name: StopSpectatorMode
Structure:
int32 dummy


DisconnectToLobby

Name: DisconnectToLobby
Structure:
int32 dummy


WarmupHasEnded

Name: WarmupHasEnded
Structure:
int32 dummy


ClientInfo

Name: ClientInfo
Structure:
int32 dummy


ServerRankRevealAll

Name: ServerRankRevealAll
Structure:
int32 dummy