#💻・modding-dev
1 messages · Page 492 of 1
maybe thunk misspelled it everywhere and later on realized, but they were lazy and only changed localization
Yeah
wdym github ðŸ˜
anyone know the issue? i have the code, the texture not working, and yes i have the 1x and 2x files for it
Do you have an atlas
i havent modded in so long i forgot about atlases
thank you
Let me try this a new way since the way I'm trying seems to be a dead end with my level of expertise (none):
I know they don't normally have it, but is there a way to give blinds info_queue?
this is great
wow
:3
I ask bc from there it should be easy, just do what i did earlier for the Sins but with blinds
Okay okay last one, I'll be uploading this in just a minute to Vortex unless there's a better place to do it
you'd probably have to hook the Blind:hover function
and it wouldn't be as simple as you did with the rarities
cus blinds have no built in system for tooltips
-# that's what ive been trying for at least the past hour
what have you tried
everything up to literally copying and pasting everything that's relevant from blindexpander into my mod
imagine if this sold for 2000$ if you had a fool card
<@&1133519078540185692>
ALL STEAM CARDS ARE MINE
nooo
Im going to watch yt for a few hours minutes to calm down
how do you set the layer order of sprites in a children table?
the third one dosent show up ingame, did i do something wrong while changing teh code
yes i have the files and yes they are named SD.png
is this what you were looking for
or did you want to hover a different kind of blind
like in the blind selection menu
meow
THAT. YES.
okay well you won't like it, cus it's just making your own UI, but here is what I did
local hover_ref = Blind.hover
function Blind.hover(self)
if not G.CONTROLLER.dragging.target and not self.hovering then
self.config.h_popup = {
n = G.UIT.ROOT,
config = { align = "cm", padding = 0.05, colour = lighten(G.C.JOKER_GREY, 0.5), r = 0.1, emboss = 0.05 },
nodes = {
{
n = G.UIT.R,
config = { align = "cm", emboss = 0.05, r = 0.1, minw = 2.5, padding = 0.1, colour = G.C.GREY },
nodes = {
{
n = G.UIT.O,
config = {
object = DynaText {
string = "I am a blind",
colours = { G.C.UI.TEXT_LIGHT },
shadow = true,
spacing = 0,
bump = true,
scale = 0.4
}
}
},
}
},
{
n = G.UIT.R,
config = { align = "cm" },
nodes = {
{
n = G.UIT.T,
config = {
text = "Meow",
scale = 0.4,
colour = G.C.PURPLE
}
}
}
},
}
}
self.config.h_popup_config = { align = 'cr', parent = self }
end
return hover_ref(self)
end
yep
the ui is basically just copying the hover ui that pops up in collection blinds
except i removed the text
and put meow
cus that's funny
I have no idea
Holy shit
where would i put this?
I don't have a use for this but maybe in the future
also atp idc what has to be done as long as i can move on
it's just a hook, somewhere in your file
Think you can put it anywhere
wherever you keep your other hooks
I'm a genius
as long as it's not inside another function
and ofc as long as that random file is loaded
Bunch of genius proplr in this server
Except for me ig if I can't spell prople
PEOPLE
so i just exited it and reopened the code and its gone
the spades diamodns one
after i saved multuple times
i tried changing the json and main.lua names since ik what this mod is now and neither saved
whats going on
how can you check if a joker was destroyed and not sold?
progress...
just need the other silly messages to appear in the right spot
the video is just 1 frame
are u sure
Yeah I can see it
i guess i can't
Nah, I'd lose
nah, id cruise
dihlatro

idk can you do and not context.selling_self
im not super familiar with it
in checking remove from deck
where
In remove_from_deck you would check for not G.CONTROLLER.locks.selling_card
No, because there isn't context in remove_from_deck
nom nom nom
thanks goat
baahhh
youve earned a mcnugget
thanks im pretty hungry

