#💻・modding-dev
1 messages · Page 366 of 1
which restarts the game, but doesn't tell your friends
alt+f5 works too now iirc
looking at the code i dont think so
without patching that is
you can copy the overlay_menu code and take out that part
yummers
I got debugplus
you can use the watch command for the config ui and shaders and maybe something else
but for the most part you need to restart
as far as i know at least
@wintry solar Nope, still cause issue
I wonder if it's because of set_ability but that'd be weird
Alrighty
I just gotta find a solution to the VC undefined stuff
maybe try opening the files in the lsp folder?
Oh it seems like it's because of set_ability, I temporarly removed its call and the cards don't get debuff
Btw I don't call set_ability on the playing cards, it's on a Joker
Are people making these Wiki pages by hand?
Hello?
I think they use scripts to fetch some data
I don't know if you pinged me
the wiki discord links to some tools to help with it
Hey, thanks for the tip on how to render shaders on a deck! I was able to implement it and it looks fantastic!
but apperently still have the error issue
ALT+F5 is a new keybinding and the fastest way to restart the game. If you're changing shader code, you can use watch shader <filePath to reload it in real time. But for the lua code, that's only patched in on start
LSP?
can someone help me with this?
well damn
sad
very sad

Types? What is this?
Can you show what the code is?
this is kinda annoying ngl
hmmm
you better actually simulate hrt gameplay here
is it possible to change the order of jokers without needing to shuffle the code around?
no way... hrt joker....
is there a way for a joker to check what position it's in (how many jokers are to the left of it in my case)?
check G.jokers.cards, see which card is the joker
check how CardArea:shuffle() rearranges jokers
I think I got rid of the crash now I just need to figure out how I can have the joker select the rnadom playing card.
I've actually used watch when making this menu, save for moving the function to an external file and using watch on it instead.
Okay time to add pages to my config 
please return with your findings, i am greatly interested in this functionality
how do i put jokers code in another file so it will be easier to understand mod's structure?
Man this alredy implemented in vanilla collection
yeah but vanilla code is incomprehensible 😭
im not sure any ui code is comprehensible
i was sorta able to figure it out after someone showed me i should be doing column/row wrapping alternation
Just set G.UIT.R or G.UIT.C randomly until it works
My certified strategy to work with Balatro UI
steamodded wiki page on ui is apparently decent, but it doesn't help me 
take_ownership of glass and change the function
Nah the glass check is hard coded
oh
so there isnt a way to prevent it from breaking?
There is.
You have to patch the check
whats the check
I tried to do something about the playing card code but I ended up this:
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.before and context.full_hand then
local selected_copied_card = false
local copied_card = nil
local copy_num = 0
for i = 1, #context.full_hand do
local card_select[i] = context.full_hand[i]
copy_num++
end
end
if not selected_copied_card then
if copy_num > 0 then
copied_card = card_select[math.random(copy_num)]
selected_copied_card = true
else
copied_card = nil
selected_copied_card = false
end
end
end
if context.press_play then
if copied_card ~= nil then
local copied = copied_card
card.ability.extra.copied = copied
print("copied!")
else
card.ability.extra.copied = nil
end
else
if card.ability.extra.copied then
local ret = SMODS.blueprint_effect(card, card.ability.extra.copied, context)
if ret then
SMODS.calculate_effect({message = 'Copied', colour = G.C.GREEN}, card.ability.extra.copied)
print("result")
return ret
end
end
end
end
it gave me an errror on load
I tried many times
I don't know how I ca nget it to work
how would i make a joker that gains x0.25 mult per one of these jokers obtained? you dont need to keep them to get the mult, just have them in any of your joker slots and it gains x0.25 mult
if context.card_added and table.contains(bananakeys, context.card.config.center.key)
function table.contains(table, element)
if table and type(table) == "table" then
for _, value in pairs(table) do
if value == element then
return true
end
end
return false
end
end
I'm somewhat still waiting. I'm sorry if I was a bit impatient
eh not really im gonna try to make a joker that has multiple sprite states
Do I have to do it manually?
a horse wins (is chosen as the new effect) after either a blind or ante
i want to figure out how i can change joker sprites and such
On the same atlas?
it does make sense for it to be on the same atlas
card.children.center:set_sprite_pos({x =, y =})
(of course to stay true to hrt, the horse winning is weighted, jovial wins the most, cyan rarely wins)
ah cool thanks
@daring fern I don't know if you can help me and I'm sorry to bother
right now I came up with this but I had an issue.
Are you trying to copy the effect of a playing card?
Yeah
You can't do that unless this is an enhancement?
Or a seal?
Or anything that goes on a playing card?
the description of the card is this:
"Copies the Effect of a Random Played Card Per Hand"
it doesn't ay anything about a enchancement
What type of object is it?
is it? i remember someone else asking and I tried the take_ownership thing and it worked fine
smods itself does that too
object? you mean the playing card or enchancement or a special card?
The type of the card that has that description?
So it's a Joker?
yeah.
a joker that can copy a played card
no mention about seals or enchancments
You can't have the joker be a playing card, you can retrigger the card though?
not sure if that works. I was trying to do the same thing like how the previous card actually copies a random joker
You could copy what it would do manually but that would take a lot of work I think?
that's the issue.
I mean I tried to do the same method as last time
but somehow
I at first thought I got it to work until that.
Try doing eval_card(card.ability.extra.copied, context) instead of blueprint effect.
ok.
and where do i put that? tried this but that doesnt work
Anywhere but outside of everything.
tried that, and it still said this:
Code?
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.before and context.full_hand then
local selected_copied_card = false
local copied_card = nil
local copy_num = 0
for i = 1, #context.full_hand do
local card_select[i] = context.full_hand[i]
copy_num++
end
end
if not selected_copied_card then
if copy_num > 0 then
copied_card = card_select[math.random(copy_num)]
selected_copied_card = true
else
copied_card = nil
selected_copied_card = false
end
end
end
if context.press_play then
if copied_card ~= nil then
local copied = copied_card
card.ability.extra.copied = copied
print("copied!")
else
card.ability.extra.copied = nil
end
else
if card.ability.extra.copied then
local ret = SMODS.eval_card(card.ability.extra.copied, context)
if ret then
SMODS.calculate_effect({message = 'Copied', colour = G.C.GREEN}, card.ability.extra.copied)
print("result")
return ret
end
end
end
end
this is the code now.
wait huh? but that wouldnt make a joker gain xmult right?
No? You need to put the function outside of everything.
you're defining a new function
table.contains doesn't work by default for some reason I don't think.
wouldnt i need to put the code in the calculate funcion for a joker to gani xmult?
oh
but then how do i make it gain xmult when the player obtains one of those jokers?
@daring fern Do you have any idea what could be the cause? I feel like it has to do something with the arrays?
how would i apply the Chip flame effect to a soul sprite?
Lua doesn't work like that.
i wish
Ah. I think I might have slightly forgot but yeah, I never often to work around iwth lua a lot but I am personally good with Game maker and of course I'm also trying to learn on how lua worked
alright I updated the code and I still get this:
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.before and context.full_hand then
local selected_copied_card = false
local copied_card = nil
local copy_num = 0
for i = 1, #context.full_hand do
local card_select[i] = context.full_hand[i]:get_id()
copy_num += 1
end
end
if not selected_copied_card then
if copy_num > 0 then
copied_card = card_select[math.random(copy_num)]
selected_copied_card = true
else
copied_card = nil
selected_copied_card = false
end
end
end
if context.press_play then
if copied_card ~= nil then
local copied = copied_card
card.ability.extra.copied = copied
print("copied!")
else
card.ability.extra.copied = nil
end
else
if card.ability.extra.copied then
local ret = SMODS.eval_card(card.ability.extra.copied, context)
if ret then
SMODS.calculate_effect({message = 'Copied', colour = G.C.GREEN}, card.ability.extra.copied)
print("result")
return ret
end
end
end
end
Lua still doesn't work like that.
You have to do copy_num = copy_num + 1
oh.
also are arrays having the same issue?
does arrays in lua work like this?
local card_select[i] = context.full_hand[i]:get_id()
though
huh.
how come I've been getting this about the arrays
cause the 95th line was this
local card_select[i] = context.full_hand[i]:get_id()
no, you need to initialize the array first
how can I do that or how exactly?
I'm still learning if any too
It's saying the error is near it.
local card_select = {}
-- loop
card_select[i] = context.full_hand[i]:get_id()
i havent seen your code tho
my whole code?
yeah idk what youre doing but local card_select[i] is wrong
yeah just delete the local
since when did this?
ok
also doing card_select[i] = nil is useless
in lua everything starts as nil, you dont need to define it like that
just only delete "local" on the thing?
i would delete this whole loop honestly
I already did that
Are all jokers in the pool by default / do I need to tell the game to add my joker? barring exceptions ofc
also local card_select without the []
bump
try doing the take_ownership thing, i think eremel is wrong :3
now it worked
they are
let me record
yeah so if i take ownership of it, the "odds" is in extra = 4, if i were to make the value "0" would it break the game since 1/0 is undefined
as in what do i change in the enhancement itself to make it unbreakable
is it a joker?
SMODS.Enhancement:take_ownership('m_glass', {
calculate = function(self, card, context)
if next(SMODS.find_card("j_modprefix_key")) then
return nil
end
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom('glass') < G.GAME.probabilities.normal/card.ability.extra then
return { remove = true }
end
end,
},
true)
```?
yeah
what somethingcom said
interesting, does this still give the mult though?
since return is set to nil
Yes.
yes thats in the config
take_ownership only overrides the parts you change
ahhh makes senes then
how do i credit you in my mod, do you want your username?
somethingcom515?
Oh maybe it got patched out 🤔
Waht the-? somehow it did try to make the playing card to say "copied" as well as the main joker to say the chips amount and the nenxt thing I know when I was purchasing th evoucher it crashed
What voucher?
a hand voucher
hold on I might need tostart a new run and then check
has anyone ever made a clickable text hyperlink, i want to add links to the mods in my credits but i dont want a button for each
like ingame?
yes
I know this is unedited but... not only that the card isn't triggered neither of the modded cards work.
for this
did I broke something?
Is SMODS.current_mod.config not a thing anymore?
it is but SMODS.current_mod only works on initialization of the mod
@red flower This accorded. This has never happened to me before.
Try testing the one that copies playing cards with a joker that interacts with playing cards?
im on very shitty internet sorry videos dont load lol
Then how do I access config in real time, though?
Sure thing.
how do i check if a card in a loop is the current scoring card?
i tried:
if scored_card =~ card then```
with self.card and context.card too but they all give errors
Set a global.
mom im on tv
i stole multi pages
:3
if scored_card = context.other_card?
and im very honored to be the one you stole from lmfao
-# even though the code is obviously ass
-# If it works, it works.
thanks :D
so true
o
I tried only one that is supposed to copy playing cards, it didn't trigger anything.
uppon start
but it did load in
just...
it didn't allow the copy
or triggers
wished I could've recorded it but honestly the card didn't do any triggers
@red flower I can try to record but of course this is the result.
Also there haven't been any crash when I started the new run. I was thinking maybe it's because the joker copy tried to copy the playing card copier card
i still havent read your code so idk what youre doing
@red flower
🤔 what was the explanation for that again
3 things:
local variables don't work between contexts. save then in the cards ability table
don't use math.random, use pseudorandom instead to account for the seed
do the cardarea check after the main context check
so what's the correct way now?
cause I know there's math.random but yeah.
No way now I have infinite space for keybinds 
I mean I'm trying to tihnk on what's the correct way for the code like this.
for your case pseudorandom_element(card_select, pseudoseed("seed")) gives you a random element
Hi everyone, Here, I'm using both the DebugPlus mod and EscapeExitButton.lua.
The lua functions properly, but the exit button also shows up when I hit "tab' for Debug Menu. Does anyone know how to fix this?
--- MOD_NAME: Escape Exit Button
--- MOD_ID: EscapeExitButton
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Add an "Exit" button into the "Escape" menu
----------------------------------------------
------------MOD CODE -------------------------
function G.FUNCS.exit_button(arg_736_0)
G.SETTINGS.paused = true
love.event.quit()
end
local createOptionsRef = create_UIBox_options
function create_UIBox_options()
contents = createOptionsRef()
local exit_button = UIBox_button({
minw = 5,
button = "exit_button",
label = {
"Exit Game"
}
})
table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button)
return contents
end
----------------------------------------------
------------MOD CODE END----------------------```
ah.
ah.
I just changed the code a bit and now this error came up
well dont attempt to compare a number with nil
updated code:
if context.cardarea == G.jokers and context.before and context.full_hand then
local selected_copied_card = false
local copied_card = nil
local card_select = {}
for i = 1, #context.full_hand do
card_select[i] = context.full_hand[i]:get_id()
end
if not selected_copied_card then
if copy_num > 0 then
copied_card = pseudorandom_element(card_select, pseudoseed("seed"))
selected_copied_card = true
print("copy ready")
else
copied_card = nil
selected_copied_card = false
end
end
end
oh.
wiat I tihnk know why
copy_num doesnt exist
I readded copy_num because it's supposed to be the one that detects the cards
wait something happened let me try to record
how do i set the hand score to 0 after scoring (i assume setting the hand's chips and mult during context.final_scoring_step to 0 will do the trick, i just don't know how to get or set those)
hand_chips = 0
mult = 0
somehow it just retriggers the card only.
no "copied"
wait.
huh.
strange.
cause orginally I thought it's supposed to be like this (I know it's a rough edit):
Like when the joker starts it also gets the playing card to trigger and then the card would display the number
@red flower I don't know how else I can put it but I was trying to get this in some way
sorry your effect it's a bit complicated lol I would need to try it out myself but I'm not at home rn
I would try asking eremel again later
Yeah, but right now I think what I had is just enough until the time to ask again but yeah...
hey, anyone know why this isnt working?
its meant to loop through all other cards, and if theyre infected, add the chips variable from that card to the current card
for _, enhancement in pairs...
thanks lmao
anyone know the sound effect name for fortune's nope?
this doesnt work for some reason? am i using it wrong?
it has nothing to do with enhancements, it's not passing if scored_card == context.other_card then
are you sure context.other_card actually exists
idk thats why i replied to the other guy
i think theres no other_card in main_scoring yeah
idk what you want to do
my idea was stupid and didnt work
i want it to pass that check if the card in the loop isn't the current card that's being triggered
if scored_card ~= card then
thats the first thing i tried what
maybe i had an error elsewhere
wait im actually stupid
i wrote =~ 😭
also that part was right for my case
thanks everyonee
(boosters are similar)
why does this play the sound effect as soon as i play the hand? the effect and the message trigger at the right time
put sound = "cancel" in the return table instead
apperently somehow the trigger card copy suddenly didn't get the copy mechanism to work.
somehow it didn't work to copy
@wintry solarhey sorry to bother I somewhat figured out how I can get the playing card to copy work
except right now it did not go the way I thought of.
it's supposed to do something like this.
sorry if I had to bother.
Should this +1 discard be permanent (like the voucher) or only for a round (like how some jokers change it)?
i adapted this idea a little, but this is what i ended up with, it also has a cool synergy with the virus joker as it converts cards before theyre scored
🤔 is this a consumable, or?
Consumeable, yes.
i think it should only be temporary for the current ante or something, since the destroy effect itself is already pretty good
the perm discard pretty much makes it busted
Like this?
mhm, i think thats fine
you could check for when ease_ante is run, or when a boss blind is defeated 🤔
i hook calculate_context and check for context.end_of_round and G.GAME.blind.boss for my global effects
what happens if more than one mod takes ownership of a base item?
New Idea: spawn a Tag
Depends on what order the mods were run (i.e. mod priorities), I guess.
But I forget if it's the first or the last one that gets it.
ah, okay
seems like a slight recipe for disaster
heyhey, would you mind sending the code you used to apply that shader? i'm trying to add a shader to a soul :3
Another day, anothe rewrite. Now the code basically identical the the SMODS.CardDraw, with the addition of going through and seeing what code results from that, and so on... and Negative still isn't dark mode, nor will the Ortalab shaders do much unless I disable the base dissolve shader, but then... a lot of the other things look like shit, and none of the things that are supposed to tell you to do that or not do much. Plus, they still don't look right at all even then
Does anyone know how to fix the undefined problem in VC? 
bald jimbo
oker
question, does anyone know the value of context.other_card.base.value when context.other_card is an ace?
how does negative do the like +1 handsize/+1 joker slot while its there but properly go away when its played/removed/not there
trying to do something similar here (also dont understand how it does the text based on where it is) like i can sell it away on jokers with
if context.selling_self and card.ability.set == 'Joker' then
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end
but if that joker is destroyed the -1 joker slot effects are still there
and how do i check if its currently in the hand or whatever to remove / add the appropriate amount of handsize?
like this is what i've got so far and it partially works (unless its on a card in hand or you destroy the card)
SMODS.Edition({
key = "Mythic",
loc_txt = {
name = "Mythic",
text = {
"{X:mult,C:white}X4{} to all values on this card",
"{C:attention}-1{} Slot / {C:attention}-2{} hand size",
"Idea: BoiRowan",
},
},
discovered = false,
unlocked = true,
shader = 'nitro',
in_shop = true,
weight = 0.5,
extra_cost = 4,
badge_colour = HEX("ea763e"),
apply_to_float = true,
on_apply = function(card)
-- Check if the card is a Joker and adjust slot limit
if card.ability.set == 'Joker' then
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
elseif card.ability.consumeable then
-- Check if the card is a Consumable and adjust slot limit
G.consumeables.config.card_limit = G.consumeables.config.card_limit - 1
else
-- If not a Joker or Consumable, grant a permanent chip bonus
if card.base and card.base.value then
local rank_value = SMODS.Ranks[card.base.value] and SMODS.Ranks[card.base.value].nominal or card.base.value
card.ability.perma_bonus = (card.ability.perma_bonus or 0) + (rank_value * 3)
card:juice_up()
end
end
-- Apply Mythic enhancements to values in extra
if card.ability and card.ability.extra then
for key, value in pairs(card.ability.extra) do
if type(value) == "number" then
card.ability.extra[key] = value * 4
end
end
end
end,
on_remove = function(card)
-- Revert the effect of Mythic enhancements
if card.ability and card.ability.extra then
for key, value in pairs(card.ability.extra) do
if type(value) == "number" then
card.ability.extra[key] = value / 4
end
end
end
-- Restore Joker slot if it was a Joker
if card.ability.set == 'Joker' then
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
elseif card.ability.consumeable then
-- Restore Consumable slot if it was a Consumable
G.consumeables.config.card_limit = G.consumeables.config.card_limit + 1
else
-- Remove the chip bonus if it was applied
if card.base and card.base.value then
local rank_value = SMODS.Ranks[card.base.value] and SMODS.Ranks[card.base.value].nominal or card.base.value
card.ability.perma_bonus = (card.ability.perma_bonus or 0) - (rank_value * 3)
card:juice_up()
end
end
end,
calculate = function(self, card, context)
if context.selling_self and card.ability.set == 'Joker' then
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end
if context.selling_self and card.ability.consumeable then
G.consumeables.config.card_limit = G.consumeables.config.card_limit + 1
end
if context.hand_drawn and card.ability.set ~= 'Joker' and not card.ability.consumeable then
G.hand.config.card_limit = G.hand.config.card_limit - 2
end
--this doesn't work and you still need to figure out how to dynamically change handsize based on if this is in the hand or not
if card.ability.set ~= 'Joker' and not card.ability.consumeable then
G.hand.config.card_limit = G.hand.config.card_limit + 2
end
end,
})
how do you adjust the sell value of a joker?
let's gooooooooooooooooooooooooo
did you ever make any progress on this?
Actually, that got me thinking, what happens if you apply these two shaders as new editions to cards?
https://www.shadertoy.com/view/XtBXDt
https://www.shadertoy.com/view/McdSzl
i hate editions but my suggestions sheet has like almost nothing besides them and vouchers which i still haven't figured out how to make actually work left :/
What’s this for?
bump
I'm confused why don't you just... print it out
was wondering if anyone had it on hand or smth so that i didn't have to go through the trouble, while i was working on a joker functionality
i realised something and checked another thing and turns out i already had printed this value and worked it out before as part of my card art credits system. the .value for aces and face cards are literally just "Ace", "King", "Queen" & "Jack".
I guess I can see why you would ask instead of printing, but I don't see the point in bumping the question 30 min later. You could've printed it 10 times by that point
also, eval dp.hovered.base.value would be 10 seconds
i see 
how would i make localization text of a sticker in the localization file
as in replacement text for a vanilla sticker or new text for a new sticker you're implementing?
new text for a new implemented sticker
...huh, all the stickers are in Other. interesting
in the table that gets retured from your localization file, you will want the structure something like lua descriptions.Other.[YOUR MOD STICKER KEY HERE], containing name = "[YOUR STICKER NAME TEXT HERE]" and text = { [YOUR STICKER DESCRIPTION HERE, EACH LINE STRINGS SEPARATED BY COMMAS, SUPPORTS MULTI-BOXING IN NEWER STEAMODDED VERSIONS] }
hey, I'm trying to yoink the ability from the arm boss blind to delevel played poker hand, does anyone know of a more elegant way to implement this than just ripping the code from the arm itself?
dope, I'll give it a shot
also idk if you saw my message last night, but thank you SO much for showing me this file structure, it's so much easier to work with lmao
Hey would anyone be able or willing to take a look at this crashlog? I crash when hovering over some jokers from extra credit, no clue why.
also I was on a really outdated version of smods, that's why balance = true wasn't working
oh lol
oh is it balance = true in a joker return table for doing the plasma deck balance mechanic?
would it be like this (the text is positioned properly my phone screen just has it overflow into the next line)
that looks about right, try it.
if it doesn't work, either the key may be wrong or i got the structure wrong
i'm not experienced with stickers
i looked at the cryptid code for reference, apparently stickers dont have a unique prefix addition so i just used my mod's prefix (hmlt)
well if they did, it would be the prefix, then your mod prefix anyway
at least if other items are any consideration
yeah, i had the key as 'br_st' because 'breath' was already used with a joker
I tried to make coding custom calculations as easy and clean as possible so this is great to hear!
it's very nice :)
i found an old texture mod for cards i really like but it doesnt work what i do??
i think i can just edit the the assets a lil and put it in the actual balatro,
but id rather make a mod out of it
hey yall just joined. any documentation to start off with yall can point me to?
check the first pin in #⚙・modding-general
Tbh I just open my whole Mods folder in vscode, so idk about adding to workspace and whatnot
currently trying to get a random skip tag and am working from the follwing line but getting nil from psuedorandom
add_tag(psuedorandom(Tag()))
anyone got any ideas?
pseudorandom takes in a string and outputs a decimal between 0 and 1
You probably want to select a tag from the table of all tags
any idea what the name of the table is?
It's probably stored in G.P_CENTERS
p sure its in G.P_TAGS or something
Usually there are SMODS utilities for randomness but I don't think there's one for tags since there is no vanilla support for random rags
hi again! i've got this ability:
(Uncommon) Score cannot exceed Blind requirements until final hand of round
how do i cap the score, as needed? (i'm not gonna use Cryptid's method, btw)
you have to patch into the same place Cryptid patches
I imagine you'd have to do a lot of patching
grand, thanks ^^
do you know where Cryptid patches? in case you do, to save me searching for it
Nah that’s like a single line patch I think
Just target where it checks to see if you beat it, and if it’s not the last hand cap the score at target score -1
is there a way to check if you're in the continue page of the main menu?
how do i pass a sprite to a shader
I do that so idk why it ain't working lmao
okay, i've got no clue how to patch this =w=
i have Cryptid's TOML file, but don't know if i need it
@wintry solar sorry to bother again, what exactly should i do? :P
cause, like
okay mm lemme map everything out
i wanna assign an attribute to the Joker, called bfdi_can_only_win_on_final_hand
then, in the patch, check, in a for loop, if any owned Jokers have that attribute = true
if so, cap the score
the problem is, i want this to work with Cryptid too
and all other mods that cap the score
but, patching the line will either remove Cryptid's cap, or mine
argh this is making my head hurt
i'll work on another Joker until i know what to do
does get_joker_win_sticker() only work on jokers
i need to do it for a deck
mm, that didn't take as long as expected
will brainstorm new abilities for other jokers ^^
hello i'm new and trying to figure out how to make a midas mask adjacent joker but not really sure what i'm doing, i'm looking through the code of the 10 example jokers but can't find anything for enhancing cards
tysm!!
This is my first time hearing about Vanilla Remade and this is totally something I wish I had starting out. Any room for contributors?
I'm not doing anything other than jokers so I would really appreciate any other types of objects
heard
I've been itching to work on smthn since I've been waiting for art on my other projects so this'll be a nice way to pass time while contributing to the community lol
I've been endlessly trying to code it so diamonds gain +10 chips, but so far I haven't seen any results. Any ideas why this doesn't seem to do anything?
PINK FLOYD JOKER??
possibly :3
looks fine to me, did you start a new run before testing?
I wonder if adding a message_card to the return table would help? I think I remember seeing people with similar issues get it fixed like that oddly
oops, yeah it works on a new run now, it really was that simple, I didn't realise changes would only get registered on new runs
thanks!
Ahh that'll do it
changes to config need a new instance of the joker
keep me updated on whatever you're doing with this i NEED this cardi n the game
we're making a balatro mod that adds album inspired jokers
hmmm, for now I wanna keep it just a fun project between my and my partner
perfectly fair :3
but maybe someday
I think someone else was also doing an album mod but I haven't seen them around lately
WYWH the only pink floyd album you're doing?
we have an idea for a voucher inspired by Dark Side of the Moon
I'm trying to figure out how to only return { level_up = -1 } if the level is greater than one, does anyone know how I could do this?
I tried context.level > 1 but that doesn't seem to work
if G.GAME.hands[handname].level > 1 then
This is what I was thinkin' of
What’s the line?
handname is context.scoring_name
question - if i do SMODS.poll_enhancement({ guaranteed = true }), this will generate a guaranteed enhancement, right?
additionally, i'm assuming that this will just return an enhancement key. how do i apply this to a playing card? 
- yes, 2) set_ability
card:set_ability(G.P_CENTERS[SMODS.poll_enhancement({ guaranteed = true })], nil, true)? 
set_ability accepts keys with smods
ahhh
but yes
how do i affect the code of a pool such as making a joker specifically affect another card in the pool - once the joker is enabled it reactivates a planet cards pool if holding or if isnt holding when is holding lets you find more
why no icon :(
y is the row
weird, this code is basically verbatim copied from my other mod and that one worked fine
🤔
if the planets are your own you can do
in_pool = function(self, args)
return next(SMODS.find_card("j_modprefix_key"))
end
if not then thats harder, manipulating rates is also hard
yeah setting y instead of x worked
dunno why i dont have that issue for my other mod
ah i see
balatro is very angry at me :(
is it okay to try and do this like this? it seems to crash whenever I play a leveled hand, saying "attempt to compare number with table"
return { level_up = -1 }```
it's because you have talisman installed :3
if you're using the vanillaremade repo see the note at the bottom of the file
i replaced the 8BitDeck in Balatro bc i dont knovv hovv to make a mod for it and got this anybody knovv y?
is there a way to discard cards automatically
discard_cards_from_highlighted doesn't really work for what i need
oh i didnt know hook highlighted them first
how do you specify a value in that format? how is the to_big(card.ability.extra.dollars) in the vanillaremade example supposed to specify 5 dollars?
Easiest way to make it compatible with talisman is to uninstall talisman and pester the devs of it to fix the problem
lmao REAL
card.ability.extra.dollars is the number value, to_big casts from regular number to Talisman's Big
Having a mod that requires every other mod to write stuff in a certain way on the off chance it’s installed is not healthy for the modding scene
I haven't had any issues with talisman so far
if I use that format will talisman be a depenency? that's annoying
so could I use context.level for the value in my case?
yes i dont know what context.level is tho
I assume its the level of the played hand, but im not sure either tbth
or wait no that wouldn't work
I'm just trying to get that value to one, idk what I'm going on about lol
to_big(G.GAME.hands[context.scoring_name].level) > to_big(1)
?
i dont think you need to_big for the first one but i included it in the example just in case
yeah, my brain was overcomplicating it for no reason
Okay, attempting to get my joker to message the name of the tag randomly chosen in the following code currently it is coming back as nil. My line of reasoning is msg should be equal to the table of the tag and by calling the key that I want 'name" I should get the player legible name of the tag. Any ideas?
is there a specifically a context for a hand leveling down? lol
msg["name"] or msg.name
also it's probably better to localize with the key
the arm does it in context.debuff_hand but I don't think it matters?
youd have to write a hook
the arm does it????
oh if they want a context to see when a level goes down then yes
I have the big dumb thank you
yeah, that's the idea
you probably need to hook level_up_hand
does anybody know how i can tag a seal like i can get a stone card with m_stone ?
it is for deactivate the gold seal in a challenge.
seals are just like "Gold" and "Red"
thx, i kept searching smthing like s_gold
idk if you can ban them in challenges tho
is there a way to change the ante?
ease_ante iirc
Do I just add or subctract it?
ease_ante(modifier)
thanks
how do i apply a drawStep to a soul layer?
how do i make a sticker have an effect when its on a card thats held in hand
What are you trying to do
same way you do for a seal
just as a sticker
trying to draw the Flame shader effect on only the mask (soul) of this card
custom draw function for the card
elaborate
Hell yeah, I've got a concatenated value, this is a start
I've managed to disable planet cards LMAO, I don't think I understand hooking properly
DISTURBING THE PEACEEEEEEEE
Check my mod
buh?? this happened when selecting small blind (attached is crash log, error header thing, and a relevant patch)
for the joker define a draw function like how you define a calculate function
(draw = function(self, card, argsithink))
Do somone know if we can deactivate money earned by selling joker, tarot, etc...
to draw a sprite you need to get the sprite from card.children and use sprite:draw_shader
That’s not how you should change the name of Blinds, but also, vanilla operates on base names instead of keys
in theory
SMODS Atlas {
key = 'one for all',
path = 'one for all.png',
px = '71',
py = '95'
}
SMODS.Joker{
key = 'joker3',
loc_txt = {
name = 'one for all',
text = {
'Get {C:attention}$1 {}for each owned {C:attention}joker {}',
'at the end of each round.'
}
}
atlas = 'one for all'
pos = {x = 0, y = 0},
blueprint_compat = false,
rarity = 1,
cost = 6,
config = {extra = {dollars = 1}},
local_vars = function(self, info_queue, card)
return { vars + { card ability.extra.dollars}}
end,
calc_dollar_bonus = function(self, card)
return card.ability.dollars
end
}
ah
You’re breaking vanilla
right im guessing i should take ownership. just now remembered thats possible
this should give me $1 for each joker at the end of the round, right?
You don’t even need to do that I think
also i see you're jovial now
Just change the localization
I think the sprites you need are card.children.front and card.children.floating_sprite
x = 2,
y = 3,
draw = function(card, scale_mod, rotate_mod)
card.hover_tilt = card.hover_tilt * 1.5
card.children.floating_sprite:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil,
card.children.center, 2 * scale_mod, 2 * rotate_mod)
card.hover_tilt = card.hover_tilt / 1.5
end
}```?
Now I can show it to everyone
is there a thing to reset the run through code? im making a joker that either resets your run or gives you 1000 mult
Something like that yeah
horrifying
so would i patch the localization file for that? (but also, i do kinda need to set some custom values for it, since blinds in this mod have values for cards and defeats
No
Just put it in your localization file
there is a consumable in cryptic mod that resets blind state to the start of the current blind... so i know it is possible... no clue how to do that tho
Check my mod
awesome
theoretically, this should give $1 for each joker at the end of the round, right?
but also if i want to give it new attributes im patching into the Blind class should i just take ownership anyways

cause im adding a win condition that isnt chips
so blinds need a custom attribute for that
Yes
damn i really wanna know how to reset a run lmao
Let me ask a question. The "text" object defines the text that pops up when you hover over the card right
And inside this text you can use placeholders like #1# and #2#.
My question is where does it pull the values to put in those place holders? Is the config variable or is it the loc_vars variable?
SMODS has you define a loc_vars function whose return is a table whose vars key supplies those values
Show it
does anyone know if I'm using level_up = -1 correctly here?
level_up = level_up or 0
if context.level_up_hand and level_up == -1 then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize{type = 'variable', key = 'a_mult', vars = {card.ability.extra.mult}}})
end
end```
I feel like I'm not
it works normally with the hologram shader, but the flame shader doesn't seem to work
That didn't really answer my question
it's giving a mouse_screen_pos error
What part didn’t
that's not how a hook works lol
See what arguments the flame shader needs
and which ones you’re passing
config tells you the values, loc_vars are for updating them
Gamers 👋

