Configuration
After any change: /tcg reload. If the new configuration is invalid, the reload is rejected, the errors are shown and the previous configuration stays active.
Language
config.yml > language: en (default on a new install), fr, es or de. The shipped files (config, messages, collections, cards, boosters, objectives, ItemsAdder template) exist in all four languages. To change language, just set language: fr (or es, de) in config.yml, then restart or run /tcg reload: the files are switched automatically, with the same backup as the command below.
/tcg language <en|fr|es|de> (permission tcg.admin) switches language in one command:
- the current
config.yml,messages.yml,groups.yml,cards.yml,boosters.yml,objectives.ymlanditemsadder/tcg_items.ymlfiles are backed up toplugins/TCG/backups/language-<timestamp>/; - the files of the chosen language are installed;
- the plugin reloads.
Player collections, the database and items already handed out are not affected: IDs (cards, packs, collections) are language-neutral. Do it before customizing your files: your edits are not carried over, but they remain available in the backup folder.
A server upgrading from 1.2 or earlier (config.yml without a language key) stays in French automatically.
Console and admin validation messages are in English.
Changing the chances
Rarity when opening a pack (config.yml, must sum to 100, 0.01% precision):
rarities:
COMMON: { display: "<gray>Common", color: "#AAAAAA", chance: 70 }
RARE: { display: "<aqua>Rare", color: "#55FFFF", chance: 22 }
EPIC: { display: "<light_purple>Epic", color: "#FF55FF", chance: 7 }
LEGENDARY: { display: "<gold>Legendary", color: "#FFAA00", chance: 1 }
Pack drop (groups.yml, per collection, integer "1 in X"):
groups:
nature:
package_drop_chance: 20000 # 1 / 20,000; 0 = disabled; 1 = on every kill
Adding a card
In cards.yml:
cards:
nature_sniffer:
number: 35 # unique within the collection
name: "Sniffer"
group: nature
entity: SNIFFER # vanilla mob (must also be in groups.yml > nature.mobs to drop the pack)
rarity: LEGENDARY
itemsadder_item: "tcg:nature_sniffer" # optional, default tcg:<id>
description: # optional
- "A creature from another age"
secret: false # optional
Rules checked at startup: ID in a-z 0-9 _, unique (and different from every pack_id, so that /tcg give stays unambiguous), number unique per collection, existing collection, valid rarity, ItemsAdder ID in namespace:id format and not shared. Every mob listed in a collection must have a card in that collection.
Do not rename the ID of a card already handed out: it is what is stored on the items and in the database.
Adding a collection
In groups.yml:
groups:
ocean:
display_name: "<blue>🌊 Oceans"
description: ["<gray>Sea creatures"]
icon: HEART_OF_THE_SEA
gui_slot: 16 # slot in the main menu (gui.main.rows * 9 slots)
pack_id: ocean_pack # pack identifier, unique
pack_name: "<blue>Oceans Pack"
pack_itemsadder: "tcg:ocean_pack"
pack_fallback_material: BOOK
package_drop_chance: 15000
environments: [] # [] = all dimensions
mobs: [DOLPHIN, SQUID, GLOW_SQUID]
completion:
broadcast: true
commands: ["give %player% heart_of_the_sea 1"]
Then add one card per mob with group: ocean. A mob can belong to several collections, with one card in each.
Other useful settings (config.yml)
| Key | Purpose |
|---|---|
language | en, fr, es or de, see Language |
drops.require_direct_player_damage | killing blow from the player required (otherwise: vanilla 5-second credit) |
drops.delivery | INVENTORY or GROUND |
drops.disabled_worlds / ignored_gamemodes / ignored_spawn_reasons | exclusions (worlds, game modes, spawner mobs...) |
drops.broadcast | announce every pack found |
packs.open_cooldown_ms | delay between two openings |
packs.animation.* | opening animation: style SCREEN (full-screen images) or TEXT, step_ticks, card_ticks, skip_on_sneak |
items.* | fallback items, placeholder, lore |
gui.* | size, slots and materials of the menus |
gui.collection.mode | GRID (full grid), BINDER (one big 3x3 card) or DOUBLE (two big 3x3 cards, arrows on each side) |
gui.main.itemsadder_texture / gui.collection.itemsadder_texture | ItemsAdder menu background (tcg:binder_cover, tcg:binder_page), automatic vanilla without ItemsAdder |
gui.collection.undiscovered_display | undiscovered cards: HIDDEN (???) or INFO (name and info, without the image) |
holo.* | holo cards: chance, ItemsAdder suffix |
dust.* / shop.* | recycling values, shop prices |
trade.* | request duration, maximum distance, countdown, tradable packs |
milestones / titles | progress milestones and titles |
leaderboards.* | refresh rate and size of the leaderboards |
sounds.* | sounds (key [volume] [pitch], empty = none) |
All texts are in messages.yml, in MiniMessage format.