#💻・modding-dev

1 messages · Page 159 of 1

maiden phoenix
#

Oh yea I forgot G.consumeables:remove(card) also exists, try using that

tall wharf
#

uhm

#

i just called start dissolve on those cards

woeful tundra
#

I know you can dissolve it, just a lot more involved, then you gotta ease money, destroy the card and send the message, and I found that trying to do it that way, it plays the messages in a weird time

crisp coral
#

start_dissolve calls remove

#

bruv

maiden phoenix
#

Don't forget after G.E_MANAGER events

coral cobalt
#

Seeing all this im really not looking forward to making my own mod ;-;

crisp coral
woeful tundra
#

its really not that bad, im making it sound like a bigger deal than it is 😛

coral cobalt
#

I plan to do some complicated stuff tho like custom face cards and what not

maiden phoenix
coral cobalt
#

Cant wait to make the art for em

maiden phoenix
#

is it a LT moment?

crisp coral
#

LT?

maiden phoenix
#

LocalThunk

coral cobalt
crisp coral
#

because dissolve has the dissolve animation, then removes

#

remove straight up removes it

coral cobalt
#

If not it will stay my evil secret mod

maiden phoenix
#

They didn't specify if they wanted the card to dissolve or not so 🤷

crisp coral
#

bruh

woeful tundra
#

in my mind destroy = dissolve, is there a bigger difference?

coral cobalt
#

Here me out

crisp coral
#

the difference is the animation

#

that's it

coral cobalt
#

We make the card explode instead and make a custom animation

maiden phoenix
#

If you don't use start_dissolve it just pops out of existence

coral cobalt
#

Thatd be way cooler fr fr

tall wharf
#

green screen explosion

coral cobalt
#

It would go hard

#

Or like

#

The stupid green screen car crash into helicopter falling into plane explosion

#

That ones always a banger

maiden phoenix
#

start_car_crash balatrojoker

coral cobalt
#

start_epic_car_helicopter_plane_crash *

woeful tundra
#

the message plays after the card is dissolved, and the money is added at the exact moment the consumable is dissolved, so it makes it difficult to tell where the money came from lol

coral cobalt
#

I think that seems fine

wintry solar
#

Send the destruction in a function through func = function

woeful tundra
#
                    card:start_dissolve()
                end``` like this?
#
                card.ability.extra.remaining = card.ability.extra.remaining - 1
                card_eval_status_text(card, "extra", nil, nil, nil, {
                    message = "Depleted!"
                })
                ease_dollars(1)
                func = function()
                    card:start_dissolve()
                end
            end``` is the entire thing with the context check
wintry solar
#

Probably needs to be in an event inside the function too

coral cobalt
#

Its all just

#

Mush

#

Like my brain

crisp coral
#

sleep

woeful tundra
#

are you familiar with LUA?

wintry solar
#

Wait no where’s the return table gone

woeful tundra
#

you cant use that for consumables I thought, I tried a bunch of things with that and it wouldnt dissolve/destroy the consumable

wintry solar
#

Yeah you can

#

Just remove is only valid in very specific contexts

coral cobalt
# crisp coral sleep

Ive tried a few times, i lost my apartment so the stress probably keeping me up rn

#

Not even 2 melatonin knocked me out o.o

#

Ill hit a wall eventually tho so im not worried

crisp coral
coral cobalt
#

Hopefully when i move back home ill have a bit more freetime so i can start working out again, and work on a balatro mod

#

Ik this mod idea is a hit

woeful tundra
coral cobalt
#

Either way ik ill enjoy it

wintry solar
#

It wouldn’t be relevant to consumables which is why you need the function

raw geyser
#

I'm having a weird problem. Trying to space two strings on a button, and with a Row/Column setup the text keeps shrinking:

long sun
#

how do you add chips and mult, when scoring a joker?

raw geyser
wintry swallow
long sun
#

none of the vanilla jokers add chips and mult when being scored

#

Walkie Talkie's method didn't work

wintry solar
#

The joker adds the chips and mult yea?

raw geyser
# wintry swallow maybe your padding is too big?

Scholar is the easiest one. Here's his bit of code:

if self.ability.name == 'Scholar' and
    context.other_card:get_id() == 14 then
        return {
            chips = self.ability.extra.chips,
            mult = self.ability.extra.mult,
            card = self
        }
    end
#

That's inside function Card:calculate_joker(context)

wintry solar
#
if context.joker_main then
  return {
    chips = X,
    mult = Y
  }
end```
woeful tundra
#

I got my thing working... it feels janky, but looks great lol

#

ignore the -2 dollars when I play a hand, its part of the custom deck im using to test things easier, if I dont play a straight, I lose 2 dollars peepoGiggle

raw geyser
#

Anyone got any ideas why scale is changing randomly?

wintry solar
#

Not without seeing any code

raw geyser
#

Haven't touched the UI.ua code besides looing into a debug print. Here's the UI table:

n = G.UIT.R,
config = { id = 'enter_shop_button', align = "cm", colour = shop_color, minh = 0.6, minw = 2.7, outline = 1, outline_colour = darken(shop_color,0.3),
   padding = 0.07, r = 0.1, shadow = true, hover = true, one_press = true, func = 'can_enter_shop', button = 'enter_shop', maxw = 2.7 },
nodes = {
   {
      n = G.UIT.C,
      config = { align = "cm", minw = 1.3, minh = 0.5, outline = 1, outline_colour = G.C.L_BLACK },
      nodes = {
         { n = G.UIT.T, config = { text = open_text, scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true, minh = 0.5, outline = 1, outline_colour = G.C.L_BLACK } }
   }},
   { n = G.UIT.C, config = { colour = G.C.UI.TEXT_DARK, outline = 1, outline_colour = G.C.L_BLACK } },
   {
      n = G.UIT.C,
      config = { align = "cm", minw = 1.3, minh = 0.5, outline = 1, outline_colour = G.C.L_BLACK },
      nodes = {
         { n = G.UIT.T, config = { text = cost_text, scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true, minh = 0.5, outline = 1, outline_colour = G.C.L_BLACK } }
   }},
}
#

The text keeps getting smaller, XD

woeful tundra
#

Ignore the -2 dollars when I play a hand, its part of the custom deck im using to test things easier, if I dont play a straight, I lose 2 dollars peepoGiggle

I think this works nicely calculate = function(self, card, context) if context.before and card.ability.extra.remaining > 0 then card.ability.extra.remaining = card.ability.extra.remaining - 1 return{ dollars = 1, focus = card, card = card, } end if context.end_of_round and context.individual and card.ability.extra.remaining == 0 and card.ability.extra.destroyed == false then card.ability.extra.destroyed = true SMODS.eval_this(card, {message="Depleted!"}) card:start_dissolve() end end

wintry solar
#

Don’t use eval this

#

Use calculate effect instead

woeful tundra
#
                    message = "Depleted!"
                })``` this instead?
#

I dont need it to calculate at all though, just needs to display the message

zealous glen
#

Thank you 😭

sudden meadow
#

i saw that and i was like

#

thats gotta be in the vanilla game

#

it matches so well

zealous glen
zealous glen
woeful tundra
#

I guess my question is, whats the difference in the 2 functions?

raw geyser
#