Hello dilly how are you
But where do the placeholders get their values???
That’s not right
What part of my answer did you not understand?
its telling me that the { on line 45 is not being closed, but it very much is...
any solve to this?
Hi vic
I'm tired but alive
I slept alot of yesterday (until almost 1700!) But here I am today still sleepy
How are you
ah nvm you right that was dumb
Read the line near atlas
I love spreading misinformation
vars = instead of vars +
I’m cooked
Why does this line exist?
We gotta uncook you
I may be stupid
Apologies, I reread your response and I misunderstood. Been at this issue for a while
im special
line 38? or 54?
:0
N has always been special
53 and 54
i would look for examples of hooks in other mods
can't tell which arguments are supposed to be which
@red flower sorry for tag but idk if this is the smartest thing to do but it does show stuff
if it works it works, i would recommend putting that in the .gitignore if you upload it
it looks fine to me... i have it set the same way for my other joker, and it isnt causing any issues
alrighty
Compare 53 and 54 with 55
does anyone know how to reset run through code?
nil - unknown
card.ARGS.send_to_shader - unknown, is this needed for every shader call?
nil - unknown
card.children.center - unknown
2 * scale_mod - unknown
2 * rotate_mod - unknown```
are the nils and send_to_shader universal
not sure i follow... this is how the code for my other joker looks, and this works fine
The comma my friend
When I told you to check the args, I meant ARGS.send_to_shader
you know you can crop screenshots right
OH
Read the shader code to see which args are necessary
Note one has a comma and one doesnt
Then I'm kinda of at my wits end with this issue. Why is it when the value is updated in the back end, it never updates in the front end? It's always showing male for every instance of the Seal
I was waiting for you to get to it but you were just missing it lol
So I had to help a little
i guess that wasnt the issue
tbh i can't tell
idk how the shader code works really
Did you fix 53 and 54
You need a comma after atlas line too
i replaced the 8BitDeck in Balatro vvith this bc i dont knovv hovv to make a mod for it and got this anybody knovv y this happening?
yeah'
Like I know it's working and changing the variable, but everything I have tried to update the value in the front end just doesn't work
ok i found the issue finally
how could i put a gif as a sprite/joker
With difficulty
Just do what I do and think really hard about it and then dont do it
so now testing the joker is giving me issues
where does it list the necessary args?
We call that some good early econ
is there a reason it isnt giving me money for each joker? im pretty sure i set it up right...
At the top of the shader code
?
Missing ….extra.…
Yes I think those are the external variables required by the Hologram shader
?
ok, that was closer... although its not giving me $1 per joker
here it should be giving me $3
so then how would i have the card send the proper variables for Flame, considering that scale_mod and rotate_mod are the only apparent arguments passed into the shader?
using the abstract joker i realise now wasnt the right decision... how do i make it give me
$1 per joker
My head is a little empty right now but can't you just monkey it by checking how many are in g.jokers.cards and then calculate the dollar bonus there
Of course not, you made it give $1
i did use some code from both golden joker and abstract joker, so i thought it would work
dratula pfp
The table that passes arguments to the shader is ARGS.send_to_shader
OHH I SEE WHAT I MISSED
i am the boss
is there an easier way to do this
I wish I got one dollar for every joker I had
ahh okay okay
so how would i modify that table
i'm not really good at lua if you can't tell -w-
how do i load multiple folders inside the main content folder? e.g from lucky rabbit
im looking at the main luas but like
for some reason when i set the localisation for the small and big blinds, hovering over them causes a crash from. not being able to find their colour, i think??
How can I make a joker wait two seconds during its trigger?
I want it to play a funny sound before ending the run, rather than immediately ending
does this function not work anymore?
i feel like ive seen how to do that with like pokermon or cryptid or something
i think you mostly just have to loop through the content folder and then loop through each folder in the content folder so it would be a loop within a loop
is this for a joker or something else
joker
it should work
ok nvm it works
i just put it the wrong way
my joker doesnt appear in the shop , how can i make it appear in the shop?
events
it should unless you have an in_pool function or it's a legendary
i do have an in_pool function
Hello everyone I wanted to ask for any advice on making my first Mod, It's not too complicated (at least the idea isn't I am hoping), but I wanted a Mod which would allow the player to be unable to lose during Ante 1-4 in exchange for making Ante 5-8 1.5x harder. I am trying to make it so that the mod simply checks if the player would lose the run it instead first checks the ante number and then if it is 4 or lower gives the player an additional hand (This would not stop losing by deck out, but I think that's permissable given the context of how hard decking out in antes 1-4 is without winning)
Are you asking how to implement it
I don't really have a lot of Lua experience but I've done a fair amount of programming in Python, JS, C#, and AHK. I managed to setup my mod folder and the Metadata json file. But I'm hitting a major wall with how to actual get the functionality working
question - if it's present, shouldn't calc_dollar_bonus() always be triggered at the end of the round regardless of whether or not it returns anything above 0?
I assumed it'd just make your hands stay at 0 so you don't get bonus money
clueless dumbass that doesn't know what they are missing
This definitely requires patching the source code (instead of just adding your own code on top of it), so I recommend reading how Lovely patches work: https://github.com/ethangreen-dev/lovely-injector
if you're asking me then yes. You'd get a bonus hand only if you failed to beat the round which would imply that you'd consume that hand to try to win the next one (although the mod wouldn't have a limit to triggers unless configured to do so)
I think the simplest way to approach this would be to find the code that 1. decrements the hand after each played and 2. triggers a game loss when hands remaining is 0
then patch it to do what you want
I can't help you dig for the relevant functions right now though because I'm not home and don't have access to the source code sorry
The only relevant function I remember is play_hand_from_highlighted? I think that's what it was called
might be a decent place to start
that's okay, do you have any idea which files I might want to look at?
misc/(something)_functions.lua?
anyone have ideas for what this joker should do?
(reference to The Wall by pink floyd)
smth about stone cards maybe
's what i was thinking too
maybe it retriggers stone cards but has a 1 in 5 chance to break them
and what is it
stone joker but xchips
so it directly synergises with them
I've been searching through the smod github pages, and I haven't been able to find any way for a joker to detect specific cards or suits in the "before" context stage. trying to make a joker that turns all played clubs into glass if a king of clubs scores.
context.scoring_hand and context.full_hand are lists of the scoring and full hand respectively
Just basically return not G.GAME.something_pools.and_a_var_i_forgot
use :get_id() and :is_suit(suit) to see what the cards are
then your problem is that your in_pool function is wrong
check if the variable is false at any time
tried adding a second joker today, i'm in SMODS.joker and i just copy and pasted and changed a few things but my first joker is gone
In the in_pool function?
also the custom mult i did is showing up as "xnil"
in general
return not value means that the joker will only appear when value is false
(or nil)
Oooh alrighty
bump
what is this supposed to be? a custom card?
custom joker
my first one that was working yesterday but now it's gone
for a moment I thought it was a playing card that acts like a joker when played?
can you elaborate?
can someone help me?
im trying to create a mod but it doesnt show up when i open the game, i have a mod.lua folder, a mod.json folder and assets and im really new too all this so im not sure, can anyone help me with this problem?
see above and can you post the json file just to make sure it's valid
this function deletes all playing cards (both played and in hand) instantly, but I'm more looking for something individually checks each playing card and destroys them if they meet a condition, how would I go about this?
context.destroy_card is also the card to be destroyed so if you want only hearts you would do context.destroy_card:is_suit("Hearts")
if you want only played cards then add a check for context.cardarea == G.play
hmm alright, I did try adding context.cardarea == G.play before but it crashed my game for some reason
I'll fiddle around with it some more
yeah, ive modded the game before and i wanna make my own, so i know where the folder is supposed to be but i cant see it ingame
Have you tried looking at the console output and see if it mentions your mod at all?
IIRC when I was fucking up my .json file it'd say something about that
so like how do i do that, im new to all this sorry
uhh you know how you launch balatro and you get the black screen with white text on it
lovely?
yeah
You can scroll through it and see if it mentions your mod at all
key = 'thewall',
rarity = 2,
atlas = "renjokers", pos = {x = 0, y = 1},--- soul_pos = { x = 7, y = 0 },
cost = 7,
unlocked = true,
discovered = true,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = false,
config = {extra = { XChips = 1.5 } },
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.XChips}}
end,
calculate = function(self, card, context)
if context.cardarea == G.play and SMODS.has_enhancement(context.other_card, “m_stone”) then
return {
message = localize({
type = "variable",
key = "a_xchips",
vars = { card.ability.extra.XChips },
}),
xchips = card.ability.extra.XChips,
colour = G.C.CHIPS,
}
end
end,
}```
anyone know why i'm getting an attempt-to-index error for 'card'?
it does it says "INFO - [G] 2025-05-13 16:39:55 :: ERROR :: Loader :: Found invalid metadata JSON file at C:\Users[myname]\AppData\Roaming\Balatro\Mods/testmod/mod.json, ignoring: [SMODS _ "src/loader.lua"]:226: main_file
you're missing a context check
bup
which context should i check for?
okay that means your .json file is invalid. can you post the file
like whats inside it or the whole thing
the whole thing
what's the effect
gives each stone card x1.5 chips
context.individual then
that the only one aside from the stone check?
okay i fixed the problem sorta but my second joker has "xnil" mult still
you're missing some required fields
look at the wiki and check what's marked [required] https://github.com/Steamodded/smods/wiki/Mod-Metadata
the rest of the code was ok, just add that as the first condition on the if statement
your loc_vars is wrong
can i see the code
Looks like you just need prefix (this gets added to ids you create so two different mods do not end up with the same ids for stuff) and main_file (which lua file the loader should launch)
key = 'thewall',
rarity = 2,
atlas = "renjokers", pos = {x = 0, y = 1},--- soul_pos = { x = 7, y = 0 },
cost = 7,
unlocked = true,
discovered = true,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = false,
config = {extra = { XChips = 1.5 } },
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.XChips}}
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and SMODS.has_enhancement(context.other_card, “m_stone”) then
return {
message = localize({
type = "variable",
key = "a_xchips",
vars = { card.ability.extra.XChips },
}),
xchips = card.ability.extra.XChips,
colour = G.C.CHIPS,
}
end
end,
}```
what
so yeah you haven't told the mod loader what file to actually load so it doesn't load your mod
looks good to me
i read it on the github thing and i dont understand
how do i do this
it has. fully crashed the game apparently
can i see the log
once i restart my puter yeah
add the fields to the json file
{
"id": "testmod",
"name": "Test Mod",
"description": "Gives a +5 multiplier when a 5 is played.",
"version": "1.0.0",
"author": "Luke453",
"main_file": "change_me_to_the_name_of_the_file_that_contains_your_mod.lua",
"prefix": "idk_man_whatever_you_want_as_long_as_it's_unique_to_your_mod_and_you're_fine_with_typing_it_a_over_and_over_again",
}
ok ill try this and see if it works
where do i find it
oh, you mean the in-game log
yeah there wasn't one it just stopped responding
didn't happen this time for some reason, but it's still not working
ah, okay
removing the stone and cardarea checks made it apply, but it applied to every card
i think i fucked something up, i checked the console and it says " INFO - [G] 2025-05-13 16:55:40 :: ERROR :: Loader :: Found invalid metadata JSON file at C:\Users[myname]AppData\Roaming\Balatro\Mods/testmod/mod.json, ignoring: [SMODS _ "src/loader.lua"]:226: author"
how do i make this joker only give mult when a played hand contains a 7 rather than per played 7?
to clarify i mean that it should give x1.5 chips each time a stone card is scored
not just add that to each stone card
Do I use get_id() and is_suit(suit) within the before context or do I use those within the scoring_hand context?, since I want it to convert the cards before they score
is there a way to get the current unix timestamp in milliseconds
oh author is supposed to be a list
got it working :3
show flames
who else should i put and idk if the main_file one is right, do i just put the name of the lua folder or is there something else
this
context.individual triggers for each individual card
check the wiki for other available context flags
you can just have a list of one person
like ["(You)"]
scoring_hand is a property of the before context
Very
Like write mods
@red flower bad placeholder wording but what do you think
Is it smth I could do with very limited coding experience
Lua isn't the hardest language to learn but it's still a programming language
Going off certificate I think seal would be lowercase
what would i need to change to make this only trigger if a 7 is in your played hand rather than per played 7?
SMODS.Joker {
key = 'joker4',
loc_txt = {
name = 'Seven Eleven',
text = {
'{C:red}+11 {}mult if played hand',
'contains a {C:attention}7{}.'
}
},
atlas = 'Seven Eleven',
pos = {x = 0, y = 0},
blueprint_compat = true,
rarity = 1,
cost = 6,
config = { extra = { mult = 11 }},
local_vars = function(self, info_queue, card)
return { vars = {card.ability.extra.mult}}
end,
calculate =function(self, card, context)
if context.individual and context.cardarea == G.play and context.other_card:get_id() == 7 then
return{
mult = card.ability.extra.mult
}
end
end
}
context.cardarea == G.hand
I already changed the wording of Certificate in my mod, but also, I haven't decided if I want to capitalize such terms or not
I noticed I have been inconsistent with "negative" and "Negative" before
temporary cards seem cool
it doesnt do anything now.... is this right?
if context.individual and context.cardarea == G.hand and context.other_card:get_id() == 7 then
^u^
is anybody able to help me make this only trigger once if you play a 7?
SMODS.Joker {
key = 'joker4',
loc_txt = {
name = 'Seven Eleven',
text = {
'{C:red}+11 {}mult if played hand',
'contains a {C:attention}7{}.'
}
},
atlas = 'Seven Eleven',
pos = {x = 0, y = 0},
blueprint_compat = true,
rarity = 1,
cost = 6,
config = { extra = { mult = 11 }},
local_vars = function(self, info_queue, card)
return { vars = {card.ability.extra.mult}}
end,
calculate =function(self, card, context)
if context.individual and context.cardarea == G.hand and context.other_card:get_id() == 7 then
return{
mult = card.ability.extra.mult
}
end
end
}
this is what i have so far
i tried that and it says the same thing in the console, it might be a problem with how my main_lua is but im not sure idk
wait i can see it in the mod section now i think i fixed it
thanks for the help @turbid maple

Hihi!
can someone help me make it so this triggers only once if played hand contains a 7?
i feel like the solution is simple here to make sure the text shows up correctly as per the calculation done to the "extra" variable, but would that mean i need to do my calculation in the loc_var function? when i tried that it gave me a weird bug where it calculated correctly but then changed it to 0chipsx0mult to there was no way to win the round
return in vars the same card.ability.extra * eight_tally you do in calculate
How should I be using remove? because this code just destroys all held and played cards.
if context.destroy_card and not context.blueprint then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() == 2 then
return
{
remove = true
}
end
end
end
iirc this context is called for each card you have with destroy_card set to the card thats checked to be destroyed or not
so youd have to check if context.destroy_card:get_id() == 2
Alright, thanks.
i forgor how to check if its part of your scoring hand though
Ah I misunderstood what you meant by hand originally. So go back to context.cardarea == G.play, but you'll use context.joker_main instead of context.individual. The problem with that is that context.other_card only works for context.individual, so you'll have to iterate over G.play.cards and manually check if any card is a 7
oh theres context.scoring_hand right
I have scoring_hand inside destroy_card right now, maybe flip that?
how do i mention a variable in the description of a joker?
no just like
check if context.destroy_card exists
then check if destroy_card is a 2 and is inside scoring_hand
so uhh actually you could just add another condition to that if
You'd want to do the calculation in loc_vars, yeah... and 1+card.ability.extra*eight_tally to make sure you have 1 as base.
eight_tally is a local variable though would i need to recalculate it in loc_vars?
Make it a local variable in loc_vars too.
also I don't want 1 as the base, ill make sure to reword so thats more clear (ie if u have 3 8's it will be 0.75x mult bc thats funny)
That's better, but it still destroys the 2s held in hand.
...fair enough.
ok i got the var working but idk how to change the color of text
if context.destroy_card and context.cardarea == G.play then
?
how do i do mod config
copy from another mod's config
nvm figured it out
how do i check if a card is highlighted?
how do i give myself a joker to test if it works
install debugplus and click 3 while hovering over it in the collection
thanks
sorry, but how do I utilize that within this? it's incredibly late and I'm struggling to process it a little
where would i find another mods config files (as in the files that display and save the config settings not the settings themselves)
depends on the mod, it would be in SMODS.current_mod.config_tab
here's mine
https://github.com/nh6574/JoyousSpring/blob/40e7f90f4a6b0e8db15fed29f43f08d6b2e34065/src/mod_info.lua#L213
Just PR'd VanillaRemake with backs 🔥
thank you!! ill check it and merge tomorrow
I'm probs gonna keep doing more work on it through tonight so there may be a few more when you go to merge
can someone help me make it so that this joker only triggers once if the played hand contains a 7?
you are checking individual cards with that
You wouldn't use context.individual for this, individual is for every card of that type
so what would i use?
You'd probably run this through context.joker_main, loop through context.scored_hand, and return your mult if you come across a 7
joker_main
what he said
yeah
thats the "standard" context that triggers once when a hand is played
if context.joker_main then
for _, pcard in ipairs(context.scoring_hand) do
if pcard:get_id() == 7 then
return { mult = card.ability.extra.mult }
end
end
end
individual is for triggering an effect for each card individually
Mans was quick with it
programming on phone is a pain im never doing it again
so like this ?
calculate =function(self, card, context)
if context.joker_main and context.scored_hand == G.play and
(context.other_card:get_id() == 7) then
return{
mult = card.ability.extra.mult
no
Like this
Been there, agreed
there's no other_card in joker_main and cardarea == G play is never true
rental_compat works the same way as eternal_compat and persihable_compat right?
how do i check if a card is on the G.hand.highlightedlist?
steammodded documentation only mentiones eternal, perishable, and modded stickers
card.highlighted
I've got this code, which ends up destroying all 2s, played and held in hand. How can I make it affect only played 2s?
if context.destroy_card and not context.blueprint then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() == 2 and context.destroy_card:get_id() == 2 then
return
{
remove = true
}
end
end
end
context.cardarea == G.play
tysm
now im getting this error with the closing bracker
you're missing an end
also if you ask for every single syntax error you're not going to learn lol
every for, if, and function should have a matching end
you should install the lua extension for vscode
OHHH SO THATS HOW THE END FUNCTION WORKS
thats really helpful to know
previously i just had no clue what that did
yo after looking into hooks, I'm not sure it's what I want for the joker. the idea of the joker is to add mult to the joker whenever the hand delevels, regardless of if its from the effect of the joker or not (i.e. from the arm). does the arm use level up = -1 ? cause if it doesn't wouldn't a hook not work for that?
if you want to do something whenever anything in the whole game calls a specific function (such as changing the level of a hand) you must use a hook
the arm uses level_up_hand(), same as returning level_up directly so yes you want to hook that
got it okay
cooking
lmao thats actually really cool
open more tabs for more mult
no need, a single chrome tab will do
thats actually so sick
fr
literally p2w
ohh i see now
that seems to have done the trick
OHHHH I MISSED THE FUNCTION
cool, the joker works great now
thanks for the help
^
you should really install the lua extension if you're struggling with minor syntax errors
click that and search for lua and then install it
tried doing that already... it just says this
i got no clue where to even find that
uhm, so what im doing is discarding cards the moment they get drawn, but for some reason it discards like 2 times and then it stays like this, do i have to add a delay or something?
it says that you need to open a folder instead of just a file i guess
ah
I'll admit I'm struggling to parse the connection for ride the bus's scoring context since there isn't a get:id there and I don't know how getting the id relates to the context that triggers the effect of turning the played clubs into glass if they're in seperate context statuses and if the king's id is 13 or K and how it recognises the king is a club either
might be a silly question but what is the code for checking if a scored card is of a specific seal im going insane tryna bruteforce it
I feel like I'm going insane, and like I'm retaining no info despite scanning steammodded's github for literal days 😭
that's an example of how to use the context to iterate through a hand and check a condition
you need to change the is_face check for the other checks you want to do
kings are 13
iirc the info is in card.seal
hey y'all
i'm trying to make a joker (for learning purposes lmao) that converts all played cards into Polychrome Red Seal Steel Kings.
i know how to do the steel part (looking at the code of Midas Mask) but i have no idea what the syntax is for the edition, seal, and rank
any help would be appreciated
card:set_edition("e_polychrome")
card:set_seal("Red")
SMODS.change_base(card, nil, "King")
thats actually awesome lmao
TYSM
i assumed it was relatively straightforward lol
im gonna have to max my numbers more if i want true use out of that ram joker....
64gb gang
woah there, dont get ahead of yourself, its 2
we ball
im lookin to do 128 soon, but life has been in my way
how do i get the max hand size?
ram has gotten so much cheaper in the last like 5 years. i remember paying like 150 for an 8gb stick maybe a decade or so ago
what the fuck do you even do with that much ram
2 tabs + a new tab page
verifiably true
i hardly even use 9GB 😭
Host a modded Mc server, some programming on the side that stays open, gaming
Nothing closes while I'm on
So it eats some ram
i have 5 chrome tabs, discord, balatro, intellij, aseprite, 2 terminals open
oh hosting an mc server is the ram muncher
i see
restart that every so often
memory leaks are a bitch
3d modelling and data science stuff also
where are retriggers calculated? currently working on a joker whose effect triggers every time a card is retriggered
godspeed soldier, the score calculation functions are some al dente spaghetti
yeah i'm beginning to realize this is a journey i may regret
unfortunate because the effect is very cool
this seems like death by a million function hooks to me
yoooo this looks so cool
i would SMODS.calculate_context on retrigger jokers
this and 4 oops all 6s
just make your own context



