Slip & Skid
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
Downloads
108
Size
26KB

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; OnApply runs on every client when the card is played, instead of the stock effect.
  • 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.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.