(Core) Trade ups#123
Open
dricotec wants to merge 3 commits into
Open
Conversation
Added trade-up completion chat broadcast.
Closed
Fix build errors.
GT-610
added a commit
to GT-610/csgo-gc
that referenced
this pull request
May 10, 2026
* Update README.md * Update README.md * Implemented Storage Units * Implemented Stattrak Swaps * Update Readme * Add trade-up chat broadcast Added trade-up completion chat broadcast. * Fix trade-up build Fix build errors. * Fix trade-up reviewer issues --------- Co-authored-by: drico <132640189+dricotec@users.noreply.github.com> Co-authored-by: dricotec <dricotoys@gmail.com>
Open
|
how to use this bro |
Author
https://github.com/GT-610/csgo_gc Repo with my pull requests, with a continuous build. Download from there and you can use it. |
Author
XD, yw dud |
programmer1o1
added a commit
to programmer1o1/cs2_gc
that referenced
this pull request
Jun 14, 2026
Adds k_EMsgGCCraft handling for trade-ups: validates 10 same-rarity items, resolves weighted collection odds from inputs, rolls a candidate from the next rarity tier, and creates the output item. Co-authored-by: dricotec <dricotec@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
programmer1o1
added a commit
to programmer1o1/cs2_gc
that referenced
this pull request
Jun 14, 2026
Adds k_EMsgGCCraft handling for trade-ups: validates 10 same-rarity items, resolves weighted collection odds from inputs, rolls a candidate from the next rarity tier, and creates the output item.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've implemented a pretty good trade up system in my opinion.
Client receives k_EMsgGCCraft and ClientGC::Craft() parses recipe + 10 item IDs.
Validates recipe (-2/12) and ensures all 10 items exist, have paint kits, and share the same rarity.
Inventory::TradeUp() uses the item schema to resolve each input item's collection, and then it builds weighted collection odds based on how many of the 10 inputs came from each collection.
Using those weights, it rolls a random collection, it then queries items_game for trade‑up candidates in that collection at the next rarity.
It then will randomly select a valid skin from that collection and creates the output item without any problems (by far).
The crafted item is created with no prolems and the 10 input items are destroyed.
GC sends destroy/create messages to the game and an ItemCustomizationNotification so inventory updates.