#💻・modding-dev

1 messages · Page 655 of 1

dapper sun
#

how do i add a shader to a joker

#

would it just be a drawstep?

mystic river
#

for science, try disabling all your files in the loading routine. if this stops the bug, then reenable them one by one til it comes back

dapper sun
#
SMODS.DrawStep {
    key = "elle_pixelated",
    order = 69,    -- hehe nice :3
    func = function(card, layer)
        if ellejokers.pixelated_keys[card.config.center_key] then
            card.children.center:draw_shader('pixelated', nil, card.ARGS.send_to_shader)
        end
    end
}```
#

...

#

i forgot to make the shader

white hull
#

why's it yelling at me

#

is this important?

dapper sun
#

if it works ingame then you can ignore it shrug

clear ocean
#

If it ain't broke, don’t fix 🗣️ 🔥

red flower
white hull
#

I think there's a different error for that

#

but maybe yeah

red flower
#

i think thats when you try to index a table that could be nil

dapper sun
#

how do i send a texture in a SMODS.Shader's send_vars

pastel kernel
#

how do you make it so that this looks for odd cards in played hand instead of scoring hand ```lua
if context.full_hand then
for k, v in ipairs(context.full_hand) do

primal robin
#

Damn I found very odd issue (or rather it was reported to me)

#

If start a run on Magic Deck, and it happens too fast (like on very high speeds/without animations), consumable slots cards limit freaks out

#

Instead of 3 consumable slots you'll end up with only 1

tidal hemlock
white hull
#

how do i debuff a card in a boss blind without a return?

#

there's SMODS.recalc_debuff() but how do i make it know that the card should get debuffed by this boss

white hull
#

okay i got it

lusty marten
#

i created a new consumable , how can i change its shop rate?

rapid stag
#

is there a way to undiscover and relock jokers girldmDizzy

red flower
lusty marten
red flower
wild patrol
#

imagine

#

it does work lol

dense fulcrum
wild patrol
#

still wish I could learn how to change the background color

#

like the cryptid mod does

mystic river
dense fulcrum
mystic river
#

i'm not really sure why setting four values would invalidate challenges but

dense fulcrum
mystic river
#

oh, it's a : function; the arguments should be (self, args)

dense fulcrum
#

what a silly bug

dense fulcrum
tidal hemlock
#

why is the numberslop mod so intricate that it's crucial to use parts of it for many high-quality mods

#

(talking about cryptid of course)

mystic river
#

cause the numberslop mod came up with many interesting ways to number its slop

dense fulcrum
wild patrol
grizzled tide
#

hi I just saw this! does .current return an int of the current frame? or does it give a position of the sprite?

fading rivet
#

Is there a way I can have an effect happen after I destroy a joker?

#

I have a joker which creates perishable copies of destroyed joekrs

#

and I used ankh and it got stuck in an infinite loop

#

so i'm assuming its creating cards and then ankh is deleting them
leading to more creation and so on

red flower
grizzled tide
#

gotcha!

red flower
red flower
#

ah wait i misread the effect

#

yeah you should use events

past spade
#

are sticker's calculation functions ran for debuffed cards? it doesnt seem to be the case

slim ferry
#

they are not

past spade
#

hmm, some way around that? like how vanilla rental works while debuffed

faint yacht
#

...the Rental goes off before the debuff iirc?

grizzled tide
#

Is there a context immediately after pressing the play hand button (before context.before)? If not, what is the function for that button so I can hook a new context onto it

past spade
grizzled tide
past spade
#

looking through the code, seems rental is just special cased to work despite debuffs. guess I'll need a hook or patch to replicate

daring fern
rapid stag
daring fern
#

Also you would need to remove it from G.P_LOCKED

rapid stag
#

ah

daring fern
#

You would also need to do G:save_progress()

hushed field
#

I'm trying to do some custom UI stuff for a Joker with unlockable abilities, for which I wanna change the localization I pass through to the multiboxes. Still scouting around for how I best approach it, but I'm struggling to find where Smods implements multiboxing. Anyone have a lead I can follow up on to figure the system out?

hushed field
#

how did I miss the lovely file named multibox descriptions, damn

rapid stag
tulip pecan
#

I'm trying to make a joker that converts all scored Kings and Jacks into Queens. However, against The Pillar, the card immediately gets debuffed after being converted. Why does this happen?

slim ferry
#

the status on a card of "played this ante" is set at the very start of hand calculation

#

and changing the card rank causes debuffs to recalculate for it

tulip pecan
#

is there a way to prevent that?

slim ferry
#

there probably is but i dont know of a way

faint yacht
#

Set scored_card.ability.played_this_ante to false or nil?

daring fern
# tulip pecan is there a way to prevent that?

You would save the card.ability.played_this_ante value in a G.FUNCS.play_cards_from_highlighted hook then change it back to that after changing the rank then do SMODS.recalc_debuff(card).

tulip pecan
grizzled tide
#

hi! just to confirm, if I want to add a message to my localization file, it should be under v_dictionary right?

slim ferry
#

v_dictionary is for anything that uses a variable

#

otherwise use regular dictionary

grizzled tide
#

gotcha

#

and to access it, its just localize("key") right?

slim ferry
#

yes

dense fulcrum
hushed field
#

Is it possible to pass along specific parameters, like a background colour, in loc_vars, so that they target a specific multibox?

wanton jolt
red flower
#

it checks box_colours[i]

hushed field
# red flower yes, with box_colours

Ah, those are separate from background_colour? I assume background_colour is the colour target for the main box and then box_colours is a table that is checked for the other boxes?

#

Are there other parameters to know for those other boxes? I was checking the localization page for smods, but the details of multibox are still undocumented atm, haha

red flower
#

reading the code i think background overrides all of them

hushed field
#

Oooh, okay

red flower
#

i think thats the only one

hushed field
#

Well, the main box gets coloured by the background_colour, and the others remain white, if no other arguments are given, is what I've seen so far

red flower
#

ah youre right

hushed field
#

I'm trying to figure most of this stuff out by myself out of stubborness, but there might be a moment I break and barrage you with questions about joker ui stuff, haha

red flower
#

feel free

#

i think you have done better ui than me at this point lol

#

but i do remember a lot about the code

tulip pecan
hushed field
# red flower i think you have done better ui than me at this point lol

It's mostly the figuring out where what gets generated and set up that's a struggle to figure out every time, haha. I'm trying to make a joker with multiboxes, where the layout and content of a specific box changes based on the joker's state, and figuring out which chunk of the ui table gets generated by which function, and what info you need to pass along is quite a challenge, haha

red flower
#

i somewhat recently change my material transfer mechanic to generate multiboxes if you want to take a look at that

hushed field
#

Oh, I might, yeah. Do you have a visual example of what those look like as well?

#

My current attempt is to basically just generate two separate UIs and then remix them into what I need them to be, but there's no way that'll end up being even being close to the best approach 😛

wintry solar
#

you can also use your own AUT table that you populate as required