Think I found the infinite shrink recursion. If the container is having to be shrunk, it'll keep getting the shrink applied every update frame.

woeful tundra
#

where did you call the shrink to happen?

raw geyser
#

I didn't. It's in the basic shrink ui code

woeful tundra
#

ahh

raw geyser
#

if v.config and v.config.scale then v.config.scale = v.config.scale*fac end

#

It'll keep applying that everytime fac isn't 1.0, and it's set based on maxw or maxh

#

AH! If you set your minh/minw too high and it's too large for the parent container, it'll keep trying to shrink the child container, and it'll only shrink the contents of the child

wild patrol
#

so I wanna try adding this card to the yuigioh card mod

#

is it possible to lower the game blind limit

#

in middle of a match?

#

was gonna do something where u could discard a card to lower the blind by like 100 or something

vital rapids
#

I think so yeah

wild patrol
#

damn scammers don't even try anymore

#

atleast spell steam right in ur dogshit urls

violet void
wild patrol
#

i'm guess I need to do something with math.floor?

#

ok

#

is the you number how much to subtract or

violet void
#

it assigns a new value

wild patrol
#

ok

#

Guess i'll look and see how the big blind boss does it's colculation

#

and see if I can fiddle with that to

#

I need something based on how manay discards u do

#

Or do you think it would be better for deleting a joker card for 1000 offf a blind

#

🤔

analog pilot
#

if you’re going to take an amount off of the blind, do it multiplicatively

faint yacht
#

I have a Joker that reduces the Blind requirement per score of a card.

wild patrol
#

You think should go with the original design of destiny board

#

or use the censored final message

long sun
#

will try _mod

#

working slightly better, but not really.

#

it adds 2 mult and shows a red blank message

#

code:

calculate = function(self, card, context)
    if context.joker_main then
        return {
            chips_mod = card.ability.extra.chips,
            mult_mod = card.ability.extra.mult,
        }
    end
  end```
maiden phoenix
#

Which steamodded version are you dev'ing on?

long sun
#

checking

#

1.0.0~ALPHA-1230d-STEAMODDED

#

i'm guessing there's been an update?

maiden phoenix
#

Yea 😅

long sun
#

hokai ^^

#

now it's not displaying any message at all

random sleet
#

because you havent told it to

#

_mod are silent versions

long sun
#

aha, two seconds

#

bingo. thanks :D

#

(i changed the _mods to chips and mult)

wild patrol
#

what would be the script for a joker to trigger something on the end of round

#

when u win

long sun
#

if context.end_of_round and not context.individual and not context.repetition then

wild patrol
#

do I need to add a return

#

or just put a end at the end of the function?

long sun
#

what does your joker do?

wild patrol
#

just adds a card to the joker slot

long sun
#

so its ability is +1 Joker slot?

wild patrol
#

It's adding a custom joker card

long sun
#

ohh i see

#

if you want a message to be displayed, then you should follow the procedure for returning a message

#

if you want it to be silent, no need iirc

wild patrol
#

ok

lucid sun
#

anyone know of a mod that has a joker that makes a hand score as a different type of hand. for example a pair is actually scored as a 3oak.
tryna figure it out but am failing so would like to look at someones working code for it

wild patrol
# long sun ohh i see
        if context.end_of_round and not context.individual and not context.repetition then
            SMODS.add_card { set = 'Joker', key_append = 'Spirit_E' }
            card:start_materialize()
    end
})```
#

should I use calculation

maiden phoenix
#

(you forgot context in your param)

foggy carbon
#

perfect. I can write code in such a way that which variable is affected, is itself a variable. Making my plans compatible with other mods.

violet void
#

Does anyone know why my game gets really laggy when I tab out? The only thing I added is custom sprite for undiscovered cards with lovely patches

#

After testing a bit, this patch seems to be the issue

# Set Alignment undiscovered soul sprite
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''
local shared_sprite = (self.ability.set == 'Edition' or self.ability.set == 'Joker') and G.shared_undiscovered_joker or G.shared_undiscovered_tarot
'''
position = "after"
payload = '''
if self.config.center.set == 'Alignment' then
    shared_sprite = Sprite(0, 0, self.T.w, self.T.h, G.ASSET_ATLAS[self.config.center.atlas or self.config.center.set],
    (self.config.center.undisc_soul_pos))
end
'''
match_indent = true```

thoughts?
#

-# and no its not debugplus' performance logging thing

wild patrol
maiden phoenix
#

calculate = function(self, card, context)

wild patrol
#

oh

#

SMODS.add_card { set = 'Joker', key_append = 'Spirit_E' } created a radom card?

#

instead of the card I had set

maiden phoenix
#

Yes

wild patrol
#

?

maiden phoenix
#

If you want a specific joker you need to add a key field

wild patrol
#

SMODS.add_card { set = 'Joker', key = 'Spirit_E' }

#

also is there away to set this to do it only once?

#

or some ducktape work around to make it not do it again for another 9999999 rounds

cursive glade
#

Having some trouble with SMODS.add_card()
What are the proper arguments to use with it? I keep getting an error attempt to index local 'area' [a nil value], either 'area' or 'center' throws that error. i have no idea what i'm doing

SMODS.add_card{key = "j_prefix_myjoker"}
maiden phoenix
#

It can guess the area trough its set

stray wing
#

does taking ownership of jokers affect how they spawn for a given seed? I'm trying to modify the text of a joker that appears in the ante 2 shop for a given seed (greedy joker), but whenever I do that using take_ownership a different joker spawns, and if I take ownership of that one instead, I get greedy joker

maiden phoenix
cursive glade
# maiden phoenix add `set = 'Joker'`

The add_card lines I'm using:

        local slotmaster_card = SMODS.add_card({
            set = "Joker",
            key = "slotmaster",
            legendary = false,
            rarity = 3,
            skip_materialize = true,
            soulable = true,
        })

The errors I'm getting:

(3) Lua global 'create_card' at file 'functions/common_events.lua:2213'
        Local variables:
         _type = string: "Joker"
         area = nil
         legendary = boolean: false
         _rarity = number: 3
         skip_materialize = boolean: true
         soulable = boolean: true
         forced_key = string: "slotmaster"
         key_append = nil
         area = nil
         center = nil
         (*temporary) = table: 0x08ead728  {j_mime:table: 0x08eb36e0, j_sdm_magic_hands:table: 0x08d81300, j_ring_master:table: 0x08ec3e48 (more...)}
         (*temporary) = number: 15
         (*temporary) = table: 0x08819590  {handle:function: 0x087ee168, __index:table: 0x08819590, init:function: 0x0881a3f8 (more...)}
         (*temporary) = table: 0x08819590  {handle:function: 0x087ee168, __index:table: 0x08819590, init:function: 0x0881a3f8 (more...)}
         (*temporary) = boolean: true
         (*temporary) = table: 0x08a0d700  {ref_table:table: 0x088f9c80, blockable:false, trigger:ease, func:function: 0x08f2f660 (more...)}
         (*temporary) = number: 14.2582
         (*temporary) = string: "TOTAL"
         (*temporary) = string: "contrast"
         (*temporary) = table: 0x08819590  {handle:function: 0x087ee168, __index:table: 0x08819590, init:function: 0x0881a3f8 (more...)}
         (*temporary) = boolean: true
         (*temporary) = table: 0x08c15288  {ref_table:table: 0x088f9db0, blockable:false, trigger:ease, func:function: 0x090bde18 (more...)}
         (*temporary) = number: 14.2582
         (*temporary) = string: "attempt to index local 'center' (a nil value)"
maiden phoenix
#

should be like j_modprefix_jokerkey

cursive glade
#

alright. let me dig around. I don't know if I set my prefix properly or what's going on.

        local slotmaster_card = SMODS.add_card({
            set = "Joker",
            key = "j_dexp_slotmaster",
            legendary = false,
            rarity = 3,
            skip_materialize = true,
            soulable = true,
        })
maiden phoenix
#

Did you make a header/metadata json file in your mod?

cursive glade
#

yeah, but the joker definition doesn't have a prefix config'd

wild patrol
#

here's the reason why need it to activate once lol

maiden phoenix
#

Ooh you could check if next(SMODS.find_card('j_modprefix_jokerkey')) is true and if not create the card then, it's easier this way

maiden phoenix
#

If say, "E" is sold, would "D" be able to recreate a "E" or not?

wild patrol
#

I haven't gotten that far yet

maiden phoenix
#

Ah ok

wild patrol
#

if u sell it'll just destroy all the rest created

#

is probably gonna be the goal

topaz sun
#

Is there a way to conditionally load a lovely patch if a specified mod is present?

maiden phoenix
tepid crow
#

using next(SMODS.find_mod("mod")) then*

frosty dock
#

next(SMODS.find_mod("mod"))

cursive glade
maiden phoenix
#

I don't know how old add_card is, I've just been using it recently in new calc

hardy viper
frosty dock
#

add_card wasn't changed in new calc iirc

frosty dock
cursive glade
#

then I must be doing something wrong, still... hmm

hardy viper
#

cool

cursive glade
#

Here's my full add_card code:

        local find_slotmaster = SMODS.find_card('j_dexp_slotmaster')
        if find_slotmaster then
            print("[DEBUG] Found Slotmaster!")
            local slotmaster_card = SMODS.add_card({
                set = "Joker",
                key = "j_dexp_slotmaster",
                legendary = false,
                rarity = 3,
                skip_materialize = true,
                soulable = true,
            })
        else
            print("[DEBUG] Couldn't find slotmaster")
        end

it prints the "Found Slotmaster", so it's definitely "j_dexp_slotmaster" key, so I'm not sure what's throwing the attempt to index local 'area' [a nil value] error

runic pecan
#

So I wanted to access a glass card's xmult like the Hiker joker but...
(See the screenshot from game.lua)
Does this mean that instead of
context.other_card.ability.extra.Xmult = context.other_card.ability.extra.Xmult + card.ability.extra.card_Xmult_mod
I'll need to use
context.other_card.ability.Xmult = context.other_card.ability.Xmult + card.ability.extra.card_Xmult_mod ?

stray wing
#

does take_ownership change the key of a joker?

hardy viper
#

only if you explicitly change the key yourself

frosty dock
#

yes that's a thunkism

stray wing
#

trying to change some text on a base game joker but it seems to stop it appearing where it should

wild patrol
#

or do I have it backwards

#

or wold I have to use a elseif

maiden phoenix
#

Your card will add E for sure and then if it finds E (which it will) it will add A

#

Not sure thats what you're trying to go for

#

Btw the next(SMODS.find_card('j_tcgyugi_Spirit_E')) bit needs to be an if check

wild patrol
#

Nutshell if previous card exists don't create that one create the next one

#

looking at the code that checks for if the exodia cards exists

#

SMODS.find_card('j_tcgyugi_Spirit_E') = 0 then

#

would it be something like this?

frosty dock
#

something ate my #

#

now it's correct

wild patrol
# frosty dock either `if not next(SMODS.find_card('...')) then` or `if #SMODS.find_card('...')...
        if context.end_of_round and not context.individual and not context.repetition then
            #SMODS.find_card('j_tcgyugi_Spirit_E') == 0 then
            SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_E' }
            return
        elseif
            #SMODS.find_card('j_tcgyugi_Spirit_A') == 0 then
            SMODS.add_card { set = 'Joker', key == 'j_tcgyugi_Spirit_A' }
            return
        elseif
            #SMODS.find_card('j_tcgyugi_Spirit_T') == 0 then
            SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_T' }
            return 
        elseif
            #SMODS.find_card('j_tcgyugi_Spirit_H') == 0 then
            SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_H' }
            return 
        end
    end```
#

so would this work

#

or should I remove the returns

timid star
#

would anyone know how to display the current mult just like the Stone Joker would for jokers like these (live updating every time your deck updates)

tepid crow
wild patrol
wild patrol
tepid crow
#

people are trying to help you out but it doesn't seem like you understand what they're telling you

wild patrol
violet void
cursive glade
opaque tendon
#

Guys, any help on how to count the cards in the deck and keep track? i want to make a joker work based on how many card of each suit i have. for example to give xmult if i have more hearts in my deck, etc

wild patrol
#

@frosty dock thx it worked

#
        if context.end_of_round and not context.individual and not context.repetition then
            if #SMODS.find_card('j_tcgyugi_Spirit_E') == 0 then
            SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_E' }
        elseif
            #SMODS.find_card('j_tcgyugi_Spirit_A') == 0 then
            SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_A' }
        elseif
            #SMODS.find_card('j_tcgyugi_Spirit_T') == 0 then
            SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_T' } 
        elseif
            #SMODS.find_card('j_tcgyugi_Spirit_H') == 0 then
            SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_H' } 
            end
        end
    end```
#

ducktape and glue works everytime

merry raven
#

EATH

wild patrol
#

Just need to add in the insta win code from the exodia one and it's basically done

#

which is just basically a copy paste job

#

btw what's the code again to detect if there is not enough room for joker slots lol

#

this is just broken lol

wooden nexus
violet void
tepid crow
# wild patrol doesn't help when ur being condescending and going "just learn it" <:4head:89184...

Yeah sorry, that wasn't very nice of me.

I've just seen this before where people come in with questions and others respond with helpful answers but because they're not familiar with Lua as a language or programming as a whole they don't know how to apply the knowledge they've been given.

I recommend taking a look at e.g.

wild patrol
#

It's good dude

#

I've been in a lot of modding groups and the attitude of just learn it doesn't really help ppl

#

It scares ppl off because they think coding is diffcult in scary when it really isn't it's like putting a puzzle together sometimes ppl just don't see the piece that's missing

frosty dock
wild patrol
frosty dock
#

lol I'd make that shorter for sure if it were my code

wild patrol
#

It's fine it's just a meme mod anyways

#

doubtful this will be the next cryptic mod everyone plays

frosty dock
#

mostly that's just me hating boilerplate code

wild patrol
#

it'll just be a nother haha funni then they delete it mod

frosty dock
#

so eh

cursive glade
#

next question, on a joker what context.* do I use to detect when a boss has been defeated?
if context.end_of_round and context.boss then ?

wild patrol
#

wondering if I should change my context to boss instead of round

#

just to nerf the insta win

#

🤔

frosty dock
violet void
crisp coral
#

don't!

frosty dock
#

that looks like you're making extra sprites that aren't being cleaned up

wild patrol
violet void
#

sorry for the ping

wild patrol
#

@frosty dock one last thing what's the line to check for if there's not enough joker slots

crisp coral
wild patrol
#

should probably add that in to

crisp coral
bright moss
#

Is there a way i can change the colors of the suit names in joker descriptions, for example ancient joker, through a texture pack?

frosty dock
tepid crow
wild patrol
frosty dock
crisp coral
#

fuck you!!!!

#

let me not repetition and not individual in peace

frosty dock
#

but you can combine it into the existing if statement with another and

wild patrol
# frosty dock if that's how you write code, sure

i'm just asking becuase lol calculate = function(self, card, context) if context.end_of_round and context.main_eval and G.GAME.blind.boss then if #G.jokers.cards + (G.GAME.joker_buffer or 0) >= G.jokers.config.card_limit then if #SMODS.find_card('j_tcgyugi_Spirit_E') == 0 then SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_E' } elseif #SMODS.find_card('j_tcgyugi_Spirit_A') == 0 then SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_A' } elseif #SMODS.find_card('j_tcgyugi_Spirit_T') == 0 then SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_T' } elseif #SMODS.find_card('j_tcgyugi_Spirit_H') == 0 then SMODS.add_card { set = 'Joker', key = 'j_tcgyugi_Spirit_H' } end end end

wild patrol
#

so I can just do something like if context.end_of_round and context.main_eval and G.GAME.blind.boss and #G.jokers.cards + (G.GAME.joker_buffer or 0) >= G.jokers.config.card_limit then

tepid crow
#

yeah

wild patrol
#

dancin3 running low on glue but ducktape is king

frosty dock
#

meh

#

if you wanna get to being able to make things by yourself, learning it proper is usually better for that

wild patrol
frosty dock
#

fair

wild patrol
#

gotten a little better at troubleshooting

#

with error codes

icy cobalt
#

Hola not sure if this is the right spot but I'm wondering if anyone can gauge the balance on this for me

stray wing
#

I don't think it seems broken but I also am not sure if it seems useful either

frosty dock
#

hm

frosty dock
#

you'll never get a lot of mult out of it

#

but the extra discards are a good tool

#

it's fairly situational, which makes for a good rare

lavish folio
frosty dock
#

I'd consider increasing the mult probably

stray wing
frosty dock
#

I mean HtR is 0.5 for a single card

#

I feel like that's more reasonable of a value for a rare

icy cobalt
#

I did think that initially, but it does also offer the refunded discard but not sure how much that's worth Xmult-wise

crisp coral
#

this scales slightly slower than Yorick

#

let that sink in

lavish folio
#

i would almost go .75 like the glass joker if you dont refund the discard. the checkered deck is about the only deck that could really abuse this but it makes for an ambitious deck building goal like Flower Pot and Drivers License

frosty dock
tepid crow
#

and this also resets at end of round

crisp coral
#

oh resets

#

then it's dogshit at X0.2 LMAO

icy cobalt
#

LOL

#

Where would you put it then?

woeful tundra
#

.5x

cursive glade
#

It'll print "A BLIND WAS SKIPPED" but not "A BOSS WAS DEFEATED". I don't think that context is detecting the boss blind defeat.

    calculate = function(self, card, context)
        if context.end_of_round and context.main_eval and G.GAME.blind.boss then
            print("[INFO] A BOSS WAS DEFEATED!")
        elseif context.skip_blind then
            print("[INFO] A BLIND WAS SKIPPED!")
        else
            -- print("[INFO] Waiting...")
        end
    end
crisp coral
#

X0.5 with refund or X0.75 without refund

crisp coral
woeful tundra
#

The end of the day if you discard 5 flushes to get 2.5x that’s 25 cards out of your deck, potentially 16 if you have the 4 finger joker

crisp coral
#

oh wait refund the discard

lavish folio
#

also it should be "contains a flush" because what if you accidentally discard a straight flush or flush house or thats your build

cursive glade
#

I want it to trigger differently when a Small or Big is skipped than when a boss is defeated. it's a high risk high reward kind of joker.

crisp coral
#

i read that as discarded cards go back to hand

woeful tundra
#

No. So you are still limited to how many cards you have in your deck

stray wing
icy cobalt
wild patrol
#

game doesn't crash

frosty dock
#

you need to invert the check of course

wild patrol
#

oh lol

frosty dock
#

this only works when your slots are full

wild patrol
#

so I got it backwards

frosty dock
#

change >= to <

wild patrol
#

LOL

stray wing
# stray wing does take_ownership change the key of a joker?

Have been messing around with this for a while and can't figure it out. What I want is to be able to modify the text on a base joker and have it show up in the shop as it would have done unmodified. When I set a seed, the expected joker does not show up if I have used take_ownership.

Essentially, I'd like to be able to guarantee that a number of modified jokers turn up in shop 1, shop 2, etc. I'm using a set seed so I know which should show up, but it deviates from the expected sequence when I take ownership, even if I don't do any changes to them. Any ideas on how I could achieve this?

storm kraken
wild patrol
#

not even sure it it was the <=

frosty dock
#

🤔

cursive glade
wild patrol
#

i'm gonna dig into the vanilla game

frosty dock
#

what smods version?

wild patrol
#

i'm on the alpha

#

1315b

cursive glade
#

i'm using whatever the latest -old-calc is

wild patrol
#

unless there's been a big update

frosty dock
cursive glade
#

ah, makes sense

frosty dock
wild patrol
#

ok

#

i'll update real quick

frosty dock
#

yeah in fact you're one version off from when I added main_eval

#

imagine not developing on latest 💀

wild patrol
#

That means my lazy ass has to update

frosty dock
#

just learn git (updating is just typing two words in terminal)

wild patrol
#

I know but still too lazy

cursive glade
#

I read this and thought -old-calc would be the way to go, but apparently not

frosty dock
night pagoda
#

why using git when you have github desktop (press one button instead of typing two words)

frosty dock
#

Also I should remove that note

cursive glade
#

makes sense. I'll update and try again.

frosty dock
#

if you haven't updated your mod to new calc yet, tbh fuck you

#

it's been 4 weeks

cursive glade
#

i just started modding
ugh

frosty dock
#

I meant other mod devs for mods that already existed

#

you're not at fault

cursive glade
#

bah. it's early enough in the dev of my deck/joker mod that it wont be painful to switch

storm kraken
#

um how would i go about changing the hand selection size
like how many playing cards you can select

tall wharf
#

ok so i am trying to port my mod to new calc

frosty dock
frosty dock
tall wharf
#

oh riught

frosty dock
#

it has two return values now

tall wharf
#

oh

wild patrol
#

yup that was it

#

updated my smod and it worked

#

everything functions

#

well bed time

storm kraken
slender island
#

can i make joker changing music?

storm kraken
frosty dock
#

right that's a thing that exists

storm kraken
#

fuck i pressed enter too early

cursive glade
frosty dock
#

return next(...) and 100 or nil

stray wing
frosty dock
frosty dock
#

taking ownership shouldn't change the order

lavish folio
#

is there a joker template? ie - what font is used, what is the aspect ratio size of joker cards?

frosty dock
#

the size is 71x95 including a 1px border on each side

#

I think the font is somewhere in the modding forum, idr where

lavish folio
#

theres a modding forum?

#

👀

frosty dock
#

discord loves to hide some of these channels

storm kraken
frosty dock
#

yeah there's not an "official" font for the joker text but I'm pretty sure someone made one

stray wing
crisp coral
crisp coral
#

thank you

stray wing
#

also, if I take ownership of every joker in order, but greedy is first instead of 2nd, that shop will spawn Joker instead

crisp coral
#

(i use 20

#

god damnit)

frosty dock
#

lmao

#

I think I used 10 last time though

frosty dock
crisp coral
#

ah no, i use FIVE for boss themes

#

god damnit aureeeee

#

1.8e308 it is

storm kraken
wild patrol
#

Is it possible to get a video file like an ogv or avi to play within balatro

#

I got an idea I wanna try out

maiden phoenix
violet void
#

Is this the correct way to get the atlas?

It keeps crashing

frosty dock
storm kraken
wild patrol
#

Can u link it

#

I gotta see it

frosty dock
#

uh I don't think they published it

wild patrol
#

It's fine I just want to see it lol

frosty dock
#

I have the code for playing the video somewhere though

wild patrol
#

I was gonna add to the instant win condition cards

#

Where just plays a video file of the cards winning animation from a gane

#

Try to send it back to main menu

#

After the video is over

frosty dock
#
function create_UIBox_custom_video()
  local episode = pseudorandom('familyguy', 1, 7)
  local file_path = SMODS.Mods["Buddy"].path..("/resources/episode%s.ogv"):format(episode)
  local file = NFS.read(file_path)
  love.filesystem.write("temp.ogv", file)
  local video_file = love.graphics.newVideo('temp.ogv')
  local vid_sprite = Sprite(0,0,11*16/9,11,G.ASSET_ATLAS["ui_"..(G.SETTINGS.colourblind_option and 2 or 1)], {x=0, y=0})
  video_file:getSource():setVolume(G.SETTINGS.SOUND.volume*G.SETTINGS.SOUND.game_sounds_volume/(100*100))
  vid_sprite.video = video_file
  video_file:play()

  local t = create_UIBox_generic_options({ back_delay = ({73,whatever})[episode], back_label = localize('b_skip'), colour = G.C.BLACK, padding = 0, contents = {
    {n=G.UIT.O, config={object = vid_sprite}},
  }})
  return t
end
wintry solar
#

Even debugging peoples code where they’ve based it off cryptid is a pain, it’s written so unintuitively imo

storm kraken
#

im gonna die from all of this code searching 😭

wild patrol
#

You've not seen my coding then

frosty dock
#

yes the whatever is a placeholder

storm kraken
#

has anybody else ever made something related to playing more than 5 cards

wintry solar
#

The wordle mod does

storm kraken
#

well funny thing idk what thats called

maiden phoenix
#

You mean Aikoyori's Shenanigans?

crisp coral
#

it's G.FUNCS.can_play

wintry solar
#

I don’t know what it’s called either 😂

maiden phoenix
stray wing
storm kraken
frosty dock
#

blind person playing balatro?

maiden phoenix
#

is that a Black Hole mod reference??

crisp coral
#

yea i use black hole to play bal

#

fuck you you stole my joke

violet void
storm kraken
#

nevermind it didnt work goddamit

maiden phoenix
crisp coral
#

vrej

storm kraken
#

fuck you blind person

maiden phoenix
#

Wow

frosty dock
#

should I unmake black hole

#

you're not worthy of playing

crisp coral
#

wowwwww

frosty dock
#

jk

maiden phoenix
#

Make black hole mod but for people who can see

crisp coral
#

white hole

#

real

frosty dock
#

white hole lmao

wintry solar
#

Only after we add the alt f4 quick restart keybind

crisp coral
#

just nil the draw function

#

now you're also visually impaired jimball_roll

frosty dock
#

that's how I test black hole

crisp coral
#

fr

maiden phoenix
#

lol

frosty dock
#

actually I just turn my monitor off smh

maiden phoenix
#

Why don't you just stab your own eyes?

frosty dock
#

because I don't hate myself that much

crisp coral
#

mf playin inscryption

storm kraken
frosty dock
#

100#

crisp coral
#

100#

maiden phoenix
#

I'm choking stop

storm kraken
#

def not me reaching to the wrong side of my keyboard

frosty dock
#

imagine having to reach for any keys

storm kraken
#

sob

maiden phoenix
#

I'm just typing with brooms from my bed smh it's easy

storm kraken
#

anyways please guys i need mental health help

frosty dock
#

then go to #mental-health-help
-# what do you mean that doesn't exist
-# okay okay go ahead

storm kraken
maiden phoenix
#

No more SMODS...

timid parrot
storm kraken
crisp coral
#

oh right i just pulled up code from uhhh

#

9 months ago

storm kraken
#

😭

crisp coral
storm kraken
#

gets exploded

violet void
#

I tried with and without but it keeps crashing

crisp coral
#

okay you can stop pinging me now

storm kraken
#

ok

violet void
old bane
#

what color is the random chance text (i.e. the 1 in 2 chance text for jokers)?

crisp coral
#

green

timid parrot
timid parrot
#

Ok good

wintry solar
#

Why can’t you use the standard undiscovered sprite in smods?

violet void
wintry solar
#

That’s what SMODS.UndiscoveredSprite is for

violet void
#

the floating question mark is also placed incorrectly so I have to replace it

violet void
wintry solar
#

How so?

violet void
#

because the check for undiscoveredSprite is placed inside an if that checks for specific centers

violet void
#

im stuck there ç-ç

wintry solar
#

Looks like it allows any centers to me?

violet void
#

it does?

wintry solar
#

From what I can see on mobile yeah

violet void
#

It goes to the default one

old bane
crisp coral
#

...green

violet void
wintry solar
#

That is a custom sprite…?

violet void
#

its not :l

wintry solar
#

You mean the question mark?

violet void
#

yes

wintry solar
#

That’s not what the undiscovered sprite is

violet void
#

not even no_overlay?

wintry solar
#

You can turn it off by setting no_overlay = true, I don’t think there’s functionality for a custom one right now

runic pecan
#

What expression should I put in there?

violet void
wintry solar
#

What is this code trying to do?

violet void
#

which one

#

mine or riv's

wintry solar
#

The one you linked

runic pecan
#

Revive the shattered glass cards, even though not the case

violet void
wintry solar
#

The question mark?

violet void
#

the floating question mark yes

wintry solar
#

I can just patch smods later today to let you control it easier if you prefer?

tall wharf
tall wharf
#

oh

violet void
#

how are you planning to do that

tall wharf
#

i think i do card instead?

wintry solar
#

It’s just be a property on the undiscovered sprite,

crisp coral
#

sometimes other_card is nil and idk why

#

just add a nil check

wintry solar
#

There’ll be other contexts that have individual = true`

#

Actually maybe not

#

Why is other card nil? 🤔

tall wharf
#

why is the card null

violet void
# wintry solar It’s just be a property on the undiscovered sprite,
# Set Alignment undiscovered sprite
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''
                elseif self.config.center.consumeable and self.config.center.demo then 
                    self.children.center = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS["Tarot"], G.c_locked.pos)
'''
position = "after"
payload = '''
elseif not self.params.bypass_discovery_center and _center.set == 'Alignment' and not _center.discovered then 
    self.children.center = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS[_center.atlas or _center.set], 
    (_center.set == 'Alignment' and _center.undisc_pos))
'''
match_indent = true```

For the undiscovered sprite I've used this lovely patch, since in the dump code the sprite is only set after it checks for specific centers

Same goes for undiscovered description

lmk if I got it wrong
proper stratus
#

hey fellas

#

can i get some help with texture stuff

#

why is it so blurry?

tall wharf
#

WHAT THE FUCK

proper stratus
#

this is what its supposed to look like

#

(i know it darkens in the game)

#

((im just talkjing about how not crisp the texture is))

tall wharf
#

is this 1x

#

or 2x

#

looks like your 2x export is very blurry

proper stratus
#

oh

#

maybe

#

i used a website to upscale it

nocturne garnet
#

Joker reskin as this would go hard ngl

proper stratus
sturdy compass
crisp coral
#

i require... balancing assistance. this generates a bit much planet cards

violet void
#

flower pot treatment

tall wharf
#

no but srsly why is other_card null

crisp coral
dusk shoal
#

does anyone know how to use has_enhancement? im trying to count how many wild cards are in the deck like stone or steel

proper stratus
tall wharf
#

@frosty dock mr smods why is the other card null sometimes

maiden river
#

how do I add my own rules text right here?

crisp coral
maiden river
#

I've been trying for a bit now

crisp coral
#

and BORING

violet void
#

altho im not sure what youre going to do with eternal rental spectral cards, isnt that a downside?

crisp coral
#

chat do they know

violet void
#

no lol

crisp coral
#

everything in lobcorp has a downside lol

violet void
#

I see no upsides in that card tho

#

are you supposed to get it while eternal so your consumable area is doomed

crisp coral
#

you can use eternal consumables

#

they just can't be sold

#

vanilla quirk

violet void
#

ah ok understandable

coral cobalt
#

I slept a bit :^)

crisp coral
#

welcome back

coral cobalt
#

Hai myst, i see your still busy

crisp coral
#

im in bed

#

lol

coral cobalt
#

Oh chat its over

#

I have a lot of stuff to do today but as soon as im done im gonna start working on my epic chess themed mod

old bane
#

yippee!

#

also how would I change jimbo to have another sprite/be another Joker? cause I have a Joker in my mod that's going to be pretty similar to Jimbo's ability and I don't want him appearing all the time in my shops

tall wharf
nocturne estuary
#

how can I check if the flames are showing?

tall wharf
#

if current hand score is more than requirement 😭

coral cobalt
nocturne estuary
nocturne estuary
#

also, would it still work at the end of round?

frosty dock
tall wharf
#

crash yea

#

n

wintry solar
#

It’s because of the event

tall wharf
#

ah right

wintry solar
#

You’ve destroyed the card in the bottom check

#

So by the time the event fires the card has already gone

#

I think

ivory coral
#

hi chat, im trying to make a joker that copies glass cards when they break, im at a bit of a loss though, i've tried looking at Glass joker's code but didnt get anywhere, and here i've just tossed DNA's code into context.glass_shattered which expectedly didnt work, any ideas how to make it work

        if context.glass_shattered then
            G.playing_card = (G.playing_card and G.playing_card + 1) or 1
            local _card = copy_card(context.full_hand[1], nil, nil, G.playing_card)
            _card:add_to_deck()
            G.deck.config.card_limit = G.deck.config.card_limit + 1
            table.insert(G.playing_cards, _card)
            G.hand:emplace(_card)
            _card.states.visible = nil
            G.E_MANAGER:add_event(Event({
                func = function()
                    _card:start_materialize()
                    return true
                end
            })) 
            return {
                message = localize('k_copied_ex'),
                colour = G.C.CHIPS,
                card = self,
                playing_cards_created = {true}
            }
        end
    end```
