#💻・modding-dev
1 messages · Page 441 of 1
this should remove the Enhancement, right?
card:set_ability()
G.load_preplay?
No, it would be card:set_ability("c_base")
does the label in dictionary count as both the name used by the consumable page and the label used by cards in that type?
no idea :3
ah, okay
i just cant see the name for the consumabletype defined anywhere in the localization file
Anyone know the default weight of all the rarities?
0.7 for common, 0.25 for uncommon, 0.05 for rare
ok, thanks!
this?
How trans people saved my mod 🙏
yeah
how did they save your mod, it's in french now
is the k the name version
it wasn't working before for some reason
...patching the custom area in was simpler instead.
it still isn't entirely working but whatever
what would the process be to block something vanilla from appearing in the shop?
specifically like, for example all planet cards
i also have an idea for making only jokers appear in the shop but i assume excluding everything BUT something would be a lot harder
you could probably look at the code for the jokerless challenge, but beyond that, idk
ohhh i didnt think about challenges
@vague crest look into how it chooses what cards are made. There are values for each type of card, ie G.GAME.joker_rate and G.GAME.tarot_rate. That's probably the easiest way.
oh wow thats proabbly exactly what im looking for
I'm trying to make a joker that debuffs some cards, but it isn't working:
SMODS.Joker {
key = "cardless_joker",
name = "jon_Cardless_Joker",
atlas = 'jon_jokers',
pos = {
x = 3,
y = 0,
},
rarity = 2,
cost = 5,
unlocked = true,
discovered = false,
eternal_compat = true,
perishable_compat = true,
blueprint_compat = false,
config = {
extra = {
mult = 5,
odds = 2,
},
},
loc_txt = {
name = "Cardless Joker",
text = {
"{C:green}#1# in #2#{} chance to",
"debuff each played card.",
"Earn {C:mult}+#3#{} mult per trigger",
"of a debuffed card."
}
},
loc_vars = function(self, info_queue, card)
return {
vars = {(G.GAME.probabilities.normal or 1), card.ability.extra.odds, card.ability.extra.mult}
}
end,
calculate = function(self, card, context)
if context.before and context.cardarea == G.play then
for _, other_card in ipairs(G.play.cards) do
if pseudorandom('cardless_joker') < G.GAME.probabilities.normal / card.ability.extra.odds then
other_card:set_debuff(true)
end
end
end
end,
}
function jon_handle_debuffed_card()
for _, joker in ipairs(find_joker('jon_Cardless_Joker')) do
card_eval_status_text(joker, 'jokers', nil, nil, nil, {
mult_mod = joker.ability.extra.mult,
message = localize { type = 'variable', key = 'a_mult', vars = { joker.ability.extra.mult } }
})
end
end
Try SMODS.debuff_card(card, true, "source")
alr
it didn't work
how would i ask "if a card in your joker area has this key, but is NOT this card"
Remove the card area check.
I'm trying to make a Joker card spawn a Uncommon Tag when the Boss Blind is defeated, but I keep getting nothing but crashes, Could someone explain what is wrong here?
----------------------------------------------------------------------------------------------------------------------------------------
-- Trying to code, The Joker to spawn a Uncommon Tag when the Boss Blind is defeated, This will be a crashing nightmare
SMODS.Tag = self.ability.name == G.GAME.blind and G.GAME.blind.boss
self.name == 'Uncommon Tag' then
card = create_card('Joker', _context.area, nil, 0.9, nil, nil, nil, 'uta')
create_shop_card_ui(card, 'Joker', _context.area)
card.states.visible = false,
self:yep '+', G.C.GREEN,
card:start_materialize
card.ability.couponed = true
card:set_cost()
end
}
----------------------------------------------
------------MOD CODE END----------------------
local passed = false
for k, v in pairs(SMODS.find_card("j_modprefix_key")) do
if v ~= card then
passed = true
end
end
if passed then
end
```?
that worked, thanks!
This is not a joker code bro
Wdym?
Use
SMODS.joker{}
Smods.tag{} is used to make tags
What are you doing !!!!!!!!
thank ye thank ye
think i'm using this wrong... the stack trace eventually points to the highlighted line where i call create_playing_card
Just do SMODS.add_card({set = "Playing Card", enhancement = "m_tabs_chicken"})
oh i thought add_card couldn't do playing cards
It does, it was just recently changed to be able to do that.
Anyone know what the issue is here?
so this would make that if i had it destroy cards with that key, it wont destroy itself right?
discovered = true,
u forgot a comma there
whats wrong w the rarity thingy?
You need your mod prefix.
Yes.
After PREFIX: is the prefix.
so would something like
add_to_deck = function(self, card, from_debuff)
card:remove_sticker('hpfx_priceless')
local pass = false
for k, v in ipairs(SMODS.find_card('j_hpfx_ijiraq')) do
if v ~= card then
pass = true
end
if pass then
G.E_MANAGER:add_event(Event({
func = function ()
v:start_dissolve({G.C.RED, nil, 1.6})
end
}))
end
end
end,
work?
It would probably be better if you removed the pass variable and just put the event in if v ~= card
So i have the joker setup, but it's the Boss Blind stuff that's giving me trouble.
What i'm trying to do is after the Boss Blind is defeated, I want the Joker to spawn a Uncommon Joker Tag, Basically like
Anaglyph Deck but if it was a joker and spawns Uncommon Joker Tag
….what does a stack overflow error mean in the context of me console commanding add_card…
It got stuck in an infinite loop.
is it a card that adds itself
I was trying to spawn the fodder
What’s weird is it worked before? Then I restarted the run and tried again to make sure and
💥
also now the descriptions are acting up again? loving how when it’s this close to being done all the bs wants to poke through the woodwork?

It fixed after I restarted again but if that becomes an issue
stg
I'm very new when it comes to lua and creating mods
There’s a YouTube video
That covers the necessary things
Maybe you should check that
Also , modding isn’t easy and you’re gonna crash a lot and learn so if you don’t have the commitment just quit
it's a syntax error, it means you wrote something wrong. I recommend getting vscode and the Lua extension
also the whole function Tag:apply_to_run bit doesn't make any sense
Link them the wiki
Yeah it looks like you're mixing up the code for a tag and the code for a joker. Any chance you prompted AI to write this? I could see where a prompt might cross wires given "tag" and "joker" both being in the prompt
No, i didn't try using ai, I was reading from the wiki
Point being, you're intending to make a joker that creates a tag. The code you wrote is more accurately described as code for a Tag to create a joker
Joker code typically uses the calculate(self, card context) function
Tag:add_to_run() as well as Tag:yep() are both functions tags used when they're added to the tag stack and when they're actually activated
So you want to use calculate and the vanilla add_tag function
ah alright
HELP ME
You're not returning true in the event.
I know i just wanted to see lmfao
just goofing around a bit
but yeah it works fine thanks 👍
me when im in a wind tunnel:
is there a way to make a card just not spawn naturally
return false for in_pool.
Is it possible to test a SMODS.Center object's in_pool function using DebugPlus' eval?
eval SMODS.Centers["classprefix_modprefix_key"]:in_pool()?
G.P_CENTERS.key:in_pool()?
What's the keybind to open DebugPlus's console again? 😅
/ for me.
man it feels good when your jokers just
work first try 
won't last long though i bet
Oh the keybind doesn't work on AZERTY keyboard 😔 ty
My idea is to create a random consumable when blind is selected, but that's make me crash... Any ideas why ?
You're not specify what card type you want to create
set = "Consumeables"

How do I add mult outside of the joker calculate function?
When specifically do you want to add mult?
I'm making a joker to give mult on debuffed cards, so I had to make a lovely patch to the debuff handling code
Ty btw that did the trick, tho I add to do a bool check, other it just returns functionsx0000 something like that 😅
Why can't the joker do it?
Nvm it keeps giving me false wha
balatro doesn't run the calculate function when a card is debuffed
Was that not what the patch was for?
it runs a separate function
this is the code for the debuff handling:
function jon_handle_debuffed_card()
for _, joker in ipairs(find_joker('jon_Cardless_Joker')) do
card_eval_status_text(joker, 'jokers', nil, nil, nil, {
message = localize { type = 'variable', key = 'a_mult', vars = { joker.ability.extra.mult } }
})
end
end
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]]
[patches.pattern]
target = "=[SMODS _ \"src/utils.lua\"]"
pattern = """
if scoring_hand and card.debuff then
if in_scoring then
"""
position = "after"
payload = '''
jon_handle_debuffed_card()
'''
match_indent = true
Still trying to figure out how to make a Joker card spawn a uncommon tag when the boss blind is defeated.
The Joker part is finished, but the tag spawning part is giving me issues, Yes I am actively reading from the wiki and looking at the code of balatro
LMAO
SMODS.calculate_effect({mult = number}, card)
does that work with the status text too? (the little +5 mult popup)
Yes, you would do SMODS.calculate_effect({message = "message"}, card)
it'll do the message for you if you just use mult
thanks!
alr
Not sure yet how to spawn any tag, but this is how diet cola works:
add_tag(Tag('tag_double'))
play_sound('generic1', 0.9 + math.random()*0.1, 0.8)
play_sound('holo1', 1.2 + math.random()*0.1, 0.4)
you can try tag_uncommon
ty, i forgot diet cola existed
np!
Hai 👋
Lol anyways are there any good beginner videos making mods for balatro? Just to get me started…
Thx! 🙃
how do i have a consumable increase the chips/mult given by level ups?
All planets or a specific planet?
all planets
for k, v in pairs(G.GAME.hands) do
v.l_mult = v.l_mult + number
v.l_chips = v.l_chips + number
end
```?
ooh that might work
Eh, close enough, game
how does this work
well, um I think i'm making progress?
context.setting_boss_blind_defeated doesn't exist also you're putting calculate in nothing also you're missing an end
the joker i have makes random cards, but for some reason the card's looks doesn't match it's actual value, see the image below
weird
yea
where would i find the art of the actual playing cards? like just the numbered ones for example
I tried a bunch of things so far, but am finally letting myself ask for help
I am trying to code a joker that makes a negative clone of itself at the end of every boss blind (it's only functionality)
However it creates infinite copies of itself when the condition is met. Does anyone have a clue as to how to limit each instance of the joker only generate a singular copy of the joker?
calculate = function(self, card, context)
if not context.individual and not context.repetition and not card.debuff and context.end_of_round and not context.blueprint and G.GAME.blind.boss then
print("Card Created!")
local new_card = copy_card(card)
new_card:set_edition("e_negative", true)
new_card:add_to_deck()
G.jokers:emplace(new_card)
return
end
end
In the source code?
You need to flag the card.
i found it actually 🙏 nvm
Will look it up, thank you.
How do i get the code thing where it detects if the boss blind was defeated? I have no clue how to use the calculate function.
also did i put the end in the right place now?
context.setting_boss_blind_defeated still doesn't exist, also is this in an SMODS.Joker?
how do i make a consumable only useable during the blind?
yeah, it's a joker. The goal was trying to make a joker who spawns an uncommon tag after the boss blind is defeated
can_use = function(self, card)
return G.GAME.blind.in_blind
end
Yes, but is this in a SMODS.Joker?
follow-up question, how can i have a consumable increase the number of levels planets give? (yes to all planets)
you mean this?
SMODS.Joker {
-- How the code refers to the joker.
key = 'uncommon_tag_joker',
-- loc_text is the actual name and description that show in-game for the card.
loc_txt = {
name = '{C:green,E:1}Uncommon Tag Joker{}',
text = {
'Create a {C:green, E:1,}Uncommon Tag{} When',
'{C:mult}Boss Blind{} {C:edition,E:1,s:2}is Defeated!{}',
}
},
config = { extra = { tag = 1 } },
-- Sets rarity. 1 common, 2 uncommon, 3 rare, 4 legendary.
rarity = 2,
-- Which atlas key to pull from.
atlas = 'TagJoker',
-- This card's position on the atlas, starting at {x=0,y=0} for the very top left.
pos = { x = 0, y = 0 },
-- Cost of card in shop.
cost = 8,
}
-- Trying to spawn a Uncommon Joker Tag after Boss Blind is defeated
calculate = function(self, card, context)
if context.setting_blind then
G.E_MANAGER:add_event(Event({
func = (function()
add_tag(Tag('tag_uncommon'))
play_sound('generic1', 0.9 + math.random()*0.1, 0.8)
play_sound('holo1', 1.2 + math.random()*0.1, 0.4)
return true
end)
end }))
end
----------------------------------------------
------------MOD CODE END----------------------
@daring fern
You would probably patch here:
You're closing the SMODS.Joker before reaching the calculate function.
so i move the calculate into SMODS.Joker
how can i replicate the tilde on a card's name?
i tried using ` but the game seems to ignore that character
do you have an example of what you mean?
driver's license
' should work?
that comments out the rest of the name
alright so it stopped crashing
Use " for the string
i'll try that
or escape the character (I'm assuming that works in Lua)
quickly tested editions
how would i go about changing for i = 1, #G.hand.highlighted to affect the whole hand/entire deck?
for i = 1, #G.hand.cards, for i = 1, #G.playing_cards?
ill see if that works
how do you modify the score requirment for one round? trying to make a consumable that impacts the score requirment
Modify G.GAME.blind.chips
How can I have a card send a message within the Event Manager?
SMODS.calculate_effect({message = "message"}, card)
bro 😭
How would one rotate the display?
put it in func
it IS in func, but just having message = did nothing
uh lemme double check smth
thanks
use card_eval_status_text with instant = true on the extra table
nvm
for some reason, using Hanged Man does not scale this
Code?
how do i call for the played hand not scoring?
i tried referencing the psychic but that didn't seem to help
Hook Blind:debuff_hand?
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS.c_hanged_man
return { vars = { card.ability.extra.xchips, card.ability.extra.xchips_gain } }
end,
calculate = function(self, card, context)
if context.consumeable and context.other_consumeable and context.other_consumeable.config and context.other_consumeable.config.center and context.other_consumeable.config.center.key == "c_hanged_man" then
card.ability.extra.xchips = card.ability.extra.xchips + card.ability.extra.xchips_gain
return {
message = "Severe lapse in my judgement.",
colour = G.C.TAROT
}
end
if context.joker_main then
return {
x_chips = card.ability.extra.xchips
}
end
end
}
context.other_consumeable is for scoring
if context.using_consumeable and context.consumeable.config.center.key == "c_hanged_man"?
ohhhhhhhh
thanks
thats why
I still find consumables named consumeables in modding funny
it works now thank you
thunk
i love everything about this idea, i hope it gets realized
Spritesheet check ?
same with canio being misspelled as caino
so if you wonder why referencing canio's key via j_canio doesn't work
that's why
Where is the code that creates the vouchers and booster packs?
Grape juice
Lmao ahahahaha
key = "ss",
loc_txt = {
name = "place holder",
text = {
"This text holds the place",
}
},
config = {},
rarity = 3,
cost = 8,
unlocked = true,
discovered = true,
blueprint_compat = true,
calculate = function(self, card, context)
if context.reroll_shop then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
-- Reroll packs
local boosterno = math.max(#G.shop_booster.cards, G.GAME.starting_params.boosters_in_shop + (G.GAME.modifiers.extra_boosters or 0) )
for i = #G.shop_booster.cards,1, -1 do
local c = G.shop_booster:remove_card(G.shop_booster.cards[i])
c:remove()
c = nil
end
for i=1, boosterno do
SMODS.add_booster_to_shop()
end
-- Reroll vouchers
local voucherno = math.max(#G.shop_vouchers.cards, G.GAME.starting_params.vouchers_in_shop + (G.GAME.modifiers.extra_vouchers or 0))
for i = #G.shop_vouchers.cards,1, -1 do
local c = G.shop_vouchers:remove_card(G.shop_vouchers.cards[i])
c:remove()
c = nil
end
for i=1, voucherno do
SMODS.add_voucher_to_shop()
end
return true
end
}))
return {
message = "hold",
card = card,
colour = G.C.MONEY
}
end
end
}```
I have this joker that rerolls packs and vouchers
Why does my quantum enhancements move the card when I try to highlight it?
I want to do a joker kinda similar to The Bull, what context should I check to make the Currently +XX Chips update the most frequently possible ?
You wouldn't use a context, you would do it in loc_vars
Maybe my question was misformulated, I'm talking about a context to update it
not really when to "print" it
(Or I misunderstood your answer, also possible lol)
OH I think I understood
will try some things
Imagine if using a judgement card took some away
Judgment?(insert minor prime uppercut)
do spectral cards have issues with multiple textboxes
It should work fine
i... spelled my key wrong in the consumable code...
that was incredibly stupid of me
i like this joker a lot
This isn’t balanced lmao
Winter soldier in every single lobby:
are spectrals only able to add perma mult and dollars?
Wdym perma
They should be able to do anything that other consumables do, at least from what i see
i have a bunch of custom consumables that add perma bonuses but the spectral, despite having the same code, doesnt add chips, xchips, or xmult
nvm i had it as chips and not bonus
xchips and xmult were fucked but i think i was doing it wrong anyway
Can i see the code ?
lemme do it the other way and see if that fixes the issue first
perma_x_chips, not perma_xchips, btw
yeah i have it spelled that way
unfortunately the game doesnt like it when you try to multiply perma bonuses
so i have to deal with some... odd scaling, to say the least
i could try an alternate method
how do i make it so glass cards are guaranteed to break when played with a joker
You would patch/take ownership of glass.
cant i jsut destroy it if it was scored during the same loop glass would normally break
i think i didnt format my quesiton correctly
i mean
a joker
that makes it guaranteed to break
Yes.
Set game probabilities to 999 when glass card is scored and revert it back
Yes, take ownership of it.
what if i just, destroy it if it gets scored the same time glass cards would normally roll their chances to break
No, because then other probabilities could occur.
I didn’t though of that
You can destroy it without breaking it by probability
if context.destroy_card and context.cardarea == G.play and SMODS.has_enhancement(context.destroy_card, 'm_glass') then
return { remove = true }
end```
You can just destroy if it has glass enhancements
🐐
No, because then it wouldn't count as a glass trigger.
doesnt glass breaking happen during context.destroy_card anyway
Still trying to get a uncommon tag to spawn after the boss blind gets defeated
SMODS.Atlas {
-- Key for code to find it with
key = "TagJoker",
-- The 1x sprite
path = "TagJokers.png",
-- Width of each sprite in 1x size
--px = 35,
px = 71,
-- Height of each sprite in 1x size
--py = 47
py = 95
}
SMODS.Joker {
-- How the code refers to the joker.
key = 'uncommon_tag_joker',
-- loc_text is the actual name and description that show in-game for the card.
loc_txt = {
name = '{C:green,E:1}Uncommon Tag Joker{}',
text = {
'Create a {C:green, E:1,}Uncommon Tag{} When',
'{C:mult}Boss Blind{} {C:edition,E:1,s:2}is Defeated!{}',
}
},
config = { extra = { tag = 1 } },
-- Sets rarity. 1 common, 2 uncommon, 3 rare, 4 legendary.
rarity = 2,
-- Which atlas key to pull from.
atlas = 'TagJoker',
-- This card's position on the atlas, starting at {x=0,y=0} for the very top left.
pos = { x = 0, y = 0 },
-- Cost of card in shop.
cost = 8,
-- Trying to spawn a Uncommon Joker Tag after Boss Blind is defeated
calculate = function(self, card, context)
if context.setting_blind then
G.GAME.blind.boss:add_event(Event({
func = (function()
add_tag(Tag('tag_uncommon'))
play_sound('generic1', 0.9 + math.random()*0.1, 0.8)
play_sound('holo1', 1.2 + math.random()*0.1, 0.4)
return true
end)
end }))
end
}
alr fuck it i cant get this scaling to work
the spectral works now im just trying to work on the scaling
wait
oh my god is the perma bonus for xchips counting 0.5 as as 1.5 in game
Yes, but it wouldn't count as a glass trigger.
yup
THAT'S WHY MULTIPLYING WASNT WORKING OH FFS
I'm not new to modding, but I'm getting started modding balatro. I have steammodded up and running already. How do I get started on the skeleton of my mod?
what is card currently played in context.indivusal
context.other_card?
how would I make it be the same colour?
instead of C:attention do I put C:Spades?
Yea
right
ok
Or Spade, I don’t remember which
bet thx
lowercase
No, you put C:spades
will removing a glass card during destroy_card play the glass breka noise
ok thx yall
you really cant leave some txt blank huh
Yes.
ok sweet more stuiff i dont gotta do
Please don’t use ai , read the wiki
i used ai for like my first 2 jokers then realized how easy it is to just, read the wiki, though the modding wiki does have lots of confusing parts
like in calculate sound is only mentioned as a sidenote on message
once you start getting better at modding some things become way easier
honestly modding balatro is jsut a bunch of if statements
I was lazy to read it at first that why i didnt get to modding but then i got motivated after playing entropy
though sometimes its better to ask here for 1 detail that one guy will surely know instead of sifting through the wiki for a check you need
You have non closed statement
Yup
Sometimes you just can’t find whatever the fuck you’re looking for
Lmao
also somebody in here is gonna get really mad when they find out i use individual pngs for my jokers
i dont combine them into a sheet
too much effort
only make sheets for jokers that need atlas pos
like soul_pos and changing a jokers pos
how do you do the soul thing with the image floating in front of a card again?
...not really
i just said soul_pos
how do you set that up?
i know theres a sheeter online but im too lazy, besides it doesnt hurt
soul_pos is pos but for the floating layer.
have an atlas with 2 jokers in it and pos is for the background, soul_pos is for the floaty on top
thanks
i suppose drawstep is another way to draw image over something?
or SMODS. hooks is a thing?
ah okay
No.
Specifically cards.
not possible on jokers?
Jokers are cards.
F# but its glsl
pardon?
Check this
whats the variable for most played hand and how can i use it
Check that one boss blind
In vanilla remade
ill check the voucher
one more question
I think i did before and it didn’t help
Sure
if i made a shader, would it instantly shows up in my mod or do i have to do something first
yeah ill check the boss blind
Smods.edition
found it
Reading the wiki explains the wiki
G.GAME.current_round.most_played_poker_hand
Thats for the current round
thats what Ox uses
Try it out
how would I make a joker that makes all tarot cards negative?
im wondering how to use it to modify the chips/mult of it
Try G.GAME.most_played_poker_hand
I think you need to take ownership
Not really sure
for k, v in pairs(G.consumeables.cards) do
if v.ability.set == "Tarot" then
v:set_edition("e_negative")
end
end
```?
given what smtcom told me earlier i dont need to, i just need to figure out how to apply what he said to the most played hand
🙏
Try and figure out lol
im eating rn, will try in a bit
works, however when using emperor only 1 at a time is negative
What is the goal?
Then you would probably hook create_card
i dont know what a hook is
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
thank you

Can i see current code ?
most_played_hand is nil
you have to get the most played hand manually
doesnt the ox use a global variable
just for the ante iirc
G.GAME.current_round.most_played_poker_hand is used for The Ox. However, mind that Vanilla code only updates it once at the beginning of each Ante
ok so, i currently have a successfully set up table-that-stores-the-key-of-a-joker-before-a-certain-event
is there a way i can use said table to have a joker mimic the effects of the jokers in that table?
There is but it's more complicated than you probably assume
me already assuming it's complicated 
is there an easy way to do that without trying to copy and mess with the telescope code
trying to copy and mess with the obelisk code
for k, v in pairs(G.GAME.hands) do
if v.played > _played or (v.played == _played and _order > v.order) then
_played = v.played
_handname = k
end
end```
I would just steal the thing that most_played_poker_hand does
how do u make an atlas?
so i have that, do i use k in the code to represent the hand?
You have three options, basically:
- use the joker to call the other joker's calculate ala Blueprint
- create a hidden proxy card for the joker you want and then return the return values of its calculate from the copy joker's calculate
- transform the copy joker into the new card and have something outside change it back
after the loop is done, _handname is the most played hand key and _played is the number of times it's been played
is there a way to make it so a specific joker doesn't show up on the shop or is summoned by judgement? (besides making it legendary)
(if so, how)
Giving the joker definition an in_pool() function
SMODS.Atlas{
key = --'atlas-key',
path = --'filename-of-your-atlas',
px = --width of each sprite (typically 71),
py = --height of each sprite (typically 95)
}
Whatever boolean in_pool() returns will determine if it can be spawned in whatever given scenario
The px and py should not be strings.
Also you are missing ,s
k is nil
Because k is a local value inside the loop. Like I said before, after the loop is finished _handname is the key of the most played hand
replace 'ar1' for 'jud'
#💻・modding-dev message
ohhh ok
lemme try that again then
which one is better for multiple
if any
-# also oml more fodder joker tomfoolery
Youll need to use G.GAME.hands[_handname] to get the l_mult and l_chips
Multiple as in multiple times in a row?
does that also cover for showing up on the shop?
it should
multiple effects
Smods.edition
mwah
everyone gets one
Sure lmao
like this?
Should work
hell yeah, works now, thank you
Probably the first one? It's just that the compatibility is more limited
wdym?
ah fuck uhhhh
oh duh
maybe i'll add a blueprint compatibility check? (before it adds the key to the table)
why is it givin an eror
oh ok
oh so i put .png?
key and atlas need to be strings
each line except py needs a comma at the end
also what heaven said about the spritesheet
The hell? Does this even count as a crash?
GIVE ME A MINUTE
Freeze
the game just closes itself after a minute
I’ll consider that a crash
Have you tried one by one to figure out whats causing the crash
yes, it's only with every single one
individually they work
My joker keeps spewing out spectrals during blinds and I don't know how to make it stop
Too much for the game to handle lol
Add it to an event
all my cards work now, woohoo
Yeyyy
Also you’re missing the consumable slot limit context
how do I add it to an event?
Also this doesn’t match your description
Events just makes it look better I
Change your if end if end
To if elseif
End
nvm im dumb, figured out what caused it and now comes trying to fix it
his seems to fix it! thanks!
is there a typo here? i keep getting syntax errors when i try to add it
i added the brackets to the return call but looks like that changed nothing
i just started developing my first mod, and it says this. i've checked every bracket and it seems to have closed properly
here is the code from line 10 to 26:
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'white'
loc_txt = {
name = 'White',
text = {
'Insert some really cool placeholder text.'
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0}
}
Replace +4 with #1#
ease_hands_played(number)
same with discards?
ease_discard(number)
gotcha
oh wait i found it i'm dumb
syntax error on 2072 (the in_pool line)
Did you try installing the lua extension?
Bro it looks fine
what lua extension
for one, this only allows me to decrease or increase the number, not set (as far as i can tell)
additionally, it gets reset upon entering a blind
Yes, you need to change it depending on the current hands/discards and change the round_resets
round_resets?
G.GAME.round_resets.hands and G.GAME.round_resets.discards
i see
Is this how you get a joker to make everything in the shop half off? It's not working for me
if self.area == G.shop_jokers or self.area == G.shop_booster or self.area == G.shop_vouchers then
G.GAME.discount_percent = 50
end
end```
No.
how do you do it?
You use the add_to_deck function.
Like this?
if self.area == G.shop_jokers or self.area == G.shop_booster or self.area == G.shop_vouchers then
G.GAME.discount_percent = 50
end```
No.
dangit
add_to_deck = function (self, card, from_debuff)
G.GAME.discount_percent = 50
end
anyone got the "font" for the "joker" text on jokers
is this how i would check for blueprint compatibility on another joker?
card.config.center.blueprint_compat
niiiice thanku
G.GAME.discount_percent = 0
end```
This undoes the discount when the joker is sold, right?
when the joker is debuffed/sold/destroyed
if its removed yes, for example by selling
note that this would override the discount vouchers though
thanks for pointing that out! Also, to be clear, does the code snippet account for debuffs and destruction like srock just said?
could i check if a card has the variable (card).ability.played_this_ante before it's set? right now this joker gives $1 no matter what, since cards have that variable set to true immediately upon being played
destruction yes but debuffs ive actually never tested it myself but it would make sense
how to add value to a variable.
that's what the from_debuff parameter is there for btw
local string_var = "string"
local number_var = 5
local list = {"item", "item2"}
anyone?
like this part
anyone know how i could index the card.ability.played_this_ante var in context.individual before it's set (immediately upon scoring)?
yeah you can do that
in fact you can just do card.played_this_ante directly
set it on cards that dont have it and reset it on all cards after changing ante
also keep hieroglyph/petroglyph in mind considering the wording
maybe that? idk
#🎨・fan-art message
thats the base game font
uuuh.
it gives me errors.
played_this_ante is only set in card.ability though?
oh ok
i'm really not sure what you're trying to do here
we need context, code, an explanation of what you're looking to do
im trying to do something like
variable = variable + 5
ooh hold on played_this_ante is actually a thing i thought that was like a variable for your mod mb
but it doesnt like the second variable
for what purpose? is this in a joker or something else?
in a joker yes
code screenshots/snippets would be very helpful
you could just check if not card.ability.played_this_ante right
and then do the effect if it passes true
my problem is that the moment a card is played, it has .ability.played_this_ante set to true
wait no the reverse
which happens before my joker's calculation
hellos hai hello
has anyone recreated pareidolia
ahh i see
so every single card will give $1
i'm trying to make similar cards
im not sure when it gets set exactly, maybe try iterating through the played hand in context.before? and marking cards for later there
Is this the right Joker Font ?
#🎨・fan-art message
as far as i'm aware, it's set instantly upon cards being played (pressing the play button, which calls G.FUNCS.play_cards_from_highlighted())
ah yes indeed youre right
in that case you'll probably just have to make your own variable to track
there's a lot going on here, so you're looking for it to increase in xmult every time it calculates?
thanks
guys if i wanted blueprint_effect to factor in all keys in a table, how would i do that?
unsurprisingly, this does not work.
When it calculates i just want the xmult to randomly either gain 0.1 or lose 0.1.
like from 0.1 to -0.1
the problem is that this isnt what the return{} is for
if you want to modify a value beforehand do it before your return{}
you probably want to randomly modify the cards Xmult config value before the return{}
Alright thank you!
alright I have NO idea what I'm doing
local card_get_id_ref = Card.get_id
function Card:get_id(from_boss)
return card_get_id_ref(self, from_boss) or (1 and next(SMODS.find_card("j_equality_equalace")))
end
tried to make pareidolia but for ace cards but i have no idea what exactly I'm looking at
i thought it would be similar to how the recreated pareidolia works
local card_is_face_ref = Card.is_face
function Card:is_face(from_boss)
return card_is_face_ref(self, from_boss) or (self:get_id() and next(SMODS.find_card("j_vremade_pareidolia")))
end
but it errored out about a null value
you're going to want to set a variable of xmultadd in your card's config, so it can be a default of 0 for example
and also set xmult in the config to 1 as a default
if context.joker_main then
local change = pseudorandom_element({0.1, -0.1}, pseudoseed("seed")
card.ability.extra.xmultadd = card.ability.extra.xmultadd + change
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmultadd
return {
xmult = card.ability.extra.xmult
card = card
}
end
something like this
if context.joker_main then
card.ability.extra.Xmult = card.ability.extra.Xmult + pseudorandom('seed', -0.1, 0.1)
return{
...
}
end```
that way the random change will be permanant after it calculates
pretty sure pseudorandom('seed', -0.1, 0.1) will return a random number between -0.1 and 0.1
ooh wait youre right actually
no no i need that
and apparently also sometimes just... return this for some reason?
definitely don't use that
thats weird
testing data shows that this is absolutely unhinged
what on earth
uhhhh
ok yeah i have no idea why that happens
try math.random(-0.1, 0.1)
cuz that shouldnt happen lol
pseudorandom_element({0.1, -0.1}, pseudoseed("seed") also works
I'm trying to make my mod compatible with Talisman but i keep getting crashes at line 1420 even if i defined to_big to help with calculating some values
the whole error
whats the crash say
wait hold on i'm dumb i tried to continue the game but i changed the cards id
sounds about right
just you have to_big() defined in your mod elsewhere
should look something like to_big = to_big or function(x) return x end
actually wait
hold on
should you be using to_number()
I have that in my code
because to_big() converts a number into a talisman bignum table which you cant exactly do normal arithmetic on
to_number() does the opposite which is what i think you want
define to_number the same way you did to_big and swap it out and it should work
I'm referencing vanillaremade so i'm tryna make sure my mod is compatiable based on that
on_discard = function(self, context)
if context.discards_used > 0 then
local total = context.discards_used
local extra = self.ability.extra
for _ = 1, total do
for _ = 1, 2 do
local card = SMODS.add_card({ set = "Spectral", edition = "e_negative" })
if card then G.consumeables:emplace(card) end
end
end
should make 2 negative spectral on discard, don't know why it's not working
so do i do soemthing like to_number(G.GAME.dollars) ?
yeah i have no idea what i'm doing can someone please help me out
yup
and define it the same way to_big is defined
yessir
just so i understand youre trying to make a card that makes all cards count as aces instead of their usual rank yes
yep
thats not quite the same as what pareidolia does
im honestly not sure how one would do that
most game effects just check the cards rank directly so itd be kinda impossible to change it
bump
i figured but I have no clue how do do it
I'm also going to make cards that do this but instead of ranks its suits, how different is that
suits shouldnt be hard thats just what smeared already does basically
depends on what exactly pareidolia is doing
what it looks like to me is it just makes is_face return true if that card exists
but anything that changes how ranks are counted is hard since most of it is hard coded or logically difficult
oh true i forgot about smeared
theres a function is_face() that just returns whether a given card is a face card or not
pareidolia just makes it always return true on any card
what pareidolia does is simply returning true for every check of is_face, so every card "counts" as a face card
does a card's ID number include the suit because it looks like some cards use the ID to know what card it is
you'd likely need to hook get_id() and make it always return 14 if your joker is present
although that could seriously mess things up
yeah thats what I was trying to do but it just. didn't do anything
ignore the 1 i realised it was 14 later
given get_id is used a lot more impactfully than is_face
id is just the numerical rank of the card in question
jack would be 11
my joker is triggering twice when i click
actually you can do that yeah
it doesnt seem like itll work with idol and rebate from what i can tell though
worth a shot
how do I do that
I tried but I definitely don't know what I'm doing since it just doesn't do anything at all
have you made a hook before
no
talisman incompat is G.GAME.round_resets comparison right
alright ill give the rundown
basically you make a local variable to reference a certain vanilla function
then define that function yourself afterwards
there you can drop in whatever code you want
at the end of your new function you call that local variable from earlier so the rest of the vanilla function continues as normal
let me pull up an example
function Card:is_face(from_boss)
if self.debuff and not from_boss then return end
if <some condition> then
return true
end
return _is_face(self,from_boss)
end```
this hook would let me add my own check for whether a card should be considered a face card
local _is_face = Card.is_face is where the local "reference" variable is saved for later
Card:is_face() being the vanilla function in question
yeah so like i did
local _get_id = Card.get_id
function Card:get_id(from_boss)
if next(SMODS.find_card("j_equality_equalace") then
return 14
end
return _get_id(self, from_boss)
end
it could also be the id am I doing that right
the card is equalace and in the mod JSON the prefix is equality
looks right to me
lemme try it again
i'm trying to hook SMODS.calculate_individual_effect so that jokers in the G.GAME.scoreop_mod table's scoring effects' operator's are increased, for example j_joker would give X4 mult instead of +4, how would i go about doing this?
maybe remove the from_boss actually since thats not in the function
wonderful
Why do you keep saying i'm using ai? I just said i'm not using ai.
I am reading the wiki
what are the dimensions of a consumable card
How could I have this change suit after every hand played instead of every round?
local function reset_willatro_jokeinthebox()
G.GAME.current_round.willatro_jokeinthebox = G.GAME.current_round.willatro_jokeinthebox or { suit = 'Spades' }
local joke_suits = {}
for k, v in ipairs({ 'Spades', 'Hearts', 'Clubs', 'Diamonds' }) do
if v ~= G.GAME.current_round.willatro_jokeinthebox.suit then joke_suits[#joke_suits + 1] = v end
end
local jokeinthebox_card = pseudorandom_element(joke_suits, pseudoseed('willatro_jokeinthebox' .. G.GAME.round_resets.ante))
G.GAME.current_round.willatro_jokeinthebox.suit = jokeinthebox_card
end
function SMODS.current_mod.reset_game_globals(run_start)
reset_willatro_jokeinthebox()
end
has anyone here used SMODS.merge_effects? how does it work?
what cards should I test compatibility with
for both the rank cards and the suit cards whenever i get to those
that
is certainly something
uhhhh you could try having it set a value on the joker and make the hook check for it?
and if it finds it it instead runs a different set of checks for the calculation key
so you could rewrite mult to give the effects of xmult
though honestly i have no idea lol
thats what the table is for, not sure how to get the hook to check for only the jokers in the table though
idol and rebate will still use the cards base id
other than that it should be fine at least for vanilla
also what colour is this
G.C.ATTENTION, or just "attention"
my main concern is the hook finding a joker in that table and applying the effect to EVERYTHING
It's G.C.FILTER
For some unknown reason
uhhhh
good question
check if scored_card is the card in question maybe?
hm
bump
i know ive used attention before and its worked
never used filter
attention works
maybe both work?
maybe
The key is attention, but the value is in G.C.FILTER. I don't think G.C.ATTENTION has ever been a thing
how do i add cards with vanilla remade? other mods use a assets folder with 1x and 2x
oh, i see
interesting
good to know
maybe hook into whatever function handles when a hand is played to reset the variable
this may be a tad complicated for me
It stood out to me when I was writing the text styling guide, I could never work out where the name FILTER came from
thunk is weird
with enough determination you can probably do it
this is basically how ive coded everything tbh
what rarity do u guys think this (and the same card for all other ranks, and the same card for all suits in case it should be different) should be
enough time spent in #💻・modding-dev and i can accomplish anything
id make it rare personally at least the rank ones
its basically the ultimate deckfixer since ranks are hard to change so drastically
for the suit ones it can be uncommon like smeared
good point
like being able to play a 5oak for literally free is very strong
that is a great point actually
i mean no matter what I'm gonna do it's not gonna be very balanced but I'm gonna try to make it as balanced as possible without changing what the actual card does so yeah
rare and like. eight dollars i guess
fair enough
you should consider what happens if you have multiple of the rank ones together
Does anybody know why my joker doesn't detect playing card destructions?
Alright i got somewhere with a joker spawning tags, But sadly this is only the code copied from the diet cola joker.
Does anyone know how i can get it to work something like an investment tag or the rocket, where after defeating the boss blind, the player is given an uncommon tag.
that
i
I should test that
itll probably just take whatever is calculated first in the hook
so if aces are higher up in that itll stop there
but it would be counterintuitive
either that or the one furthest to the right i guess?? i have no idea
i'll try it gimme a sec to make the rest of the cards
if context.end_of_round and G.GAME.blind.boss and not context.repetition and not context.individual
i know this is only uncommon tags but be careful if you happen to create an orbital tag since itll bug out and crash
okay I need to reword this
Does anyone perhaps have an example of changing the required suit for a joker (similar to ancient joker or castle) after every played hand?
wait where would i put the if context.end_of_round and G.GAME.blind.boss and not context.repetition and not context.individual ?
do i replace the G.E_MANAGER:add_event(Event({})) line?
When I try and sell this card, I get an error saying "attempt to index loval 'center' [a nil value] but I have no idea what that means
you could find ancient joker or castle in vanillaremade
the example joker mod should have one
it has a recreation of castle with plenty of comments to help
how do i make a joker card display a message with the yellow effect underneath them.
no you put it before that
in the calculate
so if that check returns true it runs the event to spawn the tag
I saw that VanillaRemade uses G.GAME.current_round, but I don't know of a hand equivalent.
so like this?
a large issue with this code for a joker that makes all enhanced card have the positive effects of all vanilla, cryptid, and cryptposting enhancements is causing all the effects below one another to not trigger if the one above it has. for example, if a played hand has 5 or more scoring cards, the first effect occurs, but not anything below it for some reason. any fixes?
if context.individual and context.cardarea == G.play and context.other_card.ability.set == 'Enhanced' then
if #context.scoring_hand >= 5 then
context.other_card.ability.perma_x_mult = lenient_bignum(context.other_card.ability.perma_x_mult) + lenient_bignum(card.ability.extra.light_xmult_mod)
return {
extra = { message = localize("k_upgrade_ex"), colour = G.C.MULT },
card = card
}
end
if card.ability.extra.lucky_mult_chance == math.random(1, card.ability.extra.lucky_mult_chance) then
return {
mult = lenient_bignum(card.ability.extra.lucky_mult),
}
end
if card.ability.extra.lucky_money_chance == math.random(1, card.ability.extra.lucky_money_chance) then
return {
message = "+" .. lenient_bignum(card.ability.extra.lucky_money) .. "$",
ease_dollars(lenient_bignum(card.ability.extra.lucky_money)),
colour = G.C.MONEY
}
end
return {
chips = lenient_bignum(card.ability.extra.bonus_chips),
extra = {
mult = lenient_bignum(card.ability.extra.mult_mult),
extra = {
Xmult = lenient_bignum(card.ability.extra.glass_xmult),
extra = {
message = "^" .. lenient_bignum(card.ability.extra.abstract_emult) .. " Mult",
Emult_mod = lenient_bignum(card.ability.extra.abstract_emult),
colour = G.C.DARK_EDITION,
}
}
}
}
end
Can i do smth like this?
filling all the key substitutes later this is pretty rudimentary
that isnt a bad idea actually
since it just checks for the key
Have you tried using only one return statement, such that all the effects apply at once?
Also, hi kat.
is there a list anywhere of like every effect that i can use as a cheat sheet
the function youre hooking
is this correct?
in the source code
yeah ive been looking for it
smods is kinda complex
one return statement wouldn't really work because there are multiple ifs that need to be accounted for. for example, if the scoring hand doesn't have greater than or equal to 5 cards, i don't want the first effect to trigger
hello
smods/utils.lua
around line 1210
can i get some help?
thank you
calculate = function(self,card,context)
if context.end_of_round and ... then
G.E_MANAGER:add_event ... end) }))
end
end```
Is there a current hand equivalent to G.GAME.current_round? G.GAME.current_hand doesn't exist.
calculate is run whenever something in the game, calculates what effect it should have
the if context checks just narrow down when that should be to only certain scenarios
in this case, when defeating a boss blind
you may have to do some extra work to account for xmult -> emult and emult -> tetration
plural, yes
i dread when i get to hyperchips/hypermult
so "hearts"
toh pfp
i love toh
im not sure
you could try hooking G.FUNCS.play_cards_from_highlighted(), i doubt theres no better way but idk it
and it's the otter with a dark side scene, perfect
how do i add cards with vanilla remade? other mods use a assets folder with 1x and 2x
wdym by that
@ivory coral Is this around the right thing?
so, anything? i still don't even really know why this happens
the assets are for the textures
what do you mean by add cards with vanilla remade
the mod doesnt use that method and idk how to add jokers without it
i keep calling jokers card sory
it doesnt?
im not sure how it does it but it must have something similair
also what do you mean add jokers with vanilla remade
its its own thing
can someone explain this phenomenon thats happening before my very eyes at this moment
the ... is just me not writing it all down i meant the rest of the line from earlier
how do i make a custom modded consumable type
but otherwise yeah
idk i thought it would be more convenient for coding
Um, something is going wrong
dont use ...
why are you even using ...
looks ai generated tbh
its not
like the ai wanted you to fill something in there
no it was me
ill believe it but
i typed that
great
im joking, if you cant tell...
but yeah they shoulda replaced the line
thats the issue
i dont mean to be condescending really but you are taking my advice way too literally
i dont mean literally copy paste im not coding it for you im just helping you along
anyone?
I'm sorry, i'm not good when it comes to lua coding in general
is there a way to permanently flip a playing card
thats not a lua problem, they told you to replace a line and you didnt, you could have at least asked
SMODS.ConsumeableType
https://github.com/Steamodded/smods/wiki/SMODS.ObjectType
thanks
hello, im trying to create a joker that checks for adjacent ranks held in hand, how would i set up a for loop to check each held in hand card? all the attempts i have tried have just crashed
how do i change the speed at which a dynatext cycles?
thats okay but personally id recommend you acquire a basic understanding of how coding functions
its not a lua thing here its just technical knowledge
you dont need a phd in lua or anything to make a mod but i would recommend learning at least a bit on how code is actually read by a computer and what some key terms mean
itll probably make it a whole lot easier
how do i pass a color
hex code?
checking for playing cards highlighted is #G.cards.highlighted, right?
table with rgba?
HEX('hexvalue')
awesome
HEX('4F6C74') for example
G.hand.highlighted i believe
check through for k, v in pairs(G.hand.cards) do
actually no
in this case for i = 1, #G.hand.cards might be better
how do i multiply chip value?
then check the ranks of [i+1] and [i-1]
G.hand cards was what i was missing ty
sweet
like on a card or like an xmult joker but for chips
i have several questions
xmult joker but for chips
just return xchips = <some value>
its already supported by smods
alright!!
same as xmult just replace the xmult with xchips
bump
i dont think so
since flipped-down cards are flipped back up when returned to deck
one more bump; why no workie
and then what about the effect when it applys to the chip counter.
yeah ok you were right
hm
because it returns
im not sure i understand what you trying to do even after reading the original message lol
once a function calls a return it stops
maybe i can add them to a table or something
OH
wym?
and automatically flip if drawn?
how do i fix that 😭
it also just occurred to me that they're still scored like the cards they normally are but.
a) i don't care enough to try to fix that
b) i think if it did it'd be way more busted
im pretty sure it just handles that itself
for example if you just
xmult = 3
}```
itll just do the rest for you
When the xmult applys to the multiplier, itll show how much xmult is added.
how do i do that for xchips?
ooh gotcha
smods already handles that i think
yeah but like how do i have it return without ending everything
or is there like an alternative
yeah it just makes them be considered as <rank>
they dont become <rank> and dont change chip value either
oh my fucking god
uhhhhh
you could just have it increment some config value and then have it all in one big return at the end
do you guys have any ideas how to move the Aces on the main menu?
so if i add the xchip itll just show that the xchip is added
yeah!
hmm okay
so like
it sets a value to true and later in the return just add (... and value == true) so it checks for it
maybe
im not sure
should do yes
so i just do
Xchip_mod = card.ability.extra.xchip
and then im done?
What IDE setup should I use for balatro modding?
what do you mean
that seems bad
like
the logo is bal tro
but i want it to be
b latro
move the ace there
like its default position on the menu?
im pretty sure thats its own cardarea so youd have to do some ui shenanigans to move it
ah i see
im fucked
uhhh
the bal tro sprite doesnt actually have the a behind the ace anyway
teh you'd have to put xchips inside of a extra table in config
uh maybe i can just stop balatro from unflipping cards when put back in the deck?
is that possible?
ah alright and then im done?
i mean its possible but ive not messed with ui before so i wouldnt know how its done exatly
with a patch probably
uhhh
alright now i need to figure out where to look
actually
apparently stay_flipped is a thing
im not sure what it is or how it works exactly but maybe thats worth looking into
the Xmult turned into nil.
in someway somehow.
@ivory coral know anything about this?
i hope so 😭
thank you
can you show your code?
whats the code where youre using ipairs
im not
only thing ive added
probably use find_joker()
i have a sneaking suspicion its the HEX
oh
you did xchip
NOIK???
and then called xchips
ah
@near bay
if thats all you changed then quite possibly
sorry i copied from smear to see if i could modify it i didnt notice that
how did you put it
my code
wait no
cuz
oh.
then what about the xmult being nil.
No don't
Like you can but it's not super recommended
erm
otherwise it looks fine
capitalizing what
oh ok nvm then
the letters in the hex code
is there a part of this condition that im wording wrong out of curiosity
its saying it's indexing a nil value
okay i had to make them seperate elseif statements instead of just or???
that's weird
but ok
tried didnt work
oh ok at least it works
hm, still trying to figure out how to flip cards in the first place
fuller error if it helps
why do you add _mod after the things?
im trying to flip all highlighted cards
i think it could be what is causing the error (im not sure tho)
the real question is what suit this is
the second one will potentially zero-index since [i-1] could be [1-1]
i dont know? sorry im new to modding i started yesterday
ok so would i just add like, if i = 1 dont do that
or its proabbly doing that at the end too isnt it
how would i catch this for the last card also
no worries! try without it and see if work
What I would do is start the loop at i = 2 and then set it to stop at #G.hand.cards - 1
ive done this before without issue
maybe try adding a default paramater to your consumabletype
and/or adding an undiscovered paramater to its loc_txt
ohhhh thats smart ok
how do i stop it prematurely again?
been a while i mostly just used loops in java in grade 11 😭
I dont think there are any examples of flipping cards in this specific way anywhere
so im lost
couldnt you just check if table[i] exists first
You could but that's just an extra step
fair
I just realized you are already stopping prematurely at #G.hand.cards so you could just add the - 1 at the end of that lol
hope it helps
bump
- No can_use function. This will make it so you can actually use the card when the given arguments are true and can make it so you don't have to check for highlighted cards in the use function itself
- Loop through the highlighted array and just run :flip() on them
for _,v in ipairs(G.hand.highlighted) do
v:flip()
end
?
Basically that lol
thats the flip all highlighted card function
it doesnt crash anymore 🙏 it doesnt Work however
The lack of formatting is killing my braincells lol
Do you have the Lua VSC extension
ooh i do not
cool ty, this works! though, is it permanent?
my goal is to make it permanent
so, flipped cards are always drawn flipped
maybe?
no
I forgort things are weird
how would i make it permanent
you also want to check the amount of cards in hand
it must be at least 3 for the check to work
game launched when i commented this out
whats the problem
✨ Patches ✨
you forgot to wrap the strings in text field in {}
WAIT IM STUPID
YEAH
hopefully formatted it a little better?
would you know what/how exactly?
Nope, sorry
hm
SMODS.Challenge {
key = 'easy_challenge',
loc_txt = 'Easy Dubz',
jokers = {
{ id = 'j_mvan_astral' }
},
rules = {
custom = {
{ id = "win_ante", value = 10 },
},
modifiers = {
{ id = "joker_slots", value = 10 },
},
},
unlocked = true
}```
Everything works except the win ante not being set to 10?
thats fine, ty anyways
That's definitely a more in-depth addition than something I can just help you implement off-rip lol
yeah fair
