#💻・modding-dev
1 messages · Page 53 of 1
let me add 50 more stakes and see how it scales
they are a little squashed together, but I think that helps the effect
If you zoom in the Cryptid stakes have a small outline
Not sure if that’s an issue with the texture or with the UI
I think it's a texture thing, I noticed that on some of the decks too
I want to eventually make the chips fall into place too, I think that would be pretty cool
First thing's first, planning out all the DNDG Cards to be imported
I could do something with them
Let's use this card for example
You can see the 11 and then bullet point: That's just the same value as an 11 of nothings
I COULD save some time and just add ranks and only one suit
Maybe it selects the rank and suit when held in hand but you have to guess it
maybe, I was showing it just for the top part there
I imagine something along the lines of https://discord.com/channels/1116389027176787968/1268340789730213888
Yeah, that was my initial idea
but then i noticed all the cards fit into the 5 suits
It counts as a jack when played in Blackjack so why wouldn't it in a poker setting
I'll have to concept how DNDG core concepts would act in Balatro
Like how do I do damage or deal with bust limits
Of course, I can probably do the first like... 6 or so pages quickly
electrocute the player irl for damage 
"Each discard will cost a family member"
Maybe sap some % of current/hand score?
Well i know DNDG gives the base player 100 HP
Busting is kinda hard because busting in balatro is just a game over
So I could do something like
"When Played, Permanently gain +4 Chips." for the on stand effect...
how do you get the current chips, this
There's G.GAME.current_round.current_hand.chips and .chip_text, which I think it's just chips, I'm not sure why the chip_text is separate, though there might be another way to access it as well. There's also just G.GAME.chips, but, I don't remember what it accesses.
Overall, you should probably take a look through game.lua under Game:init_game_object() to see all the things stored in G.GAME.
.chip_text is meant for changing the text on the blue counter, like how the black hole changes it to say "..." and "+" during its leveling process
in general it's also used to display the buildup as the score tallies up from jokers and bonuses, because the reality is that the game does the score calculation in one go
the counter changes as part of the animation process
thoughts on this UI for security checks?
Why do security checks?
it's for the WR leaderboards
oh ok
plus you would also be able to use this with the replay feature to cross-reference if a replay with a certain set of mods is compatible with another set
How do I change the color of the card suits
for just the text you can use Trance, however you need to make your own textures to change the colors of the suits themselves
So if I want to use the "Card Colors" option, I'll have to do my own textures?
can I add a new context/variable to a specific card? like how when I add an enhancement I can check if a card has it and apply code, I want to apply a thing to a card that I can check if it has that's not an enhancement. Solved.
Is it possible to make a deck start at a different ante
yes
version = "1.0.0"
dump_lua = true
priority = 0
# Quiets down the fire ambience
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "= function(_prev_volume)"
position = "after"
payload = "if _prev_volume > 0.6 then return _prev_volume = 0.6 else "
match_indent = true```
Alright trying to do some wacky shit, if we can even do this.
Trying to insert this payload in the misc_functions.lua since it seems like that controls the scoring fire volume. We just wanna cap it to a tenth of the game volume, instead of it seemingly getting louder to match the master volme even if we reduce the game volume to like, 2? Thought we were getting somewhere but uhhhh
realizing we might be outta our league-
idk return _prev_volume = 0.6 looks wrong
Simply put, you don’t use the card colours option at the moment, it’s a super old super jank version
pattern patch also matches entire line, and line starting with = seems wrong
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "G.ARGS.push.ambient_control = G.SETTINGS.ambient_control"
position = "at"
payload = "--G.ARGS.push.ambient_control = G.SETTINGS.ambient_control"
match_indent = true```
Welp we figured out how to quiet the fire
if absence of noise = quiet then, we did it
Hello everyone !
Does someone knows what happened to ranks and suits in the updates for the last month ?
And if it's now possible to create ranks for only specific suits without hooking inject_p_card() ?
Should I just use remove_p_card() on concerned ranks ?
Or is there any better option ?
is this right for code that works like a buffoon pack
I just found something else weird, we can't define any custom fields for "G" ? Like I was creating a G.mjst_lib for my library mod and I just realized it's getting nilled somewhere . . .
What do you want it for
why is that cryptid flavored
you don't need an object loader
I wanted to create functions that I can use in all my mods
You could just put it in the global scope. Usually I just load a file and have the function locally available when I need one
I understand that, but I wanted to be sure not to impact anyone code by overwriting a function by mistake
You could take a look at how this mod does it as an example. #1264396691365302364 message
I do this
Then the function is only available locally
Yeah but that also means that you have to copy the code from one mod to another
I may do that if this is the only option
I mean, you only need to load from the correct place
I don't think you can load outside the repo of a mod ?
Well, defining something semi-globally also needs the code to be somewhere in a repo
If what you want to do is inside of a run, there's another solution
I'm all ears
This creates a dictionary inside G.GAME which is per run
Hmm I see, that's interesting ty !
does anyone know what the error is reffering to
Because your atlas isn't in SMODS format and still using cryptid's custom format, without the way to load that custom format in. Use SMODS.Atlas.
basically, don't look at cryptid for how to use smods
it doesn't do it in a conventional way
@wintry solar hello, could you please help me with something UI related
I need to limit the menu height so that black part (on screenshot) is gone. Been trying to do it for a long time myself, but I have no clue what do I need to change to limit height
I already tried maxh in a bunch of places
where exactly
should I put it
if I add maxh to parent node it makes text super small and doesnt change the height of anything
I think perhaps in your local tab_config = {blalala}
doesnt seem to change anything
when you hold G+A which boxes are stretching it?
what happens if you change root on line 178 to r or c
I don't see why that node should be so tall
same
that's why I'm desperate for help 😭
oh my god
my insane suspicion was correct
I noticed here that it was stretched almost for the entire tab
so I added 1 more option...
the game is trying to fit tabs and the tab contents
as if they were in a column
oh I see
so it's assuming the contents are below the tabs
try changing 174 to a column
I still don't fully udnerstand the relationship between rows and columns, sometimes they just don't do what I think they should
😭
maybe put that back to a row and then change the next two to columns
so 178 and 181
yeah I remember it's when you combine different types it gets all confused with itself
probably why you end up having some many nested nodes
I stumbled upon a really weird issue; one of my jokers, when unlocking, doesn't shake, and doesn't "move" with the achievement box
But I have literally no idea why this happens because I don't mess with this particular joker's rendering, or anything, really
yet it's the only joker that just behaves this way
how do you set_sprite_pos()? like what value does it take it, all examples of it usually take in card.config.card.pos.
? I do not use it
oh i was just asking in general
ah, sorry I thought you were answering lol, my bad
it needs a table, for ex. set_sprite_pos({x = 0, y = 0}) iirc
ah i was just putting the numbers not x/y =. thanks
You got this ui design on lock
There's a lot going on in my modded game
if that's sarcasm, the coloring is for easier nodes visualisation
No I meant with the box issue u were having 😭
ah, lol
first UI attempt that isn't a copypaste from an existing menu
it was pretty confusing
how do you change a card's sprite?
Does anyone know what the code for a deck with 999 Joker slots would look like?
this is all I have for now:
oops mb Rattling
the first step is to use steamodded 1.0
I am :p is there a dif link for the docs
as is clearly stated on the main page, only the numbered pages are for 1.0
Sorry this is my first time making a mod for anything
tbf it wasn't fully clear from the pages themselves that they're outdated. I went ahead and broke the old links and added deprecation notes
Is in_pool a function similar to can_use ? As in it updates for when it triggers or not
I'm having trouble finding the way to add in that a deck has more consumable slots/Joker slots
I think it’s called every time a pool is created
like what to type in order to change those varrs
Interesting, ty
Is there a mod I should look at for a good deck example?
you can modify the run in the deck's apply function
what/where is the apply function?
SMODS.Back {
...,
apply = function(self)
-- code here
end
}
but actually there's supported config values you can use in this case, they're relative to the base amount of slots
so something like
SMODS.Back {
...,
config = { consumable_slot = 98, joker_slot = 95 },
}
will start you off with both 100 consumable and joker slots
so the number is additive with the base amount?
not really
yeah
what is wrong with the current state?
(replaced the comment with the config)
you still have SMODS.Back:new(
the config is a separate thing
you should brush up on some basic lua/programming concepts
this can be helpful: https://www.lua.org/pil/contents.html
Does anyone know why that might happen?
Yea only ever programmed in unity and c# before so this is new territory
I've tried this
this one doesn't work i know why, but i've tried a few things
check out Aura
try changing the atlas line to G.ASSET_ATLAS['SuitEffects']
which one did you change?
I meant the children.front.atlas, should have specified. I'm not sure what the top line is doing, either
now this is happening
where have you defined the atlas?
it happens with or without the top part of code i removed
you need the mod prefix
🙃
that worked thank you
???
Localization breaks animations it turns out???
when I remove this, it works fine!
wtf?
that's a funky localization table
what's wrong with it?
I've never seen it as [1] = 'bla bla bla',
I wrote every single table like that here
so it shouldn't be the issue
Why this weirdness might happen?
Is your loc the only one with an E:1 out of curiosity?
that was my thought
I'm not sure why that would cause an issue though
sledgehammer works fine?
yup
what happens if you copy the unlock loc txt from sledgehammer?
yeah both would check the same thing
try typing out the message again
thats the wrong description, no?
you said to type it out?
I removed it completely
or did I misunderstood what "type out" means
I meant the unlock one
but that video doesn't show the unlock message
removing unlock loc just places joker's loc here
oh I meant to have the unlock text, just delete it and then type it again
not copy and paste
is it still broken in that video? maybe I'm misunderstanding what the problem is?
in the last video it isn't, but it's the wrong description
when I put the description back (one sec) it breaks again
here
So far:
- Removing unlock localization completely fixes the shake;
- Putting other unlock localization that is also 3 lines long fixes the shake;
- Retyping manually didn't fix the shake
I'm lost
try line by line
okay
will leave them empty rather than just removing completely
removing the third line fixed it, let me get the lines 1 and 2 back
this feels like solving a puzzle
hmmm
so the problem is in the third line (for some unknown reason)
huh
Really dumb idea but have you tried closing the {s:0.8} of this line?
Am I in some Thunkage zone?
I tried removing the {s:0.8} earlier, so I doubt it's this
if you add the formatting back in does it work now?
that absolutely can't matter
it breaks again
this is so strange
so my formatting got 
-ed mysteriously
don't worry, I have a similar issue with some hovering at the moment
😔
have you tried using just half the formatting?
what about with just E:1
what a mystery
??????
it's a combination of E:1 and Common????????????
Changed "Common" to "Blabla" and brought back all the formatting

It HATES the word common
I now wonder if it breaks for "rare"
if so this is some rarity detection bullshit
nope; didn't break with "rare"
there's emojis in this discord alright but they clearly missed to add insanity's head as an emoji
Sounds like an issue you could call uncommon.
you should win on red deck asendant stake, just to be sure the ui works /j
I'm afraid this is a legendary-tier issue at this point
Trying uncommon rn
doesn't break with uncommon
Legendary also unaffected
I will change "Common" to "common",
then "Common" to "Commo1"
lowercase "common": breaks
(sorry for flooding this chat, this really needs to be documented so I won't be put in a psych ward)
We're now playing with letters huh
try trifle
okay so it's not all 6 letter strings
I tried "Blabla" earlier anyway
oh true
C is fine
C-section jokers, epic TBOI reference
"Co"... doesn't break
I wonder if this will be some kind of epic troll by localthunk's ghost and when I will type the word fully it will work like nothing happened
"Com" broke!
Will try "M"
(oh god is it cryptid's ghosts)
"m" is fine
"om" next
so?????????????? What this gives us??
"Com" is forbidden?
Does it think I put a URL or something?
This debug is useless! I got nothing!
is it okay in the middle of a different word?
Only more questions
Will try
Doesn't seem like it
uh (sorry for the gray box, it's from the debugplus)
a "reset profile" hotkey would be handy right about now
The only solution I can see right now is to cry
Wait so Comhuh works but not Common?
(no this is actually quite funny but it also drives me insane)
what about huhcom
well
😭🤪🤣😵💫👽💀
this is the place
actually
let me get it from the dumps instead
idk if it's any different but just to be sure
wtf are those checks in the events?
my brain stopped working, I'll eat a tomato or something, brb
sick
I'm back
I figured out that it's just juice_up not working for some reason
even if it's out of all the conditions and checks, the juice doesn't juice
it's better to make it look pretty before making it functional, right?
What did I do to get that box?
Oh is that the tab menu?
Not used to it being so big
it's not removing the box while switching screens (from game to main menu for example)
It's
code I'm not going to worry about it
Feelin stumped here. Error keeps popping up but unsure how or why it is--
wait nevermind
we missed a curly bracket
shiny stakes 😄
I’m curious how you made it. Does it check for the vertical position of the cursor rather than a specific sprite or nah?
it checks the sprite
Hey, don’t you know K6BD?
and then it bumps all the other chips upwards
And it doesn’t generate weirdness when moving the mouse upwards?
Yes we know K6BD :3
I have two Demiurge Jokers and a Demiurge Showdown Boss Blind implemented (although I’m tweaking one of the Jokers), but I wanted to bounce ideas for the rest
Can you select bottom then red? It was hard to see from the clip
Which demiurges do you have?
Solomon David (see effect below)
And Jagganoth
And this is Tyrian Patriarch. @acoustic kiln made a fire sprite which I might use for the Demiurge Blinds
Huh. Works better than I thought it would. Lucky!
Ok so
Could do something with Mammon and have something like, tallying up the rankings/chips played of each card triggered, and adding it to a running total?
Don't interrupt the count
Might be a bit basic
I mean look at these hitboxes
Per 1000 chips gain 1$ per round
disjointed hitboxes
I had some ideas for Gog-Agog and Jadis
Incubus needs ideas but uhhhh
Lousy swordsman
Incubus I was considering Enhancements
How does controller work with these stakes?
I think it fits the theme of what he tries to offer Allison and the rest of his
Idk what they are actually, but those people asking him for stuff
I do not know
Who’s playing PC Balatro with controller
how do I enable the keyboard controller
Is it keyboard? I thought it was a gaming controller
I saw in the blackhole thread you can enable the keyboard to function as a controller
maybe something that gives like, xmult per card enhancement, seal, and edition applied while joker is held
Although that may be more like Mottom
I was thinking Mottom could either work off ranks or Joker rarities
Like her fruits or her court
Since ultimately I didn’t go with Jacks and Kings for Solomon, that opens up Face cards too
it would appear it just crashes with a controller
oh no
it's because this option cycle doesnt work on this page
@unkempt ridge can I DM you about it?
Sure
you can't get to the stakes with the controller
@edgy reef do you know how to enable controller access to UI elements?
uhh idk, but there were settings added to BlackHole that enable keyboard mapping and another mod that did something similar
Lemme check
https://github.com/WilsontheWolf/balatro-mods/blob/master/steamodded/KeyboardController/keyboard.lua This
As for getting the controller onto the stakes, idk how that would operate.
I'm getting a crash where the length of field "full_hand" is a nil value the issue is that it should just be defined??? so im very confused
you need to gate for the specific context first where it does exist
is it possible for stakes to apply two different stakes?
It should, but I believe it's not well tested
Tree-shaped stake piles
Wait the graph could have a cycle
Graph-shaped stake piles
Biblically accurate stakes
is there a smods function that builds a table of which stakes are applied?
what does that require?
You can read or search the code for whenever eval_card is called with context.full_hand
Eremel also had a thread summarizing them
it never is though? at least not on any of the jokers
It’s all cards
Everything is a card, except the nodes, which are nodes, but cards are nodes so it’s ok
uhm akshually cards are moveables, which are nodes 
So you’re saying cards are nodes?
I still just don't get it, where would i define full_hand? and nothing i look at ever calls eval_card with full_hand either, not even in the base game, you get eval = function(card) but im not sure if thats identical
can I see the offending function maybe?
uhhh yes-?
Look for calculate_joker
So the “akshually” just agrees with me
I’m just going “akshually” to your “akshually” joke 😅 😭


Joker Joker Revolution
loc_vars = function(self, info_queue, card)
return {vars = {}}
end,
calculate_joker = function(self, context)
if context.first_hand_drawn then
local eval = function() return G.GAME.current_round.hands_played == 0 end
end
if G.GAME.current_round.hands_played == 0 and #context.full_hand == 1 then
-- for k, v in ipairs(context.full_hand) then
-- v:set_ability(G.P.CENTERS.m_gold, nil, true)
return {
message = "Sealed!",
colour = G.C.CHIPS,
card = self,
}
end
end
Now with calculate_joker it doesnt crash when doing literally anything but it is still not working (for what the gold stuff is thats just wip, i just wanted to be sure the first hand of round stuff was working)
calculate_joker doesn't work because it's the wrong name
it's supposed to be called calculate
the logic is also wrong i believe
when is the gold effect supposed to happen?
first hand drawn is what it says, so there can't be a full_hand since you can't play hands
im basing it off the dna code, mightve been changes i guess?
you might want to use context.before and context.cardarea == G.jokers
oh the first hand drawn for DNA is for the shakey effect
probably the better card to look at as reference would be midas mask
that's separate from the main effect which is below
either way, context.before and context.cardarea == G.jokers is probably what you want there
im looking at both, since both are to apply (first round has 1 card and then a midas mask-like effect)
got it, that will probably work, what do those actually do though?
that just identifies one specific call to calculate_joker with the timing you need
context.before means your effect triggers when played, but before hand is scored
context.full_hand == 1 is also bad logic
there was a #
oh I can't read
generally don't look too much at base game code, a lot of it is spaghetti
i see...
it was a different colour and I assumed it was commented out because I've been looking at tomls all evening 🙃
there is no color on mobile lol
what is the code format most people use for codeblocks? i use cpp but theres probably a better one
ahhhhhhh, i didnt know that was built in
i mean it might be working? whats weird is that im never getting the return message
its (self, card, context)
ah, that makes sense, thank you!
took golden joker a little too literally
Quick ask for debugging but
Is there any way to expand the 'more's? We wanna get more info
okay so, just about everything works, issue now is that the way i grab the enchancement (G.P.CENTER) does not contain my custom made enhancement, so is there anyway to add that one?
Tryna understand why this is causing problems... Thinking it's something with poker_hands being indexed? Or just an issue with it being, taken.
In this piece of code in [mod name].lua,
card_pos = 0
local lead_suit = "Clubs"
function spice_hand(suit)
if card_pos == 0 then
lead_suit = suit
end
card_pos = card_pos + 1
sendDebugMessage(card_pos, lead_suit, suit)
end
sendDebugMessage should send the info about a position of a played card in hand, a first suit played and the current suit played, all in this particular order. However, when triggered, sendDebugMessage just ignores the lead_suit argument, not to mention it sends two others in a wrong order. What am I doing wrong?
Oh, wait, now it ignores suit argument
Doesn't make it better, it still messes it up
remember what I said 💀 you need the context check first
try concatenating/formatting the values to 1 string
steamodded log functions don't concatenate their arguments. They expect at most 2, a message and a logger name
It should be added to that table, how are you trying to access it?
Yea, that worked
We dun did it :3
All this for a silly plant
aye, good job yall
now to figure out how to make cryptids scale work with it-
Later
I think that works automatically as long as you followed scaling convention but I could be wrong
theres a guide in cryptid thread pins
genuinely
the most frustrating thing in this game
is trying to get text properly localized and displayed
how so
you can just add localization folder
and steamodded will do most of the work for you
this is how it is, where m_ofuda is the key for the ofuda card
do context.full_hand[i]:set_ability(G.P_CENTERS.m_ofuda, nil, true)
are you sure that is the right key
usually it has mod prefix as well
you can find how it looks like in console when the game loads
👍
Yeah I though it would be a prefix issue
How can I inject into something where steamodded already injects?
higher priority and edit the code after steamodded injection
if you mean lovely patch
as in:
I tried that earlier but nothing changed
I set priority to "1"
wdym by "after steamodded injection"?
maybe the function is in overrides.lua?
go to mods/lovely/dump/functions/common_events.lua
that'll be the code after steamodded injection
it is in dumps
this screenshot
this part of the code just doesn't want to be replaced or edited
¯_(ツ)_/¯
could be because of the lovely, but seems to work fine for me
oh ye
doesn't work with latest lovely release
too bad
ewww
Can I get some more information on UI implementation? At least how to make it appear, as I inserted the mentioned test UI block and even tried to call for it, but it doesn't seem to be there
can I see the code?
Almost literally what was sent there
local t={n = G.UIT.ROOT, config = {r = 0.1, minw = 8, minh = 6, align = "tm", padding = 0.2, colour = G.C.BLACK}, nodes = {
{n = G.UIT.C, config = {minw=4, minh=4, colour = G.C.MONEY, padding = 0.15}, nodes = {
{n = G.UIT.R, config = {minw=2, minh=2, colour = G.C.RED, padding = 0.15}, nodes = {
{n = G.UIT.C, config = {minw=1, minh=1, colour = G.C.BLUE, padding = 0.15}},
{n = G.UIT.C, config = {minw=1, minh=1, colour = G.C.BLUE, padding = 0.15}}
}},
{n = G.UIT.R, config = {minw=2, minh=1, colour = G.C.RED, padding = 0.15}, nodes = {
{n = G.UIT.C, config = {minw=1, minh=1, colour = G.C.BLUE, padding = 0.15}},
{n = G.UIT.C, config = {minw=1, minh=1, colour = G.C.BLUE, padding = 0.15}}
}}
}}
}}
end```
And I call it from [mod name].lua (what is a proper name for it?) with `create_tsu_visuals()`
Also would've been great to see what that was supposed to be
I mean if you throw it in the config example it'll turn up in game
but for quick reference,
gonna try and cut down on the PRs backlog for a bit
🎉🎉🎉
@frosty dock do you know where smods calculates which stakes to apply for custom stakes?
how would i start modding balatro?
as in playing or developing
developing
the other (numbered) pages have some useful docs on Steamodded APIs, but get used to reading source code
believe it or not, that info is on the page i sent
aight
incredible
thanks very much!
Looking for some thoughts on stake application. If I have a stake that applies Blue stake and Gold stake for example, would you expect it to apply blue and below twice or once?
I would expect blue and below to apply twice since gold already subordinately applies blue and otherwise there would be no reason to state that is also applies blue
but it sure is a bit jank
it was a poor example, I admit, but I'm thinking ahead to custom stakes. Say I add two different stakes after gold that apply gold and below, but then I want a third after those that applies both
I see what you mean
generally applying stakes twice doesn't make sense for vanilla stakes, it would only ever make a difference for blue stake actually
yeah that's why it was my example xD
maybe for ante scaling too?
oh no the way it calculates the scale is fixed
yeah
thinking we just hash already applied stakes then
this should do
function SMODS.setup_stake(i, hash)
hash = hash or {}
if hash[i] then return end
hash[i] = true
if G.P_CENTER_POOLS['Stake'][i].modifiers then
G.P_CENTER_POOLS['Stake'][i].modifiers()
end
if G.P_CENTER_POOLS['Stake'][i].applied_stakes then
for _, v in pairs(G.P_CENTER_POOLS['Stake'][i].applied_stakes) do
SMODS.setup_stake(G.P_STAKES["stake_" .. v].stake_level, hash)
end
end
end
convenient side effect is that cycles will no longer hard crash
yeah looks good
is there a reason that the increased ante scaling is calculated as G.GAME.modifiers.scaling = math.max(G.GAME.modifiers.scaling or 0, 2) rather than just incrementing the value?
not my code, but I assume no
I think this should be changed too, for a similar reason
i mean yeah, there could be a system of modded stakes like green and purple that increase ante scaling but one doesn't apply the other, so they should result in the same scaling when used on their own
or say you had stakes parallel to the base ones, and a stake that applies both gold and alt gold
who would have thought that designing a chip tower ui would bring up these issues
who would have thunk that to make the deck/stake select screen accessible, I would be bypassing it?
is that for blackhole?
Yeah
Reviewed seal weights and sounds just now, there's a couple things I need changed
do we want the edition get_weight method to be made the standard?
I think it's desirable as to support things like weight-changing vouchers
When developing a mod, is it a good idea to have it be the only mod in a mod pack (outside of dependancies), or is it better to just, have every mod you're already using
I usually have all mods that I'm using active, but occasionally would test behaviour without any mods
I think it's just preference
¯_(ツ)_/¯
I'd say that applies as long as you're looking at actual source code for the reference, not just lovely dump
ah yes ordering
Is Sigil supposed to check in_pool of a suit, because it doesn't now?
It spawns the suit even if in_pool forbids it
What's the easiest way of ratelimiting a particular thing, say having something that runs at about 60 times a second even if the game is racing at very high frequency
Preferrably while letting the rest of the game go at its turbo frequency
What thing do you want to ratelimit? If it's a function or something you can probably check the timedelta to run it at a specified interval
ready for review again
I plan on doing a poll_enhancements next, and then probably taking a look at the other weight issues that are there
but first, I must finish this deck select
i can probably do packs if I get to it
Lil miffed right now
Trying to make it so, upon an 8 being scored, our joker says 'upgrade'.
Weird thing is the joker_is_ actually incrementing the ability.extra.current, so we know that it works and it actually does detect the 8's that are scored
However the message doesn't show up, and we're unsure if we're just missing a little syntax or if it's something else
is there scope for adding weights to individual cards?
as in, jokers and consumables
i think not for now
is this a card=card issue
Try using card_eval_status_text instead
Good news is that works, 'bad' news is that the upgrade message is triggered before the card scoring message
Is the upgrade supposed to happen after?
Yeah, because the 8 is scored, and then it does the +30 effect
That's how if we remember right most jokers do it? Like they don't message before it triggers
huh
its been a while so i decided to update my steamodded + lovely, but steamodded isn't being loaded?
Check if your version.dll wasn't eaten by your antivirus
it did fire off defender but i allowed an exception
oh it did eat it lmao
yeah that was it
Try moving your context.joker_main block out of the context.individual block
Also pretty sure not before and not after is useless when checking for context.joker_main
This is so cool!
Ever thought about adding a "Random" button to select a deck at random with such ui improvement?
Or is that what "quick start" is for?
quick start is in theory supposed to load your last selected settings
I need to limit the stakes now
I dont rly think automatically selecting stake X if you have reached stake X on selected deck makes sense
but it's subjective, I guess
now these are some load times
it auto selects stake+1 now
why wont it select previously played stake (or highest unlocked on that deck) tho
like in vanilla
why do you have 60 decks
are you like, cryptid
Its weird. Everything else is working fine but, the order of the messages is thats up
We want it to be like fibonacci, where it's after the 8...
Included the current code snippit
This really is an 80-20 moment
Perhaps context.joker_main is too late, try context.cardarea == G.jokers and not context.before and not context.after
does vanilla not auto select white stake on everything?
I feel like all SMODS objects should use set or some equivalent to clarify what’s loading instead of being nil (even for internal classes).
most of these aren't even internal
Yea
maybe I shouldn't DefaultLogger that
even setting log level to trace doesn't really affect those timers - it was the boot print stage spam that was killing everything
actually I'm not at all sure why it used a win11 terminal this one time... I can't get it to do that again
back to spamming console windows
i know how to make it do that with lanch args (cmd /c %command --disable-console), but it's kind of weird that it did it on its own 💀
does anyone know what the "Abort trap: 6" is?
im getting it as an error when trying to open balatro
MacOS and when i atttempt to run run_lovely.sh it spits out an erro in terminal and creates an error window but balatro doesn't open at all
it showed up after i was editing a .toml file in the lovely folder and then no matter what i did to the files in said folder it kept giving the error
yeah idk what that's about 💀
🐟
Effect doesn't exist yet need to figure out how to spawn consumables
the font 😭
Its 🪄 magical 🪄
where can i find Steamodded 1.0.0, even when i download from the alpha link on the GitHub page, I comes up at 0.9.8
The guide has the link too https://github.com/Steamopollys/Steamodded/wiki/01.-Getting-started
it still says 0.9.8-STEAMODDED
unless i'm looking at something wrong
Make sure you deleted the old folder and verify the game files on steam
only if you have white stakes on everything
its easy to miss because selected stake resets as soon as you go through the deck that doesn't have the stake unlocked, but when you just open the menu it keeps the last selected stake
Still absurdly peeved about this, gonna post the updated code to see if anyone can help fix this.
Basically: Our jokers upgrade text is triggering before the card being played shows it score. We want it to be after, since every other joker does that too... Unsure why ours is just, not.
Good news is we got our sunfish working
And we got two more jokers on the way-
Should we make this a thread
ill check it out in a bit here
damn this has been a rabbit hole
pretty sure it has something to do with the use of 'card_eval_status_text' instead of 'message', only issue is that 'message' just outright doesn't work
looking at other jokers that trigger per card they seem to use 'extra' instead of 'message', for example Hiker uses "extra = {message = localize('k_upgrade_ex'), colour = G.C.CHIPS}"
seems like it should work but it throws an error when used in a mod. I'll dig into it more tmrw but I gotta sleep for now lmao
man bless your soul for looking into this. we thought we were going absolutely crazy but if someone else is having the issue too we at least know its not just us
I should propagate more aggressive use of the --- LOADER_VERSION_GEQ header flag to force ppl to update steamodded more often 
also thinking the keyword is a bit long and could be merged into the dependencies header?
SMODS.Mods['Steamodded'] = SMODS 
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA-0731a]
thoughts?
this looks so cool!!
🤔
check steamodded config
ahhhhh
Thoughts? Should it stay common? Do I keep the "twice" or not?
is there any documentation for making new rarites with steamodded?
there is no such thing as a rarity api in steamodded as of yet
ah nws
there are some mods that add custom rarites tho right?
i might be able to look through them to see how they do it
You mean, cryptid ?
Exotic and epic jokers
oh yeah ofc
@frosty dock How did you pick the right dependency version of SMOD for the example mods? Where they random?
they don't matter because it won't work for versions before the change anyways, so I should actually change it to 0805d
but i looked at when the files were last changed
If I'm transitioning to using dependencies I should use the same version value or leave it be?
Not sure if the first SMOD 1.0.0 is enough for my mods 😅
basically any version prior to the change will see Steamodded in the dependencies, look for a mod with that ID and fail to find it
Oh if it includes config then it should be a recent SMOD
anything before 0805d is too old for the dep flag to recognize it so those version will always mark mods that use this as incompatible
feel free to just use that hash and change it later when something else updates
Alright 👍
Also I was wondering the localization folder was a new norm I should be doing too
definitely should
It will make it easier for others to localize your mod
not even for localization, just do it for organization
it works! 🎉
remember to add an option for using the old ui
Yeah that’s on my list to put in config values
Need to check that is actually works with seeds too
also is there any reason for why the deck selected text is not white
Just stylistic, I didn’t want it to be too glaring
There's a thing where you can hover over certain words to get additional context, is it possible in that menu?
looks great btw!
Oh I can maybe look at adding these like info queue objects
If you could hover in the pop up they would in theory work right now
But you cannot hover on the pop up afaik
Will look into it!
Huh I didn’t know
That’s awesome! Does the deck reflect the actual deck?
What do you mean?
the chips animation looks awesome btw eremel
not sure about the deck animation yet though
This is awesome
I'd assume the amount of cards in the animation?????
Yeah I need to configure the deck animation a bit better, I’m not happy with it at the moment
Might look better from the bottom?
Also need to stop it from happening when you turn the page
It’s currently set to 52 cards but I suppose it can be the number of cards in the deck
I'd also like a config for animations
It’s already on the list!
how would that work? it currently seems like the cards don't respect their "final position" regardless
like their starting position is just below instead of above?
Sliding in from the bottom of the screen instead of top, ye
also nitpick but the Select Stake button should be like the current PLAY button, bigger and centered
It feels weird because of how 2D the textures are anyway tho
I want to try and get them coming in like this I think
like the opposite of discarding?
need a cardarea out of view then move the cards from there
I can just create the cards over there I think
yeah that's what the game does for discarding iirc
(from play cardarea to discard cardarea)
I did have a pretend discard area in an earlier attempt
but...? 👀
It had some odd behaviours that I don’t remember now
ah okay
If moving the card creation doesn’t work I can try it again
My code is set up differently now
How do I only add the Joker to the G.jokers if there is room? This code isn't quite working.
if #G.jokers.cards < G.jokers.config.card_limit then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.0,
func = (function()
local created_card = create_card('Joker', G.jokers, nil, nil, nil, nil, "j_half", nil)
created_card:add_to_deck()
G.jokers:emplace(created_card)
return true
end
)}))
end
you gotta put lua directly after the backticks, no newlines
I had that, didn't work though for some reason
also no spaces
-- Add Half Joker to the joker slots, if possible
if #G.jokers.cards < G.jokers.config.card_limit then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.0,
func = (function()
local created_card = create_card('Joker', G.jokers, nil, nil, nil, nil, "j_half", nil)
created_card:add_to_deck()
G.jokers:emplace(created_card)
return true
end
)}))
end
there we go
oh yeah. I was looking at Invisible Joker, forgot about riff-raff
invis actually doesn't have that check 
Yeah, it was creating it regardless
you remove a joker by selling it so it's fine except it can be negative
hi folks, troubleshooting here. any reason why this WOULD correctly show the text but not actually give the mult (as in added to the mult bar during scoring)
if context.joker_main and context.cardarea == G.jokers and card.ability.extra.mult > 0 then
return {
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
mult = card.ability.extra.mult
}
end```
mult_mod
as shrimple as that
welcome to calculation hell
was this like a change or am i just rusty
we have free if-else trees, enjoy your stay
nah you're rusty
btw @frosty dock any reason this couldn't get merged yet?
https://github.com/Steamopollys/Steamodded/pull/218
yeah i am, damn
Was discussing earlier that the topic needs more work - deck manip is usually done through events, which isn't ideal. So deck effects are going to be rationalized and this will probably be obsolete
I'll merge it regardless though, it's better than nothing
deck manip is usually done through events, which isn't ideal
every time I see an event in a function I need to manipulate I cry a little inside
How do I check compatibility when applying a sticker?
sounds like you had a convo about this somewhere, got a link for me?
Ok, so I did the check that riff-raff does, but now when my card gets destroyed it doesn't create half joker when quick fix is the fifth joker. If quick fix is the fourth or lower joker it works. How would I get it to work when Quick Fix is the fifth joker and its not negative?
calculate = function(self, card, context)
if context.end_of_round and not context.blueprint and not (context.individual or context.repetition) then
if pseudorandom("Quick Fix") < G.GAME.probabilities.normal/card.ability.extra.odds then
-- Destroy Quick Fix
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
card.T.r = -0.2
card:juice_up(0.3,0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
func = function()
G.jokers:remove_card(card)
card:remove()
card = nil
return true; end }))
return true
end
}))
-- Add Half Joker to the joker slots, if possible
if #G.jokers.cards + G.GAME.joker_buffer < G.jokers.config.card_limit then
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = (function()
local created_card = create_card('Joker', G.jokers, nil, nil, nil, nil, "j_half", nil)
created_card:add_to_deck()
G.jokers:emplace(created_card)
return true
end
)}))
end
return {
message = "Destroyed",
colour = G.C.MULT,
card = card
}
else
return {
message = localize('k_safe_ex'),
colour = G.C.MULT,
card = card
}
end
end
end
Like if I want to apply Eternal for example, but I need to know if the stickers that are already applied are allowing it
oh there's no real system for sticker incompat yet iirc
oh okay
it was in DMs
I started some work on stickers but they still need a bit more work (and proper testing).
For example, if a deck started with a single card, or with thousands of cards
anyway sounds like a decently large rework of how Game:start_run(...) works in general
kinda saw that coming tbh, that whole ordering in that function is making a lot of assumptions and only creates stuff at the last possible second
yeah that's likely what it'll have to come down to
i sent you the conversation btw
Oh you mean when Quick Fix takes up 5/5 jokers slots? Thought you meant the ordering of the jokers, that was confusing for a second lol
Pretty sure you also need to handle the changes in G.GAME.joker_buffer yourself if you're adding/removing jokers, game doesn't do it for you (unless steamodded does? I doubt it)
Question: How hard is it to make it so that a card can't use strength or any of the suit changing cards?
Yeah, I meant when the joker slots are full and Quick Fix is in the joker slots. When it breaks, it should create Half Joker, but I'm guessing since when I check the number of jokers it still thinks Quick Fix is included.
Is that similar to how you manage the consumables buffer? I've done a little bit of that
i guess it'd be possible to set some flag in card.ability and hook Card:set_base to skip changing the card if the flag is set
I see. I may contact mathguy to see either how they do it or if i can implement how they do it
you should probably look at mathguy's code
he changes can_use or whatever it's called I believe
which might be better depending on what your endgoal is
you know the game Dungeons and Degenerate Gamblers?
How they have a bunch of cards you can get
That basically
I'm not sure to be honest. I'm making some guesses based on debugging + looking at how sacrificial dagger, riff-raff etc work
oh you know what, I completely skipped the part of riff-raff that modifies the joker buffer 
My DNDG mod is gonna have a base demo add-on, a texture pack, and a bonus expansion using cards from my "Crimson's Gimmick Vol 1" set
Along with a mod for DNDG that has said cards too
would that mean you just can't use sigil/ouija while holding it or are these excluded?
Example of one of the cards I'd be adding btw
can't use the consumable while the playing card is selected
(don't pay attention to the sell button)
Wait is the Trading Card Mod out already?
But what about the spectral aure mentioned? They don’t need a selection
no, that's a screenshot pulled from the thread
oh
yeah but sigil and ouija aren't based on selection
ah
good point
didn't think about that
you'd have to ask mathguy 🙃
actually, couldn't can_use_consumable just do a full hand check for those 2?
I think it ignoring them would be better, but I don’t know what mathguy has done
Try making #G.jokers.cards + G.GAME.joker_buffer < G.jokers.config.card_limit use "<=" instead
That seems to work, but it still creates a half joker when quick fix is negative, pushing the jokers to 6/5
You could do a negative check on the card before checking the card_limit
try throwing the if statement inside the event that destroys the joker
So like this? This still won't check for negative though, will it?
It's not inside the event
Like this
Yea, try replacing the <= for < back see if it works
Alright, it seems to work as intended now (hopefully). Thank you!
yes like this
I think the issue is that because you're removing it in an event, the buffer isn't updated until that event happens
having the entire if statement in it's own event should also work
Interesting. That would probably work, but I've got it working now so i'm not gonna touch it again lol
Since events are delayed, conditions checked outside of it may not hold by the time the event executes
better animation?
I think I liked the old one better 🤔
I wonder if you can add some easing or randomness to the original card rotation
really? you liked it better when they spawned in from the void like this Victin?
haha, that one's also kinda funny, but I still think I personally prefer the off-screen one
Yeah. Maybe they could come from above and outside rather than from the side and outside, but I think spawning above is quick and neat
It doesn’t occupy as much screenspace or time
It also doesn’t make me wonder about the physics, which is what prompted me to ask about easings and rotations
I thought about time too, but I assumed the animation didn't actually need to finish before the next player input?
I do like that at least for the standard names, the cards don’t seem to cover the deck name
When they come from the side
At least at this frame rate
oh I can probably stop the rotation, hang on
No I said to add more rotation
Although that would maybe make it cover the deck name
Are you using the discard pile as a CardArea?
I preferred at an angle. Straight from the side is less natural
The cards are just created off screen
What about coming from the very top, like they're being dropped onto the screen?
I like this better. I do wonder if it’s too straight, but it looks good
Or just pop into existence and then get shuffled
wh
Agreed on the too straight, one more idea, which is that this animation subtracts the cards from the decks on the left, but, unsure how viable or if it'd even look decent, because it would just leave a blank space.
I think if it subtracted from the deck icon it would need to be the other animation, but I don’t like that one as much
Might be fine if it leaves like a, lightly transparent card or something behind, either of the deck or a generic gray card, but, unsure.
Eh, maybe it would look better if the current deck moved back in and the new deck moved out
But if you switched decks in different pages Idk how that would look
i think if u lowered the hight of the animation it would look a lot cleaner
@regal wolf like this?
height is good imo, but the animation is too sparce, card should be closer together
lmao we're going full circle
Yeah it makes the deck looks like falling from above
Agreed as well.
Eh I think between top top right and the one coming from top right right I prefer top right right
I’ve come around to it after seeing the alternatives
Maybe random a bit don't come from the same place every time
Can't wait for the secret 0.01% chance animation for it to solitaire win screen into a deck.
the animation is cool and all, but my issue with it is the speed
not sure if I can change the speed tbh
surely
Yeah Cryptid would have to take ownerhsip of the stickers for this.
Although I think I also need to disable the base sticker sprites too.
Easiest way that comes to mind is just making the decks thinner by however many cards.
Either that or take ownership of the whole atlas (might also work?)
maybe less cards in animation? so half a deck starts already there
oh I could do that, sure
yeah but it also has the win stickers
stickers as small sprites when
this was a great suggestion
Silly question but if has deck has less/more cards than usual, is it taken into account for the anim?
not currently
is there a mod to skip the booster pack opening animation? Trying to test stuff and opening packs takes so long lol
You can do the movement manually
ewww no
It’s not hard ^^’
This was my first version. I had a different version but this was easier to find
Nevermind I found it
hmmm perhaps
I used two ease Events set to the table entries that controls the card’s coordinates
Because I didn’t know how else to move them
anyone got a deck mod that is significantly bigger or smaller than standard?
I do
No but I wanted to make a deck with IIRC thousands of cards; I had forgotten about it
https://github.com/SDM0/SDM_0-s-Stuff check the "XXL Deck"
sixty suits 
Six hundred suits 
anyone know how to fix
set crash reports to on for first off
no
did i screw up somewhere
never do crash reports when playing modded unless you hate thunk
need more information
what mods are you running?
i tried to add a new deck but it crashes when pressing buttons
shouldn't steamodded just disable it, really?
or does it already do that
It already does
it does that
kk
this user does not have steamodded installed
yeah makes sense how you arrived there now
what
you're directly editing the files, right?
yeah
are you aware there's other ways to mod the game?
Wdym page 1/5? How many decks you got?
lol
let me just
ok
why does it crash tho
game’s haunted
well editing base game code is hard to debug
for one because crash reports are useless without better stack trace, but also because your code is all over the game itself and there's no way to keep track of your changes
ok
I actually got that same thread error earlier today while testing for SMODS.debuff_card 
at the moment, 66
either missing 600 or 3
does a custom subclass of GameObject not get automatically unlocked?
or possibly not even added to P_LOCKED?
a custom subclass of GameObject has no association with an implied locked state
only centers do
my subclass is pretending really hard to be a center actually
because last time I checked centers didn't inject properly
or something like that
ugh what
hold on, I'll double check some stuff
here's what I had last time #💻・modding-dev message
yeah that part is a bit jank
Yeah there was an issue made that inject_class cannot be used by subclasses of a class that already has one.
inject_class doesn't run for subclasses where it's already used, inject is also called from there for objects of all subclasses
yeah, so instead I extend gameobject and pretend really hard it's actually extending center
I'm not sure what the best way to address this would be, probably modifying the default inject_class to look for functions in subclasses before/after injecting?
what would these be called... pre_inject/post_inject?
didn't flowwey say there was an issue made too?
there's just.. uhh.. 17 others
the backlog is a bit much, I can't say I couldn't use some extra hands (redeems nacho tong)
unless I'm misinterpreting that issue (I probably am), that one says stuff about obj_buffer and I believe refers to https://github.com/Steamopollys/Steamodded/blob/main/core/game_object.lua#L132?
that one should be quick to concept something for, I think I won't include it in the main injectObjects recursion though

