#💻・modding-dev
1 messages · Page 245 of 1
I'm not sure why this doesn't work, but every time I try to play this modded card I made, it keeps saying mult_mod is nul
{
config = {
extra = {
mult = 4,
mult_mod = 4
}
},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.mult, card.ability.extra.mult_mod}}
end,
calculate = function(self,card,context)
if context.individual and context.cardarea == G.play then
-- :get_id tests for the rank of the card. Other than 2-10, Jack is 11, Queen is 12, King is 13, and Ace is 14.
if context.other_card:get_id() == 14 or context.other_card:get_id() == 10 then
-- Specifically returning to context.other_card is fine with multiple values in a single return value, chips/mult are different from chip_mod and mult_mod, and automatically come with a message which plays in order of return.
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT,
card = card
}
end
if context.joker_main then
return {
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
mult_mod = card.ability.extra.mult,
card = card
}
end
end
end,
}```
So, I started working on a boss blind for the first time and I'm wondering how I can affect cards in scoring hand. Here is what I have so far:
for k, v in ipairs(context.scoring_hand) do
local suit_prefix = string.sub(v.base.suit, 1, 1)..'_'
local rank_suffix = v:get_id() - 1
if rank_suffix < 10 and not rank_suffix == 1 then rank_suffix = tostring(rank_suffix)
elseif rank_suffix == 10 then rank_suffix = 'T'
elseif rank_suffix == 11 then rank_suffix = 'J'
elseif rank_suffix == 12 then rank_suffix = 'Q'
elseif rank_suffix == 13 then rank_suffix = 'K'
elseif rank_suffix == 1 then
rank_suffix = '2'
v.debuff = true
end
v:set_base(G.P_CARDS[suit_prefix..rank_suffix])
end
return true
end```
I know the error comes from `context.scoring_hand` so what should I replace it with in this case?
dunno much about boss blinds, but there is a nicer set_base function that comes with SMODS
how do i trigger a function when the game starts? I'm making a card similar to mail-in rebate, and it works by triggering reset_mail_rank() when the run starts, so how do i do that?
if not saveTable then
G.GAME.current_round.discards_left = G.GAME.round_resets.discards
G.GAME.current_round.hands_left = G.GAME.round_resets.hands
self.deck:shuffle()
self.deck:hard_set_T()
reset_idol_card()
reset_mail_rank()
self.GAME.current_round.ancient_card.suit = nil
reset_ancient_card()
reset_castle_card()
end```
also, what's the actual error that's occuring?
bc without it, itll always start as an ace rather than being random each time you pick it up
you can hook Game:start_run; that's what I do
dunno if that's the best option, but it's something
so would it be if Game:start_run then?
AARVLO = {}
SMODS.Atlas {
key = "aarvlo_ancient_suits",
px = 71,
py = 95,
path = "aarvlo_ancient_suits.png",
atlas_table = 'ASSET_ATLAS'
}
AARVLO.ancient_suits = {
Clubs = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 0,y = 0}),
Spades = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 1,y = 0}),
Hearts = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 2,y = 0}),
Diamonds = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 3,y = 0}),
}
SMODS.DrawStep {
key = 'ancient_joker_clubs',
order = 100,
conditions = {facing = 'front'},
func = function(card, layer)
if card.ability.name == "Ancient Joker" and G.GAME.current_round.ancient_card.suit then
AARVLO.ancient_suits[G.GAME.current_round.ancient_card.suit].role.draw_major = card
AARVLO.ancient_suits[G.GAME.current_round.ancient_card.suit]:draw_shader('dissolve', nil, nil, nil, card.children.center)
end
end
}```
Still not working i have no idea why `attempt to index field 'atlas' (a nil value)`
quick question : how do you delete a card mid play but without it being scored (like sixth sense if an example is need)? ive been able to remove it but for some reason it scores the destroyed card before moving on
you need to include your mod prefix when referencing the atlas
the card is scored first with sixth sense
Sixth sense isn’t mid-play
it'd be more like
local start_run_ref = Game.start_run
function Game:start_run(args)
--- stuff that you want to do
start_run_ref(self, args)
end
tysm
oh, well good to know
Do you want it like Sixth Sense or mid-play
-# yet
yet
:(
i think i understand what do to now, i forgot to add remove_from_deck() also so it didnt really remove the cards from the deck
ohhh so it's mod prefix+key like this?
AARVLO = {}
SMODS.Atlas {
key = "ancient_suits",
px = 71,
py = 95,
path = "ancient_suits.png",
atlas_table = 'ASSET_ATLAS'
}
AARVLO.ancient_suits = {
Clubs = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 0,y = 0}),
Spades = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 1,y = 0}),
Hearts = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 2,y = 0}),
Diamonds = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 3,y = 0}),
}```
what's your code look like?
If you want to do it with Sixth Sense timing, SMODS handles it. Otherwise, you should maybe use Card:can_calculate and definitely set getting_sliced to true
Oh I just realized the issue I think, but idk how to fix it
the problem is that i used card.ability.extra outside of the card...
but idk what id use instead?
why the fuck isnt it indented
holy indentation
idk why its normally indented
it's indented when you download it tho lmao
i copy pasted it and then pressed upload message as text cuz it was too long
lemme tryyyyy
I think discord fucked up an update in file previews
here, its not colored like code but its indented at least
oh nope
yeah its justed fucked like he said
yeah the card.ability.extra stuff won't work without the card actually there
it is intendented just use the two expanding arrows to look at it (or download the file)
so then what would i use? how do i call the card's ability outside of the card
cuz if i use a separate variable wouldnt it fuck up the text in the description?
well I'm pretty sure you could use next(SMODS.find_card(...)) to see if you actually have one first
and then use the result from that
you could also look at the example joker mod's implementation of Castle
line 482+
apparently john smods wrote that one
you can change the file name to have a .lua extension when uploading and it'll have the highlighting
though it still won't have the indentation unless you click the arrows
oh look
it's john smods
did that before, that was my attempt to fix the indentation
oh I just didn't scroll up far enough, mb
yeah the indentation is messed up no matter what
doesn't compare to the mobile experience though
we love mobile 🗣️
So, how do I go through the scoring hand with a boss?
I'm not sure why this doesn't work, but every time I try to play this modded card I made, it keeps saying mult_mod is nul
{
key = 'binary',
loc_txt = {
name = 'Binary',
text = {
'Gains {C:mult}+#1# {}Mult',
'if played hand',
'contains {C:attention}Ace{} or {C:attention}10{}',
'{+:mult,C:white}+#1#{} Mult'
}
},
atlas = 'Jokers',
rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
cost = 5,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = false,
pos = {x = 1, y = 0},
config = {
extra = {
mult = 4,
mult_mod = 4
}
},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.mult, card.ability.extra.mult_mod}}
end,
calculate = function(self,card,context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 14 or context.other_card:get_id() == 10 then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT,
card = card
}
end
if context.joker_main then
return {
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
mult_mod = card.ability.extra.mult,
card = card
}
end
end
end,
}```
What determines which items get saved and which don't?
still not working :(
so i used the castle as a base and I think i did something wrong :(
here lemme send it like this so it looks normal
you only need to return one thing in vars
didnt fix it :(
but its what the example used??
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.chip_mod,
localize(G.GAME.current_round.castle2_card.suit, 'suits_singular'), -- gets the localized name of the suit
card.ability.extra.chips,
colours = { G.C.SUITS[G.GAME.current_round.castle2_card.suit] } -- sets the colour of the text affected by `{V:1}`
}
}
end,```
raevyn, you're working with custom cardareas, right?
I'm not too sure of the usage of the localize function beyond the more basic stuff
-# (would be awesome if there was some notes about it in the SMODS wiki. just sayin)
yup!
My cards are moved into it, but they don't seem to be visually appearing the cardarea at all. I can't find anything about needing to explicitely ensuring that happens, would you know if that's something I'd need to actually set up?
oh wait, nevermind, I'm realizing what's going wrong, haha
😭 what is it
they are being rendered, I think, but of screen, accidentally added a 0 to the width of the cardarea so it's huge and mostly off screen
😭
I just assumed my placement had put it slighty further left than I wanted, haha
that would do it
you only realize dumb mistakes like that once you start asking for help. It's the universe's way to ensure you tell people about the dumb mistkaes you make, ofc
fr
fr
oh, no wait, they're still not rendering, though that was causing me problems still, haha
this isn't yet
I see
well I can't really tell you what's going on without that
so if it gets up there let me know
I'll take a look
Anyone know what verifying the integrity of game files do?
I'm trying to troubleshoot and I'm not sure if I'm in the right direction
What’s the definition of your card area looking like?
true
it restores your game files to be the same as what steam provides, basically a forced update even if the version hasn't changed. it resets any kind of tampering that you've done to the game files. These days no mods need you to mess with those files anymore, so unless you're coming off a really old modded version it shouldn't be needed
like this currently
Have you defined all the behaviours for your custom type?
Dang ok, definitely not that then
Thank you
yes, I have, but that's plural and this type isn't 🥲 Though you're also making me aware that I don't think there's a need for me to have a custom cardarea type
Yeah I don’t remember what they default too but that might be why they aren’t showing up
Is there a list of key names for SMODS.Atlas?
i literally cannot figure this out, i tried injecting this to game.lua and it doesn't work, i tried putting it directly on my mod's main.lua and it doesn't work
i may be stupid
god, I was not going to solve that in a reasonable amount of time, haha. Gonna remove all the code for the custom type because it's only gonna cause more of this issue, and default it to joker. Thanks for noticing
im coming back to it tomorrow maybe i realize my mistake
Like what is the key name for card backs?
oh yeah
the types for all of mine are 'joker'
Did it fix it?
How does one make a lovely mod run after another lovely mod has finished running?
yup
🥳
I'm trying to replace the back of the deck textures but it doesn't seem to work and replace anything as the regular back deck textures are still there
huge
Use Malverk ezpz
How do you check the current cost of a reroll given the reroll_shop context?
How do you properly list the mod as a dependency in the .lua and .json?
context.cost should be it
Huh. It doesn't list that in the calculate functions docs
I know
They’re slightly outdated
Rereading your question that might not be what you’re looking for though
Do you want the cost of the reroll that just happened or the next one?
the reroll that just happened
Yeah cost is fine then
Cool
Anyone know what is needed for Malverk to work? I dragged and dropped my texture into Assets>1x and 2x and nothing shows up
how would one force all cards to be permanently flipped
just kidding im the goat
Okay getting this error with malverk
Not entirely sure what I screwed up
Okay now it is say it can't find the texture
I have the texture stored in a folder called "default" in the assets folder
You need the mod prefix on the key in the textures table
Oooo that's nice
wydm mod prefix?
Mind if I ask what Lua file this is?
the main one?
Hm, a recent update to smods seems to have broken a bunch of my shader code but I'm not certain why
Yeah, nvm though. I'm just trying to find information on how to work this damn Malverk out
Theres like, no information to work with for noobs
Crazy
how can i change the colour of the planet cards button in the collections menu? 
Okay now getting this error
so-
Okay yeah I'm really confused here
anyone know how to prevent a joker from showing in shop
in_pool = function(self)
return false
end,
goat thanks
I have this bit of shader code inside Card:draw(layer), which handles a custom water shader effect if a card has these values set. And for some reason it's just never reaching this code despite all the conditions being true? It broke from a recent update
sendDebugMessage('drawing water shader')
local cursor_pos = {}
cursor_pos[1] = self.tilt_var and self.tilt_var.mx*G.CANV_SCALE or G.CONTROLLER.cursor_position.x*G.CANV_SCALE
cursor_pos[2] = self.tilt_var and self.tilt_var.my*G.CANV_SCALE or G.CONTROLLER.cursor_position.y*G.CANV_SCALE
local screen_scale = G.TILESCALE*G.TILESIZE*(self.children.center.mouse_damping or 1)*G.CANV_SCALE
local shader_args = {}
local hovering = (self.hover_tilt or 0)
shader_args[1] = { name = 'time', val = self.ability.water_time}
shader_args[2] = { name = 'water', val = G.ASSET_ATLAS[self.ability.water_atlas].image}
shader_args[3] = { name = 'mouse_screen_pos', val = cursor_pos }
shader_args[4] = { name = 'screen_scale', val = screen_scale }
shader_args[5] = { name = 'hovering', val = hovering }
self.children.center:draw_shader('fnwk_water_mask', nil, shader_args, false, nil, nil, nil, nil, nil, true)
end```
I assume it's part of the new SMODS.DrawStep thing?
Hmm yeah guess I'll have to update a buncha stuff to use this now
YEAHHH
What does this error mean?
The holy trifecta of making Stone Cards viable
Morton: makes stone cards count as a flush and flushes with stone cards give X3 mult
Bone: makes face cards Stone and makes Stone cards held in hand give +50 chips
Typically it just means you don't have the 1x and 2x versions of a sprite, or something's incorrectly named
Is there a set_enhancement function that's just not on the wiki?
or do I just use poll_enchancement?
It's the vanilla Card:set_ability() function
ah, got it
is there anywhere I could find documentation on how this works? Google's not gonna be any help lol
I've found enhancements to be a bit weird to work with
Easiest way is to just look at the source code directly, typically in your Lovely dump
I have it in the malverk and my mods asset folders so not sure on the issue
I doubled checked to make sure I had the folder routes right
v:set_ability(G.P_CENTERS["m_stone"]) is how you'd make a Stone card for instance
For setting enhancements, it works like this:
card:set_ability(G.P_CENTERS[key])
So you use the key of whatever enhancement center, which are all formatted like m_stone, m_gold, m_lucky, etc
alrighty!
If you want to set it back to base, it's c_base
yooooooo\
c
wild card
someone should make a crafting mod
what
Figured out the issue
The issue was I didn't put the name of my main lua file "BalaRTo.lua" before my texture key name
there goes my idea 😔
can i get the score from the previous round or no?
saving it would probably be the easiest way to get it
thats what i was thinking
unless there is already one
probably not chips but ya
G.GAME.blind.chips iirc
is that the player's score or the score requirement
i mean technically yes it is
cause i wanna get the current blind's requirement but also save the last blind's player score
Anyone got a list of alt_tex keys
G.GAME.blind.chips is required
okay
ye G.GAME.chips was player score
For Malverk which wiki is it referring to?
how do i check the enhancement of a card????
SMODS.has_enhancement
also Jokers have long had a draw method so you didn't need to patch
even before the update
I'm looking for the exact same thing
IF it has enhancements or WHICH enhancements ?
Which
how do i format that then???
like that??
no, the function returns a boolean. You pass in the card and the key of the enhancement you want to check for
oh
who was the one who made that daily double joker
so like that
oh wait nevermind
I think just 'm_wild' is what you want for the key
oki
alternatively does anyone know how to make custom format things
these
mainly the tooltips
this should be good then
put m_wild should be a string
You're gonna want to patch a new value into globals.lua under the C table
Did you ever find it?
Not yet
Gotchya
oh.
and how about tooltips?
wdym by tooltips
which one
For malverk to change the texture of a deck what do you put as the set value?
{T:j_egg} for example
i think you just do that
I have never seen that before
nvm found it
how do i make new ones
either "Deck" or "Back" if i had to guess
Ye Back was the thing which worked
wwhy the fucckk arent you giving me muklttt......
wdym by new ones
like create an original one
i believe you can put whatever keys you want in place of that
it's done when you make new things in the mod
i would like to add something that is not already exsisting without making a new joker or edition or anything
yay
i dont have a loc file 😭
make one
this,breained my fryies so much i cant type anymore
bayl
How do you find this information
BHATSUNEAMIKUY
back after school and taking some rest to tackle the boosters problem.
Decided the best way was the reformat my entire mod and make it actually neat.
(i had it all in one singular lua file)
we love restructuring and refactoring
so far its working well
i am dead inside
i use source control properly
i just barely have a dev branch
anybody here have experience with making a deck skin for a suit?
oh, that's strange
bumping this
the new talisman update broke my mod
for a blind or forever?
I have modified literally nothing about the joker causing the crash, yet it still crashes lol
you probably need to add some property to the card and then hook card:flip() so that it doesn't get called for them
something here is giving me attempt to get length of local 'd_ranks' (nil) in smods src/utils.lua
key = "Purple_Spades",
path = "purple_spades.png",
px = 71,
py = 95
}
SMODS.DeckSkin{
key = "purple_spade",
suit = "Spades",
loc_txt ={
name = "Purple Spades",
text = "Spades but ourple"
},
palettes = {
key = "hc",
ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"},
display_ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"},
atlas = "Purple_Spades",
pos_style = "suit",
colour = "6E36B6"
}
}
I've probably misdefinied a field somewhere
does SMODS.Enhancements work as a list of all enhancements? if so, can I grab a random one from that list and use it to enhance a card with a random enhancement
you can use SMODS.poll_enhancement
Can someone explain what a key is in this case? I'm planning to use this mod as a base so I can finally be done with this crap
a key is just a name
the type of object
if i wanted a completely random one would i just pass in no args?
only if you want a chance for no enhancement too
if you need it to always give one then you set guaranteed to true
I have ranks and display_ranks defined though?? so why is it telling me d_ranks is nil
key = "purple_spade",
suit = "Spades",
loc_txt ={
["en-us"] = "Purple Spades",
},
palettes = {
key = "hc",
ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"},
display_ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"},
atlas = "Purple_Spades",
pos_style = "suit",
colour = "6E36B6"
}
}```
I just realized I'm looking at the mod you made
yes
i hate myself
whyyyyyyyyyy??? the code seems good
its like the fifth time it isnt working and i dont know whyyyy
thank you smods, that really narrows it down /s
(this is line 448, for reference)
pcard:set_ability(G.P_CENTERS[poll_enhancements("SERAPH", "SERAPH", 100%, true, {{name = "m_lucky", weight = 1,}, {name = "m_mult", weight = 1,}, {name = "m_bonus", weight = 1,}, {name = "m_wild", weight = 1,}, {name = "m_steel", weight = 1,}, {name = "m_gold", weight = 1,}, {name = "m_cry_echo", weight = 1,}, })]
How do you change the texture of the logo on the main screen and the shop sign logo?
Man I give up, if anyone wants to get $ for fixing this dm me
10 hrs i think soon 11
Ive been doing this for 5 days so far
get the highest scoring card, check if its wild, then give mult
You're actually doing something decently complicated
You should definitely keep going
what are YOU doing
yes
What took me 2 minutes to do on windows, is now taking me 5 days to do on a steam deck
I'll never not hate linux
what do i do next
so with {V:1} I can change the text colors of things, right? how would i make it so that the variable color can be either something like {X:red,C:white} or {C:red}
i think the universe just doesnt want me finishing this joker
hey everyone, is anyone able to make saturn mod work on macos? brainstorm mod works but not saturn for some reason
well, it doesn't crash, but it isn't using my file either
AAAAAAAAAAAAAA
WHAT THE FUCK DO YOU WANT ME TO DO ABOUT THIS GAME
sighhh
I hate dev sm
"why are the cards purple" if ykyk
why are they blue mixed with red
why not, I suppose
real
roffle
I think I need to wait for a certain person to go online to help me with my problem
I rarely even see them online in the first place
me too
I've been planning ™️
okay so apparently smods just doesn't wanna work anymore
fuuuuuuuuuuuuuuuuuuuuuck
Im trying to ban a bunch of boosters from a challenge, whats to ids for the base game boosters
Trying to change the shop sign texture but it keeps bugging out when played
What do I change to make it play the animation properly?
wrong size presumably
put in the correct size
71 by 95 are Jokers
please work 🔥 🔥🔥🔥🔥🔥
I literally copy/pasted an existing deckskin file I found, edited the values, and it still doesn't work
I'm certain I typed the name of the png right
so why
literally
local atlas_path = "purple_spades.png" -- Filename for the image in the asset folder
it does not get simpler than this
why does this crashhhhhhh
Did it work?
i was talking about the image
byeah
I'm descending into madness
I have the 1x and 2x versions in my mod folder
they are the correct size
this is the full deckskin file
-- See end of file for notes
local atlas_path = "purple_spades.png" -- Filename for the image in the asset folder
local atlas_path_hc = nil -- Filename for the high-contrast version of the texture, if existing
local suits = {"spades"} -- Which suits to replace
local ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"} -- Which ranks to replace
local description = "Please Work" -- English-language description, also used as default
-----------------------------------------------------------
-- You should only need to change things above this line --
-----------------------------------------------------------
SMODS.Atlas{
key = atlas_key .. "_lc",
px = 71,
py = 95,
path = atlas_path,
prefix_config = {key = false}, -- See end of file for notes
}
if atlas_path_hc then
SMODS.Atlas{
key = atlas_key .. "_hc",
px = 71,
py = 95,
path = atlas_path_hc,
prefix_config = {key = false}, -- See end of file for notes
}
end
for _, suit in ipairs(suits) do
SMODS.DeckSkin{
key = suit .. "_skin",
suit = suit:gsub("^%l", string.upper),
ranks = ranks,
lc_atlas = atlas_key .. "_lc",
hc_atlas = atlas_path_hc and atlas_key .. "_hc",
loc_txt = {
["en-us"] = description
},
posStyle = "deck"
}
end```
am I just stupid?
who knows, you might?
so true bestie
what's the mod's key
format in atlas_key MUST be [MOD KEY]_[whatever you want]
as in the mod prefix?
for example, the mod i'm working on, the mod prefix is cir. the playing card atlas in its deckskin is thus called cir_CardAtlas. you need to change your atlas_key to [YOUR MOD'S PREFIX]_purple_spades
Yup that fixed it 👍
why have I never needed to do this for any other atlas I've made
is this literally just for deck skins?
i believe so
to my understanding, deckskin is one of steamodded's more jankier implementations
how do i get if a card is a playing card
well I added the prefix and now it's doing this lmao
gn everyone, the fucking enhancement functions are gonne be in my nightmares for sure. im gonna wake up in sweat cause i forgot an end or smth
this is actually driving me crazy lol
I can't rap my head around how a card game can be so hard to mod
Literally doesn't make sense
localthunk moment
also, this format does not match the smods wiki page for DeckSkin in the slightest, but somehow it still worked with the other mod
This game is actually pretty easy to mod once you actually understand the code a little bit
You don't need to anymore. The template was made when Deck Skins were bugged
so it was made to avoid the bug
But coding just to change a texture, is kinda insane
Ironically, the template and the bugfix were added to Steamodded in the same update
learning how the code works being mind numbingly difficult:
I mean you can say that about any game, not just a card game
so what is the proper implementation of it then?
You don't need to code to change a texture. You need to code to change a texture in an user-friendly way
I mean the template should still work
Wym by user friendly way?
any reason it wouldn't be reading my file, if I double-checked the png name and made sure it exists in both the 1x and 2x folders?
My template hardly works and only shows my custom tarot cards rather than the entire template(which also doesn't make any sense)
idk; try taking the original, working texture and changing it bit-by-bit
If you just replace the vanilla texture files, it would display the new textures, but they'd be delete when the game updated. Also, for partial texture replacements, you'd need to include part of the original textures, and distributing a file with the original textures is arguably a violation of the rules
also
mods make choosing and managing textures easier
My laptop just crashed 💀
so you can mix-and-match them in-game
I can't get into the exe archive so I have to do it the Looonggg way
We love bluescreening our machines 🙃
I mean you can copy-paste the .exe then unzip it
were you loading a game
probably tried to do something while the hand didn't exist
ohhhhh
I ran into this issue yesterday
mzybr
trueeeeeeeeee
I would, but I kinda already have steamodded, Malverk, and all that other crap so I'm just trying to get it done that way
Good but also it's useful to have access to the game's files like this
for referencing vanilla stuff
You learn a lot by just looking at the card.lua file
like "why are thunk's bad coding practices destroying my life"
Looking in there is like reading Japanese
There's like, hardly any information out there that helps with Malverk problems
so I tried the most basic thing, pasting my png file into the other mod and changing just the name of the png. and it did not work 💀
how can i pull a specific value within a function for a hook?
what do you mean
ok so
what's troubling you
im trying to make a joker that gains mult whenever a card changes suits via the "set base"
function
this deckskin thing is baffling
and in the set_base function, it defines the original suit
(i think)
im trying to find how i would pull that for a new function
As a first-time modder, seeing things just work never fails to bring tears to the eye
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
it needs to be passed as an argument or saved somewhere accessible
I TRIED IT RANDOMLY
IT WORKS
I WANT TO DIE
WTF
AAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGGGGHHHHHHHHH
how would i do that? /genq
WHY DOES THIS WLRK IT SHOULDNT
more hololive Jokers
you fucking bet it does
well, Idk the function structure. Either you override the original function to give it a signature, use an existing argument to stowaway the value, or put it in a global
I imagine 2 is your best bet here
its prob gonna be part of a larger project down the line
So I have a Texture ready to go, is s Tarot.png, it replaces all textures for the tarot cards and spectral cards. Having this as a mod by itself without Malverk shows all the retextured tarots and only 1 retextured spectral(which I don't understand at all???)
and when copying and pasting my x1 and x2 texture into Malverks assets folder it does nothing
yall, why does my joker work
its been 11hrs, and i dont even know why it works
i made a rin penrose sprite a while ago and i want to put her in the game
To have a working Malverk mod, you need to make your own mod
🅱️in 🅱️enrose
Dang :/
I think I'll just forget it
Although I know her from her Kirby and the Forgotten Land playthrough
I mean, it's not too hard, especially if it's a full texture replacement
we are so close
why he ourple
2222222222342
if 2 of spades is so good why isn't there a 2 of spades 2
Well, I don't really know how to code. And there really isn't any template to go off of that's helped to far
... see above (how would i do that)
someone should make a mod that adds sequels to cards
so true
if you play a card and it's sequel you get the hand type "electric boogaloo"
does anyone know why my game keeps crashing?
used the brainstorm mod for a filtered seed but keeps crashing on when i click Ante 2 big blind
a new sticker that just adds a "2"
Isn't there a Malverk template?
I mean Idk the specifics
I still don't even understand the first part of my problem, it doesn't even make sense for my texture to work partly
damn the condition for check_for_buy_space is kinda confusing
In the github?
I believe so
what is the partial part that works again
All the Tarot cards and a singular spectral card
what is the point of and 1 or 0 in a condition???
which spectral
short circuit evaluation
(true and 1) or 0 -> 1
(false and 1) or 0 -> 0
it's effectively a ternary operator
condition and a or b -> a if condition is true, b otherwise
ahh i see
Incantation
I've finally done it 😭
🅱️in 🅱️enrose
huh
although as I just said I am more familiar with 🅱️in's Kirby in the Forgotten Lands' playthrough
how do i patch into the middle of a line? like if a line is print("hello world") how could i patch it to be print("hello new world") without replacing the whole line? trying to be as compatibility friendly as possible
also what are the odds of you saying this as I'm trying to get my deck skin working
I think you just override the line with the same line slightly different
ok so replacing the whole line is the best option
i mean realistically who's gonna be overwriting the code checking if you have space to buy a joker anyways
theres probably already a mod that does
wouldnt be surprised if like cryptid did
mine is a bit more jokery so
ive never actually played cryptid
you can use a regex patch to not replace the whole line
(also I would wanna do a self-insert into the game)
I wanted to do some HoloLive members
into Balatro Jokers
so far I've only done one indie
ok this looks a lot less cluttered now, much better
i rmb theres a ID mod
you just need to be extra careful about your patch target being unique when matching partial lines
because I was inspired
snebby!
there was someone doing a HoloLive mod
I feel like someone who's actually good at art could make Snebby look better, but I'm happy enough with how it looks for now
thank you 🙏
i have been gathering input from the hololive fan server so yeah
man this started out as a reverse tarot mod and now I'm just kind of putting whatever I want into it
just for the fun of it
i think i'll start working on sprites after like 15 jokers
are you just using placeholders for now?
rn my placeholders are just like this
I do the art before implementing the joker…
I almost never do the art first
getting around to splitting up my main lua file, how do I have the extra files be detected?
the art can fit the theme and effect later
my workflow goes concept -> art -> programming
real men draw the art first
i feel like i have more inertia with the art lol
the other way around is hard
what if the balance is off or the programming isn't feasible
;P
if i did the art first we will have gta 6 before my first mod
I'm stubborn, and will make the programming work. Case in point, Omnirank cards
you could do with less but I like this
when the mod compatibility
Tbh I wanted to draw art for my cards, but I shared the mod in another server and immediately found an artist that basically made all the cards already x)
yeah my art output is measured in days at best
exactly
I'm just lazy and don't implement the art
It definitely is, but if I think an idea is fun I'm going to implement it regardless
also crossing fingers
how do I replace the splash screen jokers
will dog live again
Ok does anybody know how G.FUNCS.draw_from_deck_to_hand() works
Because apparently it does not draw from the deck to your hand
it lives
i thought it said pet
it does but if you called it apropos of nothing your hand might be full
and yeah. that checks out
(Here's my code btw
use = function(self, card, area, copier)
inc_flow_count()
local to_discard = {}
for k, v in ipairs(G.hand.cards) do
if v.highlighted ==false then
to_discard[#to_discard+1] = v
end
end
G.hand:unhighlight_all()
for k, v in ipairs(to_discard) do
G.hand:add_to_highlighted(v, true)
G.FUNCS.discard_cards_from_highlighted(nil, true)
G.hand:remove_from_highlighted(v, true)
end
G.FUNCS.draw_from_deck_to_hand()
end,```
petplay the jimbo
What it's supposed to do is keep the selected cards, discards everything else, and then redraw cards
And I can in fact see that it is mostly what's happening
Just, without the drawing part
also I got almost 9 Chips in a roll before getting Mult
I wanna make them my decks for funsies
they should let you pet jokers
I thought it was broken
this is how my Blind, the Spin, does it
That's it removes your reroll button
MA FUCKIN REROLL
How do I replace base game sounds with mods?
In malverk what are these errors from?
From configuring pack screen
blows up reroll with mind
Also with malverk is it possible to change the default jokers which appear for the editions screen with the joker of the selected mod pack?
I don't know which part of the code did it, but it worked
I'm thinking setting G.STATE, then G.STATE_COMPLETE
this wording is kinda weird imo - any valid hand that contains a three of a kind and 3 scored 7s will always have a three of a kind of 3 scored 7s. why not say "{C:Attention}Three of a Kind{} of 7s" instead 
Normally I’d start poking around in files to learn but my computer’s dead- How hard is it to make a mod to modify suit colors? Does it require manually making a bunch of assets, is it just tweaking some variables, what about the Friends of Jimbo alt arts?
when it comes to the actual cards themselves, the colours are part of the asset textures. would need to provide custom edits
I seeee
Thank you!
As for the Friends of Jimbo packs, each collab is its own file
hmm i was thinking of ambiguity when it comes to playing a full house since you can have a full house with 2 scored 7s and 3 scored others and a full house contains a three of a kind
Which is doubled thanks to high contrast
so my thinking was the 3 7s have to be part of any hand that contains three of a kind
i can see how you came to that conclusion - but a full house in which strictly the pair is 7s, would under no circumstances contain a three of a kind of 7s
Just remove a button is not enough you know 
true
What does this do?
bang
quick on the draw, thanks goat
I took care of that
i believe it makes that selection option setting where it's two < & > buttons with a thing between that says whatever the current selected thing is and the buttons cycle it, ala things like the friends of jimbo deck customise screen
but i wish i knew the arguments for it 
Then that is what i am looking for, and i also wish i knew the args. Am going to snoop in the smods code
It's the thing that let you change options trough a slider, like game speed
do you know how dna works? im trying to make a boss blind that duplicates your hand
Ah someone was faster
I'm trying to page deck preview
how do quantum enhancements, editions, and/or seals work?
can anyone reformat my text?
"Creates 3 {C:attention}wild{} cards when {C:attention}blind{}",
"is selected. If the highest scored card",
"is a wild card, {X:mult,C:white}X#6#{} Mult",
"and gains {X:mult,C:white}X#4#{} Mult",
"{s:0.8}Currently {X:mult,C:white}X#5#{} Mult",
"{C:inactive,s:0.8}''P-Ranking this ante...''{}"
where are the wild cards created
in your hand
When Blind is selected,
get 3 Wild cardsIf the highest scoring card
in a hand is a Wild Card,
this Joker gains xMult(Currently…)
ok, ik this is hard to get, it gives X2 mult(every time) and GAINS X0.5 mult
is it possible to make a lovely.toml patch happen based on a condition? 
like say, only do the patch if a certain variable is true
how so?
that into "currently"
the X2 only really matters at the start, and it can read "Currently X2…" in the shop
How can i remove the base suits from pool
it has to give x 2 mult separatively from its own mult count which gets upgraded
that's just confusing
ahhh i was gonna give my interpretation of the joker effect, but i didn't because i thought i was wrong. but i might not have been
anyone?
you could try only loading the file if x is true
anyone know how to set hands to one
Is there a way to achieve "quantum" ranks?
not yet
Unfortunate...
@frosty dock the people yearn for the mines quantum ranks
Given how they needed to ban certain functions for quantum enhancing because of how easily it can recurse infinitely, they're probably having the same issue here
then why has no one made them yet 🤔
the people also yearn for cheap labour by others
also whoever approves PRs doesn't want to do it halfway
the main setback is Straight calculation
also true
the people also yearn for
cheapfree labour by others
ftfy
the people also yearn for
cheapfree labour byothersminers
ftfy
so far I don't think I've received a half-baked quantum ranks PR
aure is still a miner ⬛ ⛏️
what do i mine
I wouldn't try to do a PR that's not going to be accepted
catch-22 upon ye
Gold cards
aging
the
peoplechildren also yearn forcheap free labour bysrothersthe mine
ftfy
Oh yeah that does sound like an extremely costly and complicated algorithm
the people children also yearn for cheap free labour by others the minersbanana
ftfy
it could still be a base for a complete feature once straights would be figured out, although this is currently out of scope for me
~~the people children also yearn for cheap free labour by others the miners banana ~~ the game
ftfy
You know it's bad when it's out of Aure's scope
the people children also yearn for cheap free labour by others the miners banana
wise words
help
Did you ever manage to figure out how to get this? I'm trying to figure this out myself and I can't quite seem to find anything concrete
"could" doesn't mean will :P
this doesn't make any sense within the context of what i'm trying to do. that is not a thing that is possible:
-
i am not loading any specific files for this. if you mean the patcher itself, then not only is that not possible within the context of what i'm trying to do, but also would brick the rest of the mod because entire patcher wouldn't be run dependant on one condition for which i am trying to do one thing for. if you mean
globals.lua, then i'm fairly certain that just bricks the game. -
the condition does not exist in the way i would normally check it at this point in runtime; to clarify, it exists, but what i normally check to
check if x is truein this circumstance is not created yet. i don't know how to retrieve the condition in a way that works in this context
Is there a reason you want the loading of the patch to be conditional, rather than insert a condition into the patch?
how do i duplicate the first joker held
i'm just approaching this from the wrong direction. what's the code in the game that directly determines the colour of the planet cards button in collections
where can i expect to find it
That wasn't what i meant, but lovely files are automatically loaded which i forgot.
ah
did SMODS.https get a new definition or something ? trying to use it results into smods.https not found
I have no knowledge but I saw someone else complain about an issue earlier
the colour is set by the secondary colour marker in the UI definitions file
searching ' your_collection_planets' should get you there
G.C.SECONDARY_SET.Planet should be where that's stored
there was indeed a similar issue couple days ago
how do i check if the player is in a blind
G.GAME.blind.in_blind
thanks! how do i write a lovely patch to target a file in another mod (i.e. what should target be)?
ty 🙏
Wait huh? Is it not G.STATES.SELECTING_HAND?
target = '=[SMODS modid "path/to/file.lua"]
where that path is relative to the root folder of the mod you're patching, and the ID is replaced by an _ if you're patching steamodded's own files
thanks!
works for anything loaded using steamodded, for things like talisman that don't use steamodded to load files, this won't work
also be aware that this doesn't work on (some versions?) of mac
gaming
If i were making a texture pack mod for malverk and i wanted to replace the textures for the playing cards (both normal and high contrast) which keys and sets should i use
how do i make sure copied cards have the correct back
...what am i doing wrooooooooooongggggggggggggggggggggggggggggggg
this should have worked
oh wait, the ui_definitions patch didn't take
...wait, why? why wouldn't it find that
playing card textures can be done through SMODS.DeckSkin
i'd ask if pattern has to be the entire line but that's clearly not the case since my other patterns work and they're all partial
why can't lovely find something i directly copy-pasted from the ui_definitions.lua file
quantum car
oh, does lovely not return a couldn't find line when the target is '=[ SMODS [modid] "[filepath]"]'?
lovely still can't find the line
am i crazy or should this just not be happening
check out mods/lovely/dump
bump
I read the docs
SMODS also patches this section so the code is different by the time your patch attempts to change it. Like Larswijn said, look at lovely/dump/functions/UI_definitions.lua to see how it's been changed
why doing dis
i seeeee 
SMODS patches a LOT, so it's a good general rule to double check the dump code alongside the source when writing new patches
can I use something to just auto-react "👆" to everything breeze says
i think that's a vanilla bug? you might need to change the back manually
I mean most of the time i'm just repeating what you say but with slightly more context and as a reply
also sometimes it just doesnt happen????
True that
Alright so if i wanted to add a playing card texture through SMODS.DeckSkin what would be the process for that, if anyone would be able to help me, i'm really new to this and havent rlly been able to understand how it's done
pretty sure properly implementing quantum ranks with all the conditions they want to support could warrant an entire academic paper
Check out the docs https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin or some practical examples #💻・modding-dev message
alriight thank you
stupid question but how do i set the hand size of a deck?
just calculate the final score of all ~400k possible hands and pick the biggest one! ezpz
trying to read through the documentation on SMODS
is there a functional difference when using dollars and money when trying to return a calculation.
context wise i am trying to have a joker give 1$ per scoring lucky card.
400k? youre funny
well assuming five-card hands max
wouldn't it be 13^5+13^4+13^3+13^2+13?
oh wait
you're right, I forgot about suit
it's actually ~2.6 million
hey am I doing this right?
what else do I have to define besides the new edition?
now i seem to be doing something else wrong because i think my function is nil?
hiya! sorry, i'm missing something in my code. here's a part of the code for one of my Jokers:
if context.cardarea == G.jokers and context.after and not context.blueprint then
card.ability.extra.remaining_hands = card.ability.extra.remaining_hands - 1
if card.ability.extra.remaining_hands == 0 then
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
func = function()
G.jokers:remove_card(card)
card:remove()
card = nil
return true; end}))
return true
end
}))
return {
message = "Drained!",
colour = G.C.FILTER
}
else
return {
message = card.ability.extra.remaining_hands.."",
colour = G.C.FILTER
}
end
end```
but when being run, i get an error, telling me i'm probably missing an end somewhere
but i don't see where?
does it specify a line number or
just that it found an unexpected symbol after my code
it usually says a line number when you get unexpected symbols
ya, that line was after my code
can we see the error you get? i don't notice any immediate issues with this cope snippet
okay, so adding an end to the end of my code lets it execute, but it doesn't work as expected
How can I remove the base suits from the pool?
(the else statement is being attached to the if up above)
(i think.)
okay no maybe this is unrelated?
hmmhmm. will send my whole code
if context.joker_main then
return { xmult = card.ability.extra.given_xmult }
end
if context.cardarea == G.jokers and context.before and not context.blueprint then
local kings = false
local queens = false
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() == 12 then queens = true end
if context.scoring_hand[i]:get_id() == 13 then kings = true end
end
if kings and queens then
card.ability.extra.remaining_hands = card.ability.extra.remaining_hands + card.ability.extra.added_hands
card_eval_status_text(card, 'extra', nil, nil, nil, { message = "+"..card.ability.extra.remaining_hands.." Hands" })
end
if context.cardarea == G.jokers and context.after and not context.blueprint then
card.ability.extra.remaining_hands = card.ability.extra.remaining_hands - 1
if card.ability.extra.remaining_hands == 0 then
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
func = function()
G.jokers:remove_card(card)
card:remove()
card = nil
return true; end}))
return true
end
}))
return {
message = "Drained!",
colour = G.C.FILTER
}
else
return {
message = card.ability.extra.remaining_hands.."",
colour = G.C.FILTER
}
end
end
end```
(sorry for codewalling)
Unsure what the issue is, but if you're just trying to change the planet colour, you can change G.C.SECONDARY_SET.Planet directly
the code within the if statement with context.after doesn't do anything, it seems
tried that, doesn't work
you can't return money, it wont do anything
your after check is within the before check I think
OH AHA THANKS YOU'RE A GENIUS 😭
thankyouthankyouthankyou i've been looking for that for hours 😭😭😭😭😭😭
I just lost the game...
we're in there
every seal, everywhere, all at once
I think you could do every with something similar to what I did with my enhancement.
he's in there
oh wow
them all together just looks weird
at least king boo looks fine (not really this isn't actually what negative looks like
end of round (prolly should like change that lmao)
grand
is there an easy way to make a sprite drawn on a card with DrawStep inherit all the shaders applied to the card?
anyway, trhe function isn't nil, it's being called properly, but for whatever reason, it's just making all the UI elements red now 
i would manually check but it might break other mods that use shaders
order 20 draws it under the card when there's a shader applied but order 21 draws it on top with no shader
whats the function when you press Play Hand called
if you're in a blind, it's press_play(self)
if you're looking for a joker effect, I think the best approximation you can get is context.before?
is there a function that's called at the start of a shop phase?
nop, lookin for a hook
this calculates the blind effect when you press play
this function, among other things, calls the blind play effect
I think that's probably the one you'd want to hook into
what are you trying to do?
status effects in my mod last for a number of turns
i decided to make it so that one hand = 1 turn
ooh ok
All Jokers for my Wave 1 of the Miku mod are made :) thank you to everyone who helped me with my silly questions
what variable has the player's current money?
G.GAME.dollars
holy shit thats cool
Thank you! Mostly proud of the bottom row (most intense with art and programming wise!)
ESPECIALLY KING
Guess what her ability is :)
something to do with Kings, I hope lol
It’s a little broken but turns every scored card into a King
Pain in the ass to program surprisingly
Especially the animation
I was going to guess gains x1 mult when turning a card into a king
That would’ve be cool as well, but have a lot of x1 multi in the mod so far
that is fair
The last jokers are mostly utility/money
I have way too much xmult in my mod rn too...
I find it easy to program
- equipments which make jokers give xmult
Like xmult
hey so i'm working on a mod that just adds a bunch of jokers that are variations on the Egg, and one of them is supposed to increase sell value by 1.5x (adding half of current sell value) at end of round with a 1 in 4 chance of being destroyed at end of round. i got the self destruct working, that was basically just copied right from gros michel, but i don't know how to get the extra_value to increase by half the current sell value. i also have never programmed in lua before today so i have no idea what i'm doing. any help would be very appreciated !! :+)
Could you send the text file please? Just the snippet of it
wait nevermind
whats the state after scoring?
Or DM me the code I think I see the issue
ya sure !!
to all of you
straight up jorkering it
you know what
what if
i combine this with new_round
:3
it seems to work even when you dont draw after playing a hand
which is nice
-# surely theres no jokers that use this function
-# we live in pure hope
is there a fix to context.scoring_hand and context.cardarea == G.play triggering the effect on the cards twice, once when they score and the other times when the hand is done
this keeps crashing what am i doing wrong
can i not shuffle the order of the played cards?
you can, ive seen some mods doing that before
should be able to
never used a deck before but, uhh: does card refer to the deck in this case?
i just grabbed the code from amber acorn:
G.E_MANAGER:add_event(Event({ func = function() G.play:shuffle('aajk'); play_sound('cardSlide1', 0.85);return true end }))
yes
hm
just as a sanity check, i did try directly setting G.C.SECONDARY_SET.Planet again and it had no effect, same as when i tried before
do decks use "effect.config" instead of "ability"?
it prints the value just fine
can you try returning dollars as just a number, like "1" to see if it works
-# im dumb so i cant figure out whatsa wrong immediately :(
already did and it works then
what the fuck
??
That's surprising. What have you tried?
This works for me:
--colour_test.lua
G.C.SECONDARY_SET.Planet = { 1, 0, 1, 1 }
``` with
```toml
[[patches]]
[patches.copy]
target = 'main.lua'
position = 'append'
sources = [
'colour_test.lua'
]
i have no idea, i guess using math.floor() on smt makes it not a number??
let me check
it returns a number supposedly!!!!!
yeah but
if you use tonumber(5) then it still prints 5
so its definitely not a number
😭
wtf
Make sure you're not setting it before main.lua is run, since it's defined in globals.lua which is run at the very beginning of main
...well i think that's abit more than just directly setting G.C.SECONDARY_SET.Planet as you suggested 
but this was what i was doing. just in my mod's main lua file
Mine was just a lovely patch to append it to main.lua, as a minimum-code test case
😭
i stg
ah. so what i'm doinjg should work, but isn't
OH WAIT NO
there's an annoying little delay between ancient joker changing suit and context.end_of_round
IS HAND_CHIPS A TABLE
I suspect this is running before main, but i'm not sure of the order of operatios of SMODS loading
Maybe someone more knowledgable about SMODS could weigh in on the "right way" to do this
do what
local thunk
I am knowledgeable on SMODS and LocAltHunk code
yeah you need to run a for loop to grab the actual hand_chips from there
-# thats dumb, what
why doesnt this work??????

i dont think its [1]
i tried too, it returned nil
how does G.FUNCS.get_poker_hand_info() work
Run code once after main.lua finishes
oh i found the docs
-# what the fuck
why did i have to be balatro autistic
oh how do you detect unscored cards
As a lovely patch, it's just
[[patches]]
[patches.copy]
target = 'main.lua'
position = 'append'
```or
```toml
[[patches]]
[patches.module]
source = 'my_code.lua'
after = 'main.lua'
name = 'mymod.my_module'
```or even
```toml
[[patches]]
[patches.pattern]
target = "main.lua"
match_indent = true
position = "after"
pattern = '''G.CANVAS:setFilter('linear', 'linear')
end
'''
payload = '''
--my_code_here
'''
You could also patch it directly into globals with
[[patches]]
[patches.pattern]
target = "globals.lua"
match_indent = true
position = "at"
pattern = '''Planet = HEX('13afce'),'''
payload = '''Planet = { 1, 0, 1, 1 },'''
``` but that won't allow you to change it later or modify it at runtime
-# whats with the numbers
is that vector4
my brain is still cooked from trying to learn shaders yesterday
💔
Bigger issue here is that if this is a SMODS mod then SMODS's ConsumableType object would override this anyways.
i appreciate it but as suggested in the snippet i posted, the colour needs to be changed based on a mod config option, so it needs to be conditional rather than set
Actually maybe not?
It might still reference G.C.SECONDARY_SET.Planet in the end
But regardless, your SMODS mod will always run once on load after everything is initialized, so you should be able to modify it in your mod's lua file.
Then I reckon you could just set G.C.SECONDARY_SET.Planet when your config is set, and on load sometime after main.lua finishes
I cannot remember if this results in an override based on the ConsumableType or not.
would i be able to make it so that a hand with hearts is not allowed with a blind?
...is there a function that's called immediately when the main/options menu loads?
That would definitely override the value, but would override it with the contents of the same value, so wouldn't be a problem
...wait a minute. i already override G.FUNCS.title_screen_card()
what if i just stuck it in there
Game.main_menu is common. You can hook it like this
local game_main_menu_ref = Game.main_menu
function Game:main_menu(change_context)
local ret = game_main_menu_ref(self, change_context)
-- things and such
return ret
end
oh duhh i'm already overriding this for another reason 
where is this
I should definitely read up on the SMODSian approach to see if there's a neater way than hooking existing vanilla functions though
My written code:read code ratio is way too high
its in the common questions, figured quite a few features would need it
This could just be hand_chips.array[1], right?
Still looking for an answer to this.
finally, it works 
alright, i think it's time to try and tackle the big thing i've been putting off since my last failed attempt at it.
how can i change the colours of the vortex in the main menu screen?
Look into how Trance or Cryptid do it, I think a patch is required
when i started, i looked into how cardsauce does it, which is basically just directly lifted from cryptid as far as i can tell
and i could never get anywhere. i just kept getting errors
and a bunch of the patches i tried never took
The relevant lines are in game.lua:
{name = 'colour_1', ref_table = G.C, ref_value = 'RED'},
{name = 'colour_2', ref_table = G.C, ref_value = 'BLUE'},
is there a way to predict pseudorandom_element without using it? when you use it it's gonna affect the next use right?
whats the best place to start when it comes to learning modding
im not sure how balatro modding works (evidently), but for a lot of these random generators is there not a seed that determines all the choices (again im not 100% without knowing the code but it of course seems that way in vanilla balatro considering the seed system is a thing).
If so, would it not be possible to use the function and roll it back to the previous state it was at? or is that missing some fundamental understanding of how it would work
its the same, yeah
i feel like wanting to know the next value of a random generator is already a very niche thing to want to know so i wouldnt be surprised if the solution is a headache
also again thanks for the link 🙏
i'm also new to modding but if i call the reset_ancient_card() function which uses pseudorandom_element it alters the order of ancient joker triggers in the future, i used to think that it didn't matter if you called it again as long as you were in the same round but that's not true apparently
for context this is the stupid reason why i need that
TagPreview predicts the next joker card by
local _pool, _pool_key = get_current_pool(type, rarity, nil, key_append)
center_key = pseudorandom_element(_pool, pseudoseed(_pool_key))
local it = 1
while center_key == 'UNAVAILABLE' do
it = it + 1
center_key = pseudorandom_element(_pool, pseudoseed(_pool_key .. '_resample' .. it))
end
center = G.P_CENTERS[center_key]
hmmmmmm
ok i need to figure out how to apply that to ancient joker, to do list, etc
because those updates happen like .5 seconds after context.end_of_round
thanks for the info i'll see if i can figure out how to use it
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
local rank = context.other_card:get_id()
for i=1, #G.play.cards do
local cards = G.play.cards[i]
if cards == 11 and rank == 5 then
card.ability.extra.mult = 0
card.ability.extra.mult = card.ability.extra.mult + 15
end
end
end
return {
mult = card.ability.extra.mult
}
end
hm
wait
i am too sleep deprived for this
when using SMOD.has_enhancement(card, key) is there documentation to see what the key is for base game enhancements and editions, as i am trying to reference lucky cards SMOD.has_enhancement(card, 'm_lucky') but that does not seem to work. Or have i done something wrong?
Is something like this possible to do?
just realized that enhancements use textures, that makes my life easier lol
where can i find source code on mac

