#[1.1.0] Arrow API (Palette Editor Release)

1 messages · Page 1 of 1 (latest)

pearl fossil
#

Arrow is an API Mod designed to isolate features introduced in Balatro: Cardsauce and provide API functions for developers to create content mods.

NOTE: Arrow does not provide content on its own! It's enabled by content mods such as JoJo's Balatro Adventure and JoJo's Balatro Fanworks

API Features

  • Two new consumeable types
    • Stands: A hybrid between Jokers and Consumables. In exchange for a consumable slot, offers powerful joker-like abilities, though
      they are rare to find
    • VHS Tapes: On demand utility consumables that can be played to receive their bonuses for a set running time.
  • Supporting Tarots, Spectrals, Boosters, and Tags for new consumables
  • Loading and Logging helper functions
  • Helper functions for common game behaviors
  • Reworked Achievements Menu for dependent mods
    • Achievements now use the 'description' table in localization
  • Reworked Challenge listing and additional options for Challenge behavior for dependent mods
    • Alternate win and gameover conditons
    • "Story" display tab and text support for 'description' table in localization
  • Functions to create arbitrary extra Boss Blinds
  • Functions to alter the consumable selection limit
  • Functions for displaying individual "origins" for mod content, including dynamic badges and localization text

Installation

  1. This mod requires Lovely (V0.8.0 or later) and Steammodded V1.0.0-beta-1016c or later. Follow these links to install these respective mods, which will create a Mods directory (%APPDATA%/Balatro/Mods)
  2. Once Lovely and Steamodded are installed, download the latest release and extract the arrowapi-1.0.0 folder into your mods directory. You're all set!
#

Developer documentation is forthcoming! This release is primarily oriented towards enabling two other mods I have released!!

junior juniper
#

This mod is really cool. I only play with vanilla mods but still bump egg

shell shadow
#

wait alternate win conditions??

#

i know someone who might need that

pearl fossil
#

Yep!!! Might be bugged however, one of my alt wind conditions isn't working right now so I'll need to investigate. But open issues on GitHub are welcome!

#

I'll get to working on documentation as soon as I can

#

Feature requests are also encouraged! I've tended to enshrine a ton of features that have been long requested but don't fit within the vanilla-like environment of smods

pearl fossil
#

1.0.1 Hotfix!

  • Fixed an issue where setting an allowlist of challenge cards was accidentally reset by the regular denylist behavior in ArrowAPI.misc.run_challenge_functions
  • Ported the Perkeo blocking negative Stands logic from JoJo's Balatro Adventure, since it should go here

Download here!

GitHub

Hotfix 1.0.1

Fixed an issue where setting an allowlist of challenge cards was accidentally reset by the regular denylist behavior in ArrowAPI.misc.run_challenge_functions
Ported the Perkeo blockin...

pearl fossil
#

[1.0.1] Arrow API

pearl fossil
#

1.0.2 Hotfix!

  • Added support for custom stake loading
  • Added polychrome shader effect to origin badges
  • Added a post_apply() function for challenges for further custom behavior
  • Fixed custom challenge endgame behavior running after every round
  • Fixed extra blinds not properly being disabled when called by a defeated blind
  • Fixed Verdant Leaf undisabling itself after cards are modified

Download here!

#

[1.0.2] Arrow API

pearl fossil
#

[1.0.3] Arrow API

#

1.0.3 Release

Technically a major feature, but since it's mostly relegated to UI, I won't consider this 1.1 just yet.
Download here!

Automatic Credits Generation

The use_credits(mod, extra_args) API function flags Arrow to generate credits for the supplied mod. it will automatically assemble credits based on keys on item prototypes, which can have values of either single strings or string arrays for multiple contributors.

Default Keys

Three default keys are supported, which assemble credits into simple columns. When items are loaded, a table of contributors for each category are assembled from their keys (if any) to be displayed on the credits tab.

  • artist = 'contributor_name'
  • programmer = 'programmer_name'
  • artist = 'artist_name'

Custom Values

Users can provide custom values in a table passed as extra_args. This table can specify a matrix, a table with a col and row property used to specify the internal grid dimensions of the credits UI tab, as well as a list of tables with credits categories.

