#💻・modding-dev
1 messages · Page 656 of 1
ye
use amulet
Thx, I'll use the to_big workaround tho
do context.buying_card and context.moeny_altered not fire at the same time dammit
itd be nice to have this effect only proc on purchases and not when you lose money in other ways
oh wow adding custom colors was easier than I thought lol
Trying to make one that changes 3 different colors in 1 second is a pain lol
SMODS.Gradient tho
well now the custom color doesn't work for some reason
[SMODS _ "src/utils.lua"]:582: bad argument #1 to '(for generator)' (table expected, got string)
Development version of Steamodded detected! If you are not actively developing a mod, please try using the latest release instead.
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-1407a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.9.0
Platform: Windows
Steamodded Mods:
1: Twitch Integration by chowder908, JackMacWindows, Mossloth [ID: twitchintegration, Version: 1.0.0]
2: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.1, Uses Lovely]
3: SystemClock by Breezebuilder [ID: SystemClock, Priority: 100000, Version: 1.7.1, Uses Lovely]
4: JokerDisplay by nh6574 [ID: JokerDisplay, Priority: -1000000000, Version: 1.8.8.5]
Lovely Mods:
Stack Traceback
===============
(3) LÖVE function at file 'boot.lua:352' (best guess)
Local variables:
errhand = Lua function '(LÖVE Function)' (defined at line 605 of chunk [lovely debugplus.console "debugplus/console.lua"])
handler = Lua function '(LÖVE Function)' (defined at line 605 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) local C function 'next'
(5) Lua field 'shallow_copy' at Steamodded file 'src/utils.lua:582'
Local variables:
t = string: "#800080"
copy = table: 0x059922a8 {}
(for generator) = C function: next
(for state) = string: "#800080"
(for control) = nil
(6) Lua global 'attention_text' at file 'functions/UI_definitions.lua:942'
Local variables:
args = table: 0x059910e0 {backdrop_colour:table: 0x01463b30, scale:1, major:table: 0x048f1260, colour:#800080, hold:2, text:JACKPOT!}
(7) Lua function '?' at file 'commands.lua:89' (from mod with id twitchintegration) (best guess)
Local variables:
difference = number: 1000
(8) Lua method 'update' at file 'main.lua:182' (from mod with id twitchintegration)
Local variables:
self = table: 0x04761968 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x0588fc70, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x05817450 (more...)}
dt = number: 0.00600012
line = string: ":chowder9o8!chowder9o8@chowder9o8.tmi.twitch.tv PRIVMSG #chowder9o8 :!jackpot"
err = nil
user = string: "chowder9o8"
msg = string: "!jackpot"
command = string: "jackpot"
arg = string: ""
(9) Lua field 'update' at file 'main.lua:1022'
Local variables:
dt = number: 0.00600012
(10) Lua function '?' at file 'main.lua:961' (best guess)
(11) global C function 'xpcall'
(12) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 932 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])```
loc_colour()
G.ARGS.LOC_COLOURS.ttv_purple = '#800080'
using
colour = G.ARGS.LOC_COLOURS.ttv_purple,
It should be HEX('800080')
I really should learn to read
it's right in front of me on the wiki

I added a second colour to loc_colour()
game started crashing
removed it
now I can't get the game to stop crashing
even deleted lovely folder
what function would i use to make a card do something when the run is loaded? if the card is doing a juice_up_until when i go to main menu and then reload the save, it stops juicing up and i would like to fix that
The load function.
cool thx
I guess I just completely broke the mod
because I can't fix this error
even reverting back a couple versions
if is_on_cooldown() then return end
if G.STAGE ~= G.STAGES.RUN then return end
local difference = 1000
ease_dollars(difference)
attention_text({ colour = G.ARGS.LOC_COLOURS.ttv_purple, text = 'JACKPOT!', scale = 1, hold = 2, major = G.play, backdrop_colour = G.C.WHITE })
play_sound('ttv_jackpot', 1, 1)
end```
G.ARGS.LOC_COLOURS.ttv_purple = HEX('#800080')```
unless I got a typo somewhere
this is what it originally was
Remove the #
already tried that
I dunno what I did differently
but it just worked

version = "1.0.0"
dump_lua = true
priority = 9999999
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''G.SPLASH_BACK:define_draw_steps({{
shader = 'splash',
send = {
{name = 'time', ref_table = G.SANDBOX, ref_value = 'vort_time'},
{name = 'vort_speed', val = 0.4},
{name = 'colour_1', ref_table = G.SANDBOX, ref_value = 'col1'},
{name = 'colour_2', ref_table = G.SANDBOX, ref_value = 'col2'},
{name = 'mid_flash', ref_table = G.SANDBOX, ref_value = 'mid_flash'},
{name = 'vort_offset', val = 0},
}}})'''
position = "at"
payload = '''
G.SPLASH_BACK:define_draw_steps({{
shader = 'splash',
send = {
{name = 'time', ref_table = G.ARGS.LOC_COLOURS, ref_value = 'vort_time'},
{name = 'vort_speed', val = 0.4},
{name = 'colour_1', ref_table = G.ARGS.LOC_COLOURS, ref_value = 'ttv_purple'},
{name = 'colour_2', ref_table = G.ARGS.LOC_COLOURS, ref_value = 'col2'},
{name = 'mid_flash', ref_table = G.SANDBOX, ref_value = 'mid_flash'},
{name = 'vort_offset', val = 0},
}
}})
'''
match_indent = true```
trying to learn lovely patching
I just wanna know if i'm on the right track on doing this right
because i can't get any visual difference in-game
Is there a way to iterate through all registered jokers after all mods have done their things
I wanna automatticly add badges to jokers depending on their pools
just go through G.P_CENTER_POOLS.Joker in any function hook like main menu
although badges are dynamic so it would be better to hook/patch the generate ui function for that
so like override the generate ui function?
the function does a lot of other things so not override lol
search AUT.badges in the code and you should find the part that adds them
oop
ight thx
is someone familiar with the ankh mod?
im trying to install it but it keeps crashing
or do i have to go to another channel for that?
thanks
its very old tho so it might just not work with newer stuff
ohhh thanks
definitely right
what's the difference
what I got now
was told I should get the right kinda purple without the logo blending into it
G.P_CENTER_POOLS.Enhanced iirc
ty
but consider using poll_enhancement instead
i wanna use pseudorandom_element since it has an in_pool function
better but i still prefer the first one. But i think its personal preference
yes but you would need to respect the enhancements own in_pool too
ah true
i'll use poll_enhancement then
i thought abt it and the in_pool was kinda pointless
you can filter the list first and give the list to poll_enhancement i think
in the options argument
yeah
soon you'll be able to use SMODS.poll_object and give it your filter function anyway 🤞
I'm having a bug where when you load up a run in progress, if you previously used one of the consumables, the game would softlock like this
SMODS.Consumable{
key = 'clearance',
set = 'fnaf_item',
atlas = 'TarotFnaf',
pos = {x = 0, y = 1},
cost = 4,
loc_vars = function(self, info_queue, card)
end,
use = function(self, card, area, copier)
end,
can_use = function(self, card)
return next(SMODS.find_card("j_fnaf_diver"))
end,
in_pool = function(self, args)
return next(SMODS.find_card("j_fnaf_diver"))
end
}
SMODS.Joker {
key = "diver",
blueprint_compat = false,
rarity = 1,
cost = 4,
atlas = 'Joker',
pos = { x = 9, y = 2 },
config = { extra = { levels = 0, maxlevel = 6, chips = 0, mult = 0, xmult = 0, h_size = 0} },
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = { key = "fnaf_bug", set = "Other" }
return { vars = { card.ability.extra.levels, card.ability.extra.maxlevel, card.ability.extra.chips, card.ability.extra.mult, card.ability.extra.xmult, card.ability.extra.h_size} }
end,
calculate = function(self, card, context)
if context.using_consumeable and not context.blueprint and context.consumeable.ability.set == 'fnaf_item'
and not (card.ability.extra.levels == card.ability.extra.maxlevel) and context.consumeable.config.center.key == 'c_fnaf_clearance' then
card.ability.extra.levels = card.ability.extra.levels + 1
card.ability.extra.chips = 100 * card.ability.extra.levels -- 1
card.ability.extra.h_size = math.max(0, card.ability.extra.levels - 1) -- 2
card.ability.extra.mult = math.max(0, 5 * (card.ability.extra.levels - 2)) -- 3
card.ability.extra.xmult = math.max(1, 1 + (0.125 * (card.ability.extra.levels - 3))) -- 4
-- 5
-- 6
if card.ability.extra.levels >= 2 then
G.hand:change_size(1)
end
end
if context.joker_main then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult,
xmult = card.ability.extra.xmult,
}
end
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size)
end
}
It's a card where when it's used a joker gets a progression point, where it gets some buffs
SMODS.current_mod.calculate = function(self,context)
for k, v in pairs(ellejokers.calculate) do
v(context)
end
end
SMODS.current_mod.reset_game_globals = function(self,run_start)
print("waow")
for k, v in pairs(ellejokers.reset_game_globals) do
print(k)
v(run_start)
end
end```anyone know why the `reset_game_globals` isn't working?
it's not even doing the first print
the calculate one works fine
wait
i think i need to remove the self
nope still not working
oh
it works when i start the run
chat am i have stupid
what's the compatibility with other mods that change the title screen & vortex colours 
bump
itll be compatible but what ever mod has the highest priority will take the screen. There are ways around it though.
what's the function for creating an info_queue uibox?
generate_card_ui
ok
i've already been patching that func so uhh
where in it is the info_queue ui stuff?
since i wanna add onto it,,
i think i get it now maybe
nope, still confused
what do you want to do, add more info_queues to cards?
ty
_ _
e doesn't seem to contain any of the info_queue data
are you sure i should be hooking show_infotip instead of adding onto my existing generate_card_ui patch?
Even I trying to avoid generate_card_ui and other info_queue-related things
When your object is not center a lot of shit is happening
i dont avoid it :3
You have a card to begin with, that's so easy
I should revisit my verison of the yugioh mod
was gonna make it like the pokerman mod
Anyone know why this is happening?
but I gave up because i was too stupid to learn lua
speaking of learning
key = 'ttv_jackpot2',
colours = {G.C.RED, G.C.RED, G.C.RED, G.C.RED},
cycle = 0.2,
interpolation = 'linear'
}```
Is this how you do the Gradient?
im assuming youre just drawing it to hand here?
SMODS.Joker{
key = "axonitta",
config = { extra = {}},
pos = { x = 2, y = 4 },
rarity = 2,
cost = 6,
blueprint_compat=true,
eternal_compat=true,
perishable_compat=true,
unlocked = true,
discovered = true,
atlas = 'grasslanderJoker',
calculate = function(self,card,context)
if context.joker_main then
draw_card(G.play, G.hand)
return {
message = localize('gl_axonitta')
}
end
end,
}```
swift???
I tried to give it colour
hence the swift
anyway plain drawing the card back to hand doesnt work because itll still be included in the remaining hand calculations
Yeah Axie draws the first card in played hand back to your hand
including flipping it and attempting to return it to deck
Do I need to add an event?
i think you need to do it differently entirely
dammit
idk if theres a way but try looking into how really old gold seal worked
just wait for next smods version
I do have a working solution which destroys the card and adds a copy of it to hand
I'll stick with that for nwo
I don't guess you can use an smod.gradiant in colour in attention_text
since always crashes with a string error

i think you can use it in card_eval_status_text if that also works for your purposes
SMODS.Gradients[key] ?
its more limited in terms of messing with the animation though
thanks that work
but doesn't cycle through
only when I hit the comand over and over again
I guess I use trig instead of linear?
oh yeah i got the same thing, i think it just takes whatever color it is where the gradient would be at that time
ah yeah attention text copies the color
i think
so it gets what it is at that moment
hmmm
it's the same for card_eval...
is it?
i know edition effects have it cycle while the message is there
which is just card_eval_status_text with G.C.DARK_EDITION as the colour afaik
it DEFINITELY used to do that
I just need away to cycle through a couple of colours fast
to make the jackpot text look flashy like winning a slot
Anyone know how to apply a random sticker to a joker?
me with dozens of copies of balatro in the folder so i can swap between wildly different mod loadouts on the fly:
what file would this be in?
I cant find it
oh I was looking in smods thx
how would i make something automatically update?
ex: "This joker gets +2x Mult when x or y is in the hand"
update function
would that also work for the description?
use loc_vars for that
SMODS.Joker{
--- unimportant code
loc_txt = {
name = "Candy Cookie Chocolate",
text = {
"If played hand contains exactly {C:attention}3{} cards",
"cards give {X:mult,C:white}x#1#{} mult per {C:attention}food{} joker when scored",
"Currently gives {X:mult,C:white}x#2#{} mult",
"{C:inactive}That's right! I remembered something: You won't help me.{}"
}
},
config = {
extra = {
scaling = 0.25,
mult = 0.75,
base_mult = 0.75
}
},
loc_vars = function(self, local_queue, center)
return {vars = {center.ability.extra.scaling, center.ability.extra.mult}}
end,
update = function(self, card, dt)
local value = card.ability.extra.base_mult
pcall(function()
for index, joker in ipairs(G.jokers.cards) do
if safe_get(joker.config.center, "pools", "Food") then
value = value + card.ability.extra.scaling
end
end
end)
card.ability.extra.mult = value
end,
--- unimportant code
}
this automaticly updates the current gives x mult to relfect the number fo food jokers you have
i see, thank you!
-# now i just need to remember how to detect when specific jokers are in hand...
SMODS.find_card(key) returns a table of jokers of the given type. you can do #SMODS.find_card(key)>0 to check if you have the joker
^ you don't need update for this
what i mean is if i have a joker that works when x amount of Jolly Jokers are in hand, it is then updated
wiki for smods.gradiant says use update(self, dt) but I can't figure out where to properly place
.
loc_vars
you also shouldn't use update
is it better to just implement a function for each context that adds / removes jokers
okay
okay I found it but im still confused how I should add my badges
you would patch that code and use create_badge to add it
-# im still confused, conflicting information gives me a headache...
Would I just use an If statement during the loc_vars function to detect if a specific joker is in hand? or is that an illegal statement?
yes you should do that
yeah
is there any way that is compatible with this
loc_vars is just a regular function that gets called whenever a card's description has to be shown on screen. You can do whatever you want in it. Any if statements and the like will work just fine within it.
badges are created dynamically every time you hover the card so you can't do it once
also just to confirm, this is not only for your cards right? because if it is there's an api for badges
yeah I wanna make it so if anyone makes a mod branching off on mine they don't have to manually do the badges
is there a mod that someone has done text that changes color on screen
then yeah you would do it there
so I can look how they did it
I got the Gradient to work just doesn't cycle when text is displayed
doesn't vanilla have the you win with a gradient or am i misremembering
or you mean the background?
so I'd need to patch my list into the file along with code to check the cards pools?
the list can be in your file, you would only need to check if the card is in one of the pools
@red flower mute the video because volume warning
how would the lovely file know the data it needs to iterate through
the function runs in the middle of the game, by that point your file is already loaded
think of all the game + mods as just being part of one big file
oh so other mods can access my local variables?
not the local ones
the local ones have a scope of only the file
they can access any globals tho
this is what it looks like
just make that a global
i would make a table for your mod instead
most mods have one, usually the mod's name
like Cryptid = {}
oh yeah i've seen that with cryptid
you can also access your mod object with SMODS.Mods.mod_id
oh okay thx
time to figure out how to patch files yay
okay where can I figure out how to do this at
What naming scheme am i missing to get my new hand type to show up?
mod prefix
you don't need to manually put the mod prefix in the poker hand's key definition, smods will automatically do that
so the full key is now "uma_uma_perfect_pair"
(assuming uma is your mod's prefix)
okay the only thing I don't understand is how to target the lovely\dump\functions\UI_definitions.lua file
functions/UI_definitions.lua
thx
still crashes when key = "perfect_pair", and yes the mod prefix is "uma"
same error as well
are you restarting the run
wow that was the fix, thank you!
usually you put it in an object node
tried major and align
neither work

and you were right about the you win text
it does gradient
fyi I don't think it does this, it should detect that you've prefixed it yourself and not do it. The times it will break and repeat is if you put the class prefix too, so key = 'j_modprefix_key' would become j_modprefix_j_modprefix_key iirc
but it uses DynaText
oh that's cool
attention_text uses dynatext no?
you can just copy the function and just remove the copy table part
How would I check if the amount of cards currently held in hand are greater than your max hand size? Is it just #G.hand.cards > G.hand.config.card_limit ?
yes
DynaText({ colour = SMODS.Gradients['ttv_jackpot2'], text = 'JACKPOT!', scale = 1, hold = 2, major = G.play, backdrop_colour = G.C.WHITE })
?
dyna text is supposed to have x_offset y_offset
but changing the value doesn't seem to do anything
Dynatext isn't gonna work
tried everything
I guess I should go back to trying get gradient to updating in realtime
Where would I need to patch into for updating a variable after playing a hand, while the played hand data is still accessable
nvm found it i think
nothing you do with the gradient will solve your problem
i gave you one
DynaText didn't work
that's not what i said
i said copy attention_text's code
and remove the copy table on the color
oh ur saying just straight up rip the attention_text function from the vanilla game
yes
I tested without smods and gradients don't change in any text popups btw
the vanilla function also copies the colour table
How would I check the suit of a card inside the definition of a new poker hand? I'm trying to make a hand that has all 4 cards played be the same suit, but I couldn't get parts._flush to return anything useful (I could have also been mis-using it). What's the best way to check for this?
IT FUCKING WORKED
thank you
now I need to fix the seizure endusing flashing
local oldsmodsfourfingers = SMODS.four_fingers
function SMODS.four_fingers() return 4 end
local result = get_flush(hand)
SMODS.four_fingers = oldsmodsfourfingers
return result
I kinda get what this is trying to do but I’m not sure how to implement it
G.E_MANAGER:add_event(Event({
func = function()
local difference = 250
ease_dollars(difference)
return true
end,
}))
delay(1)
G.E_MANAGER:add_event(Event({
func = function()
local difference = 250
ease_dollars(difference)
return true
end
}))
delay(1.25)
G.E_MANAGER:add_event(Event({
func = function()
local difference = 250
ease_dollars(difference)
return true
end
}))
delay(1.50)
G.E_MANAGER:add_event(Event({
func = function()
local difference = 250
ease_dollars(difference)
return true
end
}))
delay(1.75)
return true
end
}))```
what's the best way to do delays
no matter what I do they all trigger at the same time
Delays inside events wont do anything im fairly certain
delays are events
so no, queueing a delay during another event won't delay properly
So what would be away to have money being added one at a time
trying to simulate a slot machine giving a payout
copy and paste the top event and delay
delay(0.15)
G.E_MANAGER:add_event(Event({
func = function()
local difference = 1000
ease_dollars(difference)
return true
end
end
}))
so copy this a couple times
func = function()
G.E_MANAGER:add_event(Event({
func = function()
local difference = 250
ease_dollars(difference)
return true
end,
}))
delay(1)
repeat func?
don't repeat that top line
G..E_MANAGER:add_event(Event({
func = function()
local difference = 250
ease_dollars(difference)
return true
end,
}))
delay(1)
just
how am i meant to hook card.click without crashing
didn't work they still all trigger at the same time
when running the hook function are you including the self
Code?
wait nvm i kinda feel stupid
is there a way i can make the last line open a link in the player's browser, when clicked?
i could just move the function to a new one
(if it works it works, if it dont it dont... too bad i probably cant test it rn.)
soonTM
yes you can, love has function to open url
awesome ^^ how would i do that?
nvm I got it
I mean, I can say how to do it, but what if you'll try to figure out yourself?
Hint: there's buttons in main menu which opens urls
ngl i thought the hard part that're asking about would moreso be the clicking text thing
clicking text depends on how you've made this text
taking a mental note of this for when i make a credits page for my mod
hi, new modder here :)
i can't figure out how to get the files i want, i want to make a BUmod texture/text changing mod
i want to make the actual mod files with the textures and such but idk how
figured it out i think
sorry its confusing to say
you can add {button:string} (where string is a reference to G.FUNCS.string which is a function that is called when you click the text ) to the loc in dev branhc
it was merged only recently isnt it
o!
o neat
i had no idea
(though i'm not sure if the UI text object allows those brackets)
like I said, depends on how you've added this text
like so:
{
n = G.UIT.R,
config = { align = "cm" },
nodes = {
{
n = G.UIT.T,
config = {
align = "cm",
text = localize("flipbook_disabled_headsup_5"),
colour = G.C.BLUE,
scale = 0.4
}
}
}
}```
oop formatting 😭 sorry
i had to put each line in individually, because the text wasn't accepting a table of strings
then do what sleepy said
-# what did sleepy say ;u;?
oh I guess you can still do the loc thing too
-# oh you mean about the button
i mean the more attractive option now is the brackets
because that would also let me stop putting in lines one at a time
how do ability texts handle this? i looked, but couldn't find where they're defined
by this i mean like make the mod folder with all the assets
bump
I love vanillaremade more each day
got it to work ^^ thanks!
My coder has trouble writing a joker that halves probabilities can someone just do it for them please
I can't code and this is the best I can think of aside from giving up on that joker entirely
How would I go about finding the suit of a card inside an SMODS.Pokerhand evaluate function? I have my selection of cards to look at, but I don't know how to check suits for them
so much has been done with this twitch balatro mod
in the calculate function:
if context.mod_probability then
return {
denominator = 2 * context.denominator
}
end
tell your coder to brush up on this page https://github.com/Steamodded/smods/wiki/Calculate-Functions
but at the same time still feels far from finished
Alr

:is_suit?
I assumed that was used to check of a certain card was a defined suit, as a boolean answer. Can it also read the suit of a card, and return a string or numeric value so that I could use it to compare with others?
what's the difference between using SMODS.pseudorandom_probability and G.GAME.probabilities.normal?
G.GAME.probabilities.normal is the old way that it worked before the new probability system was implemented, don't use it
ah, got it
it's only still around because vanilla content (oops all 6s) uses it
interesting
does SMODS.pseudorandom_probability still recognize if the player has oops all 6?
yes
how do I get this to work individually on all cards?
If I use similar code to trading card, it just destroys all the cards discarded at the same time
to specify, I want each card to have a 1 in 10 chance individually. Not a 1 in 10 that all cards get destroyed together
code?
use context.discard, not context.pre_discard. context.discard is run once per each card that's discarded
oh, fire
you can also return remove = true in context.discard iirc
like this? ```lua
calculate = function(self, card, context)
if context.discard then
if SMODS.pseudorandom_probability(card, 'sharpTeeth', 1, card.ability.extra.odds) then
return {
remove = true
}
end
end
end
i think so yea
When I try to read the suit and store it for the 1st card, it throws this error. What do I need to do to hand_group to make it the correct data type?
parts._all_pairs is a table of tables of cards
because it's all the possible pairs that exist in the played hand
if its the effect you said earlier just loop through hand
but btw if you want this to work like flush this will ignore all enhancements
yeah that's something I noticed after seeing the above documentation
and I'm not sure how the best way to handle that is
this is the get flush function
oh that makes sense with how four fingers works then
so just use the for hand loop there and modify it to look for 4 cards basically?
yeah
okay goated
Seems like its all working! I'll do some testing with enhancements to double check that things like wild cards work but it seems all good
is #G.hand the amount of hands someone has left?
G.GAME.current_round.hands_left
muchas gracias :]
game says that's wrong
what'd I do wrong this time
you can't reference anything in G.GAME in the config table itself, that code is only run on boot (i.e. before G.GAME even exists)
you just have to do the math in the loc_vars and calculate functions directly
ah, ok
is this going to work?
seems like it does
the joker shouldn't have a config table at all anymore
just work with G.GAME.current_round.hands_left directly, dividing by 100 when you need to
oh true lmao
oh, interesting
Oh so that's what it does😭
I couldn't figure it out when making a mod myself
tried to make a joker instantiation function and it did not like that 💀
it's complaining about the key of the first joker I made, "firstBrother", so I'm not sure what's up.
Anyone got ideas?
it should be SMODS.Joker(createJoker(...)), not SMODS.Joker { createJoker(...) }
because the function already returns a table
ah, ok
I want consumables to have rarities in my mod but I'm not sure how'd I'd begin to do that
how do i use get_loc_debuff_text in mod_calculate
return debuff_text in context.debuff_hand
probably
is it really this simple?
Is it possible to have scaling be tied to a joker having a specific badge
A rekoj based on zibarro scales per bizarro triggered that run, and all the bizarros have a bizarro badge so I'm wondering if making it check for the badge is the easy way to do it
nope
debuff_text
right
like that literally
lets try that again
im new here ok?
its not documented because they refuse to merge my pr
sorry, im not trying to be mean this is how i communicate
If yes can I get the code for it
So I can send to the coder
i love undocumented functions
thanks
i dont think so, badges are generated dinamically
I have no idea what that means
they generate when you hover the card
badges only exist when you hover over the card
So whatever code used to assign it can't be used to scale rejok
calc_scaling looks messed up
you'd have to go deeper than that and look at the code that generates the badges
you would need to check whatever the badge checks to be generated, depends on the badge you care about
the guide says its calc_scaling = function(self, card, other_card, initial_value, scalar_value, args) when other_card is thrown out and card is the replacement for other_card
All bizarros have an assigned bizarro badge, and rejok is to scale for every bizarro triggered (once)
then you would need to check whatever assigns that badge yeah
basically the only mention of it in the code is local ret = obj:calc_scaling(_card, card, initial, scalar_value, args) and this section seems like a dud.
https://github.com/Steamodded/smods/wiki/Calculate-Functions#detecting-scaling
there we go
its a 15% chance that rerolls every time you play a hand
i dont understand what your question is if any
so the question is, how can i modify my card while in this function without having to make a new context value for every single joker that relies on scaling to scale along
or perferably, how do i get back up to card from card.config.center
you cant
well that was the fastest ive thrown out a concept.
i dont get why you cant use card
its because its probably gonna return the card thats getting scaled
https://github.com/Steamodded/smods/blob/main/src/utils.lua and look for calc_scaling
WAIT A GODDAMN MINUTE
i still dont get what youre talking about
i can use self, but the wiki's still lying
entire function copied.
and compare it to the wiki example of how you should use calc_scaling
whats other_card for anyway
but why put self in the function variables on the object side
because thats what every center function does?calculate(self, card, context)?
when that will offset the variables by 1 and make args nil... potentially
???
where??
ah i get the problem
the colon means that obj is the first argument
obj is self in this case
because when you have something like
function Card:get_id()
the colon means that it has 1 argument called self that is of class Card
in this case self is a card
but in a function in SMODS.Joker self would be of class SMODS.Joker
so card is a different argument
What does G.GAME.dollar_buffer do, exactly? I'm trying to read currently held dollars right after money is altered and my program acts with a one action delay no matter what, tried using dollars directly and dollars with buffer (under the assumption that buffer meant the amount to be added)
local newMoney = G.GAME.dollars + (G.GAME.dollar_buffer or 0)
So I'm guessing dollar_buffer is not at all what I thought it was and I'm kind of stuck here
what exactly do youi want to do?
wait a sec I'll get my code
This
Basically, I want to add mult equivalent to whatever amount of money you're using in real time, which is something that only ever really happens with flash card
I think G.GAME.dollars is updated after money_altered, which doesnt impact anything in the base game since all money effects are delayed
so you want the amount that changed?
pretty much
oh damn aight I'll try that out
should make my life easier
Can confirm, its all functional now, thanks
bumping this
Bunch of different sets, make them look like they are from the same set and make your own consumable tab that contains all of them 😛
Jokes aside, there is no convenient way to do it
You just have to figure something out ig
Weights I THINK are planned for smods
So you can try to wait
Another stupid idea, make them Jokers that act as consumables 
im not doing all that 🙏
Ofc you aren't, you would be an idiot if you did
I think I saw someone making their cards more common by like. Adding multiple copies of it in the pool or something.
Again, no convenient way to do rarities for non-jokers
would anyone happen to know a good way to just like, fade the screen to white?
i was staring at the splashscreen to figure out how it does it and i got nowhere with that
The new screenshader feature in dev SMODS might be of interest here
What's wrong with my seal definition for my challenge deck?
It should be Blue
oh my god i've been trying different combinations for like a half an hour and I never thought of capitalizing it
Does G.pack_cards not exist yet when calling context.open_booster? Trying to add a consumable card in whichever booster you're opening
lua tables are 1-indexed
So G.pack_cards[0] wont exist regardless
Im pretty sure the area should exist in the context though
Might be add_card instead of create_card too
working as intended
if is_on_cooldown() then return end
if G.STATE ~= G.STATES.SELECTING_HAND then return end
if G.STAGE == G.STAGES.RUN and G.hand then
-- play_sound('card1', 1)
G.E_MANAGER:add_event(Event({
func = function()
for i = 1, #G.hand.cards do
local card = G.hand.cards[i]
G.hand.cards[i]:flip()
play_sound('card1', 1)
G.hand:unhighlight_all()
for k, v in pairs(G.hand.cards) do
v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
G.hand:shuffle('aajk')
play_sound('card1', 0.85)
delay(0.1)
G.hand.cards[i]:flip()
play_sound('card1', 1)
delay(0.8)
end
end
end
}))
end
end```
trying to figureo out why it loops
fixed it
needed a return true

<@&1460584319486791871> scam post
is there away to reload lua in-game without having to restart the game
if is_on_cooldown() then return end
if G.STATE ~= G.STATES.SELECTING_HAND then return end
if G.STAGE == G.STAGES.RUN and G.hand then
for i = 1, #G.hand.cards do
-- local card = G.hand.cards[i]
G.hand.cards[i]:flip()
end
play_sound('card1', 1)
G.E_MANAGER:add_event(Event({
func = function()
G.hand:unhighlight_all()
for k, v in pairs(G.hand.cards) do
v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
G.hand:shuffle('aajk')
play_sound('card1', 0.85)
-- G.hand.cards[i]:flip()
-- play_sound('card1', 1)
return true
end
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'before',
func = function()
G.E_MANAGER:add_event(Event({
func = function()
play_sound('card1', 1)
G.hand:unhighlight_all()
for k, v in pairs(G.hand.cards) do
v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
G.hand:shuffle('aajk')
play_sound('card1', 0.85)
return true
end
end
}))
delay(0.15)
G.E_MANAGER:add_event(Event({
func = function()
G.hand:shuffle('aajk')
for k, v in pairs(G.hand.cards) do
v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
play_sound('card1', 1.15)
return true
end
end
}))
delay(0.15)
G.E_MANAGER:add_event(Event({
func = function()
G.hand:shuffle('aajk')
for k, v in pairs(G.hand.cards) do
v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
play_sound('card1', 1)
return true
end
end
}))
delay(0.15)
G.E_MANAGER:add_event(Event({
func = function()
for i = 1, #G.hand.cards do
G.hand:shuffle('aajk')
for k, v in pairs(G.hand.cards) do
v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
play_sound('card1', 1)
G.hand.cards[i]:flip()
delay(1)
return true
end
end
end
}))
return true
end,
}))
end
end```
shit
it does everything I need
I just can't get the second flip to work properly
always flips the first card to the left and the rest are unflipped
tried delaying it tried making it a seperate event
just doesn't work
finally got it
lol
how would i center attention_text
Is there a way get all played cards that would be unscored during context.evaluate_poker_hand?
ok so I have a weird thing happening
so the custom attention text I made yesterday to support gradient colors
works fine on jackpot every time the command is done it appears
but the enhance command it appears once and never again
not sure why
place it in different areas of the code but only appears once and never again
the pop-up isnt
because it's designed to be aligned relative to card, but you can change this via patch or smth
major = G.play,
try that
atleast that's what worked for me
or align = 'cm'
took a couple hours but I think its good now
text last little too long but i'll fix that later
yep that worked pretty well
how do you get the colors cycling
need to edit the attention_text from vanilla game to removed the copy table
Is there a way get all played cards that would be unscored during context.evaluate_poker_hand?
I think N explained this to me yesterday
is what I made
you need to make an smod.gradient tho
and use smod.gradients['gradient name'] in colour
is it possible to make the text appear as same as the audio?
wait how do u get that menu
DebugPlus
Code?
oh its a mod
ight thx
will download when I get home
local function apply_random_shader()
local cfg = mod.config
local shaders = {
"glitch",
"nightvision",
"flashlight",
"pulse",
"corrupted"
}
local pick = shaders[math.random(#shaders)]
for _, k in ipairs(shaders) do
cfg[k] = false
end
cfg[pick] = true
end
function mod:calculate(context)
if not self.config.random_on_boss then
return
end
if context.round_eval and G.GAME.last_blind and G.GAME.last_blind.boss then
play_sound('flt_unfortunate', 1, 1)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0,
func = function()
attention_text({
text = "A NEW CHALLENGER HAS APPEARED!",
scale = 1.3,
hold = 1.4,
major = G.play,
backdrop_colour = G.C.RED,
align = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.SMODS_BOOSTER_OPENED) and
'tm' or 'cm',
offset = { x = 0, y = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.SMODS_BOOSTER_OPENED) and -0.2 or 0 },
silent = true
})
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.06 * G.SETTINGS.GAMESPEED,
blockable = false,
blocking = false,
func = function()
play_sound('tarot2', 0.76, 0.4)
return true
end
}))
play_sound('tarot2', 1, 0.4)
return true
end
}))
apply_random_shader()
return nil, true
end
end
Put the play_sound in the event.
fair
but now it delays
WTF IS THIS
CAN I STEAL THIS LMAO AS A COMMAND

