Created
June 13, 2019 00:25
-
-
Save shekeru/fd6d52176658a08e93d756342f10f5fd to your computer and use it in GitHub Desktop.
Dota 2, GameEvents (Core)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=========== (C) Copyright Valve, L.L.C. All rights reserved. =========== | |
// | |
// The copyright to the contents herein is the property of Valve, L.L.C. | |
// The contents may be used and/or copied only with the written permission of | |
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in | |
// the agreement/contract under which the contents have been supplied. | |
//============================================================================= | |
// No spaces in event names, max length 32 | |
// All strings are case sensitive | |
// total game event byte length must be < 1024 | |
// | |
// valid data key types are: | |
// none : value is not networked | |
// string : a zero terminated string | |
// bool : unsigned int, 1 bit | |
// byte : unsigned int, 8 bit | |
// short : signed int, 16 bit | |
// long : signed int, 32 bit | |
// float : float, 32 bit | |
// local : any data, dont network this field | |
// | |
// following keys names are reserved: | |
// local : if set to 1, event is not networked to clients | |
// reliable : if set to 0, event is networked unreliable | |
"core game events" | |
{ | |
////////////////////////////////////////////////////////////////////// | |
// Server events | |
////////////////////////////////////////////////////////////////////// | |
"server_spawn" // send once a server starts | |
{ | |
"hostname" "string" // public host name | |
"address" "string" // hostame, IP or DNS name | |
"port" "short" // server port | |
"game" "string" // game dir | |
"mapname" "string" // map name | |
"addonname" "string" // addon name | |
"maxplayers" "long" // max players | |
"os" "string" // WIN32, LINUX | |
"dedicated" "bool" // true if dedicated server | |
"password" "bool" // true if password protected | |
} | |
"server_pre_shutdown" // server is about to be shut down | |
{ | |
"reason" "string" // reason why server is about to be shut down | |
} | |
"server_shutdown" // server shut down | |
{ | |
"reason" "string" // reason why server was shut down | |
} | |
"server_message" // a generic server message | |
{ | |
"text" "string" // the message text | |
} | |
"server_cvar" // a server console var has changed | |
{ | |
"cvarname" "string" // cvar name, eg "mp_roundtime" | |
"cvarvalue" "string" // new cvar value | |
} | |
"server_addban" | |
{ | |
"name" "string" // player name | |
"userid" "short" // user ID on server | |
"networkid" "string" // player network (i.e steam) id | |
"ip" "string" // IP address | |
"duration" "string" // length of the ban | |
"by" "string" // banned by... | |
"kicked" "bool" // whether the player was also kicked | |
} | |
"server_removeban" | |
{ | |
"networkid" "string" // player network (i.e steam) id | |
"ip" "string" // IP address | |
"by" "string" // removed by... | |
} | |
"player_activate" | |
{ | |
"userid" "short" // user ID on server | |
} | |
"player_connect_full" // player has sent final message in the connection sequence | |
{ | |
"userid" "short" // user ID on server | |
"index" "byte" // player slot (entity index-1) | |
"PlayerID" "short" | |
} | |
"player_say" | |
{ | |
"userid" "short" // user ID on server | |
"text" "string" // the say text | |
} | |
"player_full_update" | |
{ | |
"userid" "short" // user ID on server | |
"count" "short" // Number of this full update | |
} | |
"player_connect" // a new client connected | |
{ | |
"name" "string" // player name | |
"index" "byte" // player slot (entity index-1) | |
"userid" "short" // user ID on server (unique on server) | |
"networkid" "string" // player network (i.e steam) id | |
"address" "string" // ip:port | |
"bot" "bool" | |
} | |
"player_disconnect" // a client was disconnected | |
{ | |
"userid" "short" // user ID on server | |
"reason" "short" // see networkdisconnect enum protobuf | |
"name" "string" // player name | |
"networkid" "string" // player network (i.e steam) id | |
"PlayerID" "short" | |
} | |
"player_info" // a player changed his name | |
{ | |
"name" "string" // player name | |
"index" "byte" // player slot (entity index-1) | |
"userid" "short" // user ID on server (unique on server) | |
"networkid" "string" // player network (i.e steam) id | |
"bot" "bool" // true if player is a AI bot | |
} | |
"player_spawn" // player spawned in game | |
{ | |
"userid" "short" // user ID on server | |
} | |
////////////////////////////////////////////////////////////////////// | |
// HLTV specific events | |
////////////////////////////////////////////////////////////////////// | |
"hltv_cameraman" // a spectator/player is a cameraman | |
{ | |
"index" "short" // camera man entity index | |
} | |
"hltv_chase" // shot of a single entity | |
{ | |
"target1" "short" // primary traget index | |
"target2" "short" // secondary traget index or 0 | |
"distance" "short" // camera distance | |
"theta" "short" // view angle horizontal | |
"phi" "short" // view angle vertical | |
"inertia" "byte" // camera inertia | |
"ineye" "byte" // diretcor suggests to show ineye | |
} | |
"hltv_rank_camera" // a camera ranking | |
{ | |
"index" "byte" // fixed camera index | |
"rank" "float" // ranking, how interesting is this camera view | |
"target" "short" // best/closest target entity | |
} | |
"hltv_rank_entity" // an entity ranking | |
{ | |
"index" "short" // entity index | |
"rank" "float" // ranking, how interesting is this entity to view | |
"target" "short" // best/closest target entity | |
} | |
"hltv_fixed" // show from fixed view | |
{ | |
"posx" "long" // camera position in world | |
"posy" "long" | |
"posz" "long" | |
"theta" "short" // camera angles | |
"phi" "short" | |
"offset" "short" | |
"fov" "float" | |
"target" "short" // follow this entity or 0 | |
} | |
"hltv_message" // a HLTV message send by moderators | |
{ | |
"text" "string" | |
} | |
"hltv_status" // general HLTV status | |
{ | |
"clients" "long" // number of HLTV spectators | |
"slots" "long" // number of HLTV slots | |
"proxies" "short" // number of HLTV proxies | |
"master" "string" // disptach master IP:port | |
} | |
"hltv_title" | |
{ | |
"text" "string" | |
} | |
"hltv_chat" // a HLTV chat msg sent by spectators | |
{ | |
"text" "string" | |
} | |
"hltv_versioninfo" | |
{ | |
"version" "byte" | |
} | |
"demo_start" | |
{ | |
"local" "1" | |
"dota_combatlog_list" "local" // CSVCMsgList_GameEvents that are combat log events | |
"dota_hero_chase_list" "local" // CSVCMsgList_GameEvents | |
"dota_pick_hero_list" "local" // CSVCMsgList_GameEvents | |
} | |
"demo_stop" | |
{ | |
} | |
"demo_skip" | |
{ | |
"local" "1" | |
"playback_tick" "long" // current playback tick | |
"skipto_tick" "long" // tick we're going to | |
"user_message_list" "local" // CSVCMsgList_UserMessages | |
"dota_hero_chase_list" "local" // CSVCMsgList_GameEvents | |
} | |
"map_shutdown" | |
{ | |
} | |
"map_transition" | |
{ | |
} | |
"hostname_changed" | |
{ | |
"hostname" "string" | |
} | |
"difficulty_changed" | |
{ | |
"newDifficulty" "short" | |
"oldDifficulty" "short" | |
"strDifficulty" "string" // new difficulty as string | |
} | |
////////////////////////////////////////////////////////////////////// | |
// Instructor / Hint Events | |
////////////////////////////////////////////////////////////////////// | |
"instructor_start_lesson" | |
{ | |
"hint_name" "string" // Name of the lesson to start. Must match instructor_lesson.txt | |
"hint_target" "long" // entity id that the hint should display at. Leave empty if controller target | |
} | |
"instructor_close_lesson" | |
{ | |
"hint_name" "string" // Name of the lesson to start. Must match instructor_lesson.txt | |
} | |
"instructor_server_hint_create" //create a hint using data supplied entirely by the server/map. Intended for hints to smooth playtests before content is ready to make the hint unneccessary. NOT INTENDED AS A SHIPPABLE CRUTCH | |
{ | |
"userid" "short" // user ID of the player that triggered the hint | |
"hint_entindex" "long" // entity id of the env_instructor_hint that fired the event | |
"hint_name" "string" // what to name the hint. For referencing it again later (e.g. a kill command for the hint instead of a timeout) | |
"hint_replace_key" "string" // type name so that messages of the same type will replace each other | |
"hint_target" "long" // entity id that the hint should display at | |
"hint_activator_userid" "short" // userid id of the activator | |
"hint_timeout" "short" // how long in seconds until the hint automatically times out, 0 = never | |
"hint_icon_onscreen" "string" // the hint icon to use when the hint is onscreen. e.g. "icon_alert_red" | |
"hint_icon_offscreen" "string" // the hint icon to use when the hint is offscreen. e.g. "icon_alert" | |
"hint_caption" "string" // the hint caption. e.g. "#ThisIsDangerous" | |
"hint_activator_caption" "string" // the hint caption that only the activator sees e.g. "#YouPushedItGood" | |
"hint_color" "string" // the hint color in "r,g,b" format where each component is 0-255 | |
"hint_icon_offset" "float" // how far on the z axis to offset the hint from entity origin | |
"hint_range" "float" // range before the hint is culled | |
"hint_flags" "long" // hint flags | |
"hint_binding" "string" // bindings to use when use_binding is the onscreen icon | |
"hint_allow_nodraw_target" "bool" // if false, the hint will dissappear if the target entity is invisible | |
"hint_nooffscreen" "bool" // if true, the hint will not show when outside the player view | |
"hint_forcecaption" "bool" // if true, the hint caption will show even if the hint is occluded | |
"hint_local_player_only" "bool" // if true, only the local player will see the hint | |
"hint_start_sound" "string" // Game sound to play | |
"hint_layoutfile" "string" // Path for Panorama layout file | |
"hint_vr_panel_type" "short" // Attachment type for the Panorama panel | |
"hint_vr_height_offset" "float" // Height offset for attached panels | |
"hint_vr_offset_x" "float" // offset for attached panels | |
"hint_vr_offset_y" "float" // offset for attached panels | |
"hint_vr_offset_z" "float" // offset for attached panels | |
} | |
"instructor_server_hint_stop" //destroys a server/map created hint | |
{ | |
"hint_name" "string" // The hint to stop. Will stop ALL hints with this name | |
"hint_entindex" "long" // entity id of the env_instructor_hint that fired the event | |
} | |
"set_instructor_group_enabled" | |
{ | |
"group" "string" | |
"enabled" "short" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment