SteamKit icon indicating copy to clipboard operation
SteamKit copied to clipboard

[NetHook2]: The value_bytes of CSOEconItemAttribute is unreadable

Open jlj089742 opened this issue 1 year ago • 2 comments

What did you expect to happen?

When using NetHook2 to parse CS2, I noticed that k_ESOMsg-UupdateMultiple carries econ_item information. I expect that the CSOEconItemAttribute in it can parse out readable information.

Instead of that, what actually happened?

When using NetHook2 to parse CS2, I noticed that k_ESOMsg-UupdateMultiple carries econ_item information, as shown in the figure. But what is confusing is that the value-bytes field value of the econ_item attribute is automatically parsed as Hexadecimal, which does not meet expectations. Do we need to perform other parsing here?

Image

Relevant log output


Example Code


Additional Information

No response

jlj089742 avatar Sep 11 '25 06:09 jlj089742

This is to be expected. These values are in hex because only the game knows how to interpret them. The datatype value_bytes represents is dependent on def_index, the details of which can be found in items_game.txt.

For example attribute 75:

"75"
{
   "name"      "tradable after date"
   "attribute_class"    "tradable_after_date"
   "description_format"    "value_is_date"
   "description_string"    "#Attrib_TradableAfterDate"
   "hidden"    "1"
   "effect_type"     "negative"
   "stored_as_integer"     "1"
}

A value_bytes of F009AC68, interpreted as a little-endian unsigned integer (per stored_as_integer being set to 1), would be 1756105200

Citrinate avatar Sep 12 '25 04:09 Citrinate

Thank you. This is absolutely correct, and it has solved my problem.

jlj089742 avatar Sep 16 '25 04:09 jlj089742