its a screenshader function, available only in the dev version of SMODS
i'm using a dev version
you can look at the code at #1470706876005224540
If it's a shader guess i'm sol because I can't figure out shaders to save my like lol
😭
it is a shader
oh they are premade
yep
gimmie those shaders
the flashlight one seems fun for a command
to blind the streamer
go ahead, copy them
how can i code a sticker that x300 joker's stats at boss blind and reset at the end of round ? I tried to divide 300 but it doesn't work
I'll add ya in the credits of the mod
speaking which fixed the teaser because a fucking typo in the last one
had to redit the hole damn thing

Move everything outside of the event.
@lament agate could I ask a favor on a shader
because I need one for a enhancement on jokers
you think you can make holo that looks like those bootleg pokemon/yugioh cards you get from aliexpress or temu
try looking at this
sure
makes sense
was looking for something more like this
can I put local vars references in text returned by local vars
best way I can visually explain is to show
im somewhat a noob at card shader more than normal shader 😭
I tried making one myself but game always crashes lol
so I need to concatenate the text I want then k
ill let you know if i can attempt it
if u can't it's fine
THought about abandonding the bootleg joker idea
because only made like 3
and i've been spreading too many jokers appart and not filling the current packs as it is
fair fair
too many jimbos
the concept is they are jokers similar to vanilla with a similar effect but have a chance to perish during a round and have to wait until the round won to get the back
how can i code a sticker that x300 joker's stats at boss blind and reset at the end of round ? I tried to divide 300 but it doesn't work
just been using holo since it's visually similer to what I wanted lol
Is there a smods helper function that finds jokers in a specific pool?
or do I have to iterate through the current jokers and check manually
no
rip
yes
i could PR one
would be nice to have in the future
do u know if there is a way get all played cards that would be unscored during context.evaluate_poker_hand?
check all cards in full hand that are not in scoring hand
keep in mind they might get scored later by splash effects
thats fine
im making that card that converts almost full houses into full houses
which one
the corrupted one
i'm fiddling with it rn
if is_on_cooldown() then return end
if G.STAGE ~= G.STAGES.RUN then return end
-- local difference = 1000
-- ease_dollars(difference)
attention_text2({text = 'JACKPOT!', scale = 1, hold = 11, major = G.play, backdrop_colour = G.C.WHITE })
play_sound('ttv_jackpot', 1, 1)
--Listen it just works ok....
G.E_MANAGER:add_event(Event({
func = function()
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 25
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
local difference = 50
ease_dollars(difference)
delay(0.25)
return true
end
}))
end```
dunno what conflicts lol
oh it's my command
something borked
Fixed it
not sure if it's related to attention_text
or the custom one I made
because if I don't have a colour set
it breaks
weird
what
why are you redefining difference instead of just putting the amount in

and why aren't you using a for loop
too lazy
???????????/
fair
copy + c and v go brrrrr
ah yes im too lazy to write one loop so i will duplicate 50 lines
I haven't learned loops yet
writing code? Man, copy-paste vanilla and call it a day
That's what I sometimes doing to do UI
i think now is a good time actually
yeah but also you should learn loop
it's easier to debug 3 lines in a loop than 50 lines
This mod is held together with ducktape and glue
ok well if you're here for debugging advice im literally telling you how to make debugging your code easier
i dont care how efficient your code runs
but if you want someone else to read your code and tell you what's wrong
at least make it easier to read
Oh my fucking god man
It's like literally just
```for i=1, x do``
Where x is the number of times you need to repeat the shit
As shrimple
is there more to SMODS.screenshader I can read up on?
like in general?
above
awesome thanks
Does ScreenShader has priority system just like game music?
they can stack
not priority, instead an order system, with the crt shader at 0
okay cool
How could I make the entire contents of a jokers description box change?
I cant get the formatting to work via loc_vars
you could return a different key and put the description there
?
I wanna make the card cycle through several different descriptions
do i need a localization file for this?
yes
you can just make a localization file that only has the additional descriptions
if im making a localization file I might as well put everything in it
back to vanilla remade
im using mutliboxes for this, is there a way I can avoid having to copy and paste the name and top box (they dont change) or do I have to have it or each one
@slim ferry ?
like can I have one key for the name and top box
and several keys for the bottom
you would have to copy the same multibox afaik
or you could just
store the first multibox in a local variable
so you only have it once in the loc file
oh yeah it's still a lua file
and then you can set than variable as the first box for each one
learned how to turn the flashlight on but can't figure out how to turn it off lol
oop
doesn't matter what I do I can't get the true to swap back to false
Can I enable/disable whether the poker hand is visible on the left when selecting cards? I wanna disable it for a cutscene during the blind
I'm looking for a timer that I can reference for a joker to decrease one of its stored values every second in real time (ignoring game speed). How would I achieve this?
How would I check if a played hand has all cards score?
if #context.full_hand == #context.scoring_hand then during scoring
why doesn't this tag have an info_queue?
Try info_queue[#info_queue + 1] = { key = 'p_biasedBalance_UtilityPack', set = 'Other' } instead
I'm trying to make a challenge where all vanilla boss blinds are banned, and I'm trying to use some code to make the required table for this, but it's not working. vanillablinds is the expected list of 28 vanilla bosses, but vanillabans is empty. How come?
local vanillablinds = {}
for _, blind in ipairs(G.P_BLINDS) do
if not blind.original_mod and blind.key ~= 'bl_small' and blind.key ~= 'bl_big' then
vanillablinds[#vanillablinds+1] = blind.key
end
end
local vanillabans = {}
for _, blind in ipairs(vanillablinds) do
local ban = { id = blind, type = 'blind' }
vanillabans[#vanillabans+1] = ban
end
SMODS.Challenge {
key = 'showcase',
jokers = { { id = 'j_nancy_negativenancy' } },
restrictions = {
banned_other = vanillabans
}
}
well, that certainly is a start
i'll look through the crashlog
If you do it like that you'll have to manually pass the variables it needs
Yeah
the way you were trying to do initially should work
i.e. { key = 'e_negative_playing_card', set = 'Edition', config = { extra = 1 } }
your key must not have been right
Try eval G.P_CENTERS etc etc in debugplus console with the center you were trying to add initially
see if it exists
it's loading as nil
i have no idea why, other tags i've made that pull from Other have worked just fine
so p_biasedBalance_UtilityPack is returning a table, but p_biasedBalance_UtilityPack_Mega is returning nil
How do you define the mega pack
hey , what is the limit of the talisman?
it should say in the mod's config page
banned_other = function()
local vanillablinds = {}
for k, v in pairs(G.P_BLINDS) do
if not v.original_mod and v.key ~= 'bl_small' and v.key ~= 'bl_big' then
table.insert(vanillablinds, {id = v.key, type = 'blind'})
end
end
return vanillablinds
end
ohh you can make it a function? perfect
i thought it would only accept a table
okay well.
that's lovely LMAO
your pack is likely missing a localization entry
localization keys should be made all lowercase which isnt the case in your localization file
Do you know why the way I did it originally didn't work? Your code seems to be doing the same thing
it's a function that returns a table
it's a feature
that code runs after the game fully loads while yours runs before
Yeah, vscode just yelled at me when I pasted in somethingcom's code, but it's working fine
lol
Interesting!
it was a recent addition so the lsp might not have been updated
but it accepts functions now
yeah
I made an issue about it but I'll see if I can do something about it myself
i would ban the blinds manually in apply
so they dont show up there
and then add a custom rule that tells the player the blinds are banned
It's because you were using ipairs instead of pairs
challenges have apply like decks
Makes sense
The documentation lied to me 💔
the docs got merged 2 seconds ago :3
I see though :)
So to do this I just need to add the blind keys to G.GAME.banned_keys? Does it need to be like {id = key, type = 'blind'} or just the key?
G.GAME.banned_keys[key] = true
lovely
It’s very similar to making a standalone mod! The main difference is setting a dependency in your mod’s metadata, otherwise it’s practically the same
how tho
Is this your first mod project?
yes
how would i go about making a consumable like the fool for a different consumable type? vanillaremade is kinda useless this time
would i have to put a variable set in the use function of every compatible consumable?
you can use mod calculate to save the last consumable
I’d honestly set a global or G variable with a mod calculate that checks whenever a consumable of that type is used
Lmfao N
mod calc remains insanely useful
yay
hmm how hard would it be for tags to get normal contexts too
i had to make my own tag context for end_of_round 😭 like cmon that should not be nessecary
I would imagine it’d just be running the Tag:apply_to_run loop on context calculating
im going to do that but not fix this infinite loop
tag that disables the next tag to trigger, making it the next tag to trigger so it disables itself
Is there a way to check for when a card changes edition, similar to context.setting_ability?
i don't think there's a context, but you can just hook the Card:set_edition function
Fair nuff
tag's are so weird I wouldn't want to start looking at this tbh
truly a thunk moment
How would I detect when the player clicks continue and re-enters a blind? I have an event that starts a timer at the beginning of the blind, but I need it to continue counting down when the player re-enters the blind. I also need to check if the player is in the pause menu to temporarily pause the timer, but I can just ignore the calculation line if there's a Boolean value I can check for that.
I'm trying to make a challenge where non-negative playing cards are debuffed via this hook, but this code never reaches the "reached undebuff" line. The function itself already checks for edition.negative when determining what it does so I'm not sure what the issue is?
EDIT: fixed it by checking for the edition on the card after it's already applied. No clue why this didn't work though
local setedition = Card.set_edition
function Card:set_edition(edition, immediate, silent)
local ret = setedition(self, edition, immediate, silent)
if G.GAME.challenge and G.GAME.challenge == 'c_nancy_stairway' and self.playing_card then
print('reached if')
if edition and edition.negative then
print('reached undebuff')
SMODS.debuff_card(self, false, 'nancy_stairway')
else
print('reached debuff')
SMODS.debuff_card(self, true, 'nancy_stairway')
end
end
return ret
end
so this is everything that can be done in the mod using twitch commands
any suggestions for improving it
is this even playable in any meaningful way?
Were you looking at Card:set_edition in card.lua?
Yeah
You should be looking at Card:set_edition in src/overrides.lua
Huh
if your talking about everything being spammed
commands have a cooldown
60 seconds as default that can be configured
So functions in this always run instead of the vanilla ones and they're actually the ones being hooked?
I mean, command which gives 1k bucks kinda invalidate any actions from streamer in run
Yes, if they don't save the old function.
always open to suggestions
It's okay, the 1000 bucks are perishable :P

it's just meant to be a meme mod anyways
No problem then
nothing for serious play
Just haha I can bully streamer or help them
I wanna try getting an alpha out for some to try see how it goes and it doesn't seem fun
npnp
def change things around
I want it to be fun for both player and viewer without both being miserable or bored
Merch!: https://crowdmade.com/collections/simpleflips
I stream! http://twitch.tv/simpleflips
I tweet! http://twitter.com/simpleflips
Full Vods Channel: https://www.youtube.com/simpleclips
Discord: http://discord.gg/simpleflips
VOD: https://www.youtube.com/watch?v=tO7gxmjxRlk
Hack: Twitch vs Mario 64
Edited by: https://www.youtube.com/channel/UC...
basically trying make the balatro equivalent of this
Trying to offest the commands with jokers tho
might remove the destroy joker command because can't really think of away to balance that
make it perishable instead?
The joker already gone tho?
Is this the deck
yeah kinda
The deck adds chat?
no just gives one of the random chat based jokers
What adds chat then
i'm not sure I din't really manage that part all I know uses some kinda socket lua code

the person who made it made it wher eu can link your twitch account with balatro
o
guess it gives a login token from twitch?
not sure I don't know much about web development and how tokens work
originally was based off of sleepyg11 twitch blind mod
but the other guy I got helping tweak it around so :/
i'm just editing everything else while they manage anything that interacts with twitch chat
I just make command
i'm just waiting around until we get this implemented

Wee Rep
+2 Chips for each "+2"
i've got a joker that gives +10 mult for every f in chat
that's actually finished and implemented
the time out is kinda irrelevant because it's a inside joke from a streamer friend of mine
Why is dollar store lobo hitting dollar store frieza
supposed to be a mod banning a chat memember lol
How do I get the location of a joker within the loc_vars? I'm making an effect that's basically Misprint top deck peak, but I don't want players just checking the collection to see what the top cards are
i think i figured it out 👍
just card.area == G.jokers
you should check if card.area.config.collection instead
will the streamer go mad with power?
How can I apply a stake in a challenge? SMODS.setup_stake() applies the effects but visually it's still white stake
How does the context.evaulate_poker_hand's return statement work
I'm returning {replace_scoring_hand = "Flush House"} but its not changing anything
replace_scoring_name
shouldn't it also change the hand type though?
yes, it will
do i need both hand and name?
no
replace_display_name is the one that only has a cosmetic effect
I thought name was just for display
oh scoring name
i misread
thx
wiki is wrong then
no it's not
when was it fixed?
👍 thx
oh N fixed it 4 hours ago
well i fixed it weeks ago but it just got merged
for it to score you would need to add it to the pokerhands tabled and the scoring table
it's easier to use context.modify_scoring_hand
alongside what you have
yeah i'm adding in code for modify scoring hand rn
Merci :)
I already have a flag set for if it changed the scoring hand so theres not much extra to add
What do y'all use to make these fancy code images?
some jank vsc addon that I have to zoom in twice to not scramble the image
easy codesnap
easy codesnap is the name
Neat lol
problem sovled yay
How do I check if the game is paused mid-blind?
if G.OVERLAY_MENU then
if G.SETTINGS.paused and G.GAME.blind.in_blind
how would i get a card from a pool without actually creating said card? i.e. getting the data associated with the card, like its key, so i can get the information of a random joker from a custom pool while respecting rarity
this is what create_card does
the pool needs to support rarities for it to take a rarity
in the next smods release you'll be able to simplify this with SMODS.get_clean_pool()
i wouldnt recommend it if you want to keep vanilla randomness logic
I'm not sure how it affects randomness?
And if you do use the new function in a new game piece you're making, it'll just have its own randomness that doesn't interfere with or overwrite vanilla stuff, no?
ah. what i'm trying to do is make a deck that has a chance to replace jokers in shop with jokers from the custom mod, my first thought was to use context.modify_shop_card, check if it's a vanilla (or other mod) joker, then use card:set_ability to change it into a joker from the mod. though now that i think about it i'm unsure if that would update the price. maybe it'd be easier to just destroy the old card and add the new one but i don't know if that would play the animations and end up looking weird as a result
maybe it'd just be easier to just add an extra slot to the shop guaranteed to have a joker from the mod @_@
you can use SMODS.add_to_pool to ban jokers from appearing in the shop
The chance to do it makes it a little weird tho