heyheyyy, question about the card art - what's the reason behind the 1x files and 2x files in assets?
and how/why are they different?
ohhhh~
how do you even smooth out a pixel man, it has no bumps
this is true
Any idea why I dont get a charm tag when the boss blind is defeated?
thats what im sayin
Beta 0530b I think
try updating
One last, last, last thing: how can i make it only appear on certain blinds? i tried checking self.name but it didn't work
It works now ty
(that's the exact name of the blind, i checked 5 times over)
if it's a modded blind the name would be bl_prefix_key
key = 'sillynormalpack',
loc_txt = {
name = 'Silly Pack',
text = {
'Choose {C:attention}1{} of up to {C:attention}2{} silly Joker cards'
},
group_name = 'pluh'
},
atlas = 'sillynormalpack',
pos = { x = 0, y = 0 },
weight = 0.7,
cost = 4,
config = { extra = 2, choose = 1 },
discovered = true,
pools = {
['SillyPool'] = true,
},
}
-- ObjectTypes
-- -- Silly Pool
SMODS.ObjectType {
key = 'SillyPool',
default = 'j_reserved_parking',
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
end,
}```
oohhh
You don't have anything to say what's inside the pack
It works now! (im still messing with numbers to make the background taller)
so how would i make it do a pool
specific pool
create_card = function(self, card)
return SMODS.create_card({set = "SillyPool", area = G.pack_cards, skip_materialize = true, key_append = "sinkhole_sillynormalpack"})
end,
also why is your default Reserved Parking
where'd you put the new text lines
i just \ned
its because you copied code from food objecttype isnt it
no...
anyways you should probably change the default to something thats actually in the pool
yeah im gonna
dont worry about reserved parking its my favorite food joker
like this, one under the other
Would there be anyway to make a seal that:
If this card is not destroyed by intended means, create a copy of the card, and remove the seal.
If so, how would I go about doing it?
what does "is not destroyed by intended means" mean
If its destroyed by anything thats not:
JOKERS:
- You selling it
PLAYING CARDS:
- You using a "destroy card" consumable on it.
yeah sounds plausible, for jokers you can use the new destroying context for playing cards it's a bit harder i think
would be very hard for playing cards I think
Also, how would i debuff multiple suits with a boss blind?
context.debuff_card
hm...
how would i check if a card is a joker?
if card.ability.set == "Joker"
heres my current function:
recalc_debuff = function(self, card, from_blind)
return not card:is_suit("Hearts")
end,
actually i shouldve asked how to check if its a playing card
if card.playing_card
THERE WE GO
Why isn't it working?
you're setting the value when the game loads but gets immediately replaced when the run starts
use debugplus instead
or hook the start run function
how do i use game:init_item_prototypes()
for what
like just to see the list of G.GAME things
sdm was saying that you should look at the code
probably game.lua
do i really have to make a new text node for each color change in the ui?
wait its not in steamodded
well damn i can't use my computer rn
wdym
you can maybe use the smods utils for processing text
How do I do that?
this is how i did it for poker hands
https://github.com/Steamodded/smods/pull/712/files
this but instead of lines 126 and 127 you would put your code there
https://github.com/nh6574/JoyousSpring/blob/c0a24f9ba7e75f51d8ec09f22f12329c7a837cca/src/globals.lua#L122
Thanks
Help, what is the dark background color here
I don't think it's either of those
G.C.JOKER_GREY?
im seeing lighten(G.C.JOKER_GREY, 0.5) as well but idk if it's the same UI
definitely not JOKER_GREY, it's too light
I've been looking at this and trying the colors and I can't figure it out
it also isn't G.C.SET.Joker
I would try darken(G.C.BLACK, 0.1)
I don't think the bottom 2 lines are ever reached here
okay I think I got it, it's adjust_alpha(darken(G.C.BLACK, 0.1), 0.8)
of course
really makes you wonder what was going through thunk's head when they decided to make global colors, but then practically leave those all behind by using darken, lighten and adjust_alpha
or that background statement
why are there 3 lines giving the same colour where the 3rd catches every card anyway
key = 'whoopie',
loc_txt = {
name = 'Whoopie Cushion',
text = {
'{X:mult,C:white}X3{} Mult if played hand is a Flush or Royal Flush'
}
},
atlas = 'whoopie',
pos = { x = 0, y = 0 },
rarity = 'silly_unobtainable',
cost = 1,
unlocked = true,
discovered = true,
pools = {['SillyPool'] = true},
config = { extra = { Xmult = 3, type = 'Flush' } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult, localize(card.ability.extra.type, 'poker_hands') } }
end,
calculate = function(self, card, context)
if context.joker_main and next(context.poker_hands[card.ability.extra.type]) then
return {
Xmult_mod = card.ability.extra.Xmult
}
end
end
}```
i'm trying to make a joker that detects when a card is retriggered to upgrade it, is there an easy way to detect retriggers?
If you consider patching easy then yes.
yknow i think i'd rather just do it per scored card then subtract the base number of cards scored
like uh
an example would be every time a card scores, add 25 chips to the joker
and then because i only want retriggers, i'd just subtract 25 cards per card in the scoring hand
is that stupid or smth why are you ? me
Increment a counter every time a card is scored, if that counter was greater than the amount of cards played then you had retriggers somewhere
they do that a lot instead of actually using words
you will never get an explanation out of them
why this not work?
[[patches]]
[patches.pattern]
target = '''=[SMODS _ "src/utils.lua"]'''
pattern = '''effect.message = effect.message or (not effect.remove_default_message and localize('k_again_ex'))'''
position = "after"
payload = '''
effect.extra = {func = function() SMODS.calculate_context({card_retriggered = true}) end}
'''
match_indent = true
```?
How can i get the total amount of consumables used this run?
it should be xmult instead of Xmult_mod
i mean i could do patches but i'm also trying to think about mod cross compat
might break somethin else
yeah but it says something about "next"
it's cleaner to do it with patches but it could break something
what do you mean by that
if its a crash log post the crash log
read the crash log above the code
oh
G.GAME.consumeable_usage_total.all
which line is line 658
if context.joker_main and next(context.poker_hands[card.ability.extra.type]) then
ah i was missing the .all, ty!
if context.joker_main and next(context.poker_hands[card.ability.extra.type]) then
return {
Xmult = card.ability.extra.Xmult,
message = '*Brapp*',
play_sound = 'silly_fart'
}
end
end```
this is meant to be for exactly Flushes and Royal Flushes right?
and straight flushes
try (context.scoring_name == "Flush") or (context.scoring_name == "Straight Flush") or (context.scoring_name == "Royal Flush")
also whats wrong with flush house and flush five that they arent included
GRAHHHh
sound = '...'
why are there so many versions of flushes
is it just anything that contains a flush
yeah
nah, im on latest version
hold on
where would i have put this btw?
do next(context.poker_hands['Flush']) instead
inefficient but where the next() was
Is there a function that can create a card hover ui element, but being completely independent of a card?
How does one detect how many times a pair has been played and only pair
G.GAME.hands["Pair"].played
G.GAME.hands["Pair"].level
why is my game crashing the localization is right there
it's Sleeve without the s
@subtle merlin thoughts on a helper function that lets you do this
i got a little too invested in this lol
that'd be nice instead of having to write UI :3
Also cool that you somehow got variables in it
what can i use to increase the chips and mult of a hand type
:O
that's rly cool!!
-# When i learn credits you'll be mentioned by name with how much you've helped me-
Is there something similar to card.ability.extra. for blinds?
blind.config.blind.config?

it... doesn't seem to do anything for me
-# (yes i added those functions i didnt think only typing this would work)
What does your hover hook look like entirely
oh wait i still need the hover hook? That... makes sense, ill get back to you
Yeah, the only thing you should replace from what you had before is the assignment to self.config.h_popup
The rest stays the same
Let's go we balling 
im familying it
Functional programming moment
Also oop programming moment
oops programming? that's called pseudorandom!
Update: :3
Wow, after small refactor everything is working, unbeliveable
Is my code not junk????
Anyone know how to get the chips/mult of a hand before it gets played?
either G.GAME.hands[handname].mult (or .chips) or read the globals mult and hand_chips in context.modify_hand
You made it so that i can do 7x the definitions in the same amount of space (this is the exact amount of space the old code took for 1 definition)
Coding be like sometimes
One day I'll compact my mod but for now it's just a bunch of junk wrapped with duck tape
I'd rather 20 lines for each definition instead of 100
Or not compact, simplify
Whatttt why
I want 100 lines to print hello world
Imagine make some sort of dictionary where you store all effects for all blind, and just reference value form this dictionary, instead of copy-pasting same code

Nah
I do run into a slight issue with my charity blind but ill leave that for future me since it isnt too big of a problem
It won't even break anything it's a minor bug that may help players
Anyway, will doing this count as discarding a card? (v is a card)
Btw this supports passing a list of tables where each table would be one white block of text
So you gave it the abilities of a localization file?
just that part
The rest comes from the smods function
And well, the card UI that I copied from jokers
Is this for aod?
Actually nvm idk what I'm saying
... no?
Ignore me
I'm just silly
I remember it getting cards from played hand but I doesn't get cards from discards
Ignore me
technically it does, but functionally it grabs the card from play
Ofc
don't you love it when your mod crashes 50 times
only to realize you forgot 1 singular comma
card.children.whatever_name = UIBox {
definition = {
n = G.UIT.ROOT,
config = { button = 'some_button_name' }, -- this function has to be in G.FUNCS
nodes = {
{ n = G.UIT.T, config = { text = "hi i am button", scale = 0.4, colour = G.C.GREEN } }
}
},
config = { align = 'bm', major = card, parent = card }
}
like this
i see
where do i put this
i see
thanks
but now
i wanted to make a soul like consumable
that spawns my own rarity joker
how do i like
set the joker from that rarity to be not in the shop but the soul like card itself
i see
is there a way to adjust the vanilla badge colors with a texture pack at all
just curoius
badge colors are defined in the code so you would need to use lovely patches
The cycle number is the total length of time it takes to cycle from the beginning to the end
So big number = slow yes
which page is this
smods.joker
bruh
update = function(self, card, dt)
if card.highlighted and card.area and card.area.config.type ~= 'shop' and not card.children.whatever_name then
card.children.whatever_name = UIBox {
definition = {
n = G.UIT.ROOT,
config = { button = 'some_button_name', func = 'can_some_condition', ref_table = card },
nodes = {
{ n = G.UIT.T, config = { text = "hi i am button", scale = 0.4, colour = G.C.GREEN } }
}
},
config = { align = 'tm', major = card, parent = card }
}
end
if not card.highlighted and card.children.whatever_name then
card.children.whatever_name:remove()
card.children.whatever_name = nil
end
end,
Is there a better way of adding buttons on jokers when they're highlighted?
Could probably hook Card:highlight
that be what i do
But this is so much more convenient
you are also super convenient because of your epicness
i hook highlight too
when will you hook me
meh
i declare that 2 if statements every frame won't be an issue
localthunk:
how do you increase and decrease the highlight limit again?
for play/discard or just to highlight
just to highlight
area.config.highlighted_limit
does the func inside of it get called every frame as well
joy
my jokers check if they can be summoned a lot and idk how that doesn't slow down the game
it did slow down the game when I added SMODS.is_eternal
and that barely does anything
calling a context every frame D:
why doesnt a card with this rarity appear in the shop at all ? ive been trying to get it to show up in shop for so long by fudging with these values but no luck
i have no idea how rarities work but maybe try adding pools = { Joker = true }
ok the documentation on rarities is so fuckin confusing for no reason imma try that
it worked lmfoa
i love these docs
amazing
if context.final_scoring_step and (hand_chips * mult > G.GAME.blind.chips) and not context.blueprint then
talisman is making this line of code result to always true, regardless of whether the scoring hand caught fire or not
how can i make this compatible with talisman? the mod already has to_big and to_number defined elsewhere
Any idea what 'bmi' alignment is?
It's inner yeah
im adding an FAQ sort of thing to vanillaremade this week but I'm mainly adding pieces of code rather than tutorials bc i dont know how to write
any ideas what should be in there
Oh it centers it with the parent
Hmmmm then how does that coexist with "bottom middle"?
If that should already center it on one axis and pin it to the edge on the other?
that is a good question
that I wish I could answer, cm and cli are identical
Sooooooo, who knows
this is what i have
there are a couple others like "how do i play a sound" that are just going to say "read the docs"
I find that funny
For those I think it would be ideal to link the correct docs
of course
Awesome
im mostly documenting anything that im annoyed at repeating but with no examples in vanillaremade
Thats fair
Now you'll get to say 'read vanilla remade' which will then say 'read the docs' so you can say it twice as much
exactly
How would I make an UI element draw below the card?
that looks fine to me
He's trying to do what Pokermon does it with the types
I think
Or he just doesn't know how rarities work
Where did you put this
dead has to be rarity?
Any idea on how to do this?
if you figure it out tell me
frick
you said you've hooked highlight to add buttons
did you just leave yours above the card
no, but i think it's because i use the vanilla use_button field?
any other thing i add is over the card
Is there a way to put custom colors like the hex thing on the badge or
Okay now I'm even more confused as to why even card.children is being drawn at all
Nvm I found it
yes
anywhere you can put colors you can do the HEX thing
couple more
Would it be possible to decrease this number without changing the card's rank or affecting other cards of the same rank?
evening chat
hiiii
ive done it on another joker but i want to see if this'd be possible
Is there a way to display more than 1 badge
module patches don't get patched (I could not figure out how to get the right function at the time their buffer is loaded)
yes, just add another line to the set_badges code
Like this
no, it would still be +1
Oh wait I'm dumb
dumbahh
Shut up
:3
Actually I don't understand
what part
I don't need that coma at the end of the first line right?
ah no
Alright I fixed it
im probably going to add a "how to start" part at the beginning that links to all the docs + installing vscode and lua extension + setting up lsp + git setup + making a joker show up in game
that's the most tutorial you get from me
Is there a way to move the badges to the left or right
not with that
Sigh
that would require patches and stuff
Nvm then 😔
I've figured it out
lets goo
Turns out SMODS completely overrides Card:draw
I spent like 20 mins trying to patch it and wondering why nothing was happening
with a drawstep?
Yeah I had to do this
SMODS.DrawStep {
key = 'buttons',
order = -29,
func = function(card, layer)
if card.children.whatever_name then
card.children.whatever_name:draw()
end
end
}
SMODS.draw_ignore_keys['whatever_name'] = true
ohh
the normal buttons order is -30
srockw being amazing at UI for the 100th time in a row:
i will steal this and add it to the faq 😈
I will eat this
and there is a step that draws all the children of the card unless they're in SMODS.draw_ignore_keys
nooo we need this
which happens after the actual card
What do other orders do
what the hell is SMODS.draw_ignore_keys
in vanilla there is this line
for k, v in pairs(self.children) do
if k ~= 'focused_ui' and k ~= "front" and k ~= "back" and k ~= "soul_parts" and k ~= "center" and k ~= 'floating_sprite' and k~= "shadow" and k~= "use_button" and k ~= 'buy_button' and k ~= 'buy_and_use_button' and k~= "debuff" and k ~= 'price' and k~= 'particles' and k ~= 'h_popup' then v:draw() end
end
beautiful line indeed
so SMODS.draw_ignore_keys is just that but better
mods, steal all their usdt
🔫
im using this to draw cards under jokers
That sure is alot of freaking yappage dear lord
What was he cooking
You could just directly assign to card.base.nominal probably, but it would only last until the rank is changed again
Honestly i'd be fine with that
ty!
I cant figure out why the color isnt working for the suit
card.ability.suit is working for the consumable that changes the suit
but not here
how do you give the player hands and discards in a form of return
where do you set card.ability.suit
wdym in a form of return
you put card.ability.suit where it should be card.ability.extra.suit considering the line above
you cant
return {func = function() ease_hands_played(number) end}
i mean yeah but that doesn't do anything
IM SO STUPID THANK YOU
is there just no way to target debugplus in a patch then
it doesn't do anything that not putting it in a return does
I ran lovely with --dump-all and there's nothing about debugplus anywhere
That bugged so much stuff that ill just keep the negative perma bonus
what's your objective
if you want the hands to display after the message or something then do what something wrote, else just use that function outside the return
wanted to give the player hands and discards if they press a button, i already got the keypress working and stuff, made a custom context named context.key_press_f1
yeah just use ease_hands_played and ease_discard
ill put that in the faq too
wait no that's already in vanillaremade
where
burglar
I'm creating a double tag when the blind is skipped. The double tag doesn't go off on the blind's tag though. How can I create the double tag in a way that it activates?
use ```lua
Code jumpscare
config = { extra = {
odds = 1,
chances1 = 2,
chances2 = 6,
chances3 = 10,
mult = 20,
cash = 20,
card = 1
}},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.odds, card.ability.extra.chances1, card.ability.extra.mult,
card.ability.extra.odds, card.ability.extra.chances2, card.ability.extra.cash,
card.ability.extra.odds, card.ability.extra.chances3, card.ability.extra.card,
colours={HEX('F7070BFF')}}}
end,
in_pool = function(self)
return false
end,
calculate = function(self, card, context, effect)
if context.main_scoring and context.cardarea == G.play then
local effects = {}
if SMODS.pseudorandom_probability(card, 'giga_luckiest1', card.ability.extra.odds, card.ability.extra.chances1, 'luckiest_prob1') then
table.insert(effects, {
mult = card.ability.extra.mult,
delay = 0.6
})
end
if SMODS.pseudorandom_probability(card, 'giga_luckiest2', card.ability.extra.odds, card.ability.extra.chances2, 'luckiest_prob2') then
table.insert(effects, {
dollars = card.ability.extra.cash,
delay = 0.6
})
end
if #effects > 0 then
return SMODS.merge_effects(effects)
end
if SMODS.pseudorandom_probability(card, 'giga_luckiest2', card.ability.extra.odds, card.ability.extra.chances3, 'luckiest_prob3') then
local food = create_card('food',G.consumeables, nil, nil, nil, nil, nil, 'createFood')
food:set_edition('e_negative', true)
food:add_to_deck()
G.consumeables:emplace(food)
end
end
end
dilly jumpscare
yeah Mb
I just be appearing and lurking and stalking
I just wonder why my probability works soo weirdly
were you able to make progress with your fridge
Mostly yea
I still gotta fix the text but ive been as the kids say lazy and in bed
But seals trigger inside the fridge now
Doesn't change anything
you want the double tag to go before the skipped tag?
Yeah, or whatever is necessary for it to activate on the skip tag
yeah i dont think that will work
you might need to patch a context before the tag gets redeemed
yeah the tag gets added way before
you'll have to patch this part and make your own context
like Its supposed to be 1 out of 2, 1 out of 6 and 1 out of 10 but It soo weird like I never hit the 1 out of 10 and the 1 out of 6 hits less than the 20$ from a lucky card ( I test like 200 hand with retrigger)
the 1 in 10 is after the return, so it never happens
the others look normal enough
but its creating a consumable so it is not place in a return, isn't it ?
the 1 in 10 here would only ever happen if the 1 in 2 and 1 in 6 failed
cus if either of them succeeded you return out of the function before it has a chance to trigger
oh yeah didn't taugh of that
but can I place in a return :
local food = create_card('food',G.consumeables, nil, nil, nil, nil, nil, 'createFood')
food:set_edition('e_negative', true)
food:add_to_deck()
G.consumeables:emplace(food)
New to lua, what should I do to create my own context?
SMODS.calculate_context{ modprefix_contextname = true, modprefix_any_other_value = value }
you could do
table.insert(effects, { func = function() --[[ do your stuff here ]] end })
to keep it consistent
ok yeah I'll try
‎
you'd override the draw method and pass an x and y offset to the draw_shader call
How would I make it look normal though?
you mean making sure it stays inside the card?
Also would that allow for drawing multiple seals?
I don't really understand the image, I see 2 seals but they look fine, no?
You can probably use a DrawStep for that
but it looks like you already are drawing more than one
No, the second ones thinks it's still in the spot of the first one.
what does thinking it's still in the spot of the first one mean
Have I interpreted this correctly?
do you have something that uses the position of the seal for an effect?
*aside from the missing return
No, I just want it to place a seal in a random spot.
Why are you calling it twice?
and just visually being in a different spot isn't sufficient?
I see, so calculate_context is for creation only. Do I just use context.<context name> to access it?
Is it easier to see the problem here: #1355819401198178455 message ?
you mean it only moves vertically?
Yes.
Oh, is it that it doesn't move with the card as if it was on a different spot?
Well in that case should I move the creation code somewhere other than the hook for function/cleanliness?
Yes.
I was moving it with draw_shader there.
@daring fern Does it matter that my code creating a custom context is inside the hook that sets it?
Sets what?
No, remove the context.givl_preskip ones.
SMODS.calculate_context already calls that.
I think I get it now
Yeah idk, I never noticed that before
@daring fern Thanks, it works now. A lingering question I have is if I can delay the spawning of the blind tag so they aren't spawning at the exact same moment, but functionally it's complete.
hello dev moddingchat
Does anyone know how to make G.GAME.hands["Pair"].level talisman support
Hello
How are you using it?
Put to_number() around it.
not currently. What are you trying to do?
Including the times 50?
No, just the G.GAME.hands["Pair"].level
today i have created this joker and i wanted to show you all
Was just trying to make a small addon that would automatically save your state every time a round ends
But all the variables are local
you could just call the keybind function or just save the game to the right file manually
good point, I didn't think that far
the onkly local variables here are the key that was pressed and the keys you can rpess
oh I guess log is too
but you can replicate that with the api
or just print
probably not worth logging it, it'd just be annoying ingame
thanks, I clearly didn't think enough when the idea came to mind
Is there a way I can make the values in a tooltip box display correctly?
Thank you btw
for tags it should just be info_queue[#info_queue + 1] = G.P_TAGS.tag_prefix_key
I have this, for learning purposes what makes this not work while that does?
info_queue[#info_queue + 1] = { key = 'tag_skip', set = 'Tag' }
you could make the one you sent work by adding vars = { num1, num2 }
The game probably checks that the object you appended has a loc_vars function and if so does it automatically
But I never looked into it too much
yeah the other method you need to know how the info on the tag works smods added a shortcut using the center where it does that work for you
does anybody know how to change the ability unbox of a playing card to say +X mult instead of +X chips? i have a new suit that gives base mult
So I did something similar ish for a recent thing, specifically changing the display for chips and also excluding the suit display, and I just did it by intercepting the keys used by the localize function to change them to alt loc strings
However, since this involves lack of function, I could easily discard the vars getting passed in (the nominal chips and the suit) since they were unneeded. You might need to do something a little different. These keys/localize calls come from the generate_card_ui function
What's the context of entering a shop
context.starting_shop
Thanks that's what I thought
That wouldn't be enough tho, cus you also check whether z or x is pressed
Through love.keyboard
‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌
Well I don't know how useful this is, but you can do G.shared_seals.Blue.sprite:set_viewport(x, y, width, height) which will actually move it properly
So you can do like G.shared_seals.Blue.sprite:set_viewport(-20, 20, 71, 95)
how do I spawn a random consumable?
like no specific set, just allow any random one to be summoned
SMODS.add_card({set = "Consumeables"})?
guys why Am I crashing
aight let me try it
Wouldn't that change the position of all cards with that seal?
what are consumables referred to internally so that i can create specific ones with jokers
I just want it so when a card gets an additional seal, it will be assigned a random position.
Yeah it would, but you can swap it before drawing and turn it back after for the extra ones, no?
SMODS.add_card({key = "c_modprefix_key"})
Yes, but if a card has 2 of the same seal, how would I make it so those seals are differently placed?
I'm storing the keys in a table in card.ability
Well uhh that sure worked...
SMODS.add_card({set = "Consumeables", area = G.consumeables})
Also why are you returning true?
To try and stop it from spawning 9 million of them.
...how do I stop that from happening?
No, that is not an event.
thanks it worked
You need to check for more than just context.individual
Well, doing this got it down to only fill the consumable slots, so it's a step in the right direction.
How do I only make it happen once?
What is the goal?
context.before not context.individual
thanks
SMODS.DrawStep {
key = 'seals',
order = 31,
conditions = { vortex = false, facing = 'front' },
func = function(card, layer)
local x, y, w, h = G.shared_seals.Red.sprite:getViewport()
G.shared_seals.Red.sprite:setViewport(412, 355, 71, 95)
G.shared_seals.Red.role.draw_major = card
G.shared_seals.Red:draw_shader('dissolve', nil, nil, nil, card.children.center)
G.shared_seals.Red.sprite:setViewport(x, y, w, h)
end
}
as I initially said, this isn't really sustainable, cus you're just taking a different portion of the spritesheet
just a cool proof of concept i guess
ezpz, just shrink em and you have more space
Also, how would I get a random number for the position that's within the card?
you might have to define predetermined spots for every seal if you really wanna use this method
rather than pick a random one dynamically
Is it possible to have a sticker give chips or mult? Or is that not possible?
Yes.
How would I go about doing that? Like normal or...? I tried doing it like normal, but I dont think stickers have a config table
You would just return mult and chips
Okay, but thats not working and ive tried both putting the number straight in and using a config table. I dont know what im doing wrong
can you send your code?
How do I make it apply a random enhancement?
context.other_card doesn't exist there.
Also it wouldn't run anyway.
because of context.after?
Because context.cardarea is never G.play in context.after
as for the enhancement part, you can do other_card:set_ability(SMODS.poll_enhancement { guaranteed = true }, nil, true), assuming other_card actually exists and is a card
It would be self.config.mult
Ohhhhh
Why? I'm pretty sure in Jokers, its card.ability.mult? Why is it different here?
Because card.ability is for the center.
Cus stickers don't apply their config by default
if you really want to, you can, but unless you have a scaling sticker there isn't really a point
Quick question, when applying a sticker to a playing card via Joker (in context.individual), does it happen before or after main_scoring?
ok, last thing I may need:
How do I loop through each card in the played hand?
It happens after.
for k, v in pairs(context.full_hand) do end
thanks
this blind debuffs 2 random suits every hand played, however the debuffs are fully cleared whenever an item is used, sold, or any other change occurs. what's the issue? (also this is old so my code may suck)
most of the time a debuff is recalculated which removes the debuffs you have set
smods has a system around this
SMODS.debuff_card
sick, thanks! works now
i'd separate these two just for readability
this triggers on gold even if its not last hand of round im gonna try and move stuff around to get it to work right
(edited)
ill try it again
-- When Steel triggers
if not context.end_of_round and context.individual and context.cardarea == G.hand then
if SMODS.has_enhancement(context.other_card, 'm_steel') then
-- code
end
end
-- When Gold triggers
if context.end_of_round and context.individual and context.cardarea == G.hand then
if SMODS.has_enhancement(context.other_card, 'm_gold') then
-- code
end
end
this is much more readable
this doesnt work either
ill try yours i havent yet
ok this worked
thanks
the question marks are so silly
sorry to cause so much trouble lmao
Can anyone direct me on how to mod balatro on ios
PLEASE
Oh than I don’t understand why it’s an option when your selected to be put into the modded section I’m sorry
why doesnt this work? the sell value doesnt change
if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
card.ability.extra.dollar_rounds = card.ability.extra.dollar_rounds + 1
card.ability.extra.rounds_left = card.ability.extra.rounds_left - 1
if card.ability.extra.dollar_rounds == card.ability.extra.total_rounds then
card.ability.extra_value = card.ability.extra.price
end
end
end
}```
Yes, you need to do card:set_cost()
instead of card.ability.extra_value?
No, just put it after that.
set_cost just updates the cost of the card, name is a bit misleading
you just call it whenever you want the changes you made to apply
how do i make a card pulse when active, like invis joker?
i knowwwww but idk what part is the pulse
does this mean it being rare or just plain hidden
It means it is rare.
got it
is seeing_double_check something exclusive to seeing double? i want to make a card that gives 1.5x mult if hand includes a face card and a numbered card. how do i do this?
Yes, but that wouldn't help.
could ya help me?
would i have to make 2 variables that i would have to set to true? (if they are both true the xmult would be applied)
i could try that
local face, nonface = false, false
for k, v in pairs(context.full_hand) do
if v:is_face() then
face = true
else
nonface = true
end
end
if face and nonface then
-- do things
end
This seems to be caused by Paya's Terrible Additions
@unborn bay
is this related to hovering over a card
like any card
The problem seems to be that the ability table cannot be iterated over.
But only for some cards.
odd since that should still work
unless i implemented the metatable wrong
why do you need to iterate over the ability table anyway
copy_card
yeah i see the problem
will fix it tomorrow
its a thing related to metatables
wonder why thunk didn't account for metatables in copy_table
lmao i just realized this made copying cards half broken since they don't copy the previous values over but it still works fine anyways