hushed field
#

Yeah, I keep running into these strange approaches mostly because I find it difficult to figure out where an AUT table is generated and then populated, haha. But I suspect that'll be how I'll set this up in the end

#

I don't mind the bumping my head into weird approaches as much, right now, because it's mostly just helping me figure out the actual structure of it all

wintry solar
#

the aut tables are created in generate_card_ui, you can hook it to add your own stuff, then I've used a G.UIDEF.card_h_popup hook to handle my own aut tables with some jank nodes[1].nodes[1].nodes....

tidal hemlock
hushed field
#

But even before that, there's information that needs to be passed into that, right? I think I mainly just need to mess around with the localize function a bit more just to understand how and where text formatting and colouring, and all that jazz, actually happens, and how to use it properly

winter flower
#

2 returns???

wintry solar
tidal hemlock
#

thanks jokerforge

hushed field
daring fern
wintry solar
hushed field
#

I think I've managed to throw together a functional thing with my approach, just now, but I can't actually properly make it look like what I'd want it to, this way, so I'll have to dig in deeper as well

vocal helm
#

is it possible to remove the extra wiggliness and shadow from a card's floating sprite? basically just make it an extra sprite that sits perfectly over the top of the original sprite

hushed field
#

yes

daring fern
vocal helm
#

makes sense yeah

hushed field
#

soul sprites use a drawstep that makes them move and shadowed with a shader. So you can just make a drawstep that does the same thing, but without that movement

tidal hemlock
#

forgot it was just "e_holo"

hushed field
#

Will keep messing with it, but it swaps out the text based on what quests it generates for you and how it matches those with the suits, so that's pretty good

tidal hemlock
clear ocean
#

joker idea: upside down joker with a name pun based off dinnerbone/grumm and the effect being based of pairs of numbers that vertically work (aces and sevens or sixes and nines)

Minecraft Wiki

An Easter egg is an intentional-hidden message, inside joke, or feature in a work such as a computer program, web page, video game, television program, movie, book or any other form of media. Minecraft features several Easter eggs hidden in the game.

#

lazy but its kinda silly

frosty rampart
#

mods already addressed it

clear ocean
tidal hemlock
tidal hemlock
clear ocean
#

some people had used ones and sevens to invert some messages

clear ocean
#

uh maybe for those digital clock segmented thingys

normal ridge
#

2
5

#

Two and fives

clear ocean
#

i might just do something like walkie talkie

clear ocean
normal ridge
#

With segmented they inverted yeah

#

Like 7 segments ones

#

On electronic clocks

clear ocean
normal ridge
#

:0?

granite jay
#

How do you make it so the description for a boss blind changes to a different description depending on the context?

clear ocean
#

probably still have a theme of dinnerbone but would do something with 2 and 5

normal ridge
#

I hope

slim ferry
#

at least not an easy one

#

since blind loc_vars are run pretty rarely during an actual run

normal ridge
granite jay
#

I don't want to make it so the description changes mid-game

frosty rampart
granite jay
#

Like the description changes depending on the config setting

slim ferry
#

thats doabke

red flower
#

return key in loc_vars

slim ferry
#

yeah

normal ridge
#

Hopeee

red flower
#

also next smods has more blind description stuff :3

#

with formatting

frosty rampart
#

:3

red flower
#

again?

#

<@&1133519078540185692>

granite jay
#

thx

frosty rampart
#

hi N

red flower
#

hwllo

#

im on vacation now so hopefully joyousspring 1.0 soon

#

if you see me doing more smods prs its because of that

frosty rampart
#

enjoy the time off

#

high roller 1.0 might be soon too, got a lot of art done recently

#

still should probably wait for the next smods release tho lol

wintry solar
#

meta!

frosty rampart
#

eremel!

wintry solar
#

do you think the canvas sprite text stuff would benefit from having an anchor property that works like UI align to move the anchor point?

frosty rampart
#

probably, seems a bit minor but still helpful

#

i was thinking for a second maybe it could support both the UI "cm" strings and absolute positioning of the anchor by pixels, but that's probably a bit overkill

wintry solar
#

well you can use text_transform to move the anchor point manually to wherever you need it, and then text_offset to actually position the anchor

#

I'm just not sure whether having an easy way to move the anchor point around the canvas would be good to have

frosty rampart
#

at some point i think it just becomes an unnecessary 2nd layer of positioning, but i wouldn't be against something that uses the UI strings

tulip pecan
#

I'm using SMODS.change_base() to change cards during context.before, but want to recalculate the hand type to include the updated cards (I.E. Playing King King Jack Jack converts all cards into Queens, but counts as two pair instead of 4oak) How would I do this?

slim ferry
#

do it in context.press_play instead

vast bough
#

hello modding dev

#

is there character limits in any places when making mods and if so, what are tehy

#

like names of items, descriptions, etc.

#

(this is for jokerforge 2.0)

red flower
#

not in any places i can think of

vast bough
#

perfect

red flower
#

the text in names gets really small however but theres not limit

vast bough
#

thank you N you are an unspoken hero in the balatro modding scene

#

you are getting an S when i make a tier list of balatro modders

#

along with eremel

red flower
#

thank you but im N not S

#

thats another guy

vast bough
#

get this man a true

slim ferry
#

wh

vast bough
#

would smods guys get mad if my joker forge desktop app installed smods for you when it automatically places and updates your mod folder with your jokerforge mod. the license allows it but i dont want to tread on anyones toes

tulip pecan
slim ferry
#

you need to loop over G.hand.highlighted im pretty sure

#

or well

#

get the cards that would score with G.FUNCS.get_poker_hand_info(G.hand.highlighted)

#

i forget which return is the scoring hand

frosty rampart
#

yea context.scoring_hand doesn't exist in context.press_play

red flower
spiral mural
#

how do i see what a created joker is going to be so i can force-key it to another joker if its in the food pool...

wintry solar
vast bough
median veldt
#

trying to make it not work if youre using it from the consumable slot since you could in theory accidentally use it on itself and it just would do nothing

i could make it so you have to select at least one other consumables if youre using it from the consumable slot, but i don't know how to raise the selection limit in that slot

red flower
median veldt
red flower
#

i was just editing it lol .config.max_highlighted yes

card.area == G.consumeables

median veldt
#

hoooold on

red flower
#

sorry

median veldt
#

ah

median veldt
#

ok this is really scuffed, i'll clean it up in a second, but is this the general idea?

#

been a minute since i did this i'm rusty as hell sorry lol

red flower
#

you shouldnt change the limit in can_use probably

median veldt
#

hm

#

what do u reckon i do then

#

maybe just change it when the mod loads or something

red flower
#

i think a lot of mods just do that out of convenience, you can also use add_to_deck and remove_from_deck

median veldt
#

hmm true

#

lemme test rqrq

sturdy compass
red flower
#

for setting the value?

median veldt
#

well it's not like it's adding to the value

red flower
#

if youre doing it globally i would put it to like 99

#

