YASI is a Python-based tool for simulating Steam game idling to trigger trading card drops. It uses the Steamworks SDK to make Steam believe a game is running and monitors your inventory for new cards. A PowerShell script (yasim.ps1) wrapped by a batch file (yasim.bat) is provided to manage idling multiple games sequentially.
- Simulates running a game on Steam using the official Steamworks SDK.
- Does NOT require you to provide your Steam login credentials.
- Monitors your public Steam inventory for new trading cards for a specified game. Your Steam inventory must be set to public for this to work.
- Inventory checking toggle: Can be disabled to use timed idling mode instead of inventory monitoring.
- Stops idling for a game once a target number of cards is reached or a specified number of new cards have dropped.
- Supports batch processing of multiple games from a list.
- Fetches and displays game names in logs for better readability.
- Configurable monitoring interval and pause between games.
- Maximum idle time limits to prevent excessive idling per game.
- Windows Operating System: The current iteration relies on
steam_api64.dlland uses PowerShell/Batch scripts for management. - Python 3.x: Download and install from python.org. Ensure Python is added to your PATH.
- Requests Library: Install using pip:
pip install requests
- Steam Client: Must be running and you must be logged into your Steam account.
- Steamworks SDK:
- Download the latest Steamworks SDK from the Steamworks partner site (requires partner access).
- Extract the SDK.
- Create a subdirectory named
sdkin the same directory asyasi.py. - Copy the
redistributable_bin\win64\steam_api64.dllfile from the SDK intoyasi\sdk\redistributable_bin\win64\. The final path should beyasi\sdk\redistributable_bin\win64\steam_api64.dllrelative toyasi.py.
Configuration is split into three main JSON files and one text file for game lists:
-
config.json: General application settings.steam_community_appid: The AppID for Steam Community items (usually753).trading_card_context_id: The context ID for trading cards in the inventory (usually6).default_monitoring_interval_seconds: How often (in seconds) to check your inventory for new cards (e.g.,300for 5 minutes).pause_between_games_seconds: How long (in seconds)yasim.ps1should pause before starting the next game in a batch (e.g.,10).max_idle_minutes_per_card: Maximum time to idle per expected card drop (e.g.,30minutes).enable_inventory_checking: Set totrueto monitor your Steam inventory for card drops, orfalseto use timed idling mode instead.
Example
config.json:{ "steam_community_appid": 753, "trading_card_context_id": 6, "default_monitoring_interval_seconds": 300, "pause_between_games_seconds": 10, "max_idle_minutes_per_card": 35, "enable_inventory_checking": true } -
user.json: User-specific settings.steam_id_64: Your 17-digit SteamID64. You can find this using sites like SteamID.io.- A
user.json.tmplis provided as a template. Rename or copy it touser.jsonand fill in your details.
Example
user.json:{ "steam_id_64": "YOUR_STEAM_ID_64_HERE" } -
apps.txt(or any filename you choose): List of games to process in batch mode.- Each line should contain a game AppID (or a full Steam game/card URL) followed by a target specification.
- Lines starting with
#or//are treated as comments and skipped. - Empty lines are also skipped.
- Target Specification:
tX: Target a total of X cards for that game. If you have X or more, it skips.rX: Target X remaining (new) cards. It will idle until X more cards drop than what you had when starting for that game.
Example
apps.txt:# Idle for 2 new cards for Half-Life 2 220 r2 # Idle until a total of 5 cards for Portal 2 https://steamcommunity.com/id/yourprofile/gamecards/620/ t5 # Another game by AppID 400 r1
YASI supports two operational modes controlled by the enable_inventory_checking setting in config.json:
-
Inventory Monitoring Mode (
enable_inventory_checking: true):- Default mode. Monitors your public Steam inventory for card drops.
- Supports both 'total' (
tX) and 'remaining' (rX) target formats. - Requires your Steam inventory to be public.
- Provides real-time feedback on card drops.
-
Timed Idling Mode (
enable_inventory_checking: false):- Uses time-based estimation instead of inventory monitoring.
- Only supports 'remaining' (
rX) target format - 'total' format will be rejected. - Does not require public inventory access.
- Estimates card drops based on idle time (using
max_idle_minutes_per_cardsetting). - Useful when inventory privacy is preferred or inventory monitoring is unreliable.
You can run yasi.py directly to idle a single game.
Command:
python yasi.py -a <AppID> -c <TargetSpec> [-i <IntervalSeconds>]Arguments:
-a <AppID>or--app-id <AppID>: (Required) The AppID of the game to idle.-c <TargetSpec>or--card-target <TargetSpec>: (Required) The card target specification (e.g.,t5for a total of 5,r2for 2 more).-i <IntervalSeconds>or--interval <IntervalSeconds>: (Optional) Override thedefault_monitoring_interval_secondsfromconfig.json.
Example:
To idle game AppID 440 until you have a total of 3 cards, checking every 60 seconds:
python yasi.py -a 440 -c t3 -i 60The yasim.bat script is a convenient wrapper for yasim.ps1 (PowerShell script) to process multiple games listed in a file (e.g., apps.txt).
Command:
yasim.bat <path_to_game_list_file>Example:
If your game list is in apps.txt in the same directory:
yasim.bat apps.txtThis will:
- Read
apps.txt. - For each valid game entry, call
yasi.pywith the appropriate AppID and target. - Pause for the duration specified by
pause_between_games_secondsinconfig.jsonbetween games. - Stream the output from
yasi.pydirectly to the console, including timestamps.
The yasim.ps1 script itself supports a -PauseBetweenGamesSeconds command-line parameter that can override the value from config.json. However, the current yasim.bat is simplified to only pass the game list file path. To use this override, you would need to call yasim.ps1 directly or modify yasim.bat to pass all arguments (%*).
Both yasi.py and yasim.ps1 produce timestamped console output:
- [INFO]: General progress and status messages.
- [DEBUG]: More detailed information (e.g., API URLs, config loading).
- [WARNING]: Non-critical issues (e.g., failed to fetch game name, inventory temporarily inaccessible).
- [ERROR]: Critical issues that may halt processing (e.g., missing config files, Steamworks DLL not found).
Game names are fetched and included in logs alongside AppIDs for easier identification.
- Configuration Loading:
yasi.pyloads settings fromconfig.jsonanduser.json. - Initial Card Check:
- Inventory Monitoring Mode: Before starting Steam simulation,
yasi.pychecks your current card count for the target game. If the target is already met, it exits for that game. - Timed Idling Mode: Skips inventory checking and proceeds directly to Steam simulation.
- Inventory Monitoring Mode: Before starting Steam simulation,
- Steam Simulation:
yasi.pycreates asteam_appid.txtfile with the game's AppID.- It loads
steam_api64.dllusingctypes. - It calls
SteamAPI_InitSafe()to initialize the Steamworks API, making Steam believe the game is running.
- Monitoring Loop:
yasi.pyperiodically callsSteamAPI_RunCallbacks()to keep the Steam connection alive.- Inventory Monitoring Mode: At intervals defined by
monitoring_interval, it fetches your public Steam inventory using the Steam Community web API, counts trading cards, and stops when the target is met. - Timed Idling Mode: Estimates card drops based on elapsed time using the
max_idle_minutes_per_cardsetting, stopping when the target number of estimated drops is reached or maximum idle time is exceeded.
- Shutdown:
yasi.pycallsSteamAPI_Shutdown().- It cleans up the
steam_appid.txtfile.
- Batch Processing (
yasim.ps1/yasim.bat):- The script reads the specified game list file.
- For each game, it invokes
yasi.pyas a separate process and waits for it to complete. - It pauses between games if configured.
This tool interacts with the Steam client and its APIs. Use it at your own risk. When using inventory monitoring mode, ensure your inventory is set to public for the card counting to work. When using timed idling mode, inventory privacy settings do not matter. The effectiveness of idling for card drops can vary and is subject to Steam's policies and drop system.