#💻・modding-dev
1 messages · Page 124 of 1
nvm jsut destroying everything but aces and tens
SMODS.Joker {
atlas = 'AikoyoriJokers',
pos = {
x = 4,
y = 0
},
key = "Netherite Pickaxe",
rarity = 1,
cost = 3,
loc_vars = function(self, info_queue, card)
return {
vars = {card.ability.extra.chip_add, card.ability.extra.chip_add_stack}
}
end,
loc_txt = {
name = "Netherite Pickaxe",
text = {"{C:chips}+#1#{} Chips for {C:attention}#2#{} times",
"for every {C:attention}Stone{} Cards scored",
"{C:red,E:1}Destroys that card"
}
},
config = {
name = "Netherite Pickaxe",
extra = {
chip_add = 64,
chip_add_stack = 5,
}
},
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card.ability.name == "Stone Card" then
for i = 1, card.ability.extra.chip_add_stack do
G.E_MANAGER:add_event(Event({
func = function()
SMODS.eval_this(card, {
chip_mod = card.ability.extra.chip_add,
instant = true,
colour = G.C.CHIPS,
message = localize {
type = 'variable',
key = 'a_chips',
vars = {card.ability.extra.chip_add}
},
})
return true
end,
trigger = "before",
delay = 0.2,
}),'base')
end
G.E_MANAGER:add_event(Event({
func = function()
context.other_card:start_dissolve({G.C.BLUE}, nil, 1.6, false)
return true
end,
delay = 0.5,
}),'base')
end
end
if context.destroying_card and not context.blueprint and not context.destroying_card.ability.eternal then
return true
end
end,
blueprint_compat = false
}
ill come back tomorrow
I lowkey forgot I was on mobile so the formatting is absolutely horrendous and unreadable for me lmfao
here is the important bit
no not at all
nvm that doesnt work 😭
I’ve never actually used eval_this yet so I couldn’t tell ya
this is a ridiculously convoluted way of adding chips
i know
i want to add it in 5 stacks of 64
because giving flat 320 is kinda boring
yeah
do SMODS.poll_enhancement and poll_seal require the card to not already have an enhancement/seal to work
no but I want to apply a random enhancement and seal to a card and it's not working even though I did everything right
in context.before
set_ability needs a center given to it, not a key
why didn't i even think of this
but then at least the seal should be working? cryptid does it this way with seal the deal
how do I get it to work with a key instead of a center
just put the key in G.P_CENTERS[keyhere]
oh
the seal one should work though
so would this work
value:set_ability(G.P_CENTERS[SMODS.poll_enhancement({guaranteed = true, type_key = 'waterenhance'})], true, false)
guys how do i change the amount of discards
also yeah the seal's just not working, but it doesn't crash either, it does juice_up and then nothing happens
im tryna do a test and need more discards
hold tab with debugplus it probably has a thing for +discard
yeah that enhancement should work now
oh yea it does
this also works which is lovely
holy
diamond pickaxe not making diamonds moment
lovely like the runtime code injector for games built with love2d?
i really love the lego version
What am I missing
okay uhh
i did a stupid
forgot to put the code that sets enhancement/seal inside the context
the end was in the wrong place
it's still not working
i just realized i was looking at the actual hand instead of the played one
OMFG
pluh
can hooks be used to add custom colors? for text formatting
okay i've got nothing
I'm just trying to make a simple Joker that just gives 69 mult, anyone know what I did wrong?
idk what i'm doing wrong here
guys please help idk what to do
SMODS.Joker {
key = 'jjj',
loc_txt = {
name = "J. J. Joker",
text = {
"Retrigger entire hand",
"if played hand contains",
"an {C:attention}Ace{} and a {C:attention}10{}"
}
},
rarity = 2,
atlas = 'atlas',
pos = {x=3, y=0},
cost = 7,
calculate = function(self, card, context)
if context.joker_main then
local has_ace = false
local has_ten = false
for _, hand_card in ipairs(G.hand.cards) do
if hand_card:get_id() == 14 then
has_ace = true
elseif hand_card:get_id() == 10 then
has_ten = true
end
if has_ace and has_ten then
break
end
end
if has_ace and has_ten then
local result = {}
for i = 1, context.joker_count or 1 do
for _, hand_card in ipairs(G.hand.cards) do
table.insert(result, {
message = localize('k_again_ex'),
repetitions = 1,
card = hand_card
})
end
end
return result
end
end
end
}
``` it seems i have no idea how to check scoring hand, not only that there could be another issue of what im doing that i just dont know of
HELP
PLEASE AAAAAAAAAAA
marie can you send me the whole code block?
I used the example jokers file so I have no clue what is wrong with this. Just trying to give a joker 69 mult
I tried and failed, if you want to use a lovely patch here's what I used
# Add new colors
[[patches]]
[patches.pattern]
target = "globals.lua"
pattern = "RARITY = {"
position = "before"
payload = '''
ALIGNMENT = {
cs_patron = HEX("8bfe0f"),
cs_joker = HEX("fefe15"),
cs_wicked = HEX("f80404"),
cs_keeper = HEX("feae0a"),
cs_muggle = HEX("cccccc"),
cs_hacker = HEX("febfe9"),
cs_thief = HEX("0146fe"),
cs_archon = HEX("23ee9c"),
cs_drifter = HEX("b3e87a"),
cs_heretic = HEX("b9a0e6"),
cs_spectre = HEX("0dfefe"),
cs_chameleon = HEX("cc03ed"),
},
CS_ORANGE = HEX("b03815"),'''
match_indent = true
# Add new colors
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "legendary = G.C.RARITY[4],"
position = "after"
payload = '''
cs_patron = G.C.ALIGNMENT["cs_patron"],
cs_joker = G.C.ALIGNMENT["cs_joker"],
cs_wicked = G.C.ALIGNMENT["cs_wicked"],
cs_keeper = G.C.ALIGNMENT["cs_keeper"],
cs_muggle = G.C.ALIGNMENT["cs_muggle"],
cs_hacker = G.C.ALIGNMENT["cs_hacker"],
cs_thief = G.C.ALIGNMENT["cs_thief"],
cs_archon = G.C.ALIGNMENT["cs_archon"],
cs_drifter = G.C.ALIGNMENT["cs_drifter"],
cs_heretic = G.C.ALIGNMENT["cs_heretic"],
cs_spectre = G.C.ALIGNMENT["cs_spectre"],
cs_chameleon = G.C.ALIGNMENT["cs_chameleon"],
cs_orange = G.C.CS_ORANGE,
'''
match_indent = true```
calculate = function(self, card, context)
if context.before then
for index, value in ipairs(G.play.cards) do
value.cut = false
if value.ability_name == "Stone Card" then
value:set_ability(G.P_CENTERS[SMODS.poll_enhancement({guaranteed = true, type_key = 'waterenhance'})], true, false)
value:set_seal(SMODS.poll_seal({guaranteed = true, type_key = 'waterseal'}), true, false)
value:juice_up()
value.cut = true
end
if card_is_splashed(value) == true and value.cut ~= true then
value:set_ability(G.P_CENTERS.m_stone, nil, true)
G.E_MANAGER:add_event(Event({
func = function()
value:juice_up()
return true
end
}))
end
value.cut = false
end
end
end
right now it's this
the part that makes every unscored card into a stone card works as expected
but I want the random enhancement + seal to trigger first, and any card with the random enhancement/seal won't be turned back into a stone card by the second effect
which is what value.cut is supposed to do
yes
you're looping G.hand.cards instead of G.play.cards (or context.scoring_hand)
ok well i think it's a bit broken
what is it even doing😆
local hooklc = loc_colour
function loc_colour(_c, _default)
if not G.ARGS.LOC_COLOURS then
hooklc()
end
G.ARGS.LOC_COLOURS.your_color= HEX("FFFFFF")
return hooklc(_c, _default)
end
this'll do it, you then refer to your color with {C:your_color}
and you said it juices correctly?
Anyone able to VC and help me fix my single Joker mod? It should be really simple because it's just one Joker that gives static mult
the juice for the set unscored cards to stone cards works
I haven't gotten the enhancement/seal effect to even run
change if value.ability_name == 'Stone Card' then to if value.config.center_key == 'm_stone' then
rip sleep schedule
i changed the for loops to G.play.cards
uh it still does nothing
anyway
I'm working on #1326135270759993364
I'm going to add new blinds tomorrow
for no reason
that worked thanks
is there any way I can make poll_enhancement ignore stone card but generate any other enhancement
just check if it's stone or not and repoll if it is
idk what context.joker_count is
shouldnt you be using #G.jokers.cards?
also theres another ipairs(G.hand.cards) instead of ipairs(G.play.cards)
what does poll_enhancement do actually
ok wait nvm i fucked up on my end LMAO
random enhancement
yay yay yay it worked imagine me showering you in confetti
Field G?
i didn't do it like that 😭
banana
local NON_STONE_UPGRADES = {}
for k, v in pairs(G.P_CENTER_POOLS["Enhanced"]) do
if v.key ~= 'm_stone' then
NON_STONE_UPGRADES[#NON_STONE_UPGRADES + 1] = v
end
end
is it an even chance for each enhanchment or is poly rarer
it's enhancement, not edition
you know what the hardest part of my mod is gonna be. how tf is flower pot gonna work if theres more suits than there are cards in a hand
my bad
flower pot only checks for vanilla suits
but is it even
i think poll_ediiton weight goes foil < holo < poly < negative
erm... thats lame!!
i cant imagine why poll_enhancement or poll_seal would have different weights
i was thinking having it be any four different suits
IIRC poy and negative have the same rarity
wheel of fortune 2
that doesn't sound like a difficult patch to make
New spectral card idea
50% go to the boss blind immediately
50% go to ante 1
is this too broken
ok fixed and it still does nothing
i just have some gut feeling that i used a single wrong parameter or smth and its fucking it up
heres my calculate
calculate = function(self, card, context)
if context.joker_main then
local has_ace = false
local has_ten = false
for _, hand_card in ipairs(G.play.cards) do
if hand_card:get_id() == 14 then
has_ace = true
elseif hand_card:get_id() == 10 then
has_ten = true
end
if has_ace and has_ten then
break
end
end
if has_ace and has_ten then
local result = {}
for i = 1, #G.jokers.cards or 1 do
for _, hand_card in ipairs(G.play.cards) do
table.insert(result, #result+1, {
message = localize('k_again_ex'),
repetitions = 1,
card = hand_card
})
end
end
return result
end
end
end
LOL
how do you actually flip it and flip back
do you just make an event to do it or something
I made it into a utils function
for i=1, #table do
local percent = 1.15 - (i-0.999)/(#table-0.998)*0.3
G.E_MANAGER:add_event(Event({trigger = trigger,delay = delay,func = function() table[i]:flip();play_sound('card1', percent);table[i]:juice_up(0.3, 0.3);return true end }))
end
end
function cs_utils.unflip_cards(table, trigger, delay)
for i=1, #table do
local percent = 0.85 + (i-0.999)/(#table-0.998)*0.3
G.E_MANAGER:add_event(Event({trigger = trigger,delay = delay,func = function() table[i]:flip();play_sound('tarot2', percent, 0.6);table[i]:juice_up(0.3, 0.3);return true end }))
end
end```
yes its events
it's not doing its intended effect so yeah it's pretty powerful
thats its intended effect tho
then why did you write "and vice versa"
it found a better hand
.
(Finds a better hand if possible)
i don't understand the design philosophy but pop off I guess
also uhh
objection
a five of a kind with 9s is better than one with 6s
it did not find the best hand it could make
🤓 ☝️
oh yeah I turn the fewer cards into the ones that there are the most of
when that perkeo hits
you just gave me a really good idea for a mod
😭😭😭😭😭😭
balatro monopoly mod
noooo 😭😭😭😭
might do that at some point
i say might because I already have another mod idea to do first and i've already got tsunami to deal with
base enhancements and seals all have the same weight, editions are foil:20, holo:14, poly:3, negative:3 but in a no_neg poll poly is 6
noted
iirc, enhancements and seals default to a weight of 5 for comparison with modded content
once i get this workng.... >:)
EVEN MORE AHHAAAH
so whats wrong specifically
i have no idea
it just does nothing when i play a hand with scoring aces and 10s
um... can you return a table like that for repetitions?
i have no idea its just what i thought from hack 😭
what happens if you return what youre inserting in the table in the for
well yea thats what it does
it returns that table
and does nothing
sadlys
I dont think you can retrigger jokers like that
its supposed to retrigger card hands (every single one) if it finds ace and ten
wait
tf is the for i in g.jokers.cards for
😭
lemme try killing that random nested for statement and just doing for _, hand_card etc
but yeah i dont think thats gonna work to retrigger the entire played hand
here is what im doing rn
SMODS.Joker {
key = 'jjj',
loc_txt = {
name = "J. J. Joker",
text = {
"Retrigger entire hand",
"if played hand contains",
"an {C:attention}Ace{} and a {C:attention}10{}"
}
},
rarity = 2,
atlas = 'atlas',
pos = {x=3, y=0},
cost = 7,
calculate = function(self, card, context)
if context.joker_main then
local has_ace = false
local has_ten = false
for _, hand_card in ipairs(G.play.cards) do
if hand_card:get_id() == 14 then
has_ace = true
elseif hand_card:get_id() == 10 then
has_ten = true
end
if has_ace and has_ten then
break
end
end
if has_ace and has_ten then
local result = {}
for _, hand_card in ipairs(G.play.cards) do
table.insert(result, #result+1, {
message = localize('k_again_ex'),
repetitions = 1,
card = hand_card
})
end
return result
end
end
end
}
um no that doesnt look like it will work
ye uh but
i just wrote stuff 😭
relatable
i still dont get what retrigger api is and if it could help in this scenario
searching it up gave literally no info
just like do what photograph does
Or probably just steal this https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua#L207
ok i have an idea
let me try smth
i MIGHTVE made something
now its just time to test
calculate = function(self, card, context)
local has_ace = false
local has_10 = false
if context.cardarea == G.play and context.repetition and not context.repetition_only then
if context.other_card == 14 then
has_ace = true
elseif context.other_card == 10 then
has_10 = true
end
if has_ace and has_10 then
if context.other_card then
return {
message = 'Again!',
repetitions = 1,
card = context.other_card
}
end
end
end
end
this will only retrigger if other_card is both the number 10 and 14
the loop from before was correct
just take_ownership and put a new calculate function
oh yeah
AAAAAAAAAAAAAA
oh
i straight up just pasted the flower pot code in and edited it
so theres bound to be some error
most likely as to what im putting through the function
self in the vanilla code and smods code is different
should use card instead of self
self is the center
ah
also the name check isn't nessicary
i assumed it wasnt
but theres liely another check above that yopu are missing
so do i do a context thing in that loop?
yeah the return from the second block

if has_ace and has_ten then
local result = {}
for _, hand_card in ipairs(G.play.cards) do
return {
message = 'Again!',
repetitions = 1,
card = hand_card
}
end
end```
?
why so much tabbed
why are you looping the return?
copy and paste does awful things
so i just return
if has_ace and has_ten then
local result = {}
return {
message = 'Again!',
repetitions = 1,
card = --[[i have no idea]]
}
end
yeah something like that
btw do i put card as G.play.cards bc well i dont see how id repetition the entire played hand a different way
the calculate is called for each card
card is an argument of calculate, i assumed that was well
the card its on rn
card is your joker
oh
wait then what is self doing ther?
your center
yes
ok imma test it now🤞
ok then :(
ok maybe its that i had 27 of them
i tried one and it did the same thing
calculate = function(self, card, context)
if context.joker_main then
local has_ace = false
local has_ten = false
for _, hand_card in ipairs(G.play.cards) do
if hand_card:get_id() == 14 then
has_ace = true
elseif hand_card:get_id() == 10 then
has_ten = true
end
if has_ace and has_ten then
break
end
end
if has_ace and has_ten then
local result = {}
return {
message = 'Again!',
repetitions = 1,
card = context.other_card
}
end
end
end
``` theres gotta be smth im missing here
ooh i have an idea
use config for has_ace and has_ten instead
maybe
wrong context
what context should i use then
context.cardarea == G.play?
if context.cardarea == G.play and context.repetition and not context.repetition_only then
thx
still nothing AAAAAAA
ok so i added a debug print in the seconf if block and it doesnt even print
OH WAIT IM STUPID
YES IT WORKS
LETS GOO
tysm
what would be the best and easiest way to have a joker cycle through different abilities in sequential order? id really like it if i could find a joker that does something similar but i cannot, vanilla or otherwise
so you get the joker and it has abilities 1-7 lets say, and when you select a blind it moves onto the next ability (either starts at a random point or always starts at one)
assumes joker has config = { extra = { rotation = 7 } }
<calculate line>
if context.setting_blind then
card.ability.extra.rotation = card.ability.extra.rotation + 1
if card.ability.extra.rotation == 8 then
card.ability.extra.rotation = 1
end
end
---example rotation effect
if context.end_of_round and card.ability.extra.rotation == 1 then
---end of round effect
end
something like this should work
the rotation starts at 7 because if you get the joker from the shop, it will then advance the ability rotation by 1 on the next blind, so it actually starts at 1. If it started at 1 from shop, then it'd actually start at 2 in the next blind, which skips rotation 1, you can change the starting value for rotation if you don't like that, or during set_ability you can call a random value for the rotation to have it start on a random one
and it resets to 1 when it hits 8 so it goes 1 through 7 then back to 1
awesome, thank you so much!
anywho
how the hell do tags work
I thought I did everything right with mine but I keep getting this crash
and I can't understand the code around that line to figure out why it's happening
but I can only assume it's because of poll_edition
code
try moving the end after the return
ah shit
didn't work
identical crash
i assume you meant the end 4 lines from the bottom and the return 2 lines from the bottom
or did you mean the return/end at the top
oh
that changed the crash
attempt to call field 'poll_edition' (a nil value)
is this the same thing where it has to be a table
IT WORKED
uhhhh
okay new problem
or do I make it a feature
it's pulling a random edition from any edition including modded editions
I want it to just be foil/holo/polychrome how do I do that
you need to add an options table to poll_edition
can you elaborate
I'm trying to make deckskinslite accept my skin, but I can't seem to get it to work
it didn't work
i think i know how to fix it
but i don't like the fix
okay i don't know the fix
nevermind
I hate the fix
and now it hates me again.
it doesn't make any sense
it would be so incredibly helpful if this page included examples
card:set_edition(SMODS.poll_edition({_key = "bubble", _mod = nil, _no_neg = true, _guaranteed = true, _options = {"e_foil", "e_holo","e_negative"} } ) )
it says poll_edition is a nil value it's a function what does that even mean
i did everything it said to do
because it's an important edition function
it takes individual arguments because it's a base game function
right great so I had it before
except that card:set_edition(poll_edition("bubble", nil, true, true, {"e_foil", "e_holo","e_polychrome"})) didn't work either because it just ignores the options
it's making a lot of cryptid editions
this is frustrating
can you run eval print(poll_edition("bubble", nil, true, true, {"e_foil", "e_holo","e_polychrome"})) a few times in debugplus?
i don't know what that means also I don't know how to run debugplus commands also I should probably update debugplus for this I haven't done that in a loooong time
figured it out
cry_glass
ran more
you have something messing with poll edition
do you have your entire mods folder open in your vsc workspace?
no but I can do that
got it open now
is it fucking gamblecore istg
okay no that just plays a sound
it does hook the function to play that sound and that's it
search function poll_edition
Hey guys, anyway I can change the font of specific UI elements?
for example changing the font for the chip x mult calculation
cryptid showed up with this, I would assume this is the cause because it doesn't make other modded editions, only cryptid ones
no it's not cryptid
betmma vouchers showed up with this
other than that, it's Steamodded and Gamblecore, and gamblecore just hooks it to play a sound
can you show the gamblecore one?
oh my god it's the gamblecore one
it doesn't have the options part
that's why isn't it
run eval debug.getinfo(poll_edition)
yup
fuuuuuck
okay well
damn okay
i'll check if this issue is known and if it's not i will make a pr to fix
it has occured to me i have no idea how to do that
how to make a pr?
I mena for someothing simple like this probably just edit from the githbu web view
is it your own mod?
huh
oh I see
okay right
I think I did it
I don't know how to check if I did it right
but it says I did it
that change does fix the issue and it now respects the options field
so yeah i guess that means my tag is done now
i appreciate the help
latest smods version rewrites calculation
oh
so you might need to make adjustments to previously written code
right okay
when was the smods update that did this
1306 is the first one
ok but when was it
the 13th month 6th day
2 days ago
it's
yes it is the 13th month
it's the 13th month until we officially move into beta or it becomes the 14th month, whatever happens first
right
okay
so instead of noting the year you just
keep counting the months
I think I get it
it's fine we're moving into beta soon enough™️
well we couldn't roll back to 01 cause 0101 is lesser than 1231 which would break dependacies
is this going to break a fuck ton of mods
it will break some mods
Crytpid
if your mod just adds jokers and doesn't do any lovely shenanigans with scoring it'll be fine
anything that has enhancements or editions or modifies functions like eval_card and evaluate_play
even if it does lovely shenangigfans with scoring it might be okay
okay I don't have enhancements or editions or modify functions
(like JamMod)
I just do 1 lovely patch to do the splash logic
that should be okay
as long as you guys didn't touch the splash logic i'll be fine
side not when do we remove the old calc warning on the tutorial?
does it remove the hardcoded messages though
Steamodded beta changelog:
- removed splash logic
I think when cryptid and talisman are ported at least
what do you mean?
like when you return chips it always does +chips in blue and you can't change that
no you can change that
but it's hard coded
i tried this like a week ago and it didn't work
and they told me it was hard coded
you can either do chip_message = 'blablabla' or remove_default_message = true
it was
oh my god
but this is better
well I feel like I need to wait for at least cryptid and talisman to be ported
cause if some of my mods do use better_calc and some don't then I can't keep my current modlist
most?
provides calculation contexts to everything consistently
wait everything
it be better 😎
does that include consumables
yes
yes indeed
holy shit
want a context.before effect on your deck?
hell yeah I do
better calc does that 😎
better calc is based as shit
it's alright I guess
yeah ok it's better
worse calc was initial merge 🙃
wait it's supposed to be better as in still not great but it least it doesn't suck as much?
yeah ofc
no that's less worse
great calc can be whatever shit victin wants to make
tbf the calculation system is pretty neat, just a bit clunky to use, especially for peopel not familar with it
also did you guys fix that smods bug where localization can't override vanilla
people not familar with it being not 
that's a thing when you use a default.lua file
which uh
i think
we're removing anyways
huh
at least we talked about removing it in favor of a metadata config
take ownership of english
mediocre calc
can this be done
yeah i had a mod idea but it needs to override vanilla localization
no
I hear you can do it if you patch the localization file with regex
you definitely can do that
you just need your loc file to be named en-us.lua and not default
I hear you can do it if you summon
and then get him to change localization
i don't think
would approve of the changes made to accommodate Bunc Munc
that's the mod name
working on it hurts my head
I hear you can do it if you summon the right cosmic rays to flip a bunch of bits
it didn't work
wait
wait it did work
kind of.
could probably also take ownership of whatever you want to do and then use loc_vars to point to a different key
probably less lines and the vaniolla lines that aren't defined are stull there
It only changed the Seals
oh
and not the Jokers
or anything else.
it should be changing a lot more than just the seals
I'm this far
"my code doesn't work" "I won't share it with you to help fix it" based
this is going to be way funnier if nobody knows what it is until it just shows up out of nowhere
My clipboard history go brrrrrr
but yeah I just took the en-us.lua file from vanilla, copy pasted it, and i've been manually making changes
and none of those changes are registering, except the ones I made to seals
if your translating everything why not just make a new language?
I don't know how to do that
didnt even know you could do that
If I end up finishing my new language I will put it in the example mods
okay
guess I'm making a new language now
also totally unrelated question
is there a way I can make chicot appear in standard packs
maybe in_pool
with like a 2% chance
Would anyone mind helping me figure out what's wrong here? I'm trying to make a joker that adds a random edition to cards before they score but it happens all out of order.
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
context.other_card:set_edition(poll_edition('digital', nil, true, true), true)
return {
extra = {message = "Upgrade!", colour = G.C.CHIPS},
colour = G.C.CHIPS,
card = card
}
end
end
why did you set the _options field to true
you'll need to use context.before and iterate over context.scored_hand
The joker adds the edition to all of the cards right when you play your hand, but the edition doesn't seem to count in scoring yet, and the upgrade message shows up after the card's scored. I kinda only want the cards to get their edition right when they're scored, not all at once
yeah put it in if context.before then
and use for index,value in ipairs(G.play.cards) do and then use value to refer to the card
^ context.scoring_hand is better that G.play.cards here
scoring_hand also includes extra scored cards
i'm used to that because yk the whole splash mod
yeah makes sense
Okay I see, I'll try adding the editions in context.before, thanks guys
There isn't really a modding wiki right now is there?
Closest I could find is steammodded's wiki which is super unfinished and doesn't really explain much about anything that can be gleaned from the source code
Which is good enough for now, but still a chore
smods wiki and it explains a decent number of balatros core code
what are you wanting to know?
It'd just be nice to have on hand so I can look stuff up myself. Where is it?
https://github.com/Steamodded/smods/wiki and referencing the source code is super handy (See https://github.com/Steamodded/smods/wiki/Mod-Metadata#useful-resources [@frosty dock why is that there?])
I see, that's the wiki I was using before but it looks a lot more complete now. ty
[because this used to be the getting started page and I forgor]
feel free to move somewhere else
im trying to have a joker have a Hiker effect, just with more chips but i keep getting a nil value no matter what i try
if context.individual and context.cardarea == G.play then
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + card.ability.extra.chip_gain
return {
extra = {message = localize('k_upgrade_ex'), colour = G.C.CHIPS},
colour = G.C.CHIPS,
card = card
}
end
this code is straight from hiker
Wiki's great now for the record, I just happened to check it last right when it was being rewritten for the new release
Aure should I put the first mod guide under the guides section of the sidebar, by itself abocve Game Objects or with home?
I think top of guides
is it possible to prevent sold cards from giving money? and instead add that amount to a joker's sell value?
probably want to lovely patch Card:sell
I keep hearing of "patches" what exactly are they?
How do you all feel about this? https://github.com/Steamodded/smods/wiki/Your-First-Mod
not sure why "page" here is part of the hyperlink
also i feel like it would be helpful to shorten the "Jokers, Consumeables, Vouchers, Backs/Decks, or Boosters" down to just "custom items"
other than that I have nothing to nitpick
- idk isn't that how hyperlinks work
- but it's not all custom items (blinds, enhancements, editions, seals, stakes and stickers)
Welp, After falling asleep for hours now
I still have no clue how to add effects to playing cards
the line right above it doesnt include "page" in its hyperlink so 🤷♂️
ok apparently i don't know how hyperlinks work
also, centers page has things you didnt list there anyways (tags)
lol are you literally making a conlang?
ok wait should page be hyperlinked or no?\
It is Day 5 and I still couldn't make my mod displayed in the in game mod list.
Did I do something wrong in my Holotro.json?
As in, the cmd-ish window when Balatro is initiating?
Let me go checking now...
There will be a message like this one
also iirc the language api lets you set a custom font
that doesn't work for what i was trying to do
i found out a way to load unlimited fonts in realtime
aka just making a fucking love2d font
i didn't realize you can literally supply filedata to it
there's a fucking nfs function for that lol
Found it:
INFO - [G] 2025-01-08 09:47:23 :: ERROR :: Loader :: Found invalid metadata JSON file at C:\Users\Riv_Falcon\AppData\Roaming\Balatro\Mods/Holotro/Holotro.json, ignoring: [SMODS _ "src/utils.lua"]:563: bad argument #1 to 'match' (string expected, got nil)
Is there a strict format for version or something?
semi strict
it at least needs a major number
you don't need to specify a version iirc
Will this do?
Or am I only allowed to put numbers in it?
no like 0~alpha...
This?
try it and see
I don't understand anything on this page
I accidentally got rid of my examplejokers file
And I dont understand the smod wiki
HEY GANG does steammodded allow you to take ownership of a stake
Ah crap
I forgot to rename the sprite
Be right back
Because I want to have it to where a specific stake has a different effect on specific decks
omg i found it
yes
there's literally a function called take_ownership
check through cryptid i'm like 100% sure they did it
Okay I'm just making sure that works with stakes 😭
i don't know why it wouldn't- if it doesn't, check cryptid because again, anything remotely complicated has been done by math and not by steamo
literally the only people breaking ground from the looks of it are me and him lol
i mean i'm sure steamodded does a lot but i wouldn't know because i end up writing my own core functions more than i end up using it LMFAOOO
On the bright side, I think the mod is detected
i'm actually gonna take back this statement actually i don't know who else si
actually i think that wilson's mod is really complicated lol
and there are some others
what is the error though
yk i was about to say that mine is doing something cool but like it's not really
mine added a whole new mechanic i had to write my own core library for lmfao
huh arent they a center
show me code
Nope
looks nice
Wait
my assets folder is empty
I swear I did put 1x and 2x in it
now they're gone
probably is the issue
yeah no i know
i have no idea how steamodded loads atlases from different mods
that's the only reason why i said that lmfao
ah
because i know prefixes are underscores
that won't make a difference
k
i just assumed that if it wasn't something silly like filepath then it was that
lol
if anything would break it it would be spaces but idk if they even do
btw my font technically loaded i just don't think i know how to use dynatext yet so i gotta figure it out lmfao
hacky solution btw (this doesn't include the object you need as well to initialize the font):
local function new_font(filepath)
local fdata = NFS.newFileData(SMODS.current_mod.path..filepath)
return love.graphics.newFont(fdata)
end
Finally, a balanced Joker
back home from work time to remember why flower pot hates me
Somebody able to help me figure out what I did wrong? I'm basically trying to make a Perkeo but for Jokers instead of Consumables
whats wrong?
It just fully crashed game
It shows up in mods, lets me get the card
But as soon as I left shop game crashed instead of it giving me a Joker
send the crash
ok
ohhh yeah i was trying to find out why scoring_hand was nil
i couldnt seem to find any declaration of scoring_hand anywhere
ah actually
Only on random element?
i think its cause it tries to check before cards are even scored
yes
new error unlocked
sned code
making consumables for my consumable-oriented mod pack! :D
zodiac number 6
suits["Hearts"] + suits["Diamonds"] + suits["Spades"] + suits["Clubs"] + suits["Stars"] + suits["Shields"] does this work for counting up numbers?
i meeeeeeean!
not saying you are :}
i'm using the blues of the Spectrals because the yellows are used by the Tarots :D
I just wish I remembered who 4 and 5 were
so the Spectrals perfectly combine the two!
me, ortalab, balatrostuck
ooh can i see yours? ^^
the other 2 might've been just suggestions without mods attached
I'm thinking they'd be their own thing similar to planets for for now they're Jokers
have there been Luigi Poker cards yet?
and they level up alongside planets
if context.after then
local suits = {
['Hearts'] = 0,
['Diamonds'] = 0,
['Spades'] = 0,
['Clubs'] = 0,
['Stars'] = 0,
['Shields'] = 0
}
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name ~= 'Wild Card' then
if context.scoring_hand[i]:is_suit('Hearts', true) and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
elseif context.scoring_hand[i]:is_suit('Diamonds', true) and suits["Diamonds"] == 0 then suits["Diamonds"] = suits["Diamonds"] + 1
elseif context.scoring_hand[i]:is_suit('Spades', true) and suits["Spades"] == 0 then suits["Spades"] = suits["Spades"] + 1
elseif context.scoring_hand[i]:is_suit('Clubs', true) and suits["Clubs"] == 0 then suits["Clubs"] = suits["Clubs"] + 1
elseif context.scoring_hand[i]:is_suit('Stars', true) and suits["Stars"] == 0 then suits["Stars"] = suits["Stars"] + 1
elseif context.scoring_hand[i]:is_suit('Shields', true) and suits["Shields"] == 0 then suits["Shields"] = suits["Shields"] + 1
end
end
end
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name == 'Wild Card' then
if context.scoring_hand[i]:is_suit('Hearts') and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
elseif context.scoring_hand[i]:is_suit('Diamonds') and suits["Diamonds"] == 0 then suits["Diamonds"] = suits["Diamonds"] + 1
elseif context.scoring_hand[i]:is_suit('Spades') and suits["Spades"] == 0 then suits["Spades"] = suits["Spades"] + 1
elseif context.scoring_hand[i]:is_suit('Clubs') and suits["Clubs"] == 0 then suits["Clubs"] = suits["Clubs"] + 1
elseif context.scoring_hand[i]:is_suit('Stars') and suits["Stars"] == 0 then suits["Stars"] = suits["Stars"] + 1
elseif context.scoring_hand[i]:is_suit('Shields') and suits["Shields"] == 0 then suits["Shields"] = suits["Shields"] + 1
end
end
end
if (suits["Hearts"] + suits["Diamonds"] + suits["Spades"] + suits["Clubs"] + suits["Stars"] + suits["Shields"]) > 3 then
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end``` mm this doesnt seem to be doing anything when i test it houugh
Not that I know of
Luigi is a Joker in Cryptid
Is making modded cards easy?
what cards
WOAHHHHHHHHH
solution: send them all to brazil
THE PROGRESSSSS????
then there will be only brazil
Well I had a Joker idea I'd love to be added but I don't know how to code
I'd want to do it myself so I wouldn't bother someone
i see you're doing them in alphabetical order :D
I still need to fill in the missing themes
well it really depends on the idea https://imgs.xkcd.com/comics/tasks.png
what do infected cards do?
Add +1 mult each
a bit of manual labor but it's doable
did you type that over or is that actually in game?
if you don't want to make an Enhancement I'd look a L Corp for reference for these extra effects
Typed it myself
Would need a hook or patch to spread
Hm...
The Joker itself should be straightforward
What about infected cards being added from the deck? I dunno if any jokers do that
It wouldn't
I do want it to still be used late-game
Yes
Once infected always infected I'd say
Unless destroyed
okay yeah i think im going mental i dont understand why this isnt working
do they still spread?
Oooh I didn't think about that
You could get one card infected then just sell the joker
The infected card would still spread and count so...
Yeah I'd have to maybe give it more thought
what do you mean
I don't just want the infected cards in the hand to add mult
I'd want infected cards from the full deck added too
If that makes sense
@rough furnace Were you still helping, I wasnt sure if you got busy or something
@long sun I'd talk more about my zodiacs and/or ask about yours but I ought to go to sleep 😴
Fair! I'm going to bed too actually =w=
I don't have any ideas yet, I usually make the graphics first and work around them
Anyway! Niiiight!
Night
I do art last because it's hard
Yeah I'm not an artist at all, was glad I was able to make the edits look somewhat good using the regular +4 mult Joker as a template
why is this flower being so difficult
see if vanilla flower pot doesn't have any implicit contexts
guh?
else
a
yeah im seeing some elses beforehand
it looks like it goes context.before -> context.after -> else
and flower pot is in that else section
scroll up a little, "else" changes to context.after / context.before
that else comes after if context.after
yes
so it's if not context.after
huh,
to be specific
would probably be like
I think this is if context.joker_main
if not context.after or context.before or smth
see
ill try your suggestion first
Victin you able to help me rq?
rq?
yeah i just have a single joker not working
huh, weird, that doesnt crash anything but not only does the code not function but the effects of the normal flower pot are still present
oh is it "really quickly"
this is the error
yes
my guess is that it's missing a if not context.repetition take a look at that line in the lovely dump
I have no clue what any of that means
and the two observers
oh?
read vanilla code
read the steamodded wiki
read the lovely dumps when the crash log points you to there
goodnight
idk what lovely dumps means
every country?
how to add deck skin?
most deck skins found on nexus replace cards_1 instead of adding it along with SMODS.DeckSkin
https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin
optionally have my code
SMODS.Atlas {
key = 'vocalatro_clubs_1',
path = "collabs/mikugumizunda.png",
atlas_table = 'ASSET_ATLAS',
prefix_config = {
key = false
},
px = 71,
py = 95
}
SMODS.Atlas {
key = 'vocalatro_clubs_2',
path = "collabs/mikugumizunda_cb.png",
atlas_table = 'ASSET_ATLAS',
prefix_config = {
key = false
},
px = 71,
py = 95
}
SMODS.DeckSkin({
key = 'vocalatro_clubs',
suit = "Clubs",
ranks = ranks,
lc_atlas = 'vocalatro_clubs_1',
hc_atlas = "vocalatro_clubs_2",
posStyle = 'collab',
loc_txt = {
["en-us"] = "Miku, Gumi, & Zundamon",
["ja"] = "ミク, メグッポイド, ずんだもん",
["th_TH"] = "มิกุ, กุมิ, และซีนดาม่อน"
}
})
how to get card count on playing deck?
?
thats vanilla behaviour]
you hover over the deck i guess
no, read from code
#G.playing_cards if you want a full deck (including cards in hand and discarded). As for cards currently in the deck, I do not know
#G.deck.cards?
no
Ah he was responding to the second part
I thought it was a counter to what I was saying lol
what size should a suit atlas be if its just 1 suit (2-A)?
ok, i got it right first try.
how to move cards from one CardArea to another?
the methods are all in cardarea.lua
For some reason GitHub desktop doesn't let me publish my mod repository.
"Bad credentials", it says.
i just use the git command line
i just use the vsc github extension
yeah not too familar with github desktop but check if you can re-login
it's Card:move()
suit yourself
gonna try and crack down on this flower pot one more time
Solved it! Thanks
this is what ive got at the moment and it doesnt seem to be working for me
currently it just doesnt do any of this and acts like normal flower pot mechanically
theres really just like, one thing that just isnt clicking for me to understand whats going wrong
and when i find it.
how to prevent game over from running out of G.deck?
the mr. bones method has bugs and will crash/break the game
does the top suit blend in too much with Hearts? what color would work well to keep it in theme but easier to see?
how to prevent game over from running out of G.deck?
i think so
try purple maybe
tho I'm not colourblind myself
so one of these two colors?
mmmmaybe
still i think you'd have to ask a colourblind person for this if you are concerned about the legibility
i can only say so much
i just want to make sure i dont confuse heart face cards /w amongus skin with the mod face cards.
how to prevent game over from running out of G.deck?
chill man this is the third time youve said this
in like half an hour
you don't even lose if G.deck is empty
I just installed cryptid and I keep crashing within 5-10 mins of play time with no specific trigger
the mr. bones method has bugs and will crash/break the game
the game will kill the progress if you ran out of G.deck and G.hand
What are you trying to do?
preventing from game over
why
intentional
You can probably patch this check
how have i spent an entire day fighting Flower Pot
and lost
i dont get it.
if context.joker_main
then
local suits = {
['Hearts'] = 0,
['Diamonds'] = 0,
['Spades'] = 0,
['Clubs'] = 0,
['Stars'] = 0,
['Shields'] = 0
}
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name ~= 'Wild Card'
then
if context.scoring_hand[i]:is_suit('Hearts', true) and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
elseif context.scoring_hand[i]:is_suit('Diamonds', true) and suits["Diamonds"] == 0 then suits["Diamonds"] = suits["Diamonds"] + 1
elseif context.scoring_hand[i]:is_suit('Spades', true) and suits["Spades"] == 0 then suits["Spades"] = suits["Spades"] + 1
elseif context.scoring_hand[i]:is_suit('Clubs', true) and suits["Clubs"] == 0 then suits["Clubs"] = suits["Clubs"] + 1
elseif context.scoring_hand[i]:is_suit('Stars', true) and suits["Stars"] == 0 then suits["Stars"] = suits["Stars"] + 1
elseif context.scoring_hand[i]:is_suit('Shields', true) and suits["Shields"] == 0 then suits["Shields"] = suits["Shields"] + 1
end
end
end
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name == 'Wild Card'
then
if context.scoring_hand[i]:is_suit('Hearts') and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
elseif context.scoring_hand[i]:is_suit('Diamonds') and suits["Diamonds"] == 0 then suits["Diamonds"] = suits["Diamonds"] + 1
elseif context.scoring_hand[i]:is_suit('Spades') and suits["Spades"] == 0 then suits["Spades"] = suits["Spades"] + 1
elseif context.scoring_hand[i]:is_suit('Clubs') and suits["Clubs"] == 0 then suits["Clubs"] = suits["Clubs"] + 1
elseif context.scoring_hand[i]:is_suit('Stars') and suits["Stars"] == 0 then suits["Stars"] = suits["Stars"] + 1
elseif context.scoring_hand[i]:is_suit('Shields') and suits["Shields"] == 0 then suits["Shields"] = suits["Shields"] + 1
end
end
end
if (suits["Hearts"] + suits["Diamonds"] + suits["Spades"] + suits["Clubs"] + suits["Stars"] + suits["Shields"]) > 3 then
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end```
what does it want from me
blood sacrifice?
whats wrong?
nothing happens 😭
its like the code isnt even there, like it still functions like normal flower pot
try putting a print in it
im essentially trying to have it so that flower pot instead activates if there are 4 or more different suits
i tried sending a debug message and nothing showed
actually shouldn't you increase the > 3
how do I add custom unlock description for SMODS.Back without using loc_txt? I recall that loc_txt had an ['unlock'] field inside the same table with the description and name (althought the skeleton on the wiki right now is empty for some reason), but if I had to add it to the localization file, where would it location be?
3 means 4 or more
^
and that's the intention
wrongly, probably!
show
how should i be printing it?
because whatever i did was most likely completely incorrect
you can use print("whatever") or sendInfoMessage("whatever", "Mod")
yeah, from what i can see nothing prints
how do i do that
idk lovely patch or hooking
i argue this is easier than modding Minecraft
but also less compatible
from experience
I mean its way more comaptible than the early days
fair
this is where ive put the print
but when i play a valid hand that should activate, nothing happsn
where should i put it?
not in a table
also yes, i checked the lovely console
ok so how are you inecting it
take_ownership
show the code
{
loc_txt =
{
name = "Flower Pot",
text =
{
"{X:mult,C:white} X#1# {} Mult if poker",
"hand contains four different suits.",
}
},
calculate = function(card, context)
if context.joker_main
then
print("help")
local suits = {
['Hearts'] = 0,
['Diamonds'] = 0,
['Spades'] = 0,
['Clubs'] = 0,
['Stars'] = 0,
['Shields'] = 0
}
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name ~= 'Wild Card'
then
if context.scoring_hand[i]:is_suit('Hearts', true) and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
elseif context.scoring_hand[i]:is_suit('Diamonds', true) and suits["Diamonds"] == 0 then suits["Diamonds"] = suits["Diamonds"] + 1
elseif context.scoring_hand[i]:is_suit('Spades', true) and suits["Spades"] == 0 then suits["Spades"] = suits["Spades"] + 1
elseif context.scoring_hand[i]:is_suit('Clubs', true) and suits["Clubs"] == 0 then suits["Clubs"] = suits["Clubs"] + 1
elseif context.scoring_hand[i]:is_suit('Stars', true) and suits["Stars"] == 0 then suits["Stars"] = suits["Stars"] + 1
elseif context.scoring_hand[i]:is_suit('Shields', true) and suits["Shields"] == 0 then suits["Shields"] = suits["Shields"] + 1
end
end
end
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name == 'Wild Card'
then
if context.scoring_hand[i]:is_suit('Hearts') and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
elseif context.scoring_hand[i]:is_suit('Diamonds') and suits["Diamonds"] == 0 then suits["Diamonds"] = suits["Diamonds"] + 1
elseif context.scoring_hand[i]:is_suit('Spades') and suits["Spades"] == 0 then suits["Spades"] = suits["Spades"] + 1
elseif context.scoring_hand[i]:is_suit('Clubs') and suits["Clubs"] == 0 then suits["Clubs"] = suits["Clubs"] + 1
elseif context.scoring_hand[i]:is_suit('Stars') and suits["Stars"] == 0 then suits["Stars"] = suits["Stars"] + 1
elseif context.scoring_hand[i]:is_suit('Shields') and suits["Shields"] == 0 then suits["Shields"] = suits["Shields"] + 1
end
end
end
if (suits["Hearts"] + suits["Diamonds"] + suits["Spades"] + suits["Clubs"] + suits["Stars"] + suits["Shields"]) > 3 then
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end
},
true
)```
moved the print for the moment
oh
also i changed it to context.before just to test something
ignore that LMAO
your function args are wrong
oh?
it should be self, card, context
how do you add a custom color to be used in loc_txt, like the other suit colors?
adding that in didnt really do anything
its very odd considering the description change works fine
put the print at the beginning of your calcualte and see if it runs
im trying to have a joker have a Hiker effect, just with more chips but i keep getting a nil value no matter what i try, cam amyone help?
if context.cardarea == G.play then
if self.ability.name == 'Hiker' then
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + self.ability.extra
return {
extra = {message = localize('k_upgrade_ex'), colour = G.C.CHIPS},
colour = G.C.CHIPS,
card = self
}
end
this code is straight from hiker
you dont need the ability.name check if it's in a calculate function for a joker
at least I'm pretty sure
So I updated my Steamodded and got to work on updating my old Enhancement code, since effect is gone
However, I got an error message saying that there was an attempt to call a nil value in my main.lua, which is used to load files. It's this line: SMODS.load_file("data/enhancements/arc.lua")()
arc.lua is one of seven Enhancement files and it's the only one that got updated just to test the waters, but suddenly the game couldn't recognize it? Did I install the new Steamodded update correctly?
According to the error, it appeared at line 15
my bad pasted the wrong code
if context.individual and context.cardarea == G.play then
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + card.ability.extra.chip_gain
return {
extra = {message = localize('k_upgrade_ex'), colour = G.C.CHIPS},
colour = G.C.CHIPS,
card = card
}
end
what if you replace your load_file with assert(SMODS.load_file('data/enhancements/arc.lua'))()
syntax error
if context.cardarea == G.play and context.main_scoring then
if card.ability.extra.stored_chips > 0 or card.ability.extra.stored_mult > 0 then
card.ability.extra.stored_chips = 0
card.ability.extra.stored_mult = 0
return{
chips = card.ability.extra.stored_chips
mult = card.ability.extra.stored_mult
message = "Jolted!",
sound = "fm_jolt",
colour = G.C.BLUE
}
end
end
But I closed it?
your missing some ,
O
Aw man the Steamodded update kind screwed over some of the pacing in my code
calculate = function(self, card, context)
if context.cardarea == G.hand and not context.before and not context.end_of_round
and card.ability.extra.hands_seen < 1 then
card.ability.extra.hands_seen = card.ability.extra.hands_seen + 1
return{
message = "Amplified!",
sound = "fm_amplified",
colour = G.C.BLUE
}
end
if context.cardarea == G.play and context.main_scoring then
if card.ability.extra.hands_seen > 0 then
card.ability.extra.hands_seen = 0
return{
mult = 15
}
end
end
end
For example, this card was supposed to gain +1 to hands_seen after a hand is played without it in it, and it will play a sound effect. When scored in a later hand, it will grant 15 mult
Now only the +1 gain works, the sound effect doesn't work nor the gaining 15 mult part
@wintry solar Pinging you just in case for you to look at later. Did I download the wrong version of Steamodded?
the voucher popbob
(in fact, the voucher tab does not fit within the screen bounds, had to stretch to show all vouchers)
how to hook the card:start_dissolve()? for the [unbreakable sticker](#💻・modding-dev message)
does anyone know why my custom challenge just says ERROR even if I make it only a key and nothing else
missing localization
you should try betmma's better vouchers this run ui
some mods about game Balatro. Use Steamodded (https://github.com/Steamopollys/Steamodded) to load them. - betmma/my_balatro_mods
ah I see
how to hook the card:start_dissolve()?
how do I use eval_this and where do I put it
local hook = Card.start_dissolve
function Card:start_dissolve(dissolve_colours, silent, dissolve_time_fac, no_juice)
-- insert code before here
local ret = hook(self, dissolve_colours, silent, dissolve_time_fac, no_juice)
-- insert code after here
return ret
end
you would need to call the ref like hook(self, dissolve_colours, silent, dissolve_time_fac, no_juice)
much 
i love programming
Did NOT expect it was just that easy
so glad its my job
I'm trying to debuff three different cards in hand, but it doesn't seem to work, just displays the message on those three randomly picked cards and that's it
local available_cards = {}
for _, card in ipairs(G.hand.cards) do
if not card.debuff then
table.insert(available_cards, card)
end
end
for i = 1, math.min(3, #available_cards) do
local card, card_index = pseudorandom_element(available_cards, pseudoseed('wish_debuff'))
G.GAME.blind:debuff_card(card)
card_eval_status_text(card, 'extra', nil, nil, nil, {
message = "Taken!",
sound = "fm_corrupted_wish_taken",
colour = G.C.BLACK
})
table.remove(available_cards, card_index)
end
Any insights?
This is for a blind btw
try card.set_debuff(true) instead of G.GAME.blind:debuff_card
msg = string: "card.lua:600: attempt to index local 'self' (a boolean value)"
Somehow the error just travelled all the way to a different file
Line 600 in card.lua is here
for k, v in pairs(self.ability.debuff_sources or {}) do
if v == 'prevent_debuff' then
if self.debuff then
self.debuff = false
if self.area == G.jokers then self:add_to_deck(true) end
end
self.debuffed_by_blind = false
return
end
should_debuff = should_debuff or v
end
does anyone know where the game stores the current deck selected in a run
deck for context is just ""
I keep getting attempt to index fails and I think I'm just too stupid to see why
oh wait I need to actually declare the variable before I call it lol
im trying to do a misprint like effect, random mult within a range, but for each card played
but for some reason it keeps giving me small decimal numbers instead of numbers in the range
can anyone help?
if context.individual and context.cardarea == G.play then
local temp_Mult = pseudorandom('misprint', card.ability.extra.mult_min, card.ability.extra.mult_max)
if context.other_card:get_id() <= 14 or context.other_card:get_id() >= 0 then
return {
mult = temp_Mult,
card = context.other_card
}
end
end

pseudorandom doesnt take min/max values iirc you have to do the math yourself
how does misprint do it? or is it different cuz of smod
o maybe im dum
is the mult_min and mult_max in your config or config.extra?
should be in .extra right?
config = { extra = { mult_min = 25, mult_max = 55 } }
Idek what I changed but apparently it's fixed now
im pretty sure it does right?
Is there a way to return mult_mod AND Xmult_mod as a Joker?
You forgtot the end after the first if
Ah crap
Thank you
And now this joker would crash the game at second round
when selected a blind after first shop
Is it possible to make it where a sound is played when you win a run?
And if so, I wanna do that
Yeah I think so, somewhere you may find the code that plays the money gained sound etc. to find out how to play a sound.
hmmmm riv idk
can't help you sorry
I thought "if G.shop_jokers then" meant to prevent this kind of error
Is that how it works?
idk
piss easy
just do what you did with one, and do it with the other
but change the names
(and if you want messages, use eval_this)
I want one joker to do both
copy what you did with mult/xmult, and change the names to match the one you didnt do
thats essenitally it
you can do it
idfk what you mean by "is there a way"
you can make it do everything in the game if you wanted
yeah theres nothing stopping you from stacking effects on a joker
Yeah I did it with return, I can't return two things can I? In the context.joker_main
it seems that my joker cant be destroyed at end of round if its copying a joker 😭
ofcourse you can
you can return as many things as you can
its a table