to not mess other mods

sturdy compass
#

Lets say you do this method and have two of this card. Removing one of them from deck will break the other one because highlight limit would be set back to default

#

I'd say just do a global set to 99

#

or whatever arbitrary big value

median veldt
#

so like change the remove one to 99 or

red flower
#

no in that case you would need to do it at the start of the round

median veldt
#

you lost me sorry

sturdy compass
#

start_run hook I reckon?

median veldt
#

start run blah blah set limit to 2?

sturdy compass
#

Again, probably some arbitrary large number as to not step on the toes of other mods

red flower
#

there shouldbe a system for this

#

i have the same problem in my mod lol

median veldt
red flower
#

but with playing cards in hand which is worse

median veldt
#

or jst
greater than 1/2

#

would that work

red flower
#

you will still run into corner cases

median veldt
#

hm

red flower
#

mods can do wacky stuff i just wouldnt wory

median veldt
#

i guess i'll jsut leave it, kind of sounds like an edge case that i can deal with if someone ends up having issues with it

red flower
#

i think my keyboard is dying

median veldt
#

lmao

red flower
median veldt
#

ok i know what you mean i do NOT remember how to do that

red flower
#

if next(SMODS.find_card("c_modprefix_key")) then

sturdy compass
red flower
#

idk how i would solve it tbh

sturdy compass
red flower
#

what i do in my mod is that all object have a function that returns a number and the highlighted limit is the highest one

#

and it checks in update iirc

median veldt
#

actually maybe i should remove the check from add

sturdy compass
#

The check in add is def moot

median veldt
#

moot?

sturdy compass
#

"having little or no practical relevance"

median veldt
#

ah

umbral zodiac
#

ok Dictionary Boy

median veldt
#

cool

#

LMFAO

sturdy compass
#

smh

umbral zodiac
#

you wanna know whats also a good word

#

Merriam Webster

sturdy compass
#

ur mom

median veldt
#

Moist

umbral zodiac
#

Instant Death

median veldt
#

ah woops til u cant post tenor links

sturdy compass
#

Thunk decision lmao

median veldt
#

lol

dense fulcrum
median veldt
#

need some ideas for some of these

and i have an idea for "convert one joker into a random joker" and it could either be a brand new spell or maybe it could fit into an existing one without an idea?

sturdy compass
#

I like how you made hormones "spells"

red flower
#

we need an estrogen disambiguation page on the modded wiki

sturdy compass
#

genuinely atp 😭

#

There are so many mods that add it

tepid eagle
sturdy compass
#

case and point

tepid eagle
#

it's like a law

#

try not to add estrogen to balatro (impossible challenge)

umbral zodiac
#

i should add subtle transgender references in my new mod even though it is very unfitting to be there

tepid eagle
#

true and real

frosty rampart
umbral zodiac
#

i should add unsubtle references but it still is not extremely fitting

frosty rampart
#

ok but consider: male-presenting dormant joker that realizes she's trans over the course of the upgrade process

median veldt
sturdy compass
#

Impossible in this community I know

#

yet here I stand miyalolto

snow breach
#
for _, hand in ipairs(G.GAME.hands) do
  ...
end

Is immediately expressing a nil value, and I do not understand why I've been at this for like half an hour 😭

red flower
snow breach
#

There is no crash, because ipairs just stops as soon as it hits nil value, problem is that the code inside the block isn't being executed. Lemme get the actual block

red flower
#

ah yeah

#

use pairs

snow breach
#
for _, hand in ipairs(G.GAME.hands) do
    G.GAME.hands[hand].original_l_mult = G.GAME.hands[hand].l_mult
    G.GAME.hands[hand].original_l_chips = G.GAME.hands[hand].l_chips
end
snow breach
#

Because, well, it's a nil value

red flower
#

its not an integer-indexed table

red flower
snow breach
red flower
#

it would just be hand.original_l_chips etc

snow breach
#

oh

#

OHHHH

#

Duh

red flower
#

the key is the _

sage crater
#

is there a way to make sprites that are twice the resolution of normal jokers appear as the same size?

#

I'm making sprites that are 142x190 instead of 71x95

daring fern
#

daring fern
sage crater
#

interesting

sage crater
red flower
#

it sets the pixel size to width 142 and height 190 : )

sage crater
#

I'm surprised it's that easy haha

#

but I'll believe you guys

sage crater
red flower
#

it would make it 3 pixels wide and 4 tall

sage crater
#

ah ok, so this isn't what I'm looking for

sage crater
red flower
#

i believe you can do the inverse and set pixel size to normal with a big atlas

sage crater
#

interesting

red flower
#

i think what the docs imply is that you don't even need to do rhat

#

because the default value is already the normal

#

which i think is true because i remember people making hd jokers without setting that

sage crater
#

I might be looking for display size

red flower
#

that just makes the card smaller

#

hitbox-wise

sage crater
#

ok

red flower
#

i believe it will just work if you make the atlas that size you have

sage crater
#

neato dorito

frosty rampart
#

display_size and pixel_size are for doing stuff like photograph, half joker, etc. where you explicitly want it to not be a regular card
you can also make it bigger than normal, see morefluff's wide and tall jokers

torpid flicker
#

is there a way to do a message that isnt in a return?

#

just a message

#

never mind!

sage crater
#

how do I retrigger scored cards out of order?

#

trying to make this

frosty rampart
#

reference rubber ball in entropy, it's very similar

sage crater
sage crater
frosty rampart
sage crater
#

oh 🤦 that was it. The atlas key was Enhancement singular, not plural

near coral
#

Is the code for legendary overlays in vanilla remade

#

You know how how the legendary (and hologram) faces move separately from the background card

#

That

sage crater
#

yeah

#

it’s called soul iirc

near coral
#

And in the event it doesn't have soul it shares the same movement?

frosty rampart
#

they're entirely separate sprites, and you indicate the front floating one with soul_pos = { x = #, y = # } just like a regular pos

sage crater
#

ah, soul_pos

near coral
#

I forgor what I was gonna say

sage crater
#

happens

near coral
#

I'm guessing hover tilt is the idle movement all the cards have

rapid stag
frosty rampart
near coral
#

Sprite I'm looking for the coder to overlay has an offset window for a downsized rekoj to appear in

#

And while they have done that they don't have separate hover tilts

#

So it just looks like one card with weird shadows

frosty rampart
#

i mean it looks like it's supposed to be trapped under the glass, i like this better than if it had its own separate hover tilt

grizzled tide
#

is there a way to set the frame an animation is currently on?

open aspen
#

how do i edit a vanilla card effect

open aspen
#

ok how in the fuck is this small bit of code causing this

wild patrol
#

You're missing a }

#

Something isn't closed properly

open aspen
#

but im not though

#

ive triple checked now

#

this works (i stole it from saturn to test)

#

if i change voucher to Enhancement, observatory to mult

#

and then just remove the calculate function and replace it with config.mult = 5

#

same cras

#

crash

wild patrol
#

Try adding another} see what happens

#

You have anything else in the .lua

#

Maybe there's another { that isn't closed

open aspen
#

yes

#

but again like

#

its telling me its this line

#

and its at the top

wild patrol
#

Check all { make sure they are closed properly

open aspen
#

doing it like this was apparently the fix

#

no idea why

#

i literally didnt change anything except defining config like this

wild patrol
#

If it works it works what I say

idle plaza
#

Lua itself just isn't built to recognize the format {config.mult = 5} like that. It thinks you're attempting to index a pre-existing table, in this case config, and thinks that kind of statement should only exist outside of a table definition. Doesn't matter if the closing } is five spaces away, or that there isn't already a config table.

open aspen
#

got it

#

good to know

open aspen
#

whats the best way to edit localization of a vanilla card

red flower
tawdry bloom
#

how would i permantly decrease the amount of joker slots when a joker triggers

red flower
#

G.jokers:change_size(-1) or whatever amount

#

for checking triggering on other jokers check context.post_trigger

tawdry bloom
#

YAY thanks

wary abyss
#

what exactly are the parameters to the create_card function (not SMODS.create_card)? for example, Cryptid has

return create_card("Code", G.pack_cards, nil, nil, true, true, nil, "cry_program_2")

but I have no idea what each individual parameter should mean if I want to use this function myself

daring fern
faint yacht
#

function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)

red flower
#

you should just use SMODS.create_card tho

#

it's a wrapper that has the same (and more) functionality

wary abyss
#

okay, I see

red flower
sick gust
#

is there a guide or something to get started on modding?

#

oh missed the modding resources channel ill check it out

sturdy compass
#

This thread is better than anything in the resource channel currently. Only reason it isn’t in there is cuz it was made prior to the channel lol

red flower
#

u hate me..

sturdy compass
#

This is true

fervent rampart
#

Despite using a nice code program to highlight stuff for me, it was only after pasting it into Discord and the formatting broke that I finally saw the duplicated brackets. I never thought I'd be helped by how badly it looks when code gets copy-pasted here. I didn't even have to hit enter to have my issue fixed. I don't actually have anyone to thank, but I'm still thankful for the help.

wary abyss
lusty marten
#

hey, what is the lose sound file name?

daring fern
red flower
past spade
#

changing a joker's sprite with card:set_sprites seems to reset on save and exit, is there a permanent way?

fervent rampart
fervent rampart
#

okay I just re-added those brackets to make the example and oops I used the wrong ones. but it's just for visual ref of the problem that I couldnt tell there were two sets thanks to the formatting

past spade
# daring fern Code?

in a sticker:

apply = function(self, card, val) card.ability[self.key] = val if card.ability[self.key] then card:set_sprites(G.P_CENTERS["j_cod_redacted"])

daring fern
next timber
#

how would i just put a ui element at any given location on the screen? id like to add a progress bar beneath the consumables area

red flower
next timber
#

god i wish we had some sort of live-updating editor for balatro ui so we could actually see what we're doing without having to restart the game or whatever

#

i know debug plus has watch but its not the same

next timber
#

it says how to structure ui

#

but it does not say anything at all about how to make it show up in game or how to put it where you want it

gilded blaze
#

you should start out by looking at functions/UI_definitions.lua in Balatro source code

red flower
#

you would create it when the run is loaded

#

i have this one that starts hidden above jokers for example (thats why offset is -5)

wild patrol
#

going through fixing up some commands

#
    if is_on_cooldown() then return end

    if G.STATE ~= G.STATES.SHOP or not G.shop then return end

    play_sound('coin1', 1.5, 0.7)

    if G.shop_jokers and G.shop_jokers.cards then
        for _, card in ipairs(G.shop_jokers.cards) do
            card.cost = card.cost + 5
        end
    end

    if G.shop_booster and G.shop_booster.cards then
        for _, card in ipairs(G.shop_booster.cards) do
            card.cost = card.cost + 5
        end
    end

    if G.shop_vouchers and G.shop_vouchers.cards then
        for _, card in ipairs(G.shop_vouchers.cards) do
            card.cost = card.cost + 5
        end
    end
end```
#

how can I make this effect perma

next timber
wild patrol
#

it inscrease but after a reroll or a new round prices return

red flower
#

G

#

you can put it anywhere tho

#

this is in a hook to Game:start_run

next timber
#

probably should also hook that then yeah

red flower
#

there's also SMODS.current_mod.custom_card_areas now which might work for you (it just gets called when the run is created its not exclusive for areas)

#

ah but consumables might not exist there.. so yeah the hook is probably better

next timber
#

what does the 'i' in align = 'cmi' do? i understand cm is center middle but the guide doesnt say anything about an i

red flower
#

no idea

#

:3

faint yacht
#
    if self.alignment.type_list.b then
        if self.alignment.type_list.i then
            self.role.offset.y = self.alignment.offset.y + self.role.major.T.h - self.T.h
        else
            self.role.offset.y = self.alignment.offset.y + self.role.major.T.h
        end
    end

    if self.alignment.type_list.r then
        if self.alignment.type_list.i then
            self.role.offset.x = self.alignment.offset.x + self.role.major.T.w - self.T.w
        else
            self.role.offset.x = self.alignment.offset.x + self.role.major.T.w
        end
    end

    if self.alignment.type_list.t then
        if self.alignment.type_list.i then
            self.role.offset.y = self.alignment.offset.y
        else
            self.role.offset.y = self.alignment.offset.y - self.T.h
        end
    end

    if self.alignment.type_list.l then
        if self.alignment.type_list.i then
            self.role.offset.x = self.alignment.offset.x
        else
            self.role.offset.x = self.alignment.offset.x - self.T.w
        end
    end

in Moveable:align_to_major()...

gilded blaze
#

ah, so it's a Moveable thing

next timber
#

im sure this would be very enlightening if i could make any sense of it lol

gilded blaze
#

man, looking it up in engine/ui.lua was a mistake

red flower
#

i think it means it aligns from the center instead of the corner?

faint yacht
#

Assuming so.

next timber
#

ok clearly my code is fucked or missing somethnig but i cannot comprehend what

#

the bar is not showing

red flower
#

everything else looks correct to me but G.consumeables doesnt exist before the function runs afaik

next timber
#

good point

#

ok

#

so

#

i may be

#

a fucking idiot

#

i am not

#

loading. this file

#

let me try again with the file actually fucking loaded this time

wild patrol
#

is there an smod to create a skip tag lol

#
    if is_on_cooldown() then return end
    G.E_MANAGER:add_event(Event({
    func = function(self, tag, context)
        if context.type == 'shop_final_pass' and G.shop and not G.GAME.shop_free then
            G.GAME.shop_free = true
            if context.end_of_round and context.game_over == false and context.main_eval and context.beat_boss and G.GAME.shop_free == true then
            tag:yep('+', G.C.GREEN, function()
                if G.shop_jokers and G.shop_booster then
                    for _, card in pairs(G.shop_jokers.cards) do
                        card.ability.couponed = true
                        card:set_cost()
                    end
                    for _, booster in pairs(G.shop_booster.cards) do
                        booster.ability.couponed = true
                        booster:set_cost()
                    end
                end
                return true
            end)
            tag.triggered = true
            return true
        end
    end
    G.GAME.shop_free = false
    end}))
end```
#