what can i use to make a certain consumable type more common (for a joker)
change G.GAME.[set]_rate
can you help me understand how to use it? ex. if i want to quadruple the chance of something like tarot cards spawning
G.GAME.tarot_rate = G.GAME.tarot_rate*4
I have an error here. I think something is wrong here. I have tried to get this working for three days. Can anyone help?
it doesnt look like the error is there
that's what I though
so I checked all the files
commented out things until i didn't get an error
nrm
its in here
You are overwriting G.C
youre replacing the entire color table
So.. I don't do that basically?
Yes.
When I open jokers under additions on my mod. This guy crashes
the badges syntax is wrong
oh
does your joker even work, the calculate looks wrong
🤔
oh i didnt notice that lol
I never tried it since it doesn't load
some guy helped me
i couldn't find it on the wiki
Bepis
heaven
wepis
W'
i will make one
ooo
I'm also having troubbles registering enhancements. I even looked at other mods.
tried looking at balatro code
emm
..
have you looked at vanillaremade
no
local rand = pseudorandom("hi") --Returns a random number between 0 and 1 with that seed.
local rand = pseudorandom("hi", 1, 3) --Returns a random whole number from 1 to 3 with that seed.
local rand = pseudorandom_element({"hi", ":thinking:"}, "seed") --Returns a random child in the table with that seed.
Yeah but I would want to use the seed of that run no?
no
wy
how do i explain it ðŸ˜
the seed of the run is accounted for already, you need a secondary seed for your effect
ok
on the last one is "hi" or "seed" the seed you see the confusion?
the seed can be anything
it just has to be unique enough so that other code wont use it too
the second argument "seed" is the seed, the first argument is a table with 2 strings
i recommend brushing up on basic lua
likee, in run seed AAAAAA, pseudorandom("hi") will always have a consistent order of number that it will return whenever its run, for ex:
first time its run, it will return 0.3, second time it will return 0.4, etc etc
the reason why you want it to be unique is that if another code uses that seed too, then it will skip the intended order and go for the next number
yeah and "hi" is a REALLLY bad seed to use for that reason its super bad and awful am i right @subtle merlin
in what file can i make a new boss blind? is it the jokers one or do i have to make a new file entirely
splitting your mod into different files is just an organisation thing
You can make it in any file as long as it gets loaded.
Like how do I do badges then
set_badges = function(self, card, badges)
badges[#badges+1] = create_badge('text', G.C.RED, G.C.BLACK, 0.8 )
end,
I want two
RED is the badge color in this case
copy paste the line adding a badge?
set_badges = function (self, card, badges)
badges[#badges+1] = create_badge('Idea Credit: plantform', G.C.EF.IDEA_CREDIT, G.C.BLACK, 0.8 )
badges[#badges+1] = create_badge('Art Credit: diamondsapphire', G.C.EF.ART_CREDIT, G.C.BLACK, 0.8 )
end
Is that a badge?
I want those little info things that ecplain what an enhancement does (for example)
oh
info_queue?
that's the info_queue in loc_vars
tnak you
do i need to change the joker_src thing
i dont think so but i would just so the code reads better
-_-
:3
how do i get the key of a tarot card
card.config.center.key
thanks
how do i check if a card played has an specific enhancement, in this case steel?
what if i want to remove it?
as in destroy it?
or remove the enhancement?
destroy it
if context.destroying_card and SMODS.has_enahncement(context.destroying_card, 'm_steel') then
return { remove = true }
end
enahncement
cg - too mnay jokres
my jokers are many
How is get joker return defined
What about get vanilla joker return
Looks like that function doesn't handle hand type xmult
G.GAME.blind.chips
So you'll have to add it
idk how to do so...
I also don't know, don't have the source code available right now
ALSP what about your chips
says nil troops nil mult in desc
G.GAME.blind.mult
I found that out.
G.GAME.chips
Aaysy
In loc_vars you need to return the values
k.
@keen atlas yo what does this mean
you can just put the lsp folder to your mod folder and have it all done
or
if you decided to put it outside of the mod folder, you have to create settings.json in .vscode and add Lua.workspace.library
i would do the first one
but itll clog up the github page
🥀
thats the easiest yeah
put it in the gitignore nxkoo..
RIGHT
like this?
that works
can someone help me with modding balatro ?
@keen atlas how do you turn on the autocomplete stuff
actually luals follows gitignore
so it should be good
ya ive done all that i cant get the mod tab to pop up in game?
i think it scans the whole workspace already unless you exclude it (which i think you did in gitignore)
When you opened the game did a console open alongside
ah alight
yes but still no mod tab
add "Lua.workspace.library": ["balatro-lsp"] to settings.json
What's inside smods-main
i think i should share the settings.json in the thread
alright now i got an opps game crash after putting in crypted
What's the crash log
You have an old version of both cryptid and talisman
oh?
Latest cryptid version is 0.5.10, talisman is 2.3.1
it's rude for being nosy
you know what im talking about nxkoo.
IT IS RUDE TO BE LOOKING INAPPROPRIATELY
Hey, how does weight work exactly in booster packs. I mean, how does it transform to odds
Imagine a box filled with booster packs, you have to put your hand in blindly and pick one at random. Weight would be equivalent to how many copies each booster pack has inside that box
So you're more likely to draw packs with higher weights
So the number represents something similar to the ammount of packs in global pool?
Yes, except picking a pack doesn't remove it from the pool
It was more just a metaphor that helped me understand weights
Its a common system, you can find info about how it works technically everywhere
The odds of picking a specific pack would be weight / total weight of pool
What are the odds of specific rarities in those packs determined by?
Wondering if maybe making a voucher for packs to have a higher chance for higher rarity cards would be an idea
by the create_card function
Booorrriiinnggg
Why cant things be as easy as rarity = yes up
there are globals to modify a rarity's weight
Do new rarities get that global var too?
yes
wdym
nvm
SMODS.add_card
u see, this doesn't work but doesn't crash, ```SMODS.Joker {
key = 'dreamer',
loc_txt = {
name = '{C:red}Dreamer{}',
text = {
'When a {C:attention}Blind{} is skipped, {C:green}1 in 6{} chance to spawn {C:rare}Frog Guy{}'
}
},
atlas = 'dreamer',
pos = { x = 0, y = 0 },
rarity = 'silly_unobtainable',
cost = 1,
unlocked = true,
discovered = true,
config = { extra = { odds = 1, } },
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = {key = 'silly_dreamer', set = 'Other', vars = { "ENA" }}
end,
calculate = function(self, card, context)
if pseudorandom('j_silly_dreamer') < G.GAME.probabilities.normal / card.ability.extra.odds then
if context.skip_blind and not context.blueprint then
SMODS.add_card { key = 'j_silly_fiction' }
end
end
end
}```
what is the crash?
"doesn't crash"
Oh
hm
And does it work if you remove the probability check
dont mind the info queue stuff btw
i wonder why it doesnt work, can you add a print in calculate to see if pseudorandom stuff even works
idk lemme try
i heard it broke, not sure
what broke
dont think thats the case
?
same, but worth a shot, the contexts in calculate look right
Bepus
hi dilly
Same
Srock do you prefer the warm or cold
im about to get into bed rn :3
Hell yea
I'd rather have a comfy warmth
Bepis never answered my dm...


