#💻・modding-dev
1 messages · Page 529 of 1
local profile = G.PROFILES[G.SETTINGS.profile]
local usage_data = profile.joker_usage
print("=== JOKER USAGE DATA ===")
local most_used_key = nil
local max_count = -1
-- Print all joker usage data
for k, v in pairs(usage_data) do
local count = (type(v) == "table" and v.count) or 0
print("Joker: " .. tostring(k) .. " | Count: " .. tostring(count))
if count > max_count then
most_used_key = k
max_count = count
end
end
print("========================")
print("Most used joker: " .. tostring(most_used_key) .. " with " .. tostring(max_count) .. " uses")
print("========================")
these printed out my values correctly,
i got no idea then
without knowin what youre wanting to do i dont really know how to help you, because for me i displayed the number fine
May any kind souls spare me some help for my eternal struggle? (i dont have madness)
i want to do 2 different things
get the count value for splash
set a boolean for if splash is in the top 10
but i can't get the count value and I don't understand why
-# the latter i know how to do but if anyone already has code for that so i dont have to write it that would be cool
local profile = G.PROFILES[G.SETTINGS.profile]
local usage_data = profile.joker_usage
-- Create sorted list of all jokers by usage count
local joker_counts = {}
for k, v in pairs(usage_data) do
local count = (type(v) == "table" and v.count) or 0
table.insert(joker_counts, {key = k, count = count})
end
-- Sort by count (highest first)
table.sort(joker_counts, function(a, b) return a.count > b.count end)
-- Get top 10
local top_10 = {}
for i = 1, math.min(10, #joker_counts) do
table.insert(top_10, joker_counts[i])
end
print("=== TOP 10 JOKERS ===")
for i, joker_data in ipairs(top_10) do
print(i .. ". " .. joker_data.key .. " (" .. joker_data.count .. " uses)")
end
print("====================")
-- Check if j_splash is in top 10 AND find its overall position
local splash_in_top_10 = false
local splash_position = nil
local splash_overall_position = nil
-- Find j_splash's overall position in the full sorted list
for i, joker_data in ipairs(joker_counts) do
if joker_data.key == "j_splash" then
splash_overall_position = i
break
end
end
-- Check if it's in top 10
for i, joker_data in ipairs(top_10) do
if joker_data.key == "j_splash" then
splash_in_top_10 = true
splash_position = i
break
end
end
print("=== J_SPLASH STATUS ===")
if splash_in_top_10 then
print("j_splash IS in top 10 at position: " .. splash_position)
print("Boolean splash_in_top_10 = TRUE")
else
if splash_overall_position then
print("j_splash is NOT in top 10")
print("j_splash overall position: " .. splash_overall_position .. " out of " .. #joker_counts)
else
print("j_splash was never used (not found in usage data)")
end
print("Boolean splash_in_top_10 = FALSE")
end
print("=======================")
local joker_to_spawn = nil
if #top_10 > 0 then
joker_to_spawn = pseudorandom_element(top_10, pseudoseed("top10")).key
else
joker_to_spawn = "j_joker" -- In case this shit failed
end
print("Spawning joker: " .. tostring(joker_to_spawn))
if joker_to_spawn then
local fav_joker = SMODS.add_card({
type = 'Joker',
key = joker_to_spawn
})
fav_joker.area = G.jokers
fav_joker.ability.force_focus = true
local message = splash_in_top_10 and "Top 10 Joker (Splash detected)!" or "Top 10 Joker summoned!"
card_eval_status_text(fav_joker, 'extra', nil, nil, nil, {
message = message,
colour = splash_in_top_10 and G.C.RED or G.C.GOLD
})
end
end,
i was too lazy to change it from a consumable so take from this whatever you need, but it displayed the following for me
woah
and the card stats in question so theyre clearly correct
if your exact code doesn't work on mine i'm gonna drain
also your top 10 is
quite interesting
thanks lmao
gros michel and photograph huh
let me show you why photo is
playing kings and queens free repeated x2 mult
since i ahve a blackjack poker hand and you can just do ace and king, makes life a dream
hi smt
why you thinkin me am i not smart enough
see it doesnt feel like its worth an uncommon because alone it isnt good at all
i need to eventually make a rarity between common and uncommon
name it ncommon
but debuffing every card besides your king or queen is a huge loss
means no other cards with editions, enhancements, etc work for you
hmmm
so its synergy relies pretty much on its retriggers and things that will mult with it
my top 10 probably won't have any surprises
has the code worked out for you or is your build somehow violently broken
i've been removing the code for spawning a random top10 joker cause i don't need to do that
ye sorry, i was just editing my spawn most used joker consumable
too lazy to make a whole new one
(it wouldve been 30 seconds more)
oh hey it worked
epic
I still don't know why it didn't work when I tried to do it
now say im co creator of all of your mods and i get 50% of all of your future earnings in this world
i credited you in the comments above the function that's what i usually do
would people consider that enough
i imagine so, i personally dont care if im credited or not but it makes me smile if i come across being credited
it's in there for you when i make a mod release in 3 weeks
huge
i have so much shit to do
one day ill release my mod when my artists are not sitting around staring at their screens
id be ready for a release by now if not for that
i'm just procrastinating because I need to do a huge bugfix to my most complex joker
ive fixed most of my issues but i have not met a lazier class of creator than that of the artist
ive even tried bribing them with food delivery and they accepted the food to only still not do art im going to explode
i think thats a bit unfair to say to all artists
probably, but i can only speak on the artists i know which is like 5 or so
one can only ever speak on their own experience
anyone know why i keep crashing when i try to detect if the current highlighted joker(s) have eternal? i've tried pretty much every permutation i can think under the moon and i have no idea why i'm still getting crashes
why not just check card.ability.eternal
doesn't work
why not
i don't know
doing if card.ability.eternal then still does a crash
scratch that it doesn't crash but it doesn't work
even other_card.ability.eternal doesn't work
no idea why it was crashing earlier, probably because i still had or other_card.ability.perishable or other_card.ability.rental uncommented
other_card is grabbing a table, not a card, as G.jokers.highlighted is technically a table
bump
Im sorry I haven't worked with rarities yet they're one of my blind spots
aw ok
actually you might be able to help, im just having struggle with localization
i have, allow me:
in the code provided there isnt a loc_txt; if there is a localization file then it's done improperly
oh should i send my localization of where i put it?
My best advice for localization is to use the localization file, and use the dump_loc in your metadata to make one easily
Just be sure to disable all other mods
Dump_loc can be read about here
https://github.com/Steamodded/smods/wiki/Mod-Metadata
misc = {
challenge_name = {
c_btct_PipisChallenge_1 = "Pipis",
},
dictionary = {
k_shape_booster_group = "Geometric Pack",
k_btct_booster_group = "Batrocities Pack",
k_btct_Elite = "Elite",
},
labels = {
k_btct_Elite = "Elite",
}
}
the boosters work but challenges and rarities dont...
what do i use that for tho?
oh so it just removes localization after or smth?
try having the entire key lowercase, and then try removing your mod prefix (without reverting the previous change)
at least from what i saw in my 10 seconds of looking (ive never used these before)
It creates a dumped file of all localization entries you'd use in a localization file
Which the localization file is used for ease of translating to other languages
But you'd have to remove your own loc_txt from each item that has it afterwards
ok ill try
cause only my jokers use loc_txt so id have to do that for each one?
It dumps all of them
So after it was dumped you'd just remove the loc_txt from whatever has it, if only jokers have it then you'd only remove it from jokers
oh i see thanks
why is this crashing?
key = 'moon', --joker key
loc_txt = { -- local text
name = 'Moon',
text = {
'Gains X1 mult everytime a hermit card is used'
},
--[[unlock = {
'Be {C:legendary}cool{}',
}]]
},
atlas = 'Jokers', --atlas' key
rarity = 1, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
--soul_pos = { x = 0, y = 0 },
cost = 5, --cost
unlocked = true, --where it is unlocked or not: if true,
discovered = true, --whether or not it starts discovered
blueprint_compat = true, --can it be blueprinted/brainstormed/other
eternal_compat = false, --can it be eternal
perishable_compat = false, --can it be perishable
pos = {x = 0, y = 0},
if context.using_consumeable and context.consumeable.config.center.key == 'c_hermit' then
card.ability.extra.xmult = (card.ability.extra.xmult or 1) + 1
end
if context.joker_main then
return { xmult = card.ability.extra.xmult }
end
}
the crash dump would be helpful
you are missing a calculate
oh actually yea you need that code in the calculate function
it would normally, but is unneeded in this case :3
i'm VERY new to modding so thanks!
it is late and i did not finish reading the joker code lmao
how do I do it though
Thats my secret, I refuse to read
May i reccomend you look at the SMODS wiki and the Vanilla Remade wiki, along with looking at some mods for examples (the aforementioned Vanilla Remade is amazing for this, too)
Yumby blu text
oh right i came here bc i had a question, too, i forgot lol
No question allowed
3:
Go ahead you can ask ig...
yippee!!
Real
I have i have a joker that can be sold repeatedly and a hook that i want to limit the amount of times that joker can be sold per round. The issue I'm running into is that i can't access the variable that limits the sells in the hook as that variable is tied to the joker
I should really go to sleep, my sleep schedule is horrible
my brain hurts from trying to solve this :3
this is still not working
calculate = function(self, card, context)
if context.using_consumeable and context.consumeable.config.center.key == 'c_hermit' then
card.ability.extra.xmult = (card.ability.extra.xmult or 1) + 1
end
if context.joker_main then
return { xmult = card.ability.extra.xmult }
end,
}
Here you go, with comments on what was fixed
-# i now feel bad for the people that live in this channel
now i'm getting this error when playing a card
how did i miss that- you're calling card.ability.extra.xmult without setting up a config
@velvet ingot
where do I place that in my script?
Anywhere above your calculate.
-# (technically above all functions but you only have the calculate so it's irrelevant)
Again: look at other mods for reference, i cannot stress how much it helps early on.
Look at other mods always
Tends to be a huge help
Most of the time something you want to do has been similarly done before
I sometimes still look at other mods, even if its not super often
i do a lot but mainly bc i love to sanity-check myself :3
-# lil bump :3
i'm back again and the joker is working now! I was just wondering how you add a "[currently ___ mult]" thingie at the bottom
loc_vars
-# PLEASE look at the wiki links i am providing, they are very helpful
ok thanks!
What is the global for the ante
G.GAME.round_resets.ante
thx
Is it possible to make a joker be perishable in challenges or do i have to do stuff to make that work cause i cant find it in smods doc?
This deck dont want to start it just keep calculing something infinitely I think
You need return true in your event function
oh yeah lol
infinite hand size be like<
I like being Ante 108 and Round 4
I realy dont think my thingny works
do You guys know why it does that
You need and context.main_eval
is that why context.end_of_round (by itself) returns true 50 times?
oh yeah, I alway forget that I need main_eval with end_of_round
Yeah there are lots of end of round contexts
noted
Bump
looks like it may have to be a custom rule?
True, but what if i just want the joker that i spawn at start be perishable?
you could make the custom rule spawn that joker with the sticker ig? idk my mind is too preoccupied to do more than 5 minutes of work on this rn
stickers = {'perishable'}
Hello, I have a question. I’m making a joker that gives 50 chips for each queen played in the hand. I’ve read some mod code but I don’t understand what I’m doing wrong here.: config = {
extra = {
chip_gain = 50,
}
},
calculate = function(self, card, context)
if context.main_scoring and context.cardarea == G.hand and not context.end_of_round and context.other_card:get_id() == 12 then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
return {
chips = card.ability.extra.chips
}
end
end
Ah ok thanks
Real
1: what's the issue here, exactly?
2: if it crashes send the crash
3: Formatting. Idk why so many people forgo it when it's important
card.ability.extra.chips doesn't exist.
oh shit yea it doesn't
Also context.main_scoring isn't called for jokers.
The thing is, it doesn’t give me any error at all, but thanks for responding. I see I got confused with the card.ability.extra.chips
what do you mean with formatitng? English is not my main language.
You don't have chips in config
You only have chips_gain
Actually you don't need the adding thing either
If you're doing it how baron is you just need
if context.individual and context.cardarea == G.hand and not context.end_of_round and context.other_card:get_id() == 12 then
if context.other_card.debuff then
return {
message = localize('k_debuffed'),
colour = G.C.RED
}
else
return {
chips = card.ability.extra.chips
}
end
end
end,
Where each queen gives 50 chips
Wait played in hand as in hand area or the cards scored-
Sorry Violet I took over lmao
Then changed G.hand to G.play
is fine, im too mentally checked out to help anymore anyway
🫂
Hope you get better lol
tanks for the help anyway :p
i will when i finish this damn hook
Tell me when you finish it <3
im tired and need to sleep so final bump of this
hey, my joker works! tanks guys :3
Good night :<
:3
Actually Violet, later ofc, but could you explain the concept of the joker
I'm half getting it
I know someone asked this like half an hour ago, but how would you make a joker always appear eternal? I tried stickers = {'eternal'} but that didn't seem to work
Think this should work
card.ability.eternal = true
end,```
speaking of eternals, How do i have a deck spawn a specific modded joker with the eternal sticker?
card:set_eternal(true)
In the add_to_deck
wait my code doesn't have that yet it still works fine
Failsafe for that specifc joker's function
It's eternal for a set amount of rounds before the eternal sticker is removed and it can be sold
No it's when the joker is obtained at all
Think card:set_eternal(true) is for something adding a joker with an eternal sticker actually
yeah i think card: is used for modifying other jokers or the joker that is using card:
card in functions is generally the card that the function is in
bump
wait
oh damn i think the answers in that convo
that didn't work so im once again asking for help
Cryptid wormhole deck does it like this (the deck starting you with an exotic ) https://github.com/SpectralPack/Cryptid/blob/main/items/deck.lua#L223-L236
how do I make a custom enhancement?
i looked at that site, and I am quite new to programming in any language other that gdscript so i'm a bit confused on how to actually create the enhancement, the whole thing looks a bit confusing
thanks! that will be very helpful
Where go custom consumables go in the localization file?
Did you know that VanillaRemade has a localization folder ?
https://github.com/nh6574/VanillaRemade/tree/main/localization
I looked in there and tried but it didn't work
I forgot a = TwT
is there any way to add a mult perma bonus to a card, like hiker adds +5 chips to cards ? i tried just using the hiker re-implementation, but i changed it a little bit to this, but it still adds chips as a perma bonus
The way I found where all the localization goes is putting it in loc_txt and then turning on dump_loc
I figured out what I was doing wrong. It was prefixing my suits with my mod. Which makes perfect sense, ofc, but I for some reason didn't expect it to do that. My modded suit changers are now working. 👍
What does this mean?
I assume the rarity/set you're trying to put it in is invalid
Wait, how do I make my own consumable set?
SMODS.ConsumableType iirc
And in the consumable you don't add a modprefix iirc
tryna make a card like marble joker, but with custom gnome cards instead but it just crashes :( (I am very new to modding btw)
here is code for gnome cards:
SMODS.Enhancement {
key = 'gnome',
pos = { x = 1, y = 0 },
config = { bonus = 500 },
replace_base_card = true,
no_rank = true,
no_suit = true,
always_scores = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.bonus } }
end,
}
In Vanilla Remade there's the modprefix
Yes, it should be m_modprefix_gnome
It was appended in the key too I think
Defining Object Type
and have the texture I want
Loc_txt in the consumable
https://github.com/Steamodded/smods/wiki/Localization#loc_txt
You have to add your own atlas
https://github.com/Steamodded/smods/wiki/SMODS.Atlas
Wait, I have to add that consumable Type to the localization too, right?
Smods Documentation on it https://github.com/Steamodded/smods/wiki/SMODS.ObjectType#api-documentation-smodsconsumabletype
VanillaRemade implementation of spectral set
https://github.com/nh6574/VanillaRemade/blob/main/src/spectrals.lua#L3-L9
Probably
How though?
ok what about putting it in the collection
Handles it automatically I think
Uhh
I don't know where exactly but ^
What is dump loc?
.
including the coloring and in the additions thing?
you can also just check where the localization is in vanillaremade
wait objecttype or consumabletype?
If you want to create a consumable set then use ConsumableType
what's primary and secondary colour
The colors of the consumable label iirc
this is supposed to gain X0.2 mult when a wild card is scored, but for some reason it never scales ? im using the exact same logic in a different joker that scales when bonus cards are scored
i found it
theres a misspelling 😭
how do write a random umm
hex code
Random?
What does default do?
give it a custom color
I think it's the default card that gets chosen when there's nothing left
HEX('FFFFFF')
Why does it always show this? I just can't find out what the problem is
So It’s ```lua
primary_colour = HEX(‘#40FF83’)
and I do the same to secondary_colour?
Should be correct
In my localization:
c_void_chip = {
name = "Void Chip",
text = {
"Next {C: attention}hand gives",
"{C:chips}+#1# but you can",
"only play #2# cards"
}
}
},```
In my dictonary:
```b_c_storm_tokens = "Tokens"```
and in my Labels:
```cstorm_tokens = "Tokens"```
No, remove the #
Although I always removed the # I'm not sure if it matters tho
Is the key Tokens or tokens
Because you use both here
I suck at localization
pools are in a separate file called pools.lua
-- Jokers Pool
SMODS.ObjectType{
key = "bustjokers",
default = "j_busterb_spinel",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
end,
}
-- Mechanical Cards
SMODS.ConsumableType{
key = "mechanical",
default = "c_busterb_offer",
cards = {},
collection_rows = { 4, 4 },
primary_colour = HEX('40FF83'),
secondary_colour = HEX('40FF83'),
shop_rate = 0.05
}```
I never properly used it Somethingcom
Stuck with loc_txt
This is my consumable code:
key = "cstorm_Tokens",
collection_rows = { 4, 5 },
primary_colour = HEX ('000000'),
secondary_colour = HEX ('ffffff'),
}
SMODS.Atlas({
key = "void_chip",
path = "void_chip.png",
px = 71,
py = 95
})
SMODS.Consumable{
key = "void_chip",
set = 'cstorm_Tokens',
atlas = "void_chip",
pos = { x = 0, y = 0},
--config = { },
unlocked = true,
discovered = true,
cost = 5,
}```
I'm confused on how the loc_txt works
Right now I'm just trying to do it in-line as part of the object:
Leaves = SMODS.Suit {
key = 'Leaves',
card_key = 'L',
pos = { y = 3 },
ui_pos = { x = 3, y = 1 },
loc_txt = {
['en-us'] = {
name = "Leaves",
plural = "Leaves",
singular = "Leaf"
}
},
keep_base_colours = true,
hc_colour = HEX('3EA055'),
lc_colour = HEX('3EA055')
}
I have made a localization file and copied the blank skeleton structure from SMODS docs, but I don't want to have to populate it yet. I would like to just be able to see the "Rank of Suit" description in-game, as it were.
is there a context for when you gain or lose money
no
In the dev version yes.
guess ill wait till it gets to stable
Your label uses lowercase and your key uses uppercase for the T
my mod includes gradient i suppose
Like SMODS.Gradient?
which one
the one for progress bars?
its a PR in smods, you should be able to find it
yeah my ease event goes (original value > nil > new value)
sweet ill take a look
go to my mod #1358478527934103572 go to the git then search for --colours
Changed it but still doesn't work
all the stuff is there
i'm attempting something crazy
is this possible
Probably.
yes
how does one get an array of all played cards in a hand
G.play.cards?
G.play.cards
how do you do what cloud 9 does with nines in deck but with suits instead?
instead of :get_id() == 9, :is_suit("suit")
what i meant was emulating super mario bros in balatro
this still doesnt seem to work, am I doing it right?
:is_suit, and its "Hearts"
Yes.
sorry if i'm missing something, but now the card is just doing nothing
how do i get a list of mods installed
SMODS.mod_list
do you have a config in there yet
wait nvm im blind
scrap that
hm
i, have no clue
does it not give you any money at payout screen?
nice
there should be a function for moving cards from an area to another iirc ?
maybe something with that
i found nothing lol
lemme see
how does one get the enhancement of a card from G.play.cards
should be draw_card
yeah bu hod would i add cards back to deck
no
yeah draw_card can add them back to the deck
Just tell me where you wrote the gradients
anyone ?
are you trying to get all enhancements or one from a specific card?
how would i detect
if a sound plays
i wanted to trigger a function
whenever that sound plays
only one from a specific card
what are you trying to do exactly?
i want to check all played cards, and check if theyre wild cards by looping through G.play.cards
joker image is not showing up
then do something if they are wild cards
for k, v in pairs(G.play.cards) do
if SMODS.has_enhancement(v,"enhancement_goes_here") then
-- do something here
end
end
oh wait
you can probably do it easier by looping through context.individual
if context.individual and context.cardarea == G.play then
if SMODS.has_enhancement(context.other_card,"m_wild") then
end
end
wouldnt this act upon them being scored ?
since im using similar logic in other jokers that act upon cards being scored
what do you want to happen to the wild cards found in G.play
sorry im a little slow in the head 😭
nvm i got it
add X0.1 mult to the joker for each played wild card (not scored, this would be too powerful with retriggers)
its alright lmao
if context.before then
for k, v in pairs(G.play.cards) do
if SMODS.has_enhancement(v,"m_wild") then
end
end
end
this could work
lets see
search for a comment --colours in main.lua
this added X0.1 mult only once despite the fact i played 2 cards
wait
i changed to context to context.cardarea == G.play and now it adds too much, weird
uh
if context.before then
local add = 0
for k, v in pairs(G.play.cards) do
if SMODS.has_enhancement(v, "m_wild") then
add = add + 1
end
end
for i = 1, add do
-- upgrade card here
end
end
what the fuck happened to teh code
tysm
nice
i was trying to figure this out for like 30 mins before i asked
lol
oh also
add and not context.blueprint
after context.before
how to make joker like cavendish which only appears after a specific condition is meet?
thanks
Why does my consumable just show this?
In my localization:
c_void_chip = {
name = "Void Chip",
text = {
"Next {C: attention}hand gives",
"{C:chips}+#1# but you can",
"only play #2# cards"
}
}
},```
In my dictonary:
```b_c_storm_Tokens = "Tokens"```
In my Labels:
```cstorm_Tokens = "Tokens"```
And my code:
```SMODS.ConsumableType{
key = "cstorm_Tokens",
collection_rows = { 4, 5 },
primary_colour = HEX ('000000'),
secondary_colour = HEX ('ffffff'),
}
SMODS.Atlas({
key = "void_chip",
path = "void_chip.png",
px = 71,
py = 95
})
SMODS.Consumable{
key = "void_chip",
set = 'cstorm_Tokens',
atlas = "void_chip",
pos = { x = 0, y = 0},
--config = { },
unlocked = true,
discovered = true,
cost = 5,
}```
in dictionary k_cstorm_Tokens = "Token"
and also b_cstorm_Tokens_cards = "Tokens"
Do I add the latter in the dictionary too?
yea both in dictionary
Still shows the same
for the description make sure you include your mod prefix
but for the labels that should've worked
cstorm is my modprefix
c_cstorm_void_chip
idk
going to go work on some joker concepts and such
Can I get the hand select size temporarily down to 1 and if so, how?
how do i set how fast the color rotation is for my SMODS.Gradient
What is 'i' in this case? Is your code inside a for loop of some kind? I don't see any kind of for loop, but using '[i]' implies the contents of your func (except the return) should be in one.
<@&1133519078540185692>
another scam
https://www.love2d.org/wiki/love.filesystem is isDirectory and isFile functions allowed?
-- located in rarities.lua
SMODS.Rarity {
key = "Grandiose",
loc_txt = {
name = "Grandiose",
},
default_weight = 0.0,
pools = { ["Grandiose"] = true },
badge_colour = gradients_grand,
get_weight = function(self, weight, object_type)
return weight
end,
}
-- located in gradients.lua
SMODS.Gradient{
key = "grand",
colours = {
G.C.SPECTRAL,
G.C.PURPLE,
G.C.TAROT,
G.C.RED,
G.C.FILTER,
G.C.GOLD,
G.C.GREEN,
G.C.PLANET,
G.C.CHIPS
},
cycle = 2,
interpolation = 'trig',
}
tell me if i'm doing this right
key = "loneliest",
loc_txt = {
name = "The Loneliest Joker",
text = {
"Gives {X:mult,C:white}X#1#{} Mult",
"if played hand is a ",
"single {C:attention}Ace{}",
}
},
config = {
extra = {
x_mult = 5
}
},
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.Xmult
}
}
end,
rarity = 3,
atlas = 'CC_loneliest',
pos = { x = 1, y = 0 },
cost = 8,
blueprint_compat=true,
eternal_compat=true,
unlocked = true,
discovered = true,
effect=nil,
soul_pos=nil,
calculate = function(self,card,context)
if context.individual and context.cardarea == G.play then
if context.scoring_hand == 1 then
if context.other_card:get_id() == 1 then
if context.joker_main and context.cardarea == G.jokers then
return {
x_mult = card.ability.extra.x_mult
}
end
end
end
end
end
}```
got a problem where the xmult isn't going into the score
i wanted to make a loop where it goes through all the source and reads the directories
is it
gradients_grand
or
'gradients_grand'
you cant put context.joker_main in context.individual
for _, i in ipairs(NFS.getDirectoryItems(SMODS.current_mod.path .. "source/back")) do
assert(SMODS.load_file("source/back/" .. i))()
end
for _, i in ipairs(NFS.getDirectoryItems(SMODS.current_mod.path .. "source/blind")) do
assert(SMODS.load_file("source/blind/" .. i))()
end
for _, i in ipairs(NFS.getDirectoryItems(SMODS.current_mod.path .. "source/joker")) do
assert(SMODS.load_file("source/joker/" .. i))()
end
this so i don't prevent from repeating myself
tru but i thought if i did it separate, it would count towards every hand
what are you trying to do exactly?
bump
What do you mean by "temporarily"? When will hand size be set to 1, and when will it be reverted?
make it so that if played hand is only a single ace, it gives x5 mult. can't have other scored and/or unscored cards
It gets set to 1 when this consumable is used and after one hand gets played it get's reverted to the original. And the hand select size SMODS.change_play_limit
if context.joker_main then
for _, v in pairs(G.play.cards) do
if #G.play.cards == 1 and v:get_id() == 14 then
return{
xmult = whatever
}
end
end
end
something like this i think
and just get rid of everything else in the calculate section?
what is this
The loop would be unnecessary because you only need to check one card. if #G.play.cards == 1 and G.play.cards[1]:get_id() == 14 then would work fine without the loop.
G.play.cards[1]:get_id()
14
No idea, i made it with JokerForge and its a consumable that gives enchantments at the cost of downgrading the card a rank
Good schmorning chat
morning dilly
If your entire context section is just:
if context.joker_main and #G.play.cards == 1 and G.play.cards[1]:get_id() == 14 then
return {
x_mult = card.ability.extra.x_mult
}
end
It' should work.
Good morning dilly
i tried all three functions and all don't work. are they not supported or something
Is that fortnite
average balatro mod
MY BAD
quick question, how do i use the localize function for labels?
What's the name for the variable that saves the hand select size?
What are you trying to do with directories
make one loop to load files so i don't have several blocks for each folder
im pretty sure theres a better way of doing this in the long run
don't repeat yourself
i legitimately just tested out the joker with the xmult = whatever in the code
-# use this
let me try somethin
take your time 👍
probably nothing
its nothing i think
ask localthunk idk man
lol
kind of wanna make a mod that just makes balatro play like texas hold 'em
but that sounds Really Hard
Ofc it was you
What does G.GAME.blind.hands_sub = -1 and discards_sub do?
Try it out, that's the only way to find out :D
the problem is balancing the game to work and adapting how jokers score
bc you can't exactly fold, that just would kill you
Well, it doesn't have to
whatkind of an event handler might i put to just changed the loc_txt if unlocked = false?
Maybe you have a life system and it makes you lose a live? Or reduces your score
nah idea
discards => folds
and it just redraws everything from a reshuffled deck
Good idea!
update on this:
I forgot to make the joker set swapped to true in context.selling_self 😭
-# || @foggy ginkgo @modern kindle as you two were interested ||
yea i was gonna ask you for the joker when i was more awake
I want to put in an unlock condition and a loc_txt for if the deck is locked and idk what event handler to use
You can keep me updated or ask stuff about that if you want since I would really like the idea of your mod
i cannot figure out why the joker isnt triggering
SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}
it's alr n thas fair, i just need to learn to not try and make complicated jokers at 3 am :3
@clear ocean good news i may have made some progress
testing it out to make sure and ill post it here
being a living legend as always
shh


are you sure this one isnt triggering? ive copypasted the code and its working
YEAH
@clear ocean
local function auto_load_with_nfs()
-- Get all items in the mod root directory
local success, items = pcall(NFS.getDirectoryItems, SMODS.current_mod.path)
if not success then
print("damn shawty!!! NFS: Could not access mod directory: " .. SMODS.current_mod.path)
return
end
-- Only scan directories, ignore root .lua files
for _, item in ipairs(items) do
local item_path = SMODS.current_mod.path .. item
-- Check if it's a directory
local dir_success, dir_items = pcall(NFS.getDirectoryItems, item_path)
if dir_success then
-- It's a directory, now load all .lua files in it
print("📁📂 Found directory: " .. item) --idk if im even allowed to just use emojipedias folders icons but idc why wouldnt i be
for _, filename in ipairs(dir_items) do
if filename:match("%.lua$") then
local file_path = item .. "/" .. filename
print("NFS Auto-loading: " .. file_path)
local load_success, error_msg = pcall(function()
assert(SMODS.load_file(file_path))()
end)
if not load_success then
print("OH LAWD MAN WE Failed to load " .. file_path .. ": " .. tostring(error_msg))
end
end
end
end
end
end
auto_load_with_nfs()
you can just remove the silly little emojis they just made logs easier for me to read, theyre from emojipedia lmao
i left u 2 in the print if youd want either or none u can just delete
but this worked for me
shawty got that auto load with nfs
whats your steammodded version?
the most recent?
woops
if it is, i have no clues then
looks like its workin minus the emojis lmao
yeah
might be accidentally calling the function every single time
ill go ahead and clean it up and make a credit in the comments and if i do get around to publishing it ill put your twitter or steam as a credit
you shouldve only had to paste that in the main file once and been fine
cause it only does it once for me
weird maybe because its trying to load the loc files?
it does work but takes a while
i could make a call to skip if its the main file or in the localisation file
or have it pcall to the source folder
mine was immediate (well, as immediate as it could be, my pc has been taking a minute to launch balatro anyway i just ahvent restarted the sys)
is there noway to replace the background shader in this game
show me ur main file where uve put this
and its only in this file? or is it in others too
just this file
hmm
but it does boot so its a bit weird
so its doing it several times but not in a forever loop
how do i add a description for a deck when its locked about how to unlock it
could just be simple and add a flag if a file was already loaded, let me try that and send that
unlock = {
"",
},
take your time 👍
in the main or the deck im assuming the deck
also where do i put the if to change the unlock to true
the same place where your text and description
locked_loc_vars = function(self, info_queue, back)
end,
check_for_unlock = function(self, args)
end
i have it in the same place but there still isnt unlock text
i wasnt having duped file loading but try this maybe
-- Track individual loaded files instead of blocking the entire function
local loaded_files = {}
local function auto_load_with_nfs()
-- Get all items in the mod root directory
local success, items = pcall(NFS.getDirectoryItems, SMODS.current_mod.path)
if not success then
print("damn shawty!!! NFS: Could not access mod directory: " .. SMODS.current_mod.path)
return
end
-- Only scan directories, ignore root .lua files
for _, item in ipairs(items) do
local item_path = SMODS.current_mod.path .. item
-- Check if it's a directory
local dir_success, dir_items = pcall(NFS.getDirectoryItems, item_path)
if dir_success then
-- It's a directory, now load all .lua files in it
print("📁📂 Found directory: " .. item) --idk if im even allowed to just use emojipedias folders icons but idc why wouldnt i be
for _, filename in ipairs(dir_items) do
if filename:match("%.lua$") then
local file_path = item .. "/" .. filename
-- Check if this specific file was already loaded
if not loaded_files[file_path] then
print("NFS Auto-loading: " .. file_path)
local load_success, error_msg = pcall(function()
assert(SMODS.load_file(file_path))()
end)
if load_success then
loaded_files[file_path] = true --Mark this file as loaded
else
print("OH LAWD MAN WE Failed to load " .. file_path .. ": " .. tostring(error_msg))
end
else
print("Skipping already loaded file: " .. file_path)
end
end
end
end
end
print("Auto-loading scan completed, get some cereal")
end
auto_load_with_nfs()
that dosent have the unlock text
you asked for the if statement but yeah sure
okay it might just be my computer 😭
it may be lmao
cause both vers didnt double load for me
maybe i could try putting it a particular lua file?
ayy
how to make card go beyond the standard 71x95 frames? for examle i want to make this one 95x95
do all the other files show getting loaded in console
i mean you could have it 71x71
i dont want to make it 71x71
locked_loc_vars = function(self, info_queue, back)
return { vars = { 20 } }
end,
check_for_unlock = function(self, args)
return args.type == 'discover_amount' and args.amount >= 20
end
how would i change 'discover_amount' to the amount of jokers the player has because the deck should unlock if they have 8
what i tried is this and it crashed
its like magic thank you
no prob :D
feel free to use the code for your own mod too as its not only yours but def would help
and feel free to let others use it too
yea i already swapped to using it, at least the first variant
if i make it i consider it open for everyone
it was even a low priority thing i wanted to do at some point cause several lines just for assert is cringe
i just have many things i want to do
do you have a github or gitlab i can link to
https://github.com/DillyTheDillster
you can always credit this
dilly or dilly_the_dillster?
either one works, the latter would prob be easier to associate me in here with people
👍
cause people call me dilly but my display name is that
you need to check if theres eight jokers in "if" (e.g if args.type == "win" then return true end)
but i dont think theres args.type for checking current number of jokahs in hand
so like this
no just return true
and i think you still need to figure out how to check jokers number
no just return true
yep
can you show me the code and files of the code you copied
sorry for the long delay
i cant remember off the top of my head is there a way to specify the pos of a card in the collection?
ie if i wanted to slot some where vanilla jokers were for thematic purposes
just all the code
ok thx
How do I get the current card selection limit?
how can i hook buying_card
function Card:buying_card didn't seem to work?
trying to get a count of how many jokers you've bought that run
local card_buy_original = Card.buying_card
-- Override method
function Card:buying_card(...)
if self.ability.set == "Joker" then
G.GAME.purchased_jokers = (G.GAME.purchased_jokers or 0) + 1
print("Joker purchased! Total:", G.GAME.purchased_jokers)
end
return card_buy_original(self, ...)
end
yay i did it
how do you make a probability thats influenced by oops
Goatker
Goat
🐐
bepis my wepis
wheres the localization of the white stake located in G.localization?
bump
is it possible to tell the game to re-render the name of a joker
stake_white
yeah i figured it out, thanks
G.hand.config.highlighted_limit
like, dynamically change the name of the joker
yes, you need to return a key in loc_vars to a new localization entry
that changes the description, not the name
it changes both
i am planning to include this in the vanillaremade wiki
can you put me in the vanillaremade wiki
you hate me
also no
you ever just answer your question in the middle of typing it
yeah my question needs to be answered by another question now
i answered the second question too
now answer the other question
i did
now find out the radius
misc = {
challenge_name = {
c_btct_PipisChallenge_1 = "Pipis",
},
dictionary = {
k_shape_booster_group = "Geometric Pack",
k_btct_booster_group = "Batrocities Pack",
k_btct_Elite = "Elite",
},
labels = {
k_btct_Elite = "Elite",
}
}
Did i do my labels and challenge wrong? Because it just says error and idk what im doing wrong?
The label for my consumableType does the same <_>

my booster works but the rarity and challenge doesnt 
fuck
This is my code but I don't have anything with rarity and challenges (yet)
a_chips="+#1#",
a_chips_minus="-#1#",
a_hands="+#1# Hands",
a_handsize="+#1# Hand Size",
a_handsize_minus="-#1# Hand Size",
a_mult="+#1# Mult",
a_mult_minus="-#1# Mult",
a_remaining="#1# Remaining",
a_sold_tally="#1#/#2# Sold",
a_xmult="X#1# Mult",
a_xmult_minus="-X#1# Mult",
k_cstorm_Tokens = "Token",
b_cstorm_Tokens_cards = "Tokens",
},
labels = {
cstorm_Tokens = "Tokens",
cstorm_cracked_stone = "Cracked Stone",
cstorm_death = "Death",
}```
theres nothing with the prefix k_ as far as i know
you know all the mult and xmult messages already exist in vanuilla right...
and chips
actually like everything there except for the hand size
and the sold tally
That's just a template I copied, forgot to remove that @w@
how do you modify the tarot's selection amount?
like get diameter from circumference orrrr...?
for an existing tarot or your own?
i don't need to do anything circle related fortunately
but i am having a new problem
existing
oh ok cause diameter is just circumference/pi (i think)
hey wait a minute
change the max_highlighted in config, assuming youve already done the SMODS.take_ownership stuff
oh nevermind
i haven't and idk how does that work
what does this mean
i'm trying to set a value to either what it already is, or 1, because i'm transferring values from a fusion material joker to the fused joker, but I don't want it to break if you obtain it without fusing it (mostly by spanwing it in with debug or cryptid's DoE)
if I don't do that the values won't exist if you didn't fuse it, but now it's giving me this error
even though card.ability.extra does exist
so, like this?
SMODS.Consumeable:take_ownership('c_strength',
{
config = {max_highlighted = 3}
},
true
)```
wait i'm fuckin stupid nevermind
i was setting card.ability.extra = function but the function doesn't return anything
so it was being set to nil
havent really done much with take_ownership before but that should work, thought maybe you could instead do config.max_highlighted = 3 if that works because doing config = { max_highlighted = 3 } might get rid of other values in the config table
though idk if that matters since strength has no other variables afaik
other cards do have more variables i think so i'm gonna do that
Try change "challenge_name" to "challenge_names"
And remove k_ in label key
when stuff like SMODS.Joker or the like are called, is it immediately injected into the game? if not, when during the mod's loading process does that happen
oh that worked, thanks!
ok
still error
Why does this not work? I just want to bring it down to 1
while G.hand.config.highlighted_limit ~= 1 do
SMODS.change_play_limit(-1)
end
end,```
just do G.hand.config.highlighted_limit = 1? what even is SMODS.change_play_limit anyway
make it 1 instead of -1 maybe?
It changes the number of cards you can play.
yeah but isnt that the same as just changing G.hand.config.highlighted_limit directly
No.
whats the difference then
You can discard and play different amounts of cards.
what happened to balaui??
ah i see
also does anyone just have an image of a raw deck back (like red deck)
like this?
So how do I change the play amount to 1 instead of my while loop?
You would add SMODS.change_discard_limit(-1) into the while loop.
Why? What does that do?
yes
i want to make a joker that, while in posession of, changes glass card's xmult to xchips.
...given that the xmult comes from the enhancer config, how do i go about doing this? do i nullify the config values and do it via context.individual instead?
Yes.
Idk then
how do i slot this into a voucher?
i thought of putting it in overrides but that doesn't work
do i just put it into calculate inside of it? 🤔
if you want to only change the values with a certain voucher youll probably need to do other stuff, i'd look into how cryptid reduces the selection limit of tarots in one of its stakes (kinda hate suggesting cryptid as a reference because its kind of a mess but thats all i can think of)
My while loop just starts to spam the console with "Play limit is less than 1" and "Discard limit is less than 0", making my game freeze
sadge
misc = {
challenge_names = {
c_btct_PipisChallenge_1 = "Pipis",
},
dictionary = {
k_shape_booster_group = "Geometric Pack",
k_btct_booster_group = "Batrocities Pack",
k_btct_Elite = "Elite",
},
labels = {
btct_Elite = "Elite",
},
}
genuinely what is G.I.CARD, i cant figure it out from the code
It's a table with every card.
as in, every card that currently exists?
Yes.
So, how do I get my play limit down to 1 without that while loop?
yeah, about that...
Cant you just Do something like SMODS.change_play_limit(-G.hand.config.highlighted_limit + 1)?
this is the only reference I found to that stake (aside from setting the stake itself)
it says it's not working :(
yk i kinda half expected that from cryptid tbh
same
why is my game complaining about there being no end to this if when there is one?
-- JimathanAnimation
local btct = {ticks = (5)}
local upd = Game.update
local btct_Jimathan_dt = 0
function Game:update(dt)
upd(self, dt)
local Jimathanobj = G.P_CENTERS.j_btct_Jimathan
btct_Jimathan_dt = btct_Jimathan_dt + dt
if Jimathanobj and btct_Jimathan_dt > 0.1 then
btct_Jimathan_dt = btct_Jimathan_dt - 0.1
if Jimathanobj.pos.x > 3 then
Jimathanobj.pos.x = 0
else
Jimathanobj.pos.x = Jimathanobj.pos.x + 1
end
end
for k, v in pairs(G.I.CARD) do
if v.children.joker and v.children.joker.atlas == G.ASSET_ATLAS["btct_JimathanAtlas"] then
v.children.floating_sprite:set_sprite_pos({x = 0, y = 1})
end
end
end
why does this just update the background and not the soul itself?
oh, i didn't put it in a table
Just thought of that myself but thank you anyway :3
Because v.children.joker doesn't exist.
ohhhh, what can i do to change that then?
Change it to v.children.floating_sprite
ok
Is there a way to add a set chip amount to the next hand played and then reset back to original values for the hand and play limit afterwards?
for k, v in pairs(G.I.CARD) do
if v.children.floating_sprite and v.children.floating_sprite.atlas == G.ASSET_ATLAS["btct_JimathanAtlas"] then
v.children.floating_sprite:set_sprite_pos({x = 0, y = 1})
end
end
is this right?
Yes.
if i set a value
to be X value or Y
Z = X or Y
it gets set to X if X value exists, but Y if X does not exist, correct?
yes
then why the fuck isn't this working
i feel like i'm going insane I've got code here in my joker
for context i'm transferring a LOT of values from 1 joker to another
because fusionjokers can't transfer tables when fusing jokers I have to do it myself
everything works except actually putting the table of values into the joker as the last step
but when I do the last step manually with debugplus, it just works
why can't you transfer tables?
the joker can't do it itself for some reason and I don't know why
I tried it and it didn't work
I don't know what to tell you
what method are you using?
on the material's remove_from_deck, i set a global table to be equal to its card.ability.extra
on the fused joker's set_ability, I set its card.ability.extra to be equal to that global table or a list of dummy values for card.ability.extra so it doesn't crash if you look at it in the collection
i can't use a local table because i'm moving the table between files, I put the legendary and gold fusion jokers in different files
but the table starts with my mod name so it shouldn't clash with anything ever
the fused joker just simply isn't doing this part
on the fused joker's set_ability, I set its card.ability.extra to be equal to that global table or a list of dummy values
it always uses everything after theoreven though the value before does exist
and it works if I do that final step manually using debugplus eval
the other code in its set_ability also runs perfectly fine
are you handling all your fusion stuff within remove from deck and set_ability?
Hello Eremel! :) Thanks for addressing the money_altered janky delay issue and other stuff, thought I was going insane there for a moment
not all of it, just for this one joker
because this one joker has way too many values that I need to transfer and no other method worked so far
the fusion API handles actually fusing the joker as usual
Hello! for reference, it is much easier to communicate stuff like that through either a ping on here, or more prefereably on the smods discord
-- FlopprAnimation
local btct = {ticks = (5)}
local upd = Game.update
local btct_Floppr_dt = 0
function Game:update(dt)
upd(self, dt)
local Flopprobj = G.P_CENTERS.j_btct_Floppr
btct_Floppr_dt = btct_Floppr_dt + dt
if Flopprobj and btct_Floppr_dt > 0.1 then
btct_Floppr_dt = btct_Floppr_dt - 0.1
if Flopprobj.pos.x > 10 then
Flopprobj.pos.x = 0
else
Flopprobj.pos.x = Flopprobj.pos.x + 1
end
end
for k, v in pairs(G.I.CARD) do
if v.children.floating_sprite and v.children.floating_sprite.atlas == G.ASSET_ATLAS["btct_FlopprAtlas"] then
v.children.floating_sprite:set_sprite_pos({x = 0, y = 4})
end
end
end
It just changes the background instead of the soul itself.
I am not a fan of reading through multiple git messages
can't you put some stuff in that that handles transferring the values? it seems like an important part of fusions
it also means that people who don't religiously keep up to date with git can chime in which is helpful
jokers tend to not really need to transfer 8 different values of different types at the same time
I think fusionjokers got edited to allow you to transfer 2 values at once and you can add them together if you want
nobody else really makes fusions anymore though, and I've only run into this once on this joker right now
are you transferring everything from one table to the other?
everything yes
are there any repeats across the two?
i separated the other values of the fused joker so nothing clashes
have you tried using SMODS.merge_defaults?
there are no repeats because the fused joker doesn't have any values in that table at default
Yes, you're changing the pos instead of the soul_pos
i've never heard of this what does it do
I can try that
the jokers aren't being added in
the main issue is that if I use a function to merge the values, I still need to use an or somewhere
because otherwise the joker will crash in the collection
You mean the file isnt loading?
if I have the fused joker already have the values nothing will get merged because they're all dupes so it crashes on hover in collection
I made a table merge function myself and tried to do it that way and crashing on hover in the collection is kind of a bad thing
so I feel like it doesn't really solve the root issue of or not working for no reason
OHHHHHHHH ok thanks
Does the console say they loaded cause I dont think itll print in game
i can switch them to sendMessage functions
As they are if you didnt change what i sent itll print in the console
So dont need to
Just read the console
Bump
i have an idea (very bad idea):
patch the whole consumables list into checking if the voucher is there or not
i know that will work for sure :clueless:
i mean you could probably instead do smth with the function that checks if you are below the selection limit for the card instead
can you show the big that isnt working
-- FlopprAnimation
local btct = {ticks = (5)}
local upd = Game.update
local btct_Floppr_dt = 0
function Game:update(dt)
upd(self, dt)
local Flopprobj = G.P_CENTERS.j_btct_Floppr
btct_Floppr_dt = btct_Floppr_dt + dt
if Flopprobj and btct_Floppr_dt > 0.1 then
btct_Floppr_dt = btct_Floppr_dt - 0.1
if Flopprobj.soul_pos.x > 10 then
Flopprobj.soul_pos.x = 0
else
Flopprobj.soul_pos.x = Flopprobj.soul_pos.x + 1
end
end
for k, v in pairs(G.I.CARD) do
if v.children.floating_sprite and v.children.floating_sprite.atlas == G.ASSET_ATLAS["btct_FlopprAtlas"] then
v.children.floating_sprite:set_sprite_pos({x = 0, y = 4})
end
end
end
this still doesnt work...
-# (im very not smart D:)
maybe it's trying to load the file from the root?
mine doesnt so
that didnt do it
Yes, it would be v.children.floating_sprite:set_sprite_pos(Flopprobj.soul_pos)
humor me and just name the folder sourcejoker
oh i see thanks, would i not have to the x and y then?
this is my code to unlock a deck when the player has 8 jokers and it crashed and i cant find the error
can you zip your mod and dm it to me
the other code in here works fine (it gets the win sticker for another one of my jokers, the gimmick of the gold legendary fusions is that they gain additional effects scaling based on the stake you've won with another joker on)
Tsunami_Rise_Transfer is the global table I'm using to transfer them, and if I set the fused joker's card.ability.extra to Tsunami_Rise_Transfer using debugplus after fusing the joker it works, so I don't think it's anything to do with this table in itself
this or and any or i put here as a matter of fact simply doesn't work and I don't get why when Tsunami_Rise_Transfer clearly exists and I can access it
have you tried printing it on the line above to make sure it's actually got stuff in
i've printed it out with debugplus after fusing it and it does indeed have the right things in it
as mentioned if I set its card.ability.extra table to Tsunami_Rise_Transfer after fusing it with debugplus, everything works
okay so, in the sc i didnt realize it was a further folder within source
i only check one nesting level, ill fix that real quick
it works now thanks
I tried doing if Tsunami_Rise_Transfer instead of the or to check it exists, but that didn't work either and I also don't know why
if Tsunami_Rise_Transfer ~= nil also did not work for this
So, I'd like to make a poker hand that is three of a kind all one suit, and a pair of a different suit, but I have no clue what I'm doing, and I think I've just recreated a normal full house. How would I do this?
take your time. i'm going to mess around with libresprite to make art for assembly (the cousin to blueprint)
just put print(Tsuname_Rise_Transfer) as the first line in set ability and see what it is
the idea is have it like this and have jimbo in the middle or just jimbo in ascii text
bump2
are you setting the global to nil afterwards
which one is that?
I disabled that part of the code while I debug it
I will make it do that after I get the value transfer to actually work
oh no, you shouldnt I was just asking if you did
i have no clue im just throwing out an idea
is there a libre/asprite palette for balatro?
in general it's not a good idea to save a global table in a card without copying it
you can make it create palette from image and there's a post in the modding forums with palettes for stuff
it crashed because it doesn't exist and I think I know what's happening now
the fusion happens all at the same time
the transfer table doesn't exist until after the joker has been fused
and that's too late to do it
I either have to save the transfer table sooner or merge it later and I don't think I can do either of those in an efficient manner that won't break
I could have the transfer table save as a lazy update in every context on the original joker
assuming that's not too resource intensive
yeah that's probably the only way I can do this
you could just build it into the api
I mean it seems like something that it should cover
being limited to only merging two values seems strange
you know that simpsons episode where mr burns gets told that he has every disease ever but because he has every disease none of them can get him cause they all try at the same time
that's what fusionjokers is nowadays
is it possible to change the sprite pos when a specific hand is played or when something happens or smth?
ok thanks
it's just not something the original dev ever ran into, fusionjokers wasn't intended to be used this way
but every dev who works on fusionjokers just leaves and then someone else has to maintain it
I can't really understand how its code works even if I wanted to change it myself and I fear that if I did it would cause a crash when you fuse anything that would require every other fusion joker to make a change to its API call
it's not looking great and I don't want to make it worse
is there one for changing soul pos?
it would be the same function but in the soul sprite
i dont remember the name of the field
cause just doing card.children.center:set_sprite_soul_pos({ x = 0, y = 4 }) wouldnt work thats all i know
i found it
its card.children.floating_sprite:set_sprite_pos
bump
if context.individual and context.cardarea == G.play and context.other_card:get_id() == 14 then
card.children.floating_sprite:set_sprite_pos({ x = 0, y = 4 })
return {
xmult = card.ability.extra.xmult
}
end
ok now it just doesnt change, how can i fix this?
Yo does anyone know how to add/replace the scoring sound for jokers like scary face or odd todd?
code for if it's the start of the round?
in reset_game_globals, how can i only activate my code if the last blind was a boss blind?
context.setting_blind?
ill try it
it's me again
why does copying Card:can_use_consumeable into my overrides.lua makes tarots stop working inside of packs?
whats the code
How could I check if groups of cards sharing the same rank (parts._3) also share the same suit in a poker hand? So far I've only found ways to check if a poker hand is a flush, but I'd like to check if groups of the same rank also share the same suit.
trying to make it so every round gives you a spectral card
if context.setting_blind and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = (function()
local card = create_card('Spectral',G.consumeables, nil, nil, nil, nil, nil, 'sea')
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
return true
end)}))
return {
message = localize('k_plus_spectral'),
colour = G.C.SECONDARY_SET.Spectral,
card = self
}
end
end```
but there's an error that's just this
remove card = self
literally just copy paste at the end of the file
i knew i should've done that omg
the one from vanilla or the one from the lovely dump
thanks so much kind sir and/or madam
This is why N is the goat
vanilla
try the one from the lovely dump
but also it's not a good idea to replace functions lol
i'm trying to make a voucher that increases the effects of all consumables. i tried some things and even went into cryptid code (ew). in the end i decided to modify the function with the cards (or the cards themselves, but i haven't gone there yet)
also i was told that :take_ownership is what i want but i don't know where to put it so that it will work
bump
the only example of this i can think of is cryptid's ultimate pair
check it out
that didn't work :(
can i see what youre doing
Bump
i also tried patching it in but now that you mention the lovely dump that was probably the reason it didn't work
also i'm still trying to find a way of doing it with :take_ownership if you have any ideas :>
i tried to make this to unlock my deck but it crashes and i dont think its syntax so idk
Can u send crash?
i know it has to do with that because it dosent crash without it
doesnt it tell you
[SMODS M's Things "./data/decks/construction.lua"]:39: unexpected symbol near '}'"
idk what that means
its this and the part that crashes is the part to unlock the deck
isnt your calculate missing an end
vscode tells you if youre missing something like that, its underlined red
witht the end i get a different crash
then it means youre missing something else
more than 1 thing can be wrong
but you are definitely missing an end
i would recommend reading more on lua, smods docs, and learn from other mods
bump
pretty sure this thing dont work. any ideas?
Is there a way to add a set chip amount to the next hand played and then reset back to original values for the hand and play limit afterwards? I need it for my consumable
quick question is there a context for using a consumable from a booster pack?
code for destroying a joker every round?
like at start of round?
yes like madness
https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua
this might help you
"If only there was a complete implementation of existing effects.."
The goated and esteemed VanillaRemade Repo:

This is why N' is the goat
Bump
wow this time I only asked 1 question, I'm getting better chat
i wanna make a joker that can softlock the game and forces a run reset if the blind was beaten by at least 3x the required score 
i know how to check against the score now, but what are some ways i can softlock the game in this way? ideally, i would like the event queue to still be running
brilliant idea and way to nerf me lol
how can you check if a consumable has been discovered?
is it necessary to have different atlases if they have the same png?
probably stupid question
no
k
you can use the same one
is there a way to check the blind score and how much youve scored currently?
how do you make a planet level up twice?
Another Bump
ok thanks
someone help gigachad out this is his second bump
(I've been waiting hours by now... But it's fine :3)
code for destroying a specific joker?
example: perry the joker destroing the joker-inator when he's bought
if you have the joker in your hand
wow
with hammers
Obliterate his line
crucifixion time
thanks mods
thanks so much mods
🔫
There my freaking goat
i feel ive tried everything i can find to try and get this card undebuffed but nothing shown in the screenshot has worked no matter what configuration i try
how many people are sending scams and such- anywho, what do you think about this voucher
bump3 (Can anyone just help, please?)
i could make it for discarding and hand or just discarding
what are you bumping
there was no reply there
this, my bad
poker hand size?
on default you can select up to five but theres an api call to lower or increase the number
selection limit
oh i got an idea for a voucher, increase the chances of an uncommon or rare joker card
ah
can either make one just for uncommon cards and then rare cards or do something like hone/glow up
-- inside of perrytheplatypus.lua
if context.card_added and context.card.config.center.key = 'j_modID_jokerinator'
for _,v in ipairs(G.jokers) do
if v.config.center.key == 'j_modID_jokerinator' then
v.getting_sliced = true
-- this part was copied from dagger
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
G.E_MANAGER:add_event(Event({
func = function()
G.GAME.joker_buffer = 0
v:start_dissolve({ HEX("57ecab") }, nil, 1.6)
return true
end
}))
end
end
end
try this (might need some debugging xd)
peak???
uncommon then rare as the two tiers
is there a way to check the chips that are about to be scored?
I give up asking questions since it seems like nobody knows it
Nice idea :3
normally my questions take at least a day to get answered, dont give up after an hour of asking
also that question is a little hard in general
and the wording is a little confusing
I'm asking stuff everyday and rarely get replies
Why?
me too, but i still keep asking and i rarely give up asking unless it's been 2 or so days, and then i come back later that week to ask again
i find it easier to get answers to wait for The Guys That Know™ to be online so that they can actually see your question
Like this?:
How can I add a set chip amount to the next played hand and put the play limit size down to 1, to then reset everything back to the original stuff after the scoring of that hand, just like it was before? It’s for a consumable effect.
Who are all those guys?
name is inspired by baseball joker but maybe the latter is too long
maybe something like "double fine" or "third base"
what do you yall think for the voucher names
Perfect
If you want the one shorter, maybe call it 'Out the Park'?
or Park Out?
By the way, what could I do, while I wait for my question to be answered?
They rarely help bc most times my issues are just caused by stupidity :3
same