Counter-Strike: Global Offensive Economy Items

From Valve Developer Community
Jump to: navigation, search
Underlinked - Logo.png
This article needs more links to other articles to help integrate it into the encyclopedia. Please help improve this article by adding links that are relevant to the context within the existing text.
January 2024

This page outlines the basics of Counter-Strike: Global Offensive economy items and ways to inspect them.

Counter-Strike: Global Offensive

CS:GO Inventory

Every user can locate their CS:GO inventory items at https://steamcommunity.com/my/inventory/#730

Clicking on inventory items will provide full item description including a button to "Inspect in Game...", which typically has a link formatted as steam://rungame/730/#/+csgo_econ_action_preview%20(S#)(A#)(D#)

Clicking the "Inspect in Game..." button will launch CS:GO game client if it is not already running, and will show the full in-game item inspection panel which will render the economy item exactly as it appears in game and will play the standard inspect animation.

CS:GO Community Market

Steam users can find CS:GO items on Community Market at https://steamcommunity.com/market/search?appid=730

Most CS:GO items have unique material finish pattern and wear pattern, so users can buy individual listings from a large table of listings in each item bucket category. Commodity CS:GO items are an exception, where all individual items are effectively identical and individual listings aren't accessible.

Each individual market listing icon has a little triangle button appearing in icon's lower right corner on mouse hover. Clicking the little triangle button opens a context menu with a button to "Inspect in Game...", which typically has a link formatted as steam://rungame/730/#/+csgo_econ_action_preview%20(M#)(A#)(D#).

Clicking the "Inspect in Game..." button will launch CS:GO game client if it is not already running, and will show the full in-game item inspection panel which will render the economy item exactly as it appears in game and will play the standard inspect animation.

Console Command

In addition to inspecting from "Inspect in Game..." button on the web, CS:GO game client also provides a hidden console command csgo_econ_action_preview which can be passed the long string containing letters and numbers as used in Steam Community Inventory and Community Market.

When the command is issued, CS:GO game client will contact CS:GO backend to retrieve full details about the individual economy item and will show the in-game item inspection panel which will render the economy item exactly as it appears in game and will play the standard inspect animation. This allows to see the exact item rendered in game before user acquires the item via Steam Trading or Community Market.

Preview Protocol Implementation

CS:GO game client uses protobuf command 9156 to request the full details about the individual economy item from CS:GO backend.

enum ECsgoGCMsg
{
	k_EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest = 9156;
};
message CMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest
{
	optional uint64 param_s = 1;
	optional uint64 param_a = 2;
	optional uint64 param_d = 3;
	optional uint64 param_m = 4;
};

When inspecting an item from user's inventory, request message must set parameters param_s, param_a, and param_d to the corresponding numeric values of (S#), (A#), and (D#) of the "Inspect in Game..." link.

When inspecting an item from Community Market, request message must set parameters param_m, param_a, and param_d to the corresponding numeric values of (M#), (A#), and (D#) of the "Inspect in Game..." link.

If the request parameters were specified correctly, and if the client is not violating request rate limits, then CS:GO backend will respond using protobuf command 9157.

enum ECsgoGCMsg
{
	k_EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockResponse = 9157;
};
message CEconItemPreviewDataBlock
{
	message Sticker
	{
		optional uint32 slot = 1;
		optional uint32 sticker_id = 2;
		optional float wear = 3;
		optional float scale = 4;
		optional float rotation = 5;
		optional uint32 tint_id = 6;
	};

	optional uint32 accountid = 1;
	optional uint64 itemid = 2;
	optional uint32 defindex = 3;
	optional uint32 paintindex = 4;
	optional uint32 rarity = 5;
	optional uint32 quality = 6;
	optional uint32 paintwear = 7;
	optional uint32 paintseed = 8;
	optional uint32 killeaterscoretype = 9;
	optional uint32 killeatervalue = 10;
	optional string customname = 11;
	repeated Sticker stickers = 12;
	optional uint32 inventory = 13;
	optional uint32 origin = 14;
	optional uint32 questid = 15;
	optional uint32 dropreason = 16;
	optional uint32 musicindex = 17;
};
message CMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockResponse
{
	optional CEconItemPreviewDataBlock iteminfo = 1;
};

External links