#💻・modding-dev
1 messages · Page 502 of 1
yeah I can't find the code
it DID work without it, true... it just. never stopped.
cardarea.lua line 280
why does my game crash when i play a hand with this joker (compare number with table. typical talisman stuff)
calculate = function(self, card, context)
if context.joker_main then
local _hand, _tally = nil, to_big(0) -- ty vanillaremade for giving me all this code
for _, handname in ipairs(G.handlist) do
if SMODS.is_poker_hand_visible(handname) and to_big(G.GAME.hands[handname].played) >= to_big(_tally) then
_hand = handname
_tally = to_big(G.GAME.hands[handname].played)
end
end
return {
chips = to_big(G.GAME.hands[_hand].chips) / to_big(2),
mult = to_big(G.GAME.hands[_hand].mult) / to_big(2)
}
end
end
do you reset c_rounds at some point
anyone?
yes of course
then your code is cursed
it should be next(SMODS.find_card('tngt_tenna'))
whats next
fine. cardarea.lua:282
oh
turns an empty table into false basically
is the crash pointing to a line here or elsewhere
if it's elsewhere then it might be the returns
oh ok
theres no lines from my mod in the crash report
it does more but thats all you need to know
so how do I separate my fillers from my jokers then?
try removing the to_big from the returns
make a new cardarea?
if you want them to be in the same area but use different counters that sounds very complicated
this works but also doesnt, it doesnt play the music when you dont have the joker but it also doesnt play the music when you do have the joker
still crashes
does G.GAME.blind.in_blind actually exist
yes
yes
it's... supposed to return a number
Tbh, yeah I didn't want to have a new card area because there isn't really any AREA to put a joker-sized area
not true or false
thats what the and 10 is
it doesn't work then
because that just makes 10 into a boolean
do
if (your conditions) then
return 10
end
yeah i wish we had more screen space
Yeah the 10 in the condition always returns true because it isn't nil I belueve
Unless I'm reading it wrong
Oh I see yeah
hold on sorry how did you come to the conclusion this would work
No technically that should work? It'll return 10 if it's true
Otherwise it'll return false, though ideally it should return nil otherwise
that looks fine to me
if you print that itll be a boolean for sure
also or false isn't... doing anything i think
still isnt working
or false ensures it's a boolean
and not nil
although it should probably be nil like winter said
Ugh this is ridiculous. I'm just stuck at this point
thats an smods example
I have been struggling to destroy my jokers with another joker, anyone know why this is loop is not working? (context is final_scoring_step)
local j = G.jokers.cards[i]
local first = true
if not j == center and not SMODS.is_eternal(j, center) then
j.getting_sliced = true
G.E_MANAGER:add_event(Event({
func = function()
j:start_dissolve({G.C.RED},nil,1.6)
if first then
center:juice_up(0.8, 0.8)
first = false
end
return true
end
}))
end
end```
yeah the and 10 is correct
again: you're SURE G.GAME.blind.in_blind is real?
mr and 10 a
yes
cause i cant see any other issues
worked when it was alone
only broke when i aded the find card
If I continue as its own card type, then I have no space to add more and have more problems. If I switch it over to a joker, i lose so much progress I had already done.
the heck do i do then
the card key should start with j_
if it's a joker
forgot to say this worked thanks n
guys i think it's tv time
Hi smt I haven't seen you much today
how does wee joker be small
hoe be big like carrot big carrot small left big
carrot
Could someone help me? How do you do something like "when the run starts" in balatro?
hook Game:start_run
gotta say that link really DOES NOT HELP
it overcomplicates alot of things
here look at this hook
local old_calc = SMODS.calculate_context
SMODS.calculate_context = function(context, return_table)
if context.setting_blind then -- Prevent use of Skateboard while in a shop
G.skate_shop = false
end
local ret = old_calc(context, return_table)
if ret then
return ret
end
end```
its simple but shows you
what a basic hook is
anyone? wee joker how?
I put this and the screen went black when I selected a deck
then you didn't hook it, you replaced it probably
vanillaremade
oh somethingcom "❓ on every" is here
I'm very new to this
if they ever decide to react instead of actually giving a helpful answer feel free to call me back here
im gonna add a section on hooks on the vremade wiki soon
please do the klei link is the msot unhelpful shit ive ever read
they like that sometimes
all superheros have their weaknesses headass
i think it's pretty clear but i guess we have to dumb it down more
superhero my ass
Does drawing_cards really only allow to set the amounts of cards drawn rather than add
i'd say more but i'd probably be banned
i didnt understand shit when i read, but when i was actually shown examples and simpler explanations i actually understood
yes
i think the main reason is its not in the context of balatro so
(didnt know how to do that)
yeah it's a little overcomplicated for no real reason
agreed
like you really only need the first bit
but NOBODY tells you that
is 600 lines too many for 1 consumable 🤔
yes
not enough
what the hell are you doing with that consumable
how many of those lines are empty, or just have one bracket
before i refactored it i had like 1200+ lines of code for one consumable
76 percent
thats my prediction
what does refactor mean im stupid
like clean up
rewrite
so clean up
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "local flags = SMODS.calculate_context({drawing_cards = true, amount = hand_space})"
position = "before"
match_indent = true
payload = '''
local paperback_ret = {}
SMODS.calculate_context({
paperback = {
drawing_cards = true,
amount = hand_space
}
}, paperback_ret)
for _, v in ipairs(paperback_ret) do
if v and type(v) == 'table' then
for _, vv in pairs(v) do
hand_space = math.min(#G.deck.cards, hand_space + (vv.draw_extra or 0))
end
end
end
'''
did this patch for it, it works, but is it a bad idea
fancy way of saying clean up
i rewrote parts of the code to suck less
i think it's good
how would i check if you're in a run?
what should i hook into to get a UI node under cards with certain seals
aure?
thank you
i want to create a box under playing cards that have my custom seal that displays info at a glance, just wondering the best place to draw the box
as in which functions to draw it in
What does this mean
did i just see somethingcom... not ❓ when they need clarification? unreal
send the whole crash report
likely means you used the wrong key for something
i'm so proud of him 🥹
how would i check if i'm currently in a run?
ctrl c ctrl v
I kind of didn't want to share my idea, but since everything I did didn't work,
I was trying to make a mod that bans all vouchers when starting a run.
But that's too confusing for me.
you probably forgot the mod prefix
not probably, definitely
complex question here, is there a way to make a joker always check a file say on github for their mult
https module
Oops! The game crashed:
functions/common_events.lua:2437: attempt to index local 'center' (a nil value)
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0614a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows
Steamodded Mods:
1: Full-House Mod by By Earth_wm [ID: fullhousemod, Version: 1.0.0]
2: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.3.0, Uses Lovely]
Break Infinity: omeganum
3: Jen's Library by jenwalter666 [ID: JenLib, Version: 0.4.0]
4: Card Sleeves by Larswijn [ID: CardSleeves, Priority: -10, Version: 1.7.9, Uses Lovely]
5: Brainstorm by OceanRamen [ID: Brainstorm, Version: 2.0.0-beta, Uses Lovely]
6: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.0~dev, Uses Lovely]
7: Incantation by jenwalter666, MathIsFun_ [ID: incantation, Priority: 9e+301, Version: 0.7.0, Uses Lovely]
8: Handy by SleepyG11 [ID: Handy, Version: 1.5.0a, Uses Lovely]
9: Nopeus by jenwalter666, stupxd [ID: nopeus, Version: 2.2.5, Uses Lovely]
Lovely Mods:
Stack Traceback
(3) LÖVE metamethod at file 'boot.lua:352'
Local variables:
errhand = Lua function '(LÖVE Function)' (defined at line 579 of chunk [lovely debugplus.console "debugplus/console.lua"])
handler = Lua function '(LÖVE Function)' (defined at line 579 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) Lua global 'create_card' at file 'functions/common_events.lua:2437'
Local variables:
_type = string: "Joker"
area = table: 0x3974b360 {click_offset:table: 0x38dfa000, static_rotation:false, shuffle_amt:0, T:table: 0x396ba2a8, offset:table: 0x397599a0, role:table: 0x38c895e8, last_aligned:-1 (more...)}
legendary = nil
_rarity = nil
skip_materialize = nil
soulable = nil
forced_key = string: "j_thecrankhog"
key_append = nil
area = table: 0x3974b360 {click_offset:table: 0x38dfa000, static_rotation:false, shuffle_amt:0, T:table: 0x396ba2a8, offset:table: 0x397599a0, role:table: 0x38c895e8, last_aligned:-1 (more...)}
center = nil
(*temporary) = table: 0x3938f3d8 {j_mime:table: 0x39395390, j_ring_master:table: 0x393a5af8, b_challenge:table: 0x393b9a58, c_medium:table: 0x393b1c30, p_standard_jumbo_2:table: 0x393bee40 (more...)}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = string: "j_thecrankhog"
(*temporary) = nil
(*temporary) = table: 0x393b7970 {click_offset:table: 0x38e83190, children:table: 0x393abec8, parent:table: 0x393add58, sprite_pos:table: 0x39954498, T:table: 0x396f6c10, offset:table: 0x39046208 (more...)}
(*temporary) = boolean: false
(*temporary) = number: 0
(*temporary) = number: 0
(*temporary) = number: 0
(*temporary) = number: 1
(*temporary) = string: "attempt to index local 'center' (a nil value)"
(5) Lua field 'func' at file 'consumables/thesummoning.lua:28' (from mod with id fullhousemod)
(6) Lua method 'handle' at file 'engine/event.lua:55'
Local variables:
self = table: 0x39b01218 {start_timer:true, timer:TOTAL, blockable:true, trigger:after, created_on_pause:false, delay:0.4, complete:false, time:103.04875822337, blocking:true (more...)}
_results = table: 0x39455680 {blocking:true, pause_skip:false, time_done:true, completed:false}
(7) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
self = table: 0x39430020 {queue_last_processed:17.283333333334, queues:table: 0x39430048, queue_dt:0.016666666666667, queue_timer:17.289797119931}
dt = number: 0.0069586
forced = nil
(for generator) = C function: next
(for state) = table: 0x39430048 {unlock:table: 0x39430138, other:table: 0x394301d8, tutorial:table: 0x39430188, base:table: 0x39430160, achievement:table: 0x394301b0}
(for control) = number: nan
k = string: "base"
v = table: 0x39430160 {1:table: 0x39463b78, 2:table: 0x39b01218, 3:table: 0x39b016a8, 4:table:
0x39b017a0, 5:table: 0x39b01c50, 6:table: 0x39b01d98, 7:table: 0x39b03a68 (more...)}
blocked = boolean: false
i = number: 2
results = table: 0x39455680 {blocking:true, pause_skip:false, time_done:true, completed:false}
(8) Lua upvalue 'gameUpdateRef' at file 'game.lua:2575'
Local variables:
self = table: 0x38b924a8 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x39aab480, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x39318958 (more...)}
dt = number: 0.0069586
http_resp = nil
(9) Lua upvalue 'update_ref' at Steamodded file 'src/ui.lua:84'
Local variables:
self = table: 0x38b924a8 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x39aab480, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x39318958 (more...)}
dt = number: 0.0069586
(10) Lua upvalue 'upd' at file 'main.lua:1606'
Local variables:
self = table: 0x38b924a8 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x39aab480, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x39318958 (more...)}
dt = number: 0.0069586
(11) Lua method 'update' at file 'main.lua:2421'
Local variables:
self = table: 0x38b924a8 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x39aab480, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x39318958 (more...)}
dt = number: 0.0069586
(12) Lua upvalue 'love_update_ref' at file 'main.lua:999'
Local variables:
dt = number: 0.0069586
(13) Lua upvalue 'oldupd' at file 'modules/controller.lua:868' (from lovely module handy/controller)
Local variables:
dt = number: 0.0069586
(14) Lua field 'update' at file 'main.lua:2454'
Local variables:
dt = number: 0.0069586
(15) Lua function '?' at file 'main.lua:938' (best guess)
(16) global C function 'xpcall'
(17) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 909 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
oh no, joker that needs an internet connection
Sorry
I think is impossible
For hte wall of text, it didn't turn into a notepad file for some reason
but how would i go about implementing it
what the hell why is it not a txt file
i havent personally worked with it though
sometimes it doesn't turn it into a txt for me either
it would try to grab from github, if it cant, use the last saved value
somethingcom is relapsing
No idea
they deleted their "What do you mean?" message
it's over
how would i check if i'm currently in a run?
But what is the issue
if G.STAGE == G.STAGES.RUN then
probably missed a prefix somewhere yeah
Do you use SMODS.add_card or SMODS.create_card somewhere
How do i check that
Im not very good with lua
whats on line 28
seems like you missed something there
(of consumables/thesummoning.lua)
Does your mod have a json file
yeah you forgot your mod's prefix on "j_thecrankhog"
should be "j_modprefix_thecrankhog" (replace modprefix with your mod's prefix obv)
Flag the cards you want to modify the text of, then patch the generate ui function, if they're flagged use a different localization key and stuff
somethingcom is gone
weird
anyways why does this return crash the game only with talisman (_hand is a valid poker hand)
return {
chips = G.GAME.hands[_hand].chips / 2,
mult = G.GAME.hands[_hand].mult / 2
}
you should specify that it's with talisman
what's the calculate function for when you enter the shop
how do you make a joker destroy itself
does this have relations with roblox
mike bring me the roblox mods
request returns 3 values
the text of the url you're requesting would be the body
local https = require "SMODS.https"
local url = 'https://raw.githubusercontent.com/Steamodded/smods/refs/heads/main/version.lua'
https.asyncRequest(url, function (code, body, headers)
print(body)
end)
prints this, for example
local code, body, headers = https.request(url)
using request freezes the game tho
and that kinda sucks
yeah it freezes until the request is done
probably not gonna be longer than 2 seconds but still
this is returning nil
well yeah, the inner function is returning the body, http_derive has no return statement
what is your goal with this?
oh mb gang
Idk what you wanna do with the return value specifically, but if you need to save it, I'd just assign G.GAME.modprefix_something = body
And then you can use it anywhere
not what i need
but thanks anyways
actually i jsut realized
i can use sync
since im not calling it all the time
itll only be like half a second of freeze right
Yeah, the first time it's called really, after that it'll probably be cached
the freeze might be longer tho, if you have slow/no internet or if github is down
for example
true
so maybe i can make a fallback
every time you successfully get the info
save it
and when you fuck up an http
use the last saved one
and also i cache mine manually
because im saving it to a variable
nice it worked
also
no freeze
!
it probably didn't freeze cus it was cached
its not 72 anymore
how cna i clear the cache
i want a unique check every time i check
not caching it
say what if i want to draw all cards of a specific enhancement
i figure you use draw_card() and ive been tryna work it out with SMODS.has_enhancement() but it either draws a lot of other cards that are not in fact stone or it doesn't draw at all
prolly hook
i think
i think draw card is just for
drawing a random card
but who am i
given its been drawing Not stone that tracks 😭
yeah atm it's drawing random cards the amount of times i HAVE stone cards
but not specifically all my stone cards
if context.first_hand_drawn and not context.blueprint then
for _, pStone in ipairs(G.deck.cards) do
if SMODS.has_enhancement(pStone, 'm_stone') then
draw_card(G.deck, G.hand, 90, 'up')
end
end
end
Might have to consider not using raw github content, idk much about caching but a quick search shows you're not the only one with this problem using github
sobbing so hard rn
what about
non
raw
github
search inside the html for the value
ah, the classic parsing of an html file
idk much about request caching, you're better off asking someone else
if i wanted to just like, generate a random integer number entirely seperate from ranks and suits and whatever within some range whats the quick way to do that
like in a context of ohh lets say if poker hand card nominals add up to 22 give money, number changes each round
pseudorandom('seed', min, max) where both min and max are integers and are included
oh wait so i dont need to do anything to specify that theyre ints?
nop
sick huge tyty
so Im getting the fabled "attempt to compare number with table" error from this code:
calculate = function(self, card, context)
local hand_level = G.GAME.hands[card.ability.extra.type1].level or 1
if context.individual and context.cardarea == G.play then
return { chips = card.ability.extra.chips + (card.ability.extra.chips_mod * hand_level),
card = context.other_card }
end
end
I've already tried wrapping to_big() around practically everything and unfortunately Im not smart enough to think of what else it could possibly be
what do yall think of this one (rank randomizes upon defeating boss blind)
try draw_card(G.deck, G.hand, 90, 'up', nil, pStone)
Whelp sorting the suits for the deck preview seems to have
had some unanticipated results
how to add a functional use button to a joker
for http, how can i tell if the request got fucked up
So like.... the cards are correct.... but I don't know why it's assigning the fronts this way lol
Has anyone ever coded the functionality of decrementing or setting a joker's sell value, rather than just increasing it?
Just wondering if that's possible to do
...is this not how I add a custom "effect" key?
i kinda fw it tho
for decreasing a joker's sell value you can just do this, basically an inverse of egg
Oh ok, seems simple enough
im trying to make a new consumable type, how do i change the name? I do have a localization file.
put it under misc -> dictionary -> b_key_cards (replace key by your consumabletype key)
when an http fucks up itll say like 400 or 500?
so check if the code is over 199 and under 300
>= 200 and < 300
usually 200 is the success code response
Thank you!
so if its anyhting else that means it fucked up
now how can i edit a local file
something with io.open
so would i go io.open(modpath.."filename", "w")?
well, no, based on what you sent anything between 200 and 299 is success, I'm just saying 200 is the most common one
as far as I know
yeah thats what i meant
is there like a documentation for all of the SMODS.Thing i think im starting to get lost
not for all, but there is a wiki https://github.com/Steamodded/smods/wiki
look to the right side for modding stuff
oh, thanks didn't know there was a wiki
does file:write overwrite or append?
What version of LOVELY is needed for MacOS Sequoia 15.4.1
How hard would it be to implement a pick card thing like in cryptid so you don't have to instantly use the card in a pack
Im assuming it would be difficult to do
but maybe not
is royal flush called royal flush internally or is it called something else
Also is there a mod to instantly reload all your mods
You can just reload everything by holding M down.
that wouldve been nice to know earlier
thanks
does not matter, realised you could just check for straight flush that contains an ace and 10 lmao
a royal flush is a straight flush where every scoring card is a, k, q, j, 10
according to the game
when you play it does it actually say 'royal flush' i forgot
or is it boring and just says 'straight flush'
It'll say Royal Flush when the hand consists AKQJT, but it uses Straight Flush's level for score calculations.
Same poker hand, just "special" name.
Can anyone figure out the reason for the crash?
(Using MacOS)
why is this giving an error
bump
anyone?
What is it trying to call at line 1025?
looking at [your message in chat](#⚙・modding-general message), my best guess is that you mistakenly called for the negative edition joker instead of a joker with the negative edition
a loadfile that directs to what i sent
the raw.githubusercontent?
what's the code when you consume/use the tarot card
When I put in the raw link, it gave me an invalid request, so decided to search on Github. Is this the file?
IDK why but my card show +2 mult permanently like it should work but when I play the card it give +4 instead
It appears to be only one key in there; this is out of my expertise, but that might be why it is trying to read something on line 1025 while it is only one line.
4 mult in total or 4 mult each?
each like in the vid
have you tried only enhancing one card, it could rule out if it is either the calculation or enhancement?
Is the for loop in use to apply for both cards (if you remove it, it will only enchance one,) I don't want to assume?
Do they give mult before the sandwich is applied
good question
no
Like the sandwich add +2 perma mult on 2 selected card
hm. maybe try logging the perm mult before, during, and after the loop to see when and where it increases it
but what is weird is that It shows the right amount on each card
use = function(self,cardm,area,copier)
-- print #1
for i, selected_card in pairs(G.hand.highlighted) do
-- print #2
selected_card.ability.perma_mult = selected_card.ability.perma_mult + card.ability.extra.mult
-- print #3
end
-- print #4
end
something like this. not sure how to log (i know some lua but not much on the modding api) or which variable
Maybe the other +2 mult is coming from somewhere else, cus you're right, if your consumable had somehow added +4 it'd say +4
Can you try starting a new run
there aren't any other enchantments or jokers, my best guess is maybe when it triggered the card, it does it twice in therefore +4
wait I'll show you guys
take your time 👍
Can you do eval G.hand.cards[1].ability.mult in the debugplus console
and show what the output is
I suspect you previously modified that and it remained
line 1025 is the main file, which contains code to read that file, i think its the io thats causing a crash
here is the video
ah i see. let me check (what kind of file structure is this)
this might be a shot in the dark, maybe try playing without any additional mods. there could be a conflict
@hidden sable when do you call http_derive? it might be calling something else than tenna
okay, nothing weird there
it's a common thing when you make your own mod or download a new one
if it is causing issues, try playing with only that mod and what it depends on (like steamodded)
If I had to throw a wild guess, it's a mod that was created for an older version of smods where perma_mult didn't exist and they added it themselves, and now it's duplicating the effect
but who knows
that might actually be why
if code => 200 and code < 300 then
ive figured it out
thats the line that causes the crash
anyone has experience with quantum enhancdement?
a bit
darn
what do you want to do with them?
what even is qe
maybe
allows a card to behave as multiple enhancements at once
"played hearts suit now counts as lucky card"
did you try anything so far
i tried looking at how ExtraCredit did it
sure enough, i got nowhere
i'm sure someone that worked on that is in this server, i don't think they would mind if you asked
tell me if this explains anything
its that
cant you just remake the lucky effect
and call it whenever a heart is played
and he said im a bad coder
I tried with only my mod and it work as intended
is links to gifs banned
yes
fair enough
imo is easier
who made QE tho
they are marking cards with the gambling flag, and those cards are treated as lucky cards, but the flag is removed after a hand is played
that's all I can say from that snippet
i tried looking at where is the gambling flag
but it only redirect me to the same joker
the gambling flag here is not really relevant
whys that
the simplest use of quantum enhancements would be
if context.check_enhancement then
return { m_lucky = true }
end
this will make all cards behave as lucky cards
strange. all i can think of is submitting a bug report for the mod that reimplented that
cus it's something they added themselves, for some effect of their own
but obviously not sure which one it is 😅
Thats what Im trying to find
thanks
ill try this
and it's okay if you don't either. if something broke down in new vegas (i don't have a lot of mods for balatro) i won't know where to start
i'm sure if you do find it, it would be good to submit one as if the api added it itself, the developer can use that instead
for the time being, you could also add that mod and that version and before in the conflicts table in your config
what does "doesn't work" mean, crash?
yes
what is the crash
and guys do you know why Ace are from PaperBack ???
we take ownership of them to implement straight behavior with apostles
is the line you highlighted 1025
no
can I see line 1025
1025 is a line to load the code i sent
okok I understand
still
I think that means you mistyped the file path
blame @lament agate
@lament agate what ARE these names
its their mod
besides when i removed that line i highlighted ago the game didnt crash
is this something you made yourself, or was that in the original
og
orwait
thenames
or
my code
names are og
my code isnt
yeah my code is new
Can you show the full crashlog
i need to get some sleep. this is out of my field, but the crash log should be able to help you
what does the code look like when it doesn't crash
wdym
cus just removing that line would crash due to a syntax error
like remove all this
the whole if statement
and since i cant do an if
i remove teh bottom bit
the bottom bit works i tested it alone
can you do assert(SMODS.load_file etc etc)()
that might give a better crash log
The bug is from PayasTerrible addition
what
It’s more of that I cannot tell what which file does
the folders make more sense
is this the entire file
yup
the folders name are clear enough
https://github.com/rarkbilk/Tangents full thing
😭
you guys know what mods that has a joker that allows you to sell an eternal?
Okay, what does homework, porn, and stuff have in them
im going into my villain arc
The sub folders too
porn folder is unused
dont worry about it
homework is ratmilk's work
stuff is for jokers and decks
hence
I cannot tell what each does and it’s not good
wankers and dicks
porn folder has nxkoos porn in it, homeowkr has my porn in it, and stuff has your porn in it
thanks ratmilk
I don't have any
how do I get the chips of the blind as an integer
bump
Hey guys! I'm configuring my workspace, did I miss anything or I'm good to go?
{
"Lua.workspace.library": [
"C:/Users/deco/AppData/Roaming/Balatro/Mods/smods-main",
"C:/Users/deco/AppData/Roaming/Balatro/Mods/lovely/dump",
"C:/Users/deco/AppData/Roaming/Balatro/Mods/Talisman-main",
"G:/Balatro/Balatro Source"
],
"Lua.diagnostics.globals": [
"G",
"UIBox",
"Event",
"sendDebugMessage",
"inspect",
"HEX",
"get_new_small",
"love"
],
"Lua.runtime.version": "LuaJIT",
"Lua.workspace.checkThirdParty": false,
"Lua.telemetry.enable": false,
"Lua.diagnostics.disable": [
"lowercase-global",
"param-type-mismatch",
"duplicate-set-field"
]
}
Lua version should be 5.1
how do you config the workspace
By adding a .vscode/settings.json file
and having lua language server extension installed
Thanks mate

Is there any way to get autocompletion or type hints for the context parameter inside calculate functions? It's the only part where I don't get any suggestions, and it's driving me crazy hahaha
Add the lsp_def folder that's inside smods to your libraries
Hmmm it doesn't seem to work
Odddd
Actually, I don't have the lsp def as a library and it works just fine
Just smods
if the player is hoeverd over a joker is there a way to update the hover
like
a redraw
just need to redraw it 1 frame
{
"Lua.workspace.library": [
"C:/Users/deco/AppData/Roaming/Balatro/Mods/smods-main",
"C:/Users/deco/AppData/Roaming/Balatro/Mods/lovely/dump",
"C:/Users/deco/AppData/Roaming/Balatro/Mods/smods-main/lsp_def",
"C:/Users/deco/AppData/Roaming/Balatro/Mods/Talisman-main",
"G:/Balatro/love",
"G:/Balatro/Balatro Source"
],
"Lua.diagnostics.globals": [
"G",
"UIBox",
"Event",
"sendDebugMessage",
"inspect",
"HEX",
"get_new_small",
"love"
],
"Lua.runtime.version": "Lua 5.1",
"Lua.workspace.checkThirdParty": true,
"Lua.telemetry.enable": false,
"Lua.diagnostics.disable": [
"lowercase-global",
"param-type-mismatch",
"duplicate-set-field"
]
}
Maybe I have a config that I shouldn't?
These are the settings I use https://github.com/Balatro-Paperback/paperback/blob/main/.vscode/settings.json
Maybe that helps?
We use relative paths for libraries, that's the main difference
something about dynatext
but idk
someone explain dynatext to me
how can i make this dynatext
local hillman = {
name = "Hillman",
pos = { x = 7, y = 3 },
config = {},
rarity = 2, -- Rare
pools = { ["Inazuma Eleven"] = true },
cost = 6,
atlas = "Jokers01",
ptype = "Mountain",
pposition = "GK",
pteam = "Inazuma Eleven",
blueprint_compat = true,
calculate = function(self, card, context)
end,
}```
I was declaring the jokers as variables and injecting them with a loop so lls doesn't recognise context
i need dynatext for the color
That'd do it indeed
You can try putting ---@type SMODS.Joker above it
But it'd get annoying for every joker
Yea it sure will haha
like a function to simulate taking your mouse off the joker and back on
n would be G.UIT.O, the in config you put object = DynaText {}
And inside the dynatext brackets you configure it
Ill search for a solution, as how I have done all the code, using SMODS.Joker its not a solution I think
is there a way to just update it
like the whole menu
only need to do it once
I'm not sure
I think ui elements have a recalculate function tho
Maybe that helps? Not at my pc to test tho
I guess you can try card.config.h_popup:recalculate()
Dynatext is pretty straight forward
Hi eremel
Should still use reftable
In dynatext
when you set that as a string youre basically setting the value as is to that
its not gonna be tracked because. its only tied to the new object its attached at
whats the function in game that prevents player from interacting with anything?
blocking?
love.event.quit()
😭
That was basically eremel just telling you to alt f4
---@param data SMODS.Joker
---@return SMODS.Joker
local function J(data)
return data
end
maybe defining this and using local joker = J()?
The alt+f4 of modded Balatro
You can still open it again
Need a better solution
Yeah that's right
uninstall balatro
You can reinstall it
maybe deleting /* or system32 could do it
Still needs improvement
turn off computer
Yeah that'd work
I think the method reroll_boss_blind has some things about blocking interactions
maybe you could give it a look
ill try that later
G.CONTROLLER.locks
Uh, nvm I guess
I think you can lock specific items in game with this
Did dynatext not work
not for my case
Even with reftable?
no it didnt
You updated the variable of the card instead of the color then
You'd want to modify the color, instead of reassigning it. So instead of card.ability.timecolor = something else, do card.ability.timecolor[1] = 0.5 for example
Where'd you define timecolor
i think dynatext requires string or smthn
DynaText({string = {{ref_table = G.GAME.current_round, ref_value = 'dollars_to_be_earned'}}, colours = {G.C.MONEY}}) like this
Also if you're gonna be modifying it you want to do copy_table(G.C.GREEN)
what does it use
thought i could get around of this
ok it works, now how do i modify the color
By updating the table you passed to it
no, you're changing the table it's referencing by doing that
then hoq
you want to initialize it like this first (in your configL
And idk if there's a better way but you can do
card.ability.timecolor[1] = G.C.RED[1] up to 4
or 3, alpha doesn't really matter
no, same thing as here but with G.C.GREEN
wait no
You don't wanna mix the numbers up
ya, but that will only change one of the 3 values
You want to do the same with [2] and [3]
So 3 lines for each color swap
ah
there's probably a utility function somewhere to do this, but I wouldn't know what it's called
works awesome
now uhh
hard question
if its not possible thats fine
can i make a lil textdisplay under the joker
or over
or on it
just somewhere
yes you can
how
card.children.some_name = UIBox { definition = {}, config = {} }
definition would be a UI element like you already made
so if i wanted to turn this into that how would i do it
you'd put everything in the first yellow brackets in definition
And you'd do this in set_ability
Only if initial is true
Yeah
don't remember, it's in the wiki somewhere
what goes in config
uh....
still
Maybe your top ui element has to be root instead of column
also wdym
now theres a background
try setting the color of the root to {0,0,0,0}
Need help on what to do here
ye
in the config of uibox pass offset = { x = 0, y = 0.25 }
Should bring it .25 down, whatever that means
worked but uhh
big issue
loading the save
removes the box
like
going to main menu
and continuing
removes the box
If you added this try removing it
never added it
Hmm
Maybe just do it in update instead of set ability, just do if not card.children.timer then
Probably not the best solution
But a solution
true
actually
what if i make it so
the timer is there during a blind
once out of i blind its gone
You could do that in calculate
In setting_blind create the timer, in end of round set it to nil
Oh and before setting it to nil do card.children.timer:remove()
thank you for the help
I dont think i'm looking at the hand levels correctly, any assistance?
I have a Joker that looks at them
Take a look at Lvl ? Death
ah where can i find your code?
found
man looking at others code reminds me how hopelss i am at this hahaha
I mean thunk made Balatro with a giant if-else stack
you're not wrong
at least he understood what all this stuff meant
it just doesn't seem to be doing the search thru the table
dunno man, i got nothing
i'm either doing the loop wrong, or i'm doing it in the wrong place
i'm going to bed, i'm gettin nowhere
You need to iterate over G.GAME.hands using pairs, not ipairs
Damn, i gave that a shot and it didn't seem to work either
If you have debugplus you can add a print(hand) above the level check see if you get into the loop and what values you get
I mean print also shows up in the lovely console
I like not having to switch windows but true
hello, why doeesn't this work ?

is there an easy way to add an artist tag to a steamodded deckskin like this?
(like when you hover over the cards in the selection menu)
idk how it works but yes
https://github.com/Steamodded/smods/pull/659
word, ty
I made an Enhancement that has a chance to copy the card this enhancement has but without the enhancement.
How can I apply a random seal OR edition to the copied card?
use card:set_edition with poll_edition and SMODS.poll_seal with card:set_seal
@manic rune
@dreamy thunder
check out pendulums in joyousspring :3
you need to hook either card highlight or the use and sell buttons function
or update function 
How do I make an event with random delay in seconds that doesn't clog up the event queue, but still forces nothing to happen for a bit?
use different queue?
Nvm, delay() works enough.
like this, right?
oh, gotta remove the "vremade"'s
whats the function for the card highlight
function Card:highlight(is_higlighted)
wait what???
thanks
ok, fixed this, just had to put the prefixes
dont use the vremade editions
yeah, just had to put the right prefixes
or the wheel of fortune key
how do i return a card back into the deck
also another question: how can I make it that this Enhancement copies the card itself that has said enhancement and not the first card of the played hand?
(cuz rn it only copies the first card of the played hand)
i thought you were answering my question so i was waiting
use card instead of context.full_hand[1]
actually is there a function that returns a card into the deck
draw_card probably
oh also dont use math.random, use pseudorandom
is this efficient
technically not but it's fine
its fine
i changed my mind this is the worst code ive ever seen
god damnit
me too
tried like this but now it gives me a particular error
i would know, ive worked at [BLEEP] for 7 years
they worked at thunk entertainment
i didnt say context.card
lizzard? 🦎
oh, right, my bad
whoops
return a card back into the deck not draw it
yes, draw_card moves a card from an area to another
aight, now it works perfectly! thx for the help!
does context.fix_probability or context.mod_probability happen first?
mod happens first iirc
I wanted to create a joker that acts like stone joker but I'm unsure what should I put in the queue instead of "G.P_CENTERS.m_stone"...
m_modprefix_key for your enhancement, same for has_enhancement
aight, thx!
Can anyone tell me how to make the joker get an extra xmult when choosing a blind? I have thid code but its doesn't work
you have to add to card.ability.extra.Xmult in context.setting_blind
Anyone have idead for this algorythm?:
Each 2 Jacks held in hand gives some effect
I was able to implement it, but it reacts not to every second Jack, but to Jacks with an even position taking into account other cards too, that is, the hand JackAceJack did not give effects, but JackJackAce did. This is not what I expected, so I decided to ask if there is
calculate = function(self, card, context)
if context.individual and context.cardarea == G.hand and not context.end_of_round and context.other_card:get_id() == 11 then
local need_to_ability = false
for i, c in ipairs(G.hand.cards) do
if c == context.other_card then
if ((i) % card.ability.extra.divider == 0) then
need_to_ability = true
end
end
end
if need_to_ability then
if context.other_card.debuff then
return {
message = localize('k_debuffed'),
colour = G.C.RED
}
else
return {
x_mult = card.ability.extra.xmult,
dollars = card.ability.extra.dollars
}
end
end
end
end,
I really don't know how to make it easier, or at least somehow
Goddamn, this works too!
Yes, it would be easy to do with "context.joker_main", but I would like to make it work with a Mime, like Baron
local jacks = {}
for _, pcard in ipairs(G.hand.cards) do
if pcard:get_id() == 11 then
table.insert(jacks, pcard)
end
end
for i, c in ipairs(jacks) do
if c == context.other_card then
if ((i) % card.ability.extra.divider == 0) then
need_to_ability = true
end
end
end
also the second for should probably break when it finds it
how does draw_card() work
local jack_count = 0
for _, pcard in ipairs(G.hand.cards) do
if pcard:get_id() == 11 then
jack_count = jack_count + 1
if pcard == context.other_card then
if jack_count % card.ability.extra.divider == 0 then
need_to_ability = true
end
break
end
end
end
this is probably better
nevermind i figured it out
I did something like this at the beginning, but for some reason I thought it didn’t make sense, anyway, it works, thank you very much!
can anyone see any clear issues with this main_end piece? when i try returning it, nothing appears in my seals description
that didnt fix it :/
why this not trhe work?
if context.individual and context.cardarea == G.play then
if context.other_card:is_suit(card.ability.extra.suit) then
card.ability.extra.spade = true
end
end
if context.joker_main then
if card.ability.extra.spade == true then
card.ability.extra.spade = false
return {
xmult = card.ability.extra.xmult
}
end
end
end
}```
when #⚙・modding-general is alive and happy and #💻・modding-dev is a rotting corpse:
me when

@red flower can seals have a main_enddddd cause i cant get mine to work
dunno
Not fully sure.
Thinking on adding one for credits for things I modded in just in case.
the entire font or just for a description/name
no just like THE balatro font
use trance?
whar??
ok
I'll check that out. Thanks. 👍
check trance's code then
Why don’t you just put this in the description like normal?
i have no idea how to do this
Open the file with vscode …
And check how they do it
Be determined
@red flower After looking at your code and the smod wiki, I was able to make a toolbox, but not sure if I formatted it correctly.
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = { loc_txt = {
['en-us'] = {
text = { 'TEST' }
}
}}
end,
What's the difference? Geniune question.
loc_txt is an attribute on the smods objects so you can have the description in the object without a localization file, not everything supports that
I see.
Iwasasleep
...how do I detect if a specific mod's menu had been opened again?
G.ACTIVE_MOD_UI.id == "modid"?
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = { key = 'key', set = 'foo' }
end,
return {
descriptions = {
foo = {
name = 'key',
text = {
'boo'
}
}
}
}
@red flower Something like this?
set has to be Other unless you want to do more stuff to make them work
but otherwise it looks fine
balato doesnt open
it doesn't look fine, inside foo there should be key = {}
oh i didnt notice that
nvm
Did you try pressing enter inside that console in case you accidentally pressed something inside of it
i fixed it
somehow obs
what srockw said
halted it
doing that rn
Anyway good morning chat I just woke up
Good morning
gm dilly
Waking up sucks
gm
How are my besties
return {
descriptions = {
foo = {
key = {
name = 'key',
text = {
'boo'
}
}
}
}
}
@normal crest like this?
Yeah, but like N said, that is not sufficient to make it work with foo set
...if only we could embed looping points for custom music...
I need to work on its performance cause it seems a bit frame hungry still
But gpu joker is coming to be
so replace foo with Other and that should do it?
Yeah
thanks 👍
load up minecraft with 200 shaders 🤑
1 chrome tab
so many people misunderstand gpu/cpu usage 😭
No thats for the ram joker silly
is there a psu joker
i know nothing about computers
Not yet
(bump)
@red flower @normal crest godspeed
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
they com pute
(i had 4 different classes about how computers work in uni)
I cant really do a psu joker
I can check things like if its charging and such for batteries but desktops dont have that aspect because they are on and off and dont really have a charging state
check the current power consumption
Maybe i can try and check the wattage of a psu a system has and then give something depending on that
If that's available
I still need to see for the gpu one to try and check for amd and then Linux to check for gpu without it being so frame hungry
My initial checks made me go from 430 frames to 50
How are you getting the current gpu usage?
Current version I stay around 150
Pulling nvml through ffi
No idea what either of those are
Works for nvidia right now and theoretically for amd but I dont have amd so harder to test
Ffi is foreign function interface for lua
I'm on Linux and amd if you need someone to test
Let's me grab nvidias dll and then read its shit through there
linux and nvidia for me
And yea id love to use you soon if thats alright
same
Not with that wording
Lmfao
why does this crash in joker_main (only with talisman)
local _hand, _tally = nil, to_big(0) -- ty vanillaremade for giving me all this code
for _, handname in ipairs(G.handlist) do
if SMODS.is_poker_hand_visible(handname) and to_big(G.GAME.hands[handname].played) > to_big(_tally) then
_hand = handname
_tally = to_big(G.GAME.hands[handname].played)
end
end
local chips = ((G.GAME.hands[_hand].chips) / (2))
local mult = ((G.GAME.hands[_hand].mult) / (2))
return {
chips = chips,
mult = mult
}
Not soon tho
Which line is crashing, and what's the crash
My version of soon is like the next week or so
Sure, I can definitely help you within the next 7 days
i don't have a line that crashes from my mod in the report (but it's attempt to compare number with table)
heres the report
What's at Mods/lovely/dump/functions/common_events.lua on line 1118 for you
return {
descriptions = {
cTerrorist = {
concept = {
name = "Concept:",
text = { "-" }
},
art = {
name = "Art:",
text = { "-" }
},
source = {
name = "Source:",
text = { "-" }
}
}
}
}
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = { key = 'concept', set = 'cTerrorist' }
info_queue[#info_queue+1] = { key = 'art', set = 'cTerrorist' }
info_queue[#info_queue+1] = { key = 'source', set = 'cTerrorist' }
end,
Did I mess something up?
Not using the Other set
How do you use the Other set with making each joker card unique?
i dont know why this line hasnt been patched by talisman yet
or maybe its a common conflict
make each something like [joker]-concept, [joker]-art, and [joker]-source?
Yeah it's likely a talisman patch failed due to your other mods
make the keys unique OR add #1# and stuff and use vars
talisman just simple forgot to patch it still i think
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "if amt > 0 or amt < 0 then"
position = 'at'
payload = "if to_big(amt) > to_big(0) or to_big(amt) < to_big(0) then"
match_indent = true
from its prs
so just throw that in
Hand level needs to use to_big
where am i using a hand's level
i'm just getting the chips and mult
or maybe any hand value needs it?
They're already bignums
Ah
Its just what dilly said
return {
descriptions = {
Other = {
cTerroristConcept = {
name = "Concept:",
text = { "-" }
},
cTerroristArt = {
name = "Art:",
text = { "-" }
},
cTerroristSource = {
name = "Source:",
text = { "-" }
}
}
}
}
Did I miss a bracket or something?
Fixed it myself. Weirdly, have the name as an array/table.
Wait talisman still hasn’t fixed that crash?
its been sitting in their prs for a month apparently
Is it possible to use the loc_txt of the joker name and description into a loc file?
ill just put it in my own toml then
help
yes, in fact it's recommended
-- Counter-Terrorist
SMODS.Joker({
key = 'cTerrorist',
loc_txt = {
['en-us'] = {
name = 'Counter-Terrorist',
text = {
'Retrigger all vanilla jokers'
}
}
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = { key = 'cTerroristConcept', set = 'Other' }
info_queue[#info_queue+1] = { key = 'cTerroristArt', set = 'Other' }
info_queue[#info_queue+1] = { key = 'cTerroristSource', set = 'Other' }
end,
})
return {
descriptions = {
Other = {
cTerroristConcept = {
name = 'Concept:',
text = { '' }
},
cTerroristArt = {
name = 'Art:',
text = { '' }
},
cTerroristSource = {
name = 'Source:',
text = { '' }
}
}
}
}
@red flower What do I add to the loc file and change in the loc_txt?
remove the loc_txt and do this
https://github.com/nh6574/VanillaRemade/blob/73c19ebfaefad69c543e5d48c5e8a3f426b33737/localization/en-us.lua#L494
soon i need to start splitting things up again and adding to my loc
ive gotten sloppy
no atlas for consumables?
made of vanilla
i love vanilla



