#💻・modding-dev
1 messages · Page 109 of 1
it's just juice_up with specific reoccuring values
oof
conflicting patches?
asked this earlier but never got an answer, but is it possible to do something where upon restarting a run, i can show a voucher popping up and dissolving, and the joker corresponding to that voucher appearing and being added?
seems like it
(no idea how lovely patches work)
I don’t think youd find hindered in cryptids stake toml file
i was searching in the bunco lovely.toml
i just forgot to remove that search thing
???
You want to search across your entire workspace
so as it turns out,
bunco's hindered sticker is incompatible with cryptid
because of fuckin swag points
i did
thas why im searching in the cryptid stakes toml file
where's the save located so i can copy a save to test the reincarnation ability easier?
%AppData%/Balatro/[1/2/3]
i say, as i use at patches extremely destructively
the most useless synergy ever 🔥
You say, as you link a non destructive at patch
+8 mult 🔥 🔥 🔥
🔥
is there a way I can run a function directly after a run is started?
that's the most destructive at patch i could link without spoiling anything
https://cdn.discordapp.com/emojis/1297860577787383871.webp?size=48
I suppose it is destructive but it’s be unlikely to cause issues
and also what would the best way to replace a card in a deck?
same size as the joker
I know other people have made deck textures. You might find some in #1209506514763522108 , maybe as an image file (not a mod) in #🎨・fan-art or around the web
Is there like, any way to change playing card base chip values only when they're played, I'm making a joker that reduces all numbered card values to 1 (that's not all it does but that's the part I'm struggling on)
YEEEE I GOT IT TO WORK!
Holy fuck that's amazing
may need to lower the chance for it though
I may come to you to copy your code if I ever do UI shenanigans
i just looked at how it was done for taikomochi since it messes with the game over ui as well
but yeah now i need to add the visual effect for the cards that were carried over as well as the jokers to go with that
who wants to play "count nodes for shop ui" 
oh no
Making more progress
nice sprites
if i had to figure out the ui stuff myself i would have just given up on the idea entirely
Thanks! Not much of an artist myself so I'm just bullshitting
I wonder if it's possible to cram two Enhancements into one playing card
not really, but you can just add a new thing to it
i agree
suggestion, maybe shorten the badge to "Fatemaker"
Hmmm right then
My mod is themed around synergies and stacking different enhancements and stuff
It's inspired by Destiny 2
not sure how to draw it, but possibly could do something where it uses a different variable that's a table of enhancements for the cards
Steamodded has been working on multi-enhancements
YOU CAN GO TO HELL IN BALATRO?!?!?
Not sure if it's been merged yet though
not yet...but you will be able to. i'm adding a bunch of different "afterlifes" that you can get by purchasing a specific voucher for, that will have different effects
if you go to hell, all jokers should be permanently turned into Jolly Jokers
planning on the vouchers to be shown as generic ones until you experience said afterlife then the next time you encounter the voucher it will actually tell you which one it is
qunatum enhacnements is merged
do they finally work?!?!?!
this will truly be peak
Hey I'm stuck on a part. I want to get the current money I have in game. I cant seem to find that in steammoddeds documentation. Does anyone know how?
Im trying to make a mult increment for every 6 bucks
G.GAME.dollars
Hey, is there somewhere I can find a list or something of all of the colors I can use for messages and text?
G.ARGS.LOC_COLOURS
Is there a context for checking if a card is debuffed? I'm making an enhancement that it is immune to debuffs
Check Fluorescent from Bunco
so do I just make a local that is G.GAME.dollars/6?
do II have to floor it or does lua automatically do that?
isn't this incomplete? aren't the colours searched for in G.C
or do those point to the same table
Is "prevent_debuff" a global value from Balatro's source code that I can just simply call to make a card be immune to debuffs?
okay yeah
function loc_colour(_c, _default)
G.ARGS.LOC_COLOURS = G.ARGS.LOC_COLOURS or {
red = G.C.RED,
mult = G.C.MULT,
blue = G.C.BLUE,
chips = G.C.CHIPS,
green = G.C.GREEN,
money = G.C.MONEY,
gold = G.C.GOLD,
attention = G.C.FILTER,
purple = G.C.PURPLE,
white = G.C.WHITE,
inactive = G.C.UI.TEXT_INACTIVE,
spades = G.C.SUITS.Spades,
hearts = G.C.SUITS.Hearts,
clubs = G.C.SUITS.Clubs,
diamonds = G.C.SUITS.Diamonds,
tarot = G.C.SECONDARY_SET.Tarot,
planet = G.C.SECONDARY_SET.Planet,
spectral = G.C.SECONDARY_SET.Spectral,
edition = G.C.EDITION,
dark_edition = G.C.DARK_EDITION,
legendary = G.C.RARITY[4],
enhanced = G.C.SECONDARY_SET.Enhanced
}
return G.ARGS.LOC_COLOURS[_c] or _default or G.C.UI.TEXT_DARK
end
lmao
lol
this is src btw steamodded lovely patches this function to include modded suits/consumeabletypes/rarities
no clue, i don't know about Bunco code specifically
I'm guessing that it is since there's only one instance of prevent_debuff
Oh wait I checked through the chat history and apparently it's a Steamodded thing?
how does this high contrast card look
🔥
non high contrast
What's the most practical way of making a played card with a special enhancement return to your hand after playing it
Is there an already existing context for it? Or do I have to somewhat fake it by returning the card to the deck and then automatically draw it like the DNA
What is context.individual? I keep seeing it referenced in the example mod without any definition.
set to true when referencing individual playing cards
i believe greedy joker goes if context.individual then so it triggers individually for each diamond card (and not itself), and end of round effects like popcorn go if not context.individual then as otherwise it would trigger once for each card held in hand
not necessary all the time, but some contexts require that differentiation
Ah, I see. Thank you!
hmm today imma make a modding page
miku miku
oo ee oo
Could someone explain what's going on here to me? This is from to code for Strength.
local rank_suffix = card.base.id == 14 and 2 or math.min(card.base.id+1, 14)
Apparently this returns the rank of the selected card plus one? I don't understand how though.
that's the jank way that the base game does things
needless to say it's not compatible with modded ranks whatsoever
in vanilla, ranks don't actually have any associated data they're consistently stored
you can look at smods' override of strength
basically we gave ranks a table for their data and included a next option that specifies which rank is next / which ranks are next
it's not stored explicitly, you'd have to iterate through all the ranks and see which one has the current rank included in next
Alright
something along the lines of this (just grabbing the first is fine for vanilla ranks, but custom ranks can branch)
local prev_ranks = {}
for k, v in pairs(SMODS.Ranks) do
for _, vv in ipairs(v.next) do
if vv == card.base.value then prev_ranks[#prev_ranks+1] = vv end
end
end
Are there any mods that actually have custom ranks?
seen something along the lines of higher numbered cards too but i can't find them
oh right that was autumn
I do know #1239829592693538816 is planning on one, but I don't think it's been programmed yet.
CrimCard is also planning on ranks iirc
How do I wait for the G.hand.cards to be populated before doing this code?
use an event
where is the achievements tab in balatro???
I've seen them around but idk how they work, time to learn about them ig
(I enabled them in the config)
there's no in-game achievments tab
oh, for modded achievements? that's independent of the setting
I haven't played vanilla balatro since the 0.9.8 and I don't remember
it's in the mods menu
nope, vanilla achievements
there's no tab for vanilla that I can recall
okay, ty
smods doesn't add one, only for modded
if we make an achievements collection or something, we can maybe do that
I don't think I'm doing this right. Is this correct?
for i = 1, #context.scoring_hand do
local _card = context.scoring_hand[i]
local new_rank
if _card:is_suit("Hearts") then
card.ability.extra.mult = card.ability.extra.mult + _card.base.value
for k, v in pairs(SMODS.Ranks) do
for a, b in ipairs(v.next) do
if b == _card.base.value then new_rank = b end
end
end
SMODS.change_base(_card, "Hearts", new_rank)
end
return {
message = "Bitten!",
colour = G.C.red,
card = _card, card
}
end
end```
I'm trying to make every scored heart add its rank to the joker and downgrade.
guys i have a quick question, i'm making a mod since quite a long time now and i want to rename it (i already changed it's name in the .lua) but i wanted to know how (and if) i can also change it's name on the github repo ?
yeah in the github repo settings
i can also change the lua file name and just push it it will be okay ?
do i need to do anything crazy to draw an overlay on cards based on a custom value instead of an enhancement?
Question, is there a context state that happens right after cards are played but before joker_main?
There's context.scoring_hand if that's what you want?
It runs before joker_main
That's probably what I'm looking for. Thank you! Also what is that ss from? I feel like I could get use out of that
The wiki page on the github repo
But which page lol
That’s not what you’re looking for
Scoring hand is in every calculation context
What’s the effect of your joker?
Use either context.before or context.after depending on whether you want it to happen before or after the scoring
Oh after reading that, before makes more sense
so context.before.scoring_hand?
No it would just be context.before
uhhhhh
for some reason my stickers are triggering 3 times
(they are on playing cards)
a i missing some sort of context?
OK WTH IS HAPPENING
i have no idea why on earth every single sticker is getting evaluated 3 times
try printing the context
oh good idea
okay so now i have it so that the discovery of stuff is working and it changes the sprite, but it doesn't change the text for some reason
yay
ok it somewhat works
the only problem is that the sticker effects trigger before the chips
but its not that bad
Getting an error "function arguments expected near 'return'" from this block and I'm not entirely sure why
if card.ability.extra.chance < 1 then
card:remove
return {
message = 'Crumbled'
colour = G.C.SET.Tarot
}
end
end```
I'm having a weird crash error I can't really figure out, on round end (when my joker gets calculated), it crashes with functions/state_events.lua:211: 'for' limit must be a number. This is my joker's calculate:
I think you're missing a comma at the end of message = 'Crumbled'
Oh same this language has some oddities I'm not quite used to yet
As much as I hate semicolons I miss them here 😭
Also I don't need and not context.blueprint if blueprint_compat is false, right?
Hmmm, it's the same error even after adding the comma
We all have those moments
What’s the crash?
up here
Have you saved the changes you’ve made?
Plenty of times yes
Send new code and SS of crash pls
sure thing, gimme a sec
Oh bruh it works now
I loooove code
Anyways now that the game launches, how would I go about displaying this chance value in the info text (in place of 'Joker' in the first line)
no
X is the number of the position of the variable in loc_vars
^^^^^
Oooooh I see
you have to put a reference the value in the loc vars
in your case it would be G.GAME.PROBABILITIEs
i think
Kinda like this
So #1# references G.GAME.probabilities.normal and #2# references card.ability.extra.chance and so on for adding more variables
This would lead to it saying "1 in 10 chance ..." in game
If you wanted to make it guaranteed for testing purposes, change the chance variable in config to 1
At least that's what I did
what does the probabilities global var do for me here? The high end I have baked into the card (at 10) and "chance" is the value that changes and is rolled against with a math.random
Well, someone correct me if I'm wrong but we use G.GAME.probabilities and pseudorandom so that the run's seed takes effect
Oooooooooooh I see
hey I realized that my Jokers are incompatible with Cryptid's Hooked sticker and I'm curious if theres anything I can change about my mod to fix that
no, blueprint_compat is purely visual
you still gotta make it no work with blueprint, in code
Oh cool, okay thank you
Also what about my crash issue? Still haven't figured that out
heres the errors
'for' error has plagued me for ages, i have no idea what to do about it or what causes it 😭
Damn.
My issue is that I'm not sure what's causing it so I don't know what to change to fix it
its related to randomness, im pretty sure, but no what causes it
Interesting
pseudorandom is for seeds yes, G.GAME.probabilities are just values the game uses consistently across chance effects so things like oops all 6s work
Yeah thought so
Oh what the hell?? My crash was caused by oops all 6s
I had oops all 6s and when the random event actually triggered it caused that crash, but once I got rid of 6s, it didn't crash
If you read back in the crash report a bit more you’ll see which line in your code is causing it
Every file referenced in the stack trace is either game files or steamodded files
Unless I can't read which is honestly possible
Is it possible to do inline math in a joker info text? I think it would be funny for this card to work with Oops so I'd have to multiply normal probability by the custom chance value for it to display properly
G.GAME.probabilities.normal does that for you
Okay interestingly I might've just been making the mistake I was making when I first started this project, not refreshing the run... because now it doesn't crash
Even for a variable chance value? The one I’m defining in the card is not static
Yes just multiply your value by the global
My question is if I can do that inline within the description text
I think you'd have to do that in loc_vars
Gotcha ok
Ah, no it still crashes
bumping this, if anyone even has any idea what the issue could even be
cuz I would like for my mod to be compatible with Cryptid
Assuming it is with the Joker you have highlighted, what's the calculate on it look like?
it displays [Joker] for Stardust (Cryptid) aswell, but I would assume it has smth to do with the calculation yes
I have a music replacement mod that has:
SMODS.Sound({
vol = 0.6,
pitch = 0.7,
key = "music1",
path = "music1.ogg",
replace = "music1",
sync = {
soiree_music1 = true,
soiree_music2 = true,
soiree_music3 = true,
soiree_music4 = true,
soiree_music5 = true
}
})
-- continued with the other respective files
whenever I switch profiles, a second audio track starts and overlaps with the currently-playing one. how do I prevent it from doing this?
also sorry to interrupt your issue donut :(
its fine, happens all the time
Why card = self and not card = card?
wait what
fuck
ok that should be fine then I bet
multiple jokers say card = self instead of card = card why
does anybody know how to edit the visuals of the game like background and shaders n stuff?
If vanilla... that's just vanilla things.
not sprites
I was talking about my own Jokers, which I realize I know why its because I was referencing vanilla
i think this is a Steamodded bug, faced this issue myself when adding custom music tracks to Cryptid
Also, weird how SMODS.Sound is also used for music... maybe SMODS.Audio could worked better generally. Just a thought, though.
In vanilla calculation, self refers to the card object. In smods calculation, self refers to the prototype and card refers to the card object. They should always be card = card
yup I get that now
oh well I'll investigate
how can I briefly disable both "play" and "discard" while a joker is playing an event in their calculate function
I'm also investigating but I'm also unfamiliar with balatro's stuff
honestly I really wanted to make a music loader library but it seemed to be too hard to figure out
the current iteration of the sound api is mostly my work so I'm sure I'll figure out what's causing this
ah got it
does anyone know of a good syntax highlighter for vscode btw?
for love2d's lua stuff, I mean
the stock lua extension works fairly well from my experience
i could use that for the .toml
got it
also yea the toml is different but I know what you mean
syntax highlighting for the patches
Not having much luck trying to track down this crash. It seems to be happening when it's trying to create a card so here's the associated code block
if context.before then
local chance_roll = pseudorandom('f_cookie', card.ability.extra.chance * G.GAME.probabilities.normal, 10)
card.ability.extra.chance = card.ability.extra.chance - 1;
if (chance_roll >= 10) then
play_sound('tarot1')
card:juice_up(0.3, 0.4)
local new_card = create_card('Tarot', G.consumable, nil,nil,nil,nil,'fco')
new_card:add_to_deck()
G.consumables:emplace(new_card)
return {
message = 'GET!',
colour = G.C.SECONDARY_SET.Tarot
}
else
play_sound('tarot2')
return {
message = 'NOPE!',
colour = G.C.SET.Tarot
}
end
end
G.consumeables:emplace(new_card)
that's just TOML, you don't really get good syntax highlighting with that as it doesn't expect lua code in there
I (or anyone) can write an extension that syntax highlights the value for payload keys for files that match lovely.toml (or match lovely/*.toml)
I'd have to look at how to do that with textmate
You can always just write your payloads in a lua file and paste them in when you’re done if you need the highlighting
this is true
is there a way to disable the play and discard button while calculating a joker?
"attempt to index local 'center'" i got this error message when i used the wrong key for a custom joker in a challenge -- i think the game uses "center" to refer to just like cards in general (jokers, consumables, vouchers, card backs/decks)
so i'd guess the problem is w/ the sixth argument to create_card
what is 'fco'?
Yep I figured it out, ty tho lol
seed
me when I don't use SMODS.create_card
forced_key I mean, sorry
fco is certainly not a valid key for any center
new to steamodded, what's the difference between e.g. create_card and SMODS.create_card? seems like there are a lot of functions that have mirrors in SMODS but i didn't see documentation on them
there's an inherent issue with base create_card being that you need to constantly keep track of what the args mean
Mostly they take tables instead of nil nil nil
the smods version takes a table instead
ah
https://github.com/Steamopollys/Steamodded/wiki/Utility should be in here
thanks
Looking into SMODS create card, are all of the inputs required?
no
Does anyone know where I can find a guide/list/cheatsheet for the text formatting system? Like the one that goes {C:attention} or whatever it is
If you unpack the Balatro executable and do a search for G.C.ATTENTION, you can find other ones for formatting not too far behind.
How do I play a custom sound?
play_sound(sfx), where sfx is the key to your registered sound via SMODS.Sound.
With the mod prefix being part of the string, too. toga_example.
I'm trying to have this Joker get destroyed at the end of a round once a value hits zero but I'm getting this crash
if context.end_of_round then
if card.ability.extra.chance < 1 then
card:juice_up(0.3, 0.4)
G.jokers:remove_card(card)
card:remove()
card = nil
return {
message = 'Crumbled',
colour = G.C.SET.Tarot
}
end
end
Omit card = nil?
context.end_of_round by itself happens multiple times
It was doing this crash before that. Added that after the fact while looking at the code for cavendish/gros michel and it was doing that
see joker calc guide for the correct check
Do you think it’s worth throwing the old context guide back on the wiki?
maybe
I’ve seen a number of people confused by the new one, I guess it makes more sense when you already understand the calculation system
I'd appreciate that cause I'm looking through Joker Calc and the closest thing I can find is this but it's still no good
I guess so, the old one is more granular
we should add some property to the main end of round context so the check is more straightforward maybe?
nvm it was the card=nil this time LOL
im losing my shit lol like why does having all my jokers give me extra mult crash everything like AHH
That would probably help
trying to code a joker that gives X3 mult only after a card is destroyed, failing miserably so I'm reaching out for help
checks inside checks inside checks
you need to turn your local var into a config field and denest your code
Also please indent your code properly
why is are context.cards_destroyed and context.cardarea ... checks inside of a context.setting_blind check
infact both of those checks dont have an end
honestly i got no idea what they mean with this
show your code, this could be a couple things raisedcateyebrow~2
but its essenitally saying your calling extra, when nothing is "defining" it
--- MOD_NAME: Mythos
--- MOD_ID: Mythos
--- MOD_AUTHOR: Salems_Bane
--- MOD_DESCRIPTION: An example mod on how to create Jokers.
--- PREFIX: xmpl
----------------------------------------------
------------MOD CODE -------------------------
SMODS.Atlas{
key = 'Mythos',
path = 'dyonisus.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'Mythos',
loc_txt = {
name = 'Dyonisus',
text = {
"{C:mult}+#1#{} mult",
}
},
rarity = 1,
atlas = 'Mythos',
pos = { x = 0, y = 0 },
config = {
extra = {
mult = 1,
consumeable_mult = 7,
random_mult = 2,
random_chance = 5
}
},
cost = 4,
eternal_compat = true,
blueprint_compat = true,
brainstorm_compat = true,
calculate = function(self, card, context)
if context.using_consumeable then
if pseudorandom('dyonisus') < G.GAME.probabilities.normal / self.ability.extra.random_chance and not context.repetition and not context.repetition_only then
card.ability.extra.mult = card.ability.extra.mult * self.ability.extra.random_mult
else
card.ability.extra.mult = card.ability.extra.mult + self.ability.extra.consumeable_mult
end
end
if context.joker_main then
return {
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
colour = G.C.mult,
consumeable = card,
mult = card.ability.extra.mult
}
end
end
}```
but i have it defined in my config i think
Looking at gros michel/cavendish, what does this do exactly?
thats the
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
that
copy this over your existing message, and see if it still complains:
localize{type = "variable", key = "a_mult", vars = {card.ability.extra.mult}}
just the whole thing right?
yeah, select over your message (from localize) and paste over with that
exact same error?
yeah exact same error
would you mind taking a screenshot of the joker in VSC? im curious about something, but discord makes code blocks fucking unreadable 😭
here you go
My newest dumb joker idea: Darkroom Joker, boosts negative jokers in some way
message = localize{the code i sent} 😭
Probably already exists in some mod
sorry if i wasnt clear on it
But I’m gonna make it
its alright lol i just didnt know
i have a joker idea that plans to boost negatives, it gives 2+ joker slots (1+ for being negative, 1+ extra for being that joker) when negative, and ands an +1 slot if anything else owned is negative
so with perkeo? insane
That would be insane
Makes negatives that don’t do anything for your build still give you slots to use on non-negatives
An incentive to take useless negatives
okay so i kinda get it but also not like wth
means your missing an end bracket, VSC should outline this
yay!!!
where to like i dont see it
another joker concept i want to explore is rewarding for overshooting, i just dont know how to code it 😭
makes sense
prob the joke blind from cryptid says it
why are you doing self.ability.x.x
Cryptid kinda has its own stuff going on
Hard to extrapolate that into a regular Steamodded thing.
and not card.ability.x.x raisedcateyebrow~2
the error is still the same
-# also a couple things, it should be colour = G.C.MULT and mult_mod = card.ability.extra.mult in the return function, im not sure why its complaining about a missing bracket when its not highlighting it though
There’s a comma missing at the end of the message line
yeah idk why it complains either
OOOH
omg yeah makes sense
i didnt notice that, good spot
now the question where tf do i put them cuz i got no idea how this works
put what where raisedcateyebrow
the commas everywhere
commas go at the end of lines, if you have more then one thing in a table - they do not go at the end of anything like then/end/else
essentially used to denote a new line
If I want to add something before a specific bit of code via Lovely patching, position = "before"?
Yes
now its this
..is the comma here:
message = localize{type = "variable", key = "a_mult", vars = {card.ability.extra.mult}}, <-
yes
only mod installed is cryptid. checked the engine file and there is an end for the funtion
Errors with developing mods, yes. For installing, modding chat is where to go
ah
Hello all, Im wanting to get into modding Balatro. I am a software dev with decent experience (have modded slay the spire) but have not yet touched lua or love2D. any suggestions on how to get started with modding Balatro, any online tutorials or templates to get me started? im bursting at the seams with ideas!
https://github.com/Steamopollys/Steamodded/tree/main/example_mods/Mods + https://github.com/Steamopollys/Steamodded/wiki
Thanks 🙂
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2'"
position = "before"
payload = "extra.customsfx or "
match_indent = true
doesn't end up in the dumped files. Just want to add an extra key to allow custom sounds to be defined too without overwriting Talisman's own patch to the field to sound = extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2' or 'generic1'
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "sound = extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2' or 'generic1'"
position = "at"
payload = '''sound = extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2' or extra.Xchip_mod and 'talisman_xchip' or extra.Echip_mod and 'talisman_echip' or extra.Emult_mod and 'talisman_emult' or extra.EEchip_mod and 'talisman_eechip' or extra.EEmult_mod and 'talisman_eemult' or (extra.EEEchip_mod or extra.hyperchip_mod) and 'talisman_eeechip' or (extra.EEEmult_mod or extra.hypermult_mod) and 'talisman_eeemult' or 'generic1'
'''
match_indent = true
Ewwww
Just patch after it
sound = extra.sound or sound
Might be better to target the line below it if that’s unique
elseif eval_type == 'extra' or eval_type == 'jokers' then
sound = extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2' or extra.Xchip_mod and 'talisman_xchip' or extra.Echip_mod and 'talisman_echip' or extra.Emult_mod and 'talisman_emult' or extra.EEchip_mod and 'talisman_eechip' or extra.EEmult_mod and 'talisman_eemult' or (extra.EEEchip_mod or extra.hyperchip_mod) and 'talisman_eeechip' or (extra.EEEmult_mod or extra.hypermult_mod) and 'talisman_eeemult' or 'generic1'
if extra.edition then
colour = G.C.DARK_EDITION
end
...
The dump shows such, what do I do for pattern then?
if extra.edition
No changes noticed either... did I set up the .toml file wrong entirely?
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if extra.edition"
position = "before"
payload = "sound = extra.sound or sound"
Also, Pattern 'if extra.edition' on target 'functions/common_events.lua' resulted in no matches
Oh sorry I missed the then
The priority value for such patches is similiar to how Steamodded treats mod priority?
Yes, but targeting the line below it means your priority doesn’t matter
Fair enough.
@wintry solar what going to sleep can actually accomplish
not sure why there's a second card in-between the seams
replace_base_card iirc
I think it’s a property on the card itself you can set
this is the proof-of-concept texture for it
although while trying to find out how to tile with a shader, I did find a cool space shader
it would be funny if I used the space shader instead lol
How would I go about checking what the enhancements of the cards in cards_destroyed were?
Oh true Canio would do that wouldn't it
how does talisman's xchips actually work
i've tried replacing mult with chips and using the same methods as xmult only for it to simply
not trigger
neither x_chips or xchip_mod did anything and I know I have talisman installed
im pretty sure you'd have to do Xchip_mod with talisman
i did that but it didn't do anything
Did you have the capital x?
is it fucking case sensitive
Yes
Check what it should be in state events
okay
I imagine talisman copies thunks godawful decision to change what the expected keys are depending on the contexts
...
if effects.Emult_mod then mult = mod_mult(mult^effects.Emult_mod);extras.mult = true end
if effects.EEmult_mod then mult = mod_mult(mult:arrow(2, effects.EEmult_mod));extras.mult = true end
if effects.EEEmult_mod then mult = mod_mult(mult:arrow(3, effects.EEEmult_mod));extras.mult = true end
if effects.hypermult_mod and type(effects.hypermult_mod) == 'table' then mult = mod_mult(mult:arrow(effects.hypermult_mod[1], effects.hypermult_mod[2]));extras.mult = true end
if effects.Xchip_mod then hand_chips = mod_chips(hand_chips*effects.Xchip_mod);extras.hand_chips = true end
if effects.Echip_mod then hand_chips = mod_chips(hand_chips^effects.Echip_mod);extras.hand_chips = true end
if effects.EEchip_mod then hand_chips = mod_chips(hand_chips:arrow(2, effects.EEchip_mod));extras.hand_chips = true end
if effects.EEEchip_mod then hand_chips = mod_chips(hand_chips:arrow(3, effects.EEEchip_mod));extras.hand_chips = true end
if effects.hyperchip_mod and type(effects.hyperchip_mod) == 'table' then hand_chips = mod_chips(hand_chips:arrow(effects.hyperchip_mod[1], effect.hyperchip_mod[2]));extras.hand_chips = true end
...
Is this on Jokers or playing cards?
playing card
An enhancement?
a seal
Unfortunately, the extra operations don't appear to be added for playing cards.
why
They currently have their own calculation pathway
Remnant of apis being built at different times and thunk being thunk
You can just do chips = hand_chips
Though I don’t remember if that supports a custom message right now
-# (It will do soon)
can I at least still display the xchips message
i don't really need a custom message i just need the xchips message
That’s what I mean
oh
Because that’s not the normal chips message
it's the same but it plays the holographic sound
at least it is for the mosaic edition
Editions play the same sound iirc.
Like I said, editions are different
oh right
yeah.
Is there any way for me to check if the scored hand contained cards with a certain enchancement? (glass for example)
i just realized something, I forgot about the docs for SMODS.Keybind
Iterate through the hand, don't be a me.
i did it with v.config.center == G.P_CENTERS.m_steel where v is the referenced card
(for a steel card)
card.config.center_key == ‘m_glass’
is this method okay by the way
should I switch to key check
That method should also be fine
perfect, thanks. I appreciate the help y'all are offering cuz I'm finding the wiki a lil tough to navigate
oh i have barely touched the wiki
if you wanna figure out how to do something go find something that has a similar function
mult n chips from sdm0's checks for enhancements, so i'd look there
or marble joker
okay but i don't like marble joker
stone cards can be checked through their ID, its what i did
oh god
my info_queue isn't showing the actual text i defined, just the label?
i wouldnt recommend it, but its what i did
In that case, what's the check for any enhancement on a card?
check if the center exists
this is the definition, it shows "angel pool" but not the text
?
or check if the center is not equal to empty/default
i'd assume
vampire has this
- loc_vars
loc_vars = function(self, info_queue, center)
info_queue[#info_queue + 1] = { set = "JokerPools", key = "wrenbind_angelpool" }
return {vars = {}}
end,
go look at vampire
card.ability.set == 'Enhanced' checks for any enhancement
card.config.center_key == ‘m_glass’ or card.config.center_key == ‘m_stone’ or card.config.center_key == ‘m_lucky’ or card.config.center_key == ‘m_steel’, clearly
there might be a new smods util though
thoughts on making keybinds no longer make you specify a key? it's not really needed and can just default to its registered position to keep things unique
or mult or bonus
time to account for modded enhancements
mimimiimm
sounds good, cant see anything wrong weith it
i can't figure out why this isn't working
i'm looking through, genuinely no idea what's wrong with it
did something change...?
what is JokerPools
it's the key
shouldn't they have square brackets?
if next(SMODS.get_enhancements(card)) then is technically the more correct version with quantum enhancements as this will count base cards that have enhancements from other sources
my localizations have sqaure brackets though
keep in mind, the label DOES actually show up
i'll try this i guess?
i doubt though
and I got info queue to work with it
the thing is
it DOES have the information
it just doesn't have the um
text
lmfao
i'll add square brackets but i highly doubt that's what it is if it got the angel pool text
sometimes it is just something stupid like that idk
does it need specific_vars?
whar vars?
i literally copied this 1:1 from cryptid btw, i was basing this off of the food_jokers thing
that might be the issue
why?
your implementation could exclude something that was included in cryptid that you don't have
i had that issue too when
borrowing
code from cryptid
iunno
where's your JokerPools bit?
it's in descriptions
i'm literally looking at the base game right now
it's the same thing
i could try Other like cryptid i guess?
is it in a localization file
yes
and is it set to the right language
okay
speaking of util, I was looking at the enhancement calc PR, and I think with quantum enhancements we need to take that into account for Card:calculate_enhancement? might need more logic for handling multiple effects
i changed it to be "other"
everyone says that and then you miss a comma or misplace an end or a bracket and become stupid
that's how coding works
that's the spirit
eventually it will work
and then you will do something else and it will stop working
and then you won't be able to get it working again
I think it takes into account quantum enhancements? they just set the card to the other enhancements, call eval_card and set it back
hold on what
I dunno though, I don't have any quantum enhancement stuff set up to test with
it was the square brackets that crashed it lol
the fuck is a quantum enhancement
Basically jokers (and anything else if you hook the right functions) can allow enhancements to behave as other enhancements
On top of their actual one
it only calls calculate through to the base center from what I can tell
how do I do it
Is this a normal thing for invisible joker? Copied the right card and works as intended but the sprite is obviously wrong
oh
a 2x sprite placed in 1x sprite sheet
i missed a patch smh
did I?
incredible
I think 1 is whatever the card is, and 2 is the quantum enhancements, no?
i'm just confused
oh it's a massive sprite
it's just the top corner of the sprite yeah uh
Yeah
that doesn't look right.
Have a joker check for check_enhancement context and return the keys to the enhancements (such as return { 'm_steel' = true }) (I think)
yeah i did miss the patch. that just seems really jank
but how do I make it only do it to a certain enhancement
if it works idc
quantum enhancements seem really jank to me
that makes sense
i'm even more confused, I don't see this anywhere in the PR?
that's in state_events
nice
I'm probably being stupid but how do I localize text like this? I'm trying to have the description change based on whether the joker is activated or not.
if card.ability.extra.active then
return { vars = { localize{key='balscr1_activated_desc',vars={card.ability.extra.b_cost}}, '' } }
else
return { vars = { localize{key='balscr1_unactivated_desc_1',vars={card.ability.extra.b_cost}}, localize{key='balscr1_unactivated_desc_2',vars={card.ability.extra.max_cost}} } }
end
end```
This is just causing the description to show up with "nil"s
there is a bug with quantum enhancements btw that I’m going to fix today
My code that prevents editions and seals from scoring multiple times doesn’t work and I think I know why
I move the edition and seal scoring to the end correctly but I don’t prevent those effects from applying again when the quantum stuff happens
how do you make your custom info_queue variables appear on the right side of the card instead of the left?
steamodded takes control of that depending on where the card is on the screen
this is hella clunky
goddammit
I don't think the game supports splitting them up anyway
put them at the start of the table instead of the end
ohhh
ur so smart
thanks
weird tho, if i changed if i defined it as like a tag or something would it show up on the right?
oh lmfao that didn't work
sigh
the first thing, i mean
it just moved them to the back anwyay lmfao
oh i see
it's literally based on where it is
that's funny lol
@frosty dock oh I added the keep_on_use in boosters packs in that PR too
yeah i've seen
it could maybe do with a space check though
why did you make the item description inside info_queue???
why not just make it the description
i wanted to do it this specific way
it's alr
i caved and went with that anyway lol
ugh I'm so close. This happens when playing a hand
Actually this happens when playing a hand that doesn't shatter a card
context.glass_shattered isn't a thing
According to Canio code it is 
wtf
lmao
that code doesn't do anything 
bruh lmao
the canio calc code is in context.remove_playing_cards
god i love how insane the source code is
you can trell is a personal project, and i love it for it
I'm assuming it used to calculate glass cards and normal cards seperately
wild
https://discord.com/channels/1116389027176787968/1247703015222149120 this is a list of all the contexts in vanilla fyi
it's sort of like the calculation guide without all the fancy explanations
legend
https://github.com/Steamopollys/Steamodded/issues/336 looking at this rn
what do we think of having a formatter set up as a workflow?
or should we just provide config and tell people to use it
will it make UI code look like absolute shit?
Probably but I can at least test
haven't tried, but we could exclude it (bad)
:jimbo_spin:
personally though, I don't see the need
we have some inconsistency with indentation
I'd prefer it being consistent but maybe we don't need a full style guide
now we have docs completed too most people shouldn't need to look under the hood
yeah thats fair
My big worry is that it'll make working on UI a hellscape.
Especially since there's still more UI work to do
would it also mess with things like SMODS.create_card that take tables as args?
I guess it depends on the formatter, right?
Like it'll make finding depth errors faster but I can barely even see the entire return if I save this file with StyLua enabled.
It'll prob split up the return to separate lines (like how the Cryptid formatter does).
🤮 it doesn't even apply itself to everything here anyway
yeah that looks bad
I haven't touched the actual settings so I can prob configure a fix but I don't even have it enabled lmfao
don't mind me bumping up my lines count
Oh yeah the line counts get MASSIVE
why are lobcorps' jokers split into different files 😭
guess all my initial edition api work really cranked my line count
because 9000 lines file is a nightmare to navigate
I've somehow removed more lines than I've added (i swear i don't just shuffle things around)
guys how would i have brainstorm search for a specific joker (v1.1.0 not latest)
splitting every joker into a different file is worse....
atleast group them a little bit
nay
individual files is remarkably easier to navigate
dang

no
rip git blame
like i have a boss blind and a joker that are the same name, and a few universally used functions that uses one of them
i guess this is because the initial 1.0 refactor removed a ton of boilerplate
each file needs to have at most 40 lines of code
you guys blame everything on me anyways
So true
I love writing some of the API and when people have problems with it you get mentioned anyways
the fault lies with you, aure....
lmao
it's your fault that people can make mods 🤗
I think it's much more trendy to blame floweey
why bother reading docs when I can just ask aure directly
download this balatro binary and replace your current one to play cryptid
nexusmaxxed
Steamodded has been my fault since like 0.7.2
why bother learning when i can just bother people for help
help me pls
PLEASE
I'll help you meth /leavechannel
user has left your channel
here in the 98% civilization, you can either do a 1 block jump for the installation guide or a 1 block vertical jump for an api documentation
I'm going to make small changes to how patches are applied and blame it on you
98% of Balatro players can't do math either
*101%
98% will jump into the void
im going to change all your Xmult to xmult
can we string.lower that
well guess what that doesn't effect me at all
I don't make mods so you can't get me like that
uhh
i'll take your thunderstore
I wonder if it's worth breaking almost every mod to standardise calulation returns to chips mult xmult etc. instead of chip_mod h_mult Xmultmodetc.
oh and every vanilla item too I guess
I love him
i'd say yes but in the same vein i honestly prefer _mod
agreed
but you'd just use context.cardarea == G.hand and return mult
always worth it imho
also, what the fuck is p_
especially while smods is in alpha
do you ever actually need unsafe or do you just use it to be safe
I guess we can add them without removing the old ones
then it wouldn't break everything
let me go check what unsafe even does
you have to become what you hate, essentially
unsafe lets you do funky pointer ops
smods stable beta when
Idk what rust users smoke to make any jokes about their code
I think that's one of the big misunderstandings people have with calculations along with contexts
hopium
you know I'm all for breaking mods
thank you john meth
Extremely soon trust
I'm not as sure about that invasive of a change to vanilla code
I mean if we just add the missing ones in to the evaluation we don't need to touch vanilla jokers
smods beta will come out and I'll release a lovely build that reverses priority order
it's not a breaking change then :sad:
oh god the last time someone called me mystie is autumn
how about we check if it's a vanilla item and only hit those original ones for those 🙃
Damn no force death for 0.9.8 mods
the joke's on you, smods patches don't use priority yet
then it is a breaking change
what if smods switched around chips and mult, i see no issues from this
what if i take ownership of it for the sprites and that breaks it
makes sense
I'm fine with adding it non-breakingly
so if you wanted to say use memory that you havent manually set when you allocate it, youd need to use unsafe?
yeah, we mainly use it because we need to call native lua runtime functions and it's easier to just cast pointers around
yeah
oh that reminds me, can the silent part of take ownership not apply obj.mod to the obj?
(not that youd ever want to do this right
no no, i would
the most important thing is unsafe lets use use pointers that came from outside of rustland
that makes sense
I assumed it lets you do stuff without the compiler yelling at you for not writing "safe" code
yeah
AKA tells compiler to shush
theres no way to do that without unsafe?
yeah it should
yes, but I'm lazy
there are lots of ways that you can obtain temporary ownership over external pointers
but you can also cowboy it and just use unsafe
so the reason is that you cant guarantee that the pointers wont be asynchronously changed
is that
correct
pretty much. you're still beholden to most of rust's rules though
one of the reasons - unsafe pointers aren't thread safe, might not be aligned, might not be allocated, and can become deallocated at any point
there's nothing stopping the lua runtime from invalidating one of the pointers its given lovely, and if so lovely won't know that it's been deallocated
unsafe makes the annoying things like casting a *const i32 to a function pointer more simple
but also incredibly unsafe at the same time
i dont understand why you would want to do this? tostring reasons?
but can you not just print that and format it as an integer anyways
it's useful any time you're given a raw pointer (like a FARPROC in Win32) and you want to cast it to a rust function pointer
oh ya
basically this
that code is hilariously bad tbh
std::mem::transmute is extremely unsafe as it lets you cast between any type as long as the alignment is the same
(and that the type is the same size)
https://github.com/Steamopollys/Steamodded/issues/356 trying to iron this out and not entirely sure what to do with it
the sound manager gets reset sound data for modded sounds on injection
i can't exactly sync the new to the old because it wasn't playing before
i guess there's no real need to re-inject except for per-language options
i can "fix" the issue by stopping the pre-existing sound, but to keep it running and not start a new one is the expected behavior
anyone know
i think it's fine to not resend the sound data and just keep the old one if it's loading the same file. if it's loading a different file because of languages, it's fine to just resart and kill the old source
I almost have this joker working but this keeps getting tripped. I've tried checking if context.removed is nil but it just stops working altogether when I do
-- Check for shattered glass
local shattered = false
for k, val in ipairs(context.removed) do
if val.shattered then
card.ability.extra.Xmult = 0
shattered = true
end
if shattered then
G.E_MANAGER:add_event(Event({
trigger = 'after',
func = function()
play_sound('tarot2')
card:juice_up(0.3, 0.4)
return true; end
}))
return {
message = 'Errrrmmm...',
colour = G.C.RED
}
end
end
okay wtf, i was testing this with lobcorp soundtrack and it still restarted the music
turns out this is because there is one frame where the state is specifically -1
neat
Builderman when
curse gaming here we go
those cards are literally sick lol
Man yall got some sick ass pixel art while I'm here struggling like hell
ok so I realized that some of my refreshments are also incompatible with Cryptid, causing a crash similar to one before
this requires a lovely patch made by a friend of mine and that may be related idk, but its worth noting that I indeed have card = card
actually maybe I should text if having card = card before any if statements work
btw, the card is not in use during the crash
absolutely not
Thoughts on this for T. blue?
Unused hands/discards are carried over into the next round.
The amount that a given round overscores is added to every subsequent blind.
The base score for each blind doubles per multiple of 5 hands, starting at 10. (If I have 15 hands, then the
score for every blind is 4x larger, without the overshoot bonus.
I finally have him working 
i beat cryptid to having my own website for my mod lmfao
m
m
m
m
guys
how to do switch devices for immolate
if i cant even do list devices to check
im sure my gpu can do opengl but it still complains about doubles
I just came across card.getting_sliced in source and I am so confused as to what that's even for lmao
Sacrificial Dagger
if you used safe we wouldn't have to worry about anti-virus stuff smh my head
wait is tags having a nope a known thing?
they also have a method to just remove them fron the game?
oh nvm it's just remove them from the savre
iirc in early builds tags only had a 1 in X chance of activating
but everyone disliked that, so thunk removed it
that sounds annoying
oh, so the "nope" on the gambler's tag in cryptid is an existing in-game feature? that's pretty interesting
i thought they had to add that
How would you guys go about checking the edition of a card? I've been trying with this and I'm getting this error
that table will be empty if the joker doesn't have an edition. You can check that it exists with somehting like
G.jokers.cards[i].edition and G.jokers.cards[i].edition.negative
Ah I see
with steamodded presenet you can also use joker.edition.key
this is nessicary for modded edittions irrc
That did it. Thank you so much. I was struggling hard with that lol
Now if only I could get the messages to pop up reliably. thank goodness that's not a game-breaking thing
Not entirely sure what I did but I somehow got my save to be frozen
doesn't resepond to anything but esc
Mod list (probably will crash without cryptid) ```
Additional Context:
Balatro Version: 1.0.1m-FULL
Modded Version: 1.0.0~ALPHA-1222a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0
Steamodded Mods:
1: Card Sleeves by LarsWijn [ID: CardSleeves, Priority: -1, Version: 1.4.5, Uses Lovely]
2: Galdur by Eremel_ [ID: galdur, Priority: -10000, Version: 1.1.4, Uses Lovely]
3: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.0.1, Uses Lovely]
Break Infinity: omeganum
4: the peak mod by Mysthaps [ID: THE_MOD_THAT_SWITCHES_THE_PLAY_AND_THE_QUIT_BUTTONS_IN_THE_MAIN_MENU_SO_THAT_EVERYONE_WILL_PRESS_THE_QUIT_BUTTON_ON_ACCIDENT]
5: JokerDisplay by nh6574 [ID: JokerDisplay, Priority: -100000, Version: 1.7.1.1]
6: Crashing by WilsontheWolf [ID: Crashing, Version: 2.0]
version: 2.0
Note: User pressed [
7: JamMod by WilsontheWolf [ID: JamMod, Uses Lovely]
8: Faces of Sin by TiltedHat, Victin [ID: fos, Version: 1.0.0]
9: Metal Pipe Crashing Noise by WilsontheWolf [ID: PipeCrash, Version: 1.0, Uses Lovely]
10: Too Many Jokers by cg [ID: toomanyjokers, Priority: 1000000]
11: Cryptid by MathIsFun_, Cryptid and Balatro Discords [ID: Cryptid, Priority: 1e+299, Version: 0.5.2~1115a, Uses Lovely]
12: gamblecore by arachnei [ID: arachnei_gamblecore]
13: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.2.0~dev, Uses Lovely]
Lovely Mods:
1: yosbr-balatro
2: crashhandler
3: SteamTesting
4: ScoreImprovements
where exactly does one obtain "Crashing" and the mod that switches the play and the quit buttons in the main menu so that everyone will press the quit button on accident
they probably don't matter for replication but https://github.com/WilsontheWolf/balatro-mods/tree/master/steamodded/Crashing and #1240989654371663912 message
This guy finally works 
seems like my controller.locked is true
it seems to have some kind of lock.0
Can Lovely patches have blocks of additional code to inject instead of one line?
Perfect.
well tecnically it's just '''stuff here''' but it looks better with nelines
This might actually be a cryptid bug
oh yeah it is with the jolly tag
let me see if it was fixed
:jimball:
Cookie
does it reduce all the way to 0 or just to 1/10?
Assuming the idea for it is to become debuffed or get automatically removed when giving last tarot card at 1/10 chance.
Yeah once it hits zero it self destructs
I made it extra evil to where it wastes a chance if your consumables are full
Is there a reiable way to detect when a card is properly copied (and not some other weird effect going on)
rn I'm using add_to_deck and checking for from_debuff
but I'm worried about other more elaberat things behaving weirdly with that
well i tested double sided from cryptid and it works fine
idk if anything will break it
Oh I almost forgot to mention, it works with Oops lol (older screenshot with placeholder and inaccurate description)
It would probably make sense to reduce by the probability amount too
the 20/10 is intentional because funny
Good synergy for 5 guaranteed Tarots a hand 
The reduction does go down by 2 instead of 1 with Oops btw, that's what I meant by inaccurate description. I've since changed it so it displays right
guh....
v_bunc_disguise
v_bunc_disguise
nice ui
don't you just love t.nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes
😭
holy shit
table.insert(t.nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes, {} PLEASE
i FUCKING BEG
NEVER.
soz
context.other_card.card_effects isn't it... how do I check for card effects that trigger in hand?
god i want to finish this but i have to do ui
ughhhhhhhhhhhh
okay nope its getting shelved back to lobcorp dev LMAO
average balatro mod dev experience
Do I need to manually check for if a card held in hand has an effect before attempting to retrigger it like Mime?
how can i put color in the loc text when i edit it with loc_vars?
if G.GAME and G.GAME.last_blind and G.GAME.last_blind.boss then
return { vars = { "Currently {C:money}"..card.ability.extra.money.."${C:inactive}" } }
end
return { vars = { "Inactive" } }
how can i do that?
create the entry in your localization file and pass the key as key field in loc_vars
@wintry solar was it you who had this kind of issue before?
misaligned atlas, most likely
animated cards need to go in a separate file to my knowledge
This isn't animated
This is a shader that copies the original image
Is it possible to check what's currently in the event queue?
Maybe? Why do you think that's relevant?
oh, sorry, no, it wasn't related to your question
maybe we need a separate help forum
that'd be great actually
I thought this was the help forum
this is just a channel/chat, not a forum
unlike #1209506514763522108, which is a forum



