Skip to content

(Core) Trade ups#123

Open
dricotec wants to merge 3 commits into
mikkokko:masterfrom
dricotec:Trade-Ups
Open

(Core) Trade ups#123
dricotec wants to merge 3 commits into
mikkokko:masterfrom
dricotec:Trade-Ups

Conversation

@dricotec

@dricotec dricotec commented May 4, 2026

Copy link
Copy Markdown

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.

dricotec and others added 2 commits May 4, 2026 09:05
Added trade-up completion chat broadcast.
@dricotec dricotec mentioned this pull request May 4, 2026
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>
@dricotec dricotec mentioned this pull request May 15, 2026
@al9nked

al9nked commented Jun 7, 2026

Copy link
Copy Markdown

how to use this bro

@dricotec

dricotec commented Jun 7, 2026

Copy link
Copy Markdown
Author

how to use this bro

https://github.com/GT-610/csgo_gc

Repo with my pull requests, with a continuous build. Download from there and you can use it.

@al9nked

al9nked commented Jun 7, 2026

Copy link
Copy Markdown

@dricotec

dricotec commented Jun 9, 2026

Copy link
Copy Markdown
Author

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants