#💻・modding-dev
1 messages · Page 536 of 1
For?
in general
if i have 0 mods enabled besides smods, blueprint and brainstorm don't work at all
i am trying to figure out why
You don't need two nots
Actually you don't need to put the context
That's not me
Hm
Weird
that's in the card.lua dump
even weirder it was working
i have no idea what couldve broken it
You have nothing installed?
disabled all other mods to test
Strange
maybe my copy of smods got corrupted? lemme try reextract
Yeah maybe
Yum
figured it out, it was a pretty simple hook
How can i make a sound play and only after the sound stops playing, the run ends
Does context.reroll_shop come before or after the cards are refreshed?
is there a way to level up a hand by several levels at once?
SMODS.smart_level_up_hand?
what are the args?
vscode and the lua extension is very helpful
Lua lsp
ok
can i make infoqueue only show up when card is flippd
Am I stupid? This apparently calls a table value, near the beginning. I have no idea to what it's reffering to: lua local function calc_set(set_table) local ret = {} for i, c in set_table do if i == 1 then ret[1] = c goto continue end if c == ret[i-1] then ret[#ret+1] = c goto continue end if (i+1) ~= #set_table then if c == set_table[i+1] then ret[#ret+1] = c goto continue end end ::continue:: end return #ret end
it needs to be pairs(set_table) or ipairs(set_table) I think
FUCK i hate lua
at the top of the for loop yea
happens to everyone, don't worry about it
Probably loop through G.shop_jokers.cards and G.pack_cards.cards respectively
yeah just check it the card is flipped in loc_vars
or hook the generate_ui functions if you want it on a card that's not your own
infoqueues don't show up if a card is flipped
honestly, i forgot that's a thing normally hah
because i change it
i hook card:hover for that
can you get the cards that are about to score in context.before?
what are you trying to do
how do i manipulate shop rates in a custom deck. i want it to just be 100% playing cards
add an edition to scoring cards before they score (so that the edition actually applies)
that's a hard one
you can do it with context.individual but they win't count i think
are doing it using a for loop
what about comparing every card to the scoring_hand table?
sorry what
are you using a for loop to go thro scoring cards
yeah
wait that's it probably
i'm using G.play.cards instead of context.scoring_hand
try using the scored cards table then
I haven’t been here,,, in so long,,,, because I haven’t been modding,,,
does anyone have any issues that I could feasibly assist in
why does my family hate me
how in god's green earth can i change the background shader to my own
i tried everything
overlays
pngs
drawing over pngs
nothing helpd
because theyre undeserving of love
how did you get the level chips/mult of a poker hand i forgot
ui related question, explode yourself/j
Next
Stop doing shady business
im sorry what
help i forgog
G.GAME.hands[<hand>].chips
front end in balatro
G.GAME.hands[key].mult and chips
G.GAME.hands[key].chips/.mult
GDI N
G.GAME.hands[key].chips.hands.GAME.G

this tells me you memorize every temp ip you had since 2017
164.123.231.256
can confirm
n what’s my favorite color
green
see what i mean
green
green is mine so it should be everyone's
well since we’re all going to die I guess I’ll say it
I did not care for the color green
blocked
🧊
no im just saying green is disliked
especially in eggs and ham
toma what the
ok sam i am
lmao
i misclicked and somehow ended up in your dms
happens to the best of us
anime men into each other's DMs
fuyooooooo,,,
debuffed face cards stop counting towards this number. how to fix?
isn't that the Tetris-like game
except the tetromino are alive
is there a thing for all hands like context.scoring_name
what does "thing" mean
there are multiple things for all hands
like G.GAME.hands[context.scoring_name]
Also hi vic
no like what are you trying to do though
set the l_chips/mult of every hand
oh wow
there definitely was a way to do this hold on uhhh
Ok iirc
.s_ for the base chips and mult
.l_ for the chips and mult added per level
And then just .chips/.mult for the total
(reasking)
did new smods just break xmult what is HAPPENING
why are you setting it to 1
the card resets its xmult after it's played
ok but why are you increasing the x mult after scoring
i'm increasing xmult if the card is held in hand
ohhhhh
when it's played, it then scores and resets
yep
the increase and reset work fine, but the card refuses to give xmult even when charged
oh yeah mb
Wrong context probably
Or maybe you need an event
i'm using an event so the reset only happens in context.after
even using ability.Xmult just does nothing
for loop that iterates through each hand?
what would even be the right context
?
FINALLY
yeah probably
was it for an enhancement
yeah
weird
how would i do this
im dogshit at coding
you literally have every piece of the puzzle
loop through the hand table and do the level stuff you wanna do
is there a config for hand_size for enhancements by any chance
i dont think so but if there is it's probably h_size
Isnt it something like h_size
wait unless that was a mod
? You’re fine im not mad or anything
did you mean like you need an example
local hand_table = G.handlist
local played_hand = G.GAME.hands[context.scoring_name]
local filtered_hand_table = {}
for _, v in ipairs(hand_table) do
if v ~= played_hand then table.insert(filtered_hand_table, v) end
end
for _, v in ipairs(filtered_hand_table) do
SMODS.smart_level_up_hand(card, v, true, 1)
end
like one thing im doing for one of my guys is it levels up every hand except the one you just played
whats a loop
Hello toma how are you
hiii silly
Hello victim I am good
@red flower do you know the cause of the issue where sometimes UI elements render in the top left corner of the screen and stay there? It's not my issue but it could be related
:)
Hello Shrek Dilly how are you
i have a little bit of a headache but im alright
placed some auction bids
straight up gaming
i will remove for loops in lua
Are you winning
✅
Nice
how do i make an enhancement that increases hand size? i can't find anything in the lovely dumps about negative playing cards at all
maybe theyre unmodified?
(just use while loops)
Try seeing how Negative Cards are implemented in SMODS
yeah that's when elements are created but not put anywhere
look for edition.card_limit
im getting this error when I swap to my mod's music tab
it didnt crash when i commented out func = ...
line 411 is in G.FUNCS.mul_update_music_tab()
specifically local parent_node = e.nodes[1]
god is all this really hardcoded in for negatives
@pure salmon theres a new PR that makes it a bit easier that I want to take a look at and expand a bit but it'll be after the next release
My issue is that in theory UIBoxes are saved to G, but when they're removed from there, they aren't actually removed. The value in G is removed but the UI remains
SMODS.Edition:take_ownership('negative', {
shader = 'negative',
config = setmetatable({ card_limit = 1 }, {
__index = function(t, k)
if k == 'extra' then return t.card_limit end
return rawget(t, k)
end,
__newindex = function(t, k, v)
if k == 'extra' then
t.card_limit = v; return
end
rawset(t, k, v)
end,
}),
sound = { sound = "negative", per = 1.5, vol = 0.4 },
weight = 3,
extra_cost = 5,
in_shop = true,
vanilla = true,
get_weight = function(self)
return self.weight
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.edition.card_limit } }
end,
})
found this in game_object.lua?
any tips for making it work in the meantime or just wait you think
I would just wait otherwise you'll have to rewrite it in a few weeks anyway
shit
current timeline is release this weekend, then it'd probably be implemented on dev the following week
is there a variable to change how many options you get in a booster pack?
@wintry solar do you know something about this kind of UI
wasnt there literally
whats the problem exactly?
idk if you tested this already but this gets rid of one of the copies
i cant find it on the steamodded wiki
As in amount of cards in the pack or amount of cards you can pick?
sanity check, it's info_queue[#info_queue + 1] = G.P_SEALS.Red to add red seal to the info queue right? 
both i guess
I am literally testing it now 🤣
Some UI elements aren't being removed by calling remove
The call is made as G.reference:remove()
The reference disappears but the UI element remains
hi violet
you need to do G.reference = nil afterwards
Hai toma!
they are nil
The UI isn't
remove should remove all the children of that uibox
uhhh not to hand
Like, before removing it, I can print G.reference and it seems like the UI is there
But removing it accomplishes nothing except remove the reference
do you actually set it to nil
key = 'b_bali_itempack1',
loc_txt = {
['name'] = 'Item Pack',
['text'] = {
"Choose {C:attention}1{} out of {C:attention}3{} Item Cards"
}
},
atlas = 'customBoosters',
pos = {
x = 0,
y = 0
},
config = {
extra = 3,
choose = 1
},
discovered = false,
group_key = {
["bali_itempool"] = true
},
cost = 4,
} ```
would this work
Yes
Not only the code sets it to nil, printing G.reference returns nil
The reference is gone, but the UI is there
trying to get an enhancement to swap sprites, this crashes
whats the crash?
try card.config.center.pos.x = 5 - #card.ability.extra.effects_left
sorted it
pos needs to be in the form {x=x, y=y}
nabbed some artbox code lol
(reasking 2.)
i've not been able to find a working way at all, ,no progress. gn
How do I use math.random() (for true randomness) but with probabilities for different things to happen?
use pseudorandom(seed, min, max) instead
preserves compatibility with seeded runs
But I want true randomness, that's why I asked for math.random
If you explicitly don't want to respect the in-game seed: math.random() returns a value between 0 and 1, math.random(x) returns an integer between 1 and x
Well, some runs would be guaranteed 100% impossible then and I don't want that
ideally i'd want to remove the +0/X1 line when i remove an effect
I'm making a boss blind where I want it to use randomness after every hand played to decide what happens. One of those events is 'Immediately lose'
using math.random encourages save scumming to get the outcome you want
this is very bad game design but I won't stop you
Didn't think about that...
I don't see why that effect would want math.random over a seeded random
if one of them is immediately lose then you should immediately lose and have to play another run imo
not save scum
you can make the seed be based on the time if you want it more random
for every run that is "100% impossible" there are infinitely many other runs that are "100% possible"
Okay, how do I use pseudorandom() with different probabilities?
wouldnt it not matter anyway if immediately lose happens, you cant reroll the effect when youve lost already, the run is over
also how would i get my menu to instantly update
tried some other janky stuff but it either crashed or made the game extremely laggy
It'll be a very low probability
where as using math.random turns all those "100% possible" runs into "X% possible, X% impossible"
true
pseudorandom("seed", 1, 1000)
then do if checks
I *think *you could alt-f4
or maybe you could use the number as an index into a table of functions that each do one of the effects
Okay and is there a way, to stop the scoring for something happening?
Hey that's a pretty cool song there pal 
And what do I need to define as seed?
that would be better for a large number of individual effects that have the same odds
but i think the if approach would work slightly more conveniently for events with different odds
seed is just any string that describes the source of the randomness
Okay, thank y'all :3
ye the way he described his boss blind made me assume it was all equal odds
is there a way to use SMODS.poll_seal to, while guaranteeing a seal, exclude a specific one? so all but whichever seal
so could i iterate through G.P_SEALS for that
if it's your own seal you can also do it in its in_pool
you can also just poll until you don't get that one
so like this
and then i just use this keys table as the options argument
yeah
bump?
context.first_hand_drawn has context.main_eval, right?
ah
sanity check, if i want to use SMODS.create_card to make an enhanced card, i call it with { set = 'Enhanced', enhancement = <my enhancement key here>, area = <target area here> }, right??
set should be Base just in case it tries to double apply an enhancement, and it's enhancement not enhancer
Does G.STATE = G.STATES.GAME_OVER and G.STATE_COMPLETE = false not work in SMODS.BLIND{}?
in calculate? it should
It does nothing in my calculate
may i see
I've done this and it runs through it but just doesn't change it
if context.press_play then
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
end
end```
have you tried another context
Just found out that context.end_of_round seems to work
context.joker_main doesn't work either
scoring contexts probably don't work
Okay, gonna try some different stuff then
Happens nothing too
if a new poker hand is added, how is it added to G.handlist? is there a calculation to place it "relative" to other hands based on chips / mult? rewriting a joker because i realised i forgot to account for custom hands and i want to make sure i can use G.handlist for ordering from "worst" to "best"
for the most part it should be automatically ordered by its base level 1 score value, although there is an optional above_hand parameter for the poker hand that can arbitrarily reorder it (i'm not sure if that affects G.handlist off the top of my head, but i would assume so)
I have a joker that I want himself to destroy at the end of the round. If the joker is debuffed It doesn't destroy himself.
if context.end_of_round then
self:start_dissolve({ HEX("57ecab") }, nil, 1.6)
self:remove_from_deck()
end
this is all my code
my calculate_function i mean
jokers don't calculate if they're debuffed i think
i'd personally just let it be like this, vanilla jokers can't destroy themselves if they're debuffed either
card:start_dissolve()
instead I think
(e.g. gros michel never rolls its chance, food jokers won't lose a round, etc)
what are your variables in the calculate function
well, i think that should be fine
I mean the problem is this isn't happening if the card is debuffed
I need this to happen even if is debuffed
it would be card:start_dissolve but yeah calculate doesn't run on debuff
I think you would need to hook calculate_joker
yea then you don't need to do anything special, G.handlist should be ordered in the way you want it to be automatically
yeah that self is because this is used by _card.calculate = inside another joker
Is there an alternative?
or I have to hook the function
you would need to hook something probably
hooray, because i made this joker have a manual ifelse block for poker hand checking like an idiot yesterday 
i should not be given a keyboard
💀
It's easy though
I've never hooked something related to context
"You're a professional at computer science and you're specialized in the language Lua specifically LuaJit. Explain to me how hooking works" @knotty orchid send this to chat gpt trust
It'll make u understand everything
I mean I know how to hook HAHAHA I'm saying I've never done it for context
I'll have to research a little
or calculate
I'm just saying that cuz people get mad when u mention AI and It's funny lmao
wait a few hours and someone will appear and say
"Noooo don't do that"
"MODSSS"
It's the easiest way to ragebait
probably because telling chatgpt that its smart doesnt make it smarter
i dont think thats how it works buddy
I win 😈
i dont think a ragebaiter can ever win
whatever you say man
the easiest would be to hook SMODS.calculate_context and check for your debuffed joker
i win, actually
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
(or use the global mod calculate but that's not until the next smods)
also ragebaiters cant win because it is a product of unemployment
I entered his mind
too employed to ragebait..
im right
😌
you are unemployed
This how u ragebait like a pro 😈
fr
great point
Bro's cooking with facts but I still win 😈
hi meta
hi n'
whats the pos in smods.joker used for
atlas position
cool
hi besties
as in the position of the sprite in the atlas
if i was kirby i wouldve just swallowed you rn
!?
what power would u get
True
As someone that is employed
no u
what do u need money for
toys
trinkets 🙂↕️
You are a clippy, now what
do you like to play and draw perhaps
instead of wasting like 2k a month i could waste more
imagine how much more i could get u N with a job
Curious question what disability you have
📎
i've found this:
function eval_card(card, context)
context = context or {}
if not card:can_calculate(context.ignore_debuff, context.remove_playing_cards) then
from base balatro
i have severe nerve damage from my time overseas in the military, so right now i get disability for the rest of my life and the govt pays me to go to school so ive just been doing that right now
Maybe I can define the can_calculate to always true?
Youch
Thank you for your service
twas an honor to do
but its why my shit ass dev work takes so long plus my dummy ness
you can set it to be true for your joker, i dont know if i would recommend it
i still need to get around to making a quest system similar to kinos
Nah it’s chill take your time
because id love to do that
For me I don’t know if I want to work on modding like I don’t feel motivated or feel like I don’t have a lot of good ideas so idk
its a mixed bag, i have had a couple of people see what ive made and they think its neat and my friends like the mod so far, so even if just ym friends like it thats good enough for me
Yeah it works perfectly fine
No IA needed 🫡
only for the clone
of my joker
local _card = SMODS.create_card(create_args)
_card:add_to_deck()
_card.can_sell_card = function(self, context)
return false
end
_card.calculate_joker = function(self, context)
if context.end_of_round then
self:start_dissolve({ HEX("57ecab") }, nil, 1.6)
self:remove_from_deck()
end
end
_card.can_calculate = function()
return true
end
Yeah
@red flower question -
with the way vanillaremade does certificate, if you start a blind, then restart after the card is created, does it save the card it made? because it's not for me 
It think it is also like would people actually want to play this?
uhhh let me test
Like I am not that good at pixel art (am improving) and such
im bad at art
yeah it's true
I'll see what it is tomorrow
oh nvm
i see
it calls save_run()
og certificate calls save_run()? yeah i was about to ask if the quick fix was forcibly saving the run after emplacing the card
well, after the context call, i guess
oh wait, it'd have to be in the event, huh
no it does it after the event
yes but you add the emplace event to event manager, and the event happens after the rest of the calculate, right?
so the save_run() should be in the event, surely
Yeah it’s kinda the other problem it is like I feel like I need to finalise them but probably just a good idea to just do concepts first, code second, art last
yeah it calls it in the event i was just misreading lol
im trying
what is the colour that editions use in their message? is it G.C.JOKER_GREY?
G.C.DARK_EDITION im pretty sure
that's tooltip text
i mean the colour in their message when they're triggered. like it's a static grey kinda colour
i see
self.shared_sticker_eternal = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 0,y = 0})
self.shared_sticker_perishable = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 0,y = 2})
self.shared_sticker_rental = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 1,y = 2})
self.shared_stickers = {
White = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 1,y = 0}),
Red = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 2,y = 0}),
Green = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 3,y = 0}),
Black = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 0,y = 1}),
Blue = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 4,y = 0}),
Purple = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 1,y = 1}),
Orange = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 2,y = 1}),
Gold = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["stickers"], {x = 3,y = 1})
}```
Can''t I change this to change how stakes stickers are shown?
I'm trying to modify the asset_atlas but I keep getting an exception
'atlas is nil'
but I'm pretty sure I've defined it
local original_start_up = Game.start_up
function Game:start_up(...)
original_start_up(self, ...)
self.shared_sticker_eternal = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"],
{ x = 9, y = 3 })
self.shared_sticker_perishable = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"],
{ x = 10, y = 3 })
self.shared_sticker_rental = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"],
{ x = 11, y = 3 })
self.shared_stickers = {
White = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"], { x = 1, y = 3 }),
Red = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"], { x = 2, y = 3 }),
Green = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"], { x = 3, y = 3 }),
Black = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"], { x = 4, y = 3 }),
Blue = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"], { x = 5, y = 3 }),
Purple = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"], { x = 6, y = 3 }),
Orange = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"], { x = 7, y = 3 }),
Gold = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stickers"], { x = 8, y = 3 })
}
end
I don't really understand why isn't this working
damn, i feel like my lsp is missing so much even though i kinda put most of the stuff
okay so, this is meant to be a scaling chip joker that is simply +2 chips per hand played. Why isn't it.. actually adding chips to the hand.
Chip_mod
Not chips
And you should use chips instead
It generates the message automatically
chips instead of what
but I wanted the silly spin msg lol
Hahahaha
big priority
what priority it shouldve been
big num?
😭
that one had a number limit priority iirc
im gonna ask someone instead
I got it to work yay
i would just put a big number
for _, joker_key in ipairs(P_CENTERS) do
local success, err = pcall(function()
if self:randomize_joker(joker_key, silent) then
count = count + 1
end
end)
if i wanted to iterate modded Jokers
this should work right
G.P_CENTERS
but also it will do all centers
joker_key is the center not the joker key
for _, center in ipairs(G.P_CENTER_POOLS.Joker) then
if center.original_mod then
local key = center.key
-- your code here
end
end
i see
why does this on an enhancement not properly destroy playing cards
after
does everything else in the context work
yeah everything else triggers just fine but the cards don't get destroyed. they stay on the screen and reloading puts them back in the deck
what's effects_left
this enhancement progressively removes effects, so that variable tracks which ones are still on the card
the eaten message is played?
yeah and the card does the animation fine
hmm
none of those animation lines are problematic i've tested w/o all of them
issue is strictly that cards don't destroy properly
can you try just running :destroy() on a card with debugplus
not destroy
remove
im sleepy
oh im stupid
is it because of context.after?
yes
try using context.destroy_card
i dont think there's a good way to keep the animation tho
why does this give neither chips nor mult```lua
SMODS.Edition {
key = "imaginary",
shader = false,
config = {mult = 8, chips = 40},
loc_vars = function(self)
return {vars = {self.config.mult, self.config.chips}}
end
}
i dont think you can talk about that version here
oops
hey! i'm trying to count the amount of cards with seals on them in my deck but i'm struggling to implement the ''card.seal'' with ''playing_card'' ;-;
Right now i'm pretty much copying steal joker's code but i'm tryina switch steel for seals
anyone got an idea? :0
(has_seal = card.seal also lmao-)
do
if playing_card.seal then seal_tally = seal_tally + 1 end
and that should be enough
imma try it! thank you!
when the docs say card.seal
they assume that card is.. well.. a card
in your situation, card is undefined
but you have access to each card in the deck with the _, playing_card in ipairs(G.playing_cards)
why doesn't this code work
ooooh
that makes so much sense lmao
thx!
so unfortunately you will need a calculate function for it to give its mult and chips
since according to your code ur just trying to add chips and mult this is a good reference
https://github.com/nh6574/VanillaRemade/blob/main/src/editions.lua
W.I.P: If I smack these two heavy metal balls together-
How do I check if a certain mod is installed within my mod's code?
if next(SMODS.find_mod('modid')), where modid is the internal ID of a mod.
assert(SMODS.load_file("crossmod/wildcard_collection.lua"))()
end```
So this above code should work?
Yeah, should do.
Well, looks like it's angry that something's wrong...
Something is up with the file being loaded.
Welp, it was because an end slipped in without me noticing.
But now the mod that is checking for it just... doesn't load the Jokers.
There's no tab to see the records, even though the code is there
And here's the crossmod file
...why return true?
It was something I tried earlier on, just ignore that part.
For take_ownership, I'm not much of help as I've not used that myself yet. 😅
This is my first time using it
How could I destroy a playing card before it scores?
the 4 space tabs with the super narrow balatro font looks kind of cursed imo
@warm kraken - Hey, assuming you are the creator of the All in Jest mod, I wanted to clarify something with you.
Is it intended for Pellesini to not recreate Taillefer after it self destructs?
Cos I thought it would be a cool combo to pull off, was pretty unfortunate to find out it doesn't work and it ended up costing me the run lol
oh lol im stupid i misread the wiki page ignore me
@gilded narwhal ***** above
To remove cards: return {remove=true}
And then use context.before to trigger something before scoring occurs
I thought you could only return remove inside of context.destroy_card
what is the if statement for a hand containing a certain poker hand?
It is not, I'll look into that
ah okay, good to know that it's not intended lol
ty for the quick reply
how do i increase the ante amount needed to win?
I don't know how much help this'll be, but here's the code for a Joker that destroys cards via discards.
nope! You can return it in a lot of contexts
Hmm, seems like not in context.before though?
you can use it regardless.
i think there has to be a card to target
thatd be my guess at least
theres no other_card in context.before so 🤷
Yeah, I don't know how I'd get around that though.
Seems to be the one place I can't use it.
can't you use context.destroy_card and context.before? im not entirely sure what the timings on context.destroy_card are but thatd be what id look at
id at least try that even if it seems dumb
I already tried that and found that there was no overlap between context.destroy_card and context.before
hm alright
have you tried destroying the card in context.press_play ?
why can't i compare a class with a number despite having the __lt metamethod
I'm either using it wrong, or it's conflicting with something else in my code, gives me a crash.
Is there a way to add a sort of rarity system in booster packs? :0 or would I need to like hard code it lol
What exactly does this mean ?
Like, you can make your own rarities with their own weights in the pool and have a booster pack only involve those rarities, if that's what you mean
is there a context for the cash out screen after beating a boss?
Like, where certain cards appears more or less oftens than others in booster packs
Can someone help me fix this scaling ^Mult joker?
He doesn't crash, but rn but he doesn't appear to be calcuating things properly, I'm quite new to this
I’m unsure if that’s what you meant lol
Yeah just change the rarity value of the cards
or set default_weight in a custom rarity
Oooh nice alr ty!
nevermind, I figured it out
is there an equivalent to context.end_of_round which would only proc an effect on one card rather than every card in hand, similar to context.after
because the code in the first screenshot affects every card in hand, while the second screenshot only affects a single, random card (the issue being its after a hand is played, not end of round)
if context.end_of_round and context.cardarea == G.jokers i think
how can i make it so that the player can't gain any more money from any source?
where can i find the list of ease_[object] things?
gotta love the vscode lua extension
keep getting this crash whenever i try to poll a card's edition via card.edition.[edition]
this hasn't just happened in this instance, but across my codebase
yet other mods and the docs use it just fine so i don't know what i'm missing
card.edition itself only exists if the card has an edition. so when the check runs on a non-editioned card, it tries to index into a table that doesn't exist, which crashes
replace exactly the highlighted part in your screenshot with exactly this:
(G.jokers.highlighted[1].edition and G.jokers.highlighted[1].edition.negative)
if card.edition is false on that highlighted joker (i.e. it's not editioned), then it treats the whole "and" statement in the parentheses as false without even touching the second part of it, dodging the crash from edition not existing
is there a mod that lets tags appear in the shop and if not how hard would it be to implement it?
it would be easier to make consumables that create tags, iirc cryptid does it
fair but i'd prefer just putting the actual tags in the shop
description's a bit lengthy, but does it make sense?
well you could, but you'd need to hook generate_card_for_shop and add use buttons to tags
and even then idk what they'd look like in the shop
do you know how to hook?
cause in theory there's 2 functions you need to hook use, in actuality you probably need to hook 3
that's fine, in essence think of a function as a variable (I'm pretty sure that's what most are)
you want to save the original func in a local var then call it in your new one
what you're doing is pretty ambitious for someone new, but even thinking abt it i can see a way to fairly easily do it
read this
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...
it can help you to look at actual examples, most mods have hooks, I have a ton in my hooks.lua file
cuz lua weird
e_mult
hi, how do i put an animation on a joker ?
is everything in the calculate function the exact same between seals, editions, and enhancements or is their any discrepencies i should know about
What function handles the rearrange part in “drag to rearrange”?
I’d want to hook some feature that happens whenever the Jokers are rearranged.
I don’t know if SMODS supports it yet, but I seem to remember that it’s easier to put an animation on a soul sprite than a Joker
I think if you want to make a Joker effect that responds to rearranging, add a calculate context when a Joker stops being dragged
isn't there a class for animated sprites?
eremel always teasing with the yet 😭
Which you can use for soul sprites AFAIK
balanced or no?
what's the context for scoring lucky cards?
You mean trigger
?
There’s no context for scoring lucky cards you have to check for enhancements manually using a for loop or context.individual and smods.has_enhancement
Bro is cooking
jokerforge is a lifesaver, i can just make the joker itself in that site then paste the calculate function into the already existing jokers.lua
i mean i'm not actually using jokerforge outright to make ALL my jokers
How it feels to read smods docs
So do you mean when lucky card triggers or when scoring lucky card
Two different things
I can help you on both
"Scored Lucky Cards give..."
Trigger:
if context.individual and context.cardarea == G.play and context.other_card.lucky_trigger and not context.blueprint then
if context.individual and context.cardarea == G.play and not context.end_of_round and not context.blueprint and SMODS.has_enhancement(context.other_card, 'm_lucky') then
Think this should be right
The bottom one is when scored
thank you
-<
I’m gonna feed you to the pit in my backyard (•w•)
Yum
Sob
so I have this enhancement that scales, but I want to make a joker that makes it scale twice as fast. How would I do that?
Check if joker is present in enhancement code and add double value
loc_txt = {
name = "Vigilant Joker",
text = { "Scored {C:attention}lucky cards{} give {X:chips,C:white}X#1#{} Chips and {C:money}$#2#" }
},
This is busted
I wish there was a list of all the SMODS. stuff that I could use ;-;
good for a rare joker?
Soon (never)
Soon
That’s legendary
Lucky cards already
Good enough
never
I mean I have a joker that gives xmult for every played ace
Or scored
Or held in hand-
Yeah that’s cooked
I can’t complain i have a joker that gives 1.1 xmult for every card present [includes deck btw]
thank you it works now :D
Yeppieeeee
Held in hand isn’t intended actually
Context.individual but forgot to specify card area
Cardarea = G.play instead of hand
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not context.blueprint then
if SMODS.pseudorandom_probability(card, 'busterb_susies_idea', 1, card.ability.extra.aceodds, 'busterb_susies_idea') then
SMODS.add_card{ set = "Base", rank = "A", enhancement = "m_steel", edition = "e_polychrome", seal = "Red" }
play_sound('busterb_susielaugh')
end
if context.other_card:get_id() == 14 and context.cardarea == G.play and not context.blueprint then
return {
Xmult = card.ability.extra.acemult
}
end
end
end
how do i change a modded consumeabletype's shop spawn rate
i changed all the others using G.GAME. _rate
also how do i change the amount of boosterpacks that spawn in the shop
Check the code of black hole
It’s a global table (check cryptid code)
I wonder why everything is a table in this game
Please just invent struct objects already
I’m not used to this shit
Is there a way, to stop the scoring hand to wait for something to finish happening?
the spectral card?
event manager
has two arguments for stuff like this
blockable and blocking
No the code for the real black hole that god is running on the mercury cpu
blocking stops future events while it's running, blockable waits for previous events before it runs
Gonna look into that, thank you :3
That's a thing
UGHHHHHH
but itjust upgrades all hands it doesn't affect spawn rates
worked
It’s a spectral card that doesn’t spawn in packs
i need it to change for the whole consumeabletype on 1 specific deck
what does this crash mean?
You can do that by editing the start run function and checking for selected deck
if i understand correctly, look at how ghost deck affects the spectral spawn rate
i've did that already for the vanilla consumeable types
whts the start run function
is there anything wrong with this code
key = 'p_bali_itempack2',
loc_txt = {
['name'] = 'Item Pack',
['text'] = {
"Choose {C:attention}1{} out of {C:attention}3{} {C:gold}Item Cards{}"
}
},
atlas = 'customBoosters',
pos = {
x = 1,
y = 0
},
config = {
extra = 3,
choose = 1
},
pools = {
["bali_itempool"] = true
},
discovered = false,
draw_hand = false,
group_key = "bali_itempacks",
cost = 4,
} ```

How would I use G.E_MANAGER:add_event(Event({})) to stop the scoring hand before then, after the event finished, make it continue?
what do you need to do that for
A boss blind where a video plays when you press on Play Hand. I don't want the hand scoring while the video is running
hiya! does SMODS have an easy way of rerolling the boss blind?
this is to be done during a round
During a round you can just set G.GAME.round_resets.blinds["Boss"] = get_new_boss() or smth
No dditional work needed I guess

Invalid declared children
Like where game expect array of nodes you passed 1 node, or vise versa
damn im not the father
ahhh fair
actually, here's the code
fuck
well if it's your code it sucks
sleepy..
is G.C.UI.DARK valid colour
I do believe its not

whats the thingy to make custom colors ?
okay so like
question
i wanted to mess with the denom and numer values in configs
for modded jokers, it's quite easy to do so
but for vanilla, is it stored in config?
isn't it also like card.ability.extra ?
or am i not remembering it right
yeah, except some values are numbers and some are tables
Hey I'm trying to make something really simple but am really lost. Is there a guide somewhere that explains step by step instructions
(something other than the smods wiki) ?
https://github.com/nh6574/VanillaRemade/blob/main/VanillaRemade.lua use vanillaremade (for reference) and its wiki (for more information n stuff)
its generally a great reference
Ive seen this and it might be really stupid but I genuinely have no idea what to do with it
its just a reference
its a recreation of everything in vanilla
it recreates everything in vanilla with smods
used as a reference
I'm trying to do something with sound, and that isnt on there
I thought there might be a sound.lua or smt
well if you said that from the beginning...
SMODS.Sound{
key="Sound_key",
path="Sound_path.ogg"
}
play_sound("modprefix_Sound_key", 1, 1)
i have no idea how to change the sound track and stuff tho
Soundtrack isnt so hard, there's an example mod that shows it
Here's what I wanted to do, I just need to use the love.focus( focus ) callback to mute game sound
But I feel like its not getting called. I got a mod to load and print to console, but I feel like when I use love functions they arent working
I saw that, but that has to do with registering new keys into the map. Which sadly isnt what I want to do
Love funcs definitely work, I use some of them to pull os data and things
I loosely tried messing with love.audio.newsource for sounds but it kept acting like my sound didnt exist which was not fantastic
dont override it tho
okay how does one hook it ?
okay this looks great thank you
btw does anyone have a quick example of adding a button in the settings menu. ive looked at the examples but things like moreSpeeds simply change current ones, I want to add a toggle in the existing sounds tab
gurhh trying to make a tarot card
did you make a new consumeable type
no i just want it to be a tarot card
the set should be named Tarot then
Isn't there a comment in VanillaRemade saying this
still crashing
ctrl+s
wait its probbaly case sensitive
How would I use G.E_MANAGER:add_event(Event({})) to stop the scoring hand before then, after the event finished, make it continue?
if i add more things to G.GAME.pool_flags will they also be saved properly in the run?
there we go works great thanks
context.before ?
it's a global so prob yes
ok you know how i said works great?
prob a localization issue
it probably couldn't find 'jammbo_diamond' in G.P_CENTERS
caino for canio
...Dude.
typo from local thunk
I literally just played this
and crashed
Selling the card when the counter reached 0 should've given a Canio
without j
just use the normal key for vanilla objects
in your case it's caino , funny enough
use add_card and not create_card
just more simple
i'm working on a tutorial explaining the basics
should be out soon
The auto code IS add_card tho
It was just using j_canio
that caused the problem
Oh my bad, those were steel cards 😭

theres quite a few from what i know (gluttenous, selzer)
oh and consumeable
i already hooked into Game:update and yet they didnt update in real-time
what did i miss
How to make a joker do something as soon as it's added?
add_to_deck
I mean as soon as it's spawned by judgement/soul/etc
Wait, how is this even supposed to work?
check vanillaremade wiki
You mean add a hook to add_to_deck?
It doesn't work on added joker
Make a joker do something when another joker is added? Sure. Make a joker do something when it's added? Nope
yeah no it cant really update in real-time
the description doesnt use ref_table and ref_value, which means the text is pretty much fixed
BOOOOO
Is there a way to redefine base balatro stake stickers?
Wait, stake stickers? You mean make them look diffrent?
Yea
my current cards don't look good with them
I've created new stickers
Tried hooking start_up but doesn't seem to work
Something like this
Lookout for smods' take_ownership
I think you can redifine sticker's spritesheet
what should i be lookin at to add a button to the shop
My “vigilant joker” now crashes the game because of the .ogg files
No wait
Ok I’ll get the log first hold on.
I don't understand G.E_MANAGER:add_event(Event({})) <_>
It adds an event to the event queue.
this work?lua calculate = function(self, card, context) if context.individual and context.cardarea == G.play and not context.blueprint and SMODS.has_enhancement(context.other_card, 'm_lucky') then return { x_chips = card.ability.extra.luckyxchips, dollars = card.ability.extra.luckydollar, play_sound("busterb_gunshot") } else if SMODS.pseudorandom_probability(card, 'busterb_lucky_vigi', 1, card.ability.extra.odds, 'busterb_lucky_vigi') then context.other_card:set_ability({G.P_CENTERS.m_lucky}) play_sound("busterb_vigi") end end end
You can specify some parameters for the event, like the function (what the event does), a delay for the event, etc.
it's possible to ban blinds for challenges but could i do the reverse and state the only blinds that should appear
whitelist
I think you should make your custom rule, because vanilla's restrictions are kinda restricted
Hi friends! First timer, trying to learn how to mod this game.
I’m playing around with Game State and I can get a trigger to send the player to the shop but when I do it leaves the interactive element (either the cards on screen during the blind or the selectable blind on the BLIND_SELECT screen) on screen.
Any suggestions on how to clear that?
im trying to make my first booster and why is it blank ?
you could just use malverk and make it a texture pack
i think it's the fact that you are returning a key in loc_vars
so it looks into the localization file instead of loc_txt
the key youre returning in loc_vars is something done in vanillaremade so multiple booster packs of the same type can use a single description by removing the number at the end of the key
so that isnt needed here
i triple checked and didn't noice I PU A KEY IN LOC VARS (sorry for caps my keyboard randomly shifts IN caps lock)
So what do I need to specify, if I want to stop the hand from scoring? And how do i make it score again?
Why?
Where can I get a joker in the base in a 71 by 95 resolution so I can copy the style perfectly?
jokers from my custom rarity doesnt spawn at all (even with tweaked weight) can someone help ?
can i see your rarity definition code?
like this ?
I'd like to mark my mod as incompatible with all versions of Entropy. What string do I use for the conflict?
hmmm
try setting it to 1
also you dont need to define the get_weight function
conflicts = {
"entr"
}
if i set it to 1 itll mean therell be a buttload of them supposed to drop, get_weight thingy is bc i borrow code from vremade
update they still dont spawn
strange
maybe you need more infos...?
your jokers dont have an in_pool function, correct?
(i have no idea how to do that)
if you dont have an in pool function on a joker then it defaults to always being in pool
huh
real quick add
pools = {
["Joker"] = true
}
to your rarity code
see if that works
"joker" is the key ?
like so ?
yep
Small question: what does order do for a ConsumableType (e.g: Planet)?
mb im kinda new at stuff, verbatim is in loc ?
what you sent earlier is correct
and im lowkey stupid
where are you seeing an order parameter?
does it spawn in the shop? if so then you can adjust the rates
I don't see it, I assume there is one based on the default Hands table inside the game files
Inside game.lua
So it does nothing for the SMODS.ConsumableType? (as not specified?)
well only poker hands are ordered
correct
order does nothing for consumables
Okay, so it does something for SMODS.PokerHand?
heres the docs on SMODS.PokerHand
https://github.com/Steamodded/smods/wiki/SMODS.PokerHand
btw in SMODS.PokerHand you dont specify the numeric index of where its supposed to be at, you instead specify the hand it is above
Thanks!
So I specify something like above_hand: "hand_name", without the mod prefix, right?
you only include the mod prefix if ur hand is above a modded hand
Awesome, thanks!
what is an efficient way to make sure that wild cards cant be debuffed? i can obviously check at the start of the blind and make all the wild cards immune to being debuffed but i want it to be so that wild cards made in a blind cant be debuffed either
not too familiar with debuff prevention but this should be relevant
yes, im already using that to prevent the debuffs, im just wondering how i can efficiently check to make sure that the cards are debuffed from the get-go
*debuff-immune, not debuffed
I don't really want to make people download more things
If I can do this without It it would be great
if context.debuff_card then
if SMODS.has_enhancement(context.debuff_card, "m_wild") then
return {
prevent_debuff = true
};
end
end