Supported values:

  • key: custom key to be automatically collected on item load
  • pos_start: top left corner of the category within the grid matrix
  • pos_end bottom right corner of the category within the grid matrix
  • title_colour: a custom category title colour. Title text is stored in G.localization.misc.disctionary['credits_'..key]
  • contributors: a table of contributors to be pre-provided to the category, with their keys set to true. This is for categories that are more abstract and can't be identified by individual items, such as direction, management, advertising, special thanks, etc.

An example of this function providing custom values:

ArrowAPI.credits.use_credits(JoJoFanworks, {
    matrix = {col = 20, row = 10},
    {
        key = 'direction',
        title_colour = G.C.YELLOW,
        pos_start = {col = 0, row = 0},
        pos_end = {col = 5, row = 10},
        contributors = {
            ["BarrierTrio/Gote"] = true,
            ["Vivian Giacobbi"] = true,
        }
    },
    {
        key = 'artist',
        title_colour = G.C.ETERNAL,
        pos_start = {col = 5, row = 0},
        pos_end = {col = 12, row = 10}
    },
    {
        key = 'programmer',
        title_colour = G.C.GOLD,
        pos_start = {col = 12, row = 0},
        pos_end = {col = 16, row = 6},
    },
    {
        key = 'shader',
        title_colour = G.C.DARK_EDITION,
        pos_start = {col = 16, row = 0},
        pos_end = {col = 20, row = 6},
        contributors = {
            ["Vivian Giacobbi"] = true,
        }
    },
    {
        key = 'special',
        title_colour = G.C.GREEN,
        pos_start = {col = 12, row = 6},
        pos_end = {col = 20, row = 10},
        contributors = {
            ["Hirohiko Araki"] = true,
            ["LuckyLand Communications"] = true,
            ["Nico Abrams (LuaNES)"] = true,
        }
    },
})

Fixes

A few bugfixes as well, but mostly minor.

  • The hand_upgraded context now works with single hand upgrades, rather than just batch upgrades
  • Fixed in_pool() function returns for selecting new blinds
  • Stands now correctly show their specific stand stickers
  • (For Stands only currently) Cards with non-standard sizes scale stickers consistently with standard-sized cards
GitHub

Technically a major feature, but since it's mostly relegated to UI, I won't consider this 1.1 just yet.
Automatic Credits Generation
The use_credits(mod, extra_args) API function flags Arro...

pearl fossil
#

[1.0.4] Arrow API

#

1.0.4 Release

Download here!
Similar to the last release, but for configs this time!

Automatic Config Generation

The config.use_config(mod, extra_args) API function flags Arrow to automatically assemble configs for a given mod. In addition to the extra_args provided, Arrow will also automatically check and set configs for items loaded via loading.load_item() and loading.batch_load(). If a config doesn't exist for a supported item type, it will automatically be created.

Most of this only applies to the first load of your mod using these features, as it will retain existing configs. If you want a fresh recreation, delete your config.lua (or specified config file) in your mod directory, as well as the config/[mod_id].jkr file in your user settings directory, then relaunch your game.

Custom Configs

Users can provide custom configs in a list of tables passed as extra_args, which will be appended to the config in addition to any automatically assembled configs

{key = 'enable_VinnyContent', order = 1, before_auto = true, default_value = true}

Supported values:

  • key: custom key for the config value
    -order: order for your config item, as configs are typically saved as unordered maps
  • before_auto: sets whether the configs will appear before auto-generated configs. By default, they appear after
  • default_value: the default value of a config written to config.lua (or specified config file)

An example of this function providing custom values:

ArrowAPI.loading.use_config(Cardsauce, {
    {key = 'enable_VinnyContent', order = 1, before_auto = true, default_value = true},
    {key = 'enable_JoelContent', order = 2, before_auto = true, default_value = true},
    {key = 'enable_Music', order = 1, default_value = true},
    {key = 'enable_Logo', order = 2, default_value = true},
    {key = 'enable_Colors', order = 3, default_value = true},
    {key = 'enable_EasterEggs', order = 4, default_value = true},
    {key = 'muteWega', default_value = false, exclude_from_ui = true},
    {key = 'forceDisableOrtalab', default_value = false, exclude_from_ui = true},
    {key = 'forceEnableOrtalab', default_value = false, exclude_from_ui = true},
})

Dependencies