losing my fucking mind trying to get this to work lol

#

trying setup a command that makes the next shop free

#

but I might as well just make it simple and create the skip tag instead lol

daring fern
next timber
#

note to self

#

watch lua does not work very well with ui definitions

#

i get the feeling i should be clearing out the ui between runs but idk how

red flower
#

it its attached to G.consumables it shoul get destroyed im pretty sure

next timber
#

anyways those grey corners are really bugging me time to figureo ut how to remove those

#

oh i see why its there

glacial star
#

modding my first joker was annoying now time to make more and make it even harder lmao

wild patrol
#

i've tried with and without tag_

#

Wait I think I found the issue

#

yup

#

somehow I accidentally borke a line of previous code

#

when scrolling

past spade
#

how do I detect a sticker being viewed in the collection? trying to avoid running SMODS.debuff_card in that case since it crashes the game

next timber
#

why tf is it gray now

daring fern
past spade
#

getting that area is a nil value. tried it with self instead of card too

apply = function(self, card, val) card.ability[self.key] = val if card.ability[self.key] and not card.area.config.collection then

daring fern
wild patrol
#

assets/sounds/BANKRUPT.ogg is the path?

daring fern
wild patrol
#

oh I forgor....

#

there we go

#

also does attention_text support changing the colors text?

daring fern
wild patrol
#

yeah

#

I know backdrop_colour

daring fern
wild patrol
#

tried it didn't work unless it doesn't support certain coloiurs

#

wanted to use the dark_edition color

daring fern
wild patrol
#

oh well

#

i'll make do

#

good enough

next timber
#

ok why tf does it have grey corners i cant figure out what element im meant to be giving no_fill

#

ive even tried giving the progress bar itself no_fill=true

red flower
next timber
#

wow ok yeah that fixed it thx

mystic river
#

so context.after doesn't run after a discard; is there like, an equivalent thing somewhere?

#

i want to set a flag during context.pre_discard and then unset it once the discard is done

dapper sun
#

how would i update the info text on a create_option_cycle?

sturdy compass
#

You’d do that under the options attribute I believe, which taks a table of strings

dapper sun
#

that's the list of options

#

info is the description below the button

sturdy compass
#

Ah I see

snow breach
#

Created when playing a joker that turns all face into stone as well as Pareidolia

sturdy compass
#

You would probably do that thru a callback function then

dapper sun
sturdy compass
#

Try setting the text to a global variable and update that thru the callback. I bet it’s getting reset on subsequent calls on the cycler

slim ferry
snow breach
#

Thank ya

sturdy compass
#

May I see how you’re trying to do it?

dapper sun
sturdy compass
#

I think what’s happening is the values of the cycler are being passed but they’re only references, not the actual info held by the cycler. I’m not sure how but if you could find a way to access the cycler itself in the callback, it’d probably be what you’re looking for

dapper sun
#

yeah

#

i tried putting a func callback in the parent but i couldn't figure out the path to the text

sturdy compass
#

Hmm

next timber
#

is it possible for a progress bar's max to also be defined by a ref_table and ref_value? i would have it just be set to like 1 and have the ref value be value/max but i dont see an easy way of doing that either

red flower
red flower
next timber
#

i do not concern myself with smods pull requests

#

if its not in main smods i do not give a care

red flower
#

you could have said no..

sturdy compass
#

We miss you bepis cryingGIF

next timber
#

so i should patch these in myself and use them as a baseline for a dynamic max

#

yeah i can prolly do that

dapper sun
#

you can't even read it with the shader on lol

primal robin
sturdy compass
next timber
#

maybe im not setting the ease correctly? idk rn its just set to 'linear' just to see if that would work

lyric wadi
#

do main_end work with multiple boxes

#

like does main_end attach itself to the lowest box or the first box

slim ferry
#

it attached to the end of the first box

#

iirc

lyric wadi
#

aw

#

is there a way around that

#

or am i better off defining custom infoqueues

#

and if so how do i do that

slim ferry
#

custom infoqueues is just putting a description in any existing category under an arbitrary key in a localization file

lyric wadi
#

:0

slim ferry
#

