#💻・modding-dev
1 messages · Page 280 of 1
Can you send your current version of your consumabletype
And if you have debugplus try to do eval G.P_CENTER_BLINDS.Stand
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'},
},
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
}```
I do have debugplus
(But again lemme shower first)
wait you didn't add the default inject_card function
this
you're still overriding the function completely so your cards aren't being added to the 'Stand' pool
No they definitely are
I removed it because they were added twice by putting it manually
Hence the log of the contents of G.P_CENTER_POOLS.Stand
are you sure that wasn't the case when you had both that and the cards field
Fairly certain yes
Hmm, I really don't know then
Time to get my hands dirty
four blinds per ante is now a thing (challenger deep rule/modifier)
if I wanna add a new custom item type, not like a new type of card or joker or seal etc, but a whole new smaller mechanic, where would be the best place to start do you all think?
I've made some jokers and decks and stuff in the past messing around, and I know some basic lua, but was looking for some sort of API that would allow for easier custom elements and couldn't find anything
im really confused by the implementation i wont lie
What exactly is confusing you?
loc_vars = function(self, info_queue, card)
if G.GAME.current_round.zombie_target.card ~= nil then
local copied_key = G.GAME.current_round.zombie_target.card.config.center.key
info_queue[#info_queue + 1] = G.P_CENTERS[copied_key]
return {
vars = { G.localization.descriptions.Joker[copied_key].name }
}
else
return {
vars = { 'Inactive' }
}
end
end,
calculate = function(self, card, context)
if G.GAME.current_round.zombie_target.card and not context.no_blueprint then
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
context.blueprint_card = context.blueprint_card or card
local zombie_target_ret = G.GAME.current_round.zombie_target.card:calculate_joker(context)
context.blueprint = nil
local eff_card = context.blueprint_card or self
context.blueprint_card = nil
if zombie_target_ret then
zombie_target_ret.card = eff_card
zombie_target_ret.colour = G.C.GREEN
return zombie_target_ret
end
end
where is the next target being set? and how are you setting "G.GAME.current_round.zombie_target.card.config.center.key" and what does "ret" and "eff" mean and what does blueprint have to do with selecting a card ability
sorry some of these questions might be basic
What's the weight and rate of Rare jokers? I wanna make a rarity that's slightly higher but can appear in shops
Ah, take a look in the round resetting variables instead of the joker itself
In main.lua
thanks lol, this is going to take a while to sift through
I have it broken up into regions for a reason
If you’re looking at the code thru VSC instead of GitHub, just collapse the regions to make it more maneuverable
i meant more so because i dont know modding very well, your file is very well organized
found the zombie related stuff very quickly
what if the zombie infeccts an eternal card btw
Seemingly my issue has to do with the rarities. The rarity pool is returning a pool length of 0 even if the main Stand pool has items in it
how can you make a deck unlock when beating a modded stake?
I guess that's the question: am I able to use rarities on cards that aren't Jokers?
Hello balatro modding community
Is it difficult to change the music in balatro, like does the new theoretical track need to meet any specific requirements or anything
it has to be the exact same length as the other tracks
also it has to be sped up by some amount that i kinda forgor
Does it have to be the same length as all the other tracks in the regular balatro ost or does it just have to match the new set of tracks
It copies the effect but does not turn it
The effect was made with that in mind so Zombie is a lot stronger on higher-stake runs
i've asked this a few times before but nobody's had an answer, how can I disable the shadow on a floating sprite? it kind of ruins the whole effect here, but I still want the joker part to float around a bit
i have no idea but i will say it looks great
i don't know if this will work but try making the soul be partially transparent
I don't believe alpha changes shadow rendering
I have an enhancement with transparency and it still has a shadow
the hologram is partially transparent and doesn't have a shadow so i assumed
still looking for help with this 
i'm pretty stumped and my thoughts are that if i take ownership of red seal, then have calcuate_seal() call the seal's calculate() when it's a joker... how do i set up events such that the progression during joker calculation is, on a joker with a red seal:
normal joker calculate(),
'again!' message,
normal joker calculate() again,
next...
because from the video i show and with what i show here, it's clear that getting that to happen does not seem... possible? 
wait, i might be looking at this wrong - what if i instead had calculate_seal() do nothing if it's a red seal on a joker and instead patched hooked calculate()calculate_joker() to check if the joker has a red seal and then just runs it a second time
hologram is, unfortunately, hard-coded into the draw function, so is glass enhancement and glass joker's missing shadows
I’d show you my context chain for joker retriggering if I had access to it rn but I don’t 😭
what does get_deck_win_stake() spit out for modded stakes?
Bump
well for now, if i wanted to hook Card:calculate_joker(context), i'd do something like
local oldJkrCalculate = Card:calculate_joker
function Card:calculate_joker(context)
[my code here that includes calling oldJkrCalculate(context)]
end
right? 
This is how I did hooks, if you change variables you need to return those variables
I feel like that would end up with some wonkiness idk
oh, right - i guess for my purpose, i need to return whatever calculate_joker() returns, too
what is the variable in the balatro code that says how many money you have?
Does anyone with experience here have an answer to this? The docs and the code seem to imply they can work for consumable types (or any object type) but my attempt to use custom rarities keeps resulting in bad rolls to the pool
G.GAME.dollars
is there a way i can use this information to say how much a playing card scores?
i feel a massive disconnect between these two things and that i do not understand what you're after here 
how much a playing card scores... as in the money it generates?
like if during scoring, a played card makes any money?
no i mean like, if you have 20$ you score 20 chips
extra on top of the card's normal chips or instead of the chips it'd normally score
extra on top
like an enhancement that does that
strictly as an enhancement? are you adding this enhancement via SMODS.Enhancement?
yes yes
im looking at the extra credit mod to learn and i see pos and im assuming that means position but positon of what?
Position of where the joker is on the atlas.
in your enhancement then, you'll probably want to try something like
calculate = function(self, card, context)
if
context.main_scoring
and context.card_area == G.play
then
return {
bonus = G.GAME.dollars
}
end
end
in your enhancement table
although i'm not familiar with how enhancements work, but a quick skim of the wiki page on SMODS.Enhancement gives me the feeling that this should be like this
what is the atlas cause i also dont know what that means
It's where you store your cards textures
just add this or something else and this?
read the github, watch the videos
ok
basically a texture variable, you add your image file name and the resolution size
here you go
try adding that to get your desired effect. again, from what i read, that should work
tyty!!
Guys what's a good solution to legendary bloat
Like I'm making a mod that adds like a lot of legendaries
And idk it seems like it wouldn't be fun for the only way to get those would be though the soul
more opportunities to get a soul card might be interesting...? like a rare joker that if you sell it, has something like a 1 in 4 chance to create a soul card
idk
so i read the SMODS.atlas but im still a bit confused so is the x and y the location of where a image is in a file?
could just patch the soul (or take ownership) to make it more common
more opportunities is also interesting
how does one make a main file that calls other files
no no, thats in the SMODS.thing, in the SMODS.Atlas its the size
x is lenght, y is width
it's based on the dimensions you specify in px and py - so for example for most items like jokers and playing cards, it's normally px = 71, py = 95
from there, you can basically imagine a grid on your asset with spaces of that size, with pos = { x = 0, y = 0 } starting at the top left
i've seen more dynamic solutions that iterate through and bulk-load all lua files in the mod directory, but if you're just splitting a few off for organization then this is the easiest way to do it I think
its the pixels soo x=1 y=1 would be the top left corner
so would that put the png into the top left?
then from there it gets the image using the card size which i dont remember right now
theres also a video
on there if you wanna watch it, its dated a bit tho
but it explains the atlas
yes pls send
0,0 is the top left joker
any info is gold cause im stupid
I make that mistake too sometimes
lua normally counts from 1
but then the atlas coordinates count from 0
thx
so what do you set the x and y to?
Not a more relatable sentence exists
are you on replit?
are you making the atlas or the joker?
my current code
ah
SMODS.Atlas{
key = 'jokers',
path = 'Jokers.png',
px = 71,
py = 95,
-- 2x is 144 by 190
}
the standard atlas
yes
-# 144?
dawg idk i was using it as a ref for the 2x sprite
now i have a py script
the bit i was making was that 71 * 2 is 142 
im dumb
x = 0 y = 0 would be the top left joker in the atlas
x = 1 y = 0 would be the one to the right of that
x = 0 y = 1 would be the one below the top left joker, etc
but what joker
what context
are we talking in the collection screen
or in the 1x file
i feel so stupid rn
in the atlas texture
in you textures file
so x0 y0 is the first one
an atlas usually consists of multiple jokers in one image
ahhh
setting your joker's x and y pos to 0 would make that joker use the top left sprite from the atlas
perkeo dna...
isnt it peak
what does it do
so am i correct in saying that the atlas is the image with all the images of the joker sprites
yuh
well
its whatever sprites you want
an atlas can have any cards, but basically yeah
if you want to (DON'T DO THIS) you can put literally everything in one atlas
💀
for reference this is vanilla's joker atlas
discord messed it up a bit. I don't know why
it sent a bit of the left of the image to the right side
hey its where i steal art from
could you theoreticly say have differant files inthe 1x and 2x and then do sperate smods.atlas for each
hmm
no
you must have the same files in both
you can't, i'm not sure why you'd want to do that since those are purely used for having pixel art smoothing on/off
sorry thats not what i meant
well, you can have them both be different art but they'd both have the same smods atlas object
i want to hook into Game:init_game_object and generate a random suit for a joker im working on at game initialization. I did so using the example on the steamodded wiki and unfortunately the functions pseudorandom and pseudorandom_element gave me a nil access to G.GAME, crashing the game.
I then decided to instead send an Event within the hook to ensure my data is setup in G.GAME after the initialization of G.GAME object. Doing this removed the nil access but now my screen is black on launch until I click. What is the proper way to do this? Here is my code for the hook:
function BC.random_valid_bluecrystal_suit()
if not G.playing_cards then
return BC.bluecrystal_card.default_suit
end
local valid_bc_cards = {}
for _, v in ipairs(G.playing_cards) do
if not SMODS.has_no_suit(v) then
valid_bc_cards[#valid_bc_cards + 1] = v
end
end
if valid_bc_cards[1] then
local bc_card = pseudorandom_element(valid_bc_cards, pseudoseed('bc' .. G.GAME.round_resets.ante))
return bc_card.base.suit
else
return BC.bluecrystal_card.default_suit
end
end
local init_game_object_hook = Game.init_game_object
function Game:init_game_object()
local ret = init_game_object_hook(self)
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 1.0,
func = (function()
G.GAME.current_round.bluecrystal_card = { suit = BC.bluecrystal_card.default_suit }
local suits = {'Spades', 'Clubs', 'Diamonds', 'Hearts'}
local suit = BC.random_valid_bluecrystal_suit()
G.GAME.current_round.bluecrystal_card = { suit = suit }
end
)}))
return ret
end
yeah i know
you can have 1x and 2x be different, it just means your jokers will look different depending on whether or not you have pixel art smoothing on
so they all textures have to be in Jokers.png
it can be whateveryou want
but could you say on top of jokers.png have say tarrot.png
no, you can name the atlas texture anything you want as long as you make an smods atlas object that properly links to it
yeah
ok got it
assuming you write an atlas
ight
thank you all for the help and explaining this to me
is the code to the original 150 jokers accesible?
what is the thing you use to make the text be the collor of the money
like that little orange $3 in the gold card
--Scoring
print(card.ability.extra.chips)
if context.joker_main and card.ability.extra.chips > 0 then
return {
chip_mod = card.ability.extra.chips,
message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
colour = G.C.CHIPS,
card = card,
}
end
end```
now why the hell is the fourth line here giving a "attempt to compare number with table" error
No, its {C:money}
oh tyty!
does anyone know what's happening here?
probably unsual question, is it possible to make the text in a card description in italics?
Does it need to be at the start of the game?
it needs to be when a game begins, the joker will function similarly to castle
Anybody know the list of contexts available in Blind:calculate? I don't think it is on the Wiki
i got this paradigm from the example castle implementation on the steamodded github
what am i doing wrong 
What are you trying to do?
I do not know 😭
I’m gonna be working on my own implementation of this soon tho and I will tell you if I have any breakthroughs
me when i try to understand zombie
its been howmany every hours and im no closer to implementing my joker
card.lua
or cards.lua, i forgot
i just want red seals on jokers to retrigger the joker the way you'd expect, but funny thing is if you just natively slap a red seal on a joker via set_seal(), it basically acts like it's seltzer
and i've been bashing my head against this for the past two days now
This worked for me:
I forgot to check if the seal is red though.
oldcalcseal = Card.calculate_seal
function Card:calculate_seal(context)
if context.retrigger_joker_check and not context.retrigger_joker and self == context.other_card and self.seal == "Red" then
return {
repetitions = 1,
card = self
}
end
if self.ability.set == 'Joker' then return nil end
return oldcalcseal(self, context)
end
if i dont want to run it at game start, what else should i be hooking into?
What does your joker do?
i was gonna be so mad if this worked 
error occurred when selecting card
Try checking if self.ability exists first
if self.ability and self.ability.set == ‘Joker’
thought of that, same result
how would i make something like a lucky card?
...maybe i should make the old func a global instead...? 
Nah
im trying to make a joker that gives x1 mult if the scored hand is a flush five so would i use context.joker.main
yep 
@daring fern pls help 
card_
Do you have retrigger joker enabled?
but
yep
You're not inputing self in the old function.
......you're right 
kid named Plant
...it doesn't work with editions? 
where is that card skin from
I think that is because joker editions happen after the joker triggers and the seal is technically part of the joker.
from the mod i'm working on 
I came up with these guys (art not mine)
sorry, had to step away. my joker has an effect that varies depending on the suit just like castle does, as i said in my previous message. the suit needs to be instantiated the start of a game and changed at the end of every round.
This is what castle uses ```lua
function reset_castle_card()
G.GAME.current_round.castle_card.suit = 'Spades'
local valid_castle_cards = {}
for k, v in ipairs(G.playing_cards) do
if v.ability.effect ~= 'Stone Card' then
valid_castle_cards[#valid_castle_cards+1] = v
end
end
if valid_castle_cards[1] then
local castle_card = pseudorandom_element(valid_castle_cards, pseudoseed('cas'..G.GAME.round_resets.ante))
G.GAME.current_round.castle_card.suit = castle_card.base.suit
end
end
I'm pretty sure you could just use context.end_of_round to reset it, and choose a random one when the joker is added to deck.
i don't think you're understanding my issue
how would i make something like a lucky carrd?
there are two moments this needs to happen - game start and round end. it needs to happen at game start so the joker starts the game with a suit
Why does it need to happen when the game starts?
when i set this up in the Game:init_game_object hook i've created, i must create an event because G.GAME isn't yet setup (obviously) and thus calls to pseudorandom fail due to nil access
what do you mean? it needs to start with a suit right
Why would it need to have a suit before it gets added to current jokers?
hover over castle in collection
it has a suit even if you don't have one in your lineup
why wouldn't it happen at game start?
what is the context used when making the lucky card?
trying to make a joker with this effect
stuck on calculate...
Show the calculate?
the thing is...
i actually have no clue what to put in the calculate section...
how should i prevent this weird hiccup 
actually wait, this probably should work on fortune teller, but the problem there is that it's based on a run variable that gets incremented - so it should go up by 2 each time? but can't double the value because what if you use a bunch of tarots and then get a red seal on fortune teller - and also how do you parse the upgrade in this way
@oblique ember Tutorial for reference:
You would have to create a mod to be loaded by Steamodded:
- Make a new folder in Mods called NoCardLimits
- Inside that folder, create
NoCardLimits.jsoncontaining:
{
"id": "NoCardLimits",
"name": "NoCardLimits",
"author": ["MAGO"],
"description": "Removes joker and consumeable card limits.",
"prefix": "nocardlimits",
"main_file": "nocardlimits.lua",
"version": "1.0.0"
}
- Create
nocardlimits.luacontaining:
local game_start_run_ref = Game.start_run
function Game:start_run(args)
local ret = game_start_run_ref(self, args)
G.consumeables.config.card_limit = 1e100
G.jokers.config.card_limit = 1e100
return ret
end
where is the
chosen boss blind's key stored?
EDIT: it was G.GAME.round_resets.blind_choices.Boss
if i want to check whether this is a showdown boss blind or not, im guessing i will need to grab the key and go through the entire blind's pool to see whether its a showdown blind or not
EDIT: the pool is G.P_BLINDS
bump (i am stupid)
do NOT go into that 0.000001 inch crack in the ground.
@daring fern also on this topic, how can i do the joker trigger, again message, then the second trigger?
i'm wondering if i can just wrap the message into an event manager, but what's the condition i'd be looking for to trigger it...? 
Does this happen for other jokers?
which, the message order or it repeating
The message order.
SMODS.Joker
{
key = 'tensoon',
loc_txt =
{
name = 'TenSoon',
text =
{
'Copies ability of a random',
'{C:attention}Joker{} each {C:attention}round{}',
'{C:inactive}(Currently copying {X:attention,C:white}#1#{C:inactive}){}',
}
},
atlas = 'scadrial',
pos = {x = 0, y = 0},
rarity = 'csmr_preserver',
cost = 4,
blueprint_compat = true,
config =
{
extra =
{
selectedJoker = nil,
}
},
loc_vars = function(self,info_queue,card)
if card.ability.extra.selectedJoker then
return {vars = {localize({ type = "name_text", set = "Joker", key = card.ability.extra.selectedJoker.config.center.key })}}
else
return {vars = {'None'}}
end
end,
calculate = function(self,card,context)
if context.setting_blind then
local jokerList = {}
for i,v in ipairs(G.jokers.cards) do
if v.ability.name ~= 'TenSoon' and v.config.center.blueprint_compat then
jokerList[#jokerList + 1] = v
end
end
if #jokerList > 0 then
card.ability.extra.selectedJoker = pseudorandom_element(jokerList,pseudoseed('tensoon'))
end
end
local other_joker = card.ability.extra.selectedJoker
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
}
can someone help me figure out why this joker crashes the game everytime i select a card. I get a stack overflow error.
the joker randomly copies the ability of a joker that is held in hand
yeah, it's because i put message = localize('k_again_ex') in the return table with the values that tell it to do repetition, so it does it first. that's why i'm thinking of putting it in an event manager
Hey can someone explain what juice_up(0.3, 0.3) specifically does and what the variables affect? I can't seem to get it right for some reason...
how are you using it
In a functiuon for an event where a card upgrades
yes but show me the function lol
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:set_ability("j_LSingle_singular")
card:juice_up(0.3, 0.3)
return true
end,
oh this is the case where a card changes
same diff
can you show the whole calculate function
would this work as a lucky card?
if context.before and context.scoring_name == "High Card" and not context.blueprint then
-- Increment count
card.ability.extra.high_card_count = card.ability.extra.high_card_count + 1
-- Check if it should transform
if card.ability.extra.high_card_count >= card.ability.extra.high_card_limit then
play_sound('LSingle_StellarTransform', 0.7, 1.3)
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:set_ability("j_LSingle_singular")
card:juice_up(0.3, 0.3)
return true
end,
}))
end
-- Normal progress message
if card.ability.extra.high_card_count < card.ability.extra.high_card_limit then
return {
message = "Collapsing...",
sound = 'LSingle_StellarUpgrade',
colour = G.C.ATTENTION,
card = card
}
end
end
end```
no because you are doing if and elseif, if the first statement triggers, it will never give the money
afaik lucky cards can do both
just do if and if
youre also returning the function within the ifs
so if either trigger then the function just ends
because you returned it prematurely
bump...........
I just assumed this was to make a card do the little wiggle and pulse when you use /upgrade/destroy it, but I'm not sure.
also what does that mean?
so say for example, the first if triggers, it gives the permachips
then just ends the function
because "return" ends it
return terminates an if function
ooh, so how should i do it?
any function
so anything nested with it in said 'if' function wont happen
brain not working rn but hopefully someone else can help you
do i use something else isntead of a "return"?
what the fuck
or just use the "return" a different way
i got the boss switching working SO QUICKLY i refuse to believe its actually working
you can just return at the end
you are so fr
`np
imagine getting your mods right on your first try
couldnt be me
How would purple seal work on a joker?
wait but then how will i recognize wich "return" is for each odd?
sell joker for a tarot card
check context.cards_destroyed
as shrimple as that
when selling the joker you get a tarot card maybe?
dayum nice
Question, is there a way to mod the text to change the suits?
Like say I'm making a themed deck and wanna change hearts to say... another item, like Rubies or something, how hard is that?
what it does:
- switch between a selected mega boss and vanilla boss blind
- reroll works ONLY for vanilla boss blind
combine the returns into one, and if a certain if shouldnt be triggered just do =o for it
i thought i would need to do much more complicated stuff tha that
but NOPE
IT WORKS
HAHAHAHAHA
im not sure i follow
WE ARE SO FUCKING BACK
LESGOOO!!!
bump pls h e l p
what should =o mean?
i still dk im really new to modding, today i my third day only 😭
but how would i know when it should be triggered and when it shouldnt to make the value be 0?
can you send this as text
so i can just copy it
try halting calculate if context.cardarea == G.hand
how do i do this :3
how do i debuff a card before scoring begins? is it just something like this?
if context.before and context.cardarea == G.play then
-- card selection doesn't matter for sake of example
local card = context.scoring_hand[1]
G.GAME.blind:debuff_card(card)
end
it's a funky fix if it works, but right after calculate() (as in, at the start of the function) try something like
if context.cardarea == G.hand then
return nil, true
end
```?
calculate = function(self, card, context)
if context.cardarea == G.play and context.main_scoring == card and pseudorandom('lucky') < G.GAME.probabilities.normal/5 then
return { perma_chips = 50 }
if context.cardarea == G.play and context.main_scoring == card and pseudorandom('lucky') < G.GAME.probabilities.normal/15 then
return { p_dollars = 40}
end
end
end})```
okay let me try
struggling to figure out the condition for which the event function should trip 
Okay, another Question. What is the context for beating a blind in a single hand?
i don't think there's a specific context for that, but rather a check that looks at the number of hands compared to the current max...? unsure
Or how would I best go about it if there isn't a specific context
local chip = 0
local dol = 0
if context.cardarea == G.play and context.main_scoring == card and pseudorandom('lucky') < G.GAME.probabilities.normal/5 then
chip = 50
end
if context.cardarea == G.play and context.main_scoring == card and pseudorandom('lucky') < G.GAME.probabilities.normal/15 then
dol = 40
end
return {permachips = chip, dollars = dol}, true
try this
what function is run when you win a blind?
Are there other jokers that say again before doing things?
hey guys, i have a joker idea but i am hard stuck on an implementation, would anyone be up to take a look at it?
like as normal vanilla behaviour or as a result of the behaviour i introduce
nvm, probably end_round()
still stack overflow error
when you select a card?
yup
i can try
oooh, didnt know i could just say what it does there and then say that is what, tyty!
:3
idk if this will work
im also new to modding
lol
im not sure how to test other than just seeing if the game will crash so lets just hope it does i gues lol
oof
You probably have a problematic loop in there if you're stack overflowing, right?
basically, im trying to make a card that says "X3 Mult if scored hand contains a 2 and 7 of different suits" (reference to the worst hand in poker) but i don't know what i am doing, like, at all. here's my code so far but i am aware that it is just a start.
SMODS.Joker {
key = 'sevendeuce',
loc_txt = {
name = 'Seven-Deuce',
text = {
'{X:mult,C:white}X#1#{} Mult if played hand',
'has a scoring 2 and 7',
'of different suits'
}
},
atlas = 'Jokers',
config = { extra = { x_mult = 3 } },
rarity = 2,
cost = 6,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
pos = {x = 0, y = 0},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.x_mult } }
end
calculate = function(self, card, context)
local suits = {
['2Hearts'] = 0,
['2Diamonds'] = 0,
['2Spades'] = 0,
['2Clubs'] = 0
['7Hearts'] = 0,
['7Diamonds'] = 0,
['7Spades'] = 0,
['7Clubs'] = 0
}
if context.other_card:get_id() == 2
if context.other_card:is_suit('Hearts') then suits['2Hearts'] = suits['2Hearts'] + 1 end
elseif context.other_card:is_suit('Spades') then suits['2Spades'] = suits['2Spades'] + 1 end
elseif context.other_card:is_suit('Spades') then suits['2Diamonds'] = suits['2Diamonds'] + 1 end
elseif context.other_card:is_suit('Spades') then suits['2Clubs'] = suits['2Clubs'] + 1 end
if context.other_card:get_id() == 7
if context.other_card:is_suit('Hearts') then suits['7Hearts'] = suits['7Hearts'] + 1 end
elseif context.other_card:is_suit('Spades') then suits['7Spades'] = suits['7Spades'] + 1 end
elseif context.other_card:is_suit('Diamonds') then suits['7Diamonds'] = suits['7Diamonds'] + 1 end
elseif context.other_card:is_suit('Clubs') then suits['7Clubs'] = suits['7Clubs'] + 1 end
if context.scoring_hand do
}
is that how that works
i get a stack overflow everytime my ram is filled to the brim
how do i fix this pain
is this right?
thats very vague, but yes
that should allow you to do card.ability.extra.Xmult
"A stack overflow is a type of buffer overflow error that occurs when a computer program tries to use more memory space in the call stack than has been allocated to that stack."
ah, this is a simple one
and is flush five "Flush_Five"
run the loop in context.before
I think your code is going bananas
no clue then
but i would confirm whether or not its your joker doing that as your calculate function should not progress past what i said if it's crashing when selecting a card 
i think you are on the right track there, albeit looking a bit messy
im trying, lol
Oh bepis you're here
mhm, hi
maybe you can help me
oh true
How would I check for this condition?
let me try
@daring fern
check for how many hands were used, i think
check the same conditions as cards that see the first hand of a round like DNA
then in context.end_of_round, do that
that works too
With the red seal on the joker.
all
what does this mean in practice?
alright, so, i think the correct approach here would be:
- handle everything in context.before
for i,v in ipairs(context.full_hand) do - contain all the suits of 2 and 7 in two tables respectively
- check from there, you shouldnt use :is_suit() since that doesnt account for modded suits
yes, that sounds right
I'm learning
good job :D
so its definitely my joker, i tested out different combinations, and its only when my joker has actually selected another joker to copy
thats why i get stack overflow
for some reason
even with your code
it actually goes further
And where would I find context for beating the blind?
context.end_of_round
a round ending means that you beat the blind
and that will trigger before joker.main right?
Or during, sorry
uhhhh, no, its a separate context from that
local other_joker = card.ability.extra.selectedJoker
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
so this part is causing stack overflow even though my ram is fine :3
if context.end_of_round and G.GAME.current_round.hands_played <= 1 then
--do your stuff here
end
Actually wait no, you were right, Joker should upgrade after the blind has been beaten...
context end of round and hands played being zero would be funny
lol
what does context.blueprint do here
perhaps there's a joker concept in here somewhere
"Look Mum, No Hands!"
im getting a error where it is attepting to field 'joker' [ a nil value]
what have i messed up
...what
I'm still baffled why I can't seem to get custom rarities to work
WHAT
whats the error
whats the problemo
The rarities aren't seeming to apply to my object type, so every time it tries to poll for rarities in the pool, the pool size is 0, and it returns a Jimbo Joker
if G.GAME.current_round.hands_played > 1 and context.end_of_round then --- RESET IF 'UPGRADE' NOT FULFILLED - MORE THAN ONE HAND PER BLIND IS USED
card.ability.extra.Xmult = 1
end
Is this how I'd reset the Xmult to 1? or is this jank?
oof
looks like this apple has gone bad
i dont do rarities poll stuff since my mod doesnt use it, sorry :(
cant help with that one
🍎
🍎
doing the enhancements is being easy, now the "fusing" part is what im actually scared
First test of my Fighter Jet Mod... Fingers croseed

you totally got it!
okay so. i am still struggling a little if youd be willing to help a little more-- i need to compare the suits to account for all edge cases (mostly splash) where there may be duplicates of a card. e.g. having a 2 of hearts, 7 of hearts, and a 7 of spades trigger this card should work but my current idea would not work
you got the suit tables for 2 and 7 already, right?
i believe so
the way i am doing it right now checks if the number is > 0 and then goes from there but it breaks when doing weird scoring stuff
you need to check if all the suits in the first table are found in the second table
.
actually
wait wait, i just realized the flaw of my approach
lemme write one rq
mkay
FINALLY got the rarities working
I really did just have to override everything that was going on here huh
well
What uhh... What even is this
Happened when I tried to look at the card in the collection
where on earth is repetitions even stored when it's returned from calculate_seal()
Toying around with creating a fallout shelter themed texture pack. (the 3 of hearts is my main testing of how to re-format the layout of the cards, this is still very early.)
Also replaced the red deck icon, with the shelter cards too.
For some reason this shader effects the UI buttons????
im calling SMODS.debuff_card on a card in context.before and the card is being debuffed, but its still being scored. whats happening here? how can i prevent the card from being scored?
is there any documentation for extending SMODS.Center?
if context.before then
local two_allSuits = {}
local seven_allSuits = {}
for _,v in ipairs(context.full_hand) do
if v:get_id() == 2 then
local isUniqueSuit = true
for _,existingSuit in pairs(two_allSuits) do
if existingSuit == v.base.suit then isUniqueSuit = false break end
end
if isUniqueSuit then two_allSuits[#two_allSuits+1] = v.base.suit end
elseif v:get_id() == 7 then
local isUniqueSuit = true
for _,existingSuit in pairs(seven_allSuits) do
if existingSuit == v.base.suit then isUniqueSuit = false break end
end
if isUniqueSuit then seven_allSuits[#seven_allSuits+1] = v.base.suit end
end
end
if two_allSuits ~= {} and seven_allSuits ~= {} then
for _,suit1 in pairs(two_allSuits) do
local isUnique = true
for _,suit2 in pairs(seven_allSuits) do
if suit1 == suit2 then isUnique = false break end
end
if isUnique then
--condition is met :3
end
end
end
end
probably works, dunno
Seals on jokers:
beautiful
Not currently.
Bit more of a basic question. In card descriptions, how should I go about figuring out where to put {C:Attention} and whatnot?
It's kind of a feel thing based on how the vanilla game words things, and where it chooses to highlight
That said, its own logic isn't completely consistent
bump
So, a question with the decks: Is it possible to give each deck a uniquely themed background/set of cards?
I doubt it, but I'm curious if I could theoretically create myself unique themed decks
this is what i had before lol
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.x_mult } }
end,
calculate = function(self, card, context)
if context.before then
for i,v in ipairs(context.full_hand) do
local suits = {
['2Hearts'] = 0,
['2Diamonds'] = 0,
['2Spades'] = 0,
['2Clubs'] = 0,
['7Hearts'] = 0,
['7Diamonds'] = 0,
['7Spades'] = 0,
['7Clubs'] = 0
}
end
end
if context.other_card:get_id() == 2 then
if context.other_card:is_suit('Hearts') then suits['2Hearts'] = suits['2Hearts'] + 1 end
elseif context.other_card:is_suit('Spades') then suits['2Spades'] = suits['2Spades'] + 1 end
elseif context.other_card:is_suit('Diamonds') then suits['2Diamonds'] = suits['2Diamonds'] + 1 end
elseif context.other_card:is_suit('Clubs') then suits['2Clubs'] = suits['2Clubs'] + 1 end
end
if context.other_card:get_id() == 7 then
if context.other_card:is_suit('Hearts') then suits['7Hearts'] = suits['7Hearts'] + 1 end
elseif context.other_card:is_suit('Spades') then suits['7Spades'] = suits['7Spades'] + 1 end
elseif context.other_card:is_suit('Diamonds') then suits['7Diamonds'] = suits['7Diamonds'] + 1 end
elseif context.other_card:is_suit('Clubs') then suits['7Clubs'] = suits['7Clubs'] + 1 end
end
if context.scoring_hand then
if (suits['2Clubs'] > 0 or suits['2Diamonds'] > 0 or suits['2Spades'] > 0 and suits['7Hearts'] > 0) or
(suits['2Diamonds'] > 0 or suits['2Spades'] > 0 or suits['2Hearts'] > 0 and suits['7Clubs'] > 0) or
(suits['2Spades'] > 0 or suits['2Hearts'] > 0 or suits['2Clubs'] > 0 and suits['7Diamonds'] > 0) or
(suits['2Hearts'] > 0 or suits['2Clubs'] > 0 or suits['2Diamonds'] > 0 and suits['7Spades'] > 0) then
return {
x_mult_mod = card.ability.extra.x_mult,
}
end
end
end,
how do i properly debuff a played card?
how did you get it workinggggggggggggg hhhhhhhhhhhhhhh
did you return a func in the table?
oh, returning x_mult in context.before wont work
you will tell the joker to return x_mult in context.joker_main when the condition is met
silly mistake lol
What are you having problems with?
again message on red seal
still does before any calculation on the joker
I'm not returning a message.
without any message whatsoever
it does the message before both calculates
so what i was doing didn't even matter anyway because the internal timing appears to be off
Gonna toy with porting the fallout new vegas collectors deck first
(The Ace)
this code makes it so it always gives X3 mult regardless of the played cards, not sure what to change here
not trying to like, hound you for answers or anything lol
I've had an idea
using drawstep, how can i draw an object onto a card?
"Thermonuclear Bomb" - Sell the Joker to automatically win the current Ante, but destroy half your jokers and half your deck at random
odd
wait
Now I just gotta learn how to destroy cards
disregarding the fact that it doesnt work for modded suits, what can i return from my original context.before to make it go?
^
if context.before then
local two_allSuits = {}
local seven_allSuits = {}
for _,v in ipairs(context.full_hand) do
if v:get_id() == 2 then
local isUniqueSuit = true
for _,existingSuit in pairs(two_allSuits) do
if existingSuit == v.base.suit then isUniqueSuit = false break end
end
if isUniqueSuit then two_allSuits[#two_allSuits+1] = v.base.suit end
elseif v:get_id() == 7 then
local isUniqueSuit = true
for _,existingSuit in pairs(seven_allSuits) do
if existingSuit == v.base.suit then isUniqueSuit = false break end
end
if isUniqueSuit then seven_allSuits[#seven_allSuits+1] = v.base.suit end
end
end
if #two_allSuits > 0 and #seven_allSuits > 0 then
for _,suit1 in pairs(two_allSuits) do
local isUnique = true
for _,suit2 in pairs(seven_allSuits) do
if suit1 == suit2 then isUnique = false break end
end
if isUnique then
print("hi")
end
end
end
end
here, this one should work properly
you dont return anything in context.before, adding mult/chips in that context wont do anything
will not returning anything just work?
mhm
How do I check if cryptid is installed?
you dont always need to return in contexts
if i want to make a card take out money when held in hand i just need to make {h_dollars = -1} right?
i think so, yes
tyty!
lua is so much easier to learn than any language i tried before im actually having fun
Cryptids id is "Cryptid" right?
dunno, you can check it here
i think its just cry
thats the prefix, but its likely its that too
Changed up the shop sign for an undertale themed deck, lol.
Undecided if I like it or not.
nvm just checked @daring fern
bump
I did the logo itself, but I'd love to change more of the UI design, but I'm only sticking to texture modding atm.
ideally boosters would be different tem flakes, lol
i mean, you could just add the wooden sign behind the text
in the texture itself
never used drawstep before, sorry :(
if context.before and context.cardarea == G.play then
would this be the proper thing to put in my calculate function to run it when i play a hand, before any cardS score?
cardarea is unnecessary, im pretty sure
context.before only runs once anyways afaik
just if context.before then alone will suffice
okay, how could i access which cards are being played?
G.play.cards or context.full_hand, both will work
if you want scoring hand instead then context.scoring_hand
i am being given this error for the following lines of code:
if context.other_card:get_id() == 2 then
if context.other_card:is_suit('Hearts') then csuits['2Hearts'] = csuits['2Hearts'] + 1
elseif context.other_card:is_suit('Spades') then csuits['2Spades'] = csuits['2Spades'] + 1
elseif context.other_card:is_suit('Diamonds') then csuits['2Diamonds'] = csuits['2Diamonds'] + 1
elseif context.other_card:is_suit('Clubs') then csuits['2Clubs'] = csuits['2Clubs'] + 1 end
end
ah, ic u decided to use ur code instead
context.other_card doesnt exist in context.before
so these 2 are just the whole hand, and context.scoring_hand is only the cards being scored?
mhm
you will need to run a for loop through context.full_hand or context.scoring_hand, depends on what ur looking for
scoring hand
oh, you can name it anything u want
ah
_ is usually used when you dont use it
i see
its like, the universally accepted name for what you dont use :3
watchu doin
how do i add little "tags" to enhancements? like how there are food jokers
Not sure why the recording is jittery, oh well
It should only upgrade once, and the upgrading is scaling way out of hand for some reason
Did you check for context.cardarea == G.jokers?
SMODS.Joker {
key = 'SCruise',
loc_txt = {
name = 'Super-Cruising',
text = {
"For every {C:attention}consecutive blind{} beaten",
"with a {C:attention}single hand{},",
"this Joker gains {X:mult,C:white}x#2#{} Mult",
"{C:attention}Resets{} if more than {C:attention}1{} hand is played",
"{C:inactive}(Currently {X:mult,C:white}x#1#{}{C:inactive} Mult){}",
}
},
config = { extra = { Xmult = 1, Xmult_gain = 1.75 } },
rarity = 2, -- Uncommon
atlas = 'SuperCruiseatlas',
pos = { x = 0, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult, card.ability.extra.Xmult_gain } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
Xmult_mod = card.ability.extra.Xmult,
}
end
-- UPGRADE CONTEXT 'IF' - BEAT STAKE IN A SINGLE HAND
if G.GAME.current_round.hands_played <= 1 and context.end_of_round then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
return {
message = 'Cruising!',
sound = 'LJet_SCruiseUpgrade',
colour = G.C.MULT,
card = card
}
end
-- RESET IF 'UPGRADE' NOT FULFILLED - MORE THAN ONE HAND PER BLIND IS USED
if G.GAME.current_round.hands_played > 1 and context.end_of_round then
card.ability.extra.Xmult = 1
return{
message = 'Subsonic...',
sound = 'LJet_SCruiseReset',
colour = G.C.ATTENTION,
card = card
}
end
end
}
When it upgrades you need to check for context.cardarea == G.jokers so it wont upgrade for every card in hand.
how do i grab the enhancement key from a card
basically nest the upgrade statement inside an if statement with context.cardarea == G.jokers
oooohhh
isnt that the label?
label?
when making an enhancement there is a "label" part
try referencing some lucky cat
no no, thats not what i meant
oh nvm than
But shouldn't it upgrade only once by nature? the cards held in hand have nothing to do with it
i want to grab the enhancement's key from this
Or have I done something extra wrong
how can i make the game recognize a certain group of enhancements? like how there are "food jokers" that are recognized as food
hey can u link me to that thread you made with all that usefull info pls
The game scores cards in hand at the end of round for gold cards and other things.
yeah thank you
why are debuffed cards still being scored using this piece of code to debuff a card?
if context.before and context.cardarea == G.jokers then
local debuff_card_n = 1 + math.floor(#context.scoring_hand * pseudorandom("j_lemon"))
local card_to_debuff = context.scoring_hand[debuff_card_n]
G.E_MANAGER:add_event(Event({
func = function()
card_to_debuff:juice_up()
SMODS.debuff_card(card_to_debuff, true, "j_lemon")
SMODS.recalc_debuff(card_to_debuff)
card_to_debuff.debuff = true
return true
end
}))
return {
message = localize("k_debuffed"),
colour = G.C.RED
}
end
step 1)
make an array containing a list of enchantments you want to check for
step 2)
when you check for a card that has an enchantment, cycle through every item in the array
this is how i made food jokers for "Cut the Cheese" in JankJonklers, i just used joker keys in that case
Oh i see, so using context.end_of_rounnd means I have to negate the cards in hand effect?
if context.before and context.cardarea == G.jokers then
local debuff_card_n = 1 + math.floor(#context.scoring_hand * pseudorandom("j_lemon"))
local card_to_debuff = context.scoring_hand[debuff_card_n]
SMODS.debuff_card(card_to_debuff, true, "j_lemon")
SMODS.recalc_debuff(card_to_debuff)
card_to_debuff.debuff = true
G.E_MANAGER:add_event(Event({
func = function()
card_to_debuff:juice_up()
return true
end
}))
return {
message = localize("k_debuffed"),
colour = G.C.RED
}
end
try this instead
maybe it will work
how do i make an array?
what program would u recomend to make the art in ?
aesprite
ight
Yes by using context.cardarea == G.jokers
swagger
first_names = { john, jack, larry, tom }
cheers something
first_names[0] returns john
i did this and it is still returning a nil value ;-;
thanks, that successfully debuffed the card but unfortunately the behavior is a bit different than what i was going for
than i would use the enhancement key instead of those names right?
aye
tyty!
doesnt seem to be what im looking for
want to have the debuff to activate like a midas mask turns face cards gold but this debuffs the cards before it gets put into the "scoring area" of the screen
its been a while
what about the steel joker? i forgot the name
i used to know how to fetch this
oh
let me rummage through old jankjonkler code
hiii lyman
hi bestie
:3
oh, this seems like it, thanks
im mostly looking for the key, since im intending to use it to transform the card back to its original enhancement lol
adjust it accordingly but basically its .ability.name == [KEY]
isnt that the enhancement's name?
honestly im not sure
whoops
.config.center.key == key
nice, thanks :3
if you were to want to do it by name you could do an array like
no thats cool i rather ping me
oh wwait no misunderstood
i'm the only weird one here
im a little slow rn sorry haha
i dont sleep for more than 24 hours and im listening to musicals to keeep me awake
guh
one day if i ever get the hutzpah to code again i'd like to make a tag api
not like skip tags but like tags for cards, so stuff could be automatically labeled as "food" joker or "joker with jimbo in the art"
Azure seal:
ohh yeah, that would be nice
oops
would be nice to not have to update my old jokers for cross compatability
jokers with too many lines of text
idk man
@daring fern It works perfectly now. You're a tru blu legend
what would even be useful tags anyway
food jokers is definitely useful
food jokers, obviously
suit jokers probably would make sense
stuff that effects specific enchantments?
chip/mult jokers
How could one check if a joker doesn't score at all during a hand?
iirc food and space themed
make the joker set an arbitrary boolean to true if it scored
after the score check check if said boolean is true
uhhh i guess via context.post_trigger??
but yeah also depends on what context youre trying to access
sfasdsal 5k5 lines
if youre checking if other jokers scored, uhhh, good luck
fecundity my beloved
gepard left, here we go
ok
i love gaslighting my players
ok
blind was certainly something else
why isn't the atlas that i created with SMODS.Atlas not appearing in G.ASSET_ATLAS but works fine with other things?
what should i make for the fusion between wild+wild?
It's only added to G.ASSET_ATLAS after SMODS atlases have been injected
Little more help needed. I have:
if G.GAME.current_round.hands_played > 1 and context.end_of_round and context.cardarea == G.jokers then
card.ability.extra.Xmult = 1
return{
message = 'Subsonic...',
sound = 'LJet_SCruiseReset',
colour = G.C.ATTENTION,
}
end```
This resets the joker at the "end of round", but I want it to reset as soon as the first hand has scored and failed to win the round. What would I do to check that specifically?
context.after
that triggers after any hand is played
Where does cryptid define its colours?
loc_colours
So I'd say if G.GAME.current_round.hands_played >= 1 and context.after and not context.end_of_round and context.cardarea == G.jokers then?
No, I meant what file.
uhhh iirc hands_played gets incremented after after triggers
actually
yeah looks good
Cryptid.lua
So that would reset the card in the after but ONLY if the round isn't won in a single hand?
it would trigger from the second hand onwards

not necessarily round isn't won
Yeah... how do I make it sorta 'inactive' in terms or reset and upgrade after the first hand is played?
this is truly the potential joker of all time
i think ill end modding for today, cant think of something for wild+wild, maybe tomorrow ill be able, gn everyone!
gn rafaelly
gn good sir
hey gang how does one create their own context
I need to make one that's specifically after cashing out
it's genuinely as simple as patching in a call for SMODS.calculate_context
let me get an example, one second
here's a patch I made for a context of when the ease_dollars function is called
you just call SMODS.calculate_context({name_of_context = true})
you can add other variables to the table too, like how i'm defining context.dollars_added as the ease_dollars mod
I think that's just been a part of the contexts system for a while
not too knowledgeable of it, I just know it exists
that wouldve been nice to know a while ago lmao
Wouldn't context.starting_shop work there?
Green seal:
Oh god seals on jokers is an insane thought
But does that mean that something like hanging chad scores a card 3 times or 4?
Hanging chad would retrigger 4 times.
Why isn't this drawing anything onto the card?
SMODS.DrawStep{
key = "pin",
order = 100,
func = function (card, layer)
if card.ability.pin then
local sprite = KMOD.pins[card.ability.pin].sprite
sprite.role.draw_major = card
sprite.VT = card.VT
sprite:draw_shader('dissolve', 0, nil, nil, card.children.center, 0.1, nil, nil, nil)
end
end,
conditions = { vortex = false, facing = 'front' },
}
With gold seal is there a way to make the money show on the joker and not the playing card?
if v is a glass card will next(SMODS.get_enhancements(v)) return 'm_glass' ?
are there any guides / templates for making joker art?
if you want to check for a specific enhancement you should use SMODS.has_enhancement
I need the key for whatever enhancement the joker has, could be any enhancement
get_enhancements returns a list of enhancements a card has, I think smods has an optional feature to allow cards to have multiple enhancements
ahhh i see
looks very good but the chick and star/portal behind don't have a lot of contrast with each other, so at a first glance i thought they were one entity and had no idea what that creature was
"message_card" in the return controls where the message shows up I thinj
So you can do message_card = card
How could one make jokers show up in the shop with seals?
yeah they do need contarst
this one looks better
Ok now do it with glass cards
is there any way to carry a variable between to if context statements?
im trying to take a condition being met in context.before and make a joker score in context.main dependent on the result
this seems very simple but i am blanking hard lol
bump
love the little duck in the star
thank you but also your pfp is giving me veitnam type flashbacks
lmao fair
Done.
thank you John Polybridge
You think it'd be possible to make a joker that adds quick time events into balatro
Probably.
I think it'd be funny if the quick time events were based on the hand you played
You play a flush if with like an Ace 8 4 2 and King and then you'd have to type A 8 4 2 and K in a random order
How could one make it so jokers in the shop have a chance of having a seal?
lovely hooks probably
patches*
😭😭😭😭😭😭😭
Hey all,
trying to make a resource pack as a mod rather than overwriting original files, and getting stuck on replacing the Soul in the centers atlas. The rest of the centers atlas sheet works, but not that one. Code is here, any help appreciated :>
my initial thought is that you might not be taking into account that it's 2 sprites
like how the legendaries are two sprites layered on top of each other
oh really? i missed that part
i don't mean the resulting jokers to be clear i just mean the actual Soul card itself
I don't know how to do that.
yeah ik
the soul card is also 2 sprites
oh that i do know
crystal heart (row two, column one) and heart (row three, column three)
the card itself works but not the heart on top
when i made my resource pack i used malverk which allows you to do something like in Minecraft with the resource pack selector when
oh cool
but the mod has to be specifically made for it
hadn't heard of that, i will look into it (especially because that way it'll let me overwrite individual ones if i want)
for the time being though i would just like to know why the soul over-layer isn't working
atlas keys are case sensitive no?
i'm not entirely sure whether they are, but if they are, you want to use the key centers, not Centers
i was just using the ones from the original code
are you sure? the original code isn't capitalized, I think
also it seems you're adding custom playing cards
yeah i've been meaning to move that over to the friends of jimbo smods api
just haven't been doing much of it myself recently
nah, made it centers and no change
my assumption is that it's because it's technically an animated asset, but I can't find any smods documentation on it
the soul isn't an animated sprite
it's just a static sprite placed atop a moving ui element
Is there a way to change the seal text if its on a joker?
ah. no clue then :P
I don't know why it wouldn't override if you've properly set up the keys. Strange.
especially because before moving it over to a mod, just overwriting the enhancers png in the extracted exe worked fine
I think it'll be more worthwhile just setting this up through Malverk, rather than trying to diagnose this
yeah, no clue why it's not loading in. The soul is grabbed from that atlas, it's not loading in at a strange moment or anything. Something else is preventing that atlas from being overwritten in some way, I think
maybe it gets set in a weird way in an additional place, but if that's the case, the source code doesn't tell me
why isn't this drawing the sprite?
local sprite = KMOD.pins[card.ability.pin].sprite
sprite:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 0, 0)
does talisman mess with the usability of math.floor, math.max and math.min?
this is it for talisman compat right? ```lua
function to_big(x)
return x
end
just gotta use that like everywhere
to_big = to_big or function(x) return x end
and where do you need to use to_big?
everywhere you'd use numbers?
yeah
like... literally everywhere?
like does this need to be to_bigged? cuz that's kinda annoying context.card.config.center.rarity == 4
or this card:juice_up(0.8, 0.8)
only in comparisons
Usually the problematic ones are dollars and planet level, the rest shouldn't require to_big, also yea it's used for comparisons
is there ANY good documentation on how to draw objects onto a card using DrawStep? nothing is working for me
which object
Cards require a CardArea
Sprites and Text can be added via Object nodes
sprites
like drawing images like seals and stuff onto a card
n = G.UIT.O, config = {object = SpriteObj }
?
I've not been able to set this up in a way that's Talisman proof, honestly
are you drawing sprites or shaders????
this doesn't do anything for some reason
function KMOD.draw_extras(card, layer)
if card.ability.pin then
local sprite = KMOD.pins[card.ability.pin].sprite
sprite.role.draw_major = card
sprite.VT = card.VT
sprite:draw_shader('dissolve', 0, nil, nil,
card.children.center, 0.1, nil, nil, nil)
end
end
He's definitely cooking smth
Can I have some help with modding, im not really experienced in it, how do i create my own rarity?
Finally made my first joker without having any prior knowledge on lua..
Props to you for not asking how to do each step and actually reading the docs
Hey quick question, is there a zip file somewhere that contains all 150 joker pngs?
you can get it from balatro itself with 7zip
awesome! close enough welcome back glass cards
If I might ask, what's the thing that makes gamepass unmoddable?
is there a way to get the number of chips a hand is (like the blue number)
I'm cooking up something evil
hand_chips
yeah
Yes.
it's a global
how can i retrigger multiple other cards from a seal's calculate?
Cards other than the one the seal is on?
yes
You could check if context.other_card is the card you want.
how to i specify to retrigger the other card? i thought i just needed to return card = context.other_card but thats still just retriggering the card with the seal
Is there a place to get started with modding?
As a developer?
Not seeing any guides outside of "how to install mods in balatro"
my goat
What card are you trying to retrigger?
im trying to make a seal that retriggers every other scored card with one of a list of seals
wait hang on i may be stupid
i may just not be testing correctly
no im not
yeah it isnt working
You would check if context.other_card.seal and context.other_card.seal == "prefix_key" replacing prefix_key with the prefix and key of the seal you're looking for.
thats what im doin
its only retriggering itself
im trying to send screenshots of my code but my comptuers being a bitch
and ill send my table contains function hang on
I think you would have to hook calculate to check a card has that seal then checking for other cards that have a seal then retriggering those.
seems like a pretty simple thing to have to hook for
I'm pretty sure a seal only has access to the card it is on.
can i just patch calculate to provide context.other_card to seals
seems like a simple fix
I'm not sure because I know basically nothing about patching.
anyone have a string array of all 150 jokers lying around 💔
tnx
Why doesn't context.post_trigger count retriggers?
The gold seals give $3 when the joker its on is triggered.
unrelated but the fact you didn't go for the straight flush..
Where can I find documentation about creating your own joker ?
thx
Would the lighting look weird in game
is there a way to make the game rip 200 wheel of fortunes
Automatically?
It is 1 in 4
people are just bad at what judging what 1 in 4 is supposed to feel like
people also misunderstand what “1 in 4” actually means, it is a little misleading
teto!!!
it makes it seem like every four times you spin, you should get it at least once
but each spin is an independent event
thats what
wants you to think
ik im just shitposting
I know I was just sayin it to say it lol
I’m in a statistics class at the moment it makes me feel smart to talk about this
teto
Stat class is why I want to do it
Stat teacher said if I bring him the data we can run the numbers on it
lol that’s real
I gotta rip 200 wheels
im sure someone has analyzed balatro's pseudorandom scheme by now
How are you gonna count the hits and
s?
i feel like it's a post once a week on the reddit, haha
Hola peoples
yo yo yo
Is there a functino similar to joker:set_edition() but to add a sticker to a joker ?
like would joker:set_sticker() work ?
:add_sticker
Wheel of hope
thx
Cryptid
good morning chat
gambling
200 wheels 200 jimbos
I've been dwelling in mod devving instead of playing the game for far too long, to the point that I forgot some other mod stuff.
I have a joker that "For every consecutive blind beaten with a single hand, this Joker gains x1.75 Mult Resets if more than 1 hand is played"
The joker works, but the reset is being problematic.
wait really? I don't remember anyone posting anything about the pseudorandom code
most useful joker https://youtu.be/xJ0CL1-G6eA
Here is what I have so far.
-- RESET IF 'UPGRADE' NOT FULFILLED - MORE THAN ONE HAND PER BLIND IS USED if G.GAME.current_round.hands_played >= 1 and context.end_of_round and context.cardarea == G.jokers then card.ability.extra.Xmult = 1 return{ message = 'Subsonic...', sound = 'LJet_SCruiseReset', colour = G.C.ATTENTION, } end
ATM it triggers over and over. I need more defined 'if' so that it only resets the one time (right after first hand is played and blind isn't won)
Is there a good way to check when Ante is over that's not checking whether you beat a boss blind
Maybe add and card.ability.extra.Xmult ~= 1?
Because it won't need to be reset if its Xmult is already 1.
Do you mean and not card.ability.extra.Xmult = 1??
yeah, not of the code specifically, I think. But even then, the code can't do anything toos trange, because it does all tend to even out https://www.reddit.com/r/balatro/comments/1jl5gb0/i_rolled_144000_wheel_of_fortunes_to_figure_out/
No, You'll need and not [cae].X == 1
Oh valid you right
what am i doing wrong here? says other_card is returning nil
145 fails
that is always false
is there something similar to malverk for fonts/language files?
why do people always forget about ~=
The variable name wasn't important in the convo, so...
And ~= was my initial suggestion, tbf.
I'm not talking about the variable name
is there any reference that i can read to mod the language file
im going to make a language mod thats similar to BUMod
the original language files are what i always refer to
I'm saying not expr == 1 can't possibly be true because not expr is a boolean for any expression
do i need to patch it or not
My bu mod doesn't even work lol
in what sense?
yeah i figured
people crashed because of your mod
something like this
Don't you dare blame the perk