#💻・modding-dev
1 messages · Page 467 of 1
What do you mean by installed? Doesn’t it need to be inside the game files? is it meant to be used like an API, as a requirement, just like all the mods that need Steamodded?
it is a steamodded mod, it just allows for other mods to make challenges with less code
at some point tomorrow i’ll see if i can get something working on one of my mods
(with challenger deep rules in a deck)
I’m never getting the Sisyphus joker finished.
funny
Ironic, isn’t it?
what’s exactly the issue
I’ve been saying this multiple times
It does not trigger value multiplication after defeating a boss blind, in which it should
This replaces photograph which is /1.2 y scale in the game's code, how would I go about reversing that
if context.end_of_round and context.main_eval and not context.blueprint and G.GAME.blind.boss then
card.ability.extra.xchips = card.ability.extra.xchips * card.ability.extra.xchips_mod
card.ability.extra.interest = card.ability.extra.interest * card.ability.extra.dollar_mod
return {
message = "Yes, that's it!",
sound = "sisyphus_yesthatsit",
colour = G.C.GOLD
}
end
this is the snippet in question
Changing the name but you'd have to recode it, or patching I think.
i don’t think main_eval works with end_of_round
either that or i need sleep
Does the message trigger
no
main_eval is practically designed for end_of_round
i also tried context.cardarea == G.jokers
Is that your entire calculate function
joker
Try temporarily removing the first end_of_round check
i’m guessing the first one overwrites the second
Then you're going to need to make a custom context.
bump
do you have a localization file
you mean on the dollars?
Yes.
Yes.
(am i right in thinking labels for packs are stored in dictionary = {} of a localization file?)
just commenting out this entire code
Yes.
oh ok thanks
How about replacing it with context.setting_blind?
the point is just to remove it temporarily to see if it's the cause of your 2nd one not triggering
Ok I’ll remove it
mr seals on every is this correct
No.
:(
still nothing
even after temporarily removing the first one
sorry
brainfart
i meant
context.end_of_round
How do I set the chips & mult on the UI?
removing the first context.end_of_round didn't work.
what does your code look like after removing it
-- if context.setting_blind and context.cardarea == G.jokers and not context.blueprint then
-- G.GAME.dollars = G.GAME.dollars + card.ability.extra.interest
-- return {
-- dollars = card.ability.extra.interest,
-- message = "+$" .. card.ability.extra.interest,
-- sound = "sisyphus_keepemcoming",
-- colour = G.C.MONEY
-- }
-- end
yea it still works
the double hyphen
wdym it still works
ok hold on, brainfart
it still does not work
the context.end_of_round still does not work
Do you have any other mods enabled
What steamodded version are you using
And does your mod have any lovely patches
bump one last time except seals on everything
Do I have to turn off cryptid?
Yes.
No lovely patches at all
Try turning all other mods off
Sisyphus is currently a standalone
how would user yeahhpiehh fix the text at the bottom
these are questions only true balatro fans can know…
They would put group_key = "Name Pack" in Localization > misc > dictionary
Is there not a way to just move the middle card up? It's just retextured Photograph
CRYPTID IS THE PROBLEM AGAIN??
in your localization file, under misc -> dictionary -> <key_of_your_set>_pack = "some string"
This is also a problem for my Sans joker
How do I change the displayed chips and mult? This isn't working
Sorry yes, it's whatever key you put as group_key on your booster
Originally Sans was going to add club aces for every scored card in played hand
mult = mod_mult(...) hand_chips = mod_chips(...)
aight so i am working on a
very funny joker
But because of cryptid’s overrides, sans instead creates random enhanced playing cards
how would one go about checking a card's sprite's position in its atlas during calculation
I'm hooking CardArea.parse_highlighted, can I still do that?
You can still set variables yes.
it's based on an injoke between friends and i where
you get a bonus if a card is scored literally when the thing blinks lmao
checking that is like the one roadblock to it for me
card.config.center.pos?
thank!! will try now
how would i do that using a loc_txt
like so?
calculate = function(self, card, context)
if context.cardarea == G.play and context.individual and card.config.center.pos == { x = 0, y = 1 } then
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
return{
message = "blink",
chips = card.ability.extra.mod1,
card = card
}
end }))
end
end
set group_name = "whatever"
inside loc_txt
oh god that actually gives me a further idea
I CANT SEND MY MARIO GIFS
so does that mean i would have to port everything i’ve already did to a loc.txt
but tis the block that switches powerup sprites
and it could be a joker thats some shit like "when x happens gain y" based on that sprite
No, you would just have to create a localization file and put it in.
It seems to work. I'm still having problems with indexing the hands though so it crashes before that. I'm trying to get the played and contained hands but I'm either getting them wrong or passing them in wrong.
doesn't seem to be working, at least not as i had it written
237 is the highlighted line
any other ideas on how to check the thing?
card.children.center.sprite_pos?
why are you calling the function twice.
also you put value instead of index
I'm trying to get the played hand and contained hands separately, though I may have misinterpreted what the function does. I tried swapping index to value to see if it would work but both crash the same way.
no, you swap value to index
i have no idea if calculate would run often enough to make this a valid way of testing it but it doesn't seem to be being printed?
you can get both values from one function call local _, played, contained = G.FUNCS etc etc
When is the sprite being changed?
When you use pairs in a for loop like that, value is just short for contained[index]
you have to compare the values of the table separately
random chance to when the card is drawn, upon which it sets a int value for how many frames that lasts, and when it runs out it changes it back
Ok, well those are some nice suggestions to clean up my code but it still has the same issue
and what does your code look like now
Anyone know why the joker doesn't draw this when it has an edition (excluding foil)?
draw = function(self, card, layer)
if card.config.center.discovered then
if (layer == 'card' or layer == 'both') and card.sprite_facing == 'front' then
local scale_mod = 0.05 + 0.05 * math.sin(1.8 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL)) * math.pi * 14) *
(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 3
local rotate_mod = 0.1 * math.sin(1.219 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL) * math.pi * 5) * (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 2
local image = Sprite(0, 0, 71, 95, G.ASSET_ATLAS["willatro_WillatroOrgans"], {x = 1, y = 0})
image.role.draw_major = card
image:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
image:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
end
end
end
A polished crash
Why does Optimus prime transform whenever a hand is played?
just poking to make sure you saw my response
No difference
Okay I see, for some reason contained has a key called top
In your if statement do if played ~= index and G.GAME.hands[index] then
No crash but also no effect
well that's cus you're updating the value but not the text
Do I need to update the text after?
Alright
I tried figuring out updating the text a while back but couldn't quite get it
update_hand_text({ delay = 0 }, { mult = mult, chips = hand_chips })
Anyone familiar with the draw method?
Well this is strange
actually I haven't asked what your goal is
My goal is to add the chips & mult of contained hands to the hand
here do hand_chips = hand_chips + <the stuff you have> and the same with mult
tho depending on when you're doing this those values might be overridden when you play the hand
That's probably fine. I've been assuming I'd have to implement showing the base score and actually adding it separately.
bump
So I should store the added chips & mult in a new variable and add it on, right?
still looking for help regarding this. this code as of now is not working
Doesn't work. hand_chips is nil.
they shouldn't be nil 🤔
maybe you're doing this too early
How would I do this any later?
bump
I can just keep selecting cards and the numbers go up forever. They also go up even when it's just high card.
It could be another line at fault here but it could still be this one
well you'd have to set hand_chips and mult to 0 before the call to poker_hand_info for example
An explanation of the code at play here would help cause I'm new to lua/balatro and I want to learn from this, not just fix one problem
Is this code even filtering the contained hands?
yeah, you're only considering contained hands that are not the final played one
Why are you excluding non-Club suits?
because it's a joker that only activates when you have one suit in hand
similar to blackboard but generic
so if you hold all diamonds in hand or all clubs in hand
i wrote this out for each specific instance of suit
Have you tried looking at Blackboard?
i did and that's where i got the base from
so you're summing up the mult and chips of every hand contained in the highlighted cards that isn't the played one, then you're modifying the global variables that balatro vanilla uses to set chips and mult (hand_mult should be just mult btw), and then you're updating the text
that's pretty much it
Blackboard counts all wild cards as a spade/club
What you should be checking is if the cards in hands suit is the same as the first card in hands suit.
how does that work
Which instance of hand_mult are you referring to?
also yes i'm aware my code on the left is absurd but i wanted to try it myself before coming here lol
bump
all
its probably joever for the both of us ngl
local nonwild
for k, v in pairs(G.hand.cards) do
if not SMODS.has_any_suit(v) then
nonwild = v
break
end
end
local pass = true
if not nonwild then nonwild = G.hand.cards[1] end
for k, v in pairs(G.hand.cards) do
if not v:is_suit(nonwild.base.suit) then
pass = false
break
end
end
if pass then
-- add chips
end
```?
How do I create a consumable that makes a joker of a certain pool? Here's the current code that does not work.
Remove pools and do set = "SinJ"
Could you indicate more clearly what you're suggesting? Cause I tried your suggesstion multiple ways, and even fixed some of them, and none of them work right
this will go under the calculate function?
Yes.
hand_chips and mult
tho idk what the issue is anymore
Code?
Did you define SinJ as an SMODS.ObjectType?
are you trying to add playing cards' chips and mult to the base or smthn, or all highlighted cards?
SSinJ is the name of the pool I added all the sin jokers to.
I'm trying to add the chips & mult of all contained hand types, in addition to the played hand
Yes, did you define it as a SMODS.ObjectType?
No, I guess not. Where and how do I do that.
It's displaying the combined chips & mult of every hand type in the game, minus the one played
try
local playedHandType, handText, contained = G.FUNCS.get_poker_hand_info(self.highlighted)
local chips, mult = G.GAME.hands[playedHandType].chips, G.GAME.hands[playedHandType].mult
for handType, handInfo in pairs(G.GAME.hands) do
chips = chips + handInfo.chips
mult = mult + handInfo.mult
end
update_hand_text({ delay = 0 }, { mult = mult, chips = chips })
Ohhh
I'm pretty sure it's not actually filtering for contained hands at all
In your if add and #value > 0
That'll check if there's at least one match for that hand
Sorry I was distracted with something else I didn't realize that was missing
i kinda didnt get what you wanted so my answer differs alot 😓
Looks good. I put that in and it adds all the contained hands, though it doesn't actually add the played hand. I can fix that pretty easily. In the meantime though I want to add your part onto @keen atlas 's solution cause the code has gotten pretty messy by this point.
The played hand ignoring comes from played ~= index I was under the impression you wanted that
Also your code is fine as it is and frostice's isn't really a solution to what you wanted
I should probably just clean up the code myself so yeah
It seems to work. I'm gonna test planet cards real quick
Yep. Pair lv. 2, high card & two pair 1
One small issue, using a planet card while cards are selected clears the entire text display
its vanilla effect. try calling the G.hand:parse_highlighted() after using planet card
For some reason it's applying the effect even though I don't have the joker
Do if next(SMODS.find_card etc etc) then
if SMODS.find_card("j_givl_orbit", false) then
find_card returns a table of every card found, next checks that it has at least 1 element
anyways implementing an entire new combat system is probably not going to be the easiest first project
hi smg
assuming this is inside the calculate joker function and if your joker is made with smods then you don't need to lovely patch this
hey yall i have the debug mod and every time i spawn in one of my own jokers it crashes, im tryna test em and idrk what to do
i cant tell if its the debug mod or mine
i know nothing about this but if i had to assume its either your mod or a buggy version of debugplus and you should just update
hi i hate this joker
again you can change the effect
so long as it is an objectively better version of the original and it's unique in some way its good
the doc was just an initial guideline, i don't follow it most of the time if i come up with a better idea last minute
i tried couldnt get it to work
what was the issue
its not doing the copying
and when i tried it with smods i would only get it to work with a weird retrigger error message
whats worse is i have a joker that is almost exactly like this and it works but this doesnt
Thanks, it works now
The score is displaying as it should. I can move on to actually scoring it now.
omfg did i literly just have to return bp_extras
On the side, I want this joker to also make contained hands count as played hands for effects like to-do, hand counts, etc. How possible is that and what interactions could get confusing?
is there a way to track which poker hand was played last
across everything, not just a single round
Possible either way but your definition of everything makes a big difference
Between runs or no?
no just within a single run
Yes.
lay it on me 
G.GAME.last_hand_played?
alrighty
what was the calculate return for not pitching when scoring mult
how do i add the compatable to a joker
anyone know how to prevent a joker that retriggers other jokers from also retriggering itself? Its main ability is chips, but has a slim chance to retrigger other jokers,
does this work? im somewhat confident that it works for the modded consumables since i was able to find a gateway in a spectral pack during testing, but im not so sure soul and black hole work
idk why its swapping 3 and 2 and adding "remaining" behind the 2
does adding 3 not work?
?
how would i check during joker_main if my current hand is equal to this
i cannot figure it out 😔
the only time i see this used in an official joker is for hanging chad's unlock condition
context.scoring_name?
i tried that, not sure if i did it right tho
It's used for blue seal.
SMODS.Atlas{
key = 'freddy',
path = 'freddy.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'freddy',
set = 'Joker',
rarity = 1,
order = 1,
cost = 5,
unlocked = true,
discovered = true,
blueprint_compat = true,
config = {},
loc_txt = {
name = 'Freddy Fazbear',
text = {
'Gains {X:mult,C:white}x1.5{} {C:black}Mult{} after defeating {C:attention}5{} {C:attention}Blinds{}.',
'{C:inactive}Blinds defeated: {C:attention}#1#{}'
}
},
atlas = 'freddy',
pos = {x = 0, y = 0},
loc_vars = function(self, info_queue, center)
self.ability = self.ability or {}
return {vars = {self.ability.blinds or 0}}
end,
effect = function(self, context)
self.ability = self.ability or {}
self.ability.blinds = self.ability.blinds or 0
self.ability.upgraded = self.ability.upgraded or false
if context.blind and context.won then
self.ability.blinds = self.ability.blinds + 1
if self.ability.blinds >= 5 and not self.ability.upgraded then
self.ability.upgraded = true
return {message = "Freddy powered up! x1.5 Mult"}
end
end
if self.ability.upgraded and context.individual then
return {x_mult = 1.5}
end
end
}
my joker completely crashes my game could someone help look over my code
😭
im new to this so idk much
i dont think context.won is a context
oh i think i've been misinterpreting it
i want to keep track of the previous hand played, not the last played hand in a round
i don't think there's a way to that with vanilla mechanics though
what is the default soul_rate? literally every source i have is conflicting
can someone help?
No, that's what it does.
ok well idk what i'm missing
what would i use instead
you can use the smods wiki to help you
what does local ret = {} do?
It sets a local variable with the name ret to an empty table.
ah ok im just tweaking that
anyone know how to add 3 of these
bump
0.003
if context.main_scoring and context.cardarea == G.play then
if pseudorandom('GamblerAtHeart') < G.GAME.probabilities.normal / card.ability.extra.xmult_odds then
return {
xmult = card.ability.extra.xmult
}
end
if pseudorandom('GamblerAtHeart') < G.GAME.probabilities.normal / card.ability.extra.dollars_odds then
return {
dollars = card.ability.extra.dollars
}
end
end
i dont understand how psuedorandom works, can someone help me?
for context, this ALWAYS triggers the xmult, as your last played hand and your current hand are techincally the same thing
i'm trying to figure out a way to store the hand you play when you play it, to then be compared and replaced by subsequent hands
but that's way outside my knowledge
how can i make so i cant destroy a joker without using eternal sticker?
Store last played hand in the Joker (or make a custom G.GAME variable) with context.after in mind.
why is this always applying, instead of just when the variable is true?
did i return wrong somehow
Does anyone have a guide on lovely patching?
I don't think a guide exists. Best option is to copy what other mods have done.
Oki oki got it
It's conceptually simple: search for some code that matches some pattern, insert a payload before, after, or at (which replaces the matched code)
They patches are complicated but they operate more or less the same way
Copy just wholesale moves code into the target file.
And module patches inject Lua modules
Is there an effective way to rotate a card in place?
Mmmm! Got it
Cards have their origins at the top left rather than the center so I imagine it's not straightforward
the global variable here is set to false on game start, yet this hook uses my hooked function rather than the original one
Can you transform along an width/2 and height/2 offset from the origin?
Tysm... what do i call you? Do I call you meth? Rul? Just metherul?
Meth is fine haha
bump
Let me know if you have any issues. I can forward complaints to the lovely dev as well
remember trying this and getting some weird results but let me see
Gotcha
Ah and ask on the lovely thread if I don't respond here
These general chats move fast
John Lovely is usually pretty busy yeah
Psh
Nvm, i think i understand
The reason I need lovely patches is cuz im trying to make a custom modifier. I know stickers would be easier, but that wouldn't be allowing for what I want it to do tbh.
I assumed that's the case, yeah, haha.
Lovely patches take some finesse to ensure that they don't break other mods
Yeah; im gonna make sure to test compatibility with other mods
-# me with overwrite = true:
Ah yeah and give me feedback on the dev process in the lovely thread. I'm working on dev tooling on my vacation so I'd like input on what sucks.
that field has never done anything lol
I will :3
...does it not?
I involve it quite a bunch to overwrite bits... https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/main/lovely.toml
the overwrite field doesn't make sense considering the only way to overwrite code is with at so
Ah then I'm misremembering
Tbf I just woke up haha
for context im trying to hook into this cryptid function (first image), but specifically NOT running the Cryptid.pointerblistifytype("rarity", "cry_exotic", nil) line if ast.safe_pointer is true (second image), but for some reason its NEVER running Cryptid.pointerblistifytype("rarity", "cry_exotic", nil), even if the global variable isn't true
Fair.
I knew I wasn't crazy haha
...I stand corrected-
how do i make the value in a joker description live update? i know there's misprint but that just changes randomly through a random feature with dynatext, which isnt what i need
dump_all doesn't do anything either
bwahaha
I plan on reforming the patch format soonish
im so confused
help would really be appreciated
have you verified that your hook is being run?
in what sense?
its fine ive already figured it out lol
how were you able to do it if you don't mind me asking?
how do i make it so that bottom_hat only activates if its adjacent to top_hathere is the code:
SMODS.Joker {
key = "bottom_hat",
atlas = 'SpiderSushiMod',
pos = { x = 1, y = 0 },
config = { extra = { chips = 50, mult = 50 } },
rarity = 1,
discovered = true,
cost = 3,
blueprint_compat = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.mult, colours = { HEX('FF9A00') } } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult
}
end
end
}
G.UIT.T objects have config.ref_table and config.ref_value, so i gave each joker a table at ability.extra.id_table to use as a key in G.GAME.rend_lowpercent_vals, set the ref_table to G.GAME.rend_lowepercent_vals, and set the ref_value to ability.extra.id_table
the id_table can just be empty since every table in lua is unique
so when the game shows the text, it checks ref_table[ref_value]
very useful
here ya go
Bump
Check for your joker in a loop, save its pos, check if G.jokers.cards[pos-1] and [pos+1] exists and if one of them is top hat
Ceremonial Dagger does the pos thing if you need a ref
i dont really know lua or how to do loops(in lua)
thats why i need help
Thank you!
i know the logic just not the code
Cant give more specific help rn sorry
yea but i dont understand the code
Darn
how can i regroup all of my jokers in one group to make it that i can make something like that
25 * all_jokers_from_thismod
have you put your jokers in a pool? if so you can just call that pool
turns out this breaks when you try to save
moving it from G.GAME to REND (my mod variable) might help?
haven't thought of that, i feel kinda dumb x)
it ok lol, happens to most of us
Hey so, I wanna make a balatro mod. How do you get started? I want to at first, just add a few simple Jokers. That makes wild cards give +50 chips, +5 mult, and x2 mult when scored.
I just have no clue where to start is the thing, not sure what programs I’ll need, what language I’ll code in, or any other info. I was wondering if there’s a beginner guide of sorts?
first i suggest you install Microsoft Visual Code, then read steammodeed's first mod guide, try to read other mods code to see what it looks like then start doing what you think seems good and does what you want and ask the discord if you need help, i suggest to wtach videos too it helps alot
Visual Studio Code *
Have Visual code already, I used it for my Pokémon romhack so that’s good to have
then i won't say "go in the jungle by yourself" but it worked out for me although i don't suggest for you to do it
try going bit by bit
and install steammoded that's easier and just a must-have for making mods
Thank ya, I will go grab that
i think it's just needed to have steammodded
no worries :)
i can lend you one of my begginer .lua (im a begginer too) so you can see :) just don't steal my jokers pretty please
and gosh has this server helped me
I will steal nothing, stealings no good
good
DO NOT be shy to ask for help here, as a beginner myself people here were VERY helpful
indeed
i'd say 25% of my mod if not more is possible because of these incredible persons
Also when asking help on your code, use three of these little thingy on the beginning and end (`)
It creates this
https://discord.com/channels/1116389027176787968/1349064230825103441
also check this, it can help
Thank ya
how would i create a booster pack in the consumable slot?
smods.create_card the booster, then g.consumeables:emplace it
and put "lua" just after the first three thingy to make it more enjoyable to read
SMODS.Joker{
key = "Parada",
loc_txt = {
name = "{C:legendary}Pa{}{C:gold}ra{}{C:common}da{}",
text = {
"Gains {X:mult,C:white}X1{} Mult",
"every time that {C:attention}scoring hand",
"contains {C:attention}three{} scoring cards",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
}
},
atlas = "LegParada",
soul_pos = {x = 0, y = 1},
rarity = 4,
pos = { x = 0, y = 0},
cost = 10,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
config = { extra = { repetitions = 1 } },
for exmple
how do i make it so that bottom_hat only activates if its adjacent to top_hathere is the code:
SMODS.Joker {
key = "bottom_hat",
atlas = 'SpiderSushiMod',
pos = { x = 1, y = 0 },
config = { extra = { chips = 50, mult = 50 } },
rarity = 1,
discovered = true,
cost = 3,
blueprint_compat = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.mult, colours = { HEX('FF9A00') } } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult
}
end
end
}
and it seems i don't know how to do such simple things as pools
Have you tried checking to the left and right of joker using positioning?
i dont know how
- loop through G.jokers.cards to find its own position
- check G.jokers.cards[pos+1] and [pos-1]
yea ik but i dont know how to loop like i barely know lua andi dont know where to learn lua
is perma_mult not usable when discarded or
What i do is this
SMODS.Joker{
key = 'TWOPAIR',
loc_txt = {
name = 'TWO PAIR!!!',
text = {
'Gain {C:money}$2{} if poker hand is a {C:attention}Two Pair{}.'
}
},
atlas = 'TWOPAIR',
pools = {["Batrocities"] = true},
As you can see in the very bottom i have it as a pool for my mod
-- Batrocity joker pool
SMODS.ObjectType({
key = "Batrocity",
default = "j_Batrocities_MichaelWave",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
end,
})
In my core i have this
'k thanks :)
Np
bump
line 19 is
context.other_card.ability.perma_mult = (context.other_card.ability.perma_mult or 0) + card.ability.extra.mult
what's wrong ? it crashes when i get my mouse on the joker that uses j_deity_all and when said joker triggers, every joker has the pools = {["deity"] = true}
what have i done wrong here
( i missed a { in the screenshot, there is no chrash-able syntaw error)
just trying to create a negative mega spectral pack
What crash do you get
this is what i get
Oh I didnt see properly, the paameter for SMODS.create_card isnt the same as the og create_card
ah
bump x2 before I go offline
any modders here who's interested please I need an answer
So when you select jokers of a pool youre gonna want to put j_MODKEY_POOLNAME
ohhhh
Sorry im not very familiar with lua but is context.other_card.abilty.perma_mult an actual thing? Just a question in which i MIGHT be able help
still crashed :/
in smods' wiki there's a page called "permanent bonuses" or something like that
it gives you a list of permanent things that can be given to playing cards, like how hiker does it with perma_bonus
this one
you don't wanna use it for that just makes it so that card_ability_mult = card_ability_mult + card_ability_extra_mult
well I wanted to have a hiker-like effect to my cards but with mult instead of chips and hiker uses this perma_bobus thing
bonus**
Have you tried checking hiker’s code for reference?
yes I did
Lemme check it rq
ok, it's because i us e this :
if context.before and #context.scoring_hand == 3 then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain```
for if a scoring hands coontains 3 scoring cards
i don't use perms and it does the same job as your should do
would it save the previously obtained mult though
the idea behind this deck is "gain permanent +2 mult after discard"
yes it does
i fell like it's easiet imo
k I'll try it when I get back on my pc I gotta go offline now
'k byeeeee
So youre tryna get the amount of jokers you have from your mod total right?
yeah
have all mu jokers in one pool
my*
then make it so that one of my jokers does X25 mult for every card in this pool in the joker space
Wait, so all your jokers total? Or joker you have just in the joker area?
? let me re explain
the jokers does X25 mult for every joker in the pool you own (during game not in collection)
the poll has every card from the mod
Heres what i have for a similar joker i have so you can just have reference if you want
SMODS.Joker{
key = 'Grooph',
loc_txt = {
name = 'Grooph',
text = {
'{C:attention}Shape{} Jokers give {X:red,C:white}X1.3{} Mult.'
}
},
atlas = 'Grooph',
pools = { ["Shape"] = true, ["Batrocities"] = true },
rarity = 2,
cost = 7,
pos = {x=0, y=0},
unlocked = true,
discovered = false,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
config = { extra = {xmult = 1.3} },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function(self, card, context)
if context.other_joker then
if (context.other_joker.config.center.pools or {})["Shape"] then
return {
xmult = card.ability.extra.xmult
}
end
end
end,
}
Did you understand what i did for mine?
yes and no, i understand you code but it doesn't help me understand what i should do on mine
Your issue here is that card.ability doesn't exist because """card""" (back) doesn't get an ability field. You need self.config.extra.mult instead. That's the only one available to decks, for whatever reason.
ena mentioned
Copy the context that i have maybe?
That might be what you need
calculate = function(self, card, context)
if context.other_joker then
if (context.other_joker.config.center.pools or {})["deity"] then
return {
xmult = 25
}
end
end
end,
}
Might this work for your calculate?
Lemme see ur code
sooo uh it doesn't crash anymore but it retriiggers other "deity" cards and does X25 at each retrigger
Just a ss of the code here is fine
... x)
Is that not what you wanted?
no, i just want X25 per "deity" not a retrigger
OH
calculate = function(self, card, context)
local deitycount = 0
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.center.pools and G.jokers.cards[i].config.center.pools.deity then
deitycount = deitycount + 1
end
end
card.ability.extra.xmult = deitycount * 25
if context.joker_main then
return {
xmult = card.ability.extra.xmult
}
end
end,
Might that be it? Sorry it took a while im doing this on phone
Can i see code for line 279?
Oh mb do you have a config variable for xmult?
nope, that's what i thought
to be clear, like this ?
Yes but you can also put it in a line like this: config = { extra = { xmult = 25 }},
Makes it cleaner if you want
i know i just prefer like it for who knows why
Real
but i tested and the card just does not triggers now
Does it give the mult?
no, nothing it just stands here, menacingly
Send the entire joker ss including the atlas parts and stuff
SMODS.Atlas {
key = "li",
path = "li.png",
px = 71,
py = 95
}
--im working on this one :
SMODS.Joker {
key = "li",
loc_txt = {
name = "{C:dark_edition}The Abrupt One",
text = {
"{X:mult,C:white}X25{} Mult",
"for every filled joker slot",
"{C:inactive}This joker included",
"{C:dark_edition}A voice, acient and vast, booms across the void,",
"{C:dark_edition} echoing through the herts of all who hear",
}
},
atlas = "li",
pools = {["deity"] = true},
soul_pos = {x = 0, y = 1},
rarity = "awak_ab",
pos = { x = 0, y = 0},
cost = 50,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
config = { extra = {
xmult = 25,
},
loc_vars = function(self, info_queue, card)
return { vars = { G.jokers and math.max(25, (G.jokers.config.card_limit + #G.jokers.cards) + #SMODS.find_card("j_awak_li", false)) or 1 } }
end,
calculate = function(self, card, context)
local deitycount = 0
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.center.pools and G.jokers.cards[i].config.center.pools.deity then
deitycount = deitycount + 1
end
end
card.ability.extra.xmult = deitycount * 25
if context.joker_main then
return {
xmult = card.ability.extra.xmult
}
end
end,
}
}
-- Deity joker pool
SMODS.ObjectType({
key = "deity",
default = "j_awak_deity",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
end,
})```
whata else is needed ?
and i misspelled "ancient" in the desc x)
Wait whats the return in the loc_vars supposed to do?
NOO CURSE YOU THUNK
Your config is missing a second }
on an ancient version, without it it wouldn't trigger
OH
nope, it's at the end of the joker
maybe it was sorry i got lost
That just means a shitload of your properties are also stuffed in your config. Pretty sure they're not supposed to be there.
Like here i have 2 “}” in the end
Real
Game was prob wondering why there was so much properties
x)
Whats happening now?
i feel like sisyphus
and note : in the ss i haven't updtated the desc don,t follow what it says
yh
Ok
How bout try checking if the joker main is even working
?
We can tell then if its a problem on the context or not
Like instead of card.ability.extra.xmult just put 25
Only the return in the joker_main
Whats on line 283
card.ability.extra.xmult = deitycount * 25
Send new code rn
what's the suggested set up for developing a mod? I want to be able to update the mod while developing without restarting the game (im on mac so I have to run steammod with run_lovely_macos.sh). What's your workflow in mod dev?
SMODS.Atlas {
key = "li",
path = "li.png",
px = 71,
py = 95
}
--im working on this one :
SMODS.Joker {
key = "li",
loc_txt = {
name = "{C:dark_edition}The Abrupt One",
text = {
"{X:mult,C:white}X25{} Mult",
"for every deity owned",
"{C:inactive}This joker included",
"{C:dark_edition}A voice, ancient and vast, booms across the void,",
"{C:dark_edition} echoing through the herts of all who hear",
}
},
atlas = "li",
pools = {["deity"] = true},
soul_pos = {x = 0, y = 1},
rarity = "awak_ab",
pos = { x = 0, y = 0},
cost = 50,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
config = { extra = {
xmult = 25,
}
},
loc_vars = function(self, info_queue, card)
return { vars = { G.jokers and math.max(25, (G.jokers.config.card_limit + #G.jokers.cards) + #SMODS.find_card("j_awak_li", false)) or 1 } }
end,
calculate = function(self, card, context)
local deitycount = 0
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.center.pools and G.jokers.cards[i].config.center.pools.deity then
deitycount = deitycount + 1
end
end
card.ability.extra.xmult = deitycount * 25
if context.joker_main then
return {
xmult = 25
}
end
end,
}```
in smods how do i define my own pker hand parts like i want one that is like the first 4 cards are a flush(like with four fingers) and the last 4 cards are stright(like with four fingers) but i dont know where and how to define the part:
SMODS.PokerHandPart {
key = "gay"
func(hand)
}
SMODS.PokerHand {
key = "Gay Flush",
mult = 10,
chips = 110,
l_mult = 5,
l_chips = 45,
example = {
{ 'S_K', true },
{ 'S_J', true },
{ 'S_T', true },
{ 'S_9', true },
{ 'H_8', true }
}
}
...... Gay||Penis|| mod replace the 'straight' in 'gay' look at it maybe
that just changes the name as far as i know
Dawg i cant help you now, im tweaking i cannot see anything wrong
me neither T-T
bro how define the fuckiung part hand thing (also the name doesnt really matter)
whats the error
This
and the card does not trigger back when it won't crash
This^2
the art isn't right yet appearently, but I just made this amazing jonkler
283, i know the error on this one and corrected it
Jimba
they mean what's the line in the code
Ah
card.ability.extra.xmult = deitycount * 25
I haven't actually tested if it works :(
Imma install 'debugplus' to try
Very helpful mod
try putting everything in calculate that's outside the joker_main check inside the joker_main check
N' the goat
? my french ass is lost i don't understand what you mean
Put everything outside of the joker_main, inside the joker_main
From deitycount to 25
wait, you can't add jokers with it??
u werent lying huh
u can, press 3 on them in the collection
ah thanks
Also hold tab for stuff 🙂
:((
nope, only the stuff inside calculate
ah alright
ooh and press "/" to run code such as eval to check vars inside the game
Dont add calculate, thats still outside of joker_main
Code?
like this ?
ah, I've edited it from SampleJimbos which I found somewhere
SMODS.Joker{
key = "jimba", --name used by the joker.
config = { extra = { chips = 30 } }, --variables used for abilities and effects.
pos = { x = 0, y = 0 }, --pos in spritesheet 0,0 for single sprites or the first sprite in the spritesheet.
rarity = 1, --rarity 1=common, 2=uncommen, 3=rare, 4=legendary
cost = 2, --cost to buy the joker in shops.
blueprint_compat=true, --does joker work with blueprint.
eternal_compat=true, --can joker be eternal.
unlocked = true, --is joker unlocked by default.
discovered = true, --is joker discovered by default.
effect=nil, --you can specify an effect here eg. 'Mult'
soul_pos=nil, --pos of a soul sprite.
atlas = 'jimba', -- atlas name, single sprites are deprecated.
calculate = function(self,context) --define calculate functions here
if card.debuff then return nil end --if joker is debuffed return nil
if context.joker_main and context.cardarea == G.jokers then
return { -- returns total chips from joker to be used in scoring, no need to show message in joker_main phase, game does it for us.
chips = card.ability.extra.chips,
colour = G.C.CHIPS
}
end
end,
loc_vars = function(self, info_queue, card) --defines variables to use in the UI. you can use #1# for example to show the chips variable
return { vars = { card.ability.extra.chips }, key = self.key }
end
}
yes
key = self.key is also not needed
oh the problem is that you're missing an argument in calculate
it should be (self, card, context)
i recommend checking this for examples btw
https://github.nh6574.com/vanillaremade
thank you ^>^
time to add the 7 or 8 orso other ideas I had
there should only be one that's actually like, complicated
bump
does that work
did you restart the run before testing?
i restarded now and it triggers but only does X25 even though other "deity"s are here
I wanted to call one of my jokers 'medium'...
yeah because you hardcoded it to 25 to test, change it back to card.ability.extra.xmult
ok now it works just fine, thanks you so much N it has been 2 hours i/we are/am on it
Hi N how fares the illness
😞
:))
Good job, i completely forgot about restarting the run

oh yeah that was it, amazing
how do you get a cards display name from its center
it's very blurry but I'll fix that later yay
also the x1.5 isn't coloured for some reason
localize{type = "name_text" set = center.set, key = center.key}
wait im stupid whats center.name then
I'll show these in a thread now to not flood this channel :v
it's the english name of the joker for vanilla and the key without the prefixes for mods
i see
In the text make the x1.5 become {X:red,C:white}x1.5{}
ah thanks
I had "{C:xmult}x#1#{} Mult"
why is it crashing when i open up the collection??
SMODS.Atlas({
key = "LetsGoGambling",
path = "letsgogambling.png",
px = 71,
py = 95,
frames = 40,
atlas_table = "ANIMATION_ATLAS"
}):register()
...
atlas = "LetsGoGambling",
pos = {x=0, y=0},
...
Yes yes thats good
No mb i ment the #1#
it didn't work though
{X:mult,C:white}
I need to be more specific
oh yeah that's what the example mod did :v
What #(no.)# does is it represents what the return is on the loc_vars
That prob does not makes sense
try removing the :register() part
is this for a blind?
how do you scale these images without making them blurry??
What do you use for drawing?
a joker
oh jokers don't take animation atlas
uhh some random ass program named Krita
sad
Im not the drawer for my mod, im just the coder. My friend uses pixilart
wait then how are some jokers animated
they manually change sprites in update
can you reload mods without quiting and restarting the entire game??
no
alright
I wish 
if you're not doing it already you can press alt+F5 to restart the game
I don't think I can because I'm on Linux but I'll try
i get a crash here and i know its because of my checking lug, but im not sure why
oh, it does work!!
lug[1] and ...?
so lug[1] instead?
but the crash only started when i started search through the results from the find_card
yeah but it has to be at the beginning of the check
so this should be better, but i dont think this fixes my crash
remove the not
but this checks that you dont have luggage card and that luggage card has already been drawn, then if you have no hand size game ends
ok then remove the not from around lug[1] and keep it for the other check
yeah i saw the error i think this should fix that problem
I'm trying to make a joker that makes wild cards immune to debuffs, so I'm looking at the extra credit mod as reference
But I have absolutely no idea how this joker functions
No calculate?
I feel like I'm missing something obvious
this means that the implementation for this is somewhere else
like a hook
something that can't really be done via a mere calculate function
since its something related to debuffs, it might be a hook related to Card.set_debuff that you're looking for
if you want something simpler, "can't be debuffed by blinds" can be done through calculate easily
How would I do that
my thing?
Yes
@red flower i finally got all my stuff working, so my change is now implemnted with big thanks to you!
I'm trying to cross reference different mods to see how they remove debuffs and all of them do it in a different way lol
And all of them are pretty confusing
if context.debuff_card and next(SMODS.get_enhancements(context.debuff_card)) then
return { prevent_debuff = true }
end
If I want to only remove debuffs from wild cards do I make it (SMODS.get_enhancements(context.debuff_card)["m_wild"])
I'm just looking at other stuff with the get_enhancements
and SMODS.has_enhancement(context.debuff_card, "m_wild")
does somebody know how to have a joker add joker slots??
looking at how the negative edition works hasn't helped me much, because the adding a joker slot doesn't seem to happen there
where did this context come from
i disappeared for one day, surely i didnt miss anything
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
G.jokers:change_size(1)?
ahhh thanks
this is from blind calc
is there a list of all things like add_to_deck and remove_from_deck and calculate??
thanks ^>^
how do I in such a case make sure you can still actually buy it with full joker slots -_-
I know Cryptid has a similar joker which adds 4 joker slots, but the code there doesn't seem to help me with that either
and I couldn't find an event, or whatever those things are, which are triggered when a card is attempted to be bought
otherwise I would put the 'add joker slot' thing at that event
you need to hook G.FUNCS.check_for_buy_space iirc
ah I'll look it up
ah I think I figured it out
yeah, I looked there already
but the code for being able to buy is this
-- These allow jokers that add joker slots to be obtained even without room, like with Negative Jokers in vanilla
local gfcfbs = G.FUNCS.check_for_buy_space
G.FUNCS.check_for_buy_space = function(card)
if
(card.ability.name == "cry-Negative Joker" and card.ability.extra.slots >= 1)
or (card.ability.name == "cry-soccer" and card.ability.extra.holygrail >= 1)
or (card.ability.name == "cry-Tenebris" and card.ability.extra.slots >= 1)
then
return true
end
return gfcfbs(card)
end
in overwrites.lua
not jokers.lua
Yippe its me again! Big and small question: How can i have two souls hover over a card (not specifically joker, i mean an ui object)? I think this would involve adding a new draw_step but I'm unsure
Edit: I would also like to know if its possible to adjust the speed of both hovering arts
i believe yes it would need to be draw step
hmm
you probably have to create a new children
and UI definition for it if you're doing UI shenanigans
Guys, I wanted to know if anyone here is interested in making a mod just to change the deck's skin to the Rain World theme, I can do the art, but trying to make the mod I saw that it's not my area
Here is an example of what the rest of the art will look like:
And sorry for the long text
@tranquil gull
cute ^>^
do you just want to change the art, nothing else about the game??
SMODS.Back{
name = "Scarlet Deck",
key = "scarlet",
config = { discards = 3, extra = { mult = 2 } },
atlas = "scarlet",
pos = {x = 0, y = 0},
loc_vars = function(self, info_queue, back)
return { vars = { self.config.discards, self.config.extra.mult } }
end,
calculate = function(self, card, context)
if context.discard and context.other_card and not context.other_card.debuff then
self.config.extra.mult = (self.config.extra.mult or 0) + self.config.extra.mult
return {
extra = { message = localize('k_upgrade_ex'), colour = G.C.MULT},
}
end
end
}
does anyone know what this crash is
Today's proposal is simple lol
well, to me it's not because I'm just making my first mod :v
and I'm getting stuck on the simplest thing
how can i make sure my custom G.GAME var is saved on quit out? it doesnt seem to be saved currently
But yeah, I was thinking about making a deck with vanilla characters first, then if it turns out well I can make another deck with downpour characters.
if I knew how to do it I would
maybe I'll know in a week and can help then, I assume it takes a while to make the art anyway
hmm, there's three vanilla characters and four suits.. and five downpour and four suits...
and one watcher :v
For the first deck, I was assuming about 13 days to make it.
so youre making a texture pack?
are you putting the watcher with the vanilla maybe??
spades: watcher
hearts: hunter
diamonds: monk
clubs: survivor
something like that??
Yeah, Because vanilla had the watcher as an arena character, he just didn't have his DLC skills.
anybody know why this doesnt do anything? ``` calculate = function (self, card, context)
if context.selling_self then
card.ability.extra.enabled = false
print'sold'
end
if card.getting_sliced then
print'bye'
end
end,```
Read my mind
@ruby moon read into malverks documentation for how to make texture packs
No, where is that document? Is this on the "Modding" channel?
local gfcfbs = G.FUNCS.check_for_buy_space
G.FUNCS.check_for_buy_space = function(card)
if
(card.ability.name == "moderate_jonkler")
then
return true
end
return gfcfbs(card)
end
is there something obviously wrong with this???
when I just let it return true always, it does work to let you buy anything
but like this, it doesn't work??
I had this like too
key = "moderate_jonkler", atlas = 'moderate_jonkler', name = 'moderate_jonkler',
I also tried with 'key' instead of 'name'
also with 'rarity'
its a seperate mod made to handle texture packs, there should be documentation in #1209506514763522108 and on github
eval card.ability.name in game to check
also why not just check for the card.config.center.name?
I'll take a look then, would it be like a mod to put and manage deck skins?
because I'm completely stumbeling into this and have no idea what I'm doing
basically, its made to help people with little coding experience and to make a good ui and ux
well check for what i gave you instead
ability.name doesnt exist unless you declare it i dont think
hey. checking in again
Ok, Can I tag you if I need extra guidance?
sure
trrying to check the atlas position of a joker's sprite which i change over time
Thanks =]
calculate = function(self, card, context)
if card.children.center.sprite_pos == {x = 0, y = 1} then
print("plink")
end
if context.cardarea == G.play and context.individual and card.children.center.sprite_pos == {x = 0, y = 1} then
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
return{
message = "blink",
chips = card.ability.extra.mod1,
card = card
}
end }))
end
end
so far ive tried this but it did not work
is there something i'm missing?
does sprite_pos check for atlas position or the actual position on the screen?
how do i make sure the joker i created at the end of the round doesn't scale in that round?
okay so it DOES check the table
whats the code
so it checks for atlas pos?
if context.end_of_round and context.game_over == false and not context.blueprint then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.plus_mult
SMODS.calculate_effect({message = '+2 Mult', color = G.C.MULT}, card)
end
this is the scaling part.
@placid star Just one question, to apply this mod there is no other way other than using steamodded and lovely, right?
unless you want to replace base game files directly with yours or create your own mod injector
so no
Ok, thanks 🫡
i think i might have got it actually
alr sweet
still triggers. creating part is a liitle convoluted but basically i use SMODS.create_card to create max one card per round
yeah main_eval makes sure it only triggers once per round so its a general fix, as for the other you could put the card creation in an event
how do i check how many cards with a suit there are in deck
local suits = {}
for i,v in ipairs(G.playing_cards) do
table.insert(suits, v.base.suit)
end
return suits
end```
this is my poll suits func
it doesnt like the "JJOK"
like i said its my function, that's from my mod. jjok is the prefix so I stored it in my mods functions
in my mod is have jokers that retrigger other (not blueprint)
then what do i do
well it depends, are u going to make it a function or use it once
a function.
im making a joker add a random enhanced card with a random rank and the suit being the least amounts of cards with a suit.
well then outside of the joker do
function poll_suits()
--func code here
where are the decks stored within the gamedata?
i want to get the sprites for every deck but i dont want to just make a big list with all the atlases/pos combos for each deck
So I have this Joker that checks for the number of formed Pairs in a played hand
I coded it like this, which works fine for Vanilla, but I feel it's dubious if I for example. install Cryptid and play an Ultimate Pair
How can I code it so that it dynamically checks the number of formable pairs, instead of hard-coding the check?
And it's gone 😎
for some reason this is crashing, can someone help? ```lua
SMODS.Shader{
key = "filteredshader",
path = "filtered.fs"
}
SMODS.Edition{
shader = "filteredshader"
-- theres the rest of stuff like name, key etc but they are irrelevant i think
}
I feel like I missed something
Begone spambots
everyone died
Is this what the afterlife is like?
manually
:get_id() gets a cards rank
Oh cool, so I get a list of all played cards, and check how many ranks have more than two?
Pretty much yeah
note negative ids mean no rank
Since you're counting any number of a kind as one pair, that's enough
Nice
I wonder why Cryptid didn't come up with something like this first, they love Pairs
Vanilla definitely doesn't have enough love for two pair and full house
im trying to get my joker to do stuff when its destroyed, but doing it like this doesnt do anything and ive got no clue why, does somebody know whats going wrong here? ```SMODS.Joker {
key = 'kamikaze',
loc_txt = {
name = 'Kamikaze',
text = {
"When this Joker is destroyed, create a copy that gains x1.5 Mult (Currently x1 Mult)"
},
},
config = {extra = {Xmult = 1, Xmult_mod = 1.5, enabled = true}},
rarity = 2,
atlas = 'CosmicTomfoolery',
pos = {x=4,y=1},
cost = 6,
blueprint_compat = true,
loc_vars = function(self, info_queue, card)
return {
vars = {}
}
end,
calculate = function (self, card, context)
if context.selling_self then
card.ability.extra.enabled = false
print'sold'
end
if card.getting_sliced then
print'bye'
end
end,
}```
Are you able to get the config parameters from another mod using SMODS?
How do I change base chips & mult when a hand is played?

Nvm think I found it #💻・modding-dev message
can someone help me with this
holy shit coding your own .fs file? thats a feat
no, someone else im making the mod with did it
but they sent it to me and shader isnt shadering
Aren’t you the person who always stuff doesn’t work for for some reason 😭
Damn
Cards don't call calculate when destroyed
in this case just use the remove_from_deck function
my issue with that is that also happens when the card is debuffed which is not the intended functionality
there's an argument you can check for that, from_debuff
already checked, changed the key three times, copied the entire file path and deleted what wasnt necessary, changed the shader key in the edition to "foil" to see if it set the foil shader (it did)
How do I modify base chips & mult? This code doesn't do anything to chips and sets mult to 0, even though it works perfectly for the before scoring display.
need some checking for my code
this is the folders so it isnt that
the card doesnt retrigger when scored, any ideas? (ignore the vol things)
No that’s correct
i hate discord
@formal quest
😭damn
@red flower okay so i get this error on saving and quitting, im assuming its because when i quit and reload G.GAME.luggaged_card doesnt get saved and is instead stored as "MANUAL_REPLACE", so my question is how would i save G.gAME.luggage_card
i think you need a cardarea but im not sure
not the key either, so probably just my computer hating me
the card area only exists as a main_end node in the loc vars of the joker
i mean making a global one but if the card is in deck it doesn't work
no idea, never done something like that
the key has to have the same name as the file i think, without the .fs
Works great!
ill try it without declaring lugagge_card first
hm no crash
so it must be something to do with that...
i'll try

still nothing
bumpity bump
repetitions have to be in context.repetition
i dont think you can retrigger cards in context.joker_main
yeah
or retrigger_joker_check (i think?) for joker retriggers
what does ur shader file look like
oh oka
the shader itself does work, the person who made it tested it and it was working for them
i also asked them if it needed variables and they said no
okay
Am I modifying it wrong somehow? This isn't changing it
honestly i think the solution is to save luggage_card on saving and reloading but idk how to do that
what's the context check
if context.modify_hand then
that seems like it should work
Here's the entire calculate function
oh i think i see why, what's the objective?
i tried doing this but clearly im doing something wrong here remove_from_deck = function (self, card, from_debuff) if from_debuff == false then print'destroyed' end end
Add the base chips & mult of contained hands
do if not from_debuff then
in the played hand?
Yes
you dont need get poker hand info then
replace contained with context.poker_hands
thanks a bunch
for anyone in the future with an issue of variablse not "saving" on quit/save and reload, tables in G.GAME dont seem to be saved
incorrect?
are you trying to save a card object
cyclic tables don't get saved, like cards
Hi guys any guide to mod "Balatro" in the title screen?
yeah thats kinda what i assumed, sso i just saved the .playing_card id instead
what are you trying to do
Wanted to change the game's name to El balatro, for fun
I have experience with Photoshop so if it's not a font-like thing i can do the graphic too
Thanks ^^
hiya! does this code suffice if i don't want Zodiac cards to appear at all, if the option is disabled?
does anybody know an easy way to do this
oh also, is there a way to disallow the player from selecting a particular deck?
Anyone know why this doesn't draw with editions? (excluding foil.)
draw = function(self, card, layer)
if card.config.center.discovered then
if (layer == 'card' or layer == 'both') and card.sprite_facing == 'front' then
local scale_mod = 0.05 + 0.05 * math.sin(1.8 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL)) * math.pi * 14) *
(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 3
local rotate_mod = 0.1 * math.sin(1.219 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL) * math.pi * 5) * (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 2
local image = Sprite(0, 0, 71, 95, G.ASSET_ATLAS["willatro_WillatroOrgans"], {x = 1, y = 0})
image.role.draw_major = card
image:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
image:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
end
end
end
i dont think consumabletypes have in_pool
Well that works pretty well but now I'm getting some weird behavior. The mult of the played hand gets added twice but not chips.
i think you need to use G.GAME.phanta_zodiac_rate (this key should be all lowercase)
not that it matters much anyway ^u^ they can't appear in the shop
rightright
where would i put that?
remove the update_hand_text line
if i'm using a config to disable them
maybe
you would probably need something in update that checks the config all the time
rightright ^^
unless the ui element you use in the config has a callback function
it doesn't have one
It doesn't just appear to get added, it actually does. The update text line was unnecessary but it also doesn't fix the behavior by removing it. I probably need to update the if statement inside the loop to filter out the played hand
oh yeah
How do I check for played and contained hands?
context.scoring_name is the played one
bump
i think i figured it out
this will log your last played hand after the first hand you scored with the joker
then each subsequent hand has the previous hand as a check to see if it returns xmult
ahaha i did it i'm so good
i dont recommend using global variables, specially not with generic names
you should use card.ability.extra.previous_hand
would that be effectively the same thing?
yes
cool cool
@red flower im looking for a function that can be called in a mod that is able to play the current hand. if the current hand is ♠A, ♣A, ♦K, ♥Q, ♣Q, ♣9, ♠6 ♥5, I'd like to call a function to perfom the action of discard ♣9, ♠6 ♥5. I know which card I want to discard/play but I cannot find a function in smods to perform this action in game.
how does the new additive probability work?
it looks like these are just objects and not actions: play hand and discard
It works now, thanks. I could make it seamless and make the display show the extra chips and mult between playing and scoring start, but I might make it like a reverse flint instead and show it with an animation before scoring. Can I do that by bringing back the update text line with some different arguments?
This is The Hook which discards specific cards in hand
I'm going to need the specific use case for this to understand this.
I think so but I'd need to test it to tell you exactly how
Im trying to dev a simple bot and I want to discard cards and play hands. nothing to with the hook blind.
ok, then what I sent is what you need for discards, the function is in there
let me check to play a hand
G.FUNCS.play_cards_from_highlighted
oh ya @red flower does this look okay? the base rate is 0 anyway, but it's in case someone wants them to appear in the shop
i've made sure that the cache exists, btw
that's what i would do yeah
awesome ^u^
oh ya there's still Today & Tomorrow Deck
lemme see if the documentation has a way to disable decks
dfkjngjkdfkjgnd backs can have in_pool
very weird
me buying a deck in the shop
Is there a list of vanilla sound IDs?
do playing cards have a unique id that NEVER changes even if other cards are destroyed
bump
What's the id of the planet upgrade sound?
I think it's tarot1
is there a way to make like an instant win? like if a condition is met it just wins the game
playing_card seems to jump around alot, meaning i cant properly store a card unless i store the WHOLE card as a table
ya aware ^^ the fix worked
_ _
Also, in most cases, for hooks, unless you need arguments from it, use ...
Who knows which new arguments will appear in next balatro update
Better be ready
Wait, why you're using game update for setting game variables
YourMod.current_mod.reset_game_globals = function(run_start)
-- set them here
end
Maybe it's not 100% covers yor needs, but you' better check it out
is there a way i could define this globally though (separate from the joker). so i could keep track of the previous hand before you get the joker?
G.GAME.modprefix_previous_hand
I recommend the modprefix to avoid conflicts
where would that be nested
you can just use it directly
Prefix everything which stored in globals, including G.FUNCS and localization keys 
ok!
?
Hello
I was making a joker that changes the hand size
I copied what is made with the vanilla remade:
SMODS.Joker {
key = "juggler",
blueprint_compat = false,
rarity = 1,
cost = 4,
pos = { x = 0, y = 1 },
config = { extra = { h_size = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_size } }
end,
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(card.ability.extra.h_size)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size)
end
}
But I have an internal counter that will change multiplicatively the hand size this so I wrote :
SMODS.Joker {
key = "scarabHand",
blueprint_compat = false,
rarity = 1,
cost = 4,
pos = { x = 0, y = 0 },
config = { extra = { h_size = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_size * G.GAME.pharahos_scarabs } }
end,
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(card.ability.extra.h_size * G.GAME.pharahos_scarabs)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size * G.GAME.pharahos_scarabs)
end
}
The problem is that the initialisation of the hand size and the value of the variable are only made when the joker spawn
After that, any changes will not affect thoses fonction
Can I add them in a "if context then" to refresh theses values ?
I know that https://github.com/WilsontheWolf/DebugPlus can show a log console in the game. is it possible to do it simply with just smod?
you can probably use context.drawing_cards to update hand size dynamically
Any idea how can i make face cards unable to be drawn from deck
Hey. Where is the display text joker name stored in its card? Im using center.key, but this dosen't return the name for modded jokers
is there anything wrong with this if?
Where can I found the args for this ?
dosen't seem since we have no contexyt
i mean syntax wise
is there somehow a way to make a joker that instantly wins the run?
yes
win_game()
well... whats wrong with it?
ooh i mean its correct
It is not documented here that is why I ask
oh and is it somehow possible to remove the endless mode? (its for a joke)
print out context when the calculate function happens
delete_run maybe?
yeah it's not, context.amount is the amount of cards about to be drawn and you can return cards_to_draw to draw extra cards
you might need to use those, but mainly I was suggesting it because that context is called before cards are drawn to hand
/bump
so is there any other way to do that?
well what did I do wrong then?
