Sholiver-LethalCardLoader icon

LethalCardLoader

Mod to load in trading card scrap items, from images and json manifest files.

Last updated 4 hours ago
Total downloads 4
Total rating 0 
Categories Mods Items
Dependency string Sholiver-LethalCardLoader-0.2.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
Evaisa-LethalLib-1.2.0 icon
Evaisa-LethalLib

Personal modding tools for Lethal Company

Preferred version: 1.2.0

README

LethalCardLoader

A Lethal Company mod that lets you load custom card sets and booster packs into the game using nothing but images and a JSON config. Cards and booster packs spawn as scrap on moons, and can be collected, opened, and browsed via the ship terminal.

This mod does not include any cards by default, they will need configuring and adding as Content.


First Time Setup

  1. Install the mod and launch the game
  2. Load any save file
  3. Exit back to the main menu

This will generate the config file at:

BepInEx/config/com.sholiver.lethalcardloader.cfg

The config will be pre-populated with all available moons and the default rarity tiers (Common, Uncommon, Rare) and the Default spawn group.


Adding a Card Set

1. Register the Set in the Config

Open com.sholiver.lethalcardloader.cfg and add the following at the bottom:

[Set: Base Set]
Name = Base Set
Key = BaseSet
Id = 1
Spawn Group = Default
Field Description
Name Display name shown in the terminal
Key Unique identifier used for folder and file names. No spaces.
Id Unique numeric ID for the set. Each set must have a different Id.
Spawn Group The spawn group that controls which moons this set's cards appear on.

2. Create the Folder Structure

Inside Plugin/LethalCardLoader folder, create a Content folder with the following structure:

Content/
├── BaseSet/
│   ├── BaseSet.json
│   └── Cards/
│       ├── Card1.png
│       ├── Card2.png
│       └── ...
└── Shared/
    ├── BaseSet_CardBack.png
    └── BaseSet_BoosterPack.png
  • BaseSet/ — named after your set's Key
  • Cards/ — contains the front face image for each card
  • Shared/ — contains the card back and booster pack images, prefixed with your set key
  • Working image formats include png and jpg, although others may work. Images should be 250px by 350px.

3. Create the Set JSON

Create BaseSet.json inside your set's folder. This defines every card and booster pack in the set:

{
  "Id": 1,
  "Key": "BaseSet",
  "Name": "Base Set",
  "Number": 102,
  "CardBackTexturePath": "BaseSet_CardBack.png",
  "Packs": [
    {
      "Key": "BoosterPack",
      "Name": Booster Pack",
      "BlacklistedCardIds": [1, 10],
      "ItemTexturePath": "BaseSet_BoosterPack.png"
    }
  ],
  "Cards": [
    {
      "Number": 1,
      "Name": "My Card",
      "ItemTexturePath": "Card1.jpg",
      "Rarity": "Common"
    },
    {
      "Number": 2,
      "Name": "My Rare Card",
      "ItemTexturePath": "Card2.jpg",
      "Rarity": "Rare",
      "Metallic": true,
      "SpawnGroup": "Default",
      "ValueMultiplier": 1.5
    }
  ]
}

Root fields:

Field Description
Id Set Id
Key The Key for the set, should match the Key in the config
Name The in game display name for the set, should match the Name in the config
Number Expected number of cards in the set
CardBackTexturePath Image file in the Shared/ folder

Pack fields:

Field Description
Key The Key for the pack, should be unique
Name Display name of the pack
BlacklistedCardIds Card Numbers within this set which will not drop from this pack
ItemTexturePath Filename of the pack's image inside the Shared/ folder

Card fields:

Field Description
Number Display Number, and Unique Identifier of this card within this Set
Name Display name of the card
ItemTexturePath Filename of the card's image inside the Cards/ folder
Rarity Must match a rarity key defined in the config (e.g. Common, Uncommon, Rare)
Metallic (Optional) Determines if the card acts as a metallic scrap item
SpawnGroup (Optional) Determines moons card can spawn on, and with what frequency
ValueMultiplier (Optional) Multiplier on Scrap Value

Config Reference

Rarity Tiers

Three default rarities are created on first launch. You can edit their values or add new ones:

[Rarity: Common]
Key = Common
Value = 30
Spawn Weight = 80
Card Pack Weight = 70

[Rarity: Uncommon]
Key = Uncommon
Value = 50
Spawn Weight = 15
Card Pack Weight = 20

[Rarity: Rare]
Key = Rare
Value = 80
Spawn Weight = 5
Card Pack Weight = 10
Field Description
Key This will be used against cards in their manifest, as well as displaying in game as part of the tooltip.
Value Min Scrap value for this rarity tier. Max Scrap value is this value multiplied by 1.5
Spawn Weight Relative likelihood of this rarity spawning in the world, relative to other cards.
Card Pack Weight Relative likelihood of this rarity appearing when opening a booster pack.

Spawn Groups

Spawn groups control which moons a card/set can appear on, and at what rate. The Default group is created automatically on first launch with all known moons at a weight of 1.0:

[Spawn Group: Default]
Key = Default
ExperimentationLevel = 1.0
AssuranceLevel = 1.0
VowLevel = 1.0
TitanLevel = 1.0
...

This is a multiplier to the Rarity Spawn Weight. If a card has no Spawn Group, it will try to find a Spawn Group with the same name as it's Rarity. Failing that, will use the Default Spawn Group.

Because both Sets and Cards have a Spawn Group, their relative weight will be: Set Spawn Group Multiplier * Card Spawn Group Multiplier * Rarity Spawn Weight


Moon Scrap Rarities

The overall frequency of Base Card and Base Pack items spawning as scrap (relative to other scrap on a moon) is configured per moon:

[Moon: 41 Experimentation]
Planet Name = 41 Experimentation
Internal Name = ExperimentationLevel
Card Scrap Rarity = 100
Pack Scrap Rarity = 100

These are populated automatically for every moon when you first launch the game and load a save.

These weights are shared between all cards, to ensure that all cards can spawn without diluting the regular scrap pool.


Terminal Commands

Use the ship terminal to browse your collection:

Command Description
cards Lists all registered card sets
cards <setKey> Lists the first page of cards for the set
cards <setKey> p<page> Lists a page of cards for the set
cards <setKey> <cardNumber> Shows detailed info about the card.