Skip to content

Jayd-H/joker-forge

Repository files navigation

Joker Forge

A web app that allows you to make Balatro Jokers using Steammodded with ease. It aims to lower the barrier to entry for mod creation, moving beyond simple stat adjustments to enable the creation of truly unique and complex Joker behaviors, all without requiring direct Lua scripting knowledge from the user. The core philosophy is abstraction and empowerment: abstracting the underlying SMODS code into intuitive visual components, thereby empowering users to translate their creative gameplay ideas into functional mods.

Try It Out

It does this with a Trigger > Condition > Effect system. Most vanilla jokers follow this system. With this system, less complex jokers like Droll Joker become: When a Hand is Played (Trigger) > If Scoring Cards = Flush (Condition) > Then +10 Mult (Effect). Jokers abilities are set using the built-in Rule Builder.

STILL EARLY IN DEV, EXPECT ISSUES, MISSING FEATURES, AND ANNOYANCES FOR NOW

Implementation Status Checklist

The plan here is to implement enough triggers, conditions, and effects, so as that each vanilla joker in Balatro can be replicated within Joker Forge.

Triggers

Fully Implemented

  • Hand Played - When a hand is played (default trigger)
  • Card Scored - When an individual card is scored
  • Hand Discarded - When a hand is discarded (before discard happens)
  • Card Discarded - When a card is discarded
  • Blind Selected - When a blind is selected
  • Blind Skipped - When a blind is skipped
  • Boss Defeated - When a boss blind is defeated
  • Booster Opened - When a booster pack is opened
  • Booster Skipped - When a booster pack is skipped
  • Consumable Used - When a consumable is used
  • Hand Drawn - When a hand is drawn
  • First Hand Drawn - When the first hand is drawn
  • Shop Exited - When exiting the shop
  • Passive - Always active, for specific effects like Pareidolia, and game rules like hand size
  • Round End - At the end of a round
  • Shop Reroll - When the shop is rerolled (Flash Card)
  • Card Held in Hand - Triggers for each card held in hand
  • Card Bought - When a card is purchased
  • Card Sold - When a card is sold
  • When this Card is Sold - When this specific card is sold
  • Card Destroyed - When a card is destroyed
  • When shop is Entered - When the shop is entered
  • When this Joker is Bought - When specifically this joker is bought (different from add to deck)
  • When a Playing Card is Added - When a playing card is added to your deck (Hologram)
  • Ante Start - At the start of an ante

Not Implemented Yet

  • Joker Added/Removed - When a Joker is added/removed from your list (Joker Stencil)
  • When a Card is Modified - When any card is modified (enhanced, etc) (difficult)

Conditions

Fully Implemented

  • Hand Type - Check poker hand type (Flush, Straight, etc.)
  • Card Count - Check number of cards in hand
  • Suit Count - Check cards of specific suits
  • Rank Count - Check cards of specific ranks
  • Card Rank - Check individual card rank (for card_scored trigger)
  • Card Suit - Check individual card suit (for card_scored trigger)
  • Card Enhancement - Check for card enhancements (Gold, Steel, etc.)
  • Card Seal - Check for card seals (Gold, Red, Blue, Purple)
  • Player Money - Check player's current money
  • Remaining Hands - Check hands left in round
  • Remaining Discards - Check discards left in round
  • Joker Count - Check number of jokers owned
  • Blind Type - Check current blind type (Small, Big, Boss)
  • Random Chance - Probability-based conditions
  • Internal Variable - Check joker's internal variable values
  • First Played Hand - Check if this is the first hand played in the round
  • First Discarded Hand - Check if this is the first hand discarded in the round
  • Ante Level - Check current ante level
  • Hand Size - Check current hand size
  • Deck Size - Check remaining deck size
  • Deck Count By Rank, Suit, Enhancement, Seal, Edition - Check the specifics of the cards in your full deck
  • Specific Joker - Check if you have a specific joker in your list
  • Generic Compare - Check GameVars and Vars against a value/eachother
  • Consumable Type - Check for card sold and consumable used
  • Glass Card Destroyed - Check to see if a glass card got destroyed (Glass Joker)
  • Triggered Boss Blind Ability - Check if the boss blind's ability was triggered (Matador)
  • Most/Least Played Poker Hand - Check if the hand played is your most/least played (Obelisk)
  • Consumable Held - Check for specific consumable/s held
  • Score Threshold - Check if score meets requirement (Mr. Bones)
  • Lucky Card Triggered - Check if a lucky card succesfully triggered (Lucky Cat)
  • Edition Count - Check how many cards with editions are in hand played
  • Enhancement Count - Check how many cards with enhancements are in hand played
  • Seal Count - Check how many cards with seals are in hand played
  • Check Specific Poker Hand Level - Check a specific poker hands level
  • Culmative Chip/Rank Check - Check for if cards rank/chips add up to a certain number
  • Consumable Count - Check number of consumables owned

Effects

Fully Implemented

  • Add Chips - Add flat chips to score
  • Apply X Chips - Multiply chips by value
  • Apply ^Chips - Exponentially multiply chips by value
  • Add Mult - Add flat mult to score
  • Apply X Mult - Multiply mult by value
  • Apply ^Mult - Exponentially multiply mult by value
  • Add Dollars - Give money to player
  • Retrigger Cards - Retrigger scored cards (card_scored trigger only)
  • Level Up Hand - Increase poker hand level
  • Edit Discard - Give/take/set discards
  • Edit Hand - Give/take/set hands
  • Destroy Self - Destroy the joker
  • Add Card to Deck - Add new playing cards to deck/hand (this is half done, still an error with scoring triggers)
  • Copy Triggered Card - Copy the card that triggered the effect
  • Copy Played Card - Copy specific cards from played hand
  • Edit Triggered Card - Modify card properties (rank, suit, enhancement, seal)
  • Delete Triggered Card - Destroys/deletes cards when scored/discarded
  • Modify Internal Variable - Change joker's internal variable values
  • Create Tarot Card - Create a random or set tarot card
  • Create Planet Card - Create a random or set planet card
  • Create Spectral Card - Create a random or set spectral card
  • Destroy Consumable - Destroy a random or specific spectral/tarot/planet card
  • Copy Consumable - Copy a random or specific spectral/tarot/planet card
  • Edit Hand Size - Give/take/set hand size (Turtle Bean)
  • Create Joker - Create a different joker (Random, By ID)
  • Copy Joker - Make a copy of another joker (Random, By ID, By Index)
  • Destroy Joker - Destroy another joker (Random, By ID, By Index)
  • Create Skip Tags - Create a set or random skip tag
  • Set Dollars - Set dollars to a value
  • Show Message - Just show a simple little message
  • Disable Boss Blind - Disables the boss blinds unique effect (Luchador, Chicot)
  • Copy Ability of Adjacent Joker - Blueprint/Brainstorm logic
  • Modify Sell Value - Change sell value of this or other jokers (Egg, Gift Card)
  • Permanent Card Modifications - Add permanent bonuses to cards (Hiker)
  • Modify Probability - Oops All 6s! support
  • All [Cards] in the Shop are Free - Changes the buy price of certain packs/cards (planet, joker, tarot, spectral) to be free
  • All Cards are Scored - Splash logic
  • Combine Suits - Treat two or more suits as the same suit (Smeared Joker)
  • Combine Ranks - Treat two or more ranks as the same rank
  • Cards May Appear Multiple Times - Showman logic
  • Allowing Debt - Credit Card logic
  • Alter Blind Requirement - I.E. 2X blind requirement, 0.5x blind requirement
  • Beat Current Blind - Completes the current blind
  • Add/Subtract/Set Joker Slots - Would be cool i guess lol
  • Add/Subtract/Set Consumable Slots - also self-explanatory
  • Destroy Card in Hand - Destroys a random or set (by index, rank, suit) card in hand

Not Implemented Yet

  • Apply Edition to Joker - Apply an edition to a random/set Joker owned

Code Generation Features

Implemented

  • Condition Function Generation - Creates helper functions for conditions
  • Effect Chaining - Multiple effects in one rule using extra field
  • Context-Aware Generation - Different code for different triggers
  • Parameter Validation - Handles conditional parameter visibility
  • Lua Code Output - Generates proper SMODS-compatible Lua
  • Atlas Generation - Creates sprite atlases from uploaded images
  • Mod Packaging - Complete mod folder structure with JSON metadata
  • Mod Metadata Editing - Edit parameters like description, version, etc.
  • Sticker Compatibility - Perishable, Rental, etc.
  • Blueprint Compatibility Logic - Actual blueprint behavior code
  • Unlock Condition Generation - Custom unlock requirements

Not Implemented Yet

  • Localization Support - Multiple language support

UI Features

Implemented

  • Rule Builder Modal - Visual rule creation interface
  • Condition Groups - AND/OR logic between condition groups
  • Parameter Fields - Dynamic form fields based on condition/effect type
  • Trigger Filtering - Only show applicable conditions/effects for selected trigger
  • Rule Description - Human-readable rule summaries
  • Joker Card Preview - Visual joker card with hover tooltips
  • Image Upload - Custom joker sprite upload with validation
  • Export System - Generate and download complete mod packages
  • Import System - Import existing jokers/rules from files

Not Implemented Yet

  • Dynamic Code Display - Live preview of generated Lua code in rule builder
  • Undo/Redo System - History management for rule editing
  • Help System - Integrated tooltips and documentation

Usage

Go to the website to start creating jokers

Running Locally

  1. Prerequisites

    • Node.js (v16 or higher)
    • npm
  2. Setup

    # Clone the repository
    git clone https://github.com/Jayd-H/joker-forge.git
    cd joker-forge
    
    # Install dependencies
    npm install
    
    # Start the development server
    npm run dev

Acknowledgements

Icons from Heroicons, favicon from SVGRepo (this should be temporary).

Thank you balatro modding discord server for answering benign questions.

About

Easy Balatro Mod Creation!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages