Treasure Trove: pickupsKit 2.3.14
Coins, gems, hearts, shields, keys, letters and power-ups for any game: collectible pickups that respawn, one Pickup component, 47 looks in five styles, and multiplayer claims where a simultaneous grab has exactly one winner. This world opens on a gallery with every look, each labelled with the name you type to use it, and a station for each behaviour.
Install
One install: search ZeroMind for pickupsKit and install it, or zeromind_install guid=0d70dd00-9297-45d5-a290-5a51b9f9e262. It brings the kits it builds on with it under /source/deps/: SecondWind, juiceKit, Lifeline and MatchFlow. pickupsKit 2.3.14 is built and tested on SecondWind 1.4.7, juiceKit 1.2.10, Lifeline 1.0.4 and MatchFlow 1.4.0, the releases the other kits around it use. Nothing else to install.
New in 2.3.14: Pickups.restore() brings taken one-time pickups back for a new round, from any player's machine, in one call.
Guides
Two guides ship inside the package and install with it:
- How to add coins, gems and power-ups to my game: collectible pickups that respawn. Placing pickups, picking and swapping a look, what each kind gives, respawning and blinking pickups, magnets, chests and coin bursts, several players on one pickup, reading and spending what a player collected, and scoring pickups with scoreKit.
- Make a coin and gem collecting game with power-ups and respawning pickups: from an empty world, a small game with a ring of coins, rubies, a speed power-up and a gem fountain where emeralds respawn every 4 seconds, every grab scored by scoreKit.
They link SecondWind's "How to add health and damage to your game", juiceKit's "How to add screen shake, hitstop and hit feedback to your game" and "Make your game feel juicy step by step with hit feedback, explosions and damage numbers", and scoreKit's "How to add a score and combo system to my game" and "Make an arcade game with a score, combos and a leaderboard".
Quick start
Add these lines inside content() in your scene's build.luau (a new world has one at scenes/main.scene/build.luau):
local Pickups = require("pickupsKit.api")
-- the coin counter in the corner of the screen
entity.spawn("PickupHUD").component.add(Pickups.HUD, { style = "pixel" })
-- five pixel gems in a line in front of where the player starts
for i = 1, 5 do
Pickups.spawn({ (i - 3) * 1.5, 0, 4 }, { prefab = "pixelGem" })
end
Press Play and walk forward: each gem pops with a sparkle and a coin sound, and the counter adds 1. Each gem comes back 5 seconds later.
For hearts and shields, give players health:
local HK = Pickups.health()
entity.spawnSynced("HealthRules").component.add(HK.RULES, {})
HK.attach(body, { model = "shield" }) -- your PlayerPrototype's body entity
Pickups.spawn({ -2, 0, 6 }, { prefab = "heart" })
Looks
prefab picks the look by its main name: goldCoin, goldStar, heart, mysteryBox, speedBadge, energyCredit, shieldCell, speedOrb, damageOrb, jumpOrb, magnetCore, xpOrb, ruby, emerald, healingPotion, goldenKey, pixelGem, pixelCoin, powerStar, questionBlock, silverCoin, goldDoubloon, ammoCrate, brassKey, armorPlate and more, 47 in all. Older names still work. Changing prefab swaps the model at once for every player.
Effects
Counters (coins, gems, XP, ammo), items (keys, keycards), letters that spell words, heals and shields through SecondWind, mystery boxes, and five power-ups: speed, jump, double damage, magnet and invincible.
Multiplayer
The engine that owns a pickup decides who gets it, so two players touching the same coin give one winner, counted once. Every pickup kind was played for the player who isn't hosting, with two editors and with a web browser player.
Known limits
Installing scoreKit after pickupsKit (open issue #22451) leaves extra copies under /source/deps/.../versions/: a second MatchFlow package and two lone Lifeline files (api.module, Health.component). In a fresh world set up exactly that way, only the MatchFlow copy logged errors: none while editing, four the first time Play was pressed after the world was reopened, none on the second Play, and two more the first time the kit looked up a player's health. The two Lifeline files logged nothing, Lifeline kept using its own complete parts, and hearts healed as usual (80 back to 100). The full list of known limits, and the API, are in the pickupsKit README.
Comments · 0
Open discussion, no rating attached. Ask questions, swap notes, follow threads.
Documented parts · 3
- apimodule
- Pickupcomponent
- pickupsKitpackage