#💻・modding-dev
1 messages · Page 434 of 1
Yes.
SMODS.Joker { -- Frubby Joker
key = "frubby",
loc_txt = {
name = "Frubby",
text = {
"{X:mult,C:white}X#1#{} Mult",
"for each other {C:attention}Frubby{} equipped",
"{C:inactive}(Currently {}{X:mult,C:white}#2#{}{C:inactive} Mult){}"
}
},
config = { extra = { mult = 1 } },
rarity = 3,
atlas = "frubby",
pos = { x = 0, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
local count = 0
for _, v in ipairs(G.jokers.cards) do
if v.key == "frubby" then count = count + 1 end
end
local total = (count - 1) * card.ability.extra.mult
return { vars = { card.ability.extra.mult, total } }
end,
calculate = function(self, card, context)
if context.joker_main then
local count = 0
for _, v in ipairs(G.jokers.cards) do
if v.key == "frubby" and v ~= card then count = count + 1 end
end
if count > 0 then
return { Xmult_mod = count * card.ability.extra.mult }
end
end
end
}
am i using the wrong namespace?
thats what id assume
how do i make custom pseudorandom seeds 😭
This is wild
In loc_vars, G.jokers won't always be initialized. Use (G.jokers and G.jokers.cards or {}) in the for loop.
first input to pseudorandom is the seed
cause like i wanted to make my funny deck have a 1 in 4 chance of imploding but APPARENTLY 'vremade_wheel_of_fortune' asks for a mul value
What does your code look like? I've been putting random stuff in as custom seeds for pesudorandom and it's seemed to work fine so far.
what’s the code rn
the bottom string here isnt updating, nor does it look correct, is my math off?
Code?
SMODS.Joker { -- Frubby Joker
key = "frubby",
loc_txt = {
name = "Frubby",
text = {
"{X:mult,C:white}X#1#{} Mult",
"for each other {C:attention}Frubby{} equipped",
"{C:inactive}(Currently {}{X:mult,C:white}#2#{}{C:inactive} Mult){}"
}
},
config = { extra = { mult = 1 } },
rarity = 3,
atlas = "frubby",
pos = { x = 0, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
local count = 0
for _, v in ipairs(G.jokers and G.jokers.cards or {}) do
if v.key == "frubby" then count = count + 1 end
end
local total = (count - 1) * card.ability.extra.mult
return { vars = { card.ability.extra.mult, total } }
end,
calculate = function(self, card, context)
if context.joker_main then
local count = 0
for _, v in ipairs(G.jokers.cards) do
if v.key == "frubby" and v ~= card then count = count + 1 end
end
if count > 0 then
return { Xmult_mod = count * card.ability.extra.mult }
end
end
end
}```
It's v.config.center.key also it would be "j_modprefix_frubby"
good evening everyone! My first mod is almost finished, there is just one last thing I couldn't quite wrap my head around
the localization stuff, I separated a localization lua file and I got the structure of it, but I'm not sure how you use it
if it's formatted properly you don't "use" it beyond it just working
hmm
still doesnt work after those changes
Code?
key = "frubby",
loc_txt = {
name = "Frubby",
text = {
"{X:mult,C:white}X#1#{} Mult",
"for each other {C:attention}Frubby{} equipped",
"{C:inactive}(Currently {}{X:mult,C:white}#2#{}{C:inactive} Mult){}"
}
},
config = { extra = { mult = 1 } },
rarity = 3,
atlas = "frubby",
pos = { x = 0, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
local count = 0
for _, v in ipairs(G.jokers and G.jokers.cards or {}) do
if v.config.center.key == "j_modprefix_frubby" then count = count + 1 end
end
local total = (count - 1) * card.ability.extra.mult
return { vars = { card.ability.extra.mult, total } }
end,
calculate = function(self, card, context)
if context.joker_main then
local count = 0
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == "j_modprefix_frubby" and v ~= card then count = count + 1 end
end
if count > 0 then
return { Xmult_mod = count * card.ability.extra.mult }
end
end
end
}```
You need to change modprefix to your mod prefix.
oh mb i thought it was autofill
works for the text, but doesnt actually do the mult
key = "frubby",
loc_txt = {
name = "Frubby",
text = {
"{X:mult,C:white}X#1#{} Mult",
"for each other {C:attention}Frubby{} equipped",
"{C:inactive}(Currently {}{X:mult,C:white}#2#{}{C:inactive} Mult){}"
}
},
config = { extra = { mult = 1 } },
rarity = 3,
atlas = "frubby",
pos = { x = 0, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
local count = 0
for _, v in ipairs(G.jokers and G.jokers.cards or {}) do
if v.config.center.key == "j_pwn_frubby" then count = count + 1 end
end
local total = (count - 1) * card.ability.extra.mult
return { vars = { card.ability.extra.mult, "X"..total+1 } }
end,
calculate = function(self, card, context)
if context.joker_main then
local count = 0
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == "j_pwn_frubby" and v ~= card then count = count + 1 end
end
if count > 0 then
return { Xmult_mod = count * card.ability.extra.mult }
end
end
end
}```
It is, you're just not displaying it.
Replace Xmult_mod with xmult
attempt to compare boolean with number when i replace it with smth random
still didnt work after that, i know ti doesnt work because i play a high card which makes 14x1 and it only gives 14 points
Do you have more than one Frubby?
You need 3 for it to do anything.
oh
it's expecting a numberr
so info is offset...
In loc_vars you are counting the card but in calculate you are not.
erm, do starting decks have a prefix? Like how jokers have the j_ prefix
Yes, it is b_
@idle plaza
:[
Don't use not like that in your if statement, that turns the pseudoseed result into a boolean. Instead just check if the pseudoseed is >= the other value.
still a strange offset on the actual mult instead of the displayed mult
key = "frubby",
loc_txt = {
name = "Frubby",
text = {
"{X:mult,C:white}X#1#{} Mult",
"for each other {C:attention}Frubby{} equipped",
"{C:inactive}(Currently {}{X:mult,C:white}#2#{}{C:inactive} Mult){}"
}
},
config = { extra = { mult = 1 } },
rarity = 3,
atlas = "frubby",
pos = { x = 0, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
local count = 0
for _, v in ipairs(G.jokers and G.jokers.cards or {}) do
if v.config.center.key == "j_pwn_frubby" then count = count + 1 end
end
local total = count * card.ability.extra.mult
return { vars = { card.ability.extra.mult, "X"..total } }
end,
calculate = function(self, card, context)
if context.joker_main then
local count = 0
for _, v in ipairs(G.jokers and G.jokers.cards or {}) do
if v.config.center.key == "j_pwn_frubby" and v ~= card then count = count + 1 end
end
if count > 0 then
return { xmult = count * card.ability.extra.mult }
end
end
end
}```
You are still counting the card in loc_vars and not in calculate
what part is that in
okay i did that now it's giving a new error
number expected, got nil
maybe i shouldn't have replaced the seed with 'blahblahblah' lmao
No, that makes no difference
You are checking v ~= card in calculate but not loc_vars
so remove v ~= card?
No.
OH WAIT IT JSUT CLICKED
Add it to the other one.
Also you want to do (count*card.ability.extra.mult) + 1
alright, one last issue
I was able to get localization working! 🎉
But for some reason I can't include accents ( ^ ~ ´ ) in my sentences, as the game always crashes when it tries to load the sentence, but the base game does use accents so does it do anything specific do display accents?
this worked nice
i never told you my intended behavior mb, it was to have 1 frubby give x1 mult, and 2 frubbies give x2 mult
No, if you want every other card you have to add it back to both.
Also you do this:
Elsewise it will say 0 in the collection.
btw how should i format the var im referencing
like card.config.extra.[thing]
or is it another thing
config = { extra = { odds = #, Xmult = # } },
Replace # with whatever actual number you want them to be.
Within the code snipper you sent, card.config.extra.[thing] will work fine as long as the above config table is set right.
What's currently happening right now, VS what you expect?
crashing because config is a nil value vs doing like. anything at all
it was doing nothing before and now it's just crashing lmao
in calculate replace config with ability
i did that before but let's see
also that indentation is dealing psychic damage to me please fix it
Is this a deck?
correct!!!
Then replace card.config with self.config
self.ability
okay your code might just be haunted
crash message?
Mult without t obviously
also there’s a lot of other issues with this code
we can fix that after it stops crashing
whole thing
71x95
so same as joker
okay this uhm should be it
which line is 54
from ur mod
there is something in your mod called 'mul' that is trying to be called but doesn't exist
perishable_compat = false,
when does this crash?
nothing
Question, are you loading from external files? It usually doesn't show an extended file path like that
sorry but what does that mean
playing a card
Like are you loading a file outside of your main one
not at all
weird
my file is literally just a single main.lua
I wish it was giving us the shortened path cuz that would make things so much easier lol
Does it keep happening with only your mod activated?
That's an acceptable key.
maybe they’re using an old version
what part dictates this text at the bottom of a seal
idk what else would make it crash
im gen dumbfounded at how hard it is to make a deck give x3 mult or bust
does it still crash?
localization > misc > labels > modprefix_key_seal = "Name Seal" or label = "Name Seal" if you're using loc_txt
same error
Where would I have to patch in my quantum seals function if I wanted quantum seals to work on jokers and consumables?
thanks
holy this is outdated af
still using old mod header lol
If I understand this all correctly, my initial release thread: https://discord.com/channels/1116389027176787968/1383983241903734844
replace context.context == “final_scoring_step” with context.final_scoring_step
Is this the right file?
i assure you it is
your decks code isn’t here
what even is the x1 and x2 stuff on assets do? i know its for pixel smoothing but like how does it smooth from those?
okay this was it im going to kms thanks you
im crying bro 😭
is there any collection ui template? 🥺
no
the best thing would be looking at how the base game or smods does it
spectral pack and arcana pack use the them system right, jsut with different pools?
is there a way to tell if a card is debuffed? (there should be, but idk what it is)
card.debuff
ty!
got this from the examples pack, can anyone explain whats happening in this as i dont understand
key = 'medium',
set = 'vremade_Spectral',
pos = { x = 4, y = 5 },
config = { max_highlighted = 1, extra = { seal = 'Purple' } },
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_SEALS[card.ability.extra.seal]
return { vars = { card.ability.max_highlighted } }
end,
use = function(self, card, area, copier)
local conv_card = G.hand.highlighted[1]
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
card:juice_up(0.3, 0.5)
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
conv_card:set_seal(card.ability.extra.seal, nil, true)
return true
end
}))
delay(0.5)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
G.hand:unhighlight_all()
return true
end
}))
end,
-- The config field already handles the functionality so it doesn't need to be implemented
-- The following is how the implementation would be
--[[
can_use = function(self, card)
return G.hand and #G.hand.highlighted <= card.config.max_highlighted and #G.hand.highlighted > 0
end
--]]
}```
It needs to be an ANIMATION_ATLAS
oh what
trying that now
eh?
SMODS.ANIMATION_ATLAS {
key = "blind",
path = "atlas_blind.png",
px = 34,
py = 34
}
SMODS.Blind {
key = "the",
pos = { x = 0, y = 0 },
boss = { min = 2, max = 10 },
atlas = "blind",
boss_colour = HEX("757575")
}
No,
It needs to be SMODS.Atlas still.
local oldox = {
object_type = "Blind",
dependencies = {
items = {
"set_cry_blind",
},
},
name = "cry-oldox",
key = "oldox",
pos = { x = 0, y = 0 },
boss = {
min = 2,
max = 10,
},
atlas = "nostalgia",
order = 4,
boss_colour = HEX("4f6367"),
modify_hand = function(self, cards, poker_hands, text, mult, hand_chips)
if to_big(hand_chips) ~= to_big(0) then
G.GAME.blind.triggered = true
return mult, to_big(0), true
end
return mult, to_big(0), false
end,
}
no atlas_table anywhere lol
can you define starting decks for card backs like you can for challenges or do you just have to manipulate them manually?
displays as this for some reason
SMODS.Atlas {
key = "blind",
atlas_table = "ANIMATION_ATLAS",
path = "atlas_blind.png",
px = 34,
py = 34,
frames = 21
}
SMODS.Blind {
key = "the",
pos = { x = 0, y = 0 },
boss = { min = 2, max = 10 },
atlas_table = "crp_blind",
boss_colour = HEX("757575")
}
Firstly, it needs to be atlas in the blind, Secondly, atlases don't require prefixes.
tf is atlas_table
right
thanks something
crash when selecting my seal
key = "hammerseal",
loc_txt = {
name = "Hammer Seal",
label = "Hammer Seal",
text = {
"{X:chips,C:white}X1.5{} Chips"
}
},
atlas = "hammerseal", pos = { x = 0, y = 0 },
badge_colour = HEX('e0ba2f'),
sound = { sound = 'hammerseal', per = 1, vol = 1 },
calculate = function(self, card, context)
return { xchips = 1.5 }
end
}```
You need a context check.
oh, how would i do that
When do you want the xchips to happen?
when card is scored
basically red seal but it gives chips
or more accurately gold seal
if context.main_scoring and context.cardarea == G.play
but instead of 3 dolalrs its chips
thanks
so like this?
Yes.
Show how you're playing the sound
key = "hammerseal",
path = "hammerseal.ogg"
})
SMODS.Sound({ -- hammersealapply Atlas
key = "hammersealapply",
path = "hammersealapply.ogg"
})```
```SMODS.Seal { -- Hammer Seal
key = "hammerseal",
loc_txt = {
name = "Hammer Seal",
label = "Hammer Seal",
text = {
"{X:chips,C:white}X1.2{} Chips"
}
},
atlas = "hammerseal", pos = { x = 0, y = 0 },
badge_colour = HEX('e0ba2f'),
sound = { sound = 'hammersealapply', per = 1, vol = 1 },
calculate = function(self, card, context)
if context.main_scoring and context.cardarea == G.play then
play_sound("hammerseal")
return { xchips = 1.2 }
end
end
}```
You need your mod prefix.
you need to add your mod prefix to the sound key like
play_sound("prefix_hammerseal")
in play_sound
ah ok
the sound if being played at the beginning of the hand, it should play when "x1.2 Chips" pops up, (when the card is used) do i need to define a different context for this
Hey guess, I am looking at the pareidolia joker implimentation from VanillaRemake and I ain't sure I understand how it functions
-- Pareidolia
SMODS.Joker {
key = "pareidolia",
blueprint_compat = false,
rarity = 2,
cost = 5,
pos = { x = 6, y = 3 },
}
local card_is_face_ref = Card.is_face
function Card:is_face(from_boss)
return card_is_face_ref(self, from_boss) or (self:get_id() and next(SMODS.find_card("j_vremade_pareidolia")))
end
you can play it in your return table with a sound attribute
can anyone explain how it works, or how I can change it to make each card be considered a specific suit and rank
sound = "modprefix_key"
like this
return {
xchips = 1.2,
sound = 'prefix_hamnmerseal'
}```
ah ok
yeah that was my guess right after i asked what you meant lol
tried it, sound doesnt appear to paly
Basically it's hooking vanilla's is_face function and returning either the original function or a check if Pereidolia is in hand
so I would instead need to override the is_suit and get_id functions as well as the is_face function?
yes
thanks!
also hate to ask two questions at once but does anyone have the back of the canio card
It's in the source code.
It should be isolated in the vanilla sprite sheet
where do i find that
How do I move something up in the UI
Been trying for a while and offset seems to dislike me
resources/textures/1x in the source code.
like in steam local files
No, from the extracted exe
where cna i find that, is there a github
also the sound doesnt play in the return
literally unzip your balatro.exe
unless i put it in wrong
thats a thing?
yep lol
i thught you could only extract zips
zips and exes are just different types of compressed files
wow
one's compressed so you can play it and one's compressed so you can store it but they can both be uncompressed if they let you
oh god if i make a blind will i have to make my own spritesheet like this???
yep
😭
its jsut a shimmer why wouldnt it just be a transparent overlay
make that a spritesheet and then you only need to supply 1 image for every blind
Because Moveable items don't use AnimatedSprites
wouldnt that make more sense??
the text just needs to move up and the buttons just need to move down 
no idea what that means but aw man
Oh my god you're so close
It's literally just this and like one other tiny thing
It is quite tough
Uhhhh what are your align parameters looking like?
I've been trying to make the text go up so it's not touching the button for like four hours
I have them all set to center middle but it didn't seem to really change anything last time I checked
i say that and I'm going to regret it
You would think orienting something near the top would like
do that
I have no clue
is there a font for this text or was it drawn by hand
I wish N was here, mans is a UI wizard
they were here earlier
got me thru a rough bump
Exactly, wizard lol
why do you gotta be such a lifesaver man, like cmon let me down sometimes
kidding but
thanks
lmfao
No, yes.
in which .lua file is the code for deja vu? cant find it in card.lua.
card.lua
in card.lua
I hate how close I am only to fail
It's literally just two things
I need to figure out how to fix the UI positioning
and I need to figure out how to unzip the file
That's it
Honestly I think steamodded discord might help ya with the unzipping stuff more than here
how do i make an item use the vanilla atlas?
the unzipping stuff is just normal lua, not smods or anything like that
so I'm fine with that, I have google
By not passing in an atlas. By doing that, it will use the atlas its type usually would
i see
For example, an SMODS.Joker with use the vanilla Jokers atlas by default
An SMODS.Back or SMODS.Seal will use the vanilla Enhancers atlas
etc.
where is the can_use_consumable code for deja vu?
it's just can_use for SMODS
But that code is actually wrong.
i looked in there and i doesnt look like the legendary joker "font" is there
It's card.ability not card.config
lmao
caino
perhaps
better late than not ever
too broke for asperite who feel me
You could compile it for free also libresprite exists.
wdym by compile it for free
and whats libresprite
Compile the code from source.
feel like im too dumb to do that
LibreSprite is a free and open source program for creating and animating your sprites.
It's basically aseprite but free and maintained by different people.
libresprite is basiaclly just asperite but free?
You could say that.
but aseprite is free
If you compile it yes, elsewise no.
asperite is TWENTY bucks
I mean yea but you can just compile it and then get it for free
I paid for it because I'm an idiot but like
you don't have to
is the average spriter able to compile it
There's a delay of a few seconds when I start a run with this deck, is there anything I can do to change that? It turns all cards to stone
config = {vouchers = {v_magic_trick}},
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
local cards = {}
for i, card in ipairs(G.playing_cards) do
cards[#cards+1] = card
end
for i = 1, #cards do
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
local card = cards[i]
card:set_ability(G.P_CENTERS["m_stone"],nil,true)
return true end }))
end
return true
end
}))
end
It's because you're putting 52 events in 1 event.
I mean they have an automatic script on the github that does it for you
i even made a template layer based system for making jokers, and other assets like seals
Oh I didnt know that
i should invest in this, is asperite able to export directly into directories
Yeah
I might be misunderstanding
which would you say is better asperite or libresprite
ill go with asperite ig, where can i find this HELPFUL RESOURCE
this is what the export screen looks like if you wanted more info on it
aseprite is GOATED
will be even better if they actually add rotational symmetry in the next decade
just scroll down to here
(or you can build it manually, either way is step by step)
is asperite confusing to use?
Seems pretty simple to me
which one
it'll be the top one
i've been using ase for so long i've forgotten the first time user experience, but i think it's as intuitive as it gets unless you want to do very specific things
I GOTTA COMPILE A THING TO COMPILE ANOTHER THING
u just download the m124 package
ur windows I'm assuming so u click the top one there
It's a bit of selection anxiety but just look for "windows x64" and that's probably it
if there's still options then pick the one that says "release" or something
😭
maybe windows default packager has it???
IT GET
I DOES
uhhhh
this ones green so green means good
Is it possible to make a deck where certain booster packs dont spawn?
Yes.
shoot whats the difference between x64 and x86
x64 is for 64bit systems and x86 is for 32bit systems.
Most people have 64bit
hey chat so i found all the files for the cards
my new question: how do people add new textures to said cards
why would it not be called x32??
It started with the Intel 8086 processor
x86 and x64 refers to the processor architecture
(also all its successors ended in 86)
HOW DO I INSTALL THIS THERES NO EXE OR MSI
hey yall, what is the base game funciton used to determine the hand type you have currently selected?
u use the automatic script
I want to override it using a joker that makes all cards be considered 'King of spades"
this is skia
o
If you hooked Card:get_id() and Card:is_suit() then you don't need to.
the github should have some step by steps
(sorri i would give more details im just eepy)
think you can look at the way I did so to see why its not working properly?
-- Override is_suit function
function Card:is_suit(suit, bypass_debuff, flush_calc)
local has_man_ha = next(SMODS.find_card("m_mbm_man_ha"))
local has_women_ha = next(SMODS.find_card("m_mbm_women_ha"))
local has_person_ha = next(SMODS.find_card("m_mbm_person_ha"))
local has_pan_ha = next(SMODS.find_card("m_mbm_pan_ha"))
if has_pan_ha then
return true -- Pan Ha overrides all other suit checks
elseif has_man_ha and suit == 'Spades' then
return true
elseif has_women_ha and suit == 'Hearts' then
return true
elseif has_person_ha then
return true -- Jacks can be any suit
end
return card_is_suit_ref(self, suit, bypass_debuff, flush_calc)
end
-- Override get_id to handle Ha jokers
function Card:get_id()
-- Handle Ha jokers
if self.ability.name == 'Pan Ha' then
-- Return a special ID for a new rank that represents the combined value of all ranks
return 13 -- Using 13 as a special ID for Pan Ha
elseif self.ability.name == 'Person Ha' then
return 12 -- King's ID
elseif self.ability.name == 'Women Ha' then
return 11 -- Queen's ID
elseif self.ability.name == 'Man Ha' then
return 10 -- Jack's ID
end
-- Handle Stone Card as part of main logic
if self.ability.name == 'Stone Card' then
return 1
end
-- Default case: return the base card's ID
return self.base.id
end
maybe i shoulda just done libresprite 😭
I have this as well at the top:
local card_is_suit_ref = Card.is_suit
local card_get_id_ref = Card.get_id
this is helpful but i was hoping to understand how new texture packs are actually made
like. if i wanted to make one
i mean like how can i myself edit the textures n create my own texture pack
ok ive got a totally realy copy of asperite
You are checking the playing cards name also 13 is king, 12 is queen, 11 is jack, and 10 is ten.
Anyone know how G.ASSET.ATLAS works? I'm trying to patch into it with my own atlas. Apparently just using a string doesn't work? Doesn't crash or anything, it just still loads the regular sprites
i mean you can jsut define atlases with raw_key = true
Yes, but no.
Malverk is best.
this is gonna take longer than i thought it would
There are examples at the top of the thread.
what even is malverk, its title makes me think its jsut a resource pack menu like from mc but this implies its not?
oh alr thanks
It's a texture pack manager.
does it automatically assign textures for ingame objects
Yes.
I'm struggling to figure out how to get this to work. I've tried dumping the consumable to a file to see all of the locations where its name is referenced, but none of them seem to visually affect how it looks. Does anybody know how to do this?
calculate = function(self, card, context)
if context.setting_blind then
for _, consumable in ipairs(G.consumeables.cards) do
local text = consumable.config.center.name
local indexes = get_vowel_indexes(text)
if #indexes > 0 then
for i = #indexes, 1, -1 do
local idx = indexes[i]
text = text:sub(1, idx - 1) .. consumable.ability.name:sub(idx + 1)
end
consumable.config.center.name = text
local money = card.ability.extra * #indexes
ease_dollars(money)
return {
message = localize('$')..money,
colour = G.C.MONEY,
card = card
}
end
end
end
WHY IS HE LOOKING AT ME LIKE THAT 😭
wait howd you do that
like right there
where you have the file
What is the goal?
like i have the file but how dyou edit it n then put it back
I'm trying to make a joker that modifies the names of consumables.
the nefarious improperly scaled jimbo:
bump
I don't quite understand but yes.
is there like a layering window i can pop out to view all my layers?
Press Tab?
YES, i think
well in vremade there's this, can i do this for a back somehow?
Couldn't you just remove all the cards then put new ones in?
File > Import?
i dont see one unless im blind
yeah but at that point i might as well just modify the standard deck
Import Sprite Sheet perhaps?
copy the image and paste it into aseprite
or drag it in
that opens a new project
Yes.
i tried that but it asked me to convert my project into a spritesheet
dragging it in does that iirc, you can then select it and copy+paste
i almost never drag an image in because it opens a new file
Then probably not without patching.
nice joker tempalte imported
It feels like i run into this crash once a day atp, jeez
now about this sound, it doesnt play at all ingame
It's scoringCard not scored_card
uuuuugggggggggggggggghhhhhhhhh yep that's it
well, not all of it, apparently
same crash
Code?
any way i can just resize this entire project down 50 percent
How do you modify a sticker's config values
Normally if it's something like enhancements, you'd do this:
if card.config.center == G.P_CENTERS.m_[prefix]_[enhancement name] then
card.ability.extra.[enhancement config variable] = [value]
end
But for a sticker, it's different, and I can't figure it out, this is my attempt so far:
for _, handCard in ipairs(G.hand.cards) do
if handCard.ability.[prefix]_[sticker] then
handCard.[config variable] = [value]
end
end
nvm, i replaced it with scoredCard instead of scoringCard
any way to export to clipboard?
CTRL + A > CTRL + C
how
Sprite > Sprite Size?
ah thanks
now heres something advanced, is there a way to turn a spritesheet into a font that can be typed
Yes, but it would probably take a bit of work.
dang so its easier jsut to drag and drop this text manually
Probably.
any way to turn a project into a spritesheet, so i can select a single sprite and copy and paste it into the other project
bump
File > Export > Export Sprite Sheet?
i figured it out already but thank you
Hiya, I am trying to override the chip value when scored to be 10 using this joker without actually modifying the card itself anyone know why isn't this implimentation working?
-- Man Ha
SMODS.Joker {
key = "man_ha",
loc_txt = {
name = "Man? Ha!",
text = {
"All cards are considered",
"{C:attention}King of Spades{}"
}
},
rarity = 2,
cost = 6,
blueprint_compat = false,
perishable_compat = true,
eternal_compat = true,
pos = { x = 8, y = 2 },
atlas = "mbm",
calculate = function(self, context)
if context.scoring_hand and context.cardarea == G.play and context.main_eval and context.card then
context.card.base.nominal = 10
end
end
}
any way to change the hue/modulate of a layer
Edit > Adjustments?
also this is only for 1 layer how do you do it for all layers
Right Click Layer > Flatten > CTRL + A > CTRL + C?
but i wanna keep my layers separate
Undo it after.
hey Somethingcom515, any clue how to do this?
if context.individual and context.cardarea == G.play then context.other_card.base.nominal = 10 end
Bump
I tried this, and it didn't work for some reason
SMODS.Stickers.modprefix_key.config?
bump
What part is that for, replacing handCard.ability.[prefix]_[sticker] or handCard.[config variable] = [value]
The second.
Got it, lemme try it out
are you trying to modify all instances of the sticker by doing this or just the sticker on the one card
All instances of the sticker
The sticker will instrincally grant +10 Mult, but I have a custom Joker that will bump that up to +20
oh youre checking for the sticker in the joker code and not the other way around?
Yep
The Joker checks for any cards with the sticker, and if there are, then change the mult to 20
And honestly this sounded a lot better in my head
You just need to do it once, it will affect all cards.
Ah
itd be easier to check for the joker in the sticker code and just have the return be doubled if the joker is present imo
This is my current Joker
calculate = function(self, card, context)
if context.setting_blind then
G.hand.config.card_limit = G.hand.config.card_limit - 1
for _, handCard in ipairs(G.hand.cards) do
if handCard.ability.fm_catatonic then
SMODS.Stickers.fm_key.config.mult_increment = 20
end
end
end
if context.end_of_round then
G.hand.config.card_limit = G.hand.config.card_limit + 1
if G.hand.config.card_limit < 1 then
G.hand.config.card_limit = 1
end
end
end
"Catatonic" is the said sticker, if a card has Catatonic, you can not play it nor discard it until the blind ends, but will grant +10 Mult for every hand played, and the Mult bonus will increase by 10 every time
The Joker's supposed to double that incrementing value from 10 to 20, but reduces your hand size by 1
ah
Remove the looping over the cards and just do SMODS.Stickers.fm_catatonic.config.mult_increment = 20
for one thing its reducing hand size by one for every blind you enter
Yeah, that's also another problem, so I tried using the end_of_round block to readd that lost hand size but haven't tested it yet
is it just supposed to reduce hand size by one ever?
Yeah, it's only supposed to reduce by one, not one every time
do add_to_deck and remove_from_deck functions for that
Never used those functions before, how do I use them
Oh wait saw how someone else does it
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-1)
end
Like this?
that reduces hand size by one when the joker is sold or destroyed
you want add_to_deck for the initial hand reduction and remove_from_deck for the return to normal
Lemme try something
do i have to use message and put sound inside?
no
bump
making my texture pack based on just random things i like
ive never done sprite work before but i wanted to share a wip
yall got any advice?
make the highlights consisten
maybe add more color diveristy
like "gradients"
not a good word but
more colors
shading maybe
how would i go about checking if the player is opening a tarot pack specifically
it was this, i needed to supply a message
bump
i think this is better
You set soul_pos to what pos would be if it was the soul layer.
what
soul_pos is pos but the top layer that perkeo and yorick use.
your second layer is a separate sprite
pos is image?
OH
took a minute to click
it needs to be in a spritesheet then right
Yes.
also i cant appdata in this (dont quesiton the name)
How do you reset a sticker's config value back to its original when the Joker is no longer present
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(-1)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(1)
SMODS.Stickers.fm_catatonic.config.mult_increment = 10
end,
calculate = function(self, card, context)
if context.setting_blind then
SMODS.Stickers.fm_catatonic.config.mult_increment = 20
end
end
}
Putting SMODS.Stickers.fm_catatonic.config.mult_increment = 10 in remove_from_deck doesn't work, it still applies the doubled Mult rate even when the Joker is sold
are you on linux or something?
also nice rust install
i try to add a folder, and it tells me appdata exists, but i dont see it
what program is this?
libresprite
Where I can define the text under the description of the seal?
it goes C:\Users<user>\AppData\Roaming\Balatro\Mods<modname>\assets
Is there a list of keys for all the tarot cards?
label in loc_txt
it looks like you already changed its color so you dont need to know about the other stuff
That is a remade
Yes, game.lua
But if you want go deeper you can see the source code of balatro and read how it was defined, is almost the same way
Then do CTRL + F and search --Tarots
I would like use localization insted
modprefix_key_seal = "Name Seal" in Localization > misc > labels
mmm already is like that and still don't working
return {
descriptions = {
Joker = {
j_succu_succubus_Joker = {
name = 'Modeus', -- reference to Helltaker?
text = {
"{C:green}#4# in #3#{} chance to drain a face card,",
"{C:mult, s:1.3}+#1# Mult{} for each",
"{C:attention}Crimson Seal{} in your full deck",
"{C:inactive}(Currently {C:mult, s:1.3}+#2# {C:inactive} Mult)"
} -- chips in exchangefor mult sounds good
},
},
Other = {
succu_pink_seal = {
name = 'Crimson Seal',
text = {
"The chips on this",
"card are {C:attention}halfed"
},
},
},
misc = {
labels = {
succu_pink_seal = "Crimson Seal"
},
}
}
}
this is the description in the localization folder
dont you need a dictionary entry too
go futher pls
No.
then whats the issue here
misc should not be in descriptions.
Bump
You set the old value in a variable and set it to that.
Ye, was that. Ty, mate
You deserve a french kiss
Am I using this right? SMODS.remove_pool('Booster', p_celestial_normal_1)
mmm the second parameter must be a card key
Oh wait so this wouldnt be used for removing a whole booster pack from the pool?
delete_card = function(self, center)
SMODS.ObjectType.delete_card(self, center)
SMODS.remove_pool(G.P_CENTER_POOLS['Tarot_Planet'], center.key)
end
for example, there is the "center" that is a card in mostly of cases
I must be doing something wrong
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card({set = 'Tarot', area = G.consumeables, key = 'c_high_priestess'})
SMODS.remove_pool{G.P.CENTER_POOLS['Celestial'], center.key}
return true
end
}))```
It is G.P_CENTER_POOLS
Good lord
@daring fern is prolly the smartest one here tbh
bro has a streak with helping people with their mods
How would I get the amount of cards played last hand in a consumable?
You would probably have to store it somewhere.
ugh, work
im trying to make a consumable but its sprite isnt loading for some reason
help me out
Why is your x pos 4 when it’s a single-tile atlas
not gonna lie
i pasted vremade and edited it
i just kept it in because i didnt feel like removing it
is that it?
possibly
It should be 0
oh
oh my god what did i do
nvm my stupid ahh put the 2x files in 1x and the 1x files in 2x
beautiful thanks for the help
where would i upload my mod once its finished anyway?
how can i refer to the amount of scoring i did on a hand?
love the pixel art (sorry that this doesn't answer your question)
i dream to be that good at pixel art
train
just practice
just draw and LEARN ANTI-ALIASING
lemme explain effect cards
basically
consumabled that give a status effect that lasts one round
and you cant use them in boss blinds
hey chat so i got the first of my texture sets done
however, now im trying to figure out how to replace the old one
thats why im here lol
yeah i guessed
What is the "amount of scoring"?
like, when you play a hand, the amount of chips you gained in total, after all the scoring process
the chips that's added to your counter in 1 hand
hand_chips * mult on context.final_scoring_step
How can i make a list of every card in the deck, then sort it from highest to lowest rank?
im still quite lost as to how to actually add the skin i made
What kind of texture is it?
how can i check if a card has an specific enhancement?
texture for the face cards, spades specifically
im considering caving in for tonight, its already kinda late where im at
i just have like zero modding experience whatsoever so its all a bit of a blur lol
i feel like i have the right idea for the textures but that means not much if i dont know how to use em properly
why wont this turn C:white?
{X:chips,C:white}
yeah im using that
are you sure you dont have any space in there
{X:chips, C:white} wont work, im p sure
sob
how can i make this work only for the first scoring card? this crashes
You need a context check.
is this an enhancement
it's a joker that enhances
what context
When do you want it to do it?
when first card scores ig
context.individual
ok
Need some help
What do i replace in the nil values here to get this joker to create another specific joker?
please use SMODS.add_card()
this?
SMODS.add_card({key = "j_modprefix_key"})
yeah that
And remove the add_to_deck and emplace
if context.individual and context.other_card ~= card then
though you will need more contexts, that can increase a lot
wdym?
do you want snowy cards to scale infinitely
then you dont even need context.individual
in context.main_scoring, go through context.scoring_hand, check for the enhancement and give xchips accordingly
if context.main_scoring and context.cardarea == G.play then
local snow_xchips = 1
for _,v in ipairs(context.scoring_hand) do
if SMODS.has_enhancement(v, "m_ub_snowy") then snow_xchips = snow_xchips + 0.2 end
end
return {
xchips = snow_xchips
}
end
thats odd
can you check if the stuff in the context block actually go through
put a print in there
how do i change the price of the created jokers?
Hook Card:set_cost()?
yeah yeah
also, you want to check if i == card too, actually
that's why i put 0.8
:3 bad practice
cuz itself is 0.2
but sure, that works too
[waves hand] very very rookie lua user here be nice please
I'm here at slowly 'losing my mind over an issue I don't quite understand'
when i load up my mod, it says that on line 18 [the SMODs.Joker{ line], the bracket isn't closed? i think thats what it meanas anyway?
whats the issue
id take the i ~= card
yeah
is thsi
freaking
notepad???
😭
NOT EVEN NOTEPAD++?????
lmaoo
who tf is the "we" in here
we as in ALL of us twin
yeah i should move from vscode to notepad 😔
Okay like I said I am a very very rookie lua user I did not know what actually good software to use
OH
thank you
fair enough
visual studio code NOW
notepad++ is literally free.
vscode too 😭
i have trickered you into giving me the software i needed instead of jus using notepad 😈
gee gee
thank you very much though
It's xchips not Xchips
wait what
Log?
where do i put Card:set_cost()
local area = context.scoring_hand outside of the event, and use area instead of context.scoring_hand in the event
Outside of your joker.
Elaborate
local oldcardsetcost = Card.set_cost
function Card:set_cost()
local g = oldcardsetcost(self)
self.cost = number
return g
end
i assume that makes Card:set_cost() actually work
not sure how to actually apply it to the created card in code
new but trying to get the hang of things
.
MY SON LIVES!!!
i don't know why the colour wasn't working for {c:attention}. do i have the wrong index or smn
oh wait nvm
im dense
and set them to lowercase

- Create a sticker called Catatonic that makes a card unplayable and undiscardable, but grants +10 Mult for every hand you play and the bonus increases by 10 after every hand played
- Create a Joker that bumps that incrementation from 10 to 20
- In actuality, the increments increase by factors of 10 depending on how many Catatonic cards are in hand (for example, 3 Catatonic cards in hand will increment the Mult bonus by 30 instead of each of them incrementing by 20)
How the fuck do stickers even work
bump
how can i make so a blind discards leftmost card and rightmost card? when i tried using hook's code and editing it a bit, ingame it simply stops and wont progress from this screen
G.hand:add_to_highlighted(G.hand.cards[1])
G.hand:add_to_highlighted(G.hand.cards[#G.hand])
G.FUNCS.discard_cards_from_highlighted(nil, true)
?
ty
yw, i've dealt with a lot of discarding recently
?
Oh this crash, i've gotten it so many times but idk how i fixed it
hmm ok
crashing on opening
hwat do you mean dawg 🥀
end the calculate
Your uhh...
your calculate doesn't seem to have an end...
how can i give a card a seal via a joker?
[card]:set_seal("Red"), ik this one works bc ive used it before without issue
okk
also if i wanna use a custom seal, do i have to write s_modkey_key
mainly for the s
90% sure
ok
uuh what is the command to make a custom joker compatible with the blueprint joker?
id say no
idk, ive only done red seal
huh, i tried to check the seal through collection
oh, it's blueprint_compat = true
lmao
Thats just the display iirc
For making it compatible is context.blueprint and to make it not is not context.blueprint
Haii dilly
-# yay, someone that knows what they're talking abt!
wait, where do I put context.blueprint?
in calculate
wait
too funny to me
its peeak
peak cinema
is it normal that it gives me error?
yes because that would be wrong, let me give example
calculate = function(self, card, context)
if context.first_hand_drawn and not context.blueprint then
blueprint_compat = true works fine ?
it doesnt generate 50000 default loggers and create xchips for every card so
as far as ive always known blueprint_compat = true/false only makes the text box say it is or is not
bump
sooo... it actually works that command?
aight, lemme check quick first
https://github.com/Steamodded/smods/wiki/SMODS.Joker
from the wiki
yeah ok so
it is js cosmetic only
can you post your full code? not sure i can help but ill try
since blueprint_combat = false still makes it call - im assuming the behavior is
because its /just/ a joker.main behaviour
and nothing else
that is the full code lmao, it's a consumable
but... it actually works for me like this
somehow it actually works
^
does your joker only have joker.main
if that's the case then i think thats
what causes it to work as it does
ooh
well if it is youd be missing an entire format
https://github.com/Steamodded/smods/wiki/SMODS.Consumable
cause im not seein the consumable in its entirety
fine, here
im jus lazy and didn't want to take another screenshot
this is because it doesn't know how to sort the cards
so it uses the tried and true method of checking the number
which doesnt work
you'd have to provide your own sort function
like everything in life, cardarea.lua has the sort function you probably need here
buuut
you probably dont need that anyway
iirc draw_card has the option to just sort autonaticall
y
What's the code for a card destroying itself?
if its a playing card you can use context.destroy_card
destroys during scoring if memory serves
Fuck i meant Joker
you need to return remove = true, tho
Trying to have a joker destroy itself after a boss blind, not detect when it's been destroyed
Oh, wait! Vanilla Remade Mr.Bones!
why's the sealed card acting like if it was being triggered, even tho its turn has already passed?
That isn't 8 cards, but ur getting there!
rip emplace
is there a way to use SMODS.add_card to create a random card from a pool?
SMODS.add_card({set = "pool"})
Code?
Code?
Did you define the Inscribed ObjectType?
Added this on all the jokers i wanted in the RNG pool, not sure if that's what yyou mean
Yes, but did you define the Inscribed ObjectType?
SMODS.ObjectType{}
The seal is not the problem, is that joker trying to put the seal on the first card?
it should only do it once
wait a sec
ok yeah
the joker is the problem
so then how do i fix it?
o h
Also it needs to be in a func in the event.
ok
is there a context i can check for when a card is created in the shop?
how can i make a card be bigger than what it should be?
I've been bashing my head into a wall /metaphorical for the past 30 minutes I know I'm missing something as small as a single 'end' or something and yet I just cannot see it
Which line is line 80
Oops
Im LOSING it I know there's something wrong but Ive been tinkring where the end(s) go for like 15 minutes
how can i make a card be bigger than what it should be? (71x95)
custom atlas specifically for that card
Or look at display_size and pixel_size
SMODS.Atlas{
key = 'key',
path = 'image.png',
px = [bigger size number],
py = [bigger size number]
}
yeah this doesnt work
wdym by display size?
Sorry back to you, can you select/hihglight your object, right click and press "Format Selection"? This will better indent the code to find the error more easily
huh?
try pixel_size instead?
If it still doesn't work you should look into More Fluff's code it has a Huge Joker
question mark
Can you go into Help > About and tell me your vscode version?
right right
Yes, but thats weird we got the same version
ujhjjhh
In the meantime, I can at least tell you what's wrong with the code: First return statement has two { but only one }
THANK YOU
idk why, but i cant get it to work
Hello
how can i know every joker that is currently in the game?
Im interested in learning how to create mods, but don't really know where to start. I have looked for tutorials online, but there isnt much and they haven't been helpful. I have limited experience coding in c++ but not at all in lua. I know I should probably start by trying to make simple things in lua to learn the language. Any suggestions on where to start and how to begin developing working on mods?
yeah ive messed around with other mods
yeah but do you have your own
mod folder
it should look more or less like this (ignore that it doesnt show .lua, im on windows 11 :P)
ive tried to follow something to make a mod folder but it wasnt showing up in game
but no
ok so then
C:\Users\youruser\AppData\Roaming\Balatro\Mods
type this in the folder path
with your user
clearly
yep
ok
ok
oh you have it all
ok then
write in the json file
"id": "modid",
"name": "modname",
"display_name": "moddisplayname",
"author": ["you"],
"description": "desc",
"prefix": "modprefix",
"main_file": "main.lua",
"priority": 0,
"badge_colour": "colour",
"badge_text_colour": "colour",
"version": "1.0.0"
}```
ok
np
Bump
Wdym move up
Like there's too much spacing?
Like i want to move the text up and the buttons down
So they're not overlapping
I'm not quite sure why they're overlapping to begin with
I'm p new to UI stuff but I've never had that
Can you send the code for the UI here
is there a way i could get the calculate/remove_from_deck/add_to_deck (really, any relevant function) of a joker without having an instance of it?
oh im silly i didnt think they were there because i forgot that the functions arent listed when you print the table
this won't work for vanilla jokers however

