#💻・modding-dev

1 messages · Page 656 of 1

red flower
#

do you have talisman

granite jay
#

ye

red flower
granite jay
#

Is that fucking with it?

#

God dammit it's fucking with it isn't it

red flower
#

use amulet

granite jay
stiff locust
#

do context.buying_card and context.moeny_altered not fire at the same time dammit

#

itd be nice to have this effect only proc on purchases and not when you lose money in other ways

wild patrol
#

oh wow adding custom colors was easier than I thought lol

#

Trying to make one that changes 3 different colors in 1 second is a pain lol

dapper sun
#

SMODS.Gradient tho

wild patrol
#

well now the custom color doesn't work for some reason

#
[SMODS _ "src/utils.lua"]:582: bad argument #1 to '(for generator)' (table expected, got string)


Development version of Steamodded detected! If you are not actively developing a mod, please try using the latest release instead.



Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-1407a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.9.0
Platform: Windows
Steamodded Mods:
    1: Twitch Integration by chowder908, JackMacWindows, Mossloth [ID: twitchintegration, Version: 1.0.0]
    2: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.1, Uses Lovely]
    3: SystemClock by Breezebuilder [ID: SystemClock, Priority: 100000, Version: 1.7.1, Uses Lovely]
    4: JokerDisplay by nh6574 [ID: JokerDisplay, Priority: -1000000000, Version: 1.8.8.5]
Lovely Mods:

Stack Traceback
===============
(3) LÖVE function at file 'boot.lua:352' (best guess)
Local variables:
 errhand = Lua function '(LÖVE Function)' (defined at line 605 of chunk [lovely debugplus.console "debugplus/console.lua"])
 handler = Lua function '(LÖVE Function)' (defined at line 605 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) local C function 'next'
(5) Lua field 'shallow_copy' at Steamodded file 'src/utils.lua:582' 
Local variables:
 t = string: "#800080"
 copy = table: 0x059922a8  {}
 (for generator) = C function: next
 (for state) = string: "#800080"
 (for control) = nil
(6) Lua global 'attention_text' at file 'functions/UI_definitions.lua:942'
Local variables:
 args = table: 0x059910e0  {backdrop_colour:table: 0x01463b30, scale:1, major:table: 0x048f1260, colour:#800080, hold:2, text:JACKPOT!}
(7) Lua function '?' at file 'commands.lua:89' (from mod with id twitchintegration) (best guess)
Local variables:
 difference = number: 1000
(8) Lua method 'update' at file 'main.lua:182' (from mod with id twitchintegration)
Local variables:
 self = table: 0x04761968  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x0588fc70, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x05817450 (more...)}
 dt = number: 0.00600012
 line = string: ":chowder9o8!chowder9o8@chowder9o8.tmi.twitch.tv PRIVMSG #chowder9o8 :!jackpot"
 err = nil
 user = string: "chowder9o8"
 msg = string: "!jackpot"
 command = string: "jackpot"
 arg = string: ""
(9) Lua field 'update' at file 'main.lua:1022'
Local variables:
 dt = number: 0.00600012
(10) Lua function '?' at file 'main.lua:961' (best guess)
(11) global C function 'xpcall'
(12) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '?' (defined at line 932 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"])```
#

loc_colour()
G.ARGS.LOC_COLOURS.ttv_purple = '#800080'
using
colour = G.ARGS.LOC_COLOURS.ttv_purple,

wild patrol
#

I really should learn to read

#

it's right in front of me on the wiki

#

I added a second colour to loc_colour()

#

game started crashing

#

removed it

#

now I can't get the game to stop crashing

#

even deleted lovely folder

next timber
#

what function would i use to make a card do something when the run is loaded? if the card is doing a juice_up_until when i go to main menu and then reload the save, it stops juicing up and i would like to fix that

next timber
#

cool thx

wild patrol
#

I guess I just completely broke the mod

#

because I can't fix this error

#

even reverting back a couple versions

#
    if is_on_cooldown() then return end
    if G.STAGE ~= G.STAGES.RUN then return end
    local difference = 1000
    ease_dollars(difference)
    attention_text({ colour = G.ARGS.LOC_COLOURS.ttv_purple, text = 'JACKPOT!', scale = 1, hold = 2, major = G.play, backdrop_colour = G.C.WHITE })
    play_sound('ttv_jackpot', 1, 1)
end```
#
G.ARGS.LOC_COLOURS.ttv_purple = HEX('#800080')```
#

unless I got a typo somewhere

#

this is what it originally was

daring fern
wild patrol
#

I dunno what I did differently

#

but it just worked

wild patrol
#

finally got the logo update

wild patrol
#
version = "1.0.0"
dump_lua = true
priority = 9999999

[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''G.SPLASH_BACK:define_draw_steps({{
    shader = 'splash',
    send = {
        {name = 'time', ref_table = G.SANDBOX, ref_value = 'vort_time'},
        {name = 'vort_speed', val = 0.4},
        {name = 'colour_1', ref_table = G.SANDBOX, ref_value = 'col1'},
        {name = 'colour_2', ref_table = G.SANDBOX, ref_value = 'col2'},
        {name = 'mid_flash', ref_table = G.SANDBOX, ref_value = 'mid_flash'},
        {name = 'vort_offset', val = 0},
}}})'''
position = "at"
payload = '''
    G.SPLASH_BACK:define_draw_steps({{
        shader = 'splash',
        send = {
        {name = 'time', ref_table = G.ARGS.LOC_COLOURS, ref_value = 'vort_time'},
        {name = 'vort_speed', val = 0.4},
        {name = 'colour_1', ref_table = G.ARGS.LOC_COLOURS, ref_value = 'ttv_purple'},
        {name = 'colour_2', ref_table = G.ARGS.LOC_COLOURS, ref_value = 'col2'},
        {name = 'mid_flash', ref_table = G.SANDBOX, ref_value = 'mid_flash'},
        {name = 'vort_offset', val = 0},
        }
    }})
'''
match_indent = true```
#

trying to learn lovely patching

#

I just wanna know if i'm on the right track on doing this right

#

because i can't get any visual difference in-game

fading rivet
#

Is there a way to iterate through all registered jokers after all mods have done their things

#

I wanna automatticly add badges to jokers depending on their pools

red flower
#

just go through G.P_CENTER_POOLS.Joker in any function hook like main menu

although badges are dynamic so it would be better to hook/patch the generate ui function for that

fading rivet
red flower
#

the function does a lot of other things so not override lol

#

search AUT.badges in the code and you should find the part that adds them

wild patrol
#

Fucking finally

upper flax
#

is someone familiar with the ankh mod?

#

im trying to install it but it keeps crashing

#

or do i have to go to another channel for that?

red flower
upper flax
#

thanks

red flower
#

its very old tho so it might just not work with newer stuff

upper flax
#

ohhh thanks

wild patrol
#

left or right

primal robin
#

definitely right

dapper sun
#

what's the difference

wild patrol
#

what I got now

#

was told I should get the right kinda purple without the logo blending into it

primal robin
#

not sure about this one

#

It's way too blue

dapper sun
#

yea this looks too blue

wild patrol
#

too purple too blue

#

or this

torpid flicker
#

the 2nd one it blends in to much

dapper sun
#

what's the table for enhancements?

#

i wanna pseudorandom_element it

red flower
#

G.P_CENTER_POOLS.Enhanced iirc

dapper sun
#

ty

red flower
#

but consider using poll_enhancement instead

wild patrol
#

what about this

dapper sun
torpid flicker
# wild patrol

better but i still prefer the first one. But i think its personal preference

red flower
dapper sun
#

ah true

#

i'll use poll_enhancement then

#

i thought abt it and the in_pool was kinda pointless

red flower
#

you can filter the list first and give the list to poll_enhancement i think

dapper sun
#

in the options argument

red flower
#

yeah

wintry solar
#

soon you'll be able to use SMODS.poll_object and give it your filter function anyway 🤞

wild patrol
#

man i'm rusty at vidja editing

quick scarab
#

I'm having a bug where when you load up a run in progress, if you previously used one of the consumables, the game would softlock like this

#
SMODS.Consumable{
    key = 'clearance',
    set = 'fnaf_item',
    atlas = 'TarotFnaf',
    pos = {x = 0, y = 1},
    cost = 4,
    loc_vars = function(self, info_queue, card)
    end,
    use = function(self, card, area, copier)
    end,
    can_use = function(self, card)
        return next(SMODS.find_card("j_fnaf_diver"))
    end,
    in_pool = function(self, args)
        return next(SMODS.find_card("j_fnaf_diver"))
    end
}
#
SMODS.Joker {
    key = "diver",
    blueprint_compat = false,
    rarity = 1,
    cost = 4,
    atlas = 'Joker',
    pos = { x = 9, y = 2 },
    config = { extra = { levels = 0, maxlevel = 6, chips = 0, mult = 0, xmult = 0, h_size = 0} },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = { key = "fnaf_bug", set = "Other" }
        return { vars = { card.ability.extra.levels, card.ability.extra.maxlevel, card.ability.extra.chips, card.ability.extra.mult, card.ability.extra.xmult, card.ability.extra.h_size} }
    end,
    calculate = function(self, card, context)
        if context.using_consumeable and not context.blueprint and context.consumeable.ability.set == 'fnaf_item'
        and not (card.ability.extra.levels == card.ability.extra.maxlevel) and context.consumeable.config.center.key == 'c_fnaf_clearance' then
            card.ability.extra.levels = card.ability.extra.levels + 1

            card.ability.extra.chips = 100 * card.ability.extra.levels -- 1
            card.ability.extra.h_size = math.max(0, card.ability.extra.levels - 1) -- 2
            card.ability.extra.mult = math.max(0, 5 * (card.ability.extra.levels - 2)) -- 3
            card.ability.extra.xmult = math.max(1, 1 + (0.125 * (card.ability.extra.levels - 3)))  -- 4
            -- 5
            -- 6

            if card.ability.extra.levels >= 2 then
                G.hand:change_size(1)
            end
        end

        if context.joker_main then

            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult,
                xmult = card.ability.extra.xmult,
            }
        end
    end,
    remove_from_deck = function(self, card, from_debuff)
        G.hand:change_size(-card.ability.extra.h_size)
    end
}
#

It's a card where when it's used a joker gets a progression point, where it gets some buffs

dapper sun
#
SMODS.current_mod.calculate = function(self,context)
    for k, v in pairs(ellejokers.calculate) do
        v(context)
    end
end

SMODS.current_mod.reset_game_globals = function(self,run_start)
    print("waow")
    for k, v in pairs(ellejokers.reset_game_globals) do
        print(k)
        v(run_start)
    end
end```anyone know why the `reset_game_globals` isn't working?
#

it's not even doing the first print

#

the calculate one works fine

#

wait

#

i think i need to remove the self

#

nope still not working

#

oh

#

it works when i start the run

#

chat am i have stupid

rapid stag
# wild patrol

what's the compatibility with other mods that change the title screen & vortex colours girldmLurk

#

bump

torpid flicker
daring fern
#

dapper sun
#

what's the function for creating an info_queue uibox?

daring fern
dapper sun
#

ok

#

i've already been patching that func so uhh

#

where in it is the info_queue ui stuff?

#

since i wanna add onto it,,

#

i think i get it now maybe

clear ocean
#

who would be interested in working on a mod

#

like as a group

dapper sun
red flower
dapper sun
#

i do that already

#

i want to add more nodes to the info_queue uibox

red flower
#

ahh

#

G.FUNCS.show_infotip then

dapper sun
#

ty

#

_ _

#

e doesn't seem to contain any of the info_queue data

#

are you sure i should be hooking show_infotip instead of adding onto my existing generate_card_ui patch?

red flower
#

ah sorry it was G.UIDEF.card_h_popup

#

infotip makes the entire layout

primal robin
#

Even I trying to avoid generate_card_ui and other info_queue-related things

#

When your object is not center a lot of shit is happening

red flower
#

i dont avoid it :3

primal robin
#

You have a card to begin with, that's so easy

wild patrol
#

was gonna make it like the pokerman mod

granite jay
wild patrol
#

but I gave up because i was too stupid to learn lua

#

speaking of learning

#
    key = 'ttv_jackpot2',
    colours = {G.C.RED, G.C.RED, G.C.RED, G.C.RED},
    cycle = 0.2,
    interpolation = 'linear'
}```
#

Is this how you do the Gradient?

slim ferry
granite jay
# granite jay Anyone know why this is happening?
SMODS.Joker{
    key = "axonitta",
    config = { extra = {}},
    pos = { x = 2, y = 4 },
    rarity = 2,
    cost = 6,
    blueprint_compat=true,
    eternal_compat=true,
    perishable_compat=true,
    unlocked = true,
    discovered = true,
    atlas = 'grasslanderJoker',

    calculate = function(self,card,context)
        if context.joker_main then
            draw_card(G.play, G.hand)
            return {
                message = localize('gl_axonitta')
            }
        end
    end,
}```
slim ferry
#

swift???

granite jay
#

hence the swift

slim ferry
#

should be lua probably

#

and it should be directly after the triple backticks

#

yea

granite jay
#

anyway

slim ferry
#

anyway plain drawing the card back to hand doesnt work because itll still be included in the remaining hand calculations

granite jay
slim ferry
#

including flipping it and attempting to return it to deck

granite jay
#

Do I need to add an event?

slim ferry
#

i think you need to do it differently entirely

granite jay
#

dammit

slim ferry
#

idk if theres a way but try looking into how really old gold seal worked

red flower
#

just wait for next smods version

slim ferry
#

oh

#

or that

granite jay
#

I do have a working solution which destroys the card and adds a copy of it to hand

#

I'll stick with that for nwo

red flower
#

next version

wild patrol
#

I don't guess you can use an smod.gradiant in colour in attention_text

#

since always crashes with a string error

slim ferry
#

i think you can use it in card_eval_status_text if that also works for your purposes

wild patrol
#

what can u do with card_eval_status_text

#

can't find it on the wiki

slim ferry
#

its whats used to display message returns under cards

#

and such

slim ferry
wild patrol
#

but doesn't cycle through

#

only when I hit the comand over and over again

#

I guess I use trig instead of linear?

vocal helm
#

oh yeah i got the same thing, i think it just takes whatever color it is where the gradient would be at that time

red flower
#

ah yeah attention text copies the color

#

i think

#

so it gets what it is at that moment

wild patrol
#

hmmm

red flower
#

it's the same for card_eval...

wild patrol
#

so no real way to cycle through while it's on screen

#

hmmm

#

Time to google some lua

slim ferry
#

i know edition effects have it cycle while the message is there

#

which is just card_eval_status_text with G.C.DARK_EDITION as the colour afaik

red flower
#

no idea

#

doesn't seem to cycle for me

#

if it did in vanilla then it was my fault :3

slim ferry
#

it DEFINITELY used to do that

red flower
#

it disabling smods was easier i would test

#

but im lazy

wild patrol
#

I just need away to cycle through a couple of colours fast

#

to make the jackpot text look flashy like winning a slot

granite jay
#

Anyone know how to apply a random sticker to a joker?

mystic river
fading rivet
fading rivet
#

oh I was looking in smods thx

errant arrow
#

how would i make something automatically update?
ex: "This joker gets +2x Mult when x or y is in the hand"

errant arrow
#

would that also work for the description?

fading rivet
#
SMODS.Joker{
--- unimportant code
    loc_txt = {
        name = "Candy Cookie Chocolate",
        text = {
            "If played hand contains exactly {C:attention}3{} cards",
            "cards give {X:mult,C:white}x#1#{} mult per {C:attention}food{} joker when scored",
            "Currently gives {X:mult,C:white}x#2#{} mult",
            "{C:inactive}That's right! I remembered something: You won't help me.{}"
        }
    },
    config = {
        extra = {
            scaling = 0.25,
            mult = 0.75,
            base_mult = 0.75
        }
    },
    loc_vars = function(self, local_queue, center)
        return {vars = {center.ability.extra.scaling, center.ability.extra.mult}}
    end,
    update = function(self, card, dt)
        local value = card.ability.extra.base_mult
        pcall(function() 
            for index, joker in ipairs(G.jokers.cards) do
                if safe_get(joker.config.center, "pools", "Food") then
                    value = value + card.ability.extra.scaling
                end
            end
        end)
        card.ability.extra.mult = value
    end,
--- unimportant code
}
#

this automaticly updates the current gives x mult to relfect the number fo food jokers you have

errant arrow
#

i see, thank you!
-# now i just need to remember how to detect when specific jokers are in hand...

dapper sun
#

SMODS.find_card(key) returns a table of jokers of the given type. you can do #SMODS.find_card(key)>0 to check if you have the joker

red flower
errant arrow
#

what i mean is if i have a joker that works when x amount of Jolly Jokers are in hand, it is then updated

wild patrol
#

wiki for smods.gradiant says use update(self, dt) but I can't figure out where to properly place

red flower
#

yes you don't need update

#

you just need loc_vars and calculate

fading rivet
red flower
fading rivet
red flower
#

no

#

just count when you need to score or in loc_vars

fading rivet
red flower
#

you would patch that code and use create_badge to add it

errant arrow
#

-# im still confused, conflicting information gives me a headache...
Would I just use an If statement during the loc_vars function to detect if a specific joker is in hand? or is that an illegal statement?

wintry solar
#

yes you should do that

red flower
#

yeah

fading rivet
idle plaza
red flower
fading rivet
wild patrol
#

is there a mod that someone has done text that changes color on screen

red flower
#

then yeah you would do it there

wild patrol
#

so I can look how they did it

#

I got the Gradient to work just doesn't cycle when text is displayed

red flower
#

doesn't vanilla have the you win with a gradient or am i misremembering

#

or you mean the background?

fading rivet
wild patrol
#

i'll record a video

#

better show than explain

red flower
wild patrol
fading rivet
red flower
fading rivet
red flower
#

not the local ones

#

the local ones have a scope of only the file

#

they can access any globals tho

fading rivet
#

this is what it looks like

red flower
#

just make that a global

fading rivet
#

ight okay

#

add a prefix to ensure thigns don't break?

red flower
#

i would make a table for your mod instead

#

most mods have one, usually the mod's name

#

like Cryptid = {}

fading rivet
#

oh yeah i've seen that with cryptid

rough furnace
#

you can also access your mod object with SMODS.Mods.mod_id

fading rivet
red flower
#

you don't need the global

#

the keyword i mean

fading rivet
#

oh okay thx

#

time to figure out how to patch files yay

#

okay where can I figure out how to do this at

red flower
wild patrol
#

I found DynaText

#

it works with gradient

#

but I can't get it centered

tulip pecan
#

What naming scheme am i missing to get my new hand type to show up?

red flower
#

mod prefix

frosty rampart
#

you don't need to manually put the mod prefix in the poker hand's key definition, smods will automatically do that

#

so the full key is now "uma_uma_perfect_pair"

#

(assuming uma is your mod's prefix)

fading rivet
#

okay the only thing I don't understand is how to target the lovely\dump\functions\UI_definitions.lua file

fading rivet
#

thx

tulip pecan
#

same error as well

red flower
#

are you restarting the run

wild patrol
#

does DynaText have something similar to major

#

so I can pick where it displays

red flower
#

i dont think so

#

maybe

tulip pecan
red flower
wild patrol
#

tried major and align

#

neither work

#

and you were right about the you win text

#

it does gradient

wintry solar
wild patrol
#

but it uses DynaText

wild patrol
#

I like how both attention_text and dyna have what I need but I can't combine them

red flower
#

attention_text uses dynatext no?

#

you can just copy the function and just remove the copy table part

hardy vessel
#

How would I check if the amount of cards currently held in hand are greater than your max hand size? Is it just #G.hand.cards > G.hand.config.card_limit ?

red flower
#

yes

wild patrol
#

DynaText({ colour = SMODS.Gradients['ttv_jackpot2'], text = 'JACKPOT!', scale = 1, hold = 2, major = G.play, backdrop_colour = G.C.WHITE })

#

?

red flower
#

?

#

i mean copy the function

#

like the original

wild patrol
#

what is the full DynaText()

#

Because I can't find what it's fully capable of

red flower
#

i mean attention_text

#

dynatext is in engine/text.lua

wild patrol
#

dyna text is supposed to have x_offset y_offset

#

but changing the value doesn't seem to do anything

wild patrol
#

Dynatext isn't gonna work

#

tried everything

#

I guess I should go back to trying get gradient to updating in realtime

fading rivet
#

Where would I need to patch into for updating a variable after playing a hand, while the played hand data is still accessable

#

nvm found it i think

wild patrol
#

i'm out of ideas for smods.gradient

#

anyone got a suggestion to try

wintry solar
#

nothing you do with the gradient will solve your problem

red flower
wild patrol
#

DynaText didn't work

red flower
#

that's not what i said

#

i said copy attention_text's code

#

and remove the copy table on the color

wild patrol
#

oh ur saying just straight up rip the attention_text function from the vanilla game

red flower
#

yes

wintry solar
#

I tested without smods and gradients don't change in any text popups btw

#

the vanilla function also copies the colour table

tulip pecan
#

How would I check the suit of a card inside the definition of a new poker hand? I'm trying to make a hand that has all 4 cards played be the same suit, but I couldn't get parts._flush to return anything useful (I could have also been mis-using it). What's the best way to check for this?

wild patrol
#

thank you

#

now I need to fix the seizure endusing flashing

daring fern
wild patrol
#

it's getting there

tulip pecan
wild patrol
#
                G.E_MANAGER:add_event(Event({
                    func = function()
                        local difference = 250
                        ease_dollars(difference)
                        return true
                    end,
                }))
                delay(1)
                G.E_MANAGER:add_event(Event({
                    func = function()
                        local difference = 250
                        ease_dollars(difference)
                                return true
                            end
                        }))
                        delay(1.25)
                        G.E_MANAGER:add_event(Event({
                            func = function()
                        local difference = 250
                        ease_dollars(difference)
                                return true
                            end
                        }))
                        delay(1.50)
                            G.E_MANAGER:add_event(Event({
                            func = function()
                        local difference = 250
                        ease_dollars(difference)
                                return true
                            end
                        }))
                        delay(1.75)
                        return true
                    end
                }))```
#

what's the best way to do delays

#

no matter what I do they all trigger at the same time

slim ferry
#

Delays inside events wont do anything im fairly certain

mystic river
#

delays are events
so no, queueing a delay during another event won't delay properly

wild patrol
#

So what would be away to have money being added one at a time

#

trying to simulate a slot machine giving a payout

wintry solar
#

copy and paste the top event and delay

wild patrol
#

delay(0.15)
G.E_MANAGER:add_event(Event({
func = function()
local difference = 1000
ease_dollars(difference)
return true
end
end
}))

#

so copy this a couple times

wintry solar
#

no

#

the one at the top

wild patrol
#

func = function()
G.E_MANAGER:add_event(Event({
func = function()
local difference = 250
ease_dollars(difference)
return true
end,
}))
delay(1)

#

repeat func?

wintry solar
#

don't repeat that top line

wild patrol
#

G..E_MANAGER:add_event(Event({
func = function()
local difference = 250
ease_dollars(difference)
return true
end,
}))
delay(1)

#

just

round lion
#

how am i meant to hook card.click without crashing

wild patrol
#

didn't work they still all trigger at the same time

dapper sun
round lion
#

wait nvm i kinda feel stupid

long sun
#

is there a way i can make the last line open a link in the player's browser, when clicked?

round lion
#

i could just move the function to a new one

#

(if it works it works, if it dont it dont... too bad i probably cant test it rn.)

wintry solar
#

soonTM

primal robin
long sun
#

awesome ^^ how would i do that?

wild patrol
#

nvm I got it

primal robin
#

I mean, I can say how to do it, but what if you'll try to figure out yourself?
Hint: there's buttons in main menu which opens urls

dapper sun
#

ngl i thought the hard part that're asking about would moreso be the clicking text thing

wintry solar
#

clicking text depends on how you've made this text

primal robin
#

you can make row behind text clickable

#

good enough for url

dapper sun
#

taking a mental note of this for when i make a credits page for my mod

kindred dragon
#

hi, new modder here :)
i can't figure out how to get the files i want, i want to make a BUmod texture/text changing mod

#

i want to make the actual mod files with the textures and such but idk how

long sun
#

figured it out i think

kindred dragon
#

sorry its confusing to say

wintry solar
#

you can add {button:string} (where string is a reference to G.FUNCS.string which is a function that is called when you click the text ) to the loc in dev branhc

primal robin
#

it was merged only recently isnt it

long sun
#

o!

#

o neat

#

i had no idea

#

(though i'm not sure if the UI text object allows those brackets)

wintry solar
#

like I said, depends on how you've added this text

long sun
#

like so:

{
                  n = G.UIT.R,
                  config = { align = "cm" },
                  nodes = {
                    {
                      n = G.UIT.T,
                      config = {
                        align = "cm",
                        text = localize("flipbook_disabled_headsup_5"),
                        colour = G.C.BLUE,
                        scale = 0.4
                      }
                    }
                  }
                }```
#

oop formatting 😭 sorry

#

i had to put each line in individually, because the text wasn't accepting a table of strings

wintry solar
#

then do what sleepy said

long sun
#

-# what did sleepy say ;u;?

wintry solar
#

oh I guess you can still do the loc thing too

long sun
#

-# oh you mean about the button

#

i mean the more attractive option now is the brackets

#

because that would also let me stop putting in lines one at a time

#

how do ability texts handle this? i looked, but couldn't find where they're defined

kindred dragon
wild patrol
#

PERFECT

sage crater
#

bump

red flower
sage crater
#

I love vanillaremade more each day

long sun
#

got it to work ^^ thanks!

near coral
#

My coder has trouble writing a joker that halves probabilities can someone just do it for them please

#

I can't code and this is the best I can think of aside from giving up on that joker entirely

tulip pecan
#

How would I go about finding the suit of a card inside an SMODS.Pokerhand evaluate function? I have my selection of cards to look at, but I don't know how to check suits for them

wild patrol
#

so much has been done with this twitch balatro mod

frosty rampart
wild patrol
#

but at the same time still feels far from finished

wild patrol
tulip pecan
# red flower :is_suit?

I assumed that was used to check of a certain card was a defined suit, as a boolean answer. Can it also read the suit of a card, and return a string or numeric value so that I could use it to compare with others?

red flower
#

why answer when i already wrote website

sage crater
#

what's the difference between using SMODS.pseudorandom_probability and G.GAME.probabilities.normal?

frosty rampart
#

G.GAME.probabilities.normal is the old way that it worked before the new probability system was implemented, don't use it

sage crater
#

ah, got it

frosty rampart
#

it's only still around because vanilla content (oops all 6s) uses it

sage crater
#

interesting

#

does SMODS.pseudorandom_probability still recognize if the player has oops all 6?

red flower
#

nothing uses it except all mods iirc

#

old*

#

my brain autocorrected

sage crater
#

how do I get this to work individually on all cards?

If I use similar code to trading card, it just destroys all the cards discarded at the same time

#

to specify, I want each card to have a 1 in 10 chance individually. Not a 1 in 10 that all cards get destroyed together

red flower
#

code?

frosty rampart
#

use context.discard, not context.pre_discard. context.discard is run once per each card that's discarded

sage crater
#

oh, fire

red flower
#

you can also return remove = true in context.discard iirc

sage crater
frosty rampart
#

i think so yea

sage crater
#

:0 it works

#

thanks, y'all

tulip pecan
frosty rampart
#

parts._all_pairs is a table of tables of cards

#

because it's all the possible pairs that exist in the played hand

red flower
#

if its the effect you said earlier just loop through hand

#

but btw if you want this to work like flush this will ignore all enhancements

tulip pecan
#

yeah that's something I noticed after seeing the above documentation

#

and I'm not sure how the best way to handle that is

red flower
#

this is the get flush function

tulip pecan
#

oh that makes sense with how four fingers works then

#

so just use the for hand loop there and modify it to look for 4 cards basically?

red flower
#

yeah

tulip pecan
#

okay goated

#

Seems like its all working! I'll do some testing with enhancements to double check that things like wild cards work but it seems all good

sage crater
#

is #G.hand the amount of hands someone has left?

faint yacht
#

G.GAME.current_round.hands_left

sage crater
#

muchas gracias :]

sage crater
sage crater
frosty rampart
#

you can't reference anything in G.GAME in the config table itself, that code is only run on boot (i.e. before G.GAME even exists)

#

you just have to do the math in the loc_vars and calculate functions directly

sage crater
#

ah, ok

sage crater
#

seems like it does

red flower
#

don't set values in loc_vars

#

because then you depend on the player hovering the card

frosty rampart
#

just work with G.GAME.current_round.hands_left directly, dividing by 100 when you need to

sage crater
#

oh true lmao

sage crater
final monolith
#

I couldn't figure it out when making a mod myself

sage crater
#

tried to make a joker instantiation function and it did not like that 💀
it's complaining about the key of the first joker I made, "firstBrother", so I'm not sure what's up.
Anyone got ideas?

frosty rampart
#

it should be SMODS.Joker(createJoker(...)), not SMODS.Joker { createJoker(...) }

#

because the function already returns a table

sage crater
#

ah, ok

true jasper
#

I want consumables to have rarities in my mod but I'm not sure how'd I'd begin to do that

terse merlin
#

how do i use get_loc_debuff_text in mod_calculate

red flower
#

probably

terse merlin
#

is it really this simple?

near coral
#

Is it possible to have scaling be tied to a joker having a specific badge

#

A rekoj based on zibarro scales per bizarro triggered that run, and all the bizarros have a bizarro badge so I'm wondering if making it check for the badge is the easy way to do it

terse merlin
red flower
terse merlin
#

right

red flower
#

like that literally

terse merlin
#

lets try that again

red flower
terse merlin
#

im new here ok?

red flower
#

its not documented because they refuse to merge my pr

red flower
near coral
#

So I can send to the coder

terse merlin
#

thanks

red flower
near coral
#

I have no idea what that means

terse merlin
#

dynamically

#

automatically

red flower
#

they generate when you hover the card

terse merlin
#

badges only exist when you hover over the card

near coral
#

So whatever code used to assign it can't be used to scale rejok

round lion
#

calc_scaling looks messed up

terse merlin
#

you'd have to go deeper than that and look at the code that generates the badges

red flower
round lion
#

the guide says its calc_scaling = function(self, card, other_card, initial_value, scalar_value, args) when other_card is thrown out and card is the replacement for other_card

near coral
red flower
#

then you would need to check whatever assigns that badge yeah

round lion
terse merlin
#

its a 15% chance that rerolls every time you play a hand

red flower
round lion
#

so the question is, how can i modify my card while in this function without having to make a new context value for every single joker that relies on scaling to scale along

#

or perferably, how do i get back up to card from card.config.center

round lion
#

well that was the fastest ive thrown out a concept.

red flower
#

i dont get why you cant use card

round lion
#

WAIT A GODDAMN MINUTE

red flower
#

i still dont get what youre talking about

round lion
#

i can use self, but the wiki's still lying

red flower
#

self is the center, card is the card

#

i dont get the confusion

round lion
#

and compare it to the wiki example of how you should use calc_scaling

red flower
#

they are the same

#

yep

round lion
#

whats other_card for anyway

red flower
#

its the card that's scaling

#

card is the card applying the effect

round lion
#

but why put self in the function variables on the object side

red flower
#

because thats what every center function does?calculate(self, card, context)?

round lion
#

when that will offset the variables by 1 and make args nil... potentially

red flower
#

???

#

where??

#

ah i get the problem

#

the colon means that obj is the first argument

#

obj is self in this case

round lion
#

why do the patches have to have self in the toml however?

red flower
#

because when you have something like
function Card:get_id()
the colon means that it has 1 argument called self that is of class Card

#

in this case self is a card

#

but in a function in SMODS.Joker self would be of class SMODS.Joker

#

so card is a different argument

granite apex
#

What does G.GAME.dollar_buffer do, exactly? I'm trying to read currently held dollars right after money is altered and my program acts with a one action delay no matter what, tried using dollars directly and dollars with buffer (under the assumption that buffer meant the amount to be added)

        local newMoney = G.GAME.dollars + (G.GAME.dollar_buffer or 0)
granite apex
#

So I'm guessing dollar_buffer is not at all what I thought it was and I'm kind of stuck here

red flower
#

what exactly do youi want to do?

granite apex
#

wait a sec I'll get my code

#

Basically, I want to add mult equivalent to whatever amount of money you're using in real time, which is something that only ever really happens with flash card

#

I think G.GAME.dollars is updated after money_altered, which doesnt impact anything in the base game since all money effects are delayed

red flower
#

so you want the amount that changed?

granite apex
#

pretty much

red flower
granite apex
#

oh damn aight I'll try that out

#

should make my life easier

#

Can confirm, its all functional now, thanks

subtle hawk
# true jasper bumping this

Bunch of different sets, make them look like they are from the same set and make your own consumable tab that contains all of them 😛

#

Jokes aside, there is no convenient way to do it

#

You just have to figure something out ig

#

Weights I THINK are planned for smods

#

So you can try to wait

subtle hawk
subtle hawk
# true jasper im not doing all that 🙏

Ofc you aren't, you would be an idiot if you did
I think I saw someone making their cards more common by like. Adding multiple copies of it in the pool or something.
Again, no convenient way to do rarities for non-jokers

true sky
#

would anyone happen to know a good way to just like, fade the screen to white?

#

i was staring at the splashscreen to figure out how it does it and i got nowhere with that

sturdy compass
#

The new screenshader feature in dev SMODS might be of interest here

daring fern
#

tulip pecan
#

What's wrong with my seal definition for my challenge deck?

daring fern
tulip pecan
#

oh my god i've been trying different combinations for like a half an hour and I never thought of capitalizing it

granite apex
#

Does G.pack_cards not exist yet when calling context.open_booster? Trying to add a consumable card in whichever booster you're opening

slim ferry
#

lua tables are 1-indexed

#

So G.pack_cards[0] wont exist regardless

#

Im pretty sure the area should exist in the context though

normal crest
#

Might be add_card instead of create_card too

wild patrol
#

working as intended

#
    if is_on_cooldown() then return end
    if G.STATE ~= G.STATES.SELECTING_HAND then return end
    if G.STAGE == G.STAGES.RUN and G.hand then
--    play_sound('card1', 1)
    G.E_MANAGER:add_event(Event({
            func = function()
                for i = 1, #G.hand.cards do
                local card = G.hand.cards[i]
                G.hand.cards[i]:flip()
                play_sound('card1', 1)
                G.hand:unhighlight_all()
                for k, v in pairs(G.hand.cards) do
                v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
                G.hand:shuffle('aajk')
                play_sound('card1', 0.85)
                delay(0.1)
                G.hand.cards[i]:flip()
                play_sound('card1', 1)
                delay(0.8)
            end
        end
    end
        }))
end
end```
#

trying to figureo out why it loops

#

fixed it

#

needed a return true

#

<@&1460584319486791871> scam post

wild patrol
#

is there away to reload lua in-game without having to restart the game

wild patrol
#
    if is_on_cooldown() then return end
    if G.STATE ~= G.STATES.SELECTING_HAND then return end
    if G.STAGE == G.STAGES.RUN and G.hand then
       for i = 1, #G.hand.cards do
--        local card = G.hand.cards[i]
        G.hand.cards[i]:flip()
    end
        play_sound('card1', 1)
        G.E_MANAGER:add_event(Event({
            func = function()
                G.hand:unhighlight_all()
                for k, v in pairs(G.hand.cards) do
                v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
                G.hand:shuffle('aajk')
                play_sound('card1', 0.85)
--                G.hand.cards[i]:flip()
--                play_sound('card1', 1)
                return true
            end
        end
    }))
                   G.E_MANAGER:add_event(Event({
                trigger = 'before',
                func = function()
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            play_sound('card1', 1)
                            G.hand:unhighlight_all()
                            for k, v in pairs(G.hand.cards) do
                            v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
                            G.hand:shuffle('aajk')
                            play_sound('card1', 0.85)
                            return true
                        end
                    end
                    }))
                    delay(0.15)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.hand:shuffle('aajk')
                            for k, v in pairs(G.hand.cards) do
                            v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
                            play_sound('card1', 1.15)
                            return true
                        end
                    end
                    }))
                    delay(0.15)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.hand:shuffle('aajk')
                            for k, v in pairs(G.hand.cards) do
                            v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
                            play_sound('card1', 1)
                            return true
                        end
                    end
                    }))
                    delay(0.15)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            for i = 1, #G.hand.cards do
                            G.hand:shuffle('aajk')
                            for k, v in pairs(G.hand.cards) do
                            v:set_ability(SMODS.poll_enhancement({guaranteed = true}))
                            play_sound('card1', 1)
                            G.hand.cards[i]:flip()
                            delay(1)
                            return true
                        end
                    end
                    end
                    }))
                return true
            end,
        }))
    end
end```
#

shit

#

it does everything I need

#

I just can't get the second flip to work properly

#

always flips the first card to the left and the rest are unflipped

#

tried delaying it tried making it a seperate event

#

just doesn't work

#

finally got it

#

lol

lament agate
#

how would i center attention_text

primal robin
#

Wdym center

#

Text in it already centered

fading rivet
#

Is there a way get all played cards that would be unscored during context.evaluate_poker_hand?

wild patrol
#

ok so I have a weird thing happening

#

so the custom attention text I made yesterday to support gradient colors

#

works fine on jackpot every time the command is done it appears

#

but the enhance command it appears once and never again

#

not sure why

#

place it in different areas of the code but only appears once and never again

lament agate
primal robin
wild patrol
#

major = G.play,

#

try that

#

atleast that's what worked for me

#

or align = 'cm'

#

took a couple hours but I think its good now

#

text last little too long but i'll fix that later

lament agate
lament agate
wild patrol
#

need to edit the attention_text from vanilla game to removed the copy table

fading rivet
#

Is there a way get all played cards that would be unscored during context.evaluate_poker_hand?

wild patrol
#

I think N explained this to me yesterday

wild patrol
#

is what I made

#

you need to make an smod.gradient tho

#

and use smod.gradients['gradient name'] in colour

lament agate
fading rivet
lament agate
fading rivet
#

oh its a mod
ight thx
will download when I get home

lament agate
# daring fern Code?
local function apply_random_shader()
    local cfg = mod.config

    local shaders = {
        "glitch",
        "nightvision",
        "flashlight",
        "pulse",
        "corrupted"
    }

    local pick = shaders[math.random(#shaders)]

    for _, k in ipairs(shaders) do
        cfg[k] = false
    end

    cfg[pick] = true
end

function mod:calculate(context)
    if not self.config.random_on_boss then
        return
    end

    if context.round_eval and G.GAME.last_blind and G.GAME.last_blind.boss then
        play_sound('flt_unfortunate', 1, 1)
        G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0,
                func = function()
                    attention_text({
                        text = "A NEW CHALLENGER HAS APPEARED!",
                        scale = 1.3,
                        hold = 1.4,
                        major = G.play,
                        backdrop_colour = G.C.RED,
                        align = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.SMODS_BOOSTER_OPENED) and
                            'tm' or 'cm',
                        offset = { x = 0, y = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.SMODS_BOOSTER_OPENED) and -0.2 or 0 },
                        silent = true
                    })
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.06 * G.SETTINGS.GAMESPEED,
                        blockable = false,
                        blocking = false,
                        func = function()
                            play_sound('tarot2', 0.76, 0.4)
                            return true
                        end
                    }))
                    play_sound('tarot2', 1, 0.4)
                    return true
                end
            }))


        apply_random_shader()

        return nil, true
    end
end
daring fern
lament agate
#

fair

lament agate
wild patrol
#

CAN I STEAL THIS LMAO AS A COMMAND

lament agate
wild patrol
#

i'm using a dev version

lament agate
wild patrol
#

If it's a shader guess i'm sol because I can't figure out shaders to save my like lol

wild patrol
#

oh they are premade

lament agate
#

yep

wild patrol
#

ThinkYoureSafe gimmie those shaders

#

the flashlight one seems fun for a command

#

to blind the streamer

lament agate
#

go ahead, copy them

lusty marten
#

how can i code a sticker that x300 joker's stats at boss blind and reset at the end of round ? I tried to divide 300 but it doesn't work

wild patrol
#

speaking which fixed the teaser because a fucking typo in the last one

#

had to redit the hole damn thing

daring fern
wild patrol
#

@lament agate could I ask a favor on a shader

#

because I need one for a enhancement on jokers

#

you think you can make holo that looks like those bootleg pokemon/yugioh cards you get from aliexpress or temu

lament agate
#

try looking at this

lament agate
lament agate
wild patrol
fading rivet
#

can I put local vars references in text returned by local vars

wild patrol
#

best way I can visually explain is to show

lament agate
wild patrol
#

I tried making one myself but game always crashes lol

fading rivet
#

so I need to concatenate the text I want then k

lament agate
#

ill let you know if i can attempt it

wild patrol
#

THought about abandonding the bootleg joker idea

#

because only made like 3

#

and i've been spreading too many jokers appart and not filling the current packs as it is

lament agate
#

fair fair

wild patrol
#

too many jimbos

#

the concept is they are jokers similar to vanilla with a similar effect but have a chance to perish during a round and have to wait until the round won to get the back

lusty marten
#

how can i code a sticker that x300 joker's stats at boss blind and reset at the end of round ? I tried to divide 300 but it doesn't work

wild patrol
#

just been using holo since it's visually similer to what I wanted lol

fading rivet
#

Is there a smods helper function that finds jokers in a specific pool?

#

or do I have to iterate through the current jokers and check manually

red flower
#

no

fading rivet
#

rip

fading rivet
#

would be nice to have in the future

#

do u know if there is a way get all played cards that would be unscored during context.evaluate_poker_hand?

red flower
#

check all cards in full hand that are not in scoring hand

#

keep in mind they might get scored later by splash effects

fading rivet
#

im making that card that converts almost full houses into full houses

wild patrol
wild patrol
#

the corrupted one

#

i'm fiddling with it rn

#
    if is_on_cooldown() then return end
    if G.STAGE ~= G.STAGES.RUN then return end
--    local difference = 1000
--    ease_dollars(difference)
    attention_text2({text = 'JACKPOT!', scale = 1, hold = 11, major = G.play, backdrop_colour = G.C.WHITE })
    play_sound('ttv_jackpot', 1, 1)
--Listen it just works ok....
    G.E_MANAGER:add_event(Event({
            func = function()
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 25
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                local difference = 50
                ease_dollars(difference)
                delay(0.25)
                return true
            end
        }))
    end```
#

dunno what conflicts lol

#

oh it's my command

#

something borked

#

Fixed it

#

not sure if it's related to attention_text

#

or the custom one I made

#

because if I don't have a colour set

#

it breaks

#

weird

lyric wadi
#

what

wild patrol
#

it doens't just break the shader

#

breaks all text

lyric wadi
#

why are you redefining difference instead of just putting the amount in

primal robin
dapper sun
#

and why aren't you using a for loop

wild patrol
#

too lazy

lyric wadi
#

???????????/

primal robin
#

fair

wild patrol
#

copy + c and v go brrrrr

lyric wadi
#

ah yes im too lazy to write one loop so i will duplicate 50 lines

wild patrol
#

I haven't learned loops yet

primal robin
#

writing code? Man, copy-paste vanilla and call it a day

lyric wadi
#

what

#

well

#

you should

primal robin
#

That's what I sometimes doing to do UI

lyric wadi
#

i think now is a good time actually

wild patrol
#

i'm a firm believer in if it works it works

#

Clean it up later

lyric wadi
#

yeah but also you should learn loop

#

it's easier to debug 3 lines in a loop than 50 lines

wild patrol
#

This mod is held together with ducktape and glue

lyric wadi
#

ok well if you're here for debugging advice im literally telling you how to make debugging your code easier

#

i dont care how efficient your code runs

#

but if you want someone else to read your code and tell you what's wrong

#

at least make it easier to read

subtle hawk
#

Where x is the number of times you need to repeat the shit

#

As shrimple

daring fern
#

wild patrol
lament agate
wild patrol
#

yeah

#

wanna implempent the flghlight shader as a fun little command

lament agate
wild patrol
#

awesome thanks

primal robin
#

Does ScreenShader has priority system just like game music?

shell timber
#

they can stack

dapper sun
primal robin
#

okay cool

fading rivet
#

How could I make the entire contents of a jokers description box change?
I cant get the formatting to work via loc_vars

mystic river
#

you could return a different key and put the description there

fading rivet
#

I wanna make the card cycle through several different descriptions

slim ferry
#

yes

#

return a key in loc_vars to make it use a different description key

fading rivet
slim ferry
#

yes

fading rivet
#

dang it

#

welp no more contining bad practices

slim ferry
#

you can just make a localization file that only has the additional descriptions

fading rivet
slim ferry
#

if you really want to use loc_txt for stuff

#

yeah true

fading rivet
#

back to vanilla remade

#

im using mutliboxes for this, is there a way I can avoid having to copy and paste the name and top box (they dont change) or do I have to have it or each one

#

@slim ferry ?

slim ferry
#

wdym

#

oh

#

uhhh i dont think there is

fading rivet
#

like can I have one key for the name and top box
and several keys for the bottom

slim ferry
#

you would have to copy the same multibox afaik

fading rivet
#

buh

#

okay thx

slim ferry
#

or you could just

#

store the first multibox in a local variable

#

so you only have it once in the loc file

fading rivet
#

oh yeah it's still a lua file

slim ferry
#

and then you can set than variable as the first box for each one

wild patrol
#

learned how to turn the flashlight on but can't figure out how to turn it off lol

fading rivet
#

oop

wild patrol
#

doesn't matter what I do I can't get the true to swap back to false

wild patrol
#

finally

#

also @lament agate thanks for the shader again

white hull
#

Can I enable/disable whether the poker hand is visible on the left when selecting cards? I wanna disable it for a cutscene during the blind

tulip pecan
#

I'm looking for a timer that I can reference for a joker to decrease one of its stored values every second in real time (ignoring game speed). How would I achieve this?

hardy vessel
#

How would I check if a played hand has all cards score?

white hull
sour garden
#

why doesn't this tag have an info_queue?

white hull
#

I'm trying to make a challenge where all vanilla boss blinds are banned, and I'm trying to use some code to make the required table for this, but it's not working. vanillablinds is the expected list of 28 vanilla bosses, but vanillabans is empty. How come?

local vanillablinds = {}

for _, blind in ipairs(G.P_BLINDS) do
    if not blind.original_mod and blind.key ~= 'bl_small' and blind.key ~= 'bl_big' then
        vanillablinds[#vanillablinds+1] = blind.key
    end
end

local vanillabans = {}

for _, blind in ipairs(vanillablinds) do
    local ban = { id = blind, type = 'blind' }
    vanillabans[#vanillabans+1] = ban
end

SMODS.Challenge {
    key = 'showcase',
    jokers = { { id = 'j_nancy_negativenancy' } },
    restrictions = {
        banned_other = vanillabans
    }
}
sour garden
#

i'll look through the crashlog

normal crest
white hull
#

Yeah

normal crest
#

the way you were trying to do initially should work

white hull
#

i.e. { key = 'e_negative_playing_card', set = 'Edition', config = { extra = 1 } }

normal crest
#

your key must not have been right

#

Try eval G.P_CENTERS etc etc in debugplus console with the center you were trying to add initially

#

see if it exists

sour garden
#

it's loading as nil
i have no idea why, other tags i've made that pull from Other have worked just fine

#

so p_biasedBalance_UtilityPack is returning a table, but p_biasedBalance_UtilityPack_Mega is returning nil

normal crest
#

How do you define the mega pack

lusty marten
#

hey , what is the limit of the talisman?

dapper sun
#

it should say in the mod's config page

daring fern
white hull
#

ohh you can make it a function? perfect

#

i thought it would only accept a table

#

okay well.

#

that's lovely LMAO

slim ferry
#

localization keys should be made all lowercase which isnt the case in your localization file

white hull
dapper sun
wild patrol
red flower
white hull
dapper sun
#

lol

red flower
#

but it accepts functions now

white hull
#

I see :)

#

The UI doesn't like all those banned blinds very much though lmao

red flower
#

yeah

white hull
#

I made an issue about it but I'll see if I can do something about it myself

red flower
#

i would ban the blinds manually in apply

#

so they dont show up there

#

and then add a custom rule that tells the player the blinds are banned

white hull
#

Oh maybe

#

In apply where? Patch the challenge deck?

daring fern
red flower
white hull
red flower
#

the docs got merged 2 seconds ago :3

white hull
#

I see though :)

red flower
white hull
#

Oh neat!

#

Oh there's also calculate, wonderful

white hull
red flower
#

G.GAME.banned_keys[key] = true

white hull
#

lovely

ivory field
#

how does someone make a mod for a mod

#

trying to make a blindside mod

sturdy compass
sturdy compass
#

Is this your first mod project?

ivory field
#

yes

sturdy compass
ivory field
#

thanks

#

will see later

next timber
#

how would i go about making a consumable like the fool for a different consumable type? vanillaremade is kinda useless this time

#

would i have to put a variable set in the use function of every compatible consumable?

red flower
#

you can use mod calculate to save the last consumable

sturdy compass
#

I’d honestly set a global or G variable with a mod calculate that checks whenever a consumable of that type is used

#

Lmfao N

next timber
#

lol

#

ok thx

sturdy compass
#

mod calc remains insanely useful

red flower
#

yay

white hull
#

Yeah mod calc is great

#

It triggers my custom tags at the right timings 🥹

red flower
#

hmm how hard would it be for tags to get normal contexts too

next timber
#

i had to make my own tag context for end_of_round 😭 like cmon that should not be nessecary

sturdy compass
red flower
frosty rampart
#

tag that disables the next tag to trigger, making it the next tag to trigger so it disables itself

white hull
#

Is there a way to check for when a card changes edition, similar to context.setting_ability?

frosty rampart
#

i don't think there's a context, but you can just hook the Card:set_edition function

white hull
#

Fair nuff

wintry solar
mystic river
#

truly a thunk moment

tulip pecan
#

How would I detect when the player clicks continue and re-enters a blind? I have an event that starts a timer at the beginning of the blind, but I need it to continue counting down when the player re-enters the blind. I also need to check if the player is in the pause menu to temporarily pause the timer, but I can just ignore the calculation line if there's a Boolean value I can check for that.

white hull
#

I'm trying to make a challenge where non-negative playing cards are debuffed via this hook, but this code never reaches the "reached undebuff" line. The function itself already checks for edition.negative when determining what it does so I'm not sure what the issue is?

EDIT: fixed it by checking for the edition on the card after it's already applied. No clue why this didn't work though

local setedition = Card.set_edition
function Card:set_edition(edition, immediate, silent)
    local ret = setedition(self, edition, immediate, silent)
    if G.GAME.challenge and G.GAME.challenge == 'c_nancy_stairway' and self.playing_card then
        print('reached if')
        if edition and edition.negative then
            print('reached undebuff')
            SMODS.debuff_card(self, false, 'nancy_stairway')
        else
            print('reached debuff')
            SMODS.debuff_card(self, true, 'nancy_stairway')
        end
    end
    return ret
end
wild patrol
#

so this is everything that can be done in the mod using twitch commands

#

any suggestions for improving it

primal robin
#

is this even playable in any meaningful way?

daring fern
daring fern
white hull
#

Huh

wild patrol
#

commands have a cooldown

#

60 seconds as default that can be configured

white hull
primal robin
#

I mean, command which gives 1k bucks kinda invalidate any actions from streamer in run

daring fern
white hull
#

Wow interesting

#

Didn't know that

white hull
primal robin
wild patrol
#

it's just meant to be a meme mod anyways

primal robin
#

No problem then

wild patrol
#

nothing for serious play

#

Just haha I can bully streamer or help them

#

I wanna try getting an alpha out for some to try see how it goes and it doesn't seem fun

wild patrol
#

def change things around

#

I want it to be fun for both player and viewer without both being miserable or bored

#

basically trying make the balatro equivalent of this

#

Trying to offest the commands with jokers tho

#

might remove the destroy joker command because can't really think of away to balance that

white hull
#

make it perishable instead?

wild patrol
#

The joker already gone tho?

near coral
wild patrol
#

yeah kinda

near coral
#

The deck adds chat?

wild patrol
#

no just gives one of the random chat based jokers

near coral
#

What adds chat then

wild patrol
#

i'm not sure I din't really manage that part all I know uses some kinda socket lua code

near coral
wild patrol
#

the person who made it made it wher eu can link your twitch account with balatro

near coral
#

o

wild patrol
#

guess it gives a login token from twitch?

#

not sure I don't know much about web development and how tokens work

#

originally was based off of sleepyg11 twitch blind mod

#

but the other guy I got helping tweak it around so :/

#

i'm just editing everything else while they manage anything that interacts with twitch chat

#

I just make command

#

i'm just waiting around until we get this implemented

lament agate
#

Wee Rep

+2 Chips for each "+2"

wild patrol
#

i've got a joker that gives +10 mult for every f in chat

#

that's actually finished and implemented

#

the time out is kinda irrelevant because it's a inside joke from a streamer friend of mine

near coral
wild patrol
#

supposed to be a mod banning a chat memember lol

hardy vessel
#

How do I get the location of a joker within the loc_vars? I'm making an effect that's basically Misprint top deck peak, but I don't want players just checking the collection to see what the top cards are

#

i think i figured it out 👍

just card.area == G.jokers

slim ferry
#

you should check if card.area.config.collection instead

tidal hemlock
white hull
#

How can I apply a stake in a challenge? SMODS.setup_stake() applies the effects but visually it's still white stake

fading rivet
#

How does the context.evaulate_poker_hand's return statement work
I'm returning {replace_scoring_hand = "Flush House"} but its not changing anything

frosty rampart
#

replace_scoring_name

fading rivet
#

shouldn't it also change the hand type though?

frosty rampart
#

yes, it will

fading rivet
#

do i need both hand and name?

frosty rampart
#

no
replace_display_name is the one that only has a cosmetic effect

fading rivet
#

I thought name was just for display

#

oh scoring name

#

i misread

#

thx

#

wiki is wrong then

frosty rampart
#

no it's not

fading rivet
frosty rampart
#

reload the page

fading rivet
#

when was it fixed?

frosty rampart
#

i dunno

#

but i can in fact confirm that it is fixed

fading rivet
#

👍 thx

frosty rampart
#

oh N fixed it 4 hours ago

fading rivet
#

buh the king doesn't score

red flower
red flower
#

alongside what you have

fading rivet
#

yeah i'm adding in code for modify scoring hand rn

white hull
fading rivet
#

I already have a flag set for if it changed the scoring hand so theres not much extra to add

white hull
wintry solar
#

some jank vsc addon that I have to zoom in twice to not scramble the image

red flower
#

easy codesnap

wintry solar
#

easy codesnap is the name

white hull
#

Neat lol

fading rivet
tulip pecan
#

How do I check if the game is paused mid-blind?

wintry solar
#

if G.OVERLAY_MENU then

daring fern
sturdy compass
#

Checking G.SETTINGS.paused works too

#

Oh lol

granite raptor
#

how would i get a card from a pool without actually creating said card? i.e. getting the data associated with the card, like its key, so i can get the information of a random joker from a custom pool while respecting rarity

red flower
#

the pool needs to support rarities for it to take a rarity

mystic river
#

in the next smods release you'll be able to simplify this with SMODS.get_clean_pool()

red flower
#

i wouldnt recommend it if you want to keep vanilla randomness logic

white hull
#

I'm not sure how it affects randomness?

#

And if you do use the new function in a new game piece you're making, it'll just have its own randomness that doesn't interfere with or overwrite vanilla stuff, no?

red flower
#

it wouldnt affect vanilla, it just wouldnt follow the same mechanics

daring fern
#

granite raptor
#

ah. what i'm trying to do is make a deck that has a chance to replace jokers in shop with jokers from the custom mod, my first thought was to use context.modify_shop_card, check if it's a vanilla (or other mod) joker, then use card:set_ability to change it into a joker from the mod. though now that i think about it i'm unsure if that would update the price. maybe it'd be easier to just destroy the old card and add the new one but i don't know if that would play the animations and end up looking weird as a result

#

maybe it'd just be easier to just add an extra slot to the shop guaranteed to have a joker from the mod @_@

red flower
#

you can use SMODS.add_to_pool to ban jokers from appearing in the shop

sturdy compass
#

The chance to do it makes it a little weird tho