and then do info_queue[#info_queue+1] = { set = <category>, key = <key>, vars = {...} }

#

i think

red flower
#

if you want the info queue to have ui in it then you would need to make a dummy center

lyric wadi
#

i dont think im ready for that yet

#

just a normal infoqueue is fine i think

glacial star
#

if i were to make mutliple jokers in one mod (for example: Failures just has the custom joker json and main lua file, assets folder) how can i branch out to multiple jokers without breaking it

daring fern
glacial star
#

oh so its like a checklist

#

noted.

#

thank you

past spade
#

is there a way to hide the rarity and mod badge of a joker?

clear ocean
#

what do you think of this placeholder joker art

daring fern
wheat cloak
#

Hi! I made a deckskin steammodded mod for personal use based off the code for the Bocchi the Rock! Deckskin (specifically the hearts one). Decided I wanted to post it on Nexus, so I’m trying to redo the code to match the steammodded template made by Wilsonthewolf. But I’m a little confused about the icon_lc.png and icon_hc.png in both the 1x and 2x folders? Where are these images displayed in game? Do I need to edit my sprites/make new ones? Definitely more of an artist than a modder, so I’m having trouble understanding from the code. I tried to find other mods built off the example but I could only find mods with lc and hc pngs, no icons. This is the first time I’m dipping my toes into modding so sorry if I’m being stupid, ik I did this super backwards and should’ve just used the template from the get-go lol :’D

https://github.com/Steamodded/examples/tree/master/Mods/DeckSkinTemplate

GitHub

Steamodded example mods. Contribute to Steamodded/examples development by creating an account on GitHub.

red flower
#

i think?

wheat cloak
red flower
#

no its not optional lol

#

its for the deck menu

wheat cloak
#

Ohhh alright, thank u ! sorry i didnt see that 😭 /gen

red flower
#

hmm looking at the code it seems like it is optional

#

although the documentation says otherwise

next timber
#

how would i make a dynatext that reads "Media: (G.GAME.hexg_media)/(G.GAME.hexg_max_media)" that can update live?

red flower
#

(or have all the text in G.GAME too so it's just one object)

next timber
#

is there a way to have the dynatext get its text from a function so i can just define a function that returns the required text

red flower
#

i dont think so

slim ferry
fervent rampart
#

is "Xchips" a valid word?
like Xchips = card.ability.extra.xchips
Because I really thought it would be that easy, but it's not triggering.

fervent rampart
fading rivet
daring fern
white hull
#

why aren't my blinds animating?

-- Blind atlas
SMODS.Atlas {
    key = "blinds",
    path = "blinds.png",
    atlas_table = "ANIMATION_ATLAS",
    px = 34,
    py = 34
}
next timber
#

you havent defined it as an animation atlas

#

oh no you have im dumb

slim ferry
#

missing frames parameter for atlas

white hull
#

ahh

#

yeah it works now :)

wintry solar
#

uses the vanilla implementation

next timber
#

eh ive already added in the patch to make them ease and it works fine, and i dont need much more modification to make the max dynamic

#

if it works it works

#

ok yeah like 5 minutes of work just fixed the max issue

#

lol

lyric wadi
#

if i want an infoqueue to look like the description of a tarot card do i need to put it in the tarot category

#

and also how do i call custom infoqueue? am i calling the key wrong

granite jay
#

Anyone know how to disable the play and discard buttons, plus the ability to manually rearrange cards?

daring fern
clear ocean
#

media offline jumpscare

glacial star
#

oh damn those are some crispy edges

#

how do you smooth them out like that, my joker is sharper than a philips razor

clear ocean
#

??? i just use the background of madness inverted vertically with monospace text

glacial star
past spade
#

debuff effect results in some funky layering

#

can stickers be rendered on top of the debuff effect?

wild escarp
#

How would I go about making an animated joker with an animated floating sprite?

frosty rampart
#

the latest version of smods makes this very simple, you can just make each sprite use an animated atlas

#

each frame for one animation should be set up as an individual sprite, all in a single row

wild escarp
#

Ah, very nice!

wintry solar
#

I should look at making that not require them to be on a single row

long sun
#

i've not changed anything about Phanta

frosty rampart
#

image too big i think? how big is PhantaMiscAnims5.png?

umbral zodiac
#

every time i see this it just goes away on its own after a restart

long sun
#

it's weird because the image changes each time

frosty rampart
#

yea if the image and timing is changing you probably just have too much other stuff in RAM at the moment

long sun
#

sob???

#

i might have to disable some things then 😭

#

this computer apparently isn't built for balatro

#

well, either that, or it's the new mod i'm making 😭

#

maybe i'm like, taking up way too much memory

#

it's possible, though i really don't know how it would be

#

hmm no, this is now happening without that mod enabled

lyric wadi
#

Dependencies : [Steamodded >=1.0.3, Amulet >1.0.2, >=64GB VRAM]

faint yacht
# long sun

I had that one or two times... usually re-saving the PNG would fix it.

red flower
long sun
long sun
#

wait that might be the wrong number

#

hold on

#

could be this one

#

whatevs

faint yacht
#

-# ...integrated graphics?

long sun
#

ya

#

integrated

faint yacht
#

Oh no.

long sun
#

i'm running on an old laptop ^^;

#

all my stuff is on this one

faint yacht
#

...yeah, I feel like you are running into the actual VRAM limits. mr_bones

long sun
#

😭 noooooooo

#

it's weird, it worked fine before

#

alright phanta's disabled then 😭

sturdy compass
#

Ghost what in the hell did you DO 😭😭😭😭😭

shell timber
faint yacht
#

Consider rebooting laptop and trying again-

long sun
#

yeah i guess i should reboot then

#

i haven't done that in like. a while

#

a month maybe

sage crater
#

what are the keys for the enhancements?

long sun
#

hey at least i got my animation thing working!

faint yacht
#

...you did not at least shut down your laptop for a whole month?!

long sun
#

i have it on hibernate ^^

#

it saves a long boot

faint yacht
#

HDD?

long sun
#

yep

faint yacht
#

I am sorry. mr_bones

long sun
#

😭

hardy viper
#

disc go spinny

winter flower
faint yacht
#

You best be backing up your stuff every now and then...

long sun
#

gah i really should

faint yacht
#

-# ...and for your own sake, try to get at least a ~256GB SSD or something in the laptop...

long sun
#

at least i use github

faint yacht
#

-# I know prices are high, but 128GB feels a bit small for current times.

long sun
#

-# fair enough

past spade
#

this does not apply any previous stakes, is something more needed?
applied_stakes = { "gold" },

long sun
faint yacht
long sun
#

alright i'm gonna restart my computer

#

for some strange reason, i'm suspecting malware

long sun
#

but i might just be caffeinated and paranoid

long sun
faint yacht
#

At least restart daily... or once a week. mr_bones

long sun
#

alright! restarting.

sage crater
#

finally learned how to take ownership lol

#

how do I add a new one of these tabs?

red flower
sage crater
#

hell yeah

past spade
#

can you change/remove the texture on the soul layer of a card? set_sprites seems to only change the background layer

past spade
#

apply = function(self, card, val) card.ability[self.key] = val if card.ability[self.key] then card:set_sprites(G.P_CENTERS["j_cod_redacted"]) elseif not card.ability[self.key] then card:set_sprites(nil) end end,

#

still has soul layer

sage crater
sage crater
# red flower wdym

in vanilla, there’s enhancements, seals, and editions. I want to add one more

red flower
#

you can extend SMODS.Center (like enhancements and editions) or SMODS.GameObject (like seals and stickers)

frosty rampart
#

you can also just extend SMODS.Sticker, which is probably easier in the short term but requires you to handle some jank in the collection
(paperback does that with their paperclips)

white hull
#

Where's the code that draws cards when opening a booster?

#

I can't seem to find where it shuffles the deck for that

wintry solar
#

extending stickers would also likely break when I make stickers not shit to work with

white hull
#

merci

red flower
#

and it shuffles at end of round iirc

frosty rampart
white hull
#

I see

wintry solar
#

there are plans for a SMODS.CardModifier down the line

frosty rampart
#

good to know

sage crater
#

I'll probably use center, since it'll be something similar to enhancements

true jasper
#

How would I make a tag that makes a spectral card show up in shop since there doesnt seem to be a way to do consumables since store_joker_create is the one thing that exists for creating cards in shop

sage crater
#

why are none of these available on smods wiki 😭

red flower
#

theyre outdated and nobody should need to define a center directly

#

it was replaced by API Documentation iirc

tulip pecan
#

I'm trying to destroy a certain card in my hand using SMODS.destroy_cards() during context.end_of_round, and it destroys the card, but no animation is played and its not obvious that it gets destroyed. Should I Juice the card, or is there a way to add an animation to it?

sturdy compass
tulip pecan
#

the idea is that the joker "eats" the lowest card in hand at the end of the round, like how raised fist chooses its target

red flower
#

remove the event

#

destroy_cards already has one

long sun
#

curious, should mods usually have licences?

#

if so, which?

red flower
#

if you use smods your mod must be gpl3 compatible

long sun
#

ah kay, so the GPL3 licence then

white hull
#

How can I check if a card has a debuff from a specific source? Matador currently triggers on cards debuffed by stuff from my mod and I wanna prevent that

red flower
#

also its against the rules to post it here without a license

fading rivet
#

is there a function that outputs the numerical value of a card, making a distinction between faces, or will I need to make that myself

long sun
#

oh ^^;;;;;;

#

okay i'll go back through and licence the others

#

you can assume they're the same until then

fading rivet
# red flower :get_id ?

it seems to be random
I played a hand with a 9, 8, 7, 6, and 5 and somehow got 13 as an id

red flower
#

its not

fading rivet
#

index
previous ID
current ID

red flower
#

2 through 10 is 2-10, J is 11, Q is 12, K is 13, A is 14

red flower
fading rivet
#
if context.modify_scoring_hand and not context.blueprint then
            local p_rank = 999999999 --- if your card exceeds this value what are you doing
            local good_hand = true
            for index, value in ipairs(context.full_hand) do
                    print("index check")
                    print(index)
                    print(p_rank)
                    print(value:get_id())
                if not (p_rank >= value:get_id() or (p_rank ~= 14 and value:get_id() == 14)) then
                    good_hand = false
                    break
                end
                p_rank = value:get_id()
            end
            card.ability.immutable.do_scoring = good_hand
        end
tulip pecan
fading rivet
#

wait actually this is wrong
the code from the ss has the print checks in the if statement

red flower
fading rivet
#

it was 9, 8, 7, 6, and 5

#

there was no king held in hand either, nor 2

#

lemme do it again with the updated code

red flower
#

with delay(secs)

fading rivet
#

wtf it crashed

#

attempt to call get_id, nil value

red flower
#

code?

fading rivet
#

same as above

tulip pecan
fading rivet
#

only difference between the two times was the print statements being in the if

fading rivet
#
if context.modify_scoring_hand and not context.blueprint then
            local p_rank = 999999999 --- if your card exceeds this value what are you doing
            local good_hand = true
            for index, value in ipairs(context.full_hand) do
                if not (p_rank >= value:get_id() or (p_rank ~= 14 and value:get_id() == 14)) then
                    print("index check")
                    print(index)
                    print(p_rank)
                    print(value:get_id())
                    good_hand = false
                    break
                end
                p_rank = value:get_id()
            end
            card.ability.immutable.do_scoring = good_hand
        end
red flower
#

can i see the crash log

fading rivet
#

okay so it actually prints correctly this time

#
Oops! The game crashed:
main.lua:2313: [SMODS foo "main.lua"]:356: attempt to call method 'get_id' (a nil value)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-1224a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.9.0
Platform: Windows
Steamodded Mods:
    1: Foo54 Mod by Foo54 [ID: foo, Version: 1.0.0]
    2: Card Sleeves by Larswijn [ID: CardSleeves, Priority: -10, Version: 1.8.0, Uses Lovely]
    3: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg, lord.ruby [ID: Talisman, Version: 2.7, Uses Lovely]
    4: Vocaloid Deck by nolo33lp [ID: vocaloiddeck]
    5: Handy by SleepyG11 [ID: Handy, Version: 1.5.1o, Uses Lovely]
    6: Cartomancer by stupxd aka stupid [ID: cartomancer, Priority: 69, Version: 4.17c, Uses Lovely]
Lovely Mods:

Stack Traceback
===============
(3) global C function 'error'
(4) Lua field 'update' at file 'main.lua:2313'
Local variables:
 dt = number: 0.0260962
 success = boolean: false
 msg = string: "[SMODS foo \"main.lua\"]:356: attempt to call method 'get_id' (a nil value)"
(5) Lua function '?' at file 'main.lua:944' (best guess)
(6) global C function 'xpcall'
(7) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '?' (defined at line 915 of chunk main.lua)
 inerror = boolean: true
 deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
 earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
red flower
#

why is it so small

fading rivet
#

no clue

fading rivet
#

oooooh

#

nvm it works

#

errors from a different context

#

ah found the issue

#

I forgot to reset my config between hands

sage crater
daring fern
fading rivet
#

this works fine since it stores at the start of playing the hand and clears after the hand

daring fern
#

You should put it directly in card

fading rivet
#

oh okay

#

why should I?

daring fern
# fading rivet why should I?

Because if something tries to copy_table that card.ability the game will crash without a crash log or it will crash with a stack overflow

fading rivet
#

ah

#

welp time to rework the mesmerizer sticker

#

yippee it works

white hull
#

If I redefine a vanilla localization entry, do I have to copy the whole thing or just the parts I edit?

daring fern
white hull
#

merci

primal robin
#

@wintry solar may I ask, why CardArea does not call self:handle_card_limit() on init?

#

Because of this, if you change CardArea's limit via old methods (.config.card_limit =) but before CardArea:update(), slots will break

#

Specifically, I encountered a bug in scenario where creating G.consumeables and then changing card limit via Crystal Ball given by Magic Deck in a same frame will set consumable slots to 1 instead of 3

#

Calling self:handle_card_limit() after cardarea is setted up removed this weird behaviour

long sun
#

wondering, what kinds of animation can SMODS do?

primal robin
#

none of them

#

but this doesnt mean that card limit should not work properly on first frame

wintry solar
#

there is no reason it doesn't call it

primal robin
#

I see

wintry solar
#

are you doing some weird patch stuff to achieve this?

primal robin
#

No, accidentally was discovered by one dude, was achieved with very high game speed values when starting a run on Magic Deck

#

Or, when animation skip was used which basically makes all events non-blocking, i.e. all of them happened instantly

#

As result, creating G.consumeables and applying voucher happens on same update loop and desync happens

wintry solar
#

I see

next timber
#

incredibly basic question but how do you make a consumable show a message when it's used

next timber
#

nvm remembered attention_text exists

ancient zenith
#

@red flower and the only way i can think about doing it (injecting some code that'd flag the joker into the function).. wouldn't work until the joker called the function to begin with 😭 which woudlnt work for my purposes

red flower
#

yeah that's what i meant

#

it's not possible I'm afraid

ancient zenith
#

💔 i understand

#

for clarity, i'm working with a joker that acts as 2 copies of the last sold joker-- this does not work at all for blueprint, assumedly because the initial joker itself calls SMODS.blueprint_effect

#

weirdly enough it does work with brainstorm which i thought was a blueprint-like

red flower
#

they both work the same way so it's probably an issue with blueprint getting the joker

#

brainstorm gets a fixed position

ancient zenith
#

would you like to take a look at the calculate cod°?

red flower
#

yeah no problem

ancient zenith
#
calculate = function(self, card, context)
    local can_copy = function (c)
        return c.label ~= card.label and c.config.center.blueprint_compat
    end

    if context.check_eternal and not context.blueprint then
        local can_shake = false

        if G.jokers.highlighted then
           local selected_card = G.jokers.highlighted[1]
            can_shake = selected_card and can_copy(selected_card)
        end

        if can_shake then card:juice_up(0.25, 0.25) end
    end

    if context.selling_card and can_copy(context.card) then
        G.GAME.j_o_y_last_sold_joker = context.card
    end

    if G.GAME.j_o_y_last_sold_joker then
        local joker = context.blueprint and context.blueprint_copiers_stack[1] or card
        local ret = SMODS.blueprint_effect(joker, G.j_o_y_last_sold_joker, context)
        local ret2 = SMODS.blueprint_effect(joker, G.j_o_y_last_sold_joker, context)

        if ret then
            return SMODS.merge_effects{ ret, ret2 }
        end
    end
end
#

the entirety of it is not really necessary but here it is anyway

red flower
#

yeah if a joker is sold it can't find itself in the joker slots to see what it has on its right

#

this is an issue with any joker that wants to find its position rather than just a bp issue

ancient zenith
#

ahhhhh

#

that makes sense

#

is the card thats being sold still in the player's jokers when the context is true

red flower
#

im not sure but im guessing not if that's what happens

ancient zenith
#

i see

ancient zenith
# red flower it is

i'll see if calling blueprint_effect on the joker in the selling context and storing the result can work

#

it may cause a problem if say, the blueprint card is positioned to the left of the joker that's doing it but

#

better than nothing

#

ty again !!

near coral
#

To do a joker that halves probabilities do you just gotta edit oops' code to double the denominator instead of the numerator or is it not that simple

red flower
near coral
ancient zenith
#

it doesnt work 😔

unique oak
#

Does anybody have a good starting point for making my own card skins?

red flower
unique oak
#

I'm aiming to make face cards look like some of my favorite MTG cards

glass scaffold
#

How do I check if a consumable has been sold in a remove_from_deck function?

frosty rampart
#

you don't
instead, use context.selling_self in the consumable's calculate function

glass scaffold
frosty rampart
#

there's no specific context for the card being destroyed, but you can use context.joker_type_destroyed (it triggers on all non-playing cards, not just jokers) and check if context.card == card

granite jay
#

Is there a function to apply a random sticker on a joker?

reef belfry
#

what do i put in loc_vars again to have the text color change based on a variable

tulip pecan
#

I have a joker that converts all Kings and Jacks into queens, but it doesn't trigger properly with Splash, presumably because it checks for hand type compatibility using G.FUNCS.get_poker_hand_info(). How would I make this compatible without specifically adding a check for if the player has splash?

clear ocean
gilded blaze
#

absolutely love random moments like this
I can't unsee it

#

mod.process.loc_text

clear ocean
#

she hit the loc

#

with the current mod jeans

red flower
#

oh wait no it should work fine

reef belfry
#

is there possibly ANYTHING wrong with this that im too stupid to spot

red flower
tulip pecan
#

I'm fine with changing the code however much to get it to work as long as I can still do it within context.press_play

red flower
#

yeah the problem is that splash evaluates later

#

you would need to copy what G.FUNCS.evaluate_play does

red flower
#

but also just do an if for the colour lol

reef belfry
#

im too stupid for this

tulip pecan
# red flower yeah the problem is that splash evaluates later

the reason I'm doing it within context.press_play is so that the poker hand can update after the cards are converted (I.E. Queen Jack Jack turns into Queen Queen Queen and considers it a 3oak. Should I just add a check if the player has splash then?

red flower
#

like this

reef belfry
#

do suitless cards return nil when checking for .base.suit?

red flower
#

no it returns the base suit

reef belfry
#

is there a way to check where its either only 2 suits instead of all?

red flower
#

two specific ones by doing is_suit
any two you would probably need to check every suit with is_suit

unique oak
#

Disregard I am stupid

subtle hawk
#

Coding in an art program sounds like a concept for someone's coding channel video

grizzled tide
#

is there a way to call the calculate function of a different joker

#

is it just card:calculate(card, context) or would it be something else

umbral zodiac
#

note that it will assume it has all the values and stuff of the other joker

#

it also probably doesnt work on vanilla jokers

grizzled tide
#

is there a way to do that with vanilla jokers 😭

umbral zodiac
#

noootttt reallyyyyy

#

you probably can but it seems like itd be really annoying to do

dapper sun
#

how do i get whether an achievement is unlocked

grizzled tide
snow breach
#

What's the prefix for stickers in reference to G.P_CENTERS

frosty rampart
#

stickers aren't centers and do not exist in G.P_CENTERS
SMODS.Stickers is the table you're looking for i think

snow breach
#

Thank you

sage crater
#

how do you get the value of chips needed to win the blind?

snow breach
sturdy compass
#

Might as well drop this here too. I ran a print under the conditional and it did print btw. I have a very, very similar method that works perfectly fine on a joker, but for the numerator instead

sage crater
#
calculate = function(self, card, context)
        local isFaces = true
        if context.individual and context.cardarea == G.play and not context.other_card:is_face() then
            isFaces = false
        end
        if context.joker_main and isFaces then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end
``` why is this not working?
still hedge
sage crater
#

lmao

#

thank you, Bombler

still hedge
#

👍

umbral zodiac
umbral zodiac
sage crater
#

that's good

umbral zodiac
#

it means that your local variable will always be true because there is no context.individual before context.joker_main to set it to false

sage crater
#

wait, are you saying it gives up on one if the other is true?

#

ohhh

sage crater
#

bro's a tier 1 ragebaiter

sage crater
still hedge
sage crater
sage crater
umbral zodiac
sage crater
#

that's the one

umbral zodiac
#

what's the effect in mind here?

sage crater
#

thank ya kindly

#

good question lmao. I'm positive this is not the best way of doing it.

but this is what I'm going for

#

so it's checking if any of the cards are not face cards, and not returning the xmult if 1+ cards are not faces

#

supposed to be*

umbral zodiac
#

then what i think you should do is in context.joker_main simply check if all cards in scoring hand hand (which you can find with context.scoring_hand) are face cards, and then return if that's true

sage crater
#

is context.scoring_hand a list?

#

can I just do context.scoring_hand[1] to get the first card that's getting scored

#

@umbral zodiac ^ sorry for the ping

still hedge
#

bones

true jasper
sage crater
#

the wiki says this contains a table of the cards that score but idk if that's a list, or if I have to access it a different way

sage crater
shell timber
#

try looking at vanillaremade, hanging chad does this

sage crater
#

baller

#

thank ya kindly

daring fern
#

dapper sun
#

how do i get a joker's name?

daring fern
dapper sun
#

ty

#

tho i specifically want a joker card's name, and ik that loc_vars can change the key

#

nvmd i got it

red flower
red flower
granite jay
dapper sun
#

no

#

toml would be a patch

#

they said hook

#

you should be good

granite jay
#

It didn't work

#

hold on i made some quick changes that i wanna test

#

yeah nah

#

Patch it is then

dapper sun
#

_ _

#

your problem is that you're returning true/false?????

#

why're you doing that

#

what

slim ferry
#

They remove the button and change the colour of the UIelement

granite jay
#

oh right

slim ferry
#

Look at what they do in vanilla

dapper sun
granite jay
#

Brain ain't working today

#

Aaaaaand this does not work at all

daring fern
granite jay
#

thx

#

Why does this crash my game?