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>
This commit is contained in:
parent
42b71e3447
commit
58b435028e
31
CLAUDE.md
31
CLAUDE.md
@ -77,17 +77,25 @@ The game loads mods from `Duckov_Data/Mods/`. Each mod requires:
|
|||||||
|
|
||||||
- **`TagHelper`** (`src/TagHelper.cs`): Utilities for working with game tags, including creating custom tags.
|
- **`TagHelper`** (`src/TagHelper.cs`): Utilities for working with game tags, including creating custom tags.
|
||||||
|
|
||||||
|
- **`PackUsageBehavior`** (`src/PackUsageBehavior.cs`): Handles card pack opening mechanics. Implements gacha-style random card distribution based on rarity weights.
|
||||||
|
|
||||||
|
- **`ModConfigApi`** (`src/ModConfigApi.cs`): Optional integration with ModConfig mod. Adds card set information (set name, card number, rarity) to item descriptions in inventory.
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
- **HarmonyLoadMod** (Workshop ID: 3589088839): Required mod dependency providing Harmony 2.4.1. Referenced at build time but not bundled to avoid version conflicts.
|
- **HarmonyLoadMod** (Workshop ID: 3589088839): Required mod dependency providing Harmony 2.4.1. Referenced at build time but not bundled to avoid version conflicts.
|
||||||
|
|
||||||
|
- **ModConfig** (Workshop ID: 3592433938): Optional mod dependency. When installed, enhances card descriptions with set information in the inventory UI.
|
||||||
|
|
||||||
### Card Definition Format
|
### Card Definition Format
|
||||||
|
|
||||||
Cards are defined in `CardSets/{SetName}/cards.txt` using pipe-separated values:
|
Cards are defined in `CardSets/{SetName}/cards.txt` using pipe-separated values:
|
||||||
```
|
```
|
||||||
CardName | SetName | SetNumber | ImageFile | Rarity | Weight | Value
|
CardName | SetName | SetNumber | ImageFile | Rarity | Weight | Value | Description (optional)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The Description field is optional. If provided, it will be displayed in the item's in-game description/tooltip.
|
||||||
|
|
||||||
Images go in `CardSets/{SetName}/images/`.
|
Images go in `CardSets/{SetName}/images/`.
|
||||||
|
|
||||||
## Game API Reference
|
## Game API Reference
|
||||||
@ -114,19 +122,23 @@ Key namespaces and APIs from the game:
|
|||||||
|
|
||||||
## Current Project Status
|
## Current Project Status
|
||||||
|
|
||||||
**Phase:** 2 Complete - Core Card Framework ✅
|
**Phase:** 3 Complete - Storage & Pack System ✅
|
||||||
**Next Phase:** 3 - Storage System (Binders)
|
**Status:** Ready for first release candidate
|
||||||
**Project Plan:** `.claude/scratchpad/PROJECT_PLAN.md`
|
**Project Plan:** `.claude/scratchpad/PROJECT_PLAN.md`
|
||||||
**Technical Analysis:** `.claude/scratchpad/item-system-analysis.md`
|
**Technical Analysis:** `.claude/scratchpad/item-system-analysis.md`
|
||||||
|
|
||||||
### Completed Features
|
### Completed Features
|
||||||
|
|
||||||
- Cards load from `CardSets/*/cards.txt` files
|
- Cards load from `CardSets/*/cards.txt` files with optional descriptions
|
||||||
- Custom PNG images display as item icons
|
- Custom PNG images display as item icons
|
||||||
- Cards register as game items with proper TypeIDs
|
- Cards register as game items with proper TypeIDs
|
||||||
- Custom "TradingCard" tag for filtering
|
- Custom "TradingCard" tag for filtering
|
||||||
|
- Card packs with gacha-style mechanics (weighted random distribution)
|
||||||
|
- Storage system with slot-based filtering (9-slot binders, 18-slot boxes)
|
||||||
|
- ModConfig integration for enhanced card info display (set name, number, rarity)
|
||||||
- Debug spawn with F9 key (for testing)
|
- Debug spawn with F9 key (for testing)
|
||||||
- Deploy/remove scripts for quick iteration
|
- Deploy/remove scripts for quick iteration
|
||||||
|
- Unit tests for parsing logic and pack system
|
||||||
|
|
||||||
### Implementation Approach: Clone + Reflection
|
### Implementation Approach: Clone + Reflection
|
||||||
|
|
||||||
@ -136,14 +148,13 @@ Based on analysis of the AdditionalCollectibles mod:
|
|||||||
2. **Use reflection** to set private fields (typeID, weight, value, etc.)
|
2. **Use reflection** to set private fields (typeID, weight, value, etc.)
|
||||||
3. **Create custom tags** by cloning existing ScriptableObject tags
|
3. **Create custom tags** by cloning existing ScriptableObject tags
|
||||||
4. **Load sprites** from user files in `CardSets/*/images/`
|
4. **Load sprites** from user files in `CardSets/*/images/`
|
||||||
|
5. **Attach custom behaviors** for pack opening mechanics
|
||||||
|
|
||||||
### Next Implementation Steps
|
### Future Considerations
|
||||||
|
|
||||||
Phase 3 - Storage System:
|
- Investigate new ItemBuilder API (added in recent game update) as potential replacement for reflection-based approach
|
||||||
1. Research existing storage items in game
|
- Additional storage variants or customization options
|
||||||
2. Create binder item with Inventory component
|
- Binder sheets which hold cards are are held by binders
|
||||||
3. Implement slot-based filtering for "TradingCard" tag
|
|
||||||
4. Create card box variant with higher capacity
|
|
||||||
|
|
||||||
### Log File Location
|
### Log File Location
|
||||||
|
|
||||||
|
|||||||
@ -14,8 +14,8 @@
|
|||||||
# Add your own cards below! Just follow the format above.
|
# Add your own cards below! Just follow the format above.
|
||||||
# Place corresponding images in the images/ subfolder.
|
# Place corresponding images in the images/ subfolder.
|
||||||
|
|
||||||
Duck Hero | Example Set | 001 | duck_hero.png | Rare | 0.01 | 500 | The brave defender of all ponds
|
Duck Hero | Example Set | 001 | duck_hero.png | Rare | 0.05 | 500 | The brave defender of all ponds
|
||||||
Golden Quacker | Example Set | 002 | golden_quacker.png | Ultra Rare | 0.01 | 12500 | A legendary duck made of pure gold
|
Golden Quacker | Example Set | 002 | golden_quacker.png | Ultra Rare | 0.05 | 12500 | A legendary duck made of pure gold
|
||||||
Pond Guardian | Example Set | 003 | pond_guardian.png | Uncommon | 0.01 | 100
|
Pond Guardian | Example Set | 003 | pond_guardian.png | Uncommon | 0.05 | 100
|
||||||
Bread Seeker | Example Set | 004 | bread_seeker.png | Common | 0.01 | 25
|
Bread Seeker | Example Set | 004 | bread_seeker.png | Common | 0.05 | 25
|
||||||
Feathered Fury | Example Set | 005 | feathered_fury.png | Rare | 0.01 | 500 | Known for its fierce battle cry
|
Feathered Fury | Example Set | 005 | feathered_fury.png | Rare | 0.05 | 500 | Known for its fierce battle cry
|
||||||
|
|||||||
35
README.md
35
README.md
@ -2,6 +2,15 @@
|
|||||||
|
|
||||||
A customizable trading card system that lets you add your own card sets to the game.
|
A customizable trading card system that lets you add your own card sets to the game.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Custom Card Sets** - Create your own trading cards with custom artwork and stats
|
||||||
|
- **Card Packs** - Open randomized card packs with gacha-style rarity distribution
|
||||||
|
- **Storage System** - Organize your collection with 9-slot binders and 18-slot card boxes
|
||||||
|
- **User-Friendly Format** - Define cards using simple pipe-separated text files
|
||||||
|
- **ModConfig Integration** - Enhanced card info display when ModConfig is installed (optional)
|
||||||
|
- **No Programming Required** - Add new card sets without writing any code
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
**Required Mod Dependency:**
|
**Required Mod Dependency:**
|
||||||
@ -9,12 +18,18 @@ A customizable trading card system that lets you add your own card sets to the g
|
|||||||
|
|
||||||
This mod requires the HarmonyLoadMod to be installed. It provides the Harmony library that many mods share to avoid version conflicts.
|
This mod requires the HarmonyLoadMod to be installed. It provides the Harmony library that many mods share to avoid version conflicts.
|
||||||
|
|
||||||
|
**Optional Mod Dependency:**
|
||||||
|
- [ModConfig](https://steamcommunity.com/sharedfiles/filedetails/?id=3592433938) - Subscribe on Steam Workshop
|
||||||
|
|
||||||
|
ModConfig is optional but recommended. When installed, it adds card set information (set name, card number, rarity) to the item description in your inventory, making it easier to identify and organize your cards.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Subscribe to [HarmonyLib](https://steamcommunity.com/sharedfiles/filedetails/?id=3589088839) on Steam Workshop
|
1. Subscribe to [HarmonyLib](https://steamcommunity.com/sharedfiles/filedetails/?id=3589088839) on Steam Workshop
|
||||||
2. Build the mod (see Development section)
|
2. (Optional) Subscribe to [ModConfig](https://steamcommunity.com/sharedfiles/filedetails/?id=3592433938) for enhanced card descriptions
|
||||||
3. Copy the `TradingCardMod` folder to your game's `Duckov_Data/Mods` directory
|
3. Build the mod (see Development section)
|
||||||
4. Launch the game and enable both HarmonyLib and this mod in the Mods menu
|
4. Copy the `TradingCardMod` folder to your game's `Duckov_Data/Mods` directory
|
||||||
|
5. Launch the game and enable the mods in the Mods menu (HarmonyLib is required, ModConfig is optional)
|
||||||
|
|
||||||
## Adding Card Sets
|
## Adding Card Sets
|
||||||
|
|
||||||
@ -29,13 +44,13 @@ This mod requires the HarmonyLoadMod to be installed. It provides the Harmony li
|
|||||||
Cards are defined in `cards.txt` using pipe-separated values:
|
Cards are defined in `cards.txt` using pipe-separated values:
|
||||||
|
|
||||||
```
|
```
|
||||||
CardName | SetName | SetNumber | ImageFile | Rarity | Weight | Value
|
CardName | SetName | SetNumber | ImageFile | Rarity | Weight | Value | Description (optional)
|
||||||
```
|
```
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```
|
```
|
||||||
Blue Dragon | Fantasy Set | 001 | blue_dragon.png | Ultra Rare | 0.01 | 500
|
Blue Dragon | Fantasy Set | 001 | blue_dragon.png | Ultra Rare | 0.05 | 500| A majestic dragon with scales of sapphire blue.
|
||||||
Fire Sprite | Fantasy Set | 002 | fire_sprite.png | Rare | 0.01 | 100
|
Fire Sprite | Fantasy Set | 002 | fire_sprite.png | Rare | 0.05 | 100
|
||||||
```
|
```
|
||||||
|
|
||||||
### Field Descriptions
|
### Field Descriptions
|
||||||
@ -47,14 +62,14 @@ Fire Sprite | Fantasy Set | 002 | fire_sprite.png | Rare | 0.01 | 100
|
|||||||
| SetNumber | Number for sorting (as integer) | 001 |
|
| SetNumber | Number for sorting (as integer) | 001 |
|
||||||
| ImageFile | Image filename in images/ folder | "blue_dragon.png" |
|
| ImageFile | Image filename in images/ folder | "blue_dragon.png" |
|
||||||
| Rarity | Card rarity tier | Common, Uncommon, Rare, Ultra Rare |
|
| Rarity | Card rarity tier | Common, Uncommon, Rare, Ultra Rare |
|
||||||
| Weight | Physical weight in game units | 0.01 |
|
| Weight | Physical weight in game units | 0.05 |
|
||||||
| Value | In-game currency value | 500 |
|
| Value | In-game currency value | 500 |
|
||||||
|
| Description | Optional flavor text for the card | "A majestic dragon..." |
|
||||||
|
|
||||||
### Image Requirements
|
### Image Requirements
|
||||||
|
|
||||||
- Place images in your card set's `images/` subfolder
|
- Place images in your cardset's `images/` subfolder
|
||||||
- Recommended format: PNG
|
- Recommended format: PNG
|
||||||
- Recommended size: 256x256 or similar aspect ratio
|
|
||||||
|
|
||||||
### Comments
|
### Comments
|
||||||
|
|
||||||
@ -133,4 +148,4 @@ This mod is provided as-is for personal use. Do not distribute copyrighted card
|
|||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
Built using the official Duckov modding framework.
|
Built using the official Duckov modding framework and building on the awesome work of the AdditionalCollectibles mod.
|
||||||
|
|||||||
@ -314,8 +314,8 @@ namespace TradingCardMod
|
|||||||
"Card Binder",
|
"Card Binder",
|
||||||
"A binder for storing and organizing trading cards. Holds 9 cards.",
|
"A binder for storing and organizing trading cards. Holds 9 cards.",
|
||||||
9,
|
9,
|
||||||
0.5f, // weight
|
1.5f, // weight
|
||||||
500, // value
|
7500, // value
|
||||||
_tradingCardTag
|
_tradingCardTag
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ namespace TradingCardMod
|
|||||||
"A large box for bulk storage of trading cards. Holds 36 cards.",
|
"A large box for bulk storage of trading cards. Holds 36 cards.",
|
||||||
36,
|
36,
|
||||||
2.0f, // weight
|
2.0f, // weight
|
||||||
1500, // value
|
37500, // value
|
||||||
_tradingCardTag
|
_tradingCardTag
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -539,29 +539,22 @@ namespace TradingCardMod
|
|||||||
// Set tags
|
// Set tags
|
||||||
item.Tags.Clear();
|
item.Tags.Clear();
|
||||||
|
|
||||||
// Add Luxury tag (for selling at shops)
|
|
||||||
Tag? luxuryTag = TagHelper.GetTargetTag("Luxury");
|
Tag? luxuryTag = TagHelper.GetTargetTag("Luxury");
|
||||||
if (luxuryTag != null)
|
if (luxuryTag != null)
|
||||||
{
|
{
|
||||||
item.Tags.Add(luxuryTag);
|
item.Tags.Add(luxuryTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================
|
Tag? miscTag = TagHelper.GetTargetTag("Misc");
|
||||||
// TODO: REMOVE BEFORE RELEASE - TEST TAGS FOR LOOT SPAWNING
|
if (miscTag != null)
|
||||||
// These tags make cards appear frequently in loot for testing.
|
|
||||||
// Replace with appropriate tags (Collection, Misc, etc.) or
|
|
||||||
// implement proper loot table integration before shipping.
|
|
||||||
// ============================================================
|
|
||||||
Tag? medicTag = TagHelper.GetTargetTag("Medic");
|
|
||||||
if (medicTag != null)
|
|
||||||
{
|
{
|
||||||
item.Tags.Add(medicTag);
|
item.Tags.Add(miscTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tag? toolTag = TagHelper.GetTargetTag("Tool");
|
Tag? collTag = TagHelper.GetTargetTag("Collection");
|
||||||
if (toolTag != null)
|
if (collTag != null)
|
||||||
{
|
{
|
||||||
item.Tags.Add(toolTag);
|
item.Tags.Add(collTag);
|
||||||
}
|
}
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user