CardKit
Library for custom cards: card mods register a name, text, art, rarity and an effect; CardKit adds them to the deck and runs them for every player.CardKit
A library for custom cards in Slip & Skid. It does nothing on its own: install it with a card mod that uses it.
For players: everyone in a lobby needs the same card mods at the same version, or the decks don't match.
For modders
Reference SlipSkid.CardKit.dll, depend on slipskid.cardkit and register cards from your plugin's Awake:
[BepInPlugin("you.mycards", "My Cards", "1.0.0")]
[BepInDependency(CardKitPlugin.Guid)]
public class MyCards : BaseUnityPlugin
{
private void Awake() => CardKitApi.Register(new Card
{
Guid = "put-a-new-guid-here", // never change it once released
Name = "Air Time",
Description = "You get 2 extra air jumps.",
Kind = CardKind.Modifier, // or CardKind.Prop with OnSpawn
Rarity = CardRarity.Rare,
ThumbnailPng = CardKitApi.EmbeddedPng("AirTime.png"),
OnApply = ctx => ctx.Owner.controller.maxAirJumps += 2,
});
}
- Modifier cards borrow a stock modifier card;
OnApplyruns on every client when the card is played, instead of the stock effect. They are full-art cards like the stock modifiers:ThumbnailPngis drawn over the whole card (700x1000 like the stock ones), with an optionalFullArtNormalPngrelief mask (1.1.0). - Prop cards borrow a stock static prop;
OnSpawn(obstacle, ctx)runs on every client when it spawns. - Cards are ordered by Guid, so plugin load order doesn't matter. The stock cards' names (for
Card.Carrier) are written to the BepInEx log at startup.
See the ExampleCards package for a working card mod.