In addition to configs, centers loaded with loading.load_item() and loading.batch_load() now support a dependencies table. Currently, it supports two values:

  • mods: a list mod ids to filter for. If a mod is not loaded at the time an item is attempted to load, it will be filtered out. Note that this requires listed mods be able to load prior to your mod in priority, or else it won't work
  • configs`: a list of config keys to filter for. If any matching configs are false, the item will be filtered

Misc Additions

  • Added support for DeckSkin loading to assemble credits for deckskins
  • Additionally, playing cards from DeckSkins now display their artist when hovered in the main game
  • Added support for calculate functions on the title screen for Mod objects
    • context.title_card: return title_center or title_front to alter the card initially shown on the title screen (by default Ace of Spades)
    • context.splash_card: return splash_center or splash_card to alter cards created on the splash screen. context.splash_main is sent for the main splash card (by default Jimbo Joker)

Fixes

  • Restored accidentally removed extra blind functions
  • Fixed auto-credits causing weird issues with padding
  • Fixed crashes when opening the achievement menu
  • Fixed Madness not scoring its mult
  • Moved some functions around
GitHub

Similar to the last release, but for configs this time!
Automatic Config Generation
The config.use_config(mod, extra_args) API function flags Arrow to automatically assemble configs for a given mod...

pearl fossil
#

[1.0.5] Arrow API

#

1.0.5 Hotfix

Download here!

Fixing some simple bugs I found

Additions

  • Added ArrowAPI.eternal_compat_bypass flag to allow typically incompatible cards to be made Eternal for challenges
  • ArrowAPI.game.check_mod_discoveries() no longer limits itself to vanilla items when no mod is supplied. Will probably change the name later

Fixes

  • Stopped no_collection unlockable items from being shown on the title screen
  • on_evolve function for Stands correctly checks the new center
  • Configs for unloaded mod item types (such as Sleeves and Partners) are no longer automatically set to 'off' when the respective mod isn't found
  • Added evolved as a reset key for Card:set_ability(), so Stands that "devolve" for any means will not still be marked as evolved
GitHub

Fixing some simple bugs I found
Additions

Added ArrowAPI.eternal_compat_bypass flag to allow typically incompatible cards to be made Eternal for challenges
ArrowAPI.game.check_mod_discoveries() no...

charred trout
#

I've hit an epic crash tryna load this mod.

#
Syntax error: functions/state_events.lua:282: 'end' expected (to close 'function' at line 265) near 'else'


A bad lovely patch has resulted in this crash.


Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-1016c-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows

Stack Traceback
===============
(3)  C function 'function: 0x242fc230'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 892
(6) global C function 'require'
(7) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
 c = table: 0x242dc0b8  {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x242defc0, gammacorrect:false, title:Balatro, externalstorage:false (more...)}
 openedconsole = boolean: false
 confok = boolean: true
 conferr = nil
(8) global C function 'xpcall'
(9) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
 result = boolean: true
(10) global C function 'xpcall'
(11) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
 inerror = boolean: true
 deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
 earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
pearl fossil
#

Let me download the release version and test it

#

Hmm, can't repro @charred trout, what does your install folder look like?

#

Basically, I just fresh downloaded the latest release, installed it, and there's no syntax errors to be had

#

Which tells me you've likely got a bad install

#

This could also occur from other lovely patches you may have conflicting with Arrow's

charred trout
#

fresh off of the github

#

and then attempted to just be plopped in with my other mods.

charred trout
#

as for the actual mods I have there's

pearl fossil
#

Okay yeah I cannot guarantee at all that it'll work with any of these mods. Since it's an API, it's meant for development primarily, so it's more on the developer to maintain compatibility with it than the other way around. I do plan to eventually do a pass for mod compatibility with some common mods, but unfortunately I can't help you here unless you isolate the specific mod conflict

#

sorry! 🙇‍♀️

#

For the record my development environment consists of:

  • arrow
  • debug plus
  • jojo's bizarre fanworks
  • jojo's balatro adventure
  • malverk
  • galdur
  • cardsleeves
#

These are the only mods I can absolutely guarantee compatibility with atm

charred trout
#

clearly fanworks and arrow are just off limits to windows 11 users /defeatist

pearl fossil
#

Oh! That's interesting

#

that is definitely something I know why it happens

#

There's a couple of shaders in Arrow and Fanworks both that require GLSL 3 rather than GLSL 1.2? or so that Love2D uses by default. I've just never encountered someone who had an unsupported system, though why a more modern version of GLSL would be unavailable on Windows 11 is.... a mystery

#

Out of curosity, what's your graphics card?

#

I'm wondering if it uses Vulkan instead of OpenGL

charred trout
#
Processor    AMD Ryzen 3 7320U with Radeon Graphics          (2.40 GHz)
Installed RAM    8.00 GB (5.74 GB usable)
Device ID    570EC056-0205-448C-B85A-CD4E22855D9D
Product ID    00356-07509-05651-AAOEM
System type    64-bit operating system, x64-based processor
Pen and touch    No pen or touch input is available for this display```
pearl fossil
#

