Thank you for your interest in contributing to Balatro Multiplayer! We're building the definitive multiplayer experience for Balatro. Ready to make poker roguelikes even more unhinged? You've found the right repo.
This little guide will help ensure consistency and quality across the codebase. Follow it and your PRs will merge. Ignore it and maintainers will reject your PR with the enthusiasm of a Neptune card.
Let's build something that would make Jimbo proud.
Prerequisites: Install Steamodded 1.0.0~BETA-1016c and Lovely Injector (>=0.8)
# 1. Fork on GitHub, then clone
git clone https://github.com/YOUR_USERNAME/BalatroMultiplayer.git
cd BalatroMultiplayer
# 2. Set up remotes and install stylua
git remote add upstream https://github.com/Balatro-Multiplayer/BalatroMultiplayer.git
# Install stylua from: https://github.com/JohnnyMorganz/StyLua
# 3. Ready to develop!
git checkout -b feature/your-feature
# Make changes, then:
stylua .
git commit -m "your changes"# Sync and create branch
git checkout main && git pull upstream main && git push origin main
git checkout -b feature/your-feature
# Develop → Format → Commit → Push → PR
stylua . && git add . && git commit -m "feat: your change"
git push origin feature/your-feature
# Then create PR on GitHubVerify Setup: Test that stylua works (stylua --version) before starting development.
We use stylua for consistent code formatting.
Before submitting a PR:
stylua --check .
stylua . # to format all filesIDE/Editor Setup: Most editors have Lua language support plugins that can format code on save using stylua:
- VS Code: Lua Language Server extension + StyLua
- JetBrains: SumnekoLua + StyLua
File Structure:
- Keep related functionality in logical directories (
objects/,ui/,networking/) - Use descriptive filenames that indicate purpose
- Group similar objects together (jokers, consumables, etc.)
Mod Integration Pattern:
- Use standard SMODS patterns
- Refer to existing implementation in objects/ directories for working examples
Networking Actions:
-- Follow the established action pattern
MP.ACTIONS.example_action = function(data)
-- Validate input
if not data or not data.required_field then
return
end
-- Perform action
-- Update game state
-- Send response if needed
endUI Components:
ui/_common/ |
Shared components. Config toggles, spacers, etc. |
ui/utils.lua |
Home of MP.UI.UTILS. Utils for creating UI nodes |
ui/game/ |
UI inside the pvp match |
ui/lobby/ |
Lobby UI |
ui/main_menu/ |
Main menu UI |
ui/smods_menu/ |
SMODS settings menu entry |
Mod Injection:
- The entrypoint is in
core.lua - Files/dirs prefixed with
_are loaded first inMP.load_mp_dir
- Commits: Write clear, descriptive commit messages
- Testing: Test your changes thoroughly across different scenarios
- Test in both single-player and multiplayer environments
- Verify compatibility with supported Balatro / SMods / Lovely versions
- Test with different rulesets and gamemodes
- Include example seeds in PR description when relevant
All contributions go through code review. Reviewers will check for:
- Code style compliance
- Functionality correctness
- Performance considerations
- Compatibility with existing features
- Security implications (networking code)
- Check existing GitHub Issues
- Join the Discord server for discussion