C# console app that auto-generates Shops/Catalogs/ShopExpandedCatalog.cs for the MerchantsPlus mod. Do not hand-edit that file — run the generator instead.
From the MerchantsPlus/ mod root:
dotnet run --project ../MerchantsPlus.GeneratorThat's it. The generator reads its input CSV, classifies items, paginates them into shops, and writes the catalog file.
| File | What it does |
|---|---|
ItemClassifier.cs |
Maps item names → merchant + shop (regex patterns, order matters) |
CatalogGenerator.cs |
Pipeline rules: pagination, page names, redistribution logic |
After editing either file: re-run the generator, then rebuild the mod.
The input is .tmp/missing_items_integrated_with_stage.csv (already committed — don't regenerate it unless you're adding new Terraria items or rebalancing progression stages).
| Column | Meaning |
|---|---|
Name |
ItemID constant name |
Id |
Numeric item ID (informational only) |
Index |
Sort order |
Stage |
Progression tier (0 = early game, 3 = post-Moonlord) |
For small stage corrections, edit the CSV directly.
To fully regenerate the CSV (only needed after a Terraria update):
- Run
Legacy/classify_missing.ps1→ produces.tmp/missing_classified.csv - Review and correct stages
- Overwrite
.tmp/missing_items_integrated_with_stage.csv - Re-run the generator
| Path | Description |
|---|---|
MerchantsPlus/Shops/Catalogs/ShopExpandedCatalog.cs |
The generated catalog (main output) |
.tmp/expanded_report.csv |
Human-readable item assignment report |
Output is deterministic — same input always produces identical output.
- Max 40 items per page
- Max 24 characters per shop name
- No duplicate shop names per merchant
- Coins pages exclude raw coin items
- Treasure Bags pages exclude boss bag overrides