#💻・modding-dev
1 messages · Page 173 of 1
time to fight your fears
AHH
you could maybe add an add_to_deck function?
You can try add_to_deck like this
add_to_deck = function(self, card, from_debuff)
if not from_debuff then
end
end,```
and use SMODS.add_card for X Y and Z
yeah
try a more #895129
flip it so it doesn't read as a C
checked how cryptid does it and its just this
gonna admit im not too familiar with lua but what the hell you can just shadow function names like that?
I am a beginner, so i'm not sure how to do this. Would this work for setting every probability to 100%?
Or does it not work/will crash
sigma = SMODS.Joker({
key = "jokle",
set = 'Joker',
cost = 0,
rarity = 3,
loc_txt = {
name = 'RNJesus',
text = { 'Sets all {C:gold}probablilites{}', 'to {C:green}100%{}'}
},
unlocked = true,
discovered = true,
add_to_deck = function(self, card, from_debuff)
for key, c in G.GAME.probabilites do
c = 100
sigma:juice_up(0.3, 0.5)
end
end
})
probabilities arent stored like that
Thats what I thought, just not sure how to alter them
alright, lua noob question here. how can I make a function available no matter what context it's in? like if I wanted a function to be available in both calculate and add_to_deck without copying the same function to either of them? If I put the function outside of SMODS.Joker it returns nil errors because it can't see self, card, context, G.GAME, etc.
if its joker specific you could just add it as a new method to your joker object
i guess
declare the function outside of it and pass the necessary variables like self, card, and context to it
and G.GAME is visible anywhere since that's global
ex:
local function set_value(card)
card.ability.extra.value = 3
end
SMODS.Joker{
--...
config = {
extra = {
value = 2
}
},
calculate = function(self, card, context)
if context.joker_main then
print(card.ability.extra.value) --> 2
set_value(card)
print(card.ability.extra.value) --> 3
end
end
I have this joker, I want the XMult to be equal to your hand size, but I can not find anything in the documentation to refer
the game generally handles chance events like
pseudorandom(seed) < G.GAME.probabilities.normal / some_var
so maybe setting G.GAME.prob whatever to math.huge might work
holy crap you're a genius
i feel like the top pixels should be brown
btw i know the message is bad right now
to this
use SMODS.calculate_context instead btw
the hells that now
it's a utility function for making custom contexts
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.planetOdds, card.ability.extra.tarotOdds, card.ability.extra.spectralOdds, (G.GAME.probabilities.normal or 1) } }
end,
calculate = function(self, card, context)
if context.before and next(context.poker_hands['Flush']) then
local cardType = ''
if pseudorandom('recite') < G.GAME.probabilities.normal / card.ability.extra.planetOdds then
cardType = 'Planet'
elseif pseudorandom('recite') > G.GAME.probabilities.normal / card.ability.extra.planetOdds and pseudorandom('recite') < G.GAME.probabilities / card.ability.extra.tarotOdds then
cardType = 'Tarot'
elseif pseudorandom('recite') > G.GAME.probabilities.normal / card.ability.extra.tarotOdds then
cardType = 'Spectral'
end
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
return {
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = (function()
local _card = create_card(cardType,G.consumeables, nil, nil, nil, nil, nil, 'recite')
_card:add_to_deck()
G.consumeables:emplace(_card)
G.GAME.consumeable_buffer = 0
return true
end)})),
message = "Summoned",
colour = G.C.RED
}
end```
I very clearly *have* defined planetOdds though??
instead of looping through jokers
wth is math.huge, or am I just being dumb
infinity
some lua constant for number thats guaranteed to be larger than or equal to any number
so yes basically infiniyy
which file is
's code kept in
card.lua
ty
quick question: why isn't this lovely patch applying the shader to my joker? this same method works with consumables and their sets and i pretty much copied the method for how invisible joker applies its shader so what's the issue here
vanilla code is weird, it's hard coded into the individual functions that do certain things
it doesn't work like steamodded jokers do calculation

