#💻・modding-dev

1 messages · Page 44 of 1

placid frigate
#

ok thank you

tepid egret
#

how do you change the (display) name of a voucher? I tried G.P_CENTERS['voucher_name'].loc_txt.name = "newname" and that didnt work

#

the voucher i wanna change the name of is added with the steamodded API

crisp coral
#

the localization stuff is in G.localization.dictionary.Joker iirc

#

do a similar thing to how i changed the death quips

tepid egret
#

ohhh right i can just look at that

crisp coral
#

the stuff is in parse_localization or something like that

tepid egret
#

👍 thx for the help

frosty dock
#

also replace Joker with Voucher for vouchers

zealous glen
#

Out of curiosity, to make a Boss Blind have a loc_var that depends on your run, how does one do it?

#

I looked at MystBlinds but I’m not sure it does it?

frosty dock
#

something like G.GAME and <value that depends on your run> or <default>

zealous glen
#

Do I need to do anything to account for it being in the collection or not?

#

The way MystBlinds did it (calling super.…) made me confused because I don’t understand if that’s necessary or if it’s something else

crisp coral
#

that is outdated

crisp coral
south galleon
#

hello, i wanna ask what is 'k' and 'v'? ive been looking at the source for a while and i dont know what it means

gilded narwhal
#

It's something about how lua does loops

#

Probably

languid mirage
#

key and value

fallen tendon
languid mirage
#

you don't have to name them k and v

fallen tendon
#

K is the index of the entry and v is the actual value in the entry

languid mirage
#

also if key or value isn't used, it can be named as _

south galleon
#

dang, i still dont get it

lofty igloo
#

So I have a peculiar issue. When I add a joker, it uses what I presume to be a default picture for the joker. However, when I use the debug menu's unlock button, it will then show the texture I assigned it. Any ideas on what could cause this?

The code so far:

SMODS.Atlas{
    key = 'jokers',
    path = 'jokers.png',
    px = 71,
    py = 95
}:register()

SMODS.Joker{
    key = 'byers',
    rarity = 1,
    discovered = true,
    pos = { x = 0, y = 0 },
    cost = 2,
    config = { extra = 10 },
    loc_txt = {
        name = 'Byers',
        text = {
            '{C:inactive}{C:mult}+#1#{C:inactive} Mult'
        }
    },
    loc_vars = function(self, info_queue, center)
        if center then
            return { vars = { center.ability.extra } }
        end
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                mult_mod = card.ability.extra,
                message = localize{type = 'variable', key = 'a_mult', vars={card.ability.extra}}
            }
        end
    end,
    atlas = 'jokers'
}

Furthermore, if I don't check for center in loc_vars, the game crashes because center is nil, also no clue why that is, I don't see any check like that in other mods.

maiden phoenix
lofty igloo
#

I had it on card before, I'll change it back. And yeah, I tried using lumi_jokers as atlas name, I can try giving it an entirely different name to begin with

#

Okay, the crash is resolved now, so that's nice

#

The texture problem is still there.

SMODS.Atlas{
    key = 'thebabyisyou',
    path = 'jokers.png',
    px = 71,
    py = 95
}:register()

SMODS.Joker{
    key = 'byers',
    rarity = 1,
    discovered = true,
    atlas = 'thebabyisyou',
    pos = { x = 0, y = 0 },
    cost = 2,
    config = { extra = 10 },
    loc_txt = {
        name = 'Byers',
        text = {
            '{C:inactive}{C:mult}+#1#{C:inactive} Mult'
        }
    },
    loc_vars = function(self, info_queue, card)
        --- if card then
            return { vars = { card.ability.extra } }
        --- end
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                mult_mod = card.ability.extra,
                message = localize{type = 'variable', key = 'a_mult', vars={card.ability.extra}}
            }
        end
    end
}
#

It's very odd, other mods like Cryptid work fine

#

I even removed all installed mods

#

Cause I thought maybe there's a patch that a different mod is applying

frosty dock
#

You shouldn't call register on your atlas anymore

lofty igloo
#

I added that because it wasn't working without it and I saw it in the Cryptid src

mellow sable
#

Yeah I don’t think register does anything anymore haha

lofty igloo
#

ye, still defaults

#

The fact that it displays just fine when I unlock it with Debug mode also tells me that the atlas is def loaded

#

And even if I add unlocked to the Joker definition, it still displays like that

frosty dock
#

just to be sure, what's the exact steamodded version you're using?

lofty igloo
#

1.0.0-ALPHA-0714a-STEAMODDED

#

git pulled it earlier because I thought it could be a bug

gilded blaze
#

I'm trying to find the cause to empty voucher slot text only appearing in English 😭

lofty igloo
maiden phoenix
#

Whats the path of your jokers.png?

lofty igloo
wintry solar
#

What is your jokers.png?

lofty igloo
#

That pretty much

wintry solar
#

Is that not j_lumi_byers.png?

lofty igloo
#

It's both atm

#

Since the atlas is only 1 row with 1 col

#

I can add a placeholder 2nd joker to make it bigger

#

There we go

#

dual action

maiden phoenix
#

Is the size of Byers alone 71x95?

lofty igloo
#

Yeah

gilded blaze
lofty igloo
#

Atlas size with the double Byers is 142x95

maiden phoenix
# lofty igloo

Wait I can't see well, is Lumitro.lua inside the assets folder?

lofty igloo
#

No, it's in the root

maiden phoenix
#

Oh ok I was scared for a moment lol

lofty igloo
maiden phoenix
lofty igloo
#

My script to build the atlas

#
#!/usr/bin/env python3

import sys
from PIL import Image
import os
import time
import math

def build_atlas(input_images, out_file, output_size=(852, 950), image_size=(142, 190)):
    atlas = Image.new('RGBA', output_size, (0, 0, 0, 0))

    # Add each image to the atlas
    image_row = 0
    image_col = 0
    for image_path in input_images:
        print(f"Adding {image_path}")
        image = Image.open(image_path)
        atlas.paste(image, (image_col * image_size[0], image_row * image_size[1]))

        image_col += 1
        if image_col >= 6:
            image_col = 0
            image_row += 1

    # Save the atlas
    print(f"Saving {out_file}")
    atlas.save(out_file)

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: py atlas.py <output_file>")
        sys.exit(1)

    # get a list of all images in the input directory except for the output file
    output_file = sys.argv[1]
    x1_images = [os.path.join("assets/1x", f) for f in os.listdir("assets/1x") if f != output_file and f.endswith(".png")]
    x2_images = [os.path.join("assets/2x", f) for f in os.listdir("assets/2x") if f != output_file and f.endswith(".png")]

    # calculate the size of the atlas
    # only put 5 images per row
    x1_atlas_size = (
        # width, max should be 6 * 71 (because 6 images per row)
        min(426, min(len(x1_images), 6) * 71),
        # height, no limit
        max(math.ceil(len(x1_images) / 6), 1) * 95
    )

    x2_atlas_size = (
        min(852, min(len(x2_images), 6) * 142),
        max(math.ceil(len(x2_images) / 6), 1) * 190
    )

    build_atlas(x1_images, f'assets/1x/{output_file}', output_size=x1_atlas_size, image_size=(71, 95))
    build_atlas(x2_images, f'assets/2x/{output_file}', output_size=x2_atlas_size, image_size=(142, 190))

maiden phoenix
#

Have you tried naming the atlas key and joker atlas to lumi_jokers, your path to lumi_jokers.png and the joker spritesheet to lumi_jokers.png ?

lofty igloo
#

Same stuff

#

When unlocking with debug, it shows the correct texture

#

before and after pressing 1

#

I bet it's something silly or easy

#

I'll go on lunch break rq and then I'll continue debugging this

south galleon
#

just a question, which lua file i can find the descriptions for the cards?

frosty dock
south galleon
frosty dock
#

yeah it's all in there

south galleon
#

alright thanks

south galleon
frosty dock
#

yeah

#

(almost) every last bit of text

south galleon
#

alright

#

another question, whats the difference between local and global

opaque tendon
#

is this approach acceptable?

23) Implement 25% of -1 amount of hands to the blinds and properly handle disabling the hand:


a) in blind.lua, add to the method function Blind:set_blind(blind, reset, silent):
---- add to:   if not reset then

        boss_hands_storage = nil or 0
        joker_already_sold = nil`
        

a) in blind.lua, add to the method function Blind:set_blind(blind, reset, silent):


    if self:get_type() == 'Boss' and not reset and not self.disabled and pseudorandom(pseudoseed('theneedle')) < G.GAME.probabilities.normal / 4 then 
        boss_hands_storage = 1
        ease_hands_played(-boss_hands_storage)
    end
    
    
b) in blind.lua, add to the method function Blind:disable():


    if self:get_type() == 'Boss' and boss_hands_storage == 1 and not joker_already_sold then
        ease_hands_played(boss_hands_storage)
        joker_already_sold = true
    end
    
    
c) in blind.lua add to the method function Blind:defeat(silent):


    -- Clear needle like debuff effects:
    if self:get_type() == 'Boss' and not self.disabled then
        boss_hands_storage = nil or 0
        joker_already_sold = nil
    end```
south galleon
#

so local is only a block, while global in a whole class?

languid mirage
#

theres no classes

#

global will be accessible (almost) everywhere, hence the name

#

almost meaning it won't really work in love2d engine files, if you're doing an injection there

lofty igloo
#

Right, had my lunch, in the meantime, I tried creating another atlas, renamed the atlas further, created another joker, all with the same results

#

It popped up again, when I hover over the joker card again

#

If this is a stupid Proton bug

#

I stg

frosty dock
lofty igloo
#

Sure

hidden current
#

how can I change a vanilla sprite without replacing the whole atlas?

frosty dock
#

SMODS.Joker:take_ownership('joker', { atlas = 'whatever', pos = { x = 0, y = 0 } }), where SMODS.Joker is to be replaced by whatever class of the object the sprite belongs to, and 'joker' is the key of that object without the prefix (e.g. j_joker -> joker)

lofty igloo
#

Also just tried to verify game files and reinstalling Steamodded

frosty dock
#

I wanna say there's nothing wrong with your code, it works fine on my end

lofty igloo
#

huh

hidden current
lofty igloo
#

Proton will be the end of me one day

hidden current
#

oh position I'm guessing right?

frosty dock
#

replace the values for x and y with wherever the sprite is

lofty igloo
#

It's weird because other mods work just fine for me

frosty dock
#

could you send the full traceback?

lofty igloo
#

Sure

#
Oops! The game crashed:
[SMODS Lumitro "Lumitro.lua"]:33: attempt to index local 'card' (a nil value)

Additional Context:
Balatro Version: 1.0.1f-FULL
Modded Version: 1.0.0-ALPHA-0715c-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.5.0-beta6
Steamodded Mods:
    1: Lumitro by cozyGalvinism [ID: Lumitro, Version: 0.1.0]

Stack Traceback
===============
(3) Lua method 'loc_vars' at file 'Lumitro.lua:33' (from mod with id Lumitro)
Local variables:
 self = table: 0x03f9f988  {alerted:true, loc_vars:function: 0x0402b590, _saved_d_u:true, original_key:byers (more...)}
 info_queue = table: 0x0f1e8e98  {}
 card = nil
 (*temporary) = table: 0x03ed3798  {}
 (*temporary) = table: 0x17433768  {}
 (*temporary) = nil
 (*temporary) = string: "attempt to index local 'card' (a nil value)"
(4) Lua method 'generate_ui' at file 'main.lua:4807'
Local variables:
 self = table: 0x03f9f988  {alerted:true, loc_vars:function: 0x0402b590, _saved_d_u:true, original_key:byers (more...)}
 info_queue = table: 0x0f1e8e98  {}
 card = nil
 desc_nodes = table: 0x04003368  {}
 specific_vars = nil
 full_UI_table = table: 0x06ac6d28  {badges:table: 0x0f144f08, info:table: 0x04c95cf0, main:table: 0x04003368 (more...)}
 target = table: 0x06a97710  {vars:table: 0x06a3bee8, set:Joker, type:descriptions, nodes:table: 0x04003368 (more...)}
 res = table: 0x06a9d8c0  {}
(5) Lua method 'generate_UIBox_ability_table' at file 'functions/common_events.lua:2698'
Local variables:
 _c = table: 0x03f9f988  {alerted:true, loc_vars:function: 0x0402b590, _saved_d_u:true, original_key:byers (more...)}
 full_UI_table = table: 0x06ac6d28  {badges:table: 0x0f144f08, info:table: 0x04c95cf0, main:table: 0x04003368 (more...)}
 specific_vars = nil
 card_type = string: "Joker"
 badges = table: 0x0f144f08  {card_type:Joker}
 hide_desc = nil
 main_start = nil
 main_end = nil
 card = nil
 first_pass = boolean: true
 desc_nodes = table: 0x04003368  {}
 name_override = nil
 info_queue = table: 0x0f1e8e98  {}
 loc_vars = table: 0x0ba48e50  {}
(6) Lua method 'hover' at file 'card.lua:4316'
Local variables:
 self = table: 0x04c80ca0  {click_offset:table: 0x121371d8, children:table: 0x098f4478, ambient_tilt:0.2 (more...)}
(7) Lua method 'update' at file 'engine/controller.lua:399'
Local variables:
 self = table: 0x04015fa8  {held_button_times:table: 0x03f03768, focus_cursor_stack_level:1, snap_cursor_to:table: 0x03f032c8 (more...)}
 dt = number: 0.00604969
(8) Lua upvalue 'gameUpdateRef' at file 'game.lua:2616'
Local variables:
 self = table: 0x03e35d40  {PALETTE:table: 0x03f7d330, ANIMATION_FPS:10, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true (more...)}
 dt = number: 0
(9) Lua method 'update' at file 'main.lua:479'
Local variables:
 self = table: 0x03e35d40  {PALETTE:table: 0x03f7d330, ANIMATION_FPS:10, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true (more...)}
 dt = number: 0.00604969
(10) Lua field 'update' at file 'main.lua:133'
Local variables:
 dt = number: 0.00604969
(11) Lua function '?' at file 'main.lua:77' (best guess)
(12) global C function 'xpcall'
(13) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '?' (defined at line 48 of chunk main.lua)
 inerror = boolean: true
 deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
 earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])

frosty dock
#

I can't quite make sense of that

#

I might need your full mods folder

lofty igloo
#

uhm

#

It started working now?

#

I noticed there was a card.lua file in the game dir

#

Not sure why it was there, removed it, now it works?

#

My best guess: The game/Steamodded loads lua files in the same dir as the Balatro.exe?

#

Ha, yup

#

Created an empty card.lua

#

Game doesn't boot anymore

#

Guessing this is some sort of debug measure then

frosty dock
#

wtf that's weird

#

but how did that file get there to begin with

lofty igloo
#

tbh could've been me when I was looking into the game files, but I'm not sure

#

Pretty sure I never extracted it

frosty dock
#

What's happening there is the lua engine sees require "card" and apparently it looks in the game directory before checking the insides of the executable

lofty igloo
#

I guess that makes sense

frosty dock
#

lovely dumps files it modifies into Mods/lovely/dump, maybe a file from there somehow got moved to the game dir?

lofty igloo
#

My lovely/dump has no card.lua though, so if anything, I guess I must've extracted it from the exe? Can't remember that though

#

It has a cardarea.lua

frosty dock
#

then maybe you moved it

lofty igloo
#

Let me delete the lovely folder and see if it gets generated

frosty dock
#

it should, it's purely for inspection

lofty igloo
#

Ah, yeah

#

There it is

#

So I must've moved it somehow

#

That's even weirder then

#

Oh well, mystery solved I guess

#

Thank you for your help 🙇‍♂️

frosty dock
#

np

regal wolf
lofty igloo
#

Not really, the "classes" you see in Lua are just objects

#

In itself, Lua doesn't have classes, it can mimic the behavior of them, but strictly speaking, there are no classes

#

That page explains it fairly well

#

Another example, if you look at the string "class"/object, it has functions defined as string.find(s, pattern, ...), but you can still run 'hello'.find('hell') and it works, because string is the metatable for any string object, so 'hello'.find('hell') is just syntactic sugar for string.find('hello', 'hell')

#

So not really classes but something that resemble them

lofty igloo
maiden phoenix
#

Where exactly are planet consumables vars localized? Is it in their config.hand_type?

regal wolf
# lofty igloo Not really, the "classes" you see in Lua are just objects

Well yes, but it has the effect of a class system. It supports object-oriented programming through the use of tables and metatables, so you can create classes and objects by defining tables and using metatables to control their behaviour. You can also implement inheritance through the use of metatables.

lofty igloo
#

Yes, but that's still not really OOP, it's like OOP but not quite OOP

languid mirage
#

but it's not a class

#

its a table

regal wolf
lofty igloo
#

it's like oldschool javascript "classes"

maiden phoenix
lofty igloo
#
function someclass() {
  this.answer = 42;
}

someclass.prototype.getAnswer = function() {
  return this.answer;
}

var obj = new someclass();
var ans = obj.getAnswer();
languid mirage
#

what is that syntax balatrojoker

lofty igloo
#

Classic JS

languid mirage
#

insane

lofty igloo
#

Nowadays you have the class keyword and stuff

#

But under the hood

#

It's still the same

regal wolf
#

For javascript yeah

lofty igloo
#

It's pretty much the same for Lua, JS classes have their functions defined in the prototype object

#

So for all intents and purposes, a Lua "class" is the "prototype" of an object

#

Where the "class" is really just another object

regal wolf
#

Well yes, but of course there are differences between scripting languages, and OOP languages.

lofty igloo
#

If I had to write the same snippet in Lua, I'd write

function someclass:new()
    o = {}
    setmetatable(o, self)
    self.__index = self
    self.answer = 42
    return o
end

function someclass:getAnswer()
    return self.answer
end

obj = someclass:new()
ans = obj:getAnswer()
regal wolf
#
SomeClass = {}
SomeClass.__index = SomeClass

function SomeClass:new()
    local instance = setmetatable({}, SomeClass)
    instance.answer = 42
    return instance
end

function SomeClass:getAnswer()
    return self.answer
end

local obj = SomeClass:new()
local ans = obj:getAnswer()

is how I would do it.

#

but yeah very similar

lament fjord
#

I think I'm seeing a bug in lovely where it's clobbering lines where it shouldn't, is there some way to get a detailed trace of patch applications

#

(The symptom in this case is a syntax error that shouldn't logically result given the patches applied, fixed by replacing the patch with an ostensibly equivalent one)

tepid crow
lament fjord
#

I want to get intermediate results somehow

#

I know which lines are most likely getting clobbered

tepid crow
#

I'm not sure there is

wintry solar
#

Is it not just a case of a non unique pattern?

lament fjord
#

My suspicion is that somehow a thing that should just be inserting code also happens to clobber code along the way

wintry solar
#

Have you got any examples?

fallen tendon
#

i feel like i dont get something about how the enhancement calculate function works

#

im trying to make it so it gives chips mult and xmult if the hand contains a 3 of a kind

#

ive been looking at the eval card calls and ive tried both scoring_name and poker_hand

frosty dock
#

a calc return can't have multiple effects iirc

fallen tendon
#

scholar/walkie talkie do it

frosty dock
#

it works for joker effects with context.individual specifically if I'm not mistaken

#

the eval tower is a huge mess

fallen tendon
#

am i doomed

frosty dock
#

there's better_calc for reasons like this, but there's just been no progress on it and I'm not sure what its status is currently

fallen tendon
#

i guess i could make the enhancement just xmult

frosty dock
#

you can use SMODS.eval_this for each effect

#

it'll be deprecated when better calc is merged, but that's whatever

fallen tendon
#

ok i see it

frosty dock
#

fancy wrapper for card_eval_status_text

#

the original is annoying to use

fallen tendon
#

its a nightmare to do anything that isnt a joker or a deck

#

consumables are ok too

wintry solar
#

I’m not sure what state enhancement calc is in

fallen tendon
#

but playing cards make me want to end it all

#

why did the game hard code them so much

wintry solar
#

All the base game enhancements use functions like get_chip_mod

fallen tendon
#

ik

wintry solar
#

Thunk clearly never intended for mods to be made

fallen tendon
#

what happens if you want to do something even slightly more complex

wintry solar
#

The code is so unexpandable it almost needs entirely rewriting

fallen tendon
#

i tried making a card that leveled up the playued hand once

#

i suffered so much it basically made we want to stop developing robalatro

wintry solar
#

I’ve added a function return for seals similar to what jokers have to allow for extra stuff like that which might help in this case

frosty dock
#

we've gone up to 18 issues (20 earlier today) on steamodded and a bunch of them result from base game jank

fallen tendon
#

not even this works

#

am i supposed to use eval_this like that or is there more

#

actually ima just do some troubleshooting

wintry solar
#

Is there even a calculate call added for enhancements? I don’t remember

maiden phoenix
#

You have to make an eval_this for each of them iirc?

fallen tendon
#

inside gameobject.lua

wintry solar
#

I mean where is that even called

#

I can take a look in a short while

fallen tendon
#

absolutely nothing

#

so uh i think i found the problem

#

calling eval_this didnt actually create the animation in the event manager

#

how do i make it uh...

#

do that?

wintry solar
#

right yeah, you shouldn't return anything from the enhancement calculation as it's never actually stored anywhere

#

it just calls the function

#

although I guess editting the effect array might work?

fallen tendon
#

maybe, but it also might take 2 years off of my lifespan

zealous glen
fallen tendon
#

he certainly didnt code with them in mind

languid mirage
#

the game would take like 1-2 more years to release then

fallen tendon
#

yeah good point

#

but now we have a headache trying to add literally any enhancement

#

i might have to postpone my enhancement mod until better_calc comes out

maiden phoenix
#

Is it possible to see if a lovely patch applied properly beside putting debug messages inside the payload?

fallen tendon
#

because this is migrane simulator

maiden phoenix
#

Ty

wintry solar
#

Alex what's the effect you're trying to do?

fallen tendon
wintry solar
#

yeah that should be doable, I'm just playing around to figure it out but I don't see why it wouldn't work

tepid crow
#

When I reload my mods by holding m, hooked/wrapped functions happen twice. I'm assuming that's expected behavior, but can I avoid it?

#

Or should I just restart balatro completely

frosty dock
#

that is not expected behavior, lua_reload is supposed to cleanup any previous hooks

#

what functions are you experiencing duplication on?

tepid crow
#

Oh, interesting. Hold on, let me see if I can isolate it

tepid crow
frosty dock
#

I assume this is just at top-level within a main mod file?

tepid crow
#

yeah

#

it's literally the only code

maiden phoenix
#

I'm not sure why but this lovely patch doesn't want to apply, it's the only mod I have in my mod folder rn, I bet it's a really stupid mistake...

tepid crow
tepid egret
#

yo quick question, is there a way to remove a deck by taking ownership? (or a similar mechanism - i just want to remove a deck from the game)

wintry solar
#

yeah try making your pattern all one line

#

maybe use ''' around your patch too

maiden phoenix
#

Still nothing, did the " thing too

wintry solar
#

where's your lovely file saved?

maiden phoenix
#

At the root of my mod

wintry solar
#

what's it called?

frosty dock
maiden phoenix
#

lovely.toml

frosty dock
#

so SMODS.Back:take_ownership('key', {}):delete() might work

maiden phoenix
#

It's weird cuz I have a second lovely patch in the file and this one works fine

tepid egret
#

ok ill try it out, thx for helping

tepid crow
tepid egret
#

lol they have fucking balloons

lofty igloo
#

Looks good

wintry solar
#

balloons are great

tepid egret
maiden phoenix
#

This is the only mod I have that applies a lovely patch

frosty dock
tepid crow
wintry solar
#

wait

maiden phoenix
wintry solar
hidden current
#

is this place just for code or also for art?

wintry solar
#

I am biug noob and put a comma at the end of my pattern

#

I can patch this line

maiden phoenix
#

I dont get why it works for you but not me

wintry solar
#
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''G.GAME.pack_choices = self.config.center.config.choose or 1'''
position = "after"
payload = '''sendDebugMessage("Test for SDM")'''
match_indent = true
#

try using this

maiden phoenix
#

Will do

#

I'm gonna remove my second lovely patch see if it does anything

wintry solar
#

can you send me your toml?

maiden phoenix
#

I figured out the issue, I was editing the wrong file....

#

I knew it was a dumb mistake

#

I removed the second lovely patch and was wondering why it still showed in the dump and it just tilt in my head, thanks for the help 👍

tepid crow
#

the good old "edited file and ran file are not the same"

hidden current
#

working on some planet cards... I'm not really good with art but how's this?

hallow forge
#

full house?

hidden current
#

nah that's still wip

#

currently it has no implementation

#

I just wanted to mess around a bit

#

I also want to redo the stars to be different from earth

trim willow
#

that's cute!

hidden current
#

cleaned up the stars a bit and modified earth to match

maiden phoenix
#

Didn't think the Cryptid compat cards in pack was a manual thing, thought in was already in the game

hidden current
#

trying to do Sol as well but stars are harder

fallen tendon
wintry solar
#

yeah I just didn't do the context check

#

so first of all, the function needs to be calculate = function(self, center, context, effect) but I don't think effect actually does anything, it was always nil for me

#

then I did this

SMODS.eval_this(center, {
            chip_mod = 30,
            message = localize({type = 'variable', key = 'a_chips', vars = {30}})
        })
        SMODS.eval_this(center, {
            mult_mod = 3,
            message = localize({type = 'variable', key = 'a_mult', vars = {3}})
        })
        SMODS.eval_this(center, {
            Xmult_mod = 1.3,
            message = localize({type = 'variable', key = 'a_xmult', vars = {1.3}})
        })
frosty dock
hidden current
#

yeah I don't like this

hidden current
#

cleaned it up a bit but I'm still not convinced

tepid crow
frosty dock
#

I've come to realize it's always done this and maybe including it was a bad idea

#

it's a project that was abandoned in beta 2 years ago

tepid crow
#

Hmm, that sucks. I've built my own "restart balatro" button, but it's very janky.

rough furnace
#

Also I've not experienced any oddities with proton while developing modd

wintry solar
#

what a great slider

lofty igloo
zealous glen
#

New Blinds!

The Loop
When defeated once, play it again (no refreshes)
and
The Rouge Ribbon
When defeated, play the Loop (no refreshes)
Made using Myst and her L Corp code as reference

zealous glen
night pagoda
#

colorful finisher bg detected!

zealous glen
night pagoda
#

yep lol

zealous glen
#

But I suppose I forgot to point it out, my bad

night pagoda
#

no I'm not asking for this I just noticed and had a neuron activation lmao

zealous glen
#

Rouge Ribbon's color ended up too close to Crimson Heart, I feel like

#

That said, Loop's color looks better than expected

tepid crow
frosty dock
#

love.event.quit('restart') has been broken with lovely

tepid crow
#

Right, because it's not really a replace, more of an append

#

love.event.quit('restart') has been broken with lovely
Yeah was kinda afraid that'd be the case. Oh well, at least good to know you guys looked into it

rough furnace
zealous glen
tepid crow
rough furnace
#

Yeah it's "working" right now

#

But then lovley's module breaks which then breaks any mods relying on it

#

Acruslly does it break mods modules or just the lovley one?

#

I'll have to check that

frosty dock
#

not sure, but the lovely module is the first thing it breaks

#

steamodded relies on it really early

zealous glen
hidden quiver
#

ive been using the alpha with mods for about a week with no issues, but now for some reason even with a fresh install whenever i select a second card in my hand it crashes, doesnt happen with 0.9.8 only with alpha

frosty dock
#

what mods do you have installed? Not all 0.9.8 mods are fully compatible with 1.0

rough furnace
#

Also send crash log

tepid crow
hidden quiver
#

with a fresh 1.0 with no mods it crashes

rough furnace
crisp coral
#

if you're crashing without mods then it's a save file issue

frosty dock
#

it "works" but is not workable, given steamodded itself relies on the lovely module that's breaking

regal wolf
rough furnace
#

I'm going to see if I can fix it later today

regal wolf
rough furnace
#

Cause IIRC DebugPlus doesn't break with the reload and it provides a lovely module

crisp coral
#

reloading with r makes lovely itself crash for me

frosty dock
# regal wolf thoughts?

Looks nice imo, though I think stuff might get a bit too cramped if combined with the steamodded mods button

rough furnace
#

A panic?

tepid crow
regal wolf
#

I might end up moving the central button somewhere else.

frosty dock
#

I'm not a proponent of mods adding their own menu buttons, I fear it might freak out how it does if there's too many settings tabs

crisp coral
frosty dock
#

once steamodded settings pages are properly finalized, perhaps it could integrate with that

hidden quiver
regal wolf
zealous glen
regal wolf
#

Unfortunately, with Brainstorm, Balatro University Mods, and some other projects, development is slow

wintry solar
#

what's deckviewer+?

regal wolf
#

Currently it has the option to hide played cards from deck view.

#

so Instead of the cards showing up as greyed out, they will be removed. (if the setting is enabled)

#

If you've seen any of balatro university's recent stuff, you'll see it in action

zealous glen
#

By the way, @wintry solar, maybe the colorful finishers from Bunco would be a nice feature for Steamodded, if they want to allow porting it

wintry solar
#

Hmmm?

#

Colourful finishers?

zealous glen
stray warren
zealous glen
#

with this Showdown Boss Blind

#

Usually it would use the same red-blue background as every other Showdown

zealous glen
#

But besides using the Boss' main color, it automatically computes a second color for the background

regal wolf
#

For example, mathis integrates all the spectral pack mods together with one setting page iirc

wintry solar
#

Ah cool

stray warren
#

Oh, so you'd have a separate settings page if SMOD isn't installed?

wintry solar
#

That sounds like something that would work well in SMODS.Blinds

regal wolf
#

That would be one way of doing it.

zealous glen
regal wolf
#

Or, I might just keep them separate and move the button, etc

#

who knows 🤷‍♂️

zealous glen
crisp coral
#

is there a way to get the current mod's folder name

#

i have no clue how the mod path is formatted in other oses

hushed cradle
#

ive put a button on the pause menu

#

anyone know how i order it?

#

so i can put it at the bottom

#

no steamodded just lovely stuff

#

no idea what im doing

#

wait

#

mightve figured it out

#

yep figured it out

rough furnace
#

Steamodded is mod.path iirc

#

Lovely doesn't have this api, but it's supposedly in the works.

rough furnace
#

so why is the lovely module different?

lament fjord
# wintry solar Have you got any examples?

https://github.com/OceanRamen/Saturn/blob/68bfc9051bba3d1e83ac69fb75980a90ceeaf103/lovely/deckviewer.toml#L53

This patch should not be clobbering one of the end keywords, but it does on my setup, causing a syntax error to be raised by the game. Replacing the patch with an equivalent one which overwrites that matched part with one with the same number of end keywords does not cause a syntax error.

GitHub

Contribute to OceanRamen/Saturn development by creating an account on GitHub.

hushed cradle
#

is there a limit to how long lovely patches can be?

mellow sable
#

no

#

I have like a 100 line one where I replace the entire save manager with a string literal

hushed cradle
#

i cannot figure out why my thing isnt being added

#

ive tried changing the pattern

#

the

#

all the things

edgy reef
#

I have a giant one that handles D6 Joker UI as well xdd

#

(of the payload to be persise)

hushed cradle
#

ive got 2 things being patched in in one file

#

to the same place

#

not exactly

#

but like the same file

#

the first bit is in there

#

but the second one doesnt get added

#

the syntax is exactly the same

crisp coral
#

send your patches here?

hushed cradle
#

one sec lol

#

im tryna convert a mod to lovely only

#

got no idea what im doing with lovely patches tho

#

and the mods itself is confusing as hell

crisp coral
#

patterns that are multiple lines long must use regex

hushed cradle
#

right

#

i def know what that is

#

lemme just

#

do that

crisp coral
#

not like i can just straight up explain to you what to do, im on mobile

hushed cradle
#

its all good

#

i have an internet connection so i should be alright

hushed cradle
#

yo could someone help me out rq

#

i think my pattern is too long

#

lmao

#

the only thing i know about regex is \s and \

#

its in one line btw

#

if i make it multline it doesnt work

#

and i cant figure that out

wintry solar
languid mirage
#

use '''
regex here'''
for your pattern

#

so triple '

#

Then in front of very line you can replace all spaces with [\t ]* space is important there

hushed cradle
#

i managed to get around it after i realised that i was doing it all in a really dumb way, and only needed a single line pattern

#

ty tho

languid mirage
#

ah ok

lofty igloo
#

sigh

#

I know tooltips are a pain

#

It's on a Tarot card this time

#
SMODS.Consumable{
    key = 'addcan',
    name = '!addcan',
    set = 'Tarot',
    atlas = 'davekat',
    pos = { x = 0, y = 0 },
    cost = 1,
    loc_txt = {
        name = '!addcan',
        text = {
            'Adds a {C:mult}Can{} to {C:attention}Can Town'
        }
    },
    discovered = true,
    loc_vars = function(self, info_queue, card)
        local can_word = 'Cans'
        local cans = G.GAME.cans_added or 0
        if cans == 1 then
            can_word = 'Can'
        end
        info_queue[#info_queue+1] = {
            set = 'Joker',
            key = 'j_lumi_cantown',
            vars = { cans, can_word }
        }
        return {}
    end,
    use = function(self, card, area, copier)
        G.GAME.cans_added = (G.GAME.cans_added or 0) + 1

        G.E_MANAGER:add_event(Event({
            func = function()
                card_eval_status_text(card, 'extra', nil, nil, nil, {
                    message = 'Added!'
                })
                return true
            end
        }))
    end,
    can_use = function(self, card)
        return true
    end
}
south galleon
#

is this a homestuck

lofty igloo
#

no

#

mayhaps it is

south galleon
#

~~ok good ~~

#

you know this looks likea good reference for making consumable cards

#

now all i need is one for modifiers

languid mirage
#

tho idk why string var wont work

lofty igloo
languid mirage
#

oh wait

#

nvm

#

I thought +1 mult is a var

lofty igloo
#

I think consumeables just weren't made to have tooltips like that

languid mirage
#

it should be specific_vars

#

instead of vars

#

in info queue

lofty igloo
#

Still the same

#
info_queue[#info_queue+1] = {
            set = 'Joker',
            key = 'j_lumi_cantown',
            specific_vars = { cans, can_word }
        }
languid mirage
#

can you show the joker code

lofty igloo
#

Of course

#
SMODS.Joker{
    key = 'cantown',
    name = 'Can Town',
    rarity = 4,
    discovered = true,
    atlas = 'thebabyisyou',
    pos = { x = 1, y = 0 },
    cost = 10,
    config = {},
    loc_txt = {
        name = 'Can Town',
        text = {
            'This Joker gains {C:mult}+2 Mult{}',
            'for every Can {C:attention}activated{}.',
            '{C:inactive}(Currently {C:mult}#1#{C:inactive} #2#)'
        }
    },
    loc_vars = function(self, info_queue, card)
        local can_word = 'Cans'
        local cans = G.GAME.cans_added or 0
        if cans == 1 then
            can_word = 'Can'
        end
        return { vars = { cans, can_word } }
    end,
    calculate = function(self, card, context)
        local cans = G.GAME.cans_added or 0

        if context.using_consumeable and card.ability.name == 'Can Town' and context.consumeable.ability.name == '!addcan' then
            G.E_MANAGER:add_event(Event({
                func = function()
                    card_eval_status_text(card, 'extra', nil, nil, nil, {
                        message = localize{
                            type = 'variable',
                            key = 'a_mult',
                            vars = { cans }
                        },
                        mult_mod = cans * 2
                    })
                    return true
                end
            }))
            return {calculated = true}
        end
        if context.cardarea == G.jokers and context.joker_main and cans > 0 then
            return {
                message = localize{
                    type = 'variable',
                    key = 'a_mult',
                    vars = { cans * 2 }
                },
                mult_mod = cans
            }
        end
    end
}
languid mirage
#

what if instead of entire table you put G.P_CENTERS.<joker_key>

lofty igloo
#

I had G.P_CENTERS['j_lumi_cantown']:loc_vars(info_queue).vars earlier

languid mirage
#

without loc vars

lofty igloo
#

I'll try that

#

So you mean info_queue[#info_queue+1] = G.P_CENTERS.j_lumi_cantown?

languid mirage
#

yep

lofty igloo
#

That did it

#

Thank you

languid mirage
#

You're welcome

lofty igloo
#

A quick question as well: What's the easiest way to make a little bit of text appear under the card when it gets consumed? The "Added!" message has the yellow effect stuff about it but that's a bit too much tbh

languid mirage
#

copied from cryptid, but this is the easiest way card_eval_status_text(card, 'extra', nil, nil, nil, { message = "M!", colour = G.C.FILTER, card = card })

lofty igloo
#

Ah, thank you again!

south galleon
#

hey guys, does anyone have an example of how to make a modded tarot card? i just need references

languid mirage
#

cryptid mod has eclipse card

fast badge
languid mirage
limpid flint
frosty dock
#

wtf
-# This user is under investigation for potential involvement in the Trump assassination attempt in Pennsylvania, July 14th. Please report any incidents to the respective authorities. (703) 374-7400

lofty igloo
#

crazy
-# This user is under investigation for potential involvement in the Trump assassination attempt in Pennsylvania, July 14th. Please report any incidents to the respective authorities. (703) 374-7400

#

rip

#

forgot about that

zealous glen
#

crazy
-# This user is under investigation for potential ballin’. Please report any incidents to the NBA.

lament fjord
#

crazy
-# This user is under investigation for possession of way too many Balatro mods. Please report any incidents to /dev/null.

south galleon
#

what

limpid flint
#

-# This user is afraid of potential subtexts ambush. Please send medical assistance immediately to ¢{°¥=¥°©=¢{¢¢°¢°|π=|™¥{©©=÷©™÷{{

frosty dock
#

Actually insane
-# (edited)

#

surely it doesn't work without a newline
-# (edited)

south galleon
#

heh

#

thats really funny

frosty dock
#

what a shame, it's too big

languid mirage
#

Discord needs to add -## and -### to fix that

shell timber
#

i don't think even -# is standard markdown though

limpid flint
#

-# still too big

fast badge
#

second worst thing they added after masked links
-# Readers added context: this guy is chronically online

fast badge
fast badge
#

its css

fast badge
#

both are

regal wolf
#

I mean masked links at least show up as blue etc

#

With this it looks like an official message.

#

-# (edited)

#

Like it’s the same font/colour etc

fast badge
#

yeah
-# This person has been flagged as a scammer by Discord.

regal wolf
#

Ppl are using it for scams

#

Especially when combined with the hidden links

fast badge
#

yeah
-# This guy is real

#

guess what tho, they wont do shit about these problems

#

classic discord pull

regal wolf
#

No bc they’re too busy selling profile pictures for $15

fast badge
#

literally

regal wolf
#

Wild

fast badge
zealous glen
#

wh

fast badge
#

emojis work

#

hmm

#

you can do shenanigans with custom emojis then

#

god be with us

rough furnace
#

Its just a text thing

#

You can do whatever you can do in text

#

-# (edited) (or was it?)

limpid flint
#

-# (It was not)

fast badge
#

-# (or was it) (edited)

frosty dock
#

-# (or was it)

#

-# at least the (edited) text isn't the same size as this

#

_ _

-# (edited)

fast badge
#

i swear they made the edited smaller for this

#

i swear it was smaller before

#

bigger*

#

me when i fumble

earnest mauve
#

-# j

fast badge
#

j

crisp elbow
#

m

south galleon
#

oh sorry i thought this was general

earnest mauve
#

i always forget how to do the big text

#

m

#

right that’s how

limpid flint
#

e

south galleon
#

so ive just been looking at the jellymod for reference on how to add tarot cards:

G.localization.misc.v_dictionary.a_xchips = "X#1# Chips"
init_localization()

updateLocalizationJelly(tarot_localization, "Tarot")
updateLocalizationJelly(enhance_localization, "Enhanced")
if supported_languages[G.SETTINGS.language] then
    local tarot_localization = assert(loadstring(love.filesystem.read(SMODS.findModByID("JellyTarots").path .. '/localization/' ..G.SETTINGS.language..'/tarots.lua')))()
    local enhance_localization = assert(loadstring(love.filesystem.read(SMODS.findModByID("JellyTarots").path .. '/localization/' ..G.SETTINGS.language..'/enhancements.lua')))()
    updateLocalizationJelly(tarot_localization, "Tarot")
    updateLocalizationJelly(enhance_localization, "Enhanced")
end 

what does this do, i wonder?

frosty dock
#

it's like the most outdated thing out there

south galleon
#

aw man, then where do i get code reference for modded tarot cards

iron sphinx
#

cryptid

frosty dock
#

use literally anything else

south galleon
#

oh alright

#

do i need to update to steammodded 1.0.0 or nah (im currently in 0.9.8)

frosty dock
#

I like to say it really doesn't make sense to start making mods for 0.9.8 at this point in time

#

so yes

south galleon
#

im very new to modding this game after all

mellow sable
south galleon
#

how do i fix this?

iron sphinx
#

you are still on 0.9.8

south galleon
#

yeah but how do i update to 1.0.0

iron sphinx
#

did you install 0.9.8 with lovely or the injector?

south galleon
iron sphinx
south galleon
#

so i dont need to use steammodded anymore?

iron sphinx
#

here, download from this link☝️

south galleon
#

so i use both of these??

iron sphinx
#

yes, you need lovely to mod the game now, and you need steamodded to load the mod

iron sphinx
#

what do you mean?

#

program? idk vsc or something

south galleon
iron sphinx
#

all(?) "lovely" mods use 1.0.0 steamodded

#

wait or is it the mods that doesnt use steamodded

rough furnace
#

If you plan to add content, you probably want to use steamodded, if you want to modify the games behavior, then you probably want to use lovely

#

You can also use both at the same time.

rough furnace
#

IIRC Taisman also doesn't depend on steamodded at all

languid mirage
#

cartomancer too balatrojoker

rough furnace
#

Also that one score improvement mod I made no-one care avout

iron sphinx
#

yeah i forgot about mods that only uses lovely

south galleon
#

okay i got steammodded and lovely (i resetted it)

#

crashed

#

these are the mods i put in the directory btw

rough furnace
#

Verify file integrity on steam

south galleon
#

i did! and then after that i installed lovely, and steammodded injector (ps version)

languid mirage
#

you don't

#

you dont inject steamodded
you download source from github and put it in %appdata%/balatro/mods

south galleon
#

so i dont need the injector?

languid mirage
#

There's literally an installation guide

languid mirage
lofty igloo
#

Installing lovely is putting the version.dll next to Balatro.exe, installing Steamodded is either git cloning into the Mods folder in AppData or downloading the zip and unpacking it into the Mods folder

south galleon
#

okay so I clicked "verify file integrity" and put the lovely version.dll

#

game work fine, there's no mods tab

rough furnace
#

What's your mods folder look like?

south galleon
#

I just made a mod folder in the %appdata%

lofty igloo
#

C:\users\[your username]\AppData\Roaming\Balatro\Mods\

south galleon
#

yeah I just created a folder in that path

#

for mods

lofty igloo
#

Yeah, put Steamodded in there

languid mirage
south galleon
lofty igloo
#

Ye

#

Although if you put in Steamodded, you should have the Mods tab at the very least

south galleon
#

alright everything works!

lofty igloo
south galleon
#

thank you!

#

(now all that's left is how to make mods for this game)

languid mirage
#

if you scroll down

lofty igloo
languid mirage
#

also make sure to check out example mods folder in steamodded files

south galleon
#

will do

austere schooner
#

oh this is gonna be fun to debug

#

it looks like something something atlases??

#

since 6525 is pointing to G.ASSET_ATLAS

#

i might have set up this consumable wrong

hushed cradle
#

is there a thing i can do to check if youre in the collection

#

so when its making the tooltip for a joker it changes based on whether its in a run or in the collection

solemn coral
#

I have a joker that kinda does that

#
loc_vars = function(self, info_queue, center)
    local acesTotal = 0
    local acesEnhanced = 0
    if G.playing_cards then
        for k, v in pairs(G.playing_cards) do
            if v.config.center ~= G.P_CENTERS.c_base and v.base.value == "Ace" then acesEnhanced = acesEnhanced + 1 end
            if v.base.value == "Ace" then acesTotal = acesTotal + 1 end
        end
    else
        acesEnhanced = 0
        acesTotal = 4
    end
    return {vars = {center.ability.extra.mult, acesEnhanced.."/"..acesTotal}}
end,
#

It uses if G.playing_cards to check if there's an available deck it can look at. If there is, it knows it's in a run and it uses the values of your deck, and if there's not, it knows it's in the main menu and it just uses some preset default values

#

The only minor thing is that if you check your collection mid-run from the pause menu, it still knows its in a run and it uses the values from that run's deck

hushed cradle
#

cool ty

#

that shouldnt be a big deal

#

i wonder if i can just have a bool thats set true when a run starts and set false when a run ends

#

idk why i didnt think before asking the question

#

mb

#

wait that has the exact same problem lol

#

nvm

#

not a big deal

zealous glen
#

Essentially the Joker collection is three different CardAreas so it just iterates over each of them

#

Depending on your issue you can do other things, but that’s a relatively easy check

#

I think this was it

hushed cradle
#

thank you

lament fjord
wintry solar
zealous glen
#

See my previous message

wintry solar
#

Ah yes, but for simple purposes of whether the card is being displayed in the collection or not, a simple check the that collection exists should suffice

hushed cradle
#

im having trouble hooking to when a card is hovered over lol

#

let you know if it works when i fix this thing

#
function Card:hover()
  card_hover_ref()
  if G.your_collection then
    initCollectionLoc()
  else
    initGameLoc()
  end
end```
#

should this work?

#

because apparently theres an issue where it tries to juice up but self is nil

tepid crow
#

you need to pass self to the ref I think

hushed cradle
#

self.card_hover_ref()

#

?

#

i tried doing that

#

or

tepid crow
#

no, card_hover_ref(self)

hushed cradle
#

ref = self

#

oh

#

damn

#

oh my god of course

#

im actually an idiot

tepid crow
#

that's the standard programming workflow

hushed cradle
#

yeah i forgot you had to put in self for ages

tepid crow
#

you'll be back to "I'm so smart 🧠" in a bit

hushed cradle
#

then i remember but cos its not a parameter in the bracket i was like it goes on the front

#

hopefully lol

#

my 9 in gcse comp sci going to waste lol

zealous glen
wintry solar
#

Oh I’m not sure actually, what happens to the card area when the collection is closed? I assumed it would be set to nil

#

Like how G.jokers doesn’t exist in the main menu

zealous glen
#

I’m thinking more about the card that’s still in G.jokers while the collection is open

hushed cradle
#

i just want it to display different things in collection and in game

#

so if you use collection in game

zealous glen
#

I use the function that I mentioned

hushed cradle
#

it shows different to what it does in your joker area

zealous glen
#

Maybe you can do it only checking G.your_collection, but I have the complete check

#

I mostly do it to set main_end

#

It’s nil in the collection or actually some tooltip element otherwise

hushed cradle
#

trying it with just checking your_collection atm

#

but i cant get the text to change lol

zealous glen
#

What’s your whole code

#

Well just the UI part

wintry solar
#

Yeah I think putting a (G.your_collection and X or Y) as your loc_vars would do the job

#

Assuming you’re just changing the tooltips values?

zealous glen
#

Alternatively maybe checking if G.GAME would work

hushed cradle
#

one sec

zealous glen
#

Because usually the variables that won’t work in the collection are there

hushed cradle
#
  if Saturn.USER.SETTINGS.STATTRACK.ENABLED then
    if Saturn.USER.SETTINGS.STATTRACK.MONEY_GEN then Saturn.ST.addCounterLocalization(localization, "money_generators") end
    if Saturn.USER.SETTINGS.STATTRACK.CARD_GEN then Saturn.ST.addCounterLocalization(localization, "card_generators") end
    if Saturn.USER.SETTINGS.STATTRACK.PLUS_MULT then Saturn.ST.addCounterLocalization(localization, "plus_mults") end
    if Saturn.USER.SETTINGS.STATTRACK.PLUS_CHIPS then Saturn.ST.addCounterLocalization(localization, "plus_chips") end
    if Saturn.USER.SETTINGS.STATTRACK.X_MULT then Saturn.ST.addCounterLocalization(localization, "x_mults") end
    if Saturn.USER.SETTINGS.STATTRACK.MISCELLANEOUS then Saturn.ST.addCounterLocalization(localization, "miscellaneous") end
  end
end

function initGameLoc()
  if Saturn.USER.SETTINGS.STATTRACK.ENABLED then
    if Saturn.USER.SETTINGS.STATTRACK.MONEY_GEN then Saturn.ST.addCounterLocalization(highscore_localization, "money_generators") end
    if Saturn.USER.SETTINGS.STATTRACK.CARD_GEN then Saturn.ST.addCounterLocalization(highscore_localization, "card_generators") end
    if Saturn.USER.SETTINGS.STATTRACK.PLUS_MULT then Saturn.ST.addCounterLocalization(highscore_localization, "plus_mults") end
    if Saturn.USER.SETTINGS.STATTRACK.PLUS_CHIPS then Saturn.ST.addCounterLocalization(highscore_localization, "plus_chips") end
    if Saturn.USER.SETTINGS.STATTRACK.X_MULT then Saturn.ST.addCounterLocalization(highscore_localization, "x_mults") end
    if Saturn.USER.SETTINGS.STATTRACK.MISCELLANEOUS then Saturn.ST.addCounterLocalization(highscore_localization, "miscellaneous") end
  end
end

function Saturn.ST.addCounterLocalization(localization, type)
  for _, k in ipairs(localizations[type]) do
    local text = G.localization.descriptions.Joker[k.id].text
    table.insert(text, #text + 1, k.counter_text)
  end
end```
#

and then

#

the things look like this

zealous glen
#

Ah you’re not using Steamodded

hushed cradle
#

nah

zealous glen
#

L

hushed cradle
#

i want to use some of the things balatro university has

#

and it was having issues w mods i have

#

so i ported a couple to lovely

#

and gave up on the rest

zealous glen
#

Steamodded takes care of the UI

hushed cradle
#

this is already just lovely patches stuff but im tryna expand it

zealous glen
#

So I just need to check if the Joker is in the collection or not

#

And if it isn’t I create the UI element I want to add

wintry solar
#

I still don’t think you need to check the specific location of the card, but I’m not sure if your use case victin

zealous glen
#

Probably not

tepid crow
zealous glen
#

I didn’t think of testing what if only the collection exists

zealous glen
#

I just mean accessing some of the elements where I can introduce other, new elements

#

Mostly main_end

#

For example:

tepid crow
#

oh I yeah I probably should've read through the chat more

#

I'm assuming you're referring to stuff like descriptions, tooltips etc

zealous glen
#

I did make a custom Boss tooltip for a Joker

hushed cradle
mellow sable
#

My favorite mod, SaturnSaturnSaturnSaturnSaturnSaturnSaturnSaturnSaturnSaturn

tepid crow
hushed cradle
#

i got early access

mellow sable
#

Yeah I think something is off here…

hushed cradle
#

well its better than what i had before

zealous glen
hushed cradle
#

a stack overflow from 2 functions calling eachother over and over

tepid crow
#

could've had it be an image of dwayne

zealous glen
#

tbf I reused the Collection Blind UI

#

but thanks

zealous glen
wintry solar
#

Can you info queue a blind?

#

Also, Lars, are you having issues with the ui stuff you’re doing?

tepid crow
tepid crow
wintry solar
#

Ooo, what are you working on?

zealous glen
#

I do would like to have a Blind tooltip tho

zealous glen
wintry solar
#

I mean yours look great

#

Oh when you hover yes

tepid crow
wintry solar
#

That’s nice

#

I do have on my list to completely recreate this page to make it more compatible with lots of options

#

Having to click through the entire option selector is a pain imo

tepid crow
#

yeah, probably a good idea for compatibility too

wintry solar
#

But my current plan would allow for an extension to allow deck sleeves

tepid crow
#

like what I have?

wintry solar
#

No not quite

#

I’ll draw up some quick concepts

hushed cradle
#

you dont have to remove previous lovely patches do you?

#

like if i add smth

#

then remove that patch file

tepid crow
hushed cradle
#

does the patch stay

#

surely not

tepid crow
#

no, you don't need to "unpatch" anything

hushed cradle
#

ive got some patch that is just there

#

i swear i checked all my files

#

it wont go away

tepid crow
#

I haven't used lovely patching myself though, so I may be spouting bs

hushed cradle
#

it wouldnt make sense for you to have to remove them

#

that would be such a pain

wintry solar
#

The patch gets applied when you launch the game

hushed cradle
#

if i make changes w the game open

#

then restart it

#

will it still be the old stuff

#

im about to (hopefully) get this working so ill be able to check

#

oh my god

#

its because i made changes to it

#

so it wasnt showing the newest file in vs code

tepid crow
#

get you an editor that warns you if file-on-disk has changed

hushed cradle
#

its all good

#

still having trouble with updating the loc var text based on wheter its in the collection or not

#

if anyone has any ideas

#

ty

#

anyone know the format of loc_vars?

#

lemme look online rq

river panther
#

Where vars = {var1, var2} are the variables used for your description

zealous glen
hushed cradle
#

lol

zealous glen
hushed cradle
#

is there anyway to edit the localization text from the card

zealous glen
#

You know what I’m going to say

hushed cradle
#

yep

river panther
#

Use steammodded

zealous glen
#

Although you could edit the localization files directly, but that’s not recommended

hushed cradle
#

ive got a thing that adds to them

#

which works fine

#

but i want to update them during a game

#

which i cant figure out

river panther
#

Razor blade | Uncommon | Set Discards to 1. Discarded cards are destroyed. Is this too broken?

zealous glen
#

You could edit the localization dictionary

river panther
#

nahhh

zealous glen
#

It’s like five times better than Trading Card

river panther
#

Yeah but only one discard

zealous glen
#

Still

hushed cradle
#

modding going so badly my steam crashed

regal wolf
#

what are u trying to do nekojoe

hushed cradle
#

trying to get joker info to show different things in the game, and the collection

regal wolf
#

like, the joker description?

hushed cradle
#

when it says like what the joker does

#

yeah

frosty dock
#

step 1 is don't re-invent the wheel

regal wolf
hushed cradle
#

but im almost there

regal wolf
#

why do u wanna do that

#

like whats the point

hushed cradle
#

uh

#

well

#

yk this super cool mod called saturn

frosty dock
#

steamodded literally provides APIs that make this easy

hushed cradle
#

i may have been tryna implement highscore tracker

#

and it all works but changing the description depending on if its in game or in collection

zealous glen
frosty dock
#

it's easy to get wrong, and having your own implementation will probably create a conflict with steamodded

#

If I'm being honest I'd always rather a dependency than a conflict

hushed cradle
#

i see it as a learning experience

#

a bad one lol

#

im just tryna get experience w lovely and lua

#

and its fun to do that by adding my own stuff that only im gonna use

#

also i wanted to get this done cos i have a run going where i got 70k money generated w ticket

#

and wanna have that saved as a stat somewhere

rough furnace
regal wolf
#

i think it just depends on different factors

#

some mods / modders work better with steamodded, some without.

#

if you're a beginner, steamodded is probably the way to go.

frosty dock
#

that, I can agree on

#

Card description UI is just especially tricky, and getting it right in steamodded took a lot of fiddling around, plus the conflict potential is high

regal wolf
#

Yeah, balatro's UI can be a little odd at times.

frosty dock
#

JellyMod is a great bad example of this

#

not because it was done poorly

#

but because proper APIs didn't exist when it was first made and it never adopted them when they did

hushed cradle
#

solved all the problems

#

just made another word a variable that i can pass in

#

im acc stupid

regal wolf
#

@frosty dock could u send a link to the code for the card description ui?

wintry solar
# tepid crow Sure! Gimme a tag, I'd like to see what you're working on

Here's the rough idea thrown together rather shoddily as an image. The idea is to select the deck and stake by clicking on them before heading to the next screen, allowing for seeing multiple at once so there's not too many clicks to find what you're looking for. I haven't started work on this yet other than throwing some ideas around in my head, so any initial thoughts would be appreciated.

hushed cradle
#

djnasty

hushed cradle
#

idk you mightve done it already

#

i made a way for tracking highest stacks with saturn

#

and it shows the highest stat in the collection

regal wolf
#

it boils

frosty dock
#

why did that send

regal wolf
#

🔥

#

steamodded cooking

regal wolf
hushed cradle
#

thats alright

#

should i dm it to you

frosty dock
#

sorry my keyboard is acting up

regal wolf
#

just send it in the saturn thread

hushed cradle
#

cool

#

alright

regal wolf
frosty dock
#

anyways what I meant to say is it boils down to bypassing the main stuff that happens in generate_card_ui (the giant if-elseif tower) for a call to a generate_ui function that's generally predefined to take input from a custom loc_vars function (if it exists) but can be overridden

#

the bypassing is disabled by setting generate_ui to 0 if necessary

#

the default implementation on centers looks like this

#
generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
            local target = {
                type = 'descriptions',
                key = self.key,
                set = self.set,
                nodes = desc_nodes,
                vars =
                    specific_vars or {}
            }
            local res = {}
            if self.loc_vars and type(self.loc_vars) == 'function' then
                res = self:loc_vars(info_queue, card) or {}
                target.vars = res.vars or target.vars
                target.key = res.key or target.key
            end
            if not full_UI_table.name then
                full_UI_table.name = localize { type = 'name', set = self.set, key = target.key or self.key, nodes = full_UI_table.name }
            end
            if specific_vars and specific_vars.debuffed and not res.replace_debuff then
                target = { type = 'other', key = 'debuffed_' ..
                (specific_vars.playing_card and 'playing_card' or 'default'), nodes = desc_nodes }
            end
            if res.main_start then
                desc_nodes[#desc_nodes + 1] = res.main_start
            end
            localize(target)
            if res.main_end then
                desc_nodes[#desc_nodes + 1] = res.main_end
            end
        end
#

relevant patches beside this are in steamodded lovely/center.toml starting in line 76

regal wolf
#

ahhh so ur just overriding the function

frosty dock
#

technically I'm deferring part of the function to another user-defined function

regal wolf
#

yeah

#

so like a ref kinda

tepid crow
# wintry solar Here's the rough idea thrown together rather shoddily as an image. The idea is t...

Ah, interesting. Probably not a bad idea with some screenshots I've seen that literally have the selection illegible because of overlap. I do have two questions right now:

  1. This format would miss the user being able to instantly read a description, will it show it on hover instead? Cuz that seems like an unnecessary step for the user.
  2. Would it support mod developers adding a third, fourth selection screen etc?
wintry solar
#
  1. Yes, I'd like the description to show on hover like the tooltips on other cards.
  2. I can certainly build it that way, such that you add your selection screen to a table that it parses through
tepid crow
#

I didn't really like the tooltip idea at first, but the more I think about it, the better it probably is.

I'm assuming you'd like a "selected so far" section like you already showed in the image. If mod devs add multiple selection screens (lets say 5-6), did you consider how that would still be able to fit on screen?

wintry solar
#

Hmmm that's definitely something to consider.

gilded narwhal
maiden phoenix
#

Is that chocolate milk?

crisp elbow
#

No it's pilk

zealous glen
hallow forge
#

nice

wintry solar
#

can you offset it to the left more?

zealous glen
#

I don't know

night pagoda
#

🤨 ???

#

was the fool supposed to work like luchador before or something?

edgy reef
#

Yes

night pagoda
#

wow

#

I honestly feel like luchador really works better as a consumable now

#

not a tarot maybe

#

but as a spectral?

tepid crow
#

as spectral it'd basically be impossible to find as hail-mary in the shop

hallow forge
#

but like how would it work in a pack?

frosty dock
#

old fool would just disable the next boss blind iirc

#

not sure since I didn't play at that time

night pagoda
#

(hmm, current luchador also should generate a tag instead of working only in the combat...)

#

I remember when I first discovered luchador I sold it in the blind choosing menu before the boss of the ante because I didn't think it wouldn't work like that

tepid crow
#

yeah that's an easy mistake to make lol

#

it might not do it that way for balance reasons?

#

not sure

hallow forge
#

imagine if the boss blind just vanished and you were stuck on the blind select screen

night pagoda
#

balatro horror

tepid crow
#

you just don't get the play the boss blind, no rewards, go to the next ante

night pagoda
#

accidentialy removed finisher boss blind and didn't get the win

#

😭

#

yes now I want to make luchador generate a tag instead

#

using it on anaglyph deck will just turn luchador into chicot

obtuse scarab
#

not entirely sure if anyone's done something like this but i thought about it today and thought it was funny

#

im still working on the print in the center

crisp elbow
#

Imagine a cruel tarot pack that only gives you a singular tarot card

austere schooner
#

I don't think I've seen a yugioh card joker yet no

obtuse scarab
#

funny

#

i need to also get that print feel on the border too

crisp elbow
#

There was one based on ygo that was just exodia

#

But not based on the card itself

obtuse scarab
#

pot of joker

crisp elbow
#

True

zealous glen
zealous glen
obtuse scarab
#

shame ... dont mind too much however

#

i had this other design for a different joker but its supposed to be bland

zealous glen
#

It looks good. I think it's a bit too bland but you said that's the goal

crisp elbow
#

Why is jimbo wearing that ridiculous tie

obtuse scarab
#

because he's an accountant. serious job

#

i need to learn how to code now so i can actually put him in 😭

zealous glen
#

What does he do

obtuse scarab
#

every boss blind he takes away $5 and adds to a x1 mult by .25

hallow forge
#

what rarity is it?

obtuse scarab
#

uncommon

hallow forge
#

gonna be honest, i cant see myself ever taking this

obtuse scarab
#

yeah i was talking it over with some friends and we just went back and forth on what you gain

hallow forge
#

but like WHY would you take this

zealous glen
#

It seems much worse than other scaling options

#

Even Throwback is better

#

by a lot, actually

obtuse scarab
#

i just rolled with the idea of losing money to get an "investment" of some sort

hallow forge
#

not only is a super slow scaler is hurts econ

zealous glen
#

Throwback is at most $4 for X0.25, and you even get a Tag for it

#

@wintry solar what about now?

obtuse scarab
hushed cradle
zealous glen
#

Madness is worse than Throwback confirmed

zealous glen
obtuse scarab
#

eureka!

hushed cradle
#

he retriggers aces

#

was thinking along the lines of scholar works w aces

wintry solar
hushed cradle
#

so somethign smart

hallow forge
obtuse scarab
#

a lot, actually

zealous glen
hushed cradle
#

what on earth

gilded narwhal
#

Hey guys how much does it matter what goes in what lua file

hallow forge
#

wdym?

gilded narwhal
#

Like I see some mods have all their code in one file while some have it spread out over a bunch of different ones

#

Does spreading it out just make it easier to work with?

zealous glen
#

Remember: always code as if future you got lost for 6 months in antarctica, then got sent back in time to your house hungry and with a machete

hallow forge
#

im just lazy

zealous glen
gilded narwhal
#

But that doesn't actually do anything to the functionality does it

hallow forge
#

no

obtuse scarab
hallow forge
#

the joker idea is simply too weak

#

i can't think of a situation where you would want to take and keep it, MAYBE you take it if nothing else if availiable

obtuse scarab
#

i'll keep thinking on what it could give to make it worth it

#

i still think just the base concept of it is cool

humble tartan
#

Has anyone tried to use Steamworks API listener callbacks with luasteam? Like onAuthSessionTicketResponse? I can not for the life of me get any of the callbacks to invoke. I have runCallbacks() running during love.update() but no luck

wintry solar
#

We have progress

hallow forge
#

deck pages! ... wait

hushed cradle
#

if i do an or of 2 numbers will it give the higher one?

gilded narwhal
#

What is this for

edgy reef
#

What in the

gilded narwhal
#

This is in joker evolution

edgy reef
#

Oh, I thought this was a local thunk code moment