#đ»ă»modding-dev
1 messages · Page 43 of 1
mostly on the handling of different types of logs
follow up of a chat we had last night
I like it
Me only using print 
well I don't in debug plus cause the console doesn't like when I do
I honestly didn't think print would work, so I've only been using the debug option
don't know why I thought that
I mean debug plus doesn't depend on steamodded so I can't use it's logging stuff
oh also I forgor to add a info message example
Btw, DebugPlus is great. I love being able to see my print statements without having to tab out to the console
anyways I was thinking I might merge trace and debug, and fatal and error
thanks
okay how's this?
this is really bad practice. overwriting a function completely like this will ruin mod compatibility. use hooking if possible, and a patch otherwise
this was very temporary dw
ok
Yeah that looks pretty good.
how do hooks work?
this is a simple example
basically you override a function, then run the function as it was before within the override
that way you can tack whatever you want before or after the function happens
also you have to return the old return values if the function returns something in its unmodified form
(it's sometimes also called function wrapping)
the reason you do this instead of just copy pasting the function when you override is so that other mods can wrap the same function
Which of the 2 is generally considered better practice btw, hooking/wrapping, or lovely patching? Assuming both are non-overwriting.
cool
thanks
It depends, if you need it to occur in the middle of the function or itâs cleaner to occur in the middle then lovely patching is better.
If you can get away with hooking the function, then hooking would be better.
Yeah, that was my thought too. Hooking is probably preferred, but there are cases where lovely patching is better.
What do you think of the following Boss Blinds (not Showdown):
- Hearts and Clubs are debuffed.
- Forces 1 card to always be selected.
- Forces 1 Face card to always be selected.
- (Showdown) [Most common Suit] are debuffed
2 is already a showdown boss blind tho
So is The Wall and Violet Vessel
vv is larger
But both are big
I could make Cerulean Bell 2 cards
Although I didnât want to rebalance vanilla
I presume these are harder than the vanilla game's bosses on purpose?
maybe like if you discard it will force 1 card to be selected
I donât think Cerulean Bell is that big of a deal as a normal Boss
I think it would be fun
using discard forces 1 card to be selected
I donât think that effect makes sense mechanically
I only added 3 because I expected people to complain about 2
đ€Ł
Not opposite because Aces. But Iâd probably only do 2 or 3 not both
boss 1 might be a bit harsh if it comes early, and boss 2 can be a pain depending on the hands the player goes for
cards in my area aren't saved đ€ they disappear after loading a game. How to fix
the problem with this for mine, is that i needed to actually edit the code rather than just calling the old function
i tried to wrap it, but didnt have any luck
I think you need to add your CardArea to the part of the game where they save CardAreas
If you canât prepped or append, you can inject with lovely
thats when you lovely patch
meant to reply w/ that last msg oopsie
ah gotcha, haven't ever messed with lovely so no clue how that works
The idea was for them to come up later anyways
theres plenty of mods that use lovely, you can study 'em
it seems that cardareas in G are automatically saved
Is your card area stored in G?
yes
Maybe CardArea:save() does not know how to serialize your abilities
Not at pc to check how it works tho
Or maybe the area is serialized, but isn't deserialized (or fails to)
CardArea:save() basically saves its own config, and calls :save() on each of its cards.
Might break if :save() is not properly implemented on a possibly custom card object?
didnt mean to tag you btw, my bad
2 questions
Ye that's what I meant kinda, or it doesn't deserialize properly
I don't care about pings, actually prefer them most of the times
do these look to jokery and which is the best looking one (excluding blue and red because that art wasn't made by me
I like the juicebox and glass drink, mostly because they look the most 3d-ish
where is the load save function đ€ i can't find it
You mean CardArea's? It's in the cardarea.lua file
but if that's what you're asking I feel like I'm missing something
Check where it's being called from
Oh that logic is pretty confusing, I didn't look too much into it with how load_ in G is handled
Well actually I think it makes sense, like the serialized data is stored to load after CardArea is added
it seems that about 800 lines later all the load_ stuff gets handled individually (e.g. if G.load_shop_jokers then )
but there might be some dynamic stuff I'm missing too
Ohh right, that error always pops up when you load save while in shop
So maybe you'd need to add something similar
oh i know
loading G.betmma_abilities happens in Game_start_run_ref so my code overrides loaded cardareađ€
i think you just have to call the ref later
sounds like you just need to instantiate before calling the ref yeah
instead of after
đ€Ș
đ
what's that ability?
ok
Glitched seed is kinda confusing for non modding people
Makes sense
is GIL a python reference or just generic programming
Cool concept tho
next 3 random effects always pick the first option / yes
GIL is a python thing iirc
yes
when you open a pack pseudorandom is called a few times but if return values of these calls are set to 0 nothing special happens
for lucky cards and glass cards the effect is huge
gonna try make a "Solitare" themed joker, which when you discard your first single card, if its the next card in the straight (A-K), it'll just destroy it. Then it just spits out a new deck with a huge mult on it.
when you finish your deck*
another joker i programmed in just earlier too
im very proud of the art haha
...flush pair of aces????
pair of aces with the same suit
art is nice! the card ability is gibberish to me though đ
like Oops! All 6s, but instead of doubling all odds, it multiplies all of them by its value
so you can end up with always active Lucky Cards
but always breaking Glass Cards
i thought about just halving the odds, but didn't like it ig
ahhhh, so OA6s but with variable luck changes instead of just 2x
should the background change based of the potions color scheme
or keep the background like this
color scheme should probably be consistent (like all other consumables I believe, which I'm assuming potions are?)
yeah this is the preferred wording i think
Flush Pair makes sense no?
i'd assume "flush pair of aces" means hand contains a pair of Aces that also makes a flush
oh
only if flush pair is implemented properly as a poker hand, otherwise I wouldn't do that
fair enough
would you be interested in any other feedback?
sure
feels like the text is quite long yet still doesn't describe the joker's base effect very explicitly
could you do something similar to DNA?
yeah formatting is kinda tricky, thats a good example for it actually
you could start with something like this
If first hand of round is a pair of same-suited aces increase all odds by 0.05
maybe then you'll also have space to spare to describe Snake Eyes!'s probability multiplier effect more
like? the fonts?
ye
very wordy đ
đŹ
If you're looking for like tarot fonts it's in the modding thread somewhere
if it helps make sense, im a Magic: the Gathering player lmao
also a silly little deck
yeah, not sure what to do about the wordiness, might not be helped with such a complicated effect đŹ
that ability is a tad too complex
its fun tho
i guess it's fine but -1 consumable slot? why?
Is there a function already built into Balatro that is called whenever a pack is opened? I tried checking for pack_open and the only thing I found is context.open_booster, which I think is only used for Hallucination
tldr; just trying to see if there is a vanilla way to open a booster without writing a new function for it
spawning and then opening
check under tags
idk, needed some kind of downside
i really don't think this needed a downside tbh
really? okay
it just seems like worse than nebula deck
i feel like 5 extra aces or 5 extra kings is pretty strong...
it probably is since you can go for early 5oaks/full houses but i don't think it's that strong
ty gamer đ I think I found what I needed
Try using balatro black instead of pure black
How about:
Hearts and Clubs are drawn face-down
?
The art is very nice. The description is grokkable albeit it breaks the standards of the game
I wouldnât say âsame-suitedâ but âwith the same suitâ. Also, Iâd use the green probability color for the â5%â and âX1â. Finally, you should decide between â5%â and â100%â or âX1.05â and âX1â, but not both.
By the way, I imagine this kind of effect doesnât work with O!A6s and other modded probability changing mods
Based on the number of MTG custom cards Iâve seen, most players canât get the wording right even if itâs one of the most consistent games in regards to wording
By the way, I imagine this kind of effect doesnât work with O!A6s and other modded probability changing mods
I'm just wondering, why wouldn't it?
isn't it just oa6s with a variable instead of 2?
oh i meant this in the sense of making convoluted effects ahaha
Does anyone know where I can see how vanilla objects are being registered in steamodded?
cuz there's an issue with seal spectrals
What happens when you sell O!A6s?
they don't show tooltips for seals with steamodded
yeah the 5% was last minute and forgot to fix it.
and it does work with the probabilities being changed, as i technically save the base of it as the card is created, and uses the bases to multiply
it undoes the x2? I don't see your point
MTG also isnât very convoluted in the grand scheme of card games. But definitely more than Balatro
O!A6s directly multiplies the probabilities
which isnt an ideal design but would technically require a bit of a rewrite
Oh wait I forgot O!A6s was also multiplicative
If both are multiplicative it works
Itâs just additive and multiplicative effects that wonât mix well
when its bought it just multiplies the base probabilities
yeah they're both multiplicative
and when its sold it divides it
Some vanilla effects are only additive or only multiplicative
So you canât do the other without breaking or refactoring vanilla
And refactoring will break compatibility with other mods
(Breaking will break vanilla and other mods)
snake eyes actually originally multiplied all probabilities by 150% when i first designed it haha
so 1 in 3 became 3 in 6
you mean the implementation of take_ownership?
nevermind, I found the code that adds tooltips, kinda weird that they're not working as they clearly exist in the lua dump
IIRC 0.9.8 had tooltip issues
hm that's surely not supposed to happen
what is the issue ur getting?
why are you in modding-dev not anywhere else
ok I am certified blind
holy shit
how did I not see that line
should be a simple fix
actually no idea where that line comes from, definitely not steamodded
probably cryptid đ€
ya
Guess thatâs not a good place to inject it 
ye I made a PR with fix
have to wait until steamodded merges the tooltip fix for enhancements tho
I am taking a look at this. commenting on Github
You can use the vanilla method of inserting the whole Center as an element of info_queue
you mean like vanilla enhancements?
I just copied code for process_loc_text from seals, didn't give too much thought, it worked for my use case so I just left it as is
yes, I believe seals are special in that they're never actually stored in cards
they're weird
Is it like G. P_CENTERS['enhancement_key']
To access the tooltip
Or something along the lines
yeah
@mellow sable can you edit my PR then 
To cryptid
Can you make this also work for like jokers too
That way I donât have to do some weird workaround to make them localize properly
yep, Iâll change it when I get back on my computer
Try the vanilla method out directly
I will when I get a change
I know before what happened was the loc_vars didnât work
If i'm looping through the scoring_hand, is there a way to check if v is a stone card? Something like this:
for k, v in pairs(scoring_hand) do
if v:is_stone() then
end
end
I don't have access to context in this scope
You can check the name
Like the game does
But thereâs no built-in function AFAIK. Thunk just does it manually each time
even for the enhancements it doesn't quite work
although this might also be my fault
bit hard to say. localize() might need patching by Steamodded, if it relies on the center's name field? wild guess
if you can find the bug, that'd be great!
local eclipse = {
object_type = "Consumable",
set = "Tarot",
name = "cry-Eclipse",
key = "eclipse",
pos = {x=0,y=0},
config = {mod_conv = 'm_cry_echo', max_highlighted = 1, enhancement = {retriggers = 2, extra = 2}},
loc_txt = {
name = 'The Eclipse',
text = {
"Enhances {C:attention}#1#{} selected card",
"into an {C:attention}Echo Card"
}
},
atlas = "eclipse_atlas",
loc_vars = function(self, info_queue)
info_queue[#info_queue+1] = G.P_CENTERS.m_cry_echo
return {vars = {self.config.max_highlighted}}
end,
}
relevant code section
going to see if removing my info queue lovely patches fixes it

if the thing you put in info_queue needs vars, you need to specify them
ok but how
I'd imagine something along the lines of
info_queue[#info_queue+1] = { set = 'Enhanced', key = 'm_cry_echo', vars = G.P_CENTERS.m_cry_echo:loc_vars(info_queue).vars }
alr
Should this be an argument to localize?
going to try it out
Because Negative Consumables have an argument which is passed to localize I think
issue might have been just because of the set being wrong
Iâm not sure what the argument is for
actually it bypasses generate_ui and just goes through the default code for the Enhanced set which falls back to an empty table loc_vars
so it might actually need some more patching
yeah can't get past this even with a few different things
info_queue[#info_queue+1] = {
set = 'Enhanced',
key = 'm_cry_echo',
vars = { self.config.enhancement.retriggers, G.GAME.probabilities.normal, self.config.enhancement.extra }
}
tried this with vars and my own patch to get loc vars and ... nothing
https://github.com/Steamopollys/Steamodded/pull/173
might need to look back into something like this, stupxd was able to get it working with this PR
I do know that tooltips are sometimes really weird.
m
I have D6 Sides set up to create a 2nd version of their desc with Other as the set for displaying tooltips.
i'm making like a laughably simple mod that replaces a single joker texture, but i'm for whatever reason unable to get steamodded to actually see the mod and load it
the entire mod's code is just this
--- STEAMODDED HEADER
--- MOD_NAME: bornana
--- MOD_ID: bornana
--- MOD_AUTHOR: [mackwell, kat]
--- MOD DESCRIPTION: Replaces the Cavendish Joker sprite with a far cooler one.
----------------------------------------------
------------MOD CODE -------------------------
sendDebugMessage("Bornana!")
SMODS.Atlas(key = "Joker", path = "Jokers.png", px = 71, py = 95, prefix_config = {key = false})
----------------------------------------------
------------MOD CODE END----------------------
and this is my file structure
Folder should be named "assets" not "textures"
You should spot the error looking at the error message
oh right
there is no error
folder name is wrong
Oops sorry
also
the folder name is changed in my actual Balatro/Mods folder
still doesn't get loaded
oh didn't spot that actually
your syntax is off
the table passed to SMODS.Atlas needs to be in a table constructor (wrapped in {}, not ())
ah i am blind
I'm even more blind apparently
We all are
--- MOD DESCRIPTION:
IT SHOULD HAVE AN UNDERSCORE
needs to have an underscore instead of a space
man
there we go now im actually getting an error message
lmao
[string "--- STEAMODDED HEADER..."]:14: attempt to call field 'Atlas' (a nil value) Stack Traceback =============== (1) Lua local 'handler' at file 'main.lua:6002' Local variables: msg = string: "[string \"--- STEAMODDED HEADER...\"]:14: attempt to call field 'Atlas' (a nil value)"
i was pretty much copying general structure from https://github.com/Steamopollys/Steamodded/blob/main/example_mods/Mods/NegateTexturePack/NegateTexturePack.lua
so i'm going to assume that that example mod might be out of date?
m
actually that would be your steamodded installation being out of date
the main branch on github is the WIP/alpha 1.0 version of the loader
i installed through git and checked out 0.9.8
is that not the most recent release?
1.0 is a complete rewrite
example mods on the main branch are updated to it, breaking compatibility with 0.9.8
ah that would do it
you probably shouldn't start with 0.9.8 now since it's getting more outdated by the minute
so i should look at the 0.9.8 branch version of the example
oh
nevermind then i will just checkout the main branch
you'll end up updating anyways, it doesn't make a lot of sense to start making new mods on 0.9.8
Is there a way to look at the decompiled code post-injection?
Mods/lovely/dump
thanks, taking a look at a crash while my mod was disabled. might be a different mod's issue
YIPPEE
pog
anyways I need some good debug commands
probably commands to set basic values
money
ante
round
eval
Set rank of a card (can't remember if there's a rank change button)
I'll go ahead and play with it a little for D6 Jokers.
oh yeah I was going to make a change rank button but forgor
btw if you're going to do support for other mods to make commands may I suggest a shorthand matching the mod prefix that has to be typed out before the command (like "dsix echo text" instead of "echo text")? This would avoid making commands that have the same ID conflict with each other whilst also not requiring them to have a shorthand built into the command key itself.
yeah I alreayd got a id system
I've messed with minecraft servers before
it just chooses the first it finds that matches
Command to spawn or remove an item by id
Also can it print multiple lines? Pretty important for a command like "help"
It's as easy as that.
Free Plague Die spoilers for the fun of it 
||HELP||
Yeah. You can even type them with shift + enter
anyone know how i can skip a blind?
Like win it? There's a debug mode tab option for it
What do you mean skip a blind? Specify it
sorry i mean like
when you have the option to skip for a double tag or smth
is there a function to skip the blind that i can put in a mod?
like a custom/modded tag?
-- code recycled from: "functions/button_callbacks.lua#2711"
function skip_current_blind()
G.GAME.skips = (G.GAME.skips or 0) + 1
local skipped, skip_to = G.GAME.blind_on_deck or 'Small',
G.GAME.blind_on_deck == 'Small' and 'Big' or G.GAME.blind_on_deck == 'Big' and 'Boss' or 'Boss'
G.GAME.round_resets.blind_states[skipped] = 'Skipped'
G.GAME.round_resets.blind_states[skip_to] = 'Select'
G.GAME.blind_on_deck = skip_to
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
delay(0.3)
for i=1,#G.jokers.cards do
G.jokers.cards[i]:calculate_joker({skip_blind=true})
end
save_run()
for i=1,#G.GAME.tags do
G.GAME.tags[i]:apply_to_run({type='immediate'})
end
for i=1,#G.GAME.tags do
if G.GAME.tags[i]:apply_to_run({type='new_blind_choice'}) then break end
end
return true
end
}))
end
love the 'Boss' or 'Boss' in there ngl
đč
~~Hey, so I did some digging and found out that approach you suggested would only work if the tooltip doesn't use any game-specific values. ~~
Using P_CENTERS instance only works if the prototype has specific_vars, which doesnt even exist in vanilla prototypes, the game generates loc_vars dynamically in generate_card_ui (so stuff like probabilities is up to date), and then uses those as specific_vars
I'm not entirely sure if process_loc_text suggested by me is the easiest approach here tho, I'll do some thinking
managed to figure it out below
okay nevermind
so apparently even if you initialize empty specific_vars game would automatically update them already đ€
specific_vars is a parameter to generate_card_ui, not a property on the center proto
well, somehow
_c.specific_vars is never used, so of course it does nothing
if I dont add specific_vars and try to use prototype for tooltip the game would crash when hovering on the item
which is why I tried adding specific_vars to the prototype in the first place
but I guess I should've checked what exactly happens in the main.lua there
so just a null check there
oh well
very nice, although i feel like this needs some white (maybe white outline for the hands to make them pop?)
also stray pixels at the bottom oof
Very good suggestion
Also for coders how does one use the function create_card()
What are you creating?
I just wanna have this spectral create a specific card
I don't think I have a code example with me rn but check out the fool's code
Ty đ
i can send a ss of some code i have
its for a specific legendary joker tho so idk if its what you need
thanks
It's prolly good enough
Although
key = 'first_seal',
set = 'seal',
loc_txt = {
name = 'First Seal',
text = {
'Summon the first',
'of the 4 Horsemen,',
'{C:red}Conquest',
'{C:inactive}(Must have room)',
},
},
raw_atlas_key = 'Tarot',
cost = 0,
pos = {
x = 0,
y = 0,
},
unlocked = true,
discovered = true,
hidden = true,
soul_rate = 1,
soul_set = 'Spectral',
can_repeat_soul = false,
can_use = function(self, card)
if #G.jokers.cards + G.GAME.joker_buffer < G.jokers.config.card_limit then
return true
end
end,
use = function(self, card, area, copier)
local card = create_card('Joker', G.jokers, nil, nil, nil, nil, 'j_horsemen_conquest', nil)
card:add_to_deck()
G.jokers:emplace(card)
end,
}
local conquest = SMODS.Joker{
key = 'conquest',
loc_txt = {
name = 'Conquest',
text = {
'probably does something'
},
},
config = {},
rarity = 4,
pos = {
x = 0,
y = 0,
},
raw_atlas_key = 'Joker',
cost = 20,
unlocked = true,
discovered = false,
blueprint_compat = false,
eternal_compat = false,
perishable_compat = false,
in_pool = function(self)
return false
end
}```
not sure how to make it coloured
its mainly the can use and use in the top bit tho
are you spawning a joker?
No
tbh my code is kinda ass
and looking back i dont understand it fully lol
you might need your mod prefix before the 'wrath_cookie'
The key needs to be the actual key, so it needs both the mod and object prefix
can i call this from my mod or have i got to shove my own in my code?
prefix_c_wrath_cookie
Isnât it c_prefix_wrath_cookie?
i have no idea lol
I think the second to last argument can receive the key
Here's part of a Joker that creates Black Holes
guys ? how do i change required chip amount of a blind mid run in the blind choosing menu ?
What's the placeholder after c_black_hole?
Random generation seed. Usually the vanilla game uses the name of the card that created the effect to keep them different, and the current name of this Joker is a placeholder
Got it
It probably only matters in that it could influence another random generation if you used the same seed, but I think nil might be a valid input
I think changing the required amount is easy, but updating the onscreen text is a bit more complicated
Something like this should work
i have this code rn and i get an error at the first chips (i guess it's the first one)
just looks at line 232-233 the rest is the same
You are trying to access the actual Blind object which the game uses to create Blinds
Rather you want to change the variable stored in the game referring to the actual Blind's chips, or change something else so that value is changed when the Blind is created
Maybe G.GAME.blind doesn't exist while you're choosing Blinds, but outside of the UI update, I don't think there's much of a difference between doing it when you begin a Blind or before you choose it
this code will change it for every blind of the ante or just one ?
I also keep getting this
This was made to change the required Chips for the current Blind
I figured it out
messed a bit with my code (still doesn't work) and i though "f- it i'm just gonna ask what i want to do" and so what i want to do is a blind that makes every blinds of the ante requires 2x more chips
(including itself)
Hey this reminds me is there a way to change the base of a whole ante?
I think you can hook or inject somewhere where the Blind is set to change the required Chips as the Blind is created
Alternatively you could double the value of the Ante, which would naturally scale
Like I have a consumable in mind that decreases the base of this ante, but increases the base of next ante
I don't know exactly how the game handles it but there's a function to compute the Ante Base Chips value, you could hook or inject into it maybe
This is the source of all my crashes
I have everything else right
Nvm I got it
Where would I look to find the code for how The Soul uses two separate atlases?
I believe the card just has a property called soul_pos which let's you know
Steammodded supports it iirc
Okay so this doesn't crash but it also doesn't spawn the golden cookie
logic error
your else block is on the card limit check
So it'll spawn the golden cookie if there's no room
It works for the legendaries, but Soul does something special - I tried taking ownership, and setting a custom atlas with an pos and soul_pos, and it had pos as the background, soul_pos as a layer, and then the soul egg thing from the enhancements still on top, for 3 layers.
I never thought cookie clicker mod would go anywhere
Did I ever tell you all about the time I loaded steammodded using the settings file?
The hell?
Here's the soul after taking ownership with just some extra colors thrown on as an example, the yellow part is what the soul_pos loads. The soul egg thing is not on the custom atlas.
It uses shared_soul or something weird like that
Thanks, I'll try searching around the code for it.
looks pretty cool
the art is insane
did you do it?
I did everything except the actual cookie part of golden cookie
And I guess the hands in Fate is from michaelangelo but yeah
Hey is card:set_sticker a thing
You'd probably be able to find out by CTRL + F in the card.lua file
you have to add it to your own code
yeah i didnt realise it was a snippet of code at first
thanks
do you know if theres anyway to skip the a pack opening?
like the long ass animation when a booster pack opens
you could find the code for opening a pack and mess with it
see if you can maybe hook it
Do you think there's a way I can get this monkey brain strategy to work
are you overriding it??
i was testing a thing to auto reroll for specific legendaries and editions
and as a test i wanted to look for any legendary with foil
cos i thought that would be easiest
and i rolled past a negative perkeo
and like 5 polys and holos before i found 1 foil
Ah
do you have any idea if its possible to tell what legendaries and editions youre gonna get from the seeds
like brainstorm does
Definitely
I was the one who wrote the seed searcher and brainstorm autoreroll so I have some experience haha
oh damn
i knew you made immolate
didnt know you made the brainstorm reroll tho
im gonna have a look at it but i literally dont get any of it
which is why i went with the easier version
The long-term plan is to make an easy filter system that both Immolate and Brainstorm can use
But Iâve been doing a lot of other projects so havenât had much time for it yet
fair enough
i thought about adding a ui thing into what im doing
but its literally just built on top of brainstorm
so ill be the only one using it so i cba
cos i dont think i can share stuff that is mostly not mine
You can always contribute to Brainstorm and make a pull request with your additions
oh
i have so many checks cos otherwise the events go crazy
and i used events because if i did it without them it was too quick
yeah the way I do it doesnât even need a full game instance really
although I plan to refactor it to account for eg. Modded deck abilities that wouldnât quite work with how itâs a bit hardcoded
lol
the benefit of not hardcoding it is that becomes possible
And with the Immolate-linked filter system it would be as easy as just checking for âGatewayâ instead of âThe Soulâ
At least thatâs the plan
that would be super cool
My plan is to work on that after finishing Ankh (mod used for replays and security checking world record runs)
And then I also procrastinate by working on Cryptid
And I have other responsibilities too
ty
i dont even speedrun i just like having a timer
is there a way to make it continue into endless?
I plan to add that
For now the only workaround would be something scuffed like setting the category to 3 deck wins
But Iâll add a setting to have no category so the timer never splits or stops
Which is even more important since Iâm also expanding the scope more towards not just speedruns
But also things like long ante 39 world record runs
maybe one day ill make it that far
trance is also really good btw
i always use the simple blue
kinda because when i tried using my own colours it looked awful but the blue is really nice
ty
nws
nice
trying to reach ante 39
sorry
After an hour or two, maybe three at this point, of messing around with the code, I have concluded I am too dumb to figure out how the shared_soul sprite works, or at least, any way to work with it without crashing. If anyone can manage to replace the Soul's soul thing, please show me the code and maybe walk me through it if I'm not able to understand it.
- raw_key does not replace the soul, but it does still replace decks and enhancements.
- Taking ownership as a consumable and setting a custom soul_pos does not work.
- Attempting to take ownership of it as a back like Trans Spectrals doesn't work, and Trans Spectrals does not replace the soul thing either.
- Writing to G.shared_soul may work, but I have no idea how to make it read a different atlas without crashing.
If you're trying to show soul sprite on consumable, you kinda need to hardcode it with a lovely patch
in card.lua if you search for if self.ability.name == 'The Soul' and (self.config.center.discovered or self.bypass_discovery_center) then
you can see how the game handles it
I'll give it a shot later, I did attempt use a lovely patch, but I was trying to change the G.shared_soul atlas in game.lua, thanks.
below it you can see how soul_pos is used as well, maybe that will be more helpful
also if you want to see the code after steamodded applied itself, you should check Mods/lovely/dump and find the respective file there
also you can find an example of how Gateway is created in Cryptid mod
it has 3 total layers
but you can just remove 1
basically the same as soul, but instead of G.shared_soul it uses the child sprite
Ah, that. Did check out Gateway, but only the .Lua, not the .toml for it. Do recognize the code from soul, was kind of hoping I wouldn't have to mess with it, because anything with shaders simply haven't clicked for me at all, but I'll make another attempt.
Do you know off hand which function deals with setting children, by the way?
anyone know the exact score limit?
cool thank you
you can just search floating_sprite2 in the project
that's the easiest way to see where it's defined
Thanks for the help.
You're welcome
Are you just trying to modify soul or are you making a new card with a floating sprite?
I think allowing cards to have custom args for drawing their sprites would be pretty nice.
Donât think thatâs a thing Steamodded supports yet.
Or just custom handling of it
What sort of things are you thinking?
eventually there has to be two rows or even more for these dots
Is this deck selection? I have a reformat of it on my list of things to take a look at
ive done spriting and pixel art before, but those were mostly small scale for minecraft mods. im surprisingly pleased at how this one is turning out
wip but it looks like something for sure!!!
are the middle lines meant to curve like that?
i was tweaking up and around with that pathway for longer than id like to admit.....
im sure when the finer details get put in it'll look better though lol
Btw it's better to share art in #đšă»fan-art, this chat is mostly for source code discussion
got it thank you!!
Modify soul itself. Might be something to look into for the AltTextures that's in the works, actually.
With the talisman mod it goes up to 10^10^308
again, #âă»modding-general if you're sharing your runs
So, is there an easy way to double check if another mod is loaded
I think you can't really check it on startup reliably because other mod might load after yours
But after all mods are loaded you can probably use the same list that is displayed when you click mods in main menu
aha, SMODS.findModByID
Yes some mods had compatibility in 0.9.8
But youâll want to make sure your mod is loaded after by changing your priority
Itâs already supported in alt textures, but youâre looking to modify the centers atlas for now, unfortunately this will also affect enhancements and decks
Not sure how co-compatibility would work
update cryptid and steamodded then start new run
If you're saying right now, as in current main branch Steamodded Alpha, replacing centers using a raw_key = true atlas affects decks and enhancements, but does nothing to the floating soul sprite.
Also, replacing "Tarot" with raw_key only seems to modify Tarots, and after looking through the code, attempting to use what Palette does and replace "Spectral" and "Planet" with both raw_key = true and false, doesn't seem to replace anything. Still works by taking ownership, though.
Overall, though. if the current method is going to be depreciated soon, don't think there's a reason to bother to fix it, basically anything except the Soul with it's third sprite layer can be changed through Steamodded API, whether that's Atlas directly or taking ownership.
Huh, I would have thought centers would have changed it, as in the alt textures work Iâve done Iâve just made a new atlas for the soul specifically which can be changed live. Either way, I hope to have the new alt textures stuff released soon, so hopefully it wonât be much longer for you!
any idea on how to make the sticker and the color match the stake?
testing code to swap stakes around, rn the only code is iterating through G.P_CENTER_POOLS['Stake'][2] swapping it with [8] (so red and gold stake respectively) + manually fixing up the .shiny
Hey modders, I'll be on a trip for the next week or so, so I won't be around
Ping some other mods if you want stuff pinned in your modding threads
Thanks
~ 
trying to do lovely injection, but it seems im doing something wrong because my patch doesnt appear in the dump
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = 'G.GAME.stake > 1'
position = "at"
payload = 'G.P_CENTER_POOLS.["Stake"][G.GAME.stake].applied_stakes ~= {}'
match_indent = true``` lovely.toml at my mod's folder
it needs to be an entire line, otherwise you want to use regex patch
thank you
Maybe you can take ownership of the stakes to swap their order?
is there a way to disable consumables being moved to the center when they expire?
im currently investigating the code and tbh it seems like a lot of aspects related to vanilla stakes are still hardcoded
Is there a way to check for the current localization?
I guess I could just localize itâI'm returning
number > 1 and 's' or ''
as a localization variable
not the colors though, the color pool just has to be updated after i shuffle the stakes
Steamodded actually re-registers all of the stakes so take a look at that part of the code
ye i've taken a look at it
the "stakes" button in run info is hardcoded to show up only if its past stake #1
Stake numbers are defined dynamically though I think
I wrote stake api like two months ago lol
It might be possible if you take ownership of all the stakes to change the dependencies and how they load
the ui_definitions.lua seems to have a couple of hardcoded numbers (G.GAME.stake > 1 for stakes button, G.GAME.stake > 2 for "also applies" in the stakes menu)
Hmm that could still be an issue for modded stakes that donât apply any other stakes
Or it might just be blank
ye white stake past stake one is blank, red stake past stake 2 has "also applies" be blank
i've already written a lovely patch for the stakes button for my thing, but im still brainstorming the other one
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = 'G.GAME.stake > 1 and {'
position = "at"
payload = "#G.P_CENTER_POOLS['Stake'][G.GAME.stake].applied_stakes ~= 0 and {"
match_indent = true```
If you change the order that stakes register it might help?
but yeah ideally a patch like this should be merged in steamodded, since itâs possible to add a stake that doesnât depend on any other stakes
i can make a commit rn
Once itâs stable feel free to make a PR and I can review it
G.SETTINGS.language
I assume
Idk what's the value but probably en-us
why are the created cards not linked with the shop?
local epic_tag = {
object_type = "Tag",
atlas = "tag_cry",
pos = {x=3, y=0},
config = {type = 'store_joker_create'},
key = "epic",
loc_txt = {
name = "Epic Tag",
text = {
"Shop has a half-price",
"{C:cry_epic}Epic Joker"
}
},
apply = function(tag, context)
if context.type == 'store_joker_create' then
local rares_in_posession = {0}
for k, v in ipairs(G.jokers.cards) do
if v.config.center.rarity == "cry_epic" and not rares_in_posession[v.config.center.key] then
rares_in_posession[1] = rares_in_posession[1] + 1
rares_in_posession[v.config.center.key] = true
end
end
if #G.P_JOKER_RARITY_POOLS.cry_epic > rares_in_posession[1] then
local card = create_card('Joker', context.area, nil, 1, nil, nil, nil, 'cry_eta')
create_shop_card_ui(card, 'Joker', context.area)
card.states.visible = false
tag:yep('+', G.C.RARITY.cry_epic,function()
card:start_materialize()
card.misprint_cost_fac = 0.5
card:set_cost()
return true
end)
else
tag:nope()
end
tag.triggered = true
return card
end
end
}
been banging my head at this for a bit and can't figur eit out
what's context.area during runtime?
also maybe you can try create_card_for_shop from UI_definitions?
also I don't see an emplace
nah, two pair doesn't get enough love
based on vanilla tags it should be done for you
if I add emplace it gets added to the shop but doesn't replace the current shop item
If you want to replace, you can just hook into create_card and return something else
That's what I did for Cows
Yeah thatâs probably the play
function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)
local has_cow = false
if area == G.shop_jokers and _type == 'Joker' and forced_key == nil and key_append == 'sho' then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].ability.name == "Cow" then
has_cow = true
break
end
end
if has_cow and pseudorandom(pseudoseed('cow_'..key_append)) < 1/12 then
return create_card_post(_type, area, legendary, _rarity, skip_materialize, soulable, 'j_cow', key_append)
end
end
return create_card_post(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)
end
i think ive written the most comically overengineered patch for that thing but it will work even if the arrangement of stakes is somewhat stupid
sent a pull request
the UI is criminal đ
)_)
Spaghetti UI moment
for some reason I think it's turning many more things into Bigs that shouldn't
and the UI doesn't like that
because for some reason I made math.max and math.min freak out
i swear to god
some jokers have non-table extra values and it's such a pain to edit them
What do you think is the issue?
what are consumables' SET and SECONDARY_SET colors based on?
oh vsc is dumb and forces alpha to be at the front to show the correct color
flippin jimbo
if context.other_joker and self ~= context.other_joker and context.other_joker.ability.set == "Joker" then is there a shorter way for this?
if I remove the last part it scores for consumeables too
no not really
context.other_joker checks for nil
self ~= context.other_joker checks for other cards
ok thanks
show me how to flip a card like that irl
thanks spaghetti monster
Lmao
Flip the description too 
Wouldn't that mean the flipped card is no longer flipped? đ€
Is this how you make a Joker that changes hand size?
Because my Joker worked normally in the first Blind then in the second Blind it set my hand size to 1
I don't explicitly change the hand size anywhere else, so either this is wrong or something else is creating issues, but I'm inclined to think it's not something else
you can just put h_size in config iirc, but it'll do the exact same thing
Do you know why it would be applying multiple times, though?
Probably because you already have h_size in config?
oh wait, maybe I know what's happening
It was a different Joker, possibly
yeah, I forgot to add a check to see if it granted extra hand sizeâŠ
đ
What do you think of the UI for these cards? (Sidequestion: how can I change the text or size of my mod's badge?)
Two pair color is kinda ugly
I don't think I'll adjust them since they come directly from Homestuck, but there might be some alternatives
Small info text is kinda too small, Idk how it looks in game tho but I feel like not too readable
just make the text gray
Better?
It felt weird to mix grey and colored text
...okay, this is really fuckin irritating.
What is?
so i had this idea for to the moon, where i was gonna make it give a very small amount of xMult every time you gained any amount of money
turns out, that even though the money is visually added during calculation, calculation is finalized before the money is added
its in every(?) scaling joker
that's why Jokers use the dollar_buffer variable
hmmm let me try again
ahhhh... so if i have the value increment when the dollar_buffer is greater than 0, it should work?
Look at how the game uses it
it'll end up something like dollars + (dollar_buffer or 0)
oooooooooooooh
How do you collab with other mods?
i see now
so what i need to do
is have the joker check dollar_buffer at every stage
and if it's greater than a variable that is set at the start
set that variable to the dollar_buffer and increment the counter
Idk what you're doing, but you can think that the true amount of dollars you have is dollars + dollar_buffer
How's this? I can still make the text bigger
i think its too small, looks good tho
this is what i wanted to do, tracking dollar_buffer worked perfectly!
might bump the increase up, idk yet
bc that's from playing a rough gem diamond flush
maybe make it also lose mult if money is spent
help, I added this piece into the Joker but it continues to come in the shop
I made it slightly more compact
I don't see that in the wiki, so I assume it doesn't exist
There are two flags to control if Jokers show up or not
See Cavendish or Stone Joker depending on what you want to do
Just do what Cavendish does
Ah, I did find in_pool in the wiki
well, i already changed it for all the jokers to use a new pool_flag, so I'm not coming back
you can use pool flags where appropriate, but if you need to keep updating them or have more advanced logic, you should use in_pool
in_pool = function() return false end,
Does the function not need self?
now flippin the right way
discarding unused arguments is fine
Notice anything different?
:o
:o
It is different!
No the colors loop, and I also changed the colors
I hope it doesn't get confusing with each Poker Hand having its own colorâŠ
in my experience with UI, its a big mistake to add lots of different colours
what im doing with Saturn is just creating a pallet from colours that already exist in the game.
but again, it depends if you want the UI to feel like and integrated or not
What's Saturn
Where are the boss blinds stored? (I'm trying to see how some of the ante 8 boss blind effects work)
blind.lua
thanks
is there a way to act before the hand scores? I'm running into the issue that because I'm working in calculate the jokers calculate positions are locked in before the shuffle
You would probably need to find where context = before is being run from and add a lovely patch for extra calculate_joker call before jokers lock in
Huh
0629b huh
I'm investigating the crash issues that I'm experiencing with BU-CB, and the issue seems to be that... dofile doesn't exist? Is that a thing in Balatro's lua runtime environment?
you named the folder wrong
That's even after I rename the folder to what it expects it
i REALLY need to write a guide to how to install it.
the reason there isnt a guide is bc its in development
its technically not released yet
well thats what the dofile issue is
Before renaming the folder, I get "file not found" stuff like you'd expect, after renaming it I get the error I described
can you send a pic of the error?
try verifying ur game files maybe i honestly dont know
if ur sure that the folder is named correctly, then i dont know what else to suggest.
the error is that it cant find the file to "do"
what version did you download
How do you get a playing card to display its xMult, even without an edition being applied to it?
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''if specific_vars.bonus_chips then'''
position = "before"
payload = '''
if card.ability.x_mult then
#localize{type = 'variable', key = 'a_xmult', nodes = desc_nodes, vars = {card.ability.x_mult}}
localize{type = 'other', key = 'card_extra_chips', nodes = desc_nodes, vars = {card.ability.x_mult}}
end
'''
match_indent = false
This code here "works", in that it displays a card's x_mult value as its extra chips value
IIRC the edition is one of those popup bubbles
It might be easier to add one of them
Otherwise you'll probably have to make a new localisation field to show it
I'd prefer it to display it in the regular bubble if possible. Theoretically there already exists a localization field for xmult, and I should just be able to use that one?
I'm not familiar with the localization system enough for that, sorry
Hopefully someone who is sees this request. In the meantime, I'll make an attempt at seeing if I can get the popup bubble to work
a working flip shader/effect? đ
i need to get my hands on it
why's part of the sprite transparent?
nvm
yoink
I just needed tons of time to figure out what all values mean
make a guide, would be ultra helpful
i could also use a shader that flips the sprite right-to-left
imagine a misprint shader
I planned that 
the guide or misprint shader
I updated the existing one https://github.com/stupxd/Steamodded/blob/main/example_mods/Mods/EditionExamples/assets/shaders/ionized.fs
nice ty
i'm too lazy to learn shaders unfortunately but thanks so much
the misprint shader
it sounds like a fun project, I just need to think of how am I going to fill the gap
thats why I had an idea why flipping didnt work
I was checking the shader code and it didnt make sense
Misprint Misprint
there's just one problem, if you apply this edition to most playing cards, it would hardly change much if anything, right?
which is why i want a version which flips the sprite horizontally instead of just rotating 180
oh yea
uhm
you can remove newY part
and replace it with texture_coords.y
that should only flip horizontally
i'll try
this was the first iteration, without flipping X
#đ»ă»modding-dev message
which might also work for you
for that you remove newX and replace it with texture_coords.x
I'm not sure you can do it without further modifications
An easy Blind concept. It feels a bit too easy to be challenging, maybe it needs an extra oomph
The Spin
First hand is discarded face down
That said, with 4 hands and 3 discards, you can dig through all but the last card of your deck⊠except who knows if the cards you want are there or not đ€
Actually, it should be all but the bottom 6 since the last hand⊠is the last hand
What do you think?
efficiare or whatever itâs called:
what
Cryptidâs joker which makes you draw the whole deck
Absolutely evil on this blind
Ahh
Turns into a regular Joker
Don't think so, given that inserting this bit of code makes it work:
function dofile (filename)
local nativefs = require("nativefs")
local f = nativefs.load(filename)
return f()
end -- dofile
recently discovered another math bug with UI, spacing on scaled text is wrong.
the second Black badge is supposed to be shrunk to 1/4 the width of the Common badge but the spaces between the letters have not been shrunk with the text
hey are most people mostly ignoring UI stuff? I could go correct all the UI math with what I've learned
ui too convoluted đ
That's a slightly harder the house, which I think is fine
Oh snap someone updated all my old early shader code when I was learning how it works and then got sidetracked
Yeah theyâre not too bad once you understand how they work
Iâll take a look over your changes later today
It's mostly cleanup, I tested all of them to make sure nothing broke
every hand is first hand joker: 

I think itâs slightly easier than the House 
Unless it calls set_blind again I think it doesnât loop
As Myst said, UI is quite convoluted even if I can find things Iâd like to change or tweak
They look interesting but the inconsistency width makes them look a bit worse
Not the width of different lines, the width of individual lines
Well idk whatâs wrong with your copy, but it works for everyone else
The house can be cheesed for the most part, especially if u do flushes
This one is a toss of a coin if you auto discard useless cards or useful cards
I mean, unless you need 5 specific cards to win, I think this is less luck-reliant since you can dig deeper for face-up cards
Dig deeper is kind of a weird way to put it, since whatever you might be looking for could've been discarded
So you dig the same amount, technically
If it helps, my setup involves a bunch of other mods
Thought: what's stopping me from looking in the deck to see which ones were discarded?
Possibly
What mod are you trying to install again???
Numbers may be lower due to the 8 cards drawn face down
Hm?
That doesn't answer my question lol
the game doesn't tell you what discarded face-down cards were
pareidolia + plant exists
i see
Havenât you played against The House, the Wheel, etc.? đ€ ;P
I haven't played Balatro properly in months
so i legit don't remember
I see
BU-CB
My mods include Steamodded (which seems to be a mod in and of its own right), Bunco, SDM_0's mods, Brainstorm, MoreFluff, and others that I'm probably forgetting about
honestly i dont know what the issue is, i imagine it could be compatability. BU-CB is technically designed for drSpectred, so the compatibility is not tested.
this is such a goofy way to do what I want but hopefully it works
Hey I just gotta ask but have secret modded hands been made that use Haumea or Makemake for their planets
it works haha
I know that mods which add a 5th and 6th suit include a hand called a "Spectrum" but I haven't used those and do not know what their planet is
break_infinity
math is buzz lightyear
Weâre past break_infinity already
to break_infinity and beyond.
Mathguy ported OmegaNum so weâre already at e10##1000
to break_infinity and beyond beyond.
hey everyone! how would i go about implementing this deck?
#1258589987142635540 message
for the blinds, maybe write a lovely patch when they're created that multiplies their base value
other values are already used in game win_ante for ante iirc
First do you know what lovely patches actually do
api that bandages new code and assets and stuff onto a love2d game?
Mhm
ive never written one before though. i know how to code in lua though, just not sure exactly on the process of patching
This is the simplest example I could find
Does it have to be a deck?
Nvm
Was reading one thing
If u wanna add custom challenges have a look at BU-CB-DEV, itâs a mod I made for balatro university. Itâs got a custom challenge api.
oooooh
where can i get my hands on this?
If you donât know how to create mods it might be good to do
oh i found it
tyty
alrighty
could also look at steamodded api, which is used in eg. cryptid
You guys think I can come up with effects for all of them
eventually
Could I come up with effects for all 142 cookies
eventually
Yup
inb4 stock market joker that works like the minigame 
Oh that looks like a fun card
Temporary cards are such a cool design space and I'm glad more people are messing around with those ideas
Is this mod out yet? Definitely want to play with that card if it is
no sorry, this is like the second card ive made for it lol
Excited to see what further progress you make on it, then!
Love the art too - very cartoony Joker font and it looks good in pixel art
ty ty!
This is gonna be pretty tricky to implement
I imagine it's gonna involve a lot of lovely
it's pretty much impossible to have mod compat
I just have to manually program in what happens for every single modded spectral that's all!
Question does lovely work with other mods
Like could I change the code of a different mod
considering almost every mod uses lovely, yes
oh
uh depends
you can change their lovely patches but i dont think you can directly change their lua file
Interesting
block next G.hand:change_size and Card:start_dissolve maybe đ€
Wait why
because vanilla downsides are mainly reduce hand size and destroy all jokers
hey, i'm starting to work on a Joker mod but where do I start? i know their is a "templete" to follower for making the .lau file but how do i start?
this is just my thought maybe dealing with each spectral card is better
Ahhhh that's clever
I think just altering each spectral card is easier
Because I'm bad at this đ
I'll do it later
anyways its programming time
Cryptid compat 
(there's a joker which does this for all spectrals planned, and then a system to do it for every item in the game for one custom consumable)
I know I was joking lmao
what is a lovely patch?
hows smods doing folks
looking through source of other people's mods is a good place to start
so go though their mods/ .lua files and learn that way?
yes
also looking through the game's source code
for the context stuff
There's also #1247703015222149120
is this for adding in Joker effects like destroy cards and add x multiplier?
just look through other jokers code first
Most of them are in card. lua, function calculate_jokers