in that case how would I
a steamodded joker
i gotchu
like I'm not insane, I do define planetOdds
Im still kinda confused, so how would I do it?
Just set G.GAME.probabilites to math.huge?
@glad osprey there's a gros michel example joker in here
well that makes this easy
it shouldn't be a nil value
r u sure u saved the code, just to be sure
Now that I think about it G.GAME.probabilities.normal also get displayed in UIs so that might be a problem
sorry
unrelated to your current issue, but on your 2nd if you compared G.GAME.probabilities instread of normal
yes, just did, tried again, still failed
fixed
oh yeah so it will say something like
bigassnumber/4 chance to turn a joker...
yeahh
start a new run for your planetOdds thing
if you previously had a different name for it
Now i'm double confused on what to do
okay that moved it along to the next error
i made a custom card for half joker but its a full sized card making it lower than other cards because of half jokers positioning
how do i fix this
which I suspect has something to do with how I'm trying to tell it what consumeable type to create
move your add_event outside of the return
maybe you could look into the pseudorandom function? it might be possible to patch pseudorandom to always return 0 if (you have the sigma rnjesus + the seed is for a probability event you want to force)
Is Xmult_mod = h_size not valid? how do i reference the hand size 😭
sorry guys
but im unable to find it in the docs
I might try to find the code for the oops all 6's as a reference
oops all 6 just doubles the probability.normal thing iirc
hand size is G.hand.config.card_limit
what are you tryna do
return{} is a table, so you can't really have anything else in it
he wants to make all probabiliy events guaranteed
like scrockw said, you should move the event outside of return
same error
oops all 6's wouldn't help anyways,
I'm trying to make every probability 100% chance to work
tbh i think you could just set prob.normal thing to inf
if youre fine with wheel of fortune reading inf in 4 chance
its kinda funny lowkey
im pretty sure it will crash
mmmm you might be right
unless its 4 in 4
i have a joker which multiplies it by something between -100 and 100
the last time I checked lua's fine with infinities
thats all i know
i'll try and update if it crashes
it is, but i remember john smods (i think?) saying it will crash if its 10000 or just a really big number, so im pretty sure inf will crash too
huh is that so
stupid solution time
really?
probably because of the create card part
Is there context or some other SMODS.Joker field for when a joker is displayed in the shop for purchase? or in a booster pack?
potentially unrelated to your issue, you can replace your entire card adding logic with SMODS.add_card { set = cardType } still needs a check for must have room tho (and probably still needs to be in an event)
are you trying to get like the list of jokers in a shop?
or a joker that triggers specifically when it appears in a shop
thats fucked
no clue why that crashes
what does the game even do with g.game.prob.normal
but a shame too
replace how much of this?
gonna try my hand at making a joker that adds perishable to other jokers
the first 3 lines in that function
you can the add key to add_card too with key_append = 'recite'
why would you even want that joker honestly 😭
pain ig
does it crash
if it was X1 mult per perishable joker then id probably understand, but damn
does it work
hmm
use it and see if it crashes
it works
LOL
huh
naneinf in 4 chance goes hard
fuck
No, I have a joker that gets +X1 per specific hand played count (G.GAME.hands[card.ability.hand].played) and I want the jokers in the shop to display the correct X# value before purchasing instead of the default X1
bro gave me nope
well thats good to know
just like so?
that would be better actually
based on this conversation you probably tried to do G.GAME.probabilities = 100 which is obv wrong
lol
put the calculation code into loc_var
yeah should work
just dont get it like i did
there we go
i didn't plan to do that, someone was talking about having a joker which changes odds or smt

so i talked about how u could change the probability to really high, which led to that response, though i could be wrong and probably sounded really dumb 2 days ago
yeah i did say it was unrelated to your issue, just a nitpick :p
i don't know what's causing your issue
so it's like amalgamate except it applies perishable to a joker and it gains mult for a perishable joker
yeah idk at this point, can u check what that line in commom_events.lua is about 😭
thats a lot of polychrome, wtf?
Oh well a clear issue is that if none of the chances hits cardType is an empty strng which is not a valid set
i guess im lucky overall
How do I revert it back to normal tho?
If g.game.prob.normal is infinity now, and the card gets deleted I need it to revert back
i can just copy the code i made for amalgamate after i add the code for putting perishable on a card
I feel like i may be missing some important piece of docs, cause im unable to find a lot of things. are there any docs beside de Lovely and the Smod guide?
leave it at -naneinf when you delete the joker, with power comes great responsibility 🗣️
also you have two of your probability checks inverted, > instead of <
lol
maybe when you call add_to_deck it stores the current value as a variable
and when its gone it revertd from the stored value
makes so much sence
or, I can make the joker unsellable
they must live with their choices
that would make any other joker which changes the luck values useless after selling
but buying oopsall6 after it might cause headaches
"Where there's naneinf, there's -naneinf."
- naneinfer
i think
the base game source code and the smods wiki coupled with lua knowledge will get you far
🗣️ 🔥
pretty sure not, since naneinf + 1 will still probably be naneinf
this is new
now how would i make a joker that adds perishable to a card when the round ends
NAN IN FOUR
okay that might crash
no it gave nope
I mean
buy rnjesus -> buy 6 -> sell rnjesus -> chance should be 2
buy rnjesus -> buy 6 -> can't sell rnjesus -> regret
and how would i make a card that has two effects
rnjesus being sold or debuffed is a special defeat condition because you killed jesus you lose the run
buy rnjesus -> sell it -> -naneinf -> realize you are never winning a wheel of fortune ever again
okay, so now it doesn't crash
however
it doesn't, spawn anything
eternal michel y'all
LOL
rebuy rnjesus -> hapy
what would -naneinf + naneinf be
prolly undefined or 0
it's a chance to happen and two of the comparisons are incorrect
for sum reason wof shows -nan but michel shows nan
and they do the same thing
the correct answer would be your balatro starts mining bitcoins
ima try
game crash speedrun
-nane0
well not necessarily incorrect but keep it consistent at least
is it not
"Less than planetOdds"
"Greater than planetOdds and less than specOdds"
"Greater than or equal to specOdds"?
i call forth a cat gif
also if you do use run related info in your loc_var function make sure to have failsafes so it doesnt crash when you view it outside a run (in your collections)
is it possible to force-lose a run? Is their even a function for that
its -nan again
excellent
looking into it. thanks for the tip!
real footage of someone selling rnjesus
debug plus does have that as a button, actually
oh yeah, so their is but I have no idea what it is
i bet balatro 2 will be released
no like for some reason its different on consumables and jokers 😭
each time you call pseudorandom you get a different number
try checking the code of debugplus or smt lol
aaaaaah
and you can do elseif instead of checking if one didn't happen like that
There are so many files 😭
Idk which one so I gotta go through them all
use ctrl + F and put in it "lose" or smt, then just speedrun through all the files and stop when there's a match
at least thats what i did for balatro source code
how can i check if the player is in a shop and not rerolling a boss blind for example
when i was finding some stuff
does anyone know an easy way to add additional booster pack slots to the shop?
and if you say check cryptid you better show where cry_boosterwhatever is defined
(i only say that bc i already tried that and did not find it despite searching pretty thoroughly)
i hate going through balatro's code
so true
same
the only way is writing a patch ig
i would offer help but its 4 am rn so i cant get up from bed
yeah but how would i start
fair lol
bro WHAT
All of those had 0 matches
i'll check too
check the stuff in lovely
and may god have mercy on your soul
yeah
ok but why is kevin heart in a anime discord
(curious)
because he simply is
fair nuff
i found win blind 😭
its a roblox tower defense discord actually
🤓
im pretty sure im in that server too
though i cant check what server it is from (mobile discord sucks smh)
but im in a lot of anime tower defense servers sooo
how do i add stickers to jokers
im looking for the ectoplasm in the source code for referencing the hand size, anyone has any idea where can it be? or smt that involves hand size in it
function global.registerButtons()
G.FUNCS.DT_win_blind = function()
if G.STATE ~= G.STATES.SELECTING_HAND then
return
end
G.GAME.chips = G.GAME.blind.chips
G.STATE = G.STATES.HAND_PLAYED
G.STATE_COMPLETE = true
end_round()
end
G.FUNCS.DT_double_tag = function()
if G.STAGE == G.STAGES.RUN then
add_tag(Tag('tag_double', false, 'Big'))
end
end
end
This is win blind, but lose game (and win game) is NOT in sight
odd
Yea that's part of the vanilla debug menu.
likely actually, since debugplus just expands that menu
i knew it
Win blind is DebugPlus
damn
oh well
so selling RNJesus and losing the game is off the table 💔
its not actually impossible
okay so it spawns Planet Cards and Spectral cards just fine, but for whatever reason, Tarot cards won't spawn
in lobotomy corp mod, there's a joker which will actually do the exact same thing
sell punishing bird and u lose instantly
oh
so how do i change this from negative jokers to jokers with a perishable sticker
hmm
Pretty sure the only thing you need to do is just call lose_game
Oh right there's no function for it since it's just a state change
G.FUNCS.DT.lose_game
try it
the only thing i can think of is that you just didn't hit the chance yet
otherwise can you send the entire joker code
second question, how hard is it to have 2 vouchers spawn each ante naturally
.
i mean probably not impossible..
it plays the lose sound, and zooms in but I can still play cards
I'm getting closer
wierd
balatro purgatory
Got it
remove_from_deck = function(self, card, from_debuff)
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
end
okay so i copied the cryptid ease_dollars hook as i was told and it works but there's no message again, i assume the table isn't being returned
HUZZZAH! Thanks for the help! The X# should default to X1, but from the shop it shows the total times the hand has been played. Now onto the collection menu failsafes. 😄
oh hell naw
honestly idk
rnjesus when the wheel walks in
lol
ima save this just in case
still having trouble figuring out how to check for jokers with a specific sticker
now I just need art, but I suck buns at joker art so I might just pixelate online pictures
is your calculate function just returning the message?
by default calculate_joker doesnt display message with the returned struct iirc
i dont know where the code for that is
it should work like checking jokers with a specific edition
but for stickers instead
yea it just returns a message
someone suggested SMODS.calculate_joker is a more convenient version
that loops over all jokers automatically
might also handle returned effects
not sure sorry
use SMODS.calculate_context ya
ima check thx
The true power of RNJesus
i'd probably accidentally put it next to a ceremonial dagger 😭
I think I'll toss Tarot creation in an else then, so if a Planet or Spectral isn't created, it will create a Tarot (probably)
that's avoiding the problem tho
this is probably NOT correct
give him a dice head
naneinf in 7 cards drawn face down 
OH LOL
naneinf chance to break glass card 💔
naneinf chance to perish 
BUT
naneinf chance for wheel 🤑
still need help with this btw
naneinf chance for lucky card money shots 🤑
is this correct?
i need some sort of reassurance before anything goes wrong
that is a context that exists yes
this worked btw thx
but make wheel of fortune always failing
now how do i make a joker apply a sticker to a random joker
lmao
💔
someone ban the bot
it cant be that hard right
i cant even set Xmult equal to hand size 😭
gotta use this
whats the problem youre having
Im new to modding, and i cannot find anything that references hand size that works with what im trying to do
i assume adding a sticker to a card works like adding a seal to one
I could but I would need the entire card map
wydm?
ive tried G.hand_size G.hand.config.card_limit among others
but nothing seems to work
btw ive already changed the message key to a_xmult so ignore that
but how does that work
This is a card map, it would need to look like this and be the correct size as thats how you get the image for the card
yeah that would work
i was looking through pokermon consumable stuff and i found this
in lua putting # in front of things returns its length
wait hand size
oh
would this work with stickers as well
or is that different
ive seen the Merry Andy, that does G.hand:change_size(card.ability.extra.hand_size)
but G.hand doesnt work for my case neither
no wait
merry andy hands are not that
lmao
but maybe something like that
im so lost
im looking for it too but only thing i can find is change_size
but i dont think is impossible?
what were you trying to do?
ronald doesn't seem to work
it's not giving me any mult despite perishable jokers being there
A joker that gives you XMult equal to your hand size
maybe you can use something similar to blackboard's?
it checks your handsize
but in a different way
kind of
it checks the ammount of cards held in hand
it could work
Where can i find the code for the jokers in de source code?
i used sum like thi
card.lua iirc
its like this
there
there's no reason this shouldn't work
but it doesn't
but why
why doesn't it work
am i doing something wrong
what are you exactly trying to do?
add x1 mult for every joker with a perishable sticker
is the mult not triggering at all
btw you should return a messahe too
it looks better than i expected
also pretty sure the name of variable is wrong
I forget the exact spelling
return {
message = 'blah blah'
}
if you dont want any localization stuff
Ive done this, but the game crashes
whats the error?
its showing the message but the mult doesn't happen
i set the mult to not be x1 and it actually works now
god
so its working?
yeah
aight nice
i think it was just because i set xmult to x1
you put "x1" in there?
i had my xmult var as 1
now i need to figure out how adding perishable to a joker works
i use SMODS.Stickers["eternal"]:apply(newcard, true)
how do i make a sticker not complatible with eternal and perishable
when creating a joker
same thing
tho I'm pretty sure there's builtin functions for setting a card's eternal, perishable, or rental status
yeah found this in one of my mods, tho I haven't worked on it in a couple months
this just causes a crash
no idea
got it to work?
what's the stated error?
what if you write {"eternal" = true, "perishable" = true}
^
Nope
nvrm that wasnt the thing that crashed it
the game doesnt crash but the mult is not working
i want to print the all_cards in the debugPlus console, is there a way to do that?
you put a line of code in the return
i'll try some stuff as well
also "joker" doesn't exist in that context, you have to specify the card you want to make perishable
you could chose a random joker like invis and apply the sticker to the selected one maybe?
how does invis do it
what am i supossed to be looking at here
like
what code handles selecting a random joker
the part where it says if #jokers > 0
thats the logic of what it does
got something working
but the invis does this when you sell it
it is done
you can tweak it a bit so the mult part is blueprint compatible
ill try it now
i wasn't sure if this was replying to me or the other guy
nice one
thats for me
damn you made balatro p2w...
fr
always has been 
this should work (i think)
code?
SMODS.Joker {
key = 'cool_sun',
loc_txt = {
name = 'Cool Sun',
text = {
"Gives {X:mult,C:white} X1 {} Mult",
"for each hand currently in hand",
"(Currently {X:mult,C:white} X#1# {} Mult)"
}
},
config = { extra = { Xmult = 0 } },
loc_vars = function(self, info_queue, card)
return { vars = { 0 } }
end,
rarity = 3,
atlas = 'ModdedVanilla',
pos = { x = 0, y = 0 },
cost = 2,
calculate = function(self, card, context)
if context.joker_main and not context.blueprint and not context.repetition then
local all_cards = 0
for k, v in ipairs(G.hand.cards) do
all_cards = all_cards + 1
card.ability.extra.Xmult = all_cards + #context.full_hand
end
return {
print(all_cards)
Xmult = card.ability.extra.Xmult,
message = localize { type = 'variable', key = 'x_mult', vars = { card.ability.extra.Xmult } }
}
end
end
}
it’s meant to add perishable when the round ends
line 115 is the return
im not that experienced myself
wait would this go in the return or not
or is this it’s own thing
if context.end_of_round and not context.blueprint and not context.repetition then
if you want it to be blueprint compatible remove the and not context.blueprint part
that check is wrong
oh well
“I’m lovin’ it.”
if context.end_of_round and context.main_eval then the blueprint stuff if you want
to identify the main end of round step
otherwise you hit the repetition and individual checks, or any other custom contexts that use end of round
its right at the bottom
how would i make the shatter apply to cards held in hand instead of the joker
Oh highest priestess ive done it
nicee
We've done it
context.other_card:shatter
thank you
nice
thats one cool sun
indeed it is
what's it supposed to do?
you need to use the destroying context then
what does it change?
it lets it destroy cards cleanly instead of you doing it custom and breaking things
i will be saving this for later though
i dont know how to do that
look on the wiki
i dont know what im doing i dont know how to integrate that into my code
wouldn't dissolve also work? Or does that only work on jokers and tarot?
also don't do that
if you try and do it yourself you'll end up with ghost cards unless you know what you're doing
can you explain how to do it right because i have 0 idea what im doing
you use the destroying_card context and return remove = true
thank you
how do I make a sound
normal in balatro
i know balatro changes the sound somehow but how
i want to add a joker that gains mult based on a number on my server so it's the same for every player at all time, how would I go about doing that?
i have the wiki open i just dont know how to utilize it
i dealt with some of this before
that was me 2 hours ago
it kinda loops through the cards, if it should be destroyed return destroy_card = card
you dont have to return anything specific
thats me right now if we are being honest
just return something
.
context.destroying_card is for playing cards
are you trying to destroy the joker
i thought you were the other guy
im so confused with who is talking to who ngl
understandable
destroying contexts are for playing cards full stop
this is what my thing is supposed to do if thats what we're still talking about
they dont destroy jokers
set_ability would probably work
i am once again asking for sound correction support
how would i make a deck that just has a holographic stone card of a certain rank (1 card deck basically)
what's the "correct" way to index every current joker and check which one is of a specific edition ?
for index, value in ipairs(G.jokers.cards) do to go through every joker
refer to current joker with value
i don't remember the edition check
something like if value.edition.key == "e_foil" ? although you should check if value.edition ~= nil first so it doesn't crash
yeah I just figured it out right after sending it , I'm dumb
I forgot to check if the edition was nil so it always crashed
glad to see I was (almost) on the right track tho, thanks a lot !
ive tried a few things and i still dont know what im doing how do i make this work 😭
so how would I send a GET request to a server... from inside balatro
i'm going to make a joker that scales every time someone wins a run
cryptid does some https magic
NFS.load(SMODS.current_mod.path .. /**filename**)()
...whar
this crashes the game (bad argument #1 to pairs, expected table got nil)
ok is there a way for me to like run a python script in balatro
i have no idea what im doing 😭
how do i increase the cost of shop rerolls
how do i check what the edition of a joker (specifically a joker checking their own edition)
how can i get the file path of the mod directory
like how do i get %appdata%/Balatro/mods/lims-balatro-mod
<card>.edition.key == <edition key> so e.g. card.edition and card.edition.key == "e_foil"
I think SMODS.current_mod.path should give you that (or something close to it anyway)
and make sure that's either in the global scope, or pre-defined if in a function
dont mean to add onto a pile of questions, but how can i check if a joker is unlocked with it's key? or perhaps theres a better way of putting a specific list of jokers into a booster pack
so this is not working
game is crashing immediately
(i'm doing this part with python because it seems net req in lua sucks)
why? you can return a table that'll create a card from a set that should respect the default stuff (like unlocks)
can't help you if you don't post the crash
making a wallet themed booster pack, and im including jokers that would fit, but i managed to get drivers liscence before i unlocked it
I don't know then 🤷♂️
G.GAME.round_resets.reroll_cost
what's the full crash? 🤔
GOOD LORD ITS ALL MICHEL
well i think its because i added the card wrong
im just trying to make a 1 card deck
i find decks really hard to work with ><
Ooh, nice. There's the .unlocked property (though you might need the joker's center for that)
i just need a check if its unlocked, theres probably an easier way, im a little new to lua
if pseudorandom('wallet_junk') > 0.5 then
local jokers = {'j_drivers_license', 'j_credit_card', 'j_gift', 'j_business', 'j_joker', 'j_loyalty_card', 'j_todo_list', 'j_photograph', 'j_brainstorm'}
local chosen_joker = pseudorandom_element(jokers, pseudoseed('wallet_jokers'))
if chosen_joker.config.center.unlocked then
return {
key = chosen_joker,
skip_materialize = true,
soulable = true
}
end
end
return {
set = "JimboWallet",
skip_materialize = true
}
end```
triple ``` for multi-line codeblock
does anyone know why the value of G.GAME.modifiers.scaling is changing between when i call the function and when the function executes
yeah i found that, i'd probably have to create the card first :P
yeah
how would i have a deck change the max interest
I'm still gonna need the full crash to see the full stacktrace
i thought of just grabbin from the whole pool and checking if its a walletjunk card and doing cash if its not
not sure the the joker pool is tho
where do i find the crash log again
should just be able to run the code again no?
though there's a log at mods/lovely/log
ok for some reason, lua doesn't like what python does to print
time for sys.sydout or whatever
what's at DnDJ.lua:1370?
sounds like it's saying that eligible_suits is nil
that's obviously working???
new question how do i make a sticker not apply to jokers with other stickers
how's it being applied?
IT WORKED
had to change G.playing_cards to G.deck
how do i change base blind size in a deck
look at plasma deck
so ante_scaling would be 0.5 then?
i dunno i didnt look
cus i thought ante_scaling was just a setting from 1 to 3
yeah because its directly set that way in balatro's code i think
but there is no setting among the 3 for halving the base blind size
With SMODS, is it possible to prompt Joker text during the "before" context for each individual card to which it applies?
i've implemented the first part of this description
the other two i'm stumped
how easy is it to make a custom joker that piggybacks off of existing functions in the code? like, in terms of programming expertise required
trying this, but it seems to be returning nil
local current_pool = get_current_pool('Joker')
if current_pool and current_pool[chosen_joker] then
return {
key = chosen_joker,
skip_materialize = true,
soulable = true
}
end```
no, that's modifiers.scaling
they're two separate parameters
maybe i shoulda double checked if get_current_pool even exists lol
so it would be ante_scaling 0.5 then?
confusing, i know
ok ill try that
ok it works
now the last part
preventing certain blinds from appearing until ante 3
finally
wot
i have to execute a python program -> python program pings website -> python program writes file -> lua reads file
now how do i detect if someone wins a run
end_of_round on ante 8?
cryptid has stake that increases win ante to 10
oh yeah
strange pencil has joker set that instant wins
i ❤️ cryptid and want to be compatible with it
the game also has a win state
It'd probably be very easy to cheese that and artifically increase the value
understandable
but consider: funny outweights practical
i'm surprised how few mods add their stuff to the vanilla challenges
like epic tag can still appear on jokerless when cryptid is installed
literally all you have to do to cheese this is edit get.py or just spam the thing it pings to increase the value
anyways what G.STATE would i check to see if you won
and what context would i check that under? i'm assuing end_of_round
idk check the end of round stuff
alternatively, check how the forbidden one works
originally from strange pencil and then borrowed into 2 other mods
ok so i think it would involve taking ownership of the two blinds and changing their min value to 3
tried checking it, idk how this works
you should set the in_pool func
are there globals for ante and if it's a boss blind
doing that would apply the changes regardless of deck
not what you want
no i want it to be just this deck
because if i have end_of_round on an ante equal to winning ante and it's a boss blind, then that checks if you won
(because it would be unfair otherwise lol)
the pillar and the psychic are run killers on a 1 card deck early on
the thing you want to check is G.GAME.won
thank you very much!
does that trigger once or do i need to have a variable check if it's been triggered
If you just checked the ante for ante 8, then it would also trigger if the user went into endless, immediately purchased the hieroglyph voucher and beat ante 8 again
thats a boolean value you need to check manually
there are other reasons that wouldnt work
or you could hook the code for displaying the YOU WIN! popup
i love python
also how often does that joker update
i have it update when you obtain it
i think i'll also make it run at beginning of round
reminds me a bit of stonehenge from strange pencil
when i typed strange it autocompleted to “stranger things” wtf apple
why cant i turn this off anymore
also since you seem to be an experienced mod dev you can tell me
is there a hot reload
can i reload my mod without restarting the game
nope

damn
you can hold M though
that'd be real nice
hold
to restart
is there a function to reload the game, like with a toggle in settings?
i know smods does it when you enable/disable mods
.
no i want to do it programatically
SMODS.restart_game()
ty!
ok finally
after 2 hours of coding
i have Balatnet™️ working
just gotta get some art for it and change the server from localhost to lim95.com
it says "currently 0" because it doesn't sync when the game starts
there ya go
don’t forget (parentheses)
tried to boot up cryptid and my mod at the same time to see how they interact, and i get this when going to the collection
and the red +mult text
i want to make a joker that gains 1 mult per dollar spent
how do i go about this
ok how do i make my joker compatible with cryptid's gemini, oil lamp, others like it
can someone help make my joker give +1 Chip?
what do you mean exactly
make sure its numbers are in the config table
hook ease_dollars
I just want my joker to give +1 chip after scoring
after scoring?
Idk the way to word it okay
1 singular chip

I want +1 Chip :(
if context.joker_main then return {chips = 1} end
Thank you
I'll tell you if that doesn't work, I hope it works
It crashed because context is nil ;-;
Thank you
how do i make a sticker apply to consumables instead of jokers
i have config = {won = false, wins = 0, mult_per_win = 1} and i'm trying that and it's not working
i know its smth like this
j_cry_gemino
i dont know
ive done that and it worked for me
are you sure you're actually multiplying by mult_per_win
r u sure gemini is actually targeting ur joker
ew old calc
it's the only joker lol
i didnt even know there was a new one lol
well theres also gemini
gemini said it was targeting the joker
it was the leftmost and it said "compatible"
so i'm already using the new calc, or is the thing at the top not the new calc
can u show me the codes of Gemini and ur joker?
ignore the python stuff, that's for website stuff
https://github.com/MathIsFun0/Cryptid/blob/25dd90709ecd41e88b0301004bdda51a5539eac8/Items/Exotic.lua#L883 this should be gemini's code
if i want to pull the total value scored in a hand is that in context.full_hand or scored_hand?
i only see gemino lol
that's its internal name
new calc is mainly the different return keys
ah
and how u dont have to specify the message manually anymore
https://github.com/MathIsFun0/Cryptid/blob/25dd90709ecd41e88b0301004bdda51a5539eac8/Cryptid.lua#2561
ok holy shit its hard to read on phone brih
makes sense
I am in your debt
It finally works
:D
nopeus mod
someone said this should force your game to the slowest speed and that's too funny of an idea to pass up on
check how balatro's settings menu does it 

X_X
is anyone aware of what the overscore status is called? obviously theres a way to see if you score more than the blinds value in one hand, but i cant seem to find the context for it
im pretty sure Gemini should multiply all values in your Joker's config, except for some specific values with names listed in their exceptions
i'm trying to change G.GAME.SPEEDFACTOR but doesn't seem to be doing much of anything
ok i did G.SETTINGS.GAMESPEED = 0.1 and it worked
this is a bit much
r u sure
u cant change it in settings again?
like, if you change your speed in settings then im pretty sure it should override that
a surefiresolution would be to put that in update lol
that'd be really funny ngl
im just gonna put it in update
...how do i do that
is that just a function i put in my joker
Is there a compilation of all the game variables / G. variables somewhere? or if anyone directly knows where the player hands/player discards variables are
if you are talking about how to use update, then its update = function()
but if its the buttons removal then u need patches
it took 5 minutes to do one blind ❤️
G.GAME.current_round.hands_left
i think i'll change it to xmult to make this a bit more worth it
while ur at it, make the "nil" in game speed to "Internet Explorer Speed" or smt
thatd be funny
muuuch appreciated!!
honestly even if its x100+ mult, id rather die than play with x0.1 speed 😭
long ass description
i cant help but notice the "e" is not aligned to the middle of the card
the ability to change font sizes so it looks shorter:
fun fact: even if i use font size 0.1, my jokers description will still be longer than most mods ❤️
why are you writing english essays in your joker descriptions
it's a wikipedia page, not an essay
😭
nah but i want my jokers to reach the playing cards
❤️
i want them to be stairways to heaven
i tried to do that lol
i forgot the formatting and didnt realize it didnt work
why is the 4th line so much longer than all the others
{s:0.5}text{}
diabolical choices
but we dont judge moddeds
thanks i did uppercase S
modders
also fixed that
❤️
“all players” getting it’s own line
its really sensitive to uppercase/lowercase so yeah
thats a very important point
if possible ofc
in fact
{s:5}all players{}
make sure to repeat that for 3 lines too, just to make sure they get it ❤️
uh
all players
oh thats because i restarted the game once lmao
did you hold m to restart
what did u do dawg 😭
So I'm making a joker that swaps played cards suits. I would like it to function in-line with jokers like Lusty and Wrathful, to allow a well-organized player to proc both by swapping them with the new joker. What like, context, or whatever, do I need for that? It seems like it should be fine by checking for context individual and cardarea == g play?
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not SMODS.has_no_rank(context.other_card) then
if card.ability.name == 'Reversal' then
if context.cardarea == G.play then
for k, v in ipairs(context.scoring_hand) do
if v:is_suit("Hearts") then
G.E_MANAGER:add_event(Event({
delay = 0.1,
func = function()
v:juice_up()
v:change_suit("Spades")
return true
end
}))
elseif v:is_suit("Spades") then
G.E_MANAGER:add_event(Event({
delay = 0.1,
func = function()
v:juice_up()
v:change_suit("Hearts")
return true
end
}))
elseif v:is_suit("Diamonds") then
G.E_MANAGER:add_event(Event({
delay = 0.1,
func = function()
v:juice_up()
v:change_suit("Clubs")
return true
end
}))
elseif v:is_suit("Clubs") then
G.E_MANAGER:add_event(Event({
delay = 0.1,
func = function()
v:juice_up()
v:change_suit("Diamonds")
return true
end
}))
end
end
end
end
end
end
IVE DONE THIS SO MANY TIMES
there ya go
oh also, it should be Currently
thanks
or maybe not? i find Currently more pleasing to the eyes than currently
context.individual is a bit too late, i'd say go with context.before
if the gameplay is gonna be a literal torture method, at least the UI should be nice 💔
i'm probably going to add one more joker then release it
GIGA hanging chad
can you demonstrate photogigachad please
it's the same thing but it retriggers 5 times
you gotta distribute the wealth (amount of characters) evenly
very nice
is there actually a tool for doing that?
I don't know if there is
personally I just write out the description without any colors before
well thats something to be fixed then
please someone tell me why this doesnt work to destroy the cards held in hand
context.before makes it not proc at all
if context.repetition and context.cardarea == G.play then
local firstCard = context.scoring_hand[1]
return {
card = firstCard,
repetitions = self.config.reps - 1,
message = localize('k_again_ex')
}
end
probably that?
i dont have a laptop rn so i cant even test
💀
and idk how different old calc is compared to better calc
that will repeat every card that amount of times but make the first card jiggle a little bit
put the has_no_rank check in your loop, other_card is not defined in the before context
gambling has been added to poker (ignore the misplaced effect message)
yeah
oof
also hi trif long time no see
yknow what this broken card fits the mod way better
that marks 2 friends i haven't seen in a while found in #💻・modding-dev
if context.individual and context.cardarea == G.play and context.other_card == context.scoring_hand[1]a bit of a long condition
make it so it flips the cards too
❤️
why isn't card = card making the effect message show up on the joker? it's instead showing up on every playing card (i assume due to context.individual)
if you want the message to show up on your joker do focus = card
by the way you should use card.ability instead of self.config
yeah
i just want to know why this card (without any for loops) is triggering an error about for loops
you're in a very old version of steamodded
lemme update ig
specifically card.ability.extra
not really extra, only if you defined extra
fair
is there any explicit benefit or purpose to defining extra? i do it every time but don't actually really know why lol
does anybody know whats wrong?
yeah doing that worked
"doing that" meaning updating
also my context.end_of_round is triggering for every card, not once
do context.end_of_round and context.main_eval
i'm gonna just try adding and context.joker_main
worked, thanks
im probably doing this wrong
if card.base.id == 10 then
return 11
end
end,
i still need halp
currently playtesting to see if it's possible to win with all the jokers (on white stake)
currently testing Refresh
refresh is bad 🙏
is this supposed to be a "vanilla+" mod?