Storage Fix:
- Implemented CardBinderContent parent tag shared by cards and binder sheets
- Fixed Card Binder slots to use single tag requirement (CardBinderContent)
- Unity's requireTags uses AND logic, not OR - previous approach required items to have ALL tags
- Storage hierarchy now works correctly:
* Cards can be stored in Binder Sheets (requires TradingCard tag)
* Cards can be stored in Card Binders (requires CardBinderContent tag)
* Binder Sheets can be stored in Card Binders (requires CardBinderContent tag)
* Binder Sheets cannot be stored in other Binder Sheets (lacks TradingCard tag)
F10 Spawn Window:
- Replaced F9 key cycling with OnGUI floating window (changed to F10 to avoid mod conflicts)
- Added buttons for spawning Card Binder and Binder Sheet
- Added buttons for spawning random cards by rarity (Common, Uncommon, Rare, Very Rare, Ultra Rare)
- Window is draggable and positioned to avoid UI overlap
Cleanup:
- Removed ExampleSet placeholder card data
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add card packs that can be opened via right-click Use menu to receive
random cards based on weighted slot configurations. Packs support
customizable rarity-based or card-specific drop rates.
Key features:
- CardPack/PackSlot data classes with weighted random selection
- PackParser for user-defined pack configurations
- PackUsageBehavior extending game's UsageBehavior system
- Runtime data lookup to handle Unity serialization limitations
- Pack consumption after opening with stack support
- Auto-generated default packs per card set
Technical notes:
- UsageUtilities registration for context menu integration
- All non-serializable fields (Dictionary, List<PackSlot>) looked up
at runtime from ModBehaviour to survive Unity instantiation
- F9 debug spawn now uses InstantiateSync for proper item copies
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add ItemExtensions.cs with reflection helpers for private field access
- Add TagHelper.cs for game tag operations and custom TradingCard tag
- Rewrite ModBehaviour.cs with complete item creation pipeline:
- Clone base game item (ID 135) as template
- Set properties via reflection (typeID, weight, value, quality)
- Load PNG sprites from CardSets/*/images/
- Register items with ItemAssetsCollection
- Proper cleanup on mod unload
- Add F9 debug key to spawn cards for testing
- Add deploy.sh and remove.sh scripts for quick mod installation
- Add placeholder card images for ExampleSet
- Add Unity module references (ImageConversion, InputLegacy)
Cards now appear in-game with custom icons and can be spawned to inventory.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created TradingCardMod.Tests.csproj with xUnit for testable components
- Extracted CardParser.cs with pure parsing logic (no Unity deps)
- Extracted TradingCard.cs data class from ModBehaviour
- Added 37 unit tests covering parsing, validation, rarity mapping
- Updated cards.txt format with optional description field
- Fixed DLL references (explicit HintPath for paths with spaces)
- Fixed Harmony UnpatchAll API usage
- Updated CLAUDE.md with test commands and current project status
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Set up project structure with:
- .NET Standard 2.1 project targeting Duckov modding API
- ModBehaviour entry point with card set loading system
- Harmony patching infrastructure (depends on HarmonyLoadMod)
- Pipe-separated card definition format for user-generated content
- Example card set and documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>