Counter-Strike: Global Offensive UserMessages

From AlliedModders Wiki
Revision as of 13:59, 19 December 2020 by Micapat (talk | contribs) (More comments for Fade)
Jump to: navigation, search

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

The data on this page was read from [1]. The initial versions of these files were provided by Valve and updated by the AlliedModders staff.

//====== 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.
//
//=============================================================================

VGUIMenu

Name: VGUIMenu.SubKey
Structure:
string name
string str


Name: VGUIMenu
Structure:
string name
bool show
repeated VGUIMenu.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

Note: As of this writing, params requires four empty strings or it will crash the client

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


Command:

  • SHAKE_START = 0 // Starts the screen shake for all players within the radius
  • SHAKE_STOP = 1 // Stops the screen shake for all players within the radius
  • SHAKE_AMPLITUDE = 2 // Modifies the amplitude of an active screen shake for all players within the radius
  • SHAKE_FREQUENCY = 3 // Modifies the frequency of an active screen shake for all players within the radius
  • SHAKE_START_RUMBLEONLY = 4 // Starts a shake effect that only rumbles the controller, no screen effect
  • SHAKE_START_NORUMBLE = 5 // Starts a shake that does NOT rumble the controller

Fade

Name: Fade
Structure:
int32 duration Time that it will take to fade the screen in or out
int32 hold_time Time to hold the faded in/out state
int32 flags
CMsgRGBA clr


Duration:

Even if an int32 is requested, the value must NOT be superior to 65535 and inferior to 0 (-> like an uint16) !
The value is in seconds and divided into two parts: a fractional one (b0...b8) and an integer one (b9...b15).
-> If for example you want to set 3.5 seconds, use "RoundFloat(3.5 * (1 << 9))".

Hold Time:

Even if an int32 is requested, the value must NOT be superior to 65535 and inferior to 0 (-> like an uint16) !
The value is in seconds and divided into two parts: a fractional one (b0...b8) and an integer one (b9...b15).
-> If for example you want to set 3.5 seconds, use "RoundFloat(3.5 * (1 << 9))".

Flags:

  • FFADE_IN = 0x0001 // Fade in
  • FFADE_OUT = 0x0002 // Fade out
  • FFADE_MODULATE = 0x0004 // Modulate (Don't blend)
  • FFADE_STAYOUT = 0x0008 // Ignores the duration, stays faded out until a new fade message is received
  • FFADE_PURGE = 0x0010 // Purges all other fades, replacing them with this one

Rumble

Name: Rumble
Structure:
int32 index
int32 data
int32 flags


CloseCaption

Name: CloseCaption
Structure:
uint32 hash
int32 duration
bool from_player
string cctoken


CloseCaptionDirect

Name: CloseCaptionDirect
Structure:
uint32 hash
int32 duration
bool from_player


SendAudio

Name: SendAudio
Structure:
string radio_sound


RawAudio

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


VoiceMask

Name: VoiceMask.PlayerMask
Structure:
int32 game_rules_mask
int32 ban_masks


Name: VoiceMask
Structure:
repeated VoiceMask.PlayerMask player_masks
bool player_mod_enable


Damage

Name: Damage
Structure:
int32 amount
CMsgVector inflictor_world_pos
int32 victim_entindex


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: ProcessSpottedEntityUpdate.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:
bool new_update
repeated ProcessSpottedEntityUpdate.SpottedEntityUpdate entity_updates


SendPlayerItemDrops

Name: SendPlayerItemDrops
Structure:
repeated ? entity_updates


SendPlayerItemFound

Name: SendPlayerItemFound
Structure:
? iteminfo
int32 entindex


RetakeUpdatePlayerCardList

Name: RetakeUpdatePlayerCardList
Structure:
bool defuse_kit
repeated int32 round_idx
repeated int32 loadout_idx
repeated int32 card_idx
repeated int32 type_idx
int32 mvp_boost_round_idx
int32 mvp_boost_loadout_idx
int32 mvp_boost_card_idx
int32 mvp_boost_extra_utility


RetakeUpdatePlayerCardSelection

Name: RetakeUpdatePlayerCardSelection
Structure:
int32 round_idx
int32 loadout_idx
int32 card_idx
int32 type_idx


ReloadEffect

Name: ReloadEffect
Structure:
int32 entidx
int32 actanim
float origin_x
float origin_y
float origin_z


WeaponSound

Name: WeaponSound
Structure:
int32 entidx
float origin_x
float origin_y
float origin_z
string sound
float timestamp


UpdateScreenHealthBar

Name: UpdateScreenHealthBar
Structure:
int32 entidx
float healthratio_old
float healthratio_new
int32 style


EntityOutlineHighlight

Name: EntityOutlineHighlight
Structure:
int32 entidx
bool removehighlight


AdjustMoney

Name: AdjustMoney
Structure:
int32 amount


ReportHit

Name: ReportHit
Structure:
float pos_x
float pos_y
float pos_z
float timestamp


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: PlayerStatsUpdate.Stat
Structure:
int32 idx
int32 delta


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


DisplayInventory

Name: DisplayInventory
Structure:
bool display
int32 user_id


QuestProgress

Name: QuestProgress
Structure:
uint32 quest_id
uint32 normal_points
uint32 bonus_points
bool is_event_quest


ScoreLeaderboardData

Name: ScoreLeaderboardData
Structure:
? data


PlayerDecalDigitalSignature

Name: PlayerDecalDigitalSignature
Structure:
? data


XRankGet

Note: Get ELO Rank Value from Client

Name: XRankGet
Structure:
int32 mode_idx
int32 controller


XRankUpd

Note: Update ELO Rank Value on Client

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
int32 entidx_target


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: ServerRankUpdate.RankUpdate
Structure:
int32 account_id
int32 rank_old
int32 rank_new
int32 num_wins
float rank_change
int32 rank_type_id


Name: ServerRankUpdate
Structure:
repeated ServerRankUpdate.RankUpdate rank_update


XpUpdate

Name: XpUpdate
Structure:
? data


ItemPickup

Name: ItemPickup
Structure:
string item


ShowMenu

Note: show hud menu

Name: ShowMenu
Structure:
int32 bits_valid_slots
int32 display_time
string menu_string


BarTime

Note: For the C4 progress bar

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


RoundBackupFilenames

Name: RoundBackupFilenames
Structure:
int32 count
int32 index
string filename
string nicename


SSUI

Name: SSUI
Structure:
bool show
float start_time
float end_time


SurvivalStats

Name: SurvivalStats.Fact
Structure:
int32 type
int32 display
int32 value
float interestingness


Name: SurvivalStats.Placement
Structure:
uint64 xuid
int32 teamnumber
int32 placement


Name: SurvivalStats.Damage
Structure:
uint64 xuid
int32 to
int32 to_hits
int32 from
int32 from_hits


Name: SurvivalStats
Structure:
uint64 xuid
repeated SurvivalStats.Fact facts
repeated SurvivalStats.Placement users
repeated SurvivalStats.Damage damages
int32 ticknumber


EndOfMatchAllPlayersData

Name: EndOfMatchAllPlayersData.Accolade
Structure:
int32 eaccolade
float value
int32 position


Name: EndOfMatchAllPlayersData.PlayerData
Structure:
int32 entindex
uint64 xuid
string name
int32 teamnumber
EndOfMatchAllPlayersData.Accolade nomination
repeated ? items
int32 playercolor
bool isbot


Name: EndOfMatchAllPlayersData
Structure:
repeated EndOfMatchAllPlayersData.PlayerData allplayerdata
int32 scene


RoundImpactScoreData

Name: RoundImpactScoreData.RisEvent.Victim
Structure:
int32 team_number
int32 entindex
uint64 xuid
int32 color
bool is_bot
bool is_dead


Name: RoundImpactScoreData.RisEvent.Objective
Structure:
int32 type


Name: RoundImpactScoreData.RisEvent.Damage
Structure:
int32 target_entindex
uint64 target_xuid
int32 health_removed
int32 num_hits
int32 return_health_removed
int32 num_return_hits


Name: RoundImpactScoreData.RisEvent
Structure:
float timestamp
int32 terrorist_odds
int32 ct_alive
int32 t_alive
RoundImpactScoreData.RisEvent.Victim victim_data
RoundImpactScoreData.RisEvent.Objective objective_data
repeated RoundImpactScoreData.RisEvent.Damage all_damage_data


Name: RoundImpactScoreData.InitialConditions
Structure:
int32 ct_equip_value
int32 t_equip_value
int32 terrorist_odds


Name: RoundImpactScoreData
Structure:
RoundImpactScoreData.InitialConditions init_conditions
repeated RoundImpactScoreData.RisEvent all_ris_event_data


CurrentRoundOdds

Name: CurrentRoundOdds
Structure:
int32 odds


DeepStats

Name: DeepStats
Structure:
? stats


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 seconds_till_shutdown
? reservation