#💻・modding-dev

1 messages · Page 357 of 1

willow plinth
#

yeah...i guess i'll try moving it levels above, but i just thought it may be possible to just define it as a "floating" node, idk

#

the "issue" is the next level above is all the buttons, so run info, options, ...

raven forge
#

looking at the code, self.children.alert is set to a box. If you're doing dynamic stuff, you just need to find the right node

willow plinth
#

this is just one level up

raven forge
#

alright ignore that completely!

#

don't just stick the box in; it seems like alerts are actually special cased, as I said, self.children.alert is set in the game's code

#

yeah uh I may appear to know things but I am also lost. sorry

willow plinth
#

yeah yeah i looked at that whole children.alert thing already, but can't really grasp it...does that mean i can attach children={alert=SOMETHING} to my run info button

#

all good, thanks anyway

brisk rose
#

it's never quite as easy as it seems

willow plinth
raven forge
#

you're in luck, I'm the only one who can really help. I will help

willow plinth
#

i lost an afternoon to self building lovely

raven forge
#

I just tried to fix lovely...

#

sigh

scarlet thorn
sleek cliff
#

how should I change this to make this sense if a planet card is used

raven forge
brisk rose
raven forge
#

have you already done the above (and checked if the directory named in the error actually has stuff in it)

brisk rose
#

I need to have done git clone --recursive

#

doi

#

I didn't check for submodules

brisk rose
#

lol

#

after a git submodule update --recursive --init i get a bit further

raven forge
#

could you post the entire error?

#

lots of people have been having issues. especially on linux

brisk rose
cunning barn
#

ok im almost finished with burninated cards. i just need to figure out how to call the last played hand specifically- as in, the most recent one you played
i know level up is just level_up_hand but i dunno how to call it to specifically be the hand you most recently played without it being a hand that is actively being played in the scoring step

raven forge
brisk rose
#

tbh... i should just try to get a newer ubuntu wsl, instead of whatever this shit was on the microsoft store

#

this thing kinds sucks

brisk rose
willow plinth
raven forge
#

is that run info button in the base game? the scaling math is clearly wrong

willow plinth
#

yeah that's vanilla except for the skill tree button

raven forge
#

yeah it's scaled inconsistently. ui in balatro not only is eye-wateringly verbose, it's also bugged

willow plinth
#

yeah lol

#

the solution was surprisingly simple, i just looked at the wrong places for inspiration

#
    if G.HUD then 
        if not G.run_info_alert then
            G.run_info_alert = UIBox{definition = create_UIBox_card_alert(), config = {align="tri", offset = {x = 0.05, y = -0.05}, major = G.HUD:get_UIE_by_ID('run_info_button')}}
            G.run_info_alert.states.collide.can = false
        end
    end

this in the main game update loop

#

which is a simplified variant of how the collection button does it

raven forge
#

makes sense

willow plinth
#

in balatro universe yes

#

in my world it doesn't make sense AT ALL to add a small info icon to a button through a global event instead of right there in the component lmao

but then again, UI_definitions.lua is 7k lines long 💀

scarlet thorn
#

mod profiles' is 1k lines

raven forge
willow plinth
#

i think thunk uses a bundler tho...i can't imagine he actually uses these files as is

scarlet thorn
#

I think its mainly because UI nodes tank up a bunch of space

willow plinth
#

yeah it's just so fucking verbose

raven forge
#

wait sorry I was thinking of ui.lua

raven forge
#

which is a whole different thing

scarlet thorn
#

theres comments

willow plinth
#

n=G.UIT.<letter> a million times instead of just the letter

scarlet thorn
#

and all variables have the same names as they did

scarlet thorn
#

err well

#

G.UIT is so its not polluting the global variables that much

#

but it should just be a number

raven forge
#

UI verbosity is because it's in pure Lua... all the tables are manually defined. as if you wrote html defining the dimensions of every box

scarlet thorn
willow plinth
brisk rose
#

hmm... it seems to be fozen (trying to upgrade ubuntu in wsl to 25.04)

raven forge
#

what could help is some higher level functions. like components in html

hasty mist
#

trying to make this work, was working on it yesterday with some help but i dont understand much

scarlet thorn
#

balatro

willow plinth
#

all this shit in ui_definitions could be abstracted away in to uibox or node or whatever

#

but whatever, rule 3 i guess...

brisk rose
#

took a bit, lol

hasty mist
#

but ive done it wrong somehow

brisk rose
scarlet thorn
#

odd rule but doesnt fit here

brisk rose
#

lol

scarlet thorn
#

its kinda like

#

impossible to not debug vanilla code

willow plinth
#

yeah idk i felt like my ramblings border on debugging source code but whatever

hasty mist
#

what does rule 3 even mean? we can't fix bugs in vanilla?

scarlet thorn
#

unless they mean fully unaltered no code of our own running

brisk rose
#

Rule 3 means like... don't use a ram viewer? but like... that's done all the time too

#

so yeah it's not a big thing

willow plinth
#

using a ram viewer wouldn't be source code debugging tho, right?

brisk rose
#

oh yeah

#

I meant like... the source code quivilant

#

state viewer

#

or smth

#

which people use debugplus as all the time

#

which it is needed for

raven forge
#

the rules are actually outdated, modding on non pc is alive now

brisk rose
#

which is the rule

#

the reason is thunk doesn't want tim apple to kill him

#

or smth

scarlet thorn
#

rule 3 is blatantly disregarded by thunk

#

lmao

brisk rose
#

channel rather

#

it doesn't jump for me

scarlet thorn
#

Disabled lua compilation, so that we can get the source and promotes the debug features

brisk rose
#

lol

scarlet thorn
#

debug plus is based off of the og debug mod

brisk rose
willow plinth
#

i'd like to ping a mod to clarify that rule but discord people always cry about pings :(

scarlet thorn
#

whatever that is

brisk rose
#

and adding to it

scarlet thorn
brisk rose
#

debugplus still uses canillia balatro's debigmode

scarlet thorn
#

yea

hasty mist
#

i always like pings

scarlet thorn
brisk rose
brisk rose
#

canillia :P

willow plinth
#

this discord needs a meta channel

#

i'd ask questions every day

#

especially about gifs

scarlet thorn
scarlet thorn
willow plinth
brisk rose
#

i missed that one

scarlet thorn
#

I feel like its truly impossible to not "debug" vanilla code, but Im pretty sure we're just either misinterpreting it, or thunk described it too vaguely

hasty mist
#

i always thought it meant you werent allowed to fix vanilla bugs which makes no sense

raven forge
#

I thought it was generically about security

scarlet thorn
#

SMODs would be shut down no?

brisk rose
#

I mean... security wise out modding tools have full access to the user's account

#

lol

willow plinth
#

i mean i get the rule is about not actively sharing loads and loads of source code

raven forge
#

as in, the intent of the entire rule list. mostly about not encouraging piracy?

brisk rose
#

though i don't feel bad sending logs

vale glen
#

Axy sees it more like ... If someone wrote some code, then an army of people showed up to say the code could be done better if it was done in X or Y way. It'd be a bit draining.

brisk rose
#

dumps i mean

#

just not all of them at once

#

lol

#

because you can run that shit with love i'm p sure

scarlet thorn
willow plinth
scarlet thorn
#

not really 'debugging' though

scarlet thorn
vale glen
willow plinth
#

fair

scarlet thorn
willow plinth
#

basically i wanna know to what extent i can shit on thunk's code in here 🤡

brisk rose
#

even though it's functionallky the same

#

as what you can do with other tools

vale glen
#

A debugger to step through the code would be convenient, especially something that could list out each table in like, a variable inspector

#

Axy has been stuck trying to work with the shop for a couple days now, and the cardarea code keeps complaining. ><;

vale glen
#

Not at PC atm, so can't pull up the code

willow plinth
raven forge
#

go ahead and run game from source, that's ok I think

brisk rose
#

But its stupid

willow plinth
cunning barn
#

do any jokers or enhancements or anything out there do anything with last played hand? still trying to get my burninated enhancement up and running

brisk rose
scarlet thorn
willow plinth
#

i think technically it's already illegal (like by law, not discord channel rules) unzipping the game lol

#

but who cares

scarlet thorn
#

How?

cunning barn
vale glen
# scarlet thorn whats the problem

To give a description of the problem, the client wants a joker to turn all cards in the shop to either negative jokers or polychrome 2s, when a condition happens. Axy has the condition done, but when Axy tries to load a cardarea containing polychrome 2s with a random suit into the G.shop_joker cardarea, then add shop_ui using the associated function, the game complains about various values being missing either from Cardarea's config or the card's config. The create_card_for_shop function might help, since Axy was looking at it in the context of rerolls, but Axy hasn't fully understood it yet.

scarlet thorn
#

some else might be able to help, its 1 am and ive been looking at code for 12 hours

#

having a hard time reading that

vale glen
#

Nod nod

cunning barn
#

yeah for me its like midnight and i really just wanna get burninated enhancement finished. leveling up stuff in smods documentation is only documented for currently played hands

shut crater
#

according to the Source

red flower
#

i think last_played_hand gets updated with the current hand anyway?

cunning barn
#

but see the problem is that would be calling the "current" hand. you wouldn't be playing a hand if you were discarding

#

i dont even know where i'd slot G.GAME.last_hand_played into level_up_hand
apologies if this is all really obvious stuff im missing i am NOT usually a codewriting person

willow plinth
# scarlet thorn How?

obviously depends on where you live, look up Sega v. Accolade for example...it's a grey area at least, and i guess good enough lawyers could always argue for how the intended distribution of the game already doesn't allow for someone to even disassemble it, not even just to "look at it"

not that this will happen here, just wanted to mention it as a fun fact

shut crater
raven forge
#

also, could you say what you're trying to do?

scarlet thorn
cunning barn
#

here's the code as i have it now

calculate = function(self, card, context, effect)
        if context.discard then
            return {
                {level_up = true, level_up_hand = G.GAME.last_hand_played},
                remove = true
            }
        end
    end```
raven forge
#

oh right, context.discard might behave a bit weird

cunning barn
#

why did i inadvertently choose the most difficult thing to try and do here

hasty mist
#

uhh @cunning barn idk if itll work but

#

i think context.discard activates per card discarded

#

try pre_discard i think

cunning barn
#

context.pre_discard, you mean?

hasty mist
#

yeah

#

unless im misremembering what its callrd

cunning barn
#

im just going ahead with the code i posted with pre_discard instead of discard i will post any crash logs

shut crater
cunning barn
#

putting in pre_discard makes the card literally do nothing at all

#

like, it used to remove itself with discard but now it doesn't even do that

hasty mist
#

ah

#

prob revert back to context.discard then

cunning barn
#

it is going to be a celebration when i get this to work

#

context.discard destroys every discarded card and it still doesn't level anything up. not even a crash, just absolutely nothing

shut crater
brisk rose
#

but that's not the same as being a legal law violation

cunning barn
#

im genuinely not sure what i'm doing wrong here. i'd expect at LEAST a crash, SOMETHING on the end of the attempted level up but it literally doesn't change even a single value

hasty mist
#

i wish I could help, coding is hard

shut crater
# cunning barn here's the code as i have it now ```lua calculate = function(self, card, contex...
local text,disp_text = G.FUNCS.get_poker_hand_info(G.GAME.last_hand_played)
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
level_up_hand(context.blueprint_card or card, text, nil, 1)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
cunning barn
#

no offense meant but i can't make heads or tails of what this is even supposed to represent

#

i think i'm in too deep

shut crater
#

it should be the whole thing

cunning barn
#

whole thing for what?

shut crater
#

like if you put that in your context.discard check it should just upgrade the last played hand

cunning barn
#

were there meant to be commas in there?

hasty mist
#

goddamn that looks complicated

shut crater
#

no, that's not a return

cunning barn
#

also im getting a bunch of errors about keywords not being able to be used as names and missing symbols

shut crater
#

they're warnings, and it's because you haven't added the lovely/dump to your vscode workspace (which you should do)

cunning barn
#

what the heck is the lovely dump

#

also no they're not warnings they're full errors

raven forge
#

lovely/dump in your Mods folder contains the patched versions of all files

shut crater
#

mmm hand on

cunning barn
#

all of these are the proper red x errors, not the yellow ! ones

brisk rose
raven forge
#

I don't recommend trying to manually level up unless you want to suffer

cunning barn
#

all of this just to be told it's not recommended

#

i might just give up on the enhancement dream im genuinely getting a migarine

raven forge
#

no I mean, updating hand text manually

#

I'd do it as a last resort

cunning barn
#
    calculate = function(self, card, context, effect)
        if context.discard then
            return {
                local text,disp_text = G.FUNCS.get_poker_hand_info(G.GAME.last_hand_played)
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
level_up_hand(context.blueprint_card or self, text, nil, 1)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''}),
                remove = true
            }
        end
    end
}```


i just pasted this in the return directly as you said i should
raven forge
#

I do think if you just copy Burnt Joker mostly, it'll work. I just have an interest in making sure smods isn't broken

shut crater
#

just in the context check

cunning barn
#

also i have to figure out how to make it Not destroy every single discarded card

shut crater
#

which cards is it supposed to remove?

cunning barn
#

just the enhanced ones

shut crater
#

oh that should be not so bad

#

but just start with the level up effect rn

brisk rose
#

@willow plinth I wanna continue what i was saying. Software EULA's are not even nessaracarily considered legally binding contracts, but even if they are, contract law isn't criminal law. You can be sued for breach of contract if there's standing, but that involved actual damages of some sort. The worst you can get besides that is revcation of service

cunning barn
#

i might just not add any enhancements this is just genuinely not fun to troubleshoot

red flower
shut crater
#

funny enough I just got the exact same crash but for a different thing

cunning barn
#

what am i supposed to do about ipairs

#

i dont know how to write tables

hollow sphinx
#

i think im interupting here, but when i have enough oops all 6s to guarantee a duplication in the first if statement, the game crashes because I assume the cards being spawned also spawn copies of themselves in an infinite loop.

shut crater
brisk rose
cunning barn
#

because if i do im just quitting here

shut crater
#

well it wasn't crashing before was it

cunning barn
#

it was not crashing before

shut crater
#

ok so something you added recently is causing the crash

raven forge
cunning barn
raven forge
#

see I was suspicious. sorry

brisk rose
cunning barn
#

i'll just post the full code

brisk rose
#

that's what i got that for

raven forge
#

smods is probably just bugged, I can try to push literally right now

cunning barn
#
SMODS.Enhancement {
    key = 'burninated',
    atlas = 'enh',
    loc_txt = {
        name = 'Burninated',
        text = {
            'Levels up last played poker hand by 1,',
            'then self destructs'
        }
        
    },
    calculate = function(self, card, context, effect)
        if context.discard then
            local text,disp_text = G.FUNCS.get_poker_hand_info(G.GAME.last_hand_played)
            card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
            update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
            level_up_hand(context.blueprint_card or self, text, nil, 1)
            update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
            return {
                remove = true
            }
        end
    end
}```
red flower
raven forge
#

the issue is with the equality check accidentally returning true if nil == nil

#

probably

brisk rose
cunning barn
#

well none of that is mine, i just pasted in what chaseoqueso put in

shut crater
raven forge
#

you may want to give me about 5-10 minutes

#

to fix

shut crater
#

in the code I sent

cunning barn
#

context.blueprint_card or card?

shut crater
#

yep, in both places

brisk rose
#

which is exaclty what the error says

shut crater
brisk rose
#

it should be G.GAME.hande[handname].chips

#

I'm pretty sure

cunning barn
#

ok honestly im genuinely starting to weigh if adding this is worth it

brisk rose
#

i mgith be mistaken

#

idk

cunning barn
#

well im the opposite i am just totally checked out. it is almost 1AM, im thinking the effect isnt even that good to begin with, and trying to read through the crash logs is like hieroglyphics to me

brisk rose
brisk rose
#

if the table uses the name and not the key

red flower
brisk rose
#

whcih knowing thunk it does

willow plinth
#

@brisk rose can you share the copy pasta again?

cunning barn
#

yeah but i want to get this in because i have a TON of cards that rely on burninated edition
and like i already did the art

brisk rose
willow plinth
#

yes

shut crater
brisk rose
willow plinth
#

sorry i just needed it

#

frustrated cuz my work vpn isn't working

cunning barn
#

i would do hole-riddled but that's +1 mult every two retriggers alongside the retriggers and DEAR GOD i do not want to imagine how hard that would be to try and check for if it's this much of a headache just to level up a hand on discard

raven forge
cunning barn
#

a headache for me, to be clear. not insulting the mod

#

because i am not tech savvy at all

#

i give up im just gonna change the effect

#

thanks for the help everyone sorry it didnt go anywhere

raven forge
#

uh, the problem is smods, confirmed. your first code should have worked

#

I just need time to fix the issue

#

I think everyone has drowned me out. I literally am working on smods

cunning barn
#

...

willow plinth
cunning barn
#

i need to go lie down.

willow plinth
#

oh okay sorry

brisk rose
cunning barn
#

ugh im gonna try hole riddled
it's probably easy to get a retrigger going on a scored card but is there a way to do something every 2 retriggers specifically

raven forge
#

triggering stuff on retriggers is not a very supported thing

cunning barn
#

why is every single thing i want to try so hard

#

never mind im just not doing enhancements at all

#

honestly might not even do the mod anymore. coding seemed fun at first but it's clear i know nothing about the innards of this kind of thing and it deeply aggravates me to try and do it

willow plinth
cunning barn
#

is just "retrigger card 2 times" too weak of an enhancement

#

because i can just shorten it down to that

willow plinth
#

and for a goooood break i recommend playing a bunch of balatro

brisk rose
#

I see a lot of brakets being closes that never got opened

raven forge
cunning barn
#

yeah ive just given up on adding burninated entirely until ej pushes the update (hopefully soon)

raven forge
#

sorry. let's calm down

cunning barn
brisk rose
cunning barn
#

honestly yeah im just gonna dip out of modding probably. like. it was fun when the effects were super simple but i am VERY easily aggravated when something doesn't work quickly, and this process has made me want to throw something the whole way through, i am not cut out to code

#

not a knock against anyone here for trying to help, but this whole thing is just. really stressful for me

brisk rose
brisk rose
raven forge
#

maybe you can get a programmer to help

cunning barn
#

multiple people who know programming, including yourself, have been helping, and it has not changed my aggravation
i am just like a very easily-provoked person who's going into something that requires lots of patience and trial and error. which are not my favorite things

raven forge
#

makes sense

shut crater
# cunning barn yeah ive just given up on adding burninated entirely until ej pushes the update ...
SMODS.Enhancement{
    key = "burninated",
    atlas = "Jokers",

    loc_txt = {
        name = "Burninated",
        text = {
            'Levels up last played poker hand by 1,',
            'then self destructs'
        }
    },

    calculate = function(self, card, context)
        if G.GAME.last_hand_played and context.discard and SMODS.has_enhancement(card, "m_pow_burninated") then
            local text = G.GAME.last_hand_played
            card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
            update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
            level_up_hand(context.blueprint_card or card, text, nil, 1)
            update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
            return {
                remove = true
            }
        end
    end,
}
#

(change the key in SMODS.has_enhancement to your mod's key)

cunning barn
#

oh hey thanks much

shut crater
#

today I got to learn how discards and enhancements work

#

and help someone on the verge of giving up on modding, which would be very sad indeed

cunning barn
#

well the problem is still "if i discard more than one card, ALL of the cards get destroyed

#

but this level up solution works

#

i just need to try and get something working for the latter

shut crater
#

huh, I thought I checked for that

#

context.other_card, not card

#

works for me now

cunning barn
#

testing it on my end, identical code to yours, just doesn't do anything

shut crater
#

did you replace m_pow_burninated with m_yourmodprefix_burninated

cunning barn
#

i just replaced it with only "burninated" because thats the key name for mine

regal ether
#

did that work lol

shut crater
#

you have to put the prefixes

regal ether
#

the prefixes tend to be necessary iirc

shut crater
#

SMODS adds them automatically when it goes through all your files and load them

#

to try to prevent mods from having duplicate keys for things

cunning barn
#

ok so like i get the prefix but what does the m do

shut crater
#

m_ is for enhancements

#

e_ is editions, j_ is jokers, c_ is consumables, etc

cunning barn
#

ok, i did all that, and FINALLY, it properly works. thank you so much for your help i would never have been able to figure any of this out

shut crater
regal ether
#

YIPPEE

shut crater
#

I tend to lurk so I will be around if you need help with your other plans

regal ether
#

another taski pfp made happy, the world is in balance :P

cunning barn
#

now granted, i am suddenly not sure if this represents the burnination thing very well
but i can't back out now because we spent all this time getting it to work

shut crater
#

LOL it's called playtesting, sometimes it be like that

#

I like that it blends the Trogdor theme with the precedent of levelling up set by Burnt Joker

#

personally

cunning barn
#

oh no wait the burnt joker levelling that works thematically

#

and burning being like the only thing you do as trogdor besides stomp around it makes sense that the burnt effect would target hand

regal ether
#

do i sense strong bad balatro mod

#

or is this a component of a larger homestar mod

cunning barn
#

larger homestar mod yeah

#

it has a ton of stuff i posted my ideas doc in a thread

regal ether
#

oooo :D

exotic totem
#

(Sorry to interrupt)

What's the correct scoring context to use if I want to upgrade a joker based on the final hand score? Neither context.final_scoring_step and context.cardarea == G.play or context.after and context.cardarea == G.play seem to be triggering. I'm also not entirely clear where to access the hand score (is it on G.play?). This is what I have:

calculate = function(self, card, context)
        if context.final_scoring_step and context.cardarea == G.play then
            if G.play.chips > G.GAME.round_scores['hand'].amt then
                card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
            end
        end
        if context.joker_main then
            return {
                Xmult = card.ability.extra.Xmult
            }
        end
        
    end
regal ether
cunning barn
#

just did

#

gonna try and rework the hole-riddled effect (synergizes with gun-related jokers like nunchuck gun, gunhaver, later on i wanna have bubs with the shotgun from the sbemail virus)
it was initially
"Hole-Riddled Card
Retriggers twice. Gains +1 mult for every two retriggers."
but i have been told that doing stuff based on retrigger amount isnt well-supported in smods and i'm wondering what i could do to make the effect still feel like it's being shot repeatedly and getting a benefit from it

#

to be fair though two guaranteed retriggers is already pretty powerful

shut crater
#

retriggers 4 times and then is removed? lol

#

number of retriggers is flexible but I like the idea that it just goes absolutely wild and then dies

cunning barn
#

well my problem is i have jokers that synergize with having a bunch of hole-riddleds. and i don't want to have another card that destroys itself

shut crater
#

valid

#

so a card retriggering itself twice and then getting a benefit seems like it would not be hard to code because those both use the same condition

#

it's not like you're trying to count all of the retriggers that happen to it, right?

cunning barn
#

uhhhhhhhhhhhhh i. i kinda wanted it to get +1 mult from ANY two retriggers...

#

i'll just scale it down to 2 retriggers then gains +1 mult

shut crater
#

meh I could help you make it the way you want but starting this way is easier for now

cunning barn
#

itd prolly be super difficult to get it the way i wanted at first yeah

raven forge
#

hm. doing things on retrigger might be much more feasible than trying to count retriggers/"triggering off retriggers"

#

as you can just do something each time the card is calculated

cunning barn
#

i mean like. +1 mult per retrigger scales at double the rate at what i wanted im worried thatd be too much

#

eh. probably fine

shut crater
#

I mean you can definitely just increase a variable on the card every time the card is scored and once that variable reaches the desired value (2 in this case) set it back to 0 and trigger your effect

#

that method would include the initial scoring of the card, not just the retriggers

#

but I figured it would be best to start with a simplified version of the effect

cunning barn
#

yeah ive already had enough grief with burninated

shut crater
#

that was my intuition lol

cunning barn
#

so like. could i just copy code from something like seltzer to make sure it retriggers. i tried to check to see how echo crads from cryptid do it but annoyingly they have everything in the files BUT how they actually coded that specific effect

shut crater
cunning barn
#

...and now i have to sprite bullet holes

shut crater
#

yeah I have decided that art is objectively the worst part of modding

chrome widget
#

Does anyone know if it's possible to send a blind name/description in the info_queue?

cunning barn
#

i dont think this looks too bad actually

daring fern
cunning barn
#

at 2x for comparison

daring fern
shut crater
cunning barn
#

well then it'll be overlapped by the suit/rank icons and they'd just float over it

shut crater
#

fair

cunning barn
#

this'll prolly do

#

i feel like theres definitely a mod that uses +1 mult per time triggered for a card but idk which

shut crater
#

I'm at the point rn where I need to write a shader for an edition I created

#

and I Fear

manic rune
#

good luck

scarlet thorn
#

Shaders suck

shut crater
#

I have a nonzero amount of exposure to shaders

scarlet thorn
peak void
#

hey yall im getting uhhh this. is there a reasonable explanation? the effect works fine, it just breaks after scoring ends

manic rune
#

wuh

manic rune
shut crater
manic rune
#

since theres no hand to read from

peak void
#

yeah but im not reading it anymore

manic rune
#

show us the code

shut crater
#

but the game is

scarlet thorn
#

Clearly you are

peak void
#

alright

daring fern
scarlet thorn
#

Laugh at them

peak void
#

i think i might have to check for a different context

daring fern
scarlet thorn
#

Solingen

manic rune
scarlet thorn
#

Nolonger*

daring fern
manic rune
#

yeah, that

peak void
#

oh ok thanks

shut crater
#

or just nil check context.full_hand

#

probably safer

peak void
#

ill probably do both. i dont wanna run nil checks when unnecessary

cunning barn
#

i did return {repetitions = 2} on hole-riddled card but it didn't do anything. i'm assuming i have to have some extra code in there

thorn flame
#

how do i make it so consumables dont spawn outside their packs

shut crater
shut crater
#

this is what I'm referencing btw

#

oh you probably need context.repetition if you didn't do that part

cunning barn
#

i did not, in fact, do that part

peak void
cunning barn
#

is sit context.cardarea instead of context.main_scoring?

peak void
#

i dont think theres any instance of in-hand effects checking the size of the played hand in vanilla so it never comes up

shut crater
#

the cardarea check is to make the effect happen when played rather than when held in hand

pine sun
#

I want to learn Lua to make a mod. The mod? Play balatro with Only The WASD and surrounding keys. Would this be possible? Like, are the built in tools for selecting cards and buying them there?

#

(I'm somewhat disabled in my right hand, so I'd Like to be less dependent on my mouse)

cunning barn
#

alright so that makes sense
but my question is, im really tired so this is prolly a really obvious thing but is there a variable to display an "again" message that's custom? i want it to say "BANG" or "BLAM" or something instead

manic rune
#

its definitely possible, knowing Handy

pine sun
manic rune
#

i would suggest learning Lua first to understand how the language works (its really straightforward, dont worry)
then you can check out #1349064230825103441 :p

pine sun
manic rune
#

-# famous last words until one has to do shaders and uis

shut crater
pine sun
#

But the objective Is to learn Lua. I can do that rather easily without shaders or UI

cunning barn
#

ok retriggers and text work. now to figure out how to add the +1 mult after the retriggers.

shut crater
#

did someone mention something about being able to live update shaders?

brisk rose
daring fern
pine sun
#

This seems like it'll be a... Well not straightforward considering I'm not straight And programming never Is. But it'll definitely be doable

shut crater
#

in fact it's just pure white rn

brisk rose
pine sun
brisk rose
#

you have to find out where shit is by looking at the code yourself or word of mouth

#

the smods documentation is okay

#

but base game? not so much

#

but I haven't checked out the mod starter pack thread

#

i could be dead wrong

pine sun
#

wizard time i suppose

#

about to start roleplaying a mage's aprentice, pouring over arcane tomes and asking my peers for help :3

cunning barn
#

ok i think im almsot there but how do i make the +mult trigger AFTER the retriggers? no matter where i put it i'm getting syntax errors in visual

the piece of code i'm trying to use is
" card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain"
i've defined "mult_gain" as 1 idk what the problem is that it consistently gives seemingly completely random syntax errors

brisk rose
# pine sun oh gods

so besides standard apu specifc stuff that I already knew existed, that thread i linked does have a nice list of where certain crucial tables and functions live

#

as you might know about lua, tables are everything

pine sun
#

i know bvery liytle about lua, sasdly

brisk rose
cunning barn
#

ok im just gonna make the +mult trigger before the retriggers now

#

aaaaaaaaaaand crash, for the 11th time tonight

shut crater
#

mult is nil, apparently

cunning barn
#
SMODS.Enhancement{
    key = "holeriddled",
    atlas = "enh",
    pos = { x = 1, y = 0 },

    loc_txt = {
        name = "Hole-Riddled",
        text = {
            'Retriggers 2 times.',
            'Gains +1 mult for every 2 retriggers.'
        }
    },
    config = { extra = { mult_gain = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult } }
    end,
    calculate = function(self, card, context)
        if context.repetition and context.cardarea == G.play then
            card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
            return {
                message = 'Blam!',
                repetitions = 2,
                card = card,
                
            }
        end
    end,
}```
shut crater
#

mult is in fact nil

#

you didn't declare it in your extra

cunning barn
#

ok well then how do i do that

#

ok i got it actually

shut crater
#

config = { extra = { mult = 0, mult_gain = 1 } },

#

unless playing cards are special

pine sun
#

so, i imagine i'll need whichever data structure holds the hand, whichever tools let me select a card, and probably other styuff

cunning barn
#

ok i did literally exactly that.
...and now the mult doesn't trigger

shut crater
#

how do you get mult to show up on a playing card

cunning barn
#

im doing the exact same thing that they did for chips on hiker and that was just fine and peachy but as soon as mult is in the equation the game throws a tantrum

pine sun
#

let someoen use QWEASDR and maybe otehr keys to play the game

#

i was thinking i'd ideally just hijack controoller cointrols

brisk rose
cunning barn
pine sun
#

where

#

saves me the work

brisk rose
shut crater
# cunning barn like do playing cards not have mult defined?

they do, you have to do card.ability.perma_mult apparently.

context.other_card.ability.perma_mult = context.other_card.ability.perma_mult or 0
context.other_card.ability.perma_mult = context.other_card.ability.perma_mult + card.ability.extra.mult
#

but don't use context.other_card I think since this isn't a joker effect

#

actually hang on

daring fern
pine sun
brisk rose
brisk rose
#

or is it private/secret/just irrelevent?

shut crater
cunning barn
#

why does everything have to be so hard man

brisk rose
shut crater
#

you're implementing an effect that does two very different things to one card

#

gotta have two very different checks to apply them

pine sun
brisk rose
#

then deleted it

#

not handy

#

typist

#

are you telling me I imagined it?

pine sun
#

still seems to be two-hand oriented?>

brisk rose
pine sun
#

form what i saw, thats teh case, eyah

brisk rose
#

naughty naughty

#

you don't do that many when you're actually confused

#

if only i had access to the sever logs, lol

cunning barn
#

im gonna jst add the mult stuff tomorrow because the retriggers are fine and i have been staying up till 6 am and really want to stop

pine sun
#

okay, i gotta make the mod first, and then start ampping keybinds

daring fern
#

brisk rose
#

I'd help but i don't know anything about contexts yet

long sun
#

hi, my Balatro's suddenly not booting

#

i've updated SMODS, but that didn't help

#

it's stuck on the black screen before the progress bar

daring fern
long sun
#

it's stuck here

long sun
#

successfully validated

#

yeah no dice

#

i've added a lovely ignore to my mod, lemme try doing that to the others

#

nope

#

will try updating lovely

#

hhhhhhhhhhwhyyyyyyyyyyyy

#

nothing's working ;n;

#

including booting from the executable

daring fern
long sun
#

testing

brisk rose
#

saying that lovely isn't in the mods folder

chrome widget
#

I spent today on this and oughhghghg this is such a cool effect

daring fern
brisk rose
#

it does nothing

shut crater
#

am I doing it right

brisk rose
brisk rose
shut crater
#

I actually just created the missingno of shaders

daring fern
long sun
#

ah, yep

brisk rose
#

@long sun neated smods

#

make sure mods/steamodded is the contents not another folder called steamodded

#

and it's fine if it's smods or smods-main or anything

#

just has to not be nested

long sun
#

no that's the thing, it was like that, but just stopped working today

brisk rose
long sun
#

no i mean

#

it wasn't nested

brisk rose
#

ah i see

brisk rose
#

that's a normal log

daring fern
long sun
#

ya i pulled from main

brisk rose
#

it can freeze it

daring fern
long sun
#

oh you're right, there was an update :) trying again

manic rune
#

thats really cool, but i wonder if its even worth always suffering through a boss blind's effect just for x4 mult

#

unless its the needle

chrome widget
#

I wanted to argue it should be a little higher yeah

long sun
#

weird?? suddenly the game doesn't recognise i have SMODS

#

it boots almost instantly

chrome widget
#

Regular play would probably involve someone only getting two or three before selling Sweet Bod so as not to wrack up every debuff known to mankind

brisk rose
#

the folder comes like that

#

the zip

chrome widget
#

So the question is, really, what exponential benefit does that warrant

long sun
#

no pulling from the repo doesn't do that

manic rune
#

is this used to upgrade tusk or d4c, by the way? 🤔

brisk rose
chrome widget
#

No

brisk rose
#

nvm

manic rune
#

dang

long sun
#

:>

brisk rose
#

your av deleted lovely i bet

#

that can happen

#

check your balatro exe folder for version.dll

long sun
#

oh what you're right!!

#

where did it go!! :>

brisk rose
#

because lovely is technically a trojan injector

#

lol

chrome widget
manic rune
#

😭

chrome widget
#

Collect my debuffs

manic rune
#

jesus didnt die for this 🥀

#

imagine getting your corpse turned into the plant though

long sun
#

mm, i already have that as an exception

brisk rose
#

weird

long sun
#

mm weird ya

#

and by putting in the missing version file, it's crashing again -w-

chrome widget
#

Get a Corpse Part Needle if you thought the Golden Needle challenge wasn't annoying enough

long sun
#

will finish sorting this out after my exam in 10 mins

#

brb!

cunning barn
#

did one last joker before going to bed but it's not working. this is genuinely just the vanilla remade code for steel joker except steel is replaced with hole-riddled so maybe i forgot to put something somewhere but it doesn't gain or use any xmult at all when a hole-riddled card is added (although that was debug plus so maybe it just didn't get that use case)

#
SMODS.Joker {
    key = "crackstuntman",
    loc_txt = {
        name = 'Crack Stuntman',
        text = {
            "Gives {X:mult,C:white} X#1# {} Mult",
                    "for each {C:attention}Hole-Riddled Card",
                    "in your {C:attention}full deck",
                    "{C:inactive}(Currently {X:mult,C:white} X#2# {C:inactive} Mult)",
        }
    },
    rarity = 3,
    cost = 7,
    atlas = 'hsr',
    pos = { x = 4, y = 0 },
    config = { extra = { xmult = 0.3 } },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS.m_holeriddled

        local holeriddled_tally = 0
        if G.playing_cards then
            for _, playing_card in ipairs(G.playing_cards) do
                if SMODS.has_enhancement(playing_card, 'm_holeriddled') then holeriddled_tally = holeriddled_tally + 1 end
            end
        end
        return { vars = { card.ability.extra.xmult, 1 + card.ability.extra.xmult * holeriddled_tally } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            local holeriddled_tally = 0
            for _, playing_card in ipairs(G.playing_cards) do
                if SMODS.has_enhancement(playing_card, 'm_holeriddled') then holeriddled_tally = holeriddled_tally + 1 end
            end
            return {
                Xmult = 1 + card.ability.extra.xmult * holeriddled_tally,
            }
        end
    end,
    in_pool = function(self, args) --equivalent to `enhancement_gate = 'm_steel'`
        for _, playing_card in ipairs(G.playing_cards or {}) do
            if SMODS.has_enhancement(playing_card, 'm_holeriddled') then
                return true
            end
        end
        return false
    end
}```
cunning barn
#

right the prefix

chrome widget
#

I do also realize that, since that bug with the Manacle was never patched, you could copy the Manacle and do the multi-Chicot thing every single blind

manic rune
#

oh wait

#

do they just give free X4 mult when you got chicot?

chrome widget
#

Since they do still accept being disabled like normal blinds (for the duration of a round)

#

Yep, basically

manic rune
#

dang

#

chicot synergy

chrome widget
#

Who woulda thunk?

manic rune
#

definitely not me

#

first time seeing chicot synergy, somehow

cunning barn
#
SMODS.Joker {
    key = 'kot',
    loc_txt = {
        name = 'King of Town',
        text = {
            "+1 hand size for every King scored",
            "Gains X#2# mult per hand size above #3#",
            "{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"

        }
    },
    config = { extra = { xmult_per = 0.1, thresh = 8, } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh } }
    end,
    rarity = 4,
    atlas = 'hsr',
    pos = { x = 6, y = 0 },
    soul_pos = { x = 7, y = 0 },
    cost = 20,
    calculate = function(self, card, context)
            if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit < card.ability.extra.thresh then
              return {
                message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh - G.hand.config.card_limit)}},
                mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit)
              }
            end
        if context.joker_main then
            return {
                Xmult = card.ability.extra.Xmult
            }
    end
end,
}```


trying to get the description on this thing to work before i go to bed but i just get nil on the current mult
shut crater
#

your loc_vars function only returns 3 values, but your loc_txt is looking for a #4#

cunning barn
#

well yeah because i had to loop it over to 2 and 3 because 1 is just 0 for some reason?
idk h ow to define the variable that makes the addition work im trying to figure out how it works on steel joker but it's not clicking for me

shut crater
#

your config.extra only has xmult_per and thresh in it right now, but in your ability and loc_vars you reference things like card.ability.extra.Xmult and card.ability.h_size, which don't have values

daring fern
#

cunning barn
#

i mean i thought that hand size had a value already, does smods not have a current hand size variable

shut crater
#

there is a way to get hand size but it's not in the card's ability, it's somewhere in G

#

idk off the top of my head

#

the mult issue is because you didn't define it though

willow plinth
cunning barn
shut crater
#

I'm not even talking about the math rn, I'm just talking about getting your description correct

brisk rose
shut crater
#

and for your description (and eventually ability) to work, you need to define Xmult in your config and return it in your loc_vars

cunning barn
#

ok but i can't do anything with the xmult right now since it requires math with the variables i already have

brisk rose
brisk rose
#

Or 1

#

Probably 1

#

It's just a starting value

#

That's what defining is

#

Unless I'm misunderstanding something

cunning barn
#

xmult lowercase? idk im gonna go to bed in like 15 minutes i wanna just get this done

#

i havent even gotten to the part where every scored king increases hand size by 1 and that is firmly in the realm of tomorrow

brisk rose
#

afaik

cunning barn
#

nope, defined Xmult, still nil

brisk rose
cunning barn
#
SMODS.Joker {
    key = 'kot',
    loc_txt = {
        name = 'King of Town',
        text = {
            "+1 hand size for every King scored",
            "Gains X#2# mult per hand size above #3#",
            "{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"

        }
    },
    config = { extra = { xmult_per = 0.1, thresh = 8, Xmult = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh } }
    end,
    rarity = 4,
    atlas = 'hsr',
    pos = { x = 6, y = 0 },
    soul_pos = { x = 7, y = 0 },
    cost = 20,
    calculate = function(self, card, context)
            if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit < card.ability.extra.thresh then
              return {
                message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh - G.hand.config.card_limit)}},
                mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit)
              }
            end
        if context.joker_main then
            return {
                Xmult = card.ability.extra.Xmult
            }
    end
end,
}```
shut crater
#
loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh, card.ability.extra.Xmult } }
end,
brisk rose
cunning barn
#

ok the description works now i need to make the effect work

#

i just realized i left in "G.hand.config.card_limit < card.ability.extra.thresh" which makes it so that the card limit needs to be SMALLER than the threshold

brisk rose
#

On what you have?

cunning barn
#

i did not

#

i dont even know what that type variable key a_xmult garble is

brisk rose
cunning barn
#

but i have end after each return???

#

every single time i think i know something about the coding i'm mincorrect

brisk rose
cunning barn
#

no offense but like. all this coding jargon is just turning into mush and oozing out of my ears i am retaining like none of this

brisk rose
#

And it has to come all at one time. It returns and it's done

cunning barn
#

ok so then what am i supposed to do

#

btw i got the hand size-mult converstion from hollow from morefluff where all the returns were intact. that works. i am genuinely unsure why mine would not

#

you know what it's 4AM forget it. i shouldn't have been coding so late it just makes me mad

#

i'll come back to this tomorrow

#

if someone can figure out how to format this properly, dm me and i'll credit you in the mod
in general if you helped with the coding lmk i will put you in the credits as well

brisk rose
# cunning barn ok so then what am i supposed to do
SMODS.Joker {
    key = 'kot',
    loc_txt = {
        name = 'King of Town',
        text = {
            "+1 hand size for every King scored",
            "Gains X#2# mult per hand size above #3#",
            "{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"

        }
    },
    config = { extra = { xmult_per = 0.1, thresh = 8, Xmult = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh } }
    end,
    rarity = 4,
    atlas = 'hsr',
    pos = { x = 6, y = 0 },
    soul_pos = { x = 7, y = 0 },
    cost = 20,
    calculate = function(self, card, context)
             if context.joker_main then
               Xmult = card.ability.extra.Xmult
           
            if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit < card.ability.extra.thresh then
              return {
                message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh - G.hand.config.card_limit)}},
                mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit),
              Xmult = card.ability.extra.Xmult
            }
    end
end,
}```
brisk rose
#

Also you have to fix that one error again

#

I copied from the version you posted and edited

cunning barn
#

still xnil

#

i have no clue what this thing wants from me

#

yeah i give up this thing is just genuinely cursed

daring fern
long sun
#

back!

cunning barn
#

well for some reason #1# is just randomly defined as 0

#

like if i put in #1# it just shows up as 0 and everything else is offset by 1

#

i think i just have some kind of evil spirit possessing this joker specifically. what is going on with it i have NO clue

long sun
#

right, so booting still isn't working

daring fern
long sun
#

this is when i added the missing version file

#

it's doing that with both only those two, and also all my mods

daring fern
long sun
#

not immediately, no

#

okay so, observation

#

removing the version file allows the game to boot

cunning barn
#

i still cannot find the value that makes the xmult accurate and now with +1 hand size it gives x1.7 mult????

#

i think i might just have to tear this one down and write it from scratch

long sun
#

mm, lemme try removing the lovely folder

daring fern
long sun
#

ah

cunning barn
#

alright so just ping me if you find a way to patch this joker it is just Not working. like every part of it is malfunctioning in some unique way

#
SMODS.Joker {
    key = 'kot',
    loc_txt = {
        name = 'King of Town',
        text = {
            "+1 hand size for every King scored",
            "Gains X#2# mult per hand size above #3#",
            "{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"

        }
    },
    config = { extra = { xmult_per = 0.1, thresh = 8, Xmult = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh, card.ability.extra.Xmult } }
    end,
    rarity = 4,
    atlas = 'hsr',
    pos = { x = 6, y = 0 },
    soul_pos = { x = 7, y = 0 },
    cost = 20,
    calculate = function(self, card, context)
             if context.joker_main then
               Xmult = card.ability.extra.Xmult
           
            if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit > card.ability.extra.thresh then
              return {
                message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit)}},
                mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit),
              Xmult = card.ability.extra.Xmult
            }
        end
    end
end
}```
long sun
#

card.ability.h_size is undefined

cunning barn
#

i know but i can't define it. i can't define a variable with anotehr variable

long sun
#

yes you can :)

#

you can define it in config

daring fern
long sun
#

ayup

cunning barn
#

but that's just a flat 1

long sun
#

what did you want to do with this line?
Xmult = card.ability.extra.Xmult

cunning barn
#

i don't even know at this point this joker might just be on the chopping block

long sun
#

right

cunning barn
#

even after changing all this stuff, the joker STILL gives x1.7 mult with +1 handsize

#

yeah honestly idk if i even wanna make this anymore. maybe its just the medication mixed with sleep deprivation talking but i have just steadily gotten less and less enjoyment from creating all this stuff. maybe there's a reason i'm just the concepts person

manic rune
#

is it possible to have a cardarea that allows you to drag cards anywhere?

#

🤔

onyx sonnet
cunning barn
#

no im not even gonna bother ive been explaining joker concepts and debugging and sending down code all night

#

i feel like im working at a 9 to 5 at this rate

long sun
#

and on the contrary, my Balatro not working is giving me increasing joy :))) like how does it still not boot!

cunning barn
long sun
#

but, currently, it's giving X0.1 per 1 hand size, + 8

#

which, with 1 extra hand size, would be 9 + 8 = 17, 17 * 0.1 = X1.7 Mult

cunning barn
#

oh well that makes sense actually

long sun
#

jdfgndfngdfngjdfngdfn okay what is happening to my balatro

daring fern
long sun
#

you mean and 1

cunning barn
#

i genuinely cannot understand a single part of what you just typed i think im at the point where i NEED to go to bed

long sun
#

surely and 0 would cause X0 Mult :)

daring fern
long sun
#

yes?

onyx sonnet
#

Yes

crisp coral
long sun
#

aware

#

the +1 applies to the expression after the or, though

#

order of operations states that

maiden phoenix
cunning barn
#

yeah im going to bed way too late but im gonna come back to this in the morning
or maybe not. coding stresses me out especially when it Just Does Not Work Ever

long sun
#

wait i'm. duh

crisp coral
#

nah i had to go to wolfram alpha after asking deepseek for an answer

long sun
#

nvm i missed a bracket =w=

crisp coral
#

it's a complicated equation

maiden phoenix
#

Understandable

crisp coral
#

also pikat pfp

maiden phoenix
long sun
#

right so

onyx sonnet
long sun
#

i have the version file in the correct folder

#

i have the latest Steamodded version

#

and yet, my game refuses to boot 😭

daring fern
long sun
#

i think so too, it works fine on my computer at home

#

i know it's not an issue with SMODS, as i checked out an older version

#

the weird thing is, it's worked before

brisk rose
long sun
#

Windows 11

brisk rose
long sun
#

the game's opening, but it doesn't get to the loading bar

brisk rose
long sun
#

nope

#

it hangs on a black screen

brisk rose
#

So... that sounds like you already have it open

#

Or are clicking on the lovely window

long sun
#

i don't, and i'm not

#

it works by deleting version.lua

daring fern
brisk rose
#

Lus?

long sun
#
INFO - [♥] Lovely 0.7.1
INFO - [♥] Game directory is at "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Balatro"
INFO - [♥] Writing logs to "C:\\Users\\ghost\\AppData\\Roaming\\Balatro\\Mods\\lovely\\log"
INFO - [♥] Using mod directory at "C:\\Users\\ghost\\AppData\\Roaming\\Balatro\\Mods"
INFO - [♥] Found .lovelyignore in 'Phanta', skipping it.
INFO - [♥] Cleaning up dumps directory at "C:\\Users\\ghost\\AppData\\Roaming\\Balatro\\Mods\\lovely\\dump"
INFO - [♥] Initialization complete in 24ms
INFO - [♥] Applied 14 patches to 'main.lua'
INFO - [♥] Applied 5 patches to 'engine/controller.lua'
INFO - [♥] Applied 15 patches to 'back.lua'
INFO - [♥] Applied 7 patches to 'tag.lua'
INFO - [♥] Applied 2 patches to 'engine/moveable.lua'
INFO - [♥] Applied 2 patches to 'engine/sprite.lua'
INFO - [♥] Applied 2 patches to 'engine/animatedsprite.lua'
INFO - [♥] Applied 51 patches to 'functions/misc_functions.lua'
INFO - [♥] Applied 33 patches to 'game.lua'
INFO - [♥] Applied 1 patch to 'globals.lua'
INFO - [♥] Applied 3 patches to 'engine/ui.lua'
INFO - [♥] Applied 77 patches to 'functions/UI_definitions.lua'
INFO - [♥] Applied 47 patches to 'functions/state_events.lua'
INFO - [♥] Applied 105 patches to 'functions/common_events.lua'
INFO - [♥] Applied 48 patches to 'functions/button_callbacks.lua'
WARN - [♥] Pattern '*then G.E_MANAGER:add_event(Event({ func = function() G.GAME.blind:set_blind(nil, true, nil); return true end })) end' on target 'card.lua' for pattern patch from Steamodded\lovely\calculate_card_added.toml resulted in 2 matches, wanted 1
WARN - [♥] Ignoring excess matches
INFO - [♥] Applied 162 patches to 'card.lua'
INFO - [♥] Applied 9 patches to 'cardarea.lua'
INFO - [♥] Applied 36 patches to 'blind.lua'
INFO - [♥] Applied 2 patches to 'engine/text.lua'
#

i was unable to move Phanta, as it says it's in use by something, weirdly

#

everything else was fine

brisk rose
long sun
#

ya

brisk rose
#

I'm confused

long sun
#

disabling real-time protection doesn't fix the issue

brisk rose
#

So it just deletes vetsion.dll on every boot?

long sun
#

no, it's there

#

if i delete it, it boots into vanilla

brisk rose
#

Oh Utah fair. I just thought like.
. It was deleting it as it ran

#

So it'd halt until you reboot

#

The game I mean

long sun
#

mhm

#

it gets stuck somewhere

brisk rose
#

Yeah not utah

brisk rose
long sun
#

yup

#

i'm still really confused that i can't move Phanta

#

i don't have any programs open other than Discord, Firefox and File Explorer

daring fern
long sun
#

what's that?

brisk rose
long sun
#

nope

#

i restarted File Explorer, no dice

daring fern
long sun
#

okay, installing it

brisk rose
long sun
#

nope

brisk rose
# long sun nope

I swear us competent computer folk get the strangest issues, lol

long sun
#

jsnfjkndsjfndsjk 😭

brisk rose
#

Like might be the best bet at this point

long sun
#

honestly, fair =w= two secondssss

midnight coyote
#

what’s the function for when ante increases

#

i need to hook into it

daring fern
midnight coyote
#

well no

#

i mean like

#

when the boss blind is defeated

#

sorry should’ve been more clear sorry

daring fern
long sun
#

oh!!! it worked!

midnight coyote
#

oh well alright

long sun
#

turn it off and on again :D

midnight coyote
daring fern
# midnight coyote

That would mean it would go down by -10 when heiroglyph or similar things are used?

midnight coyote
#

thats perfectly intended

long sun
#

thiiiiiiiis is what i wanted to test >:3

#

ignore the ERROR, i still have no idea why that's happening -w-

#

ooh the negatives look fun!!

daring fern
#

Because that would have compatibility issues with other mods because of booster packs and other things that use the set, I think.

daring fern
brisk rose
#
stack traceback:
    [C]: in function 'init'
    [love "boot.lua"]:48: in function <[love "boot.lua"]:42>
    [C]: in function 'xpcall'
    [love "boot.lua"]:357: in function <[love "boot.lua"]:355>
    [C]: in function 'xpcall'```
#

hmm

midnight coyote
#

function ASPL.FUNC.ease_risk(mod, instant)
    local Risk = G.GAME.Risk or 0
    local risk_UI = G.HUD:get_UIE_by_ID("astropulvis_risk_UI_shit")

    local function _mod(mod)
        -- Use the LOCAL Risk variable for calculations
        if (Risk + (mod / 100)) > 1 then  -- Changed to use local Risk
            Risk = 1
            Percentage_Risk = 100
            Risk_manip_table.disp_risk = Percentage_Risk .. "%"
            Risk_manip_table.risk = Risk  -- Use local Risk here
            risk_UI.config.object:update()
            G.HUD:recalculate()
            attention_text({
                text = "Max Risk!!",
                scale = 0.6,
                hold = 0.7,
                cover = risk_UI.parent,
                cover_colour = G.C.RED,
                align = "cm",
            })
            play_sound("chips2")
            G.GAME.Risk = Risk  -- Update global Risk AFTER local calculations
            return
        end

        if (Risk + (mod / 100)) < 0 then  -- Changed to use local Risk
            Risk = 0
            Percentage_Risk = 0
            Risk_manip_table.disp_risk = Percentage_Risk .. "%"
            Risk_manip_table.risk = Risk  -- Use local Risk here
            risk_UI.config.object:update()
            G.HUD:recalculate()
            attention_text({
                text = "Min Risk",
                scale = 0.6,
                hold = 0.7,
                cover = risk_UI.parent,
                cover_colour = G.C.GREEN,
                align = "cm",
            })
            play_sound("chips2")
            G.GAME.Risk = Risk  -- Update global Risk AFTER local calculations
            return
        end

        -- Normal case (no min/max reached)
        mod = mod or 0
        local text = "+"
        local col = G.C.RED
        if mod < 0 then
            text = "-"
            col = G.C.GREEN
        end
        Risk = Risk + (mod / 100)  -- Update local Risk
        Percentage_Risk = Risk * 100
        Risk_manip_table.disp_risk = Percentage_Risk .. "%"
        Risk_manip_table.risk = Risk
        risk_UI.config.object:update()
        G.HUD:recalculate()
        attention_text({
            text = text .. tostring(math.abs(mod)) .. "%",
            scale = 0.6,
            hold = 0.7,
            cover = risk_UI.parent,
            cover_colour = col,
            align = "cm",
        })
        G.GAME.Risk = Risk  -- Update global Risk AFTER local calculations
        play_sound("chips2")
    end

    if instant then
        _mod(mod)
    else
        G.E_MANAGER:add_event(Event({
            trigger = "immediate",
            func = function()
                _mod(mod)
                return true
            end
        }))
    end
end

can someone help me out as to why this sets risk to 100% when the function is first run?

#

let me get a vid

#

ive been debugging this

#

but it just isnt playing nice

long sun
#

ya i did that

#

i have this in my localisation file

daring fern
#

Also the seal should be phanta_ghostseal_seal

long sun
#

ah :D

#

phanta_stat_zodiacs also doesn't work, where should i put that?

#

also that worked ^^

midnight coyote
#

nvm it just started working

#

smh

daring fern
long sun
#

it's for the button in the collection

#

eg. Planets for the planet card listing

daring fern
long sun
#

mhmhm

#

Planet Cards*

daring fern
long sun
#

ah grand :D

#

thanks!

#

bingo! i may wanna change the colour =w=

#

thankuthanku!

#

sorry for asking for so much help ^^" this is very different from making Jokers and Tarots :)

zealous glen
long sun
#

and animated atlases :)

warm girder
#

Is there a way to alter the strength of vanilla planet cards? e.g making it add +5 levels instead of one?

daring fern
manic rune
#

🤔

#

is there any mod that creates a different SMODS.Object?

#

-# i mean, of course there is but idk which

daring fern
manic rune
#

yeah

daring fern
manic rune
#

oh yeah, shouldve thought of cardsleeves first

#

thanks :p

warm girder
daring fern
cursive sentinel
#

hii quick question, how do you set up the git pages displaying the jokers and all?

#

i've seen mods doing it and it's elegant, although i haven't found yet ressources on how it is done

daring fern
warm girder
daring fern
agile dew
#

how do i make a card or overlay pulse like the vanilla soul or trading card?

manic rune
#

:juice_until

midnight coyote
#

how can i track when an enhancement i made's effect goes off?

manic rune
#

SMODS.calculate_context({ your_own_context_here = true })

then in other objects' calculate, just do

if context.your_own_context_here then

and it should work, if thats what you meant

midnight coyote
#

oh alright, so in the effect of my actual card i can make SMODS.calculate_context({unstable_proc = true})

then in the card i need it for i can go if context.unstable_proc then

manic rune
#

yeah

midnight coyote
#

okay awesome,didnt know that

manic rune
#

very convenient :3

midnight coyote
#

seems really powerful

manic rune
#

powerful...

#

like, the mod

midnight coyote
#

cause i have this

#

and im getting around to coding its functionality

manic rune
#

oh, should be easy then

midnight coyote
#

yeah

manic rune
#

-# why is the "Chips" colored

midnight coyote
manic rune
#

yeah

midnight coyote
#

ah

#

easy fix then

#

got it working 👍 thanks @manic rune

manic rune
#

np :p

midnight coyote
#

ive got 15 jokers so far

#

im targetting 50

#

feels nice to have a full page of jokers that ive coded all on my own

desert ore
#

should I ask for help here or fan art channel if I were to ask about my card art?

desert ore
#

okok, I'm just wondering if anybody's got any specific advice with how to get basic shapes down on more complex objects, because the first original art I made was a calculator with very basic shapes, and I think I got it looking good. But a lot of my ideas (jimbos in unique stances, animals, etc.) have a lot more complex shapes and I don't even really know how to even get to a starting point. I'm using a reference in aesprite that I'm even tracing over a bit, I just don't know how to get the basic profile down pat

#

all of this is with the context of it fitting in with vanilla jokers

quartz ravine
#

My first piece of advice is this. Make sure you target the right size! Everyone does their art in a 75 x 96 (I think off the top of my head) size, which is the default 1x size. Then use the resize.py script to double it without adding noise.

I did all of my art first at 2x size!

#

You can resize up but not down without it looking ugly @desert ore

Second peice of advice is use the balatro palette.

quartz ravine
desert ore
#

How to block out the silhouettes ig?

quartz ravine
#

Oh wow I did something dumb!

You cannot add another joker to the info_queue for a joker. I tried and the game resources spiked and crashed with a stack Overflow

G.P_CENTERS.j_Fox_akuma.loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = { key = "artistcredit", set = "Other", vars = { "Akravator" } }
     info_queue[#info_queue + 1] = G.P_CENTERS.j_Fox_shinAKuma
        
        local hand_name = "Fox_shungokusatsu"
        local retrigger = G.GAME.hands[hand_name].level or 1
        return { vars = { retrigger } } -- Fix for missing values
    end
quartz ravine
#

Oh I had a circular reference. This Joker (shinAKuma) also had an info reference to another joker.

I actually don't love how this looks either

maiden phoenix
quartz ravine
daring fern
quartz ravine
#

Ohhh, good idea, thanks 🙂

red flower
#

you can also check for card.fake_card

quartz ravine
#

I love how well these two Jokers go together

The left one is where the name for the Mod came from!

daring fern
willow plinth
#

any common antipatterns or potential performance issues in here? i want to PR this to Grim but not sure yet

local old_set_alerts = set_alerts

set_alerts = function()
    if G.HUD and G.GAME then
        if not G.GAME.learnable_skills then
            G.GAME.learnable_skills = {}
        end

        local flat_game_skills = SMODS.merge_lists(get_skills(true));

        local flat_game_skills_length = #flat_game_skills

        if G.GAME.skill_xp ~= last_skill_xp or flat_game_skills_length ~= last_flat_game_skills_length then
            last_skill_xp = G.GAME.skill_xp
            last_flat_game_skills_length = flat_game_skills_length

            local skill_lookup = {}

            for _, name in ipairs(flat_game_skills) do
                skill_lookup[name] = true
            end

            local learnable_skills = {}

            for key, skill in pairs(G.P_SKILLS) do
                if skill_lookup[key] and can_learn(skill) then
                    learnable_skills[#learnable_skills + 1] = skill
                end
            end

            if #learnable_skills > 0 and #learnable_skills ~= #G.GAME.learnable_skills then
                G.GAME.skill_alert = UIBox{definition = create_UIBox_card_alert({text = tostring(#learnable_skills)}), config = {align="tri", offset = {x = 0.05, y = -0.05}, major = G.HUD:get_UIE_by_ID('skill_tree_button')}}
                G.GAME.skill_alert.states.collide.can = false
            elseif #learnable_skills == 0 and G.GAME.skill_alert then
                G.GAME.skill_alert:remove()
                G.GAME.skill_alert = nil
            end
        end

        
    end

    old_set_alerts()
end
quartz ravine
desert ore
quartz ravine
#

My wife did it for me!

long sun
#

is there a simple method of marking a consumable as being takeable, from packs?

#

similar to Cryptid's Code Cards?

#

i have the relevant code open, but it's a lot

#

and i already have a SELECT button, instead of USE

quartz ravine
#

If it's within a Booster, you can add draw_hand if you want the cards to go into your hand (like standard playing cards)

If you add select_card = consumables then the card chosen gets sent here

#

that would be defining it for all of the cards within a pack

long sun
#

ooh there is, perfect! :D

#

will give that a go, thank you!!

quartz ravine
long sun
#

so, add this to all the relevant Booster packs, then?

#

ah great, thanks ^^

#

hmm, just thinking

#

there's a mod that has movie tickets in it, and one spawns boosters containing all kinds of cards

#

like, Jokers, Planets, Spectrals, etc.

#

would i have to patch that, so they can be pulled from those?

fast prawn
#

Im getting this error message while trying to install cryptid. Any ideas on a fix?

cunning barn
next elk
#

OMG IT WORKS!

next elk
glad osprey
next elk
glad osprey
#

is that a retexture of jimbo or your own joker

glad osprey
#

that is just jimbo maybe give it a slightly different amount unless it being 4 mult specifically is very important to the reference

#

if you deem so

#

that sounded more like a command then a suggestion

golden lake
#

<@&1133519078540185692>

#

thank you for your service

grand violet
long sun
#

humm, getting this message when opening one of my new booster packs

#

the line being referenced has something to do with pools

manic rune
#

...how is this a gradient

glad osprey
golden lake
glad osprey
#

the gradient code is handled elsewhere

manic rune
#

dang.

glad osprey
#

for custom gradient do SMODS.Gradient

manic rune
#

i cant read this to make it a SMODS.Gradient