csgo

package
v0.0.0-...-27795a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 6 Imported by: 0

README

csgo

This file represents notes for interpreting the items_game.txt file.

items_game file structure

items_game
|
|_ rarities
   |
   |_ rarity_key [variable]
      |
      |_ value
      |_ loc_key
      |_ loc_weapon_key
      |_ loc_weapon_character
|
|_ qualities
   |
   |_ quality_key [variable]
      |
      |_ value
      |_ hexColor
|
|_ colors
   |
   |_ color_key [variable]
      |_ color_name
      |_ hex_color
|
|_ graffiti_tints
   |
   |_ graffiti_tint_key [variable]
      |
      |_ id
      |_ hex_color
|
|_ alternate_icons2
   |
   |_ weapon_icons
      |
      |_ weapon_icon_key [variable]
         |
         |_ icon_path
   |
   |_ casket_icons
      |
      |_ casket_icon_key [variable]
         |
         |_ icon_path
|
|_ prefabs
   |
   |_ prefab_key [variable]
|
|_ items
   |
   |_ item_key [variable]
      |
      |_ name
|
|_ music_definitions
   |
   |_ music_definition_key [variable]
      |
      |_ name
      |_ loc_name
      |_ loc_description
...
items breakdown

weapons

  • all weapons have a prefab, so to detect, simply lookup prefab map of prefabs we are interested in.

collectible coins

  • item_name begins with #CSGO_CollectibleCoin_
  • also have prefabs of pickem_trophy, majors_trophy, and collectible_untradable_coin

season pass

  • item_name begins with #CSGO_Ticket_
  • has prefab of season_pass

collectible

  • item_name begins with #CSGO_Collectible_

csgo tool

  • item_name begines with #CSGO_Tool_ or #CSGO_tool_

case/capsule key

  • has prefab of valve weapon_case_key - the prefab is the second part, or a prefab of just weapon_case_key

campaign

  • item_name starts with #csgo_campaign
  • prefab of valve campaign_prefab or campaign_prefab

game license

  • is a coin that so far cannot be categorised

weapon crate

  • has prefab of weapon_case or weapon_case_souvenirpkg
  • item_name begins with CSGO_crate
  • has tags > ItemSet > tag_value of a weapon set

sticker capsule

  • has prefab of sticker_capsule
  • examples without prefab:
    • crate_signature_pack_stockh2021_group_finalists
    • CSGO_crate_signature_pack_atlanta2017_astr
  • stickers located through attributes > set supply crate series > value which points to a revolving_loot_list
  • NOTE: their item_names begin with #CSGO_crate and they link out to a revolving_loot_list. Maybve this can be used to identify #CSGO_crate types. IF THEY DON'T LINK OUT TO A REVOLVING_LOOT_LIST, THEN THEY HAVE A LOOT_LIST_NAME that can be used.

operator_dossier

  • Example: character_operator_dossier_op09_ancient
  • loot_list_name filed points directly to a client_loot_list

prefabs breakdown

All items (except for default) have a prefab.

weapon_case_base

Can be:

  • Sticker Pack (Capsule)
  • Special Weapon Case (see crate_xray_p250)
  • Pins capsule
  • Music Kit capsule
  • Operator Dossier
  • Weapon Set (as item, beginning with #CSGO_set_), these can be ignored

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Csgo

type Csgo struct {

	// CSGO types
	Rarities    map[string]*Rarity     `json:"Rarities"`
	Paintkits   map[string]*Paintkit   `json:"Paintkits"`
	Stickerkits map[string]*Stickerkit `json:"Stickerkits"`
	WeaponSets  map[string]*WeaponSet  `json:"WeaponSets"`
	KnifeSet    map[string][]string    `json:"KnifeSet"`
	GloveSet    map[string][]string    `json:"GloveSet"`

	// items
	Guns            map[string]*Weapon         `json:"Guns"`
	Knives          map[string]*Weapon         `json:"Knives"`
	Gloves          map[string]*Gloves         `json:"Gloves"`
	Equipment       map[string]*Equipment      `json:"Equipment"`
	WeaponCrates    map[string]*WeaponCrate    `json:"WeaponCrates"`
	StickerCapsules map[string]*StickerCapsule `json:"StickerCapsules"`
}

Csgo is a representation of all Csgo items that are relevant to interpreting the game_items file.

func New

func New(languageData, itemData map[string]interface{}) (*Csgo, error)

New takes the required languageData and itemData maps (from csgo_english.txt and items_game.txt respectively) and extracts the desired sub elements from them, returning a fully instantiated Csgo.

type Equipment

type Equipment struct {
	Id          string `json:"id"`
	Index       int    `json:"index"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Equipment represents miscellaneous items in game that don't constitute weapons.

type Gloves

type Gloves struct {
	Id          string `json:"id"`
	Index       int    `json:"index"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Gloves represents a special skinnable item that isn't a Weapon.

type Paintkit

type Paintkit struct {
	Id          string          `json:"id"`
	Name        string          `json:"name"`
	Description string          `json:"description"`
	RarityId    string          `json:"rarityId"`
	MinFloat    decimal.Decimal `json:"minFloat"`
	MaxFloat    decimal.Decimal `json:"maxFloat"`
}

Paintkit represents the image details of a skin, i.e. the available float range the skin can be in. Every entities.Skin has an associated Paintkit.

type Rarity

type Rarity struct {
	Id                  string `json:"id"`
	Index               int    `json:"index"`
	GeneralRarityName   string `json:"generalRarityName"`
	WeaponRarityName    string `json:"weaponRarityName"`
	CharacterRarityName string `json:"characterRarityName"`
}

Rarity represents a Csgo item Rarity.

type StickerCapsule

type StickerCapsule struct {
	Id          string   `json:"id"`
	Index       int      `json:"index"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
	StickerKits []string `json:"stickerKits"`
}

StickerCapsule represents an openable capsule that contains stickers. The capsule's stickers are determined by the linked clientLootListId (client_loot_list).

type Stickerkit

type Stickerkit struct {
	Id          string `json:"id"`
	Index       int    `json:"index"`
	Name        string `json:"name"`
	Description string `json:"description"`
	RarityId    string `json:"rarityId"`
	Variant     string `json:"variant"`
}

Stickerkit represents a Stickerkit object from the items_game file.

type Weapon

type Weapon struct {
	Id          string `json:"id"`
	Index       int    `json:"index"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Weapon represents a skinnable item that is also a Weapon in Csgo.

type WeaponCrate

type WeaponCrate struct {
	Id          string `json:"id"`
	Index       int    `json:"index"`
	Name        string `json:"name"`
	Description string `json:"description"`

	// WeaponSetId is the ID of the WeaponSet for the item/Paintkit combinations
	// available in the crate.
	WeaponSetIds []string `json:"weaponSetIds"`

	// QualityCapability shows whether the crate can produce special skin qualities
	// e.g. Souvenir or StatTrak™
	QualityCapability WeaponQuality `json:"qualityCapability"`
}

WeaponCrate represents an openable crate that contains items. The crate's items are determined by the linked WeaponSet (item_set).

type WeaponQuality

type WeaponQuality string

WeaponQuality represents a skin type, e.g. StatTrak™ or Souvenir

var (
	QualityNormal   WeaponQuality = ""
	QualityStatTrak WeaponQuality = "StatTrak™"
	QualitySouvenir WeaponQuality = "Souvenir"
)

type WeaponSet

type WeaponSet struct {
	Id          string              `json:"id"`
	Name        string              `json:"name"`
	Description string              `json:"description"`
	Items       map[string][]string `json:"items"`
}

WeaponSet represents a WeaponSet of items from the items_game file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL