Commit Graph

12 Commits

Author SHA1 Message Date
Cal Corum
30285644d6 Optimize item tags for proper loot spawning
- Cards: Collection + Luxury (removed Misc for rarer spawns)
- Packs: Collection + Misc (findable in misc loot)
- Binder/Sheet: Collection + Luxury (removed Tool placeholder)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 23:41:38 -06:00
Cal Corum
aea9f81d1f Release Candidate 2 for v1.0.0
- Add custom icons for storage items (Card Binder, Binder Sheet)
- Add mod preview image for in-game mod manager
- Update deploy script to copy assets folder
- Icons generated with Z-Image using vinyl toy style to match game aesthetic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 23:23:59 -06:00
Cal Corum
d0663d569a Fix storage slot filtering with parent tag system and add F10 spawn window
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>
2025-11-23 00:03:18 -06:00
Cal Corum
1050d4f018 Add hierarchical storage system, card set exclusion, and weight adjustments
**Storage System Improvements:**
- Renamed "Card Binder" → "Binder Sheet" (9 slots, weight 0.1)
- Renamed "Card Box" → "Card Binder" (12 slots, weight 1.5)
- Implemented nested storage: Binder Sheets can be stored in Card Binders
- Created new "BinderSheet" tag for hierarchical filtering
- Updated StorageHelper to support multi-tag slot filtering

**Card Set Management:**
- Added folder prefix exclusion: folders starting with `_` are skipped
- Skipped sets are logged and counted
- ModConfig displays disabled card sets count

**Technical Changes:**
- TagHelper: Added GetOrCreateBinderSheetTag() method
- StorageHelper: Modified CreateCardStorage() to accept List<Tag>
- ModBehaviour: Added _skippedSetsCount field and exclusion logic
- Updated documentation (CLAUDE.md, README.md)

**Why:**
- Hierarchical storage provides better organization for large collections
- Lighter weights make storage items more practical
- Folder exclusion enables easy management of WIP/seasonal content
- Multi-tag filtering creates flexible storage systems

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 23:22:43 -06:00
Cal Corum
58b435028e Release Candidate 1 for v1.0.0
Release candidate for first stable release of Trading Card Mod.

Changes in this RC:
- Added VERSION file tracking release versions
- Standardized card weight to 0.05 across all card sets
- Updated documentation (README.md, CLAUDE.md) for ModConfig integration
- Updated card format to include optional Description field
- Documented Collection and Misc tags for cards
- All features complete: cards, packs, storage, ModConfig integration

Features:
- Custom card sets with user-provided artwork
- Card packs with gacha-style mechanics
- Storage system (9-slot binders, 36-slot boxes)
- ModConfig integration for enhanced card info
- 93 cards across 2 example sets (ExampleSet, PokemonGO)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 00:41:03 -06:00
Cal Corum
42b71e3447 Add sprite padding, updated values, and deploy improvements
Sprite fixes:
- Pad rectangular card images to squares with transparent pixels
- Centers image to maintain aspect ratio in game preview UI

Card values updated to new scale:
- Common: 25, Uncommon: 100, Rare: 500
- Very Rare: 2500, Ultra Rare: 12500, Legendary: 62500

Deploy script improvements:
- Add --no-example flag to exclude ExampleSet during testing
- Show which sets are copied/skipped during deployment

Git configuration:
- Only track ExampleSet in CardSets/, ignore user content

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 23:02:17 -06:00
Cal Corum
80da308d17 Add ModConfig integration for card set info display
Integrate with ModOptions workshop mod to display loaded card sets
information in the game's Settings menu. Uses read-only dropdowns
(single-option) to show data without allowing user modification.

Features:
- ModConfigApi.cs wrapper for safe ModConfig interaction
- Auto-detect ModConfig availability via OnModActivated event
- Display total cards, total packs, and per-set card counts
- Graceful fallback when ModConfig not installed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:06:15 -06:00
Cal Corum
91ee0333db Implement card pack system with gacha mechanics
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>
2025-11-19 21:44:29 -06:00
Cal Corum
0d9ab65422 Implement Phase 3: Storage system with slot filtering
- Add StorageHelper.cs for creating filtered storage items
- Create Card Binder (9 slots) and Card Box (36 slots)
- Slots use requireTags to only accept TradingCard tagged items
- Update debug spawn (F9) to cycle through cards and storage items
- Move initialization from Start() to Awake() to fix save/load crash
- Add safety patch for missing item warnings
- Items now persist correctly across game saves

Storage items clone base item 1255 which has slot support, then
configure slots with TradingCard tag requirement.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 17:12:03 -06:00
Cal Corum
d05ba64700 Implement Phase 2: Core card framework with clone + reflection
- 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>
2025-11-19 16:56:04 -06:00
Cal Corum
8d23f152eb Add unit testing framework and refactor parsing logic
- 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>
2025-11-18 19:40:43 -06:00
Cal Corum
9704516dd7 Initial commit: Trading Card Mod scaffold for Escape from Duckov
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>
2025-11-18 18:55:04 -06:00