Skip to content

🃏 Card Collection ​

Documentation relating to the spooni_cardcollection.

1. Installation ​

spooni_cardcollection needs spooni_libs (it works alongside your framework through its bridge).

To install spooni_cardcollection:

  • Download the resource
  • Ensure that all requirements are installed
  • Drag and drop the resource into your resources folder
    • spooni_cardcollection (keep this exact folder name)
  • Add this ensure in your server.cfg (after spooni_libs)
    bash
    ensure oxmysql
    ensure spooni_libs
    ensure spooni_cardcollection
  • The items are created in your inventory automatically on first start — restart the server once afterwards so your inventory loads them. Copy the item images from the extra/ folder into your inventory's item images.
    • Cards: the 149 card items (cigcard01, cigcardamer01, ... photonudie05).
    • Album & packs: card_album (opens the album), randomcard (1 random card), randompack (5 random cards).
    • Cigarettes: cigarette is handed out with packs — it is not created automatically, it must already exist in your inventory.
  • Now you can configure and translate the script as you like
    • config.lua
    • language.lua
  • At the end, restart the server

TIP

The album table is created automatically on first start — no SQL import needed.

If you have any problems, you can always open a ticket in the Spooni Discord.

2. Usage ​

Players hunt down the 149 cigarette cards of 13 collections — Stars of the Stage, Prominent Americans, Fauna of America, Artists, Writers & Poets, Gems of Beauty, Famous Gunslingers, Horses, Amazing Inventions, Vistas of America, Flora of America, World Champions, Marvels of Travel and Nude Beauty. Cards lie at their RDR2 story-mode spots across the map and glow when you use Eagle Eye; walk up and pick them up. A spot taken by anyone is gone for everyone until the next restart.

Using the album item opens a custom album: every collection with its progress, found cards in full art, owned cards ready to be clicked in, missing cards locked. Once a set is complete, Claim Reward pays out its cash, gold, items or even a weapon and resets the set so it can be collected again. The album is saved per character.

Using a single card holds it up in your hands — other players see the real card art. With players nearby a selector lets you show it to someone, and with require_accept on they first get an Accept / Decline request with a countdown. Random card and random pack items open an interactive screen: shake the cigarette pack, fan the cards out and flip each one to reveal it, with a few cigarettes on top.

3. For developers ​

Adding a card
  • Add the card item to Config.items with the prop it shows as, and its printed name to Config.card_names.
  • Put it in a set in Config.collections, and in Config.card_items if random packs may hand it out.
  • Drop its album art into UI/img/<itemname>.png and its inventory image into your inventory's item images.
lua
-- one collection in Config.collections
[1] = {
    cards      = {"cigcard01", "cigcard02", "cigcard03"},
    name       = "Stars of the Stage",
    desc       = "Stars of the Stage Card Set of 12 pieces !",
    givemoney  = true,
    moneytype  = 0,                  -- 0 = cash, 1 = gold
    money      = {500, 750},         -- min, max
    giveitem   = true,
    item       = {"lockpick"},
    itemqty    = {2, 5},             -- min, max
    giveweapon = true,
    weapon     = {"WEAPON_PISTOL_M1899"},
},
Placing world cards

The 143 world spots live in Config.spawns as { card = "<item>", coords = vector3(x, y, z), heading = h }. To build your own, set Config.dev_capture = true, stand where a card should lie and run /addcard <itemname> — each spot is written to captured_spawns.lua, and /delcard removes the last one. Copy the entries into Config.spawns and turn dev_capture off again before going live.