#💻・modding-dev
1 messages · Page 358 of 1
🤔
oh ya, was wondering, what is this for?
ah gotcha
ill probably make a consumable card like “Storm” and it will gain mult with every redeem or sth
for how balatro handles card pools
like all jokers are in the "Joker" pool
tarots would be in both the tarots and consumables pool (i think)
i changed my key to phanta_Zodiac, but when creating cards for the booster, it uses just Zodiac
possible spoiler for lis??: ||maybe ill also make it have a chance to die, #imcrying||
hopefully that solves it
oh wait it's just a case issue i think ^^ i did have the prefix
how much screentime did that butterfly get 😭
(ive never played)
its a spirit animal of one of the main characters
||which is known for.. dying a lot||
pretty shit spirit animal imo
wow that was rude
chloe price would kill you
joking i genuinely do not have that opinion 😭
ik im ironic
just thought it would be funny to have beef with a butterfly
pretty common ngl
😭
i beef with no bugs
rn im wondering if im gonna make this mod like gaming-reference themed or just references to stuff i like
they interesting
and make way too many cat jokers
i only have beef with bugs when they fly towards me at 50 miles an hour
actually there was a really big like fly like thing in my room a bit ago
i think he was asleep
any opinions on which should i do
i don't like that dude
hey he was just eepy
he could've picked a better spot 😭
small things moving towards me fast triggers my fight or flight response faster than anything else in the world
not particularly
ohhhhhh we're so gamingggg
moreso evolution of humands
i dont think thats a zodiac sign
indeed ^^
peak
this gives me an excuse to post my beloveds again
peak!! i remember seeing those :D
I hope SMODS solves the issue with Consumable Types sometime
Every mod that adds Zodiac adds to the same set
if two mods add a "Zodiac" consumeable type then they can't be distinguished in say pack pulls
easy, replace them all with Balatrostuck ones, we Homestucks own the concept of star signs
True...
4 mods and counting
uh you can do rust ffi but it's not worth it for most mods
Luckily Balatrostuck has no plans of accomodating modpacking 
To be fair there were like 3 non-Consumable Zodiacs
Andy throwing away Woody GIF but it's modded Balatro players seeing Balatrostuck doesn't support compatibility:
fair, has anybody tried it?
i think someone's tried to optimise talisman by using a rust version of omeganum?
wowser
well i guess we have to make steamodded rust api /j
You're so right they'll drop everything to play absolute cinema
Jocker solos every single Joker /j
finally a mod to compete with Joyous Spring
I meant that they'd drop Balatrostuck ^^'
That's preposterous and would never happen
Though if Balatrostuck can Dagger Cryptid I'd be happy :P
413 Terezi sleeper cells going to sleep: honk shoo mimimi
we do not talk about the Game Over timeline
Terezi 🤝 Jane
going honk
you need c bindings
but mostly fine with luajit
i see
we need rust steamodded (actually we dont but it would be pretty cool)
you have rust lovely 
do not put Rust in the Balatro, there's such a thing called "restraint"
i once saw someone call rust useless because people don't use it for ios apps
i dont knwo such thing
:3
Rust is very useful, but I don't think it's a smart idea to interop two languages like Rust and Lua
interop every language tbh
actually i can see it, Rust for low end operations and Lua for high level operations
rust could probably be useful for optimising talisman, yeah
there's a rust omeganum port out there
yeah the only issue is making it interop
i don't think it'd be too much faster tbh
Rust seems like it would be useful for changing the game at its core moreso than just adding content
you're using the outdated cool :3 language, everyone's moved onto Zig
no thanks
rust is the og :3 language
Actually no, the og :3 language is Haskell but you're too afraid for that conversation
but rust us the superior :3 language
rust is the :3 of :3 languages
nuh uh
Circular reasoning
Nuh uh!!!
Appeal to nuh uh
nuh uh!!!!!!!!
I thought the new cool language du jour was Julia
php
I thought the new cool language was lua
getting back to coding king of town. once again asking where the piece of code i was given would go
@scarlet thorn , Axy has some time at PC to describe the issue now, but not enough time to iterate on the code. The first attached picture shows the desired effect of the Joker. The second shows futile attempts to read the lovely dump and figure out how to load playing cards into the shop, and eventually re-doing this for a random Joker in the pool with a negative edition set on it.
As it is now, it tries to index local 'card' and complains it's a nil value, on line 514 in the code.
proof by assertion
polish
j_chris_griffin= {order = 151, unlocked = true, discovered = false, blueprint_compat = true, perishable_compat = true, eternal_compat = true, rarity = 3, cost = 20, name = "Chris Griffin", pos = {x=1,y=9}, set = "Joker", config = {mult = 500}},
you shouldnt use the vanilla structure
it should be like this https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
Steamodded example mods. Contribute to Steamodded/examples development by creating an account on GitHub.
what do you mean polish
is there not a way to do it on vanilla
you probably need to change Card:calculate_joker
but i would recommend just using smods unless you really cant
how would i do that
the original :3 languag
no idea
No one here would be able to help you if you try to do things the vanilla way, we all use smods
ah damn
Plus there's no benefit to doing things the vanilla way, but there is benefit to doing things the smods way
Particularly mod compatibility
And documentation
anybody knows how to do a bonus based on sth like "each time ante is lowered"?
i'm trying to do something with the Card.juice_up function, but when Talisman or Cryptid are loaded the card isn't juicing. What might be happening here?
do you have disabled animations
ok im just gonna cave would anyone here be willing to extend programming help to me for jokestar in like a GC or dev server? i am STRUGGLING here every joker i try to make
"bonus based"?
i mean like adding 0.1X mult for every time ante is lowered
ah
well, a bad but sure-fire solution is to check when ante changes in update
a better but not too sure-fire solution will be to hook to ease_ante
the second one won't guarantee because some people might directly change antes instead of using ease_ante, so the effect won't account for that
the first one is a bit more memory-consuming, but it ensures that the effect will always work, so it depends on which you want :p
hmm
thanks
ill figure it out then
no prob
Hey everyone! I'm new here to modding Balatro. I made a mod a few months ago all thanks to the amount of content on this server. So thanks for that! I have an idea for a new mod but don't think I can do it alone. Does anyone fancy working with me on it?
Which mod did you make
actually, could you link to wiki page explaining it? (if there is any)
I didn't publicise it, but it went alongside a Home Assistant integration I made to share the game state and events. I paired it with my smart lighting and LED strips around the TV to make it more immersive
I can dig out a video if you're interested
I’m not looking to participate in other projects this year, but I do think showcasing your previous project might help attract more eyes to your request
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
this is for hooking to ease_antw
as for the other approach - SMODS.Joker has update built in, you will want to use it
hmm i see, thanks
ill probably use the update then
I mean, the source code is on my GH but it was never intended to be used by others. The HA integration was locally made also. I have another idea which (I don't think) is as involved but could never get the hang of finding the right way to hook into the game
im currently a bit busy with my studies and my own mods rn - but that's really sick
The new mod idea is to do some sort of time trial. You have x number of seconds to do things. 6 seconds in the shop, 2 seconds blind selection, 5 seconds per hand (these are just example times).
If you go past 0 seconds, you get $1 removed. Maybe there's a thing where for every second you have left, you gain $1 too (idk yet).
It would be paired with a joker to slow down time (or disable the timer for x rounds), but also a voucher to double the timer
I dont know if Id be able to help with setting up that system broadly, but Ive been trying to improve the time trial jokers in Balatro Goes Kino, which would be code very easily transfered to a system like that
I think something happened to your last sentence
It might well be this exists already, but I couldn't find anything
Cryptid has something similar I think
anyone looking to help out with making the example mod im working on have better explanation
With a Boss Blind
Ohh I see.
What's the mod?
I had also joked about a SUPERHOT mod
Haha, that sounds cool
ohh that would be funny
Biggest issue for a time-gate mod would be having a neat UI, I think. Most of it would easily handled with a dummy joker and a timer in an event!
Jimbo only moves when you do
The joke was just that it would make the game awful/impossible to play 😅 maybe it could be made into something playable, but then it wouldn’t be a joke
This is the thing. I found it hard to know how to make good UI. Seems quite involved.
Also my other mod idea that I did have working was "Balatro Sabotage". It actually worked well but I got blocked by the UI system as it was too confusing. Basically, it starts a webserver and allows your friend to sabotage your game. I have video for that too. Hold on
I'm up to help out. Also, N is working on remaking all vanilla jokers as smods' jokers for similar purposes. It's hard to judge what the help would be with, though!
literally anything from the code to suggestions on how i could clarify on some things
im bad at explaining things, that why my mod has almost no comments lol
There was a mod to connect Balatro with Twitch I think
I made a nice little web UI for it which I was proud of but yeah, I was skill-checked when it came to making Balatro do stuff
It's easier than expected if you wanna do simple things, and a nightmare for very complicated stuff. If you have some ideas as to what you want to have it look like, I can try and whip something up. Also, perhaps Breeze builder would be okay with having it use his system clock mod UI in some way?
why and how did this person appear out of nowhere and started posting extremely cool stuff
😭
what
I think using the speedrun timer mod makes more sense
Wait me?
I can take a look and see if there's anything I'd be able to contribute. Is there a thread for it in any way? Might be handy so I don't forget immediately after putting my phone away, haha
Haha, thank you. I'm looking for someone to work with
the talk abot it mostly happens in the cryptid server
There's a subgenre of programmer that just does cool stuff and doesn't post about it. Strange to think about, I know
i really hope you will find one soon, because these projects are super amazing - and it actually shocks me that I've never heard of them before
they keep cool shit to themselves, unbelievable 🥀
I expect the clock to be somewhere in the UI, same font as the game. I want it to look native. I can probably do most of it but get blocked on:
- The best way to write logic outside of Joker calculation functions (for things like global events or general state checks)
- I am pretty sure I can't do the art. Else it would look like a 5 year old did it
Ah. I should check there more often, I think. Seems like there's a whole separate side to the modding community there
Thing is, I love sharing my stuff, I do a lot of cool stuff in my own time but don't like sharing it.
some mods do a dummy joker for the first one, I hook SMODS.calculate_context but that's a bit less flexible
Haha, I get it. I just mean that there's a lot of people who share their stuff with friends, or only when it's finished, compared to a lot of people that are active here basically logging the entire mod process from not knowing how anything works up until a release
Ohh nice
Depending on the specifics, I think the easy way to do game mechanics is with fake Jokers
i actually still remember you posting your progress here at one point
before you released balatro goes kino :3
i think it was about the uhh cards with popcorn + theatre curtains?
I see. This is insightful. I thought I was proud of my mods until I tried Cryptid and saw the Code Cards and then cried inside
This was the mod for that Sabotage example - https://github.com/mrdarrengriffin/BalatroSabotage
Cryptid's cool to play with, but also a huge community project with a lot of spaghetti code, haha. I tend to be as impressed by the people that write that code as those that are still able to read it and get what it does, haha
new project: cryptid remade
New project: Cryptn’t
Cryp-dont
But the UI stuff for a clock seems pretty doable 🤔
Also, to see some impressive code in a Balatro mod, I'm going to plug #1338302514616995892 again, haha
Crypt-idn't
Every joker is a couch gag 
I'd also be up to do some pixel art for jokes and such, Darren
Oh sick. Thank you!
Would you rather have a Simpson or a thot daughter? 🤔
Is the daughter Lisa Simpson?
On that note, I should figure out why this alien Abduction stuff keeps crashing. I was gonna debug today but instead I've just Clair Obscur'd
I suspect Kino and JoyousSpring are already a nightmare mod combo anyway, so bet few things can make it worse haha
If I want a nightmare mod combo I put on Brainstorm and Saturn 
what happens with incantation + saturn
ok #1370445159690666105 forum made
Nightmare blunt rotation
okay fire, havent coded logic yet and i think ill leave it for later
Maybe I should make forum threads for the Sabotage and Time Trial mod ideas
definetely. Even if you don't use it to chat, it'd be something to link to
hello im looking for a dev that would be more ui centred for my mod i need like title screen changed and some other miscellaneous things i will pay you dm me if interested
I did a quick mockup of the UI for the timer, but nothing crazy.
hi, someone have a sample of triboulet or any joker when a card score do something?
omg ty!
does anyone know enough about smods to tell me why this doesn't work now so i can fix it? (it did on an older version but more recent versions dont)
Wow you even got the unlock conditions in it that's cool
im only missing the sprite manipulation stuff
and testing
Just wondering, is it safe to call a value from context.scoring_hand in the first check?
for hanging chad
You can replace it with context.other_card == (context.scoring_hand or {})[1]
steamodded vscode extension when
Steamodded has an LSP
now
some mods allow you to play no cards, or unscore all cards
i think i copied this one from vanilla but i can test it
oh really, didnt know
that's fine, it would just be nil
No but like wouldn't it give a "context.scoring_hand is nil" error in some contexts?
would it? idr if it would crash
I think it does that's why I'm asking
it's probably fine
Well, your concern is correct, iirc
repetition seems to be always called with scoring_hand in G.play
oh wait i think i understand what you mean now
lua evaluates from left to right so I know scoring_hand exists if the first two checks passed, if not it returns false early
Oooh I was wondering why in my early days of modding some context would crash randomly (I wasn't familiar with lua at the time)
hi, im trying to make a card that upgrade each time you play a hand with stone cards, i think i need to add a context to know when a stone card triggers
so do you want the card to upgrade every time a stone card is scored, or once if the entire hand contains any stone cards?
yeah when is scored
in the first if condition just add and SMODS.has_enhancement(context.other_card, "m_stone")
yea that's all you'll need to do
Any reason you'd use in_pool instead of the enhancement_gate? SMODS has it too
to have an example
same with the unlocks
Right
bruh i just got on to test a new thing i made and you really out here giving me the soul NOW?
don't know if modded codes even correspond to anything unmodded but instant soul if they do lmao MG9744A7
lmaoooo
should I change the context to if context.before and next(context.planet_use) or something like that
what do you want to do
every planet card used, gain +5 mult (currently +0)
ooo I forgor abt that jonker
can i get help in this channel or nah bc nobody will help in the chat channel
this is the help channel yeah
yay
so like i use bmm for mods cuz i really only play vinella+ and somtimes cripted but i want saturn and its not on bmm and when i downloaded it idk how to get it into bmm
oh, this is for coding help
question for anyone who has stared at the source code enough: where do the magic numbers in the pseudoseed function come from?
im pretty sure they are just chosen/generated to give random enough looking results
idk if they mean anything
im mostly interested in reverse engineering the rng algorithms to try and find cool bugged seeds
i dont really get how to make joker descriptions like Steel Joker, can anyone explain pretty please
loc_vars?
do you have an example in code
(Im dum dum and wont understand without seeing it in actual code)
amazing comedic timing
Random question since it seems to be undocumented and I wanna check before I try, but can I run context.individual through G.consumeables?
my mathematical understanding of the function is that it is a chaotic function which will likely not have more than one or two true fixed points (besides nan). but those fixed points as well as some cycles could still exist, floating point rounding willing.
Ok, so with this code, it shows up, but when I try to discover the joker with devmode mod it crashes
is there anything about events on the smods wiki? been trying to find smth
ty
@red flower I saw your comment where key_append allows an added card to identify its source. Where is it actually on a card? Like card.key_append ?
I am trying to make a joker that gets stronger for each consumable held in a specific set using this:
function get_arrows()
local arrowCount = 0
for i = 1, #G.consumeables.cards do
local card = G.consumeables.cards[i]
print(card, card:getQty())
for i, v in pairs(card) do
print(i,v, type(i), type(v))
if card.set == 'Arrow' then
arrowCount = arrowCount + (card.getQty and card:getQty() or 1)
end
end
end
return arrowCount
end
I'm not sure how to check the set, as it seems to be absent from the cards.
it (should) get passed to in_pool as args.source
It's card.ability.set
thanks
Oh so it's just used for that, it's not given to a card?
yeah
Damn
maybe I could make that more clear
is there a flipped E (Ǝ) in the balatro font
the delay here feels like its taking way longer than it should, if after not the correct trigger to be using?
that feels right based on vibes
why are you flipping thunk
(I don't see any errors)
couldnt think of a variable name
cant use context's inside events afaik

Have a phone video bc I cba opening obs lol
It doesn't 
it gets flipped at the beginning of scoring and gets unflipped after all the events before are done, so the delay doesn't add much
try doing everything in an event
so after in the events thing takes place after everything?
makes sense i just wanna clarify
you name it center in the loc_vars parameters but use card after, stick with one (preferably card)
yes, basically during scoring everything not in an event gets processed in order and then everything in an event is processed in order
How does one stop particles from being created?
G.E_MANAGER:add_event(Event({
func = function()
held_card:start_dissolve()
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger='after',
delay=0.7,
func = function()
held_card:remove()
card.removed = true
return true
end
}))
i don't think this is properly destroying the cards.. it seems like it still remains in G.playing_cards?
is this during scoring?
if its all in the event theres no delay between the card flipping and unflipping and its then too quick
put another event inside the event
or something it's a bit trial and error
Or how does create a card object without creating a card?
hmm make the card invisible?
i just removed the trigger after so it defaulted to immediate and kept the delay how i originally had it
Does anyone know Extra Credit's policy in terms of looking at their code for reference?
Extra Credit, the mod by the people in Balatro University's community
I've never heard of a mod trying to tell people not to
There is a policy?
"policy"
I just want to know if they'd be ok with it
Something in the past happened with Polterworx about "stolen code" and since I plan on eventually releasing the mod I'm developing I'd prefer if that didn't happen
That was art I'm 99% sure
Not cods
I remember it being also code
Though don't look at extracredit for anything enhancements related. They use the quantum enhancements stuff which is pretty unstable
I was interested more so about how to make something "can't be debuffed"
What do you mean by this
I’m pretty sure almost everybody here will be fine for you to look at their code, and if you copy it to use yourself just put some credit somewhere stating where it’s from - it stops all discontent from happening straight from the off
I'd feel safer if there was an official statement, I could ask one of the developers, or I was told how to do the thing I was aiming to do without having to look at it
Well, the very fact hay extracrwdit uses the newer (get_enhancements instead of has_enhsnvement seems to be why that one stack overflow only happens when it is installsd
The one with aetherjokers
And I presume that's not the only such isssie
lol @ the 🇵🇭 reacts
No that’s a coding issue in aether jokers
Then why did it only happen with extra credit also loaded? Geniine question
Curious, why exactly is it preferred to use G.GAME.Blind instead of self within the SMODS Blind methods?
Yes, but creating every common joker at the same time makes the game hard crash.
Without seeing your entire mod list, I’d assume extra credit is your only mod that’s enabling quantum enhancements
Maybe unstable was the wrong word. I presumed exactly that and meant that enabling quantum enhancements might cause unexpected behavior with mods that don't do so, even if it technically was never the right way for then to have been using it in the first place
As long as mods do their calculations correctly quantum won’t cause any issues at all other than a slight performance hit, hence why it’s optional
But making a "fake card" with similar properties works mostly fine but it comes with a lot of issues.
I mean... Mods that don't tale into account he was that get_emhancements existing chamgr how has_emhsnvement works aren't really doing anything 'wrong.' He documentation isn't clear on the fact that happens
It’s not that, it’s calculate functions they aren’t targeting specific contexts that is the issue, and there are lots of other things that will crash when you do this anyway. Because of how calculation works with using one function over and over, you must be very specific on how you ensure you are only having your code called at the correct timings
Yeah that's fair
Artherjokers has a fix for its issue j haven't been able to test yet because when I update everything in my nodpzbk, it just crashes at boot, lol
It isn't caused by aether either
Idk what's doing it
And yes this is the who I e tracebsck. It's a hard crash
It persists when I restart my computer
trying to make a joker that sets hands to 1, but it just sets it to zero. replacing nil with +1 just makes the game crash
yeah fixed it on my own by doing this
is this too op
This is a better campfire without the downside
If you made it the same increase as campfire, i think it would still be legendary-worthy
Especially because you can reroll the shop and get hella jokers to sell
Oh wait, it’s every 3 jokers
Ok yeah I think the 0.5 is good
I think onus a good legendary
Barely a difference
Lots of jokers are cheap, and riff raff exists
Specific synergies don't real ro me, but fair enough things like riff-raff do exist even in my giant pool
That’s fair
With each added joker, synergies between two specific jokers become harder to acquire
Also a riff raff doesn’t even give x0.5 per round
So it’s not a major synergy
Also also, you need space to hold the jokers
the downside is that it takes up one of your joker slots
o
trying to make a joker that sets hands to one, but if you have 2 of them / blueprint the effect will activate twice and you will usually have negative hands. tried to fix this with the "and G.GAME.current_round.hands_left >= 2" but both still activate
you need to calculate the amount inside the event instead of outside i think
changed to this, both still activate
I think enough time has passed that I can bump this
what does cyanosis do
very cool, seems fairly balanced imo
and what do you mean by "doesn't work"?
sorry. I'm willing to get pinged, and hopefully Eremel. let me think
Whenever you lose scoring mult (think
) this card gains 10x the amount of chips
The chip gain doesn’t trigger
can you show the joker code?
let me just get to my computer rq
but no error message/crash log right?
yeah just nothing happens
like I said it used to work but I forget when I did but I updated smods and now it doesn’t work
the code relies on calculate_joker(), better calc might mess with things then
hm, in theory it should still do something. hm
this is absolutely doing absolutely nothing i have no idea why :(
what is the card.ability.extra.chips > 1 check doing?
talisman
if it starts at 0 how could it ever gain chips?
Use SMODS.calculate_context instead of doing a calc joker call
You don’t handle the return table here
(i literally have never seen that in my life)
It should still gain chips though
it has two conditionals, and both are guarded by a >1 check. I think it does nothing
.
all i did was comment it out when it stopped working
only now am i actually changing stuff
the intended check was probably: if the joker's chips > 0 in the first part, give +chips; no condition for the second part
how can i make an enhancement which copies itself to another card?
the chip gain is before the scoring though
Instead of the whole loop you do SMODS.calculate_context({context table here})
The only if statement you need is the first one thet compares the mult values
-# ewww to_big 🤮😂
not even the one that looks for the specified?
yeah not even that. if to_big() < to_big() then SMODS.calculate_context({...})
Yeah, just send the context to everything anyway
You can narrow it down to only when you have your joker if you really want to, but it isn’t necessary
your joker will be responsible for responding to the context you pass in, other jokers will ignore
i think it was like that before as a "just in case"
jeez, sorry. there's like 2 people I missed other than you.
If you did want to do that though, I’d suggest using if SMODS.find_card('joker key') then
don't forget next()
Oh snap you are right
was about to say i need next() right
Mobile typing whilst tired is not the thing 🤣
Whar
i forget all the time
this chat moves so quickly. comments get lost
I unfortunately could not tell why your joker didn't work, Eremel?
I’d need to see more of the code
dude selling_self is so weird stg
It looks like it’s nested within a different condition
bumping this comment
it might be a bit more difficult than normal. what do you want to happen
I feel like I put it in the wrong spot but I can’t check right now power went out 
when playing a hand with a card enhanced with this enhancement, have a lets say 1 in 3 chance to turn other scored (unenchanced) card into the same enchancement
could this have been happening because i forgot to close balatro on my other pc?
that sounds so strange if true
IT WORKSSSS 🙏 thank you guys
no idea.
adding context.before makes this not work but i want it to change the rank of the card before scoring, anyone know how i could do that?
sorry I'm trying to find a clear example from another mod for card copying
dw lol
i worded it iffy tho, its not really coping, moreso changing enhancement
context.before and context.individual are not friends, and context.other_card only exists in context.individual
why is yiur pfp the default one? You're very helpfuk and insgihtful for a default pfp :P
well I was a very private person. until recently
if you use context.before you would need to manually iterate over played cards
fair enogh really :3
ejwu2 is now publicly traded
buy your ejwu2 stocks now
ejwu2coin hype
bring back ejwu!
the trouble with adding enhancements to cards specifically during scoring is that Midas Mask has this weird thing with adding enhancements, but then not displaying them until animation time. but I think you can go with Midas Mask as a reference for adding enhancements
I think that account had a blue default profile pic
ejwu^^2
who knows
same tho
i guess? good idea tho idk if im going to manage to do it since im not that familiar with lua tbh but ill try
Oh he was grey 😢
5 whole dolar
yknow.... git commit should just default to git commit -a -m "updates" :P
I'm sure that wouldn't be a terrible idea at all
lmao
Egg (the moderator) has a new competitor
I've probably typed that exact command hundreds of times
i see, ty
that -a is such a footgun, you should instead git add "$(git rev-parse --show-toplevel)" && git commit -m "updates"
you can define custom git commands
I like git tree
which could be git dog or git god
git log --graph --oneline --decorate (actually I don't remember if it's one or two hyphens)
just upload all the files manually to github
I never happen to be in a sub directory, most of my sub directories are just submodules
just do it like the olden days and send updates by email
(pre-github)
and well... the -a I'm unconvinsed does anything because I still have to do git add . first if I actually did add files
(or in cmd, for /f "usebackq tokens=*" %i in (`git rev-parse --show-toplevel`) do git add %i && git commit -m "updates")
the -a only adds files which are already tracked
which is why it's a footgun
ah, see shows how little I know about git
lol
Whats the var for the total mult right before its calculated with chips?
is it possible to have a variable that persists change between runs (yes) AND even when the game itself is reopened? (the variable will reset anyway otherwise)
i figure it's something to do with storing information in the prof- holy shit
I'm not sure what adding already tracked files even does
ngl
save it in the profile somewhere, probably
it tells git to add the updates to them
mult
oh that's nessacary then with my submodule heavy repo for my modpack
wait it really is just save it in the profile?
i think
I saw that in the code, is it just mult is that how i call it?
yeah. make sure you save it in the right save file though. I can't remember if it's meta or profile.
and my submodules aren't at the root of the repo, they're in ./mods
everything i actually edit is in that folder
im running a separate instance so i only have the one save but thanks
are there any examples i can look at for saving stuff to the profile or no
(also it's profile since uhhh meta uses booleans and im doing a counter)
ok it should just be something like G.PROFILES[G.SETTINGS.profile] = ... I think
submodules are painful in their own special kind of way. good luck
Can you tell me how to make j5 when appearing on your hands remove for example j_mad and j_you?
I've been doing this for months so I think I got it down, lol
just recently learned how to change the branch of a submodule properly
they also make life awful for anyone else downloading your code
the github download as zip button Does Not Work
which is why i provide a mods.zip
with everything already cloned
git clone URL Does Not Work
it's just a massive pain point for anyone used to doing it a certain way
yes i know that but it's painful to figure that out
I don't target git users anyway, especially saying as main is never stable
hence the release zip
can you describe what you want to do
which I am aware is a violation of any non-OSS license, but I'm still convinced that steamodded mods have to be gpl compatabile. Regardless if I get any complaints i deal with them respectfully
Let's say when I have j_name1 j_name2 j_name3 j_name5 appeared in my hand and removed all the ones before it, let's say I have to assemble a constructor to get the part 😀
do you have a language you would prefer to english?
so unless a mod was causing the crash and was fixed in the last 12 hours, this was it
which is weird
Yeah, Spanish.
like... how did its ass know the filesystem was initialized on another pc?
damn love.https
sorry! just say what you want in Spanish. Hopefully someone understands. My spanish is poor
I think this is an English only server
unforutnately
wait, you HAVE to speak english???
yeah a lot of servers do that to make it easier on the mods
Simply put I need when I put together a collection of j_n1 j_n2 j_n3, then a special joker appeared and removed the previous ones.
I know what you mean
How does one get the return of a vanilla joker without having a card to input?
basically they want a joker to spawn and delete the requirment jokers when all are obtained
it's a gimmick I've seen before
yes, it's clear
No, everyone here speaks it
but also yes
Great, I hope you can help me
You're right. That's exactly what I need.
Not sure what you mean by this- not just, call calculate_joker and check the result?
You need a card for that.
so it's actually not too hard, in the set_ability of each joker 1-3, add a check that the other 2 exist, and if so, spawn joker 4. In the set_ability of joker 4, delete jokers 1, 2, and 3
not set_ability; I think you want when the joker is "added to deck" (I can't remember the name of the context)
you use set_ability, not add_to_deck because add_to_deck retriggers when it's undebuffed
afaik
And creating 150 jokers at the same time every time a context is calculated is not ideal.
there is a value for that
Add a joker in the presence of others I have already done, I need now to remove them in the presence of the last one
no, set_ability is definitely incorrect because it runs when the joker appears in the shop
ah then you do add_to_deck with the check for the undebuffed thing
my bad
for what purpose do you want the returns? description? simulating the joker?
All jokers in one joker?
Add a joker in the presence of others I have already done, I need now to remove them in the presence of the last one
that's in the last joker's add_to_deck
delete one of each of them (incause you have more than one cause showman)
hm, in that case you probably can just pass the one omni-joker as the card. but forcing the requisite calculation functions to run even when card.ability is not actually equal to the one in question might be slightly awkward?
They could be in any order and it would still work
I mean the last one as in the 4th one spawned that deleted the 4 requuisites
unless it itself can be a pre-req
you can use SMODS.find_card to locate the jokers you want to destroy. To destroy them you can look at an example. Maybe Ceremonial Dagger?
where are the consumables in the source? i can't find them in card.lua
That's right
yeah, though as i said make sure it only deletes one copy of each
Card:use_consumeable in card.lua
or else people will be kinda boned with showman
alright, thank you
ah i spelled it wrong
thunk misspelled it, really
ther're not just c_moon?
they're not there directly. look for suit_conv
they're looking for where their effects are defined I think. not the original definition
ah i see
yeah im just trying to see how card suits are changed
but it should still have the keys there?
change_suit keeps breaking
all of them use the same logic so searching for moon unfortunately doesn't work. suit_conv I think
damn thunk and his schizo codebase /j
you prolly want to use SMODS.change_base instead?
i see
also wait... what if a suit and rank have the same key?
that seems problamatic
like a club of clubs? a king of kings?
Probably not a problem, actually.
because one can be ommited, how can it tell which you mean?
Internally, that function just writes 'S_R' as part of the card key, so it doesn't affect anything
Where s is suit and r is rank
yeah you omit it by using nil for the suit
It's part of the consumab;e contructor
consumabletype constructor rather
Tried it like this, it doesn't work
or do you mean like... a whole subtab just for the things you add regardless of type?
because if you just mean a tab for each new type, that happens automatically
I want to make a type of consumable, called Objects of Power, and I want my Objects of power to be found in it. If that makes sense
yeah, use what i linked
Okay, thank you
SMODS.ConsumableType
How does one prevent this?:
can use this base if you want
SMODS.ConsumableType({
key = "key",
loc_txt = {
name = 'name',
collection = 'collection name'
},
primary_colour = HEX('000000'),
secondary_colour = HEX('000000'),
collection_rows = {6, 6},
shop_rate = 1,
default = 'c_prefix_key'
})
Thanks!
np :3
how did this happen?
stretch it out
SMODS.Enhancement {
key = "infected",
loc_txt = {
name = 'Infected'
},
atlas = 'enhancement',
pos = { x = 0, y = 0 },
calculate = function(self, card, context)
if context.final_scoring_step then
for _, scored_hand in ipairs(context.scoring_hand) do
if scored_card() then
scored_card:set_ability('m_infected', nil, true)
G.E_MANAGER:add_event(Event({
func = function()
scored_card:juice_up()
return true
end
}))
end
end
end
end
}
how can i make this one work like a consumable? as in trigger the action when played
I think one of the jokers it was replicating was trying to remove itself.
it really does show that love2d is a 3d framework, lol
becayse the floating of the sticker is real and in the 3rd dimesnsion
Why final_scoring_step?
Also you need your mod prefix.
if im in context.before how would i assign a card that returns true on an if a variable?
welp i just thought that it would be the best, it would add enhancement to other cards after they are scored
but first i need to make it work like an enhancement lol
No? It would be context.main_scoring and context.cardarea == G.play?
oh ok
I was very carefully stepping around this issue- you could make it happen before, during, or after scoring. all have their own quirks
But since the card it is removing is a fabrication of a card it does that, I think.
after this. so that i can refer to the cards in g.hand.cards
I touched my atlas (to change where it gets the pngs and such) and now its broken
Idk what to do :(
what did you change?
I changed the Atlas name & the png it uses, and I already made sure all the jokers had the right Atlas
Code?
SMODS.Atlas{ key = 'TahModAtlas', path = 'DahrinJokers.png', px = 1208, py = 1616 }
px and py are for individual jokers
not whole file
oh
card is equal to the joker that got added to deck. You should locate the jokers j1, j2, ... by calling SMODS.find_card(j1),... then destroy those
Fuck
how would i check for if it's the end of the round but outside of a joker?
So do I just take those out...?
context.end_of_round?
no
71 x 95
Oh
71x95
On that topic, is it possible to specify different sizes for different images within an atlas, or would it be simpler to just have different atlases and switch between them?
I'm gonna hope that fixes it
should help at least lol
Hopefully
so i need it outside of a joker
which means no calculate
im talking main lua
It didn't fix it, but I do wanna know, my jokers are that size so is it gonna break their images when it does eventually work?
I understand, that's why I'm asking how to do it?
your mod functions run when you tell them to, you don't need to put then in an onject's calculate function
so i can just
(ignore the intellisense)
No?
with hammers you are killing me
Hammers.,,,
would you prefer rocks
What are you trying to do with the crimson count thing, anyways?
if you are asking how to use the function, it's listed in https://github.com/Steamodded/smods/wiki/Utility SMODS.find_card(key, count_debuffed) -> table
You can also find documentation in the lsp_def folder
aah link
I think you're totally overrwriting context.end_of_round? if this does anything at all
i want a counter that increments each time you beat specifically the crimson heart
but if i dont save it to profile itll reset if i reopen the game
I mean the counter is fine to put on the profile, though it does already exist i'm pretty sure if you want previous wins too
Wouldn't you be able to do that in calculate or a hook of Blind:defeat?
it's for an unlock so im not sure
the hook maybe i'd have to actually look at Blind:defeat
Mmh, a hook for Blind defeat seems good here
just gotta make sure to put it OUTSIDE of the for loop lmao
do not need it hitting on every joker
is there a way to force my Object's of power to use a specific shader?
surprisingly with all the extra stuff tracked on the profile, that isn't something that is
kinda a shame
The draw function or DrawStep?
so since im hooking it i do need this
G.PROFILES[G.settings.profile].crimsonCount = 0
still right
so it saves to the profile
"Failed to collect file data for Atlas" does anyone know a solution to this...? My code for the atlas is right here if that helps any
G.SETTINGS.profile
yeah. you can just set a value directly, the game should automatically save it
how do i apply the shader in the draw function?
download more RAM; but actually, I wonder if that atlas is too big
will i still need to ret in igo though
I know there's a limit to how big they can be
Oh
igo? is that talisman
nono
Yeah that's probably the issue
I can make multiple Atlas's right?
Yes
oh, init_game_object. shouldn't need anything related to it; you can just assume the value is nil to start, and do the classic x or 0 pattern
well... whenever it saves the profile in general. I did need to force it to save when i did my profile editing scripts
but that was just through the debugplus console and not in a run or anything
right, sorry. you should probably force a save
also hopefully there's no race condition with savescumming defeating the boss. I wouldn't worry too much about that though
I think it saves the profile whenever you exit a run, so it's fine
bump :3c
or in some sort of situation that happens all the time in normal gameplay
have you checked the docs for those?
I wish I knew enough to be able to help other people
ive checked, i havent seen aynthing
I'm still shcoked that the blinds have literally zero stats tracked in the profile
nothing
the only thing boss related is 'boss_streak'
which wouldn't be surprising just looking at the stats screen, but there's all sorts of unused values there
in the profile itself
the code that's run is the func field of the DrawStep. (assuming you're going that route, I guess you have a choice). Is the documentation unclear?
What other functions are there besides calculate?
ive only seen draw(self, card, layer) but, i dont know where to go from there
i just dont know how to have it apply a shader
draw = function(self, card, layer)
card.children.center:draw_shader('shader', nil, card.ARGS.send_to_shader)
end
``` Perhaps?
Each class should have a list of functions in the https://github.com/Steamodded/smods/wiki. be careful, it might be a little out of date. You also will see functions from Balatro itself. Unfortunately the only way to understand those is reading Balatro's code
making a joker that sets hands to one, but when i have more than one of the joker/blueprint it activates on both, leading to negative hand size
and not context.blueprint?
currently trying to make this in context.before so i need to use a for and go through the cards
if context.individual and context.cardarea == G.play and SMODS.Ranks[context.other_card.base.value].key == card.ability.extra.currentrank then
babacard:flip()
assert(SMODS.change_base(babacard, nil, card.ability.extra.newrank))
G.E_MANAGER:add_event(Event({
delay = 0.1,
func = function()
babacard:flip()
return true
end }))
end
not sure how to add the applicable cards into a table
this is where im at this it 💀
i just copied the code from burgler joker and changed it slightly, if thats causing issues i can get rid of it
oh that's what you meant, my bad
if context.setting_blind and not card.getting_sliced and not context.blueprint then
works for if its being blueprinted, but not if i just have 2 copies of the joker
Here's what worked for me, I just added it to each joker)
Can someone help? I'm creating a Joker that whenever a joker is sold, there's 1 in 3 chances to a joker from a table to be created...but I am having problems to "creation" part . How i'm suppose to make this?
you won't use a return for that effect
oh
instead you'll use SMODS.add_card
CHASEOQUESO
hi
remember the Tralalero Tralala joker?
uh
glad you got it working!
is it add_card or create_card?
To add another Atlas I can just copy the first Atlas and change the needed parts, right?
SMODS.add_card
oh i got it
add_card uses all the same arguments as create_card, but add_card puts the new card in the cardarea it belongs in
create_card just creates it
like this?
o7
card instead of self on the odds
good catch
truee
i have one doubt about this...
I just solved the problem I was about to ask about
the key for all my mod jokers is "X_brainrot"
X being the name of each brainrot
can I specife this in the key = (...)?
keys for jokers added via SMODS are always j_[your mod prefix]_[your joker's key]
but yes
what I would use for specif joker names?
got it o7
so you want it to create a joker from a table of jokers?
yes
but no, because the table are jokers with "_brainrot" in their names
i used this to tralalero tralala
the way I would probably do it is by using key, but in order to make it a random joker from the list, you'll need to randomly select a joker using pseudorandom_element or something similar
not a set table
so you would need to create and store that table somewhere
okok
and then do this ^
forgot to ask but was this literal like i PUT x or 0 or do i put something instead of x
er, basically (x or 0) is a way to say, if x is nil, the result is 0, otherwise the result is x. to avoid an error
it wasn't very specific no. put whatever you want in x
variable = variable or 0
no i get what it means i just meant it literally
or in general just the second part to ensure no nil values
pretty sure other_card wont work in here, how could i get this to function otherwise? (also idk that it would)

I think v:get_id() would work here
unless currentrank is a string and not a number
I like keys they make good noises
aight ty
Is there an example mod thing for enhancements?
do you have a loc_vars function yet?
it would seem not, but looking at other mods is always a good start
Ah damn, here I go searching again
I stand corrected
Yeah that seems like it
Thank you mate :D
return { vars = { odds = card.ability.extra.odds } }
so how would i do a hook for blind defeat here
it's not in init game object right so how
local defeat_ref = Blind.defeat
function Blind:defeat(self, silent)
return defeat_ref(silent)
end
Hi, so i was wondering if there's a way so a joker changes all hands played into High Card??
local oldblinddefeat = Blind.defeat
function Blind:defeat(silent)
-- code here
return oldblinddefeat(self, silent)
end
the card in question lmao:
The code should sound like this?
local odds = card.ability.extra.odds
return {
vars = { odds = card.ability.extra.odds }
}
end,```
You don't need to define an odds variable outside of the return in the first place
oh i was just overthinking it ok
thank you 🫶
it's already defined
is this fine
my logic here is probably very wrong, could i get a proof read pls
local baba_cards = {}
if context.before and context.cardarea == G.play then
-- Sort cards into baba_cards
for k, v in ipairs(G.hand.cards) do
if SMODS.Ranks[v.base.value].key == card.ability.extra.currentrank then
baba_cards[#baba_cards +1] = v
end
end
-- Convert cards in baba_cards to newrank
for i = 1, #baba_cards do
local babacard = baba_cards[i]
babacard:flip()
assert(SMODS.change_base(babacard, nil, card.ability.extra.newrank))
G.E_MANAGER:add_event(Event({
delay = 0.1,
func = function()
babacard:flip()
return true
end }))
end
end
How do i make this a 3 x 3?
I have the code like this rn
SMODS.ConsumableType({
key = "OOP",
loc_txt = {
name = 'Objects Of Power',
collection = 'Objects Of Power'
},
primary_colour = HEX('000000'),
secondary_colour = HEX('000000'),
collection_rows = {4, 4},
shop_rate = 0,
default = 'c_o'
})
i tried 3, 3 but it didnt work
collection rows
how would that even work actually
its {3, 3, 3}
those look great btw
its how many you have per row
i moreso meant how would it look
o7
oh it just changes the box size
yea
v cool
Woah
the cards look really nice
^^
This is how I make selling a card create a random joker?
I wont lie, they are placeholders that were ripped from the game Control and then shrunk down
understandable
set = 'Joker'
currently doing nothing when i play a card
try removing the context.cardarea check
wait what is G.hand.cards again?
the cards in the player's hand that they didn't play
ah i am doing it in the wrong place then
it isn't spawning nothing when I sell a Joker 😭
can you remove the random part just for testing
Does anyone have a good example of have to make a fake joker. I assume there's a way to hide it and stop it coming up in games
I added two "Oops All six"
in_pool = function(self, args)
return condition_for_when_this_joker_should_appear_in_shops
end
Thank you
I still think there's something wrong with it in general, please try removing it
I have this now
area = G.jokers
Also you don't need area I don't think.
Is pos required if you don't provide an atlas
add_card is smart enough to know where cards go
No.
Cool, thought so
pos and atlas have default values
What about cost, rarity, etc.
Ohh yeah. Sorry didn't see the split in params for optional
technically only key and a localization entry are required
even removing the randomness, it isn't spawning nothing
did you also do this suggestion
yeah
and can you show the whole joker just so we can see easier
of course
assuming G.play.cards would work with cardarea == G.play then?
key = 'bombardino_brainrot',
loc_txt = {
name = 'Bombardino Crocodilo',
text = {
'When a Joker is sold,',
'{C:green}#1# in #2#{} chance of creating',
' a {C:attention}Italian Brainrot Joker{}'
},
},
atlas = 'Jokers',
pos = {x = 0, y= 1},
config = { extra = {odds = 3} },
rarity = 2,
cost = 5,
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
effect = nil,
soul_pos = nil,
loc_vars = function(self, info_queue, card)
local odds = card.ability.extra.odds
return {
vars = { G.GAME.probabilities.normal,
odds
}
}
end,
function(self, card, context)
if context.selling_card then
SMODS.add_card {
set = 'Joker',
area = G.jokers
}
end
end```
you didn't put calculate = before the function!!!
lol all good
I would try removing the cardarea check completely
based on the current code I think it will probably still create jokers if you sell consumables
you should test that
i need help with a joker effect. when the joker is triggered, i need the game to pick either seals, enchancements, or editions, and then apply a random one of the chosen modifer onto the current card
what did you do to trigger the crash
something something G.P_CENTERS
but I'm not at my pc rn so I can't check specifically what you're looking for
honestly idk
also how does pseudorandom work? what does it output?
isn't there a smods buffer pool for the in_pool ones of these things?
just in case
maybe, not something I've worked with before
a number between 0 and 1, but seeded
alright
sorry, the game opens normally, but when I sell a joker it crashes
can you show the full crash log
how many decimals?
working now tysm!
that's a question for someone who actually knows lua
lol ok
idk how lua stores floating point numbers
It's kinda massive, how i send it?
Paste it in?
It'll auto send as a file.
Sorry If I'm being stupid again. How can I get the fake joker to trigger on every hand.
I can see it loaded but want to make it fire every time a hand is played.
You mean before the hand scores?
Whenever, before or after. I just want it to trigger. I am just testing my first fake joker
The right image is in my collection, not my current deck. I presume I need to tell the game to add it
Replace context.joker_main with context.before?