It says this should support up to Open GL 4.6....?

#

Currently trying to to figure out how to manage versions to hopefuly increase compatibility. Thank you for your patience

#

Okay so for the fnwk_bloom shader, it's specifically using the texelFetch() function, and for fnwk_stand_disturbia, it's the inverse() function. Ideally I can define these in preprocessor if the version isn't supported

charred trout
#

Aight.

pearl fossil
#

I think I figured it for disturbia, trying the bloom shader now

pearl fossil
#

Okay! @charred trout I just reworked both of the problem shaders to use custom implementations for the missing functions, and they no longer require GLSL 3. I've tested both of them and they seem to work identically to before, and it still loads and boots as expected, so no immediate problems on my end. Redownload Fanworks 1.0.5, I've updated the listing:
https://github.com/VivianGiacobbi/fanworks-balatro/releases/tag/v1.0.5

GitHub

Update requires ArrowAPI 1.0.5
Adjustments

Changed starting Jokers in Mood Indigo Manager to Eternal Joker, Eternal Diet Cola, Eternal Diet Cola, and Eternal Invisible Joker
Banned Adaptable Jokes...

#

This was an interesting problem to fix

#

Ideally, this means they now have full compatibility anywhere that Love2D/Balatro is also compatible

pearl fossil
pearl fossil
#

1.1.0 Release (Palette Editor, Soundpacks, and more!)

Download here!

A new major Arrow release with a slew of new development features, bugfixes, and performance improvements. It's highly recommended that you clear your config file in Balatro > config > [mod_id].jkr when installing this.

Palette Editor

An in-depth palette editor menu that consumed my life for about a month or two. Card art is edited directly in their sprite data, meaning edited palettes are compatible with all effects and shaders in the base game. Essentially, it can replace all simple cosmetic mods if you put in the effort to tinker with it!

  • Provides palette presets for default and high contrast playing cards, as well as previous Cardsauce skins
  • Provides a trans flag Spectral Card palette because I'm God's Strongest Soldier
  • Palettes can be freely edited, saved, and deleted
  • Gradients are supported with up to 8 colors in each gradient
  • Individual cards can override a palette color for finer control
  • Palettes incorporate related cards in other sets. For example, the Hearts palette also affects Lusty Joker and Bloodstone, and the Spectral palette also affects Seance and Sixth Sense.
  • All vanilla cards have been subtly color corrected to provide better palette support and a reduced overall palette count

Music Selector

An enhanced, more visual music selector menu with an interface closer to other menus in the game. Music packs are represented by artwork cards

  • Provides Tonsmith 2.0
  • Soundpacks can be filtered and searched if added by other mods
  • Dragging soundpacks changes their priority order, so higher priority packs will cover lower-priority sounds
  • None of this matters when there's only one soundpack

Reworked Credits

The Credits menu has been subtly reworked.

  • Individual contributors now show their contributions via tooltips (where applicable)

Reworked Configs

The config menu has been similarly reworked.

  • Added the ability to toggle item credits.
  • Contextually shows options for modded editions based on the presence of their mods, such as Sleeves and Partners
  • Items are now much smarter in respect to configs, so relevant items that require a disabled item type as a dependency will also be hidden even if their item type is still enabled
#

[1.1.0] Arrow API (Palette Editor Release)

#

Over the next couple of weeks I'll probably be working on a proper GitHub wiki to document the functions in this mod. However, all mod functions should have appropriate docstrings an internal documentation if you set your lsp to point to it!

gilded willow
#

fire

pearl fossil
#

Report any bugs you find on the github!!!! And have fun messing around with the palette editor!!!!

tranquil copper
#

peak

pearl fossil
#

@sullen kelp @jaunty heath @autumn ravine @timber grotto @bitter field @hollow sorrel @north solstice Grabbing a bunch of people I talked to about this before now that it's out

north solstice
#

hmmm

pearl fossil