#💻・modding-dev
1 messages · Page 279 of 1
Because get id is empty? Maybe try Card:get_id(played_card)
But idk
Isn't X:func() shorthand for Y.func(X)
No idea
Your method of finding a pair is wrong
Oh? How should I do it?
context.poker_hands[“Pair”] would be a table of all the present pairs
Button for what
Yes, that is what I want
Yes but your loop grabs a table of cards and assumes it is a card
switching out the boss blind for something else
basically
Oh
...i couldve swore someone did that before
That's cool
Ohhhhhh
I think I get it now
So your played_card is actually {card1, card2}
?
tytyy!
it gives you the option to either fight my mod's mega boss for increased reward
or just
go with the vanilla one
That would work yeah
this goes pretty well together!
This sounds like what I have coming in ortalab
Oh cool, you are a part of Ortalab?
Yayyy its not crashing anymore
is it out, eremel?
Not yet
It’s on the test repo at the moment
I can send it over to you later on for reference if you like
sure, that would help a lot since im bad at UIs, thanks :D
yk where i can find a example code for a SMODS.Enhancement? i cant find it anywhere
I've got one here you can look at. I think SMODS has a lot of documentation but I feel it woul be really nice to also have an example of each on the wiki page for the topic
bump
yeaah, there is a page with some examples but just for spectral, tarot, joker and edition
Enhancement card from my mod
tyty!!
Mine is a very weird example because it is like a stone card meets a steel card. It gives +chips but is focused on holding it so it gains chips every hand
oh wait i have a similar thing in my mod haha
it gives +50 chips when hold in hand
my mod is about fusing different enhancements, than i have:
Steel + Stone = Concrete: +50 chips while in hand
that's cool!
update - it is functional, but the button always says 'nil' and the ui stuff is a bit dodgy
what the fuck
what
4 blinds 😭😭😭😭
yeah
oh thats cool
my mod is broken right now so that playing generosity and friendship seal cards in the same hand can give you negative mult for some reason??? but fuck that i wanna play math deck
where can i find all the enhancement cards assets without like the rank in suit? like in the collections page?
it took a while for the game to accept that the first boss blind is not the final blind in an ante, and there are some artefacts (such as investment tags triggering on the first boss)
Double boss blind in one ante, this modding community never cease to amaze me.
its in the game files with all the other textures
you can extract the balatro executable to see inside it
Tried and it did just something else. now, the card eval message comes as a bunch after all the retriggers instead of before
how do i handle file inclusion using 'require' in a balatro mod?
do i need to append my mod's directory to lua's package.path?
Ok, just found the solution: card eval has to just be below score_card, that's it, lol
without event
ooh, tyty
I GOT THE BUTTON TO SHOW UP 🗣️
in there are all the cards together, i wanted one of each enhancement yk?
-# ignore the text please
Just SMODS.load_file
what is going on
basically
im adding Worlds to my mod
its randomly chosen every time you start a run
pressing that button will switch between the vanilla boss blind, and a mega boss from my mod
:3
we are so back with peak... ✊
let me see if i can get it working first :3
i think thats the hardest part done already
The button is the easy part
...not the switching boss part???
Making it update all the ui elements correctly is the hard part
ah
oh but also
is it weird that the button flies from the top of the screen to the boss blind ui
lemme record rq
bump
the button is easy
Idk what you mean but yes
That is weird yes
Eremel You're the wizard here i trust you
Whenever anyone says "flying button" I think "weird"
thanks
the 1x size is 71x95 right? so the 2x is 142x190?
Guys can someone help me
do i really need to patch the code to make it display "Score as close as possible to"
instead of "Score at least"
I need help with cryptid
Why does it always have to be cryptid
what the
why did i lose the blind, i had hands left
math deck
aiko how tf does math deck work
where do yall draw your cards?
Is there a table of consumables that the player currently has?
Trying to make a card that interacts with current consumables
if i have in my main.lua
CHB = SMODS.current_mod
SMODS.load_file('utils.lua', 'chb_mod')
CHB.load_dir('jokers')
and in another file utils.lua
function CHB.load_file(file)
-- implementation
end
function CHB.load_dir(directory)
-- implementation
end
why is CHB.load_dir still nil in main.lua? not seeing what im doing wrong here
draw_from_deck_to_hand?
no i mean design the card, the app where you make the image
im making custom cards but the app i normally use for pixelart doesnt let me use the assets i have for some reason
tyty!
oh wait you have to pay for use?
oh, how?
BUT the app itself is definitely worth it
since it has a bunch of useful features for pixel art
imma try to ind a tutorial, tyty!
i would even say its the best app for pixel art :3
i was using fire alpaca
here
if i had to pay it would be over for me, its 120 of my currency and yesterday i was trying to get 3,50 from some friends so i TOTALLY wouldnt have LOL😭
i can relate to your poverty 😭
I can confirm aseprite is worth it
im a little bit scared i think
Nvm figured it out it's consumeables with an e............ Why!
i can barely take it with 2 hours of godot i cant imagine 80 hours of vscode
why did it start downloading vscode community 2022😭
idk 😭
switching bond to Strong was the solution
IDK HOW I FIGURED THAT OUT 🔥
is this how it feels to be eremel
i cant understand anything that is going on🔥🔥🔥
how do i properly make/use a localization file? I've created a localization/default.lua and followed the table structure on the wiki but the description isn't showing up in the collection for me.
for the prefixing - do I do something like j_jokername = {...}, j_[modprefix]_jokername = {...}, or [modprefix]_j_jokername = {...}?
j_[modprefix]_jokerkey
thanks, so if jokerkey already looks like j_jokername i would create an entry in descriptions.Joker like j_[modprefix]_j_jokername as i understand it?
yes
thanks!
im CONFUSED
why does this "repeat" line make the return line red
i will remove the entire code chunk later since its not what im looking for rn
but im a bit confused over this
Once again facing my biggest issue: how to limit the visibility of the vertex shader transformation for mouse hover
Larger textures get offset by much more than smaller ones
Wait.... but maybe...
i dont think repeat until ends with end
freezing 🗣️
this is an infinite loop is you're running it like that
mhm, i realized
you might want an event for that instead
nice, this button exists even when boss is rerolled now :3
time to work on the actual fuctionality, yipee
actually
how do i check whether the boss blind is a showdown one or not?
how would you all suggest going about implementing a variable message in a joker's description (like Loyalty Card)?
ive found the localize function but don't fully understand what i need to be passing to it or how it works
if im creating my own new object class with SMODS.GameObject:extend, how can I apply it to a card for testing purposes? eg like with debug_plus
i think its G.GAME.blind.boss.showdown
thanks :3
wdym
you can return strings in loc_vars
yeah i tried that first but the substitution wasn't happening on them (which makes sense). for one condition i want the stylization to be different than from another
you can use main_end then, you pass a UI table to it and it appends it at the end of the description
(or main_start for the opposite)
anyone got any ideas on how i can alter calculate_seal() in card.lua so i can get red seals on jokers to retrigger the joker?
this is what it looks like in my dumped lua file right now, with my patched code highlighted
HMMM
shouldnt it work?
.
oh wait its blind
im dumb
oh no
god my resolution is so ass i thought "b" was "B"
heyy!! tyty for the code, im almost done with the one i was trying to do, just one question, what does "chipsrate" do? i saw it on yours
owo
btw is this right?
if im creating my own new object class with SMODS.GameObject:extend, how can I apply it to a card for testing purposes? eg like with debug_plus?
like, i honestly have no idea how to mess with the order of events here so i can make it do the thing
i'm wondering if i should just tprint(context) in this scenario so i can see what on earth is happening
...
turned out
its ~~ G.GAME.blind.config.blind.boss.showdown~~ that only works when you are actually fighting against the blind
:3
wtf
i have no clue why it doesnt work 💔
if i want the playing card to have both +30 chips and +4 mult i would need to do this right?
getting this error after using the following code, anyone got any ideas?
How much it increases when held or not played. I have been very bad with standardizing my variable usage on my mod code so far!
ooh tyty!!
Probably because I am doing this for fun and not work, lol!
so fairrr
btw is this right? or do i make them like one by the side of the other?
like side by siide with a +
Does anyone have an example of a consumable which can only be used when X cards are selected? For some reason, my consumable can be used even if in the shop, or no cards are seleceted. Basically doing nothing, ha!
If you use this card.ability.perma_bonus, it will automatically apply that much in chips when scored
im not sure i follow
like, card.ability.perma_bonus = card.ability.extra.chips + card.ability.extra.mult?
trying to make a joker that shows the current amount of xMult they have in the description
first question: is the text scale thing {S:value} or {s:value}
second question: how do i have it show the current amount (i want it to start on x1 also)
bump
i want to check outside the boss blind itself, by the way
:3
i cant figure it out
at all
"{C:inactive}Currently {X:mult,C:white}X#2#{}"
then populate the variable using loc_vars
this?
@rafae actually just do this
return {
chips = card.ability.chips,
mult = card.ability.plusMult,
card = card
}
change your vars to match of course
okay
wait where do i add this?
sorry im really new to modding
oh wait nvm
Need some modding assistance, I have never installed mods before and I followed a YouTube tutorial and I think I did everything right, the mods folder is in the game but when I look at it it’s saying im missing steam modded which isn’t the case since I definitely have it installed and in the mod directory, so I’m not sure where I went wrong here
same happened to me before, had to uninstall everything including balatro and reinstalll
@rain hazel
Does your SMODs dir look like this?
like this?
Sure did
Also be sure you put this in the right folder, tons of people put their mods in the wrong place. It does not go in the same path as the Balatro.exe
try it
my balatro crashes when i try opening
that loc vars
Oh lol! Swap the things
seems wrong
Return Chips,etc needs to be in the calaculate function
so the card.ability.perma_bonus in the return and the return part in calculate?
Don’t you put it in the %AppData% area of the game?
how do i make use of the juice_card_until function? is there an equivalent provided by steamodded? I tried using it as its used for Loyalty Card but the function tries to access center while it is nil
I have an example for you
this? i got some error telling me to add double = so i did
awesome, thank you :)
for some reason some things now are a little dark or resumed
:3 i think u need to research the example joker mod more
This card will jiggle if the played hand (i.e. what the user has selected but not yet played) will be a flush
if nil ~= context.poker_hands and next(context.poker_hands["Flush]) then
if false == card.ability.ready then
sendInfoMessage("Joker is now READY!", self.key)
card.ability.ready = true;
end
local eval = function(card) return (next(context.poker_hands["Flush]) end
juice_card_until(card, eval, true)
loc_vars is where you put variables tha will be dropped into the loc_txt of your card or edition or what have you. I would remove that loc_vars entirely. Or just paste your code so I can help you fix it
ive never seen ANYONE use false == card.ability.ready instead of card.ability.ready == false
Well we can't go around giving people actually working samples, where is the fun in that
ur crazy 💔
hm, what i have here looks very similar. not seeing the difference. ill provide what i have
...
elseif context.joker_main and not context.blueprint then
local eval = function(card) return (card.ability.extra.tarots_remaining == 0) end
juice_card_until(self, eval, true)
end
...
replace self with card
oh wait i need to pass card duh
and that should be it
yeah ill just add here the code, i dont really follow
SMODS.Enhancement ({
key="extra",
name = "Extra Card",
atlas = "enhanc",
pos = {x=2, y = 1},
replace_base_card = true,
no_suit = false,
no_rank = false,
always_scores = false,
loc_txt = {
name = "Extra Card",
label = "Extra",
text = {"Gives +30 chips and +4 mult",}
},
config = {extra = { bonus = 30, mult = 4}},
loc_vars = function(self, info_queue, card)
return {card.ability.perma_bonus == card.ability.chips + card.ability.plusMult}
end,
calculate = function(self, card, context, ret)
if context.cardarea == G.hand and context.before then
Chips = card.ability.chips,
Mult == card.ability.plusMult,
Card == card
end
end
})```
remove cardarea, using_consuneable, consumeable, and area stuff
those in the documentation are just to show you want u can access, not for u to actually put it in the code
and also, the conditions are wrong, you are checking for the joker itself, not the consumable being used
context.consumeable refers to the consumable being used
Oh! thank you! Would explain why the documentation was confusing me lol so the second if statement would be context.consumeable.edition.e_negative?
Thank you!
SMODS.Enhancement ({
key="extra",
name = "Extra Card",
atlas = "FoxModMisc",
pos = {x=2, y = 1},
replace_base_card = true,
no_suit = false,
no_rank = false,
always_scores = false,
loc_txt = {
name = "Extra Card",
label = "Extra",
text = {"Gives +30 chips and +4 mult",}
},
config = { perma_bonus = 30, mult = 4, x_mult = 2 }
})
Change your atlas back, but this works. You only need a calculate block if you're being conditional
are there any steamodded addons for visual studio code?
oooh okok, ty!
does this automatically show up in collection or do i need a code for this aswell?
and the game still crashed
oh wait nvm i didnt save
open the entire Mods folder in vsc
can someone pls tell me how to check if the boss blind is a showdown one outside of the actual boss blind? 😭
it will show up in the collection automaticaaly. It you're using debugPlus you can hold Control and hit W or E to cycle through until it appears
I see you but cannot help you, I don't know
ty so much! helped me a lot🫶
yeah dw, i know that :3
im just hoping that theres someone with better understanding than me coming in to save the day
blind.boss.showdown, no?
that only works if you are in the boss blind, it seems
this is what im trying to do
you have access to the key, no?
the button should only appear when its a showdown blind
uhhhh wym by that :3
if you have access to the key of an object, you have access to all its info
Can someone help me with an issue im having? I basically just want the joker to do X3 Mult when time a full house is played, the game crashes when i play a hand saying XMult is an nil value
Heres my code:
text = {
"{X:mult,C:white} X#1# {} Mult if played",
"hand contains",
"a {C:attention}Full House{}"
}
},
blueprint_compat = true,
perishable_compat = true,
eternal_compat = true,
rarity = 3,
atlas = "Modded_Jokers",
pos = { x = 0, y = 0 },
cost = 10,
unlocked = true,
discovered = true,
config = { extra = { Xmult = 3 } },
local_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.joker_main and context.poker_hands["Full House"] then
return {
card = card,
Xmult_mod = card.ability.extra.Xmult,
message = 'X' .. card.ability.extra.Xmult,
colour = G.C.MULT
}
end
end
}
oh, true
am i supposed to dig through the ui to find the blind key?
and because the blind already is determined when you enter the ante, you should have access to the blind
That'd be the logical place to check where it is stored, yeah, haha
man, this is more complicated than i thought it would be, thanks!
hey fox, still struggling with juice_up_until. LOVE isn't crashing or anything but im still not getting any juice up effects on the card. is it the context that's incorrect for me?
for reference here's what i have again:
elseif context.joker_main and not context.blueprint then
local eval = function(card) return (card.ability.extra.tarots_remaining == 0) end
juice_card_until(self, eval, true)
end
i've tried inverting the condition but that didn't have any effect.
another edit: just remembered the context.joker_main context is ONLY for scoring effects.. do i even need to wrap this block in a context?
what is that one page in github about the text and collors etc?
Are you using an old example? This way of setting up a joker uses a lot of stuff SMODS will do for you automatically!
tyty!
You're sure making me think so lmao
if you return x_mult = [whatever], you won't have to set up your message yourself. Can you show the actual crash log? Which line is it saying is nil?
Is it possible to extend the SMODS.calculate_individual_effect function in my mod to alter some parameters before calling the original?
you can hook it
please tell me more
...anyone? 
It says line 39, which is the message line
i dunno, thats out of my field :(
ah, i meant to reply to NopeTooFast
all i can think of is trying to use context.retrigger_joker somehow
trying to make a config for this effect
i am a bit stupid though...
C:hearts
thank you for pointing that out
if you set up your joker in the way smods likes it now, you'll luckily not have that issue, then! Lm see if the example mods actually show it properly, or if there are better examples
{C:inactive}(Currently{} {X:mult,C:white}#X1#{} {C:inactive}Mult)
is there a page with those "{X:mult}, {C:red}" and examples of things like those you can use?
haha damn I thought I'd grab an example from my own mod, but the easiest one still does it the old way 🥲
the first parenthesis won't be gray D:
Does anyone know if I could take the whole Balatro game files and upload it on discord (private ofc) so I can use it for personal projects when modding as it would be easier
kh crap
what context should i be running juice_up_until inside? i took it out of the joker_main context but now the card is spazzing haha
i very much enjoy this
i apologize :3
also the empty {} is not needed
both ones
any context, what's important is the function you give it for it to stop
Fair
this is the tightest fit i can get that doesnt cover any important information
im an advocate for more {}
Hey guys
i need the card to still be able to be juiced even within the shop. does this even matter? as i understand it context.joker_main is only used for scoring
should i just do something like if context.cardarea == G.jokers?
anything you do during scoring in calculate will be done at the beginning of scoring unless you use an event
local old = SMODS.calculate_individual_effect
SMODS.calculate_individual_effect = function(effect, scored_card, key, amount, from_edition)
print("pre calc")
local ret = old(effect, scored_card, key, 123, from_edition)
print("post calc")
return ret
end
works thanks for the hint
i am trying to create a new joker that randomly copies the ability of a joker in hand, current implementation does not work, is there something im missing?
calculate = function(self, card, context)
if context.end_of_round and context.joker_main then
local joker_list = {}
for k, v in pairs(G.jokers.cards) do
if v ~= card and v.ability.set == 'Joker' and not v.debuff then
table.insert(joker_list, v)
end
end
if #joker_list > 0 then
local random_joker = joker_list[pseudorandom('tensoon') % #joker_list + 1]
card.ability.extra.joker = random_joker:get_id()
card:set_ability(random_joker.ability.set, nil, true)
card:copy_enhancements(random_joker)
return {
message = localize('k_csmr_copy'),
color = G.C.MULT,
message_card = card
}
end
end
if context.joker_main then
local joker_list = {}
if card.ability.extra.joker == '' then
for k, v in pairs(G.jokers.cards) do
if v ~= card and v.ability.set == 'Joker' and not v.debuff then
table.insert(joker_list, v)
end
end
else
if #joker_list > 0 then
local random_joker = joker_list[pseudorandom('tensoon') % #joker_list + 1]
card.ability.extra.joker = random_joker:get_id()
card:set_ability(random_joker.ability.set, nil, true)
card:copy_enhancements(random_joker)
return {
message = localize('k_csmr_copy'),
color = G.C.MULT,
message_card = card
}
else
card.ability.extra.joker = 'Inactive'
end
end
end
end```
What do you possibly need to hook calc effect for
crap im on phone, cant help this one :(
nooooo
so if i want the card to stay juiced both inside and outside of scoring, and both inside and outside of the blinds, should i be using an event?
No
description is better now
still need to know how i would make a config for this...
The function will let the card shake until the other function you pass it is true
again, juice_card_until is active until you tell it to stop so you can start it whenever and end it whenever at any time
Or it might be until it’s false, I don’t remember off the top of my head
it's until false because the name cant be logical
yeah i understand that, i have the eval function correct but the card spazzes as if multiple calls to juice_up_until are being run. i have the call outside of a context at the moment so this behavior makes sense.
Well without knowing your effect it’s impossible to tell you where it should go
maybe you are calling it multiple times
So I'm trying to make a Blueprint clone that changes the target joker after scoring (context.after). When I exit to main menu and come back it seems to forget the value and it replaces it with "MANUAL_REPLACE" and then the game crashes because I'm trying to calculate a nil value.
I saw that vanilla Blueprint and Brainstorm fix this by changing the target every if G.STAGE == G.STAGES.RUN, but this would be executed whenever I do anything and I want it only to change after scoring
Is there any way to fix this? Like some way of detecting when the run is loaded and then resetting the value
can i just share the entire calculate function with you? im only calling it once.
go ahead
calculate = function(self, card, context)
if context.using_consumeable and context.consumeable.ability.set == "Tarot" then
local key = CHB.tarot_key_from_name(context.consumeable.ability.name)
sendTraceMessage("[doubledipper calculate] - key = '"..key.."'", "DoubledipperLogger")
if card.ability.extra.tarots_remaining == 0 then
card.ability.extra.tarots_remaining = card.ability.extra.tarot_dupe_cycle - 1
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = (function()
local card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, key, 'double')
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
return true
end
)}))
return {
message = "Creation!",
colour = G.C.RED
}
else
return {
message = "Oops!",
colour = G.C.RED
}
end
else
card.ability.extra.tarots_remaining = card.ability.extra.tarots_remaining - 1
end
end
local juice_eval = function(card) return (card.ability.extra.tarots_remaining == 0) end
juice_card_until(card, juice_eval, true)
end
bump
how hard would it be to make a tarot card that you select 2 cards that have enhancements then 1 looses the enhancement and the other one changes to one enhancement based on the one both had?
im guessing a lot?
guess i'll Bump...
i was thinking of doing something like destroying both cards and adding one with the enhancement to make it easier
wat r u struggling with
yeah that's why i was asking which context makes the most sense to run it in first
i want it to show the xmult it gains and the total xmult it has
well the problem is that you can run it in any context, it would be more helpful if you tell us when you want it to start shaking
like, is there anything in ur config = {extra = {...}} rn
no
sure, the joker's ability is that every fourth tarot card will be duplicated. when the counter is 0 (im counting downwards) i want the card to be juiced showing the next tarot used will be duplicated
oof
this can happen anywhere at any time
make two then
In principle, I think you could just rewrite the calculate function there as
calculate = function(self, card, context)
if context.joker_main and next(context.poker_hands["Full House"]) then
return {
x_mult = card.ability.extra.Xmult
}
end
end```
were you talking to me or zebra
then you probably want it here
note the ~= 0
bit nicer
🫵
🫵
if you are reading this
you are now breathing manually.
hey all, i am attempting to build an idol-like card but cannot find the actual code in the balatro luas. could anyone help me out? i need to recreate the random card effect mostly
thanks! this makes sense to me. gonna try it out
if you are reading this
owisurgewoirun
check a random card in G.playing_cards
and grab stuff from there
thanks for bearing with me as well lol
oh i actually reversed the ~= and == because im stupid, it is supposed to be ==
i got caught again by the function being called "until" lol
if you are reading this
you are now blinking manually.
okay so its not just me thinking that naming is reversed lol
how
if you are reading this
you are now breathing manually
i first tried inverting the third argument to false haha
nah its just bad naming
pseudorandom_element(G.playing_cards,pseudoseed("your own seed))
mm
it grabs a random value from a table, and it remains consistent for the same seed
mkay
where am I going wrong? Game crashes upon using a planet card
like i need to define them myself or
-# i am dumb...
yes
it looks like youa re using a context for edition not for planet, but i could be wrong
check whether the card has an edition too
if context.consumeable.edition and ...
nvm dont hear me just noticed it doent even make sense
my atlas is not adding the image to the enhancementt
I'm confused, is if context.consumeable.edition.e_negative not checking whether the consumeable has an edition?
basically
without the e_
if the consumeable doesn't have an edition, then context.consumeable.edition is nil
ur trying to grab stuff from nil
which will result in a crash
okay so context.consumeable.edition == nil will perform the same check
if context.consumeable.edition and context.consumeable.edition.negative and context.consumeable.ability.set == "Planet" then
I appreciate your help, now I still cant get the display value in the description to read X3 it still just says Xnil, and the context still isnt working properly, the joker doesnt activate no matter what i think poker_hands["Full House"] was wrong so i tried a few others and i still cant get it to work, i think its just a matter of not having the correct format for the context
i dont remember if its e_negative or negative actually
The e_ is removed iirc
does anyone else really struggle getting their lovely tmol patterns to work?
like I copy them straight from the game files and it doesn't find them
i'm wondering if im doing something wrong
copy from Mods/lovely/dump
how do I check what ante it is currently
Steamodded makes a lot of patches that will change stuff from vanilla code
G.GAME.round_resets.ante maybe
yeah i realized it might be that but i couldn't find any changes to card:is_suit
the description'll be an error in your loc_vars! and next(context.poker_hands["Full House"]) should work!
Mods/lovely/dump has the modified source code so you'll easily find what u need to use
Game no longer crashes upon planet card usage thank you, any idea why the negative copy isn't generated?
copy_card(context.consumeable)
you're passing a list of cards to copy_card
yeah
well i'm trying to be stubborn and not have to define my own vars so i'm trying to find canio's code in the game
canio is misspelled as caino in the code
my atlas is not adding the image to the enhancement
that explains some things
whats so difficult about setting ur own stuff in config extra tho 😭
config = {extra = {currentXMult = 1, XMultIncrease = 0.2,}}
like, that works
yeah i think so
mhm, do it then :3
I thought that the local variable "card" was copying the consumeable then having edition set added to deck adn then put into consumables
what does this mean chat
G.consumeables.cards refers to the entire table containing every single consumeable in your area
play the hand instead
i am playing the hand what
this looks right
and also
please refrain from naming your var as "card"
dont discard
it's cuis the function is marked as nodiscard in the lsp defs
it just means, use the return value of the function or u will get a warning
so that's not the reason why this code simply is not working
nop
well shit
would you be able to show your entire code
i feel like
thats the wrong way to use change_base
isnt it something like 7H (i dont remember) or smt?
nop
huh
icic
you just pass card, suit, rank
i am 1000% getting clowned to hell for the means by which this is coded
my atlas is not giving me the image
u sure u set the atlas right
i will defend u, dw
:3
99% sure
andd the enhancement?
intended behaviour is to retrigger aces,2s,3s,4s and 5s (works as expected) but to also half the rank of played 6s,7s,8s,9s and 10s rounded down
i decided to hardcode it to avoid decimal rank shenanigans
so in here i change the x and y?
mhm
the top left sprite in your sprite sheet is x = 0, y = 0
your sprite sheet is a grid from the top left
increase x by 1 to go right, increase y by 1 to go down
marie explained it very well :3
oooh, thought the middle was 0, 0
and i just used what was aleady in there when someone handed me the example coded, also forgot to change
looking a little strange but its already good enough, ty!!
those lines might be intended to appear to show the empty space between consumables
they are slightly thinner than jokers but still use the same sprite size
so there is empty space mostly on the sides
no dice, though I expect it's because I misunderstood you somehow
the emplace part
the only thing that doesn't work here is changing the card ranks
i've verified that the rest of the code runs as expected with print statements
so its normal to have it?
not in your final version
but as a placeholder it seems useful
no yeah yeah, that i guessed, its just because i thought it was like a bug or something
and makes sense since im using a consumable placeholder for a enhancement lolll
yyyeah that's not a great idea
figured, but just wanted a random image so i knew it was atleeast working, later ill download the aseprite and make the enhancements
btw what is the playing card size?
Can anyone help? I was thinking of using a global thing like in the castle2 example from the example jokers mod
But I don't know if that would support multiple copies of this joker copying different jokers each
hiyaaaaaaaaaaaaa! how do i add something like the None The Fool has?
dynatext
i have no idea what it is
i have no idea how to do it
it made zero sense to me when i tried to learn it
my b forgot to replace the variable, still doesn't function though
all I know is that dynatext does that apparently
right
main_end stuff
i don't have access to my pc rn, so i cant check how copy_card works :(
your ifs are wrong
on your first one you have if repetition and g.play stuff
i hope that u will receive help from other people about that though, i tried my best 💔
sorry
then in the case that that is not true you check if repetition and g.play
so the ifs inside the else block never execute
Don't be sorry, I appreciate all of the assistance you got me much further than I was!
ok so how do i make a wild card
they do execute though
does someone have an example code for wild card? i cant find it in the balatro files
the first if checks if context.repetition and cardarea and then checks the ranks of cards
the second checks if context.repetition and cardarea and then checks for different ranks
putting print statements before the rank changing events prints them out as expected
i'm probably gonna clean up the code anyway, but that is not the issue
the rank changing code is running but not changing the ranks
Oh I didn't see the last and
Oh you know what it is
context changed by the time your event runs
so you gotta store a reference to context.other_card
ohhhhhhhhhhhh
that makes sense
i'll move the effect to context.after and use ipairs to go through the cards then
i'm looking at the balatro source code rn
put in your loc_vars function this:
main_end = {
{n=G.UIT.C, config={align = "bm", padding = 0.02}, nodes={
{n=G.UIT.C, config={align = "m", colour = BACKGROUND_COLOR_YOU_WANT_TO_SET_IT_TO, r = 0.05, padding = 0.05}, nodes={
{n=G.UIT.T, config={text = ' '..TEXT_YOU_WANT_TO_SET_IT_TO..' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.3, shadow = true}},
}}
}}
}
replace BACKGROUND_COLOR_YOU_WANT_TO_SET_IT_TO with the background color (ex. G.C.GREEN, G.C.MULT, etc.) and replace TEXT_YOU_WANT_TO_SET_IT_TO with the string of text you'd like it to display
edit: put main_end in your return statement
that'll be far cleaner in execution anyhow
grand, thanks!
does someone have an example code for wild card? i cant find it in the balatro files
it's not set up in a single place, due to the way vanilla is set up
but you can find code related to it by looking for 'm_wild' in the sc
Are you making an enhancement that works like wild cards
yeah its basically a wild card+bonus
got it working again
it works as any suit and gives +30 chip
tyty!
this code is so much cleaner now too
add any_suit = true to your enhancement definition
oh, just that?
yes
its because i got the template im using from an example
it was true and i changed to false
you can also just remove it
okok! ty!
i was just about to ask that loll
it had "always score", "no suit" and "no rank", i removed the three of them
it was kind of a stone like card in the example
is there a way to make it so that the repeat doesn't score first and goes after the card behind it?
if pre ~= nil then
local ret = SMODS.blueprint_effect(card, pre, context)
if ret then should = true SMODS.calculate_effect(ret, card) end
end
if should then return {} end
I've got the joker to proc during the correct times finally but the value that it multiplies by and the value displayed in the joker description still read Xnil, any help? Heres the code:
SMODS.Joker {
key = 'test_joker',
loc_txt = {
name = 'testJoker',
text = {
"{X:mult,C:white} X#1# {} Mult if played",
"hand contains",
"a {C:attention}Full House{}"
}
},
blueprint_compat = true,
perishable_compat = true,
eternal_compat = true,
rarity = 3,
atlas = "Modded_Jokers",
pos = { x = 0, y = 0 },
cost = 10,
unlocked = true,
discovered = true,
config = { extra = { Xmult = 3 } },
local_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.joker_main and next(context.poker_hands["Full House"]) then
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
Xmult_mod = card.ability.extra.Xmult
}
end
end
}
how do i make something that have a chance of happening when card is playing?
like a glass card
You have to define odds in ur config and then include something like this in the loc_vars,
(G.GAME.probabilities.normal or 1), card.ability.extra.odds
At least I think, theres more to the calculate part but i think thats the start, im very new to this so take it with a grain of salt plz lmao
tyty!
anyone know if there is any documentation for copy_card?
you have commas at the end of your line
which should not be there
you're using copy_card properly
how do i make the event occurs when card played?
In the source code yea
then maybe I should be using something else, I removed the commas still not functioning as I thought it would, trying to copy a planet card being used
The way you coded it, your consumable must have an edition to proc
Your context check should go like ```lua
if (not context.edition or (context.edition and not context.edition.negative)) and...
I totally missed that, thank you will change it now
does this work?
by not working what do you mean exactly
be specific
is ther an error
So i finally figured out how to get my card to show 3X mult in its description in the collections but when I go in game now it just goes back to Xnil, any ideas?
well after the changes SDM recommended it crashes and I get the following error, my mod code for context
still looking for help on this 
i think i need to know a bit more about what happens when you play a hand so that i can properly retrigger a joker
what makes it worse is that i was listening to beethoven: 7th symphony, 2nd movement: allegretto from ultrakill while looking for caino in the code to help me out
it felt like my brain was begging me to just stop and give up
bump
can you show your code?
Instead of doing == nil or == false do not context.consumeable.edition
i have the part of the card breaking, but how do i change the chance?
I have a wonderful shader effect now and I can't use it until I somehow figure out how to make the transform projection thing not weird
I tried that as well and got the same error
I recreated the calculate function more properly and it works fine on my side
if context.using_consumeable then
if (not context.consumeable.edition or (context.consumeable.edition and not context.consumeable.edition.negative)) and context.consumeable.ability.set == "Planet" then
...
end
end
yo whoever's got experience with the new blind calc can you give me a rundown, i can't find quick evidence of it existing
But yea it's prob one of those screwing you over
SMODS.Joker {
key = 'test_joker',
loc_txt = {
name = 'The test',
text = {
"{X:mult,C:white} X#1# {} Mult if played",
"hand contains",
"a {C:attention}Full House{}"
}
},
blueprint_compat = true,
perishable_compat = true,
eternal_compat = true,
rarity = 3,
atlas = "Modded_Jokers",
pos = { x = 0, y = 0 },
cost = 10,
unlocked = true,
discovered = true,
config = { extra = { Xmult = 3 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.joker_main and next(context.poker_hands["Full House"]) then
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
Xmult_mod = card.ability.extra.Xmult
}
end
end
}
Can you show your joker/card's loc_vars and config?
what would the new blind calc be, from what I know trigger_effect got deprecated but that's it
for future reference, if you wrap your code in three backticks (`) on each side, you'll get a codeblock
Oh it's right there
oh, i found it, it's Blind:<>() calling SMODS.calculate_context, i thought blinds were receiving contexts now
okay so i kinda wanna make this two-way and give blinds a proper calculate() 🤔
delete the joker you have in your run, and spawn in a new one
u mean in my actual ide? or formatting for copy paste on disc
does that work?
on discord!
In discord you can do something like this
Makes the code less of an eyesore to look at
Did you start a new run
I was wondering how you guys were doing that, thank you
trying a new run now
when I started my mod last month, it took me a two hour bug fixing session to realize that if you change anything in your config, the joker in an existing run won't update, haha
consider this:
every time you set_ability() a card (ie. a card appears in the shop or wherever)
the center config is copied to card.ability
Figured it out, set_edition didn't like e_negative once I changed it to negative the joker works as intended
so of course if you then go in your code and change the center, that won't change the values in your save file
You can try taking ownership of the red seal and add a calculate function, I'm not too knowledgable on seals tho but I'd recommend looking at this https://github.com/Steamodded/smods/wiki/SMODS.Seal
LMAO thanks for saving me that time, it seems like it works great thanks guys appreaciate your help
tried that. the calculate function on the seal is never called
card manipulation functions are kind of dumb
set_ability wants a center
set_seal wants a key
calculate_seal doesn't have what you're trying to return I think
set_edition works with a key, or a stupid edition table {negative = true} but not a center
c o n s i s t e n c y
I think Cryptid made red seal retriggering Jokers work tho
how do i chance chances in cards like glass
how do i go about handling suit conversion like a 'The Moon' card would? can't find a reference in the source.
check out how the game uses G.GAME.probabilities.normal in the source code, and that'll probably give you some insight!
tyy!
all the suit conversion tarots use a generic piece of code. If you go through the code looking by 'Suit Conversion', I think you'll find it!
Look for the function change_suit
please how do I fix this
? What's that
hold on let me find my message
set_ability works with a key
this
oh?
I've changed a few things ever since I sent that message
now I'm using a random value being set in init_game_object
Have you tried saving said value inside the config table?
like in the config = {} of the joker?
Yes
has this been a thing forever?
ah
Eremel, last month
correction: it didn't work when I started modding 😄
it starts at nil (extra.joker) and then gets set to G.GAME.current_round.current_hand.bootleg_joker.joker every time calculate is ran
yeah I got sick of having to correct people's usage of it to use the centers
it makes more sense to take a key imo
yeah everything working with keys would be ideal
not seeing it yet, combing through files lol
i wish there was one of that example "ModdedVanilla" for the enhancements because god how hard is it being to understand the glass card
how do you retrigger a joker from a seal? i have ```lua
SMODS.optional_features.retrigger_joker = true
```lua
if context.retrigger_joker_check then
return {
repetitions = 1,
card = G.jokers.cards[1]
}
end
``` and its not doing anything
Can I see your Joker's whole code?
that's not how to set up the optinal_features
#2# and #3# are just there to debug
those are the things that showed up in the screenshot I took
You should do SMODS.current_mod.optional_features = { retrigger_joker = true }
SMODS.current_mod.optional_features = function()
return {
retrigger_joker = true,
}
end```
imma just quickly sweep this under a rug
SMODS.optional_features.cardareas.unscored = true
and is the rest of the code fine?
it does if SMODS is trying to call it
i give up
looks fine at a glance
oh I didnt realise it accepted just a table
bump
hm, doesn't seem to be working
It's quite a big code but at first glance there seems to be a lot of unrequired stuff?
i have a print("retrigger") in the if context.retrigger_joker_check then and its not firing
Would take a me a while to go trough them, can I send you a friend req so I don't bloat this channel?
Sure
Try starting a new run
Hmm, I had the same issue but I don't remember what I did besides that
If you have debugplus try printing SMODS.optional_features
what does "removing playing cards" actually mean for context.remove_playing_cards? can I use that to destroy cards when they're discarded?
To do thar you use context.discard and return {remove = true}
it says retrigger_joker is true
when and where exactly does context.retrigger_joker_check fire? because this is on a seal right now
seals should calculate that fine
have i made some sort of syntax error?
Try context.retrigger_joker instead?
nope
yo can anyone help me set up the balatro mod stuff? i know some lua and wanna try and add my own jokers but i dont actually know what i have to do to like add them to the game
If you debug the context value inside calculate but outside your if, which context shows up?
i'm basically trying to do the same thing and i get this. it does the message but no actual retriggering of anything
Those will help
https://github.com/Steamodded/smods/wiki/Your-First-Mod
https://github.com/Steamodded/examples
well that just kinda floods the console with a bunch of context tables at every step of scoring
hang on im setting up a debug to only print the keys
ok thats still a lot of keys but it looks like from card select to card played and new cards drawn, im getting modify_scoring_hand, debuff_hand, press_play, stay_flipped?, modify_scoring_hand 2 more times, debuff_hand again, before, modify_hand, main_scoring, repetition, final_scoring_step, destroying_card, after, and then after that is all stuff from discarding the played hand and drawing a new one
so no joker retriggering events in sight
crawling out of shader hell yet again with cuts and bruises and my clothes slightly on fire: stand auras
how the hell did you make shaders bigger than the card
teach me your witchcraft
also teach me your witchcraft in general those look awesome
Actually making shader stuff larger than the card requires vertex transformations that I'm less familiar with, so right now this is a pixel shader just with a larger sprite itself that has a lot of negative space
Only downside is that the vertex projection cards do already doesn't really work in combination so I had to tone it down to not look awkward
It's passable but admittedly I would've preferred to be able to at least do the offsetting cards do as they get farther from the screen center more accurately to the base card
How did you end up managing to remove the evolved type from the collection?
And I see you weren't able to do the voucher thing
anyone have an idea of how i might go about hooking a function from a mod with higher priority than mine? trying to add compatibility with a mod that currently can cause a crash when used with mine
Just haven't gotten to it yet
Uhm, you could lovely patch I guess
All stands are part of the Stand set, and then I made separate pools for regular and Evolved Stands. So I can directly access one from those pools if I need to get them randomly, but for the purposes of vouchers that make Stands and Evolved Stands purchasable in the shop, it spawns from the main Stand pool and then the two types have hidden rarities
How did you make the shader extend beyond the card?
So the first voucher sets the base stand rarity rate above 0, and the upgraded voucher sets the evolved stand rarity rate above 0
Winter hi :D
that was my initial thought but after searching this server is sounds like patching other mods doesnt work properly on mac
The sprite the shader is drawn on is like 79x165 or so, and the sprite is only in the bottom middle, so it just uses the empty space around the card. Am not doing vertex shader stuff....... yet
Also hi dilly!! Did you figure out the blind you were struggling with?
In that case you could patch SMODS to do something after all mods are loaded
Unless that also doesn't work on mac
I did :)
!!!!!
I don't think in theory you need vertex, just a bigger canvas.
what blind
Alot of stuff I struggle with gets solved after I sleep
Unfortunately I only slept until like 3 am, then was up to like 6 or 7 lmao
Yikes. Get some damn sleep
have any of you added a new context in a way that automatically handles the calculation?
calculate = function(self,card,context)
if context.setting_blind then
local joker_list = {}
for i,v in ipairs(G.jokers.cards) do
if v.ability.name ~= 'Tensoon' and v.config.center.blueprint_compat then
joker_list[#joker_list + 1] = v
end
end
if #joker_list > 0 then
card.ability.extra.copying = pseudorandom_element(joker_list,pseudoseed('Tensoon'))
end
end
local other_joker = card.ability.extra.copying
if other_joker ~= nil then
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
local copy_return = other_joker:calculate_joker(context)
if copy_return then
return other_joker:calculate_joker(context)
end
end
end
crashing the game with a stack overflow error with this joker...didnt even know this was possible
can someone have a look?
Oh it's just one that is an inside joke in a friend server
We have a whole thing about doing a dice roll against a specific person who has the role 'hand of the high roller' and if you lose you get kicked
If you win nothing happens
So I made a blind that rolls against you
If you roll higher, you gain you normal score
If the blind wins the roll the scored hand value gets subtracted from your total chips
SMODS.calculate_context does that
But not if I pass a return table
hello chat
Currently making some jokers that interact with current game chips and the sort, and because i use talisman i've only just learned that to_number() isnt a vanilla thing and will crash the game if talisman isnt installed, but it also has to be included if it is installed or it crashes, is there a way to make these work together? I dont really want to make my mod either incompatible with or dependent on talisman
how would i go about creating a suit based joker like Ancient Joker? i see that ancient joker has a G.GAME.current_round.ancient_card.suit but im not sure exactly where i would want to be setting this for my own card.
to_big = to_big or function(x) return x end
bump
check out the Castle example in the example mods
I don't understand what you're asking
wait where can i find this? is it on the smods wiki or in here?
bump, trying to create a joker that randomly copies another joker every round
Are you sure, looking at the function it looks like it just calculates each area regardless of if you pass a 2nd argument
aaah thats smart thank you
ok so during scoring, the card that it's copying (the joker on the right) triggers first, instead of it going left to rightr
well, I've put a message and I didn't get any message
If you go to the smods repos you should be able to find the example mods
Oh
okay thanks
Wait can you show where you used calculate_context and where you put the message?
Oh I see, this is what smods does if you don't pass a return table
does anyone happen to know where the deck object in the corner of the game is stored
and the effects are put into the return_table if you pass one
instead of being calculated like that
Tho, correct me if I'm wrong, but instead of passing a return table couldn't you store the return value of calculate_context and check if that has repetitions
so, i'm wanting to make a new card modifier, looked around the docs a bit but there seems to be nothing for easily adding a new card mod
hiiiiii question! G.GAME.last_spectral is always nil, do you know why?
hey gang does steamodded have a way to tell if a certain joker is +mult or +chips
I want to have a joker that makes either +chips or +mult more likely to appear
bump again
@next timber ...did you figure out how to make red seals work on jokers 
not really
would I just have to manually make a list then
pretty much, but your mod won't be very compatible with other mods
I don't know, can I?
looking at SMODS It looks like you should, but I haven't tested
aha no nevermind, it works now!! :D
That seems like a lot of event managers
Lmao
A random joker in your joker hand?
yup
If you’d like you can check how I do it with my Zombie Joker. It’s a little different since it’s a global target and not on a per-card basis, but it could pretty easily be adapted to do that I think
yes please
id love that
Wasnt a red seal but no anyways
where can i find your joker
bump
@normal crest It only seems to return {calculate = true}
ty
wow, that's so unhelpful
I swear it looked like it was doing more
couldn't you mass produce the soul/blackhole if you use shard and have perkeo?
for some reason i'm really struggling to hook into smods functions
im doing this as a test but can still play flushes and such
bump
you mean edition?
i'm guessing they mean enhancement
nope
replacing small and big blinds with boss blinds
new effect thing different from editions or enhancements
ah icic
want to add card conditions, so like a scratch or card errors (like misprint, but expanded upon and available for any joker)
or car for that matter
the only thing that comes to mind right now is the little thingy that the "seed" code card in cryptid gives your jokers
if you're doing that then i would recommend checking aikos mod source code
they added scrabble words/letters that are different to editions and enhancements (but can't be applied to joker cards)
i would also recommend this for drawing things on it, you could store the modifier in the card.ability and check for it in the drawstep
https://github.com/Steamodded/smods/wiki/SMODS.DrawStep
oh yep
am i being stupid here somehow?
i can't figure out why this wouldn't work
clips from bunco(?) are that exactly, I’d look into that
are they considered seals?
didn’t know that
and idk why I thought they were from bunco lol, I use a lot of vanilla-esque mods so
I think so
yeah they’re from paperback. odd
I'm sure this gets asked a lot, but are there any good resources for getting into developing mods?
Ty
and also just trying to learn Lua in general I’d think
this is the thread I intended on linking to oops
- the example mods
It's THE place to ask that question, to be honest
Must've missed that thread when I skimmed through them, thanks all of you
The forum tool on discord is terrible, so missing anything is not the user's fault 😋
i'm back :D how do i only add a consumable to the pool if you're using a certain deck?
Use the in_pool func to check for the deck type
thanks :D
ah wait, how do i check for the current deck?
actually no wait lemme try that first
i might know
they're stickers
ah ok
the only reason they're stickers is so that they can be applied on top of everything else
Me when I spread misinformation: 
im trying to hook Game:init_game_object and generate a pseudorandom value within the function. unfortunately i keep accessing G.GAME while its nil. how do i get around this?
otherwise they'd have to replace something
okay i can't find it — how do i get the current deck?
here's what i have
local init_game_object_hook = Game.init_game_object
function Game:init_game_object()
local ret = init_game_object_hook(self)
-- initialize with a random suit
local suits = {'Spades', 'Clubs', 'Diamonds', 'Hearts'}
local suit = pseudorandom_element(suits, pseudoseed('bc'))
ret.current_round.bluecrystal_card = { suit = suit }
return ret
end
I don't know the exact syntax, but you wanna check for the current back
Not if they were something new
Yeaaah but then I'd have to patch/hook all the calculations in
Even the ui generation
All of that is already done with stickers so I didn't see the benefit of reinventing the wheel
Stickers are the easiest way to set things like that up, honestly. Them being stackable really helps
automatic sticker placement when
can someone tell me if this is right?
Actually I discovered earlier SMODS has a function to decide if a card is shatterable or not
how do i make this?
what does balatro use for its shaders for the card editions? like foil and holo
SMODS.shatters
what do you mean
Hmm............
thanks
strangely, trying to set stands appearing in the shop is resulting in only Jimbo appearing
the base rate field is not working as intended
This must be the work of an enemy Stand!
like the shaders are a .fs file with code in it but what language is the code in?
… Sorry
It's a modification of GLSL
You can check the SMODS wiki for references
Damn......
thanks!
is there a way to chance the chance?
wha
change the chance*
SMODS.shatters just returns if the card should visually shatter like glass when destroyed
oooh
not if it should be destroyed in the first place
is there a SMODS for being destroyed?
a what
idk what you mean
like
to say the card can be destroyed
like, it haves a chance of being destroyed
There is a calculation context where effects can determine if a card should be destroyed with the timing of Glass cards
how do i make that? ive been trying since like 7pm and now is 9pm
i looked at the vanilla balatro code and at mods codes and i still dont understand
bumping this because i'm completely out of ideas
are you making a joker that has a chance to destroy cards?
no no, a enhancement that have a chance to be destroyyed like glass cards
context.destroy_card
tyy!
its basically a glass card that gives Xchips instead of Xmult
calculate = function(self, card, context)
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom('glass') < G.GAME.probabilities.normal/card.ability.extra then
return { remove = true }
end
end,
this is how glass cards are destroyed when played ingame (this is how SMODS takes ownership of them anyway)
this is unrelated but it's Brazilian Miku Joker
BRAZIL MENTIONED🔥🔥🇧🇷🇧🇷🔥🔥
change card.ability.extra
a number to go in the denominator (for the above card it's card.ability.extra)
-# well you can multiply the numerator too, but they're essentially equivalent
so i need to do something like ```
card.ability.extra = 1/3```
if i wanted to be a chance of 1 in 3 or something different?
yo that's sick
she's so pretty
just 3
no, just replace "card.ability.extra" with the number, if it was 1 in 15 you'd put 15
it gets divided after
oh okok, ty so much, ive been stuck in this for hours
Ideally you define the value in your config, but for now do it like that
if i wanted in the description to do like that red box id use {X:mult,C:white}, if i wanted to do it but about Xchips would it just be {X:chips,C:white} ?
Thanks
steamodded itself doesn't have a priority does it?
like i can't be loading my mod before it
So this is the consumable type I made for my Stands, but for some reason every time I pass "Stand" into create_card(), it returns Jimbo as if the pool is empty?
for i, v in ipairs(items_to_load['Stand']) do stand_map[v] = true end
SMODS.ConsumableType {
key = 'Stand',
primary_colour = G.C.STAND,
secondary_colour = G.C.STAND,
collection_rows = { 8, 8 },
shop_rate = 100,
default = "c_stand_star",
prefix_config = false,
rarities = {
{key = 'StandNormal'},
{key = 'StandEvolved'},
},
cards = stand_map,
can_stack = false,
can_divide = false,
inject_card = function(self, center)
local pool_key = center.config.evolved and 'EvolvedPool' or 'StandPool'
SMODS.insert_pool(G.P_CENTER_POOLS[pool_key], center)
end
}```
did you try to append your mod's key
prefix_config is set to false so I shouldn't need to?
what is the thing i use for green text? like in the "1 in 4" in the glass card description
{C:green}
oh, tyty!
shouldn't you pass 'StandPool' instead
for future reference, if there's a colour you want to get, go into the balatro localization (accessible via 7Zip), Ctrl+F to a card that has that colour, and copy what it says
cus you're overriding inject_card
'StandPool' is what I use specifically for unevolved Stands
yeah you're not actually injecting the card into the Stand pool
cus you override it
Oh I see
add SMODS.ObjectType.inject_card(self, center) at the start of inject_card
Thanks!!
Hmm still not working, seemingly
But it does seem to correctly add cards to StandPool
hey sorry to bother you but did you ever find out how to save tables so that they don't get replaced?
I'm having the same issue because I'm trying to save the data of a joker (which is a table) into an ability.extra variable
Try removing the cards field
I believe every consumable with the set = 'Stand' will automatically be added
how can you get the key of the current blind from G.GAME.blind?
Tried that too, and they're still correctly added to the other pools
The issue here is you're trying to save an entire joker object
Is there any variable that I could use to identify that specific joker that isn't the position?
you could add a variable to that specific joker's ability table that you look for in your code
but you have to carefully manage that to ensure that there aren't multiple copies of it at once
Looks like the pool is correctly populated so it's some other bizarre issue
Gonna have to debug create_card itself
try
SMODS.add_card { set = 'Stand' }
that still calls create_card tho
but just in case
I can definitely try it, but I'm using the built-in support for setting an appearance rate for a consumable type, so I can do that for one of my consumables that creates a Stand, but I don't think I should need to patch the create_card_for_shop() function
So trying SMODS.add_card{ set = 'Stand' } didn't just create Jimbo, it apparently also created a ghost card
Hmm