violet void
#

not even this works sob

I dont think I can even add my atlas with lovely patches since files are loaded with smods ç_ç

-# will be waiting for an update

proper stratus
#

I GOT HERE FIRST

dusk shoal
proper stratus
#

SCREW YOU SKY

dusk shoal
#

couldnt tell you why its mad at me

tall wharf
#

how do i destroy card after the hand finishes scoring

deft fjord
#

hey everyone! sorry for bothering, I am very new in modding stuff but I would really like to learn how to, does anyone know a good tutorial or a way to learn how to mod balatro?

frosty dock
frosty dock
tall wharf
#

so like this?

frosty dock
#

you can ask here if you have any questions

deft fjord
frosty dock
tall wharf
proper stratus
#

guys can you help i need the bowling rail guards why doesnt this work :(

tight thistle
#

i figured out why SMODS.add_card wasnt creating a card... it was, but the card was invisible cause i fucked up the pos, lol

proper stratus
#

@tight thistle nice pfp

dusk shoal
proper stratus
#

that looks so fucking cool

pallid jay
#

How do you access and change variables in the global variables script?
For example if you wanted to change the colour of the small blind or a card suit.

tall wharf
#

guys i am fixing bug

nocturne estuary
#

how would I get the chips and mult after each card and joker is evaluated?

dusk shoal
#

i know that this is definitely possible i just forgot how:

how do i check how much a hand scored?
and what the current blind is?
and how much you currently have to the current blind?

#

basically i wanna check if a played hand beats the blind or not

nocturne estuary
dusk shoal
#

i guess with them

nocturne estuary
#

I'm also trying to find that out

#

I just know how to do it without the joker calculations

dusk shoal
#

what is it?

#

might help

twin basin
#

me and joe are making a joker that gives you money if after all the joker calculations, you get more score than the blind requirement

#

and we know how to check for it, just not how to check after all the calculations

dusk shoal
#

do you know how to check for the blind?

twin basin
#

yeah, this i believe

dusk shoal
#

G.GAME.blind.chips is the amount of the blind then

twin basin
#

yeah

dusk shoal
#

like have you tested it

twin basin
#

it does work, but it triggers before the cards are even scored, probably because its in "if context.joker_main then"

dusk shoal
#

yeah, when it gets to that joker

#

so this code is fine

#

it just has to trigger after the calculations

twin basin
#

thats my problem

#

i dont know how

wintry solar
twin basin
#

like is there another context.something that triggers after the calculations but before context.end_of_round

dusk shoal
#

preferable a context.after_hand or whatever

twin basin
#

yeah

maiden phoenix
#

'context.after' ?

twin basin
cursive glade
#

What do I use to have a joker destroy another random joker currently in play?

maiden phoenix
maiden phoenix
wintry solar
#

if context.after and context.main_eval and hand_chips * mult > G.GAME.blind.chips then should be what you’re looking for

dusk shoal
#

thats how my seal triggers as well

#

but i dont know if this translates 1 to 1

#

also, for the seal, would i put that in calculate?

wintry solar
#

What does the seal do?

twin basin
dusk shoal
wintry solar
#

Wait hang on why did I put end of round, should be context.after 🤣

wintry solar
dusk shoal
#

well preferably the second thing

#

but im willing to settle for the first if possible

proper stratus
#

fellas i need help

#

i just want to check if a card is played but not scored and it wont do the thing 😭

wintry solar
dusk shoal
#

k thanks!!

#

ping me when

tall wharf
wintry solar
tall wharf
proper stratus
#

what?

maiden phoenix
proper stratus
#

right, sounds good

wintry solar
proper stratus
#

i mostly took this from the green seal from cryptid

wintry solar
proper stratus
#

AH

#

THAT

tall wharf
#

why did iset that to null lmao

proper stratus
#

CHECKS OUT

wintry solar
#

But generally, cards that are played and unscored don’t have any calculations thrown at them

proper stratus
#

(how would one do that.............)

#

well i guess i can see how cryptid added that context

#

because that would be incredibly useful to have in our dev

#

we have a buncha stuff with unscoring

wintry solar
#

This is a seal right?

proper stratus
#

yea

wintry solar
#

I’m not sure there’s a clean way to calculate unscored cards

tall wharf
dusk shoal
#

oh yeah, whats the like, exact thing to destroy a card?

#

im guessing its not

hardy viper
#

Card:destroy()

dusk shoal
#

context.destroying_card = card

dusk shoal
#

Card:destroy(card)

#

?

#

its a sigil

#

or

#

seal

#

sorry

hardy viper
#

okay depends

hardy viper
dusk shoal
#

LOL ok

hardy viper
#

technically you can do Card.destroy(card) but card:destroy() is the exact same thing

dusk shoal
#

mhm

#

so would it JUST be that

#

like is there any other things i need to add for a seal ?

hardy viper
#

if you're doing it in a calculation there's a context that checks for that, you just return true when you want the card to be destroyed

dusk shoal
#
            if pseudorandom('overclocked') < G.GAME.probabilities.normal / self.config.odds then
                card:destroy()
            end
        end```
#

this is in calculate

#

im honestly not sure if the IF statement works

#

so im using this to check if it does

hardy viper
#

don't straight up call card:destroy()

dusk shoal
#

i imagined not lol, sorry im new to most of this

hardy viper
#

that just immediately vanishes the card out of existence

dusk shoal
#

i see

hardy viper
#

yeah that's okay

#

if it's in context.after you need to do something a bit more complicated

#

oh wait

#

nvm you can just do card:start_dissolve()

dusk shoal
#

like above card:destroy? or replacing it

proper stratus
hardy viper
dusk shoal
#

kk!

proper stratus
#

is there actually no way to check if a card is unscoring crying

tall wharf
tall wharf
wintry solar
dusk shoal
#

thank you!

proper stratus
#

god damnit

wintry solar
#

wait no hold on

#

fixed

pallid jay
#

why can I not access G.GAME?

#

error says it is nil

dusk shoal
#
            if pseudorandom('overclocked') < G.GAME.probabilities.normal / self.config.odds then
                card:start_dissolve()
            end
        end```
#

didnt break

#

this was in calculate, which may be a problem?

wintry solar
#

oh its destroying, hold on

dusk shoal
#

oh lol?

hardy viper
pallid jay
#

I just have it on the first indent, so I need to wait for the "game" to start before I can change things?

hardy viper
#

yeah

pallid jay
#

is there a way to change the values that the game uses though

hardy viper
#

also indent doesn't matter so im going to assume you mean the outermost scope

hardy viper
#

everything can be changed

pallid jay
hardy viper
#

all colour info is inside G.C somewhere

tall wharf
#

how do i delay this

pallid jay
hardy viper
hardy viper
#

before the line

proper stratus
#

i give up, i have no way how to check if a card is played but not scored

#

@dusk shoal

dusk shoal
#

hi

wintry solar
#

if context.destroying_card and (hand_chips * mult) + G.GAME.chips > G.GAME.blind.chips then and do return { remove = true }

#

@dusk shoal

dusk shoal
#

!

hardy viper
#

unless im misreading?

wintry solar
dusk shoal
#

so like this?

wintry solar
#

looks good

dusk shoal
#

because if so THAANKS !! and that looks good !

#

yay alright i'll test

tall wharf
#

ah ok

pallid jay
wintry solar
#

it's slightly different if its from a joker

dusk shoal
#

wait

#

do i replace return (remove = true) with card.dissolve maybe?

hardy viper
wintry solar
wintry solar
dusk shoal
#

nah i set it to 1/1

#

for testing

#

a 1 in 1 chance

wintry solar
#

🤔

#

let me throw it in a qucik local test

#

what smods version are you on?

pallid jay
dusk shoal
#

i know

#

how ot

#

check that

wintry solar
#

main menu top right

dusk shoal
wintry solar
#

of course, nearly 2 months out of date

dusk shoal
#

wuh woh

#

blame my friend

#

he gave me the link

#

wheres the new one then ?

#

i can probably find it myself but

#

i trust you more than me

dusk shoal
#

ty !

wintry solar
#

this might break some stuff you have atm because you are on old calc, not new calc

dusk shoal
#

so i just delete steammodded-main?

wintry solar
#

yup

dusk shoal
#

alright so

#

the destroying works

#

but now it triggers like 5 times 😭

maiden river
#

made a great challenge

dusk shoal
#
        if not context.repetition_only and context.cardarea == G.play then
            return {
                x_mult = self.config.x_mult,
            }
        end
        if context.destroying_card and (hand_chips * mult) + G.GAME.chips > G.GAME.blind.chips then 
            if pseudorandom('overclocked') < G.GAME.probabilities.normal / self.config.odds then
                return { remove = true }
            end
        end
    end,```
pallid jay
#

for some reason this is not the blind's colour, but the ante's background colour uuh

G.C.BLIND.Small = HEX("50946e")
wintry solar
#

change not context.repetition_only to context.main_scoring

dusk shoal
#

kk!

wintry solar
#

you'll also want to reference this page for all the calculation contexts

GitHub

A Balatro ModLoader. Contribute to Steamodded/smods development by creating an account on GitHub.

dusk shoal
#

ok so its not repeating a bunch but NOW its not destroying 😭

tight thistle
#

question! is there a way for an event to stop its function and ALL subsequent events in the case of an emergency?

#

like a full stop?

wintry solar
#

what did you change?

dusk shoal
#

just context.main_scoring

wintry solar
#

the destruction should still work then

dusk shoal
#

well . it doesnt

#

not sure why

wintry solar
#

did you beat the blind?

dusk shoal
#

nop

wintry solar
#

it onlly works when you beat the blind

#

thats what you said

dusk shoal
#

. no

#

when you DONT beat it

#

😭

#

im guessing i'll just flip the greater than huh

wintry solar
#

@violet void on newest version (1331a) add overlay_pos = {x = 0, y = 0} (uses your undiscovered atlas)

stiff locust
#

how does the game do the random misprint text
it's empty in localization

dusk shoal
#

alright cool destroying works

wintry solar
#

sorry I must have misread

dusk shoal
#

WOOHOO!! overclocked works

pallid jay
#

uuh do I need to make this much code to colour the blinds?
the trance one has 579 lines, and another script aswell

#

I'm assuming this is the actual colouring part

--color injection
function Trance_set_globals(G, dt)
    for k, v in pairs(Trance) do
        if is_color(v) then 
            if is_color(G.C[k]) then ease_colour(G.C[k],v,dt) else G.C[k] = v end
        elseif type(v) == 'table' then
            if not G.C[k] then G.C[k] = {} end
            for _k, _v in pairs(Trance[k]) do
                if is_color(_v) then 
                    if is_color(G.C[k][_k]) then ease_colour(G.C[k][_k],_v,dt) else G.C[k][_k] = _v end
                end
            end
        end
    end
    if Trance.MULT then ease_colour(G.C.UI_MULT,Trance.MULT,dt) end
    if Trance.CHIPS then ease_colour(G.C.UI_CHIPS,Trance.CHIPS,dt) end
    if G.P_BLINDS then
        for k, v in pairs(Trance.BOSSES) do
            if G.P_BLINDS[k] and G.P_BLINDS[k].boss_colour then G.P_BLINDS[k].boss_colour = v end
        end
    end
end```
#

finding the thing to colour with the index of the colour's name from the globals variables but I don't think this is different than how I am currently finding it?

G.C.BLIND.Small
tall wharf
#

what is eff and post in eval_card

pallid jay
#

even though the Trance mod has it listed as such

#

so the "C" is wrong?

placid ledge
#
[SMODS _ "src/utils.lua"]:1203: attempt to index local 'edition' (a nil value)
#

any idea why i'm crashing when playing a hand?

pallid jay
#

Ok I figured it out by looking more at the Trance script. You have to use this directory if you want to colour blinds. Apparently the blind boss colours are not in the globals script, and the small/big blinds are considered bosses.

G.P_BLINDS.bl_hook.boss_colour = HEX("10000e")
G.P_BLINDS.bl_small.boss_colour = HEX("10000e")
normal crest
#

nvm it's just on card.lua

stiff locust
tight thistle
tall wharf
#

can i have an explanation as to what does eval return now

#

eval_card

wintry solar
#

It returns the ret table and the post table

zealous glen
deft fjord
#

am I supposed to write all the code on "main.lua"? I'm sorry I'm just starting to learn how to use everything

zealous glen
deft fjord
stiff locust
# zealous glen how so

i'm trying to do the misprint +mult text thing and ive got it updating every time you hover over the joker but not while you're still hovering on it

#

i want it to update while its still being hovered

zealous glen
#

You shouldn't need to create anything new

#

Just reuse the code for Misprint

stiff locust
#

using the misprint method won't work for my purpose because I need other text in the description

zealous glen
#

which uses a DynaText object

#

It works

stiff locust
#

misprint leaves its entire description blank in localization and i need to put other stuff there

zealous glen
#

It's not what I did for Cow IIRC but it's probably what I'd do nowadays… maybe

stiff locust
#

i just want it to have the misprint text with other text around it

zealous glen
#

That's fine

zealous glen
#

but with a DynaText object somewhere inside

violet void
zealous glen
#

What I did was to add a main_end function to the return of loc_vars

#

Which manually creates the UI

#

so you can have it look like whatever

stiff locust
#

none of this makes any sense to me

zealous glen
#

Here's the relevant code from Lvl. ? Death, @stiff locust:

local misc = NFS.load(SMODS.current_mod.path .. "/misc_functions.lua")()

local _generate_main_end = function(card)
    local main_end = 0
    if not misc.is_in_your_collection(card) then
        local handname, _ = G.FUNCS.get_poker_hand_info(G.hand.highlighted)

        local backwards = false
        for k, v in pairs(G.hand.highlighted) do
            if v.facing == 'back' then
                backwards = true
                break
            end
        end

        local active = false
        if handname and handname ~= 'NULL' then 
            local lvl = (G.GAME.hands and G.GAME.hands[handname] and G.GAME.hands[handname].level) or nil
            active = (not backwards) and (lvl and lvl % card.ability.extra.lvl_mod == 0)
        end

        local colour = (backwards and G.C.FILTER) or (active and G.C.GREEN) or G.C.RED
        local txt = (active and localize('k_active')) or (backwards and "???") or localize('k_vic_inactive')
        main_end = {
                {n=G.UIT.C, config={align = "bm", padding = 0.02}, nodes={
                    {n=G.UIT.C, config={align = "m", colour = colour, r = 0.05, padding = 0.05}, nodes={
                        {n=G.UIT.T, config={text = ' '..txt..' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.3, shadow = true}},
                    }}
                }}
            }
    else
        main_end = nil
    end
    return main_end
end

return {
    …,

    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.Xmult, card.ability.extra.lvl_mod}, main_end = _generate_main_end(card)}
    end,
}
zealous glen
#

the important part is that the function _generate_main_end defines main_end and returns it

#

That's an old implementation so it could probably read better

#

Here's Skyscraper:

#

They're both more complicated since they need to check what cards the player currently has selected

#

Including possibly face-down cards

#

For you, you probably only need to directly return main_end

cedar stream
#

so how would one take ownership of a edition that doesnt have a shader?

zealous glen
#

and main_end should probably be a column with one or more rows, and each row has one or more text and/or DynaText objects

zealous glen
zealous glen
runic sinew
#

Lovely has finally updated

zealous glen
#

That's why the outer column in Lvl. ? Death contains a column with text inside, instead of just text

stiff locust
#

i hate to repeat myself
you're making less sense the more you explain it

zealous glen
#

To do what you want, I reckon the easiest way is to build a main_end manually, which means you need to construct the UI manually

#

This part from Lvl. ? Death, for example

stiff locust
#

the easiest way right now would be to run a function that updates the joker's ui box

zealous glen
#

I think this is easier to read

zealous glen
#

and I think it introduces overhead every frame the game is running

stiff locust
#

overhead

#

that's a fighting game thing

maiden phoenix
#

Try 5L2L'ing it Marie 👍

zealous glen
stiff locust
stiff locust
zealous glen
# zealous glen

So, for example, here you'd replace the inner column node into a row, then have it contain text and/or DynaText nodes

stiff locust
#

why does my card pay rent now

zealous glen
#

You'd be adding a function to the update loop which runs every frame

maiden phoenix
zealous glen
#

that's the cost of running the game

stiff locust
stiff locust
maiden phoenix
zealous glen
stiff locust
zealous glen
#

that's why

stiff locust
#

there's 3 different things here

#

the only code i've understood so far is the code where level ? death checks hand levels

#

and you loading a different lua file

zealous glen
#

again all you probably need is to return main_end; you probably don't need anything else

#

so you just need to write the tables that represent what the UI should look like

tall wharf
#

it's funny how my aikoshenanigans mod is my first balatro mod

stiff locust
#

you say that like it's so easy

zealous glen
#

I think it's easy to mentally visualize what the UI should look like

#

do you have a non-updating example of what the text looks like

stiff locust
#

i do

wintry solar
stiff locust
#
["j_tsun_oil_spill"] = {
                ["name"] = "Oil Spill",
                ["text"] = {
                    "Every {C:attention}played card{} counts in scoring",
                    "{C:attention}Extra scored cards {}give {C:red}+#1#{} Mult",
                    "{}when scored",
                    "{s:0.7}{C:inactive}(Misprint + Splash){}",
                },
            },

the #1# is the text that randomly changes

zealous glen
#

So, you can keep the first line there

#

The rest would go into main_end

#

What you have is a column containing three rows

#

one row for each line of text; the column stacks them vertically

#

the second and third lines have a single text node each

#

the first line has three text nodes and one object node

#

IIRC

#

as in: text, text, object, text

#

First for attention color, then the normal color, then Misprint, then normal color again

stiff locust
#

so it's a new text node for each color?

zealous glen
#

yes

stiff locust
#

okay