Skip to content

PB_UTIL.Paperclip

srockw edited this page Mar 26, 2026 · 2 revisions

API Documentation: PB_UTIL.Paperclip

Paperclips extend from SMODS.Sticker, so everything in this documentation applies unless otherwise stated. A table of all Paperclip keys can be found at PB_UTIL.Paperclips; however, the utility functions described below should handle most use cases without you having to access this table yourself.

  • Optional parameters (defaults):
    • shiny = false: This makes the Paperclip render with a shiny shader. Used for Gold and Platinum clips.
    • special = false: Special Paperclips are unable to be randomly generated by default. Used for the Platinum clip.

Utility Functions

  • PB_UTIL.is_paperclip(str)
    • str should be the full key of a potential paperclip (including mod prefix). If it is a valid paperclip object, returns true. Otherwise returns false.
  • PB_UTIL.has_paperclip(card)
    • If card currently has a paperclip, this function returns two values: the key of the paperclip and the config table of the paperclip. Otherwise returns nil.
  • PB_UTIL.count_paperclips(args)
    • If args.area exists, this function iterates over the specified cardarea and counts all the non-debuffed cards with paperclips inside it. If args.allow_debuff is true, it counts debuffed paperclips as well, and if args.exclude_highlighted is true, it will not count any paperclips on cards that are currently selected. Returns the number of paperclips counted.
  • PB_UTIL.remove_paperclip(card)
    • Removes the paperclip attached to the specified card. Doesn't return anything.
  • PB_UTIL.set_paperclip(card, key)
    • key should be the full key of a paperclip (including mod prefix). If that's the case, this function removes the previous paperclip on the specified card (if it exists) and applies the paperclip given by key to it.
  • PB_UTIL.poll_paperclip(seed, include_special)
    • seed is a pseudorandom seed string. This function randomly picks the key of a paperclip and returns it; it will only pick paperclips marked as "special" if include_special is true.
  • PB_UTIL.is_special_clip(clip)
    • If clip is the key of a special paperclip, this function returns true. Otherwise returns false.
  • PB_UTIL.paperclip_tooltip(key)
    • key should be the full key of a paperclip (including mod prefix). Returns a table that can be appended to info_queue within an object's loc_vars function. If the key is not valid it will return nil.

Clone this wiki locally