Skip to main content

A package for creating CS:GO inventory shuffle config files

Project description

csgoinvshuffle

PyPI version GitHub license GitHub issues PyPI - Downloads Tests Codecov

Description

csgoinvshuffle is a Python package designed to generate inventory shuffle config files for the game CS:GO.

With this package you can easily shuffle between different weapon types (e.g. M4A4 and M4A1-S) and have less limits in customizing the shuffle experience than with the in-game settings.

Note:

CS:GO never really queues your items in a random order. The items are arranged in one simple, predefined cycle. This package aims to creating shuffles to your liking with ease

You can use the config file it creates and replace <path_to_your_steam>/userdata/<your_steam_3id>/730/remote/cfg/csgo_saved_item_shuffles.txt with it to apply your config.

HINT:

CS:GO needs to be closed while replacing the file

How to install

pip install csgoinvshuffle

Basic usage

Your steam inventory needs to be public!

Basic shuffle for everything in your inventory with randomness

from csgoinvshuffle import ShuffleConfig, get_inventory

with ShuffleConfig() as sc:
    sc.add_items(get_inventory("YOUR_STEAM_ID_64"))
    sc.randomize()

Give items a certain order in the cycle

from csgoinvshuffle import ShuffleConfig, get_inventory
from csgoinvshuffle.enums import TagsInternalName

# This example only works if you have at least 4 music kits in your inventory
sc = ShuffleConfig()
inv = get_inventory("YOUR_STEAM_ID_64")
music_kits = inv.filter(TagsInternalName.MUSIC_KITS)
sc.set_item(0 , music_kits[3])
sc.set_item(1, music_kits[1])
sc.save()

As you can see in the last example, an inventory is equipped with a filter attribute and can be handled like a list. You can filter for enums and the filter uses the TagsInternalName by default, as it is the most useful one. Otherwise using the built-in filter() function on the Inventory Object is suggested. To get an overview of what values the attributes of an Item can have, you can lookup https://steamcommunity.com/inventory/<YOUR_STEAM_ID_64>/730/2 or lookup the typing definitions inside the item class. As mentioned, typical values for the property tags_internal_name are provided by the TagsInternalName enum.

Create a shuffle cycle for only one team side

from csgoinvshuffle import ShuffleConfig, get_inventory
from csgoinvshuffle.enums import TagsInternalName, TeamSide

with ShuffleConfig() as sc:
    inv = get_inventory("YOUR_STEAM_ID_64")
    knives = inv.filter(TagsInternalName.KNIVES)
    classic_knife = knives.filter(TagsInternalName.CLASSIC_KNIFE)[0]
    karambit = knives.filter(TagsInternalName.KARAMBIT_KNIFE)[0]
    butterfly = filter(lambda x: x.custom_name == "crypto is for n00bs", knives)[0]
    # First map karambit, second map classic knife, third map butterfly, next map karambit again...
    # On T side only
    my_shuffle_cycle = [karambit, classic_knife, butterfly]
    sc.add_items(my_shuffle_cycle, TeamSide.T)

By default, the attribute methods from ShuffleConfig do everything for both teams. If you want to have different shuffle cycles on the opposing sides, you have to state it with a parameter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csgoinvshuffle-1.3.10.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csgoinvshuffle-1.3.10-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file csgoinvshuffle-1.3.10.tar.gz.

File metadata

  • Download URL: csgoinvshuffle-1.3.10.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for csgoinvshuffle-1.3.10.tar.gz
Algorithm Hash digest
SHA256 01caaaeb5494edba1bd28658bbd7d31d620c95951b07a2d55da59a69d59296e8
MD5 ac38080a0862ab81cc13db97b643d5c0
BLAKE2b-256 45b7b26cb2b24a6c3de5fe7323d3dee64c27996c423e71543ace79bb713cb1a8

See more details on using hashes here.

File details

Details for the file csgoinvshuffle-1.3.10-py3-none-any.whl.

File metadata

File hashes

Hashes for csgoinvshuffle-1.3.10-py3-none-any.whl
Algorithm Hash digest
SHA256 656afa3f91b02f2b36c41d06696240f4168f0778bfb3d53b30a2b21163572f10
MD5 da987e4d73152e630d56cb07524d62d3
BLAKE2b-256 8ed2b251d533cf659411a911bf9a70df4f32459a8ac36a04dcb1ce421f866147

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page