#💻・modding-dev

1 messages · Page 366 of 1

red flower
#

*with some small ui exceptions with debugplus

prime beacon
#

which restarts the game, but doesn't tell your friends

red flower
#

alt+f5 works too now iirc

#

looking at the code i dont think so

#

without patching that is

#

you can copy the overlay_menu code and take out that part

bold sleet
#

yummers

hard mica
red flower
#

you can use the watch command for the config ui and shaders and maybe something else

#

but for the most part you need to restart

#

as far as i know at least

maiden phoenix
#

@wintry solar Nope, still cause issue

#

I wonder if it's because of set_ability but that'd be weird

hard mica
#

I just gotta find a solution to the VC undefined stuff

red flower
#

maybe try opening the files in the lsp folder?

maiden phoenix
#

Oh it seems like it's because of set_ability, I temporarly removed its call and the cards don't get debuff

#

Btw I don't call set_ability on the playing cards, it's on a Joker

quartz ravine
#

Are people making these Wiki pages by hand?

tired kestrel
#

Hello?

maiden phoenix
#

I think they use scripts to fetch some data

tired kestrel
#

I don't know if you pinged me

red flower
#

the wiki discord links to some tools to help with it

quartz ravine
#

Hey, thanks for the tip on how to render shaders on a deck! I was able to implement it and it looks fantastic!

tired kestrel
#

but apperently still have the error issue

quartz ravine
#

ALT+F5 is a new keybinding and the fastest way to restart the game. If you're changing shader code, you can use watch shader <filePath to reload it in real time. But for the lua code, that's only patched in on start

tired kestrel
#

can someone help me with this?

hard mica
red flower
#

sad

hard mica
#

very sad

primal robin
#

JangSchna
Types? What is this?

wintry solar
maiden phoenix
hard mica
timid star
unborn bay
#

you better actually simulate hrt gameplay here

daring heron
#

is it possible to change the order of jokers without needing to shuffle the code around?

shell timber
#

no way... hrt joker....

pure salmon
#

is there a way for a joker to check what position it's in (how many jokers are to the left of it in my case)?

manic rune
manic rune
tired kestrel
#

I think I got rid of the crash now I just need to figure out how I can have the joker select the rnadom playing card.

faint yacht
primal robin
#

Okay time to add pages to my config Trolge

rapid stag
slender island
#

how do i put jokers code in another file so it will be easier to understand mod's structure?

primal robin
rapid stag
red flower
#

im not sure any ui code is comprehensible

primal robin
#

As web dev I can say: could be worse

rapid stag
primal robin
#

Just set G.UIT.R or G.UIT.C randomly until it works

#

My certified strategy to work with Balatro UI

daring heron
#

good mod icon

rapid stag
#

steamodded wiki page on ui is apparently decent, but it doesn't help me cirSlain

primal robin
#

Also align = "cm" in 90% cases

daring heron
#

why is my mod icon broken 😔

#

nvm ik

rugged pier
#

would the game break with odds = 0

#

how do i prevent a glass card from breaking

red flower
#

take_ownership of glass and change the function

wintry solar
#

Nah the glass check is hard coded

daring fern
#

rugged pier
#

so there isnt a way to prevent it from breaking?

daring fern
wintry solar
#

You have to patch the check

rugged pier
#

whats the check

tired kestrel
#

I tried to do something about the playing card code but I ended up this:

calculate = function(self, card, context)
        if context.cardarea == G.jokers and context.before and context.full_hand then
            local selected_copied_card = false
            local copied_card = nil
            local copy_num = 0
            for i = 1, #context.full_hand do
                local card_select[i] = context.full_hand[i]
                copy_num++
                end
            end
            if not selected_copied_card then
                if copy_num > 0 then
                    copied_card = card_select[math.random(copy_num)]
                    selected_copied_card = true
                else
                    copied_card = nil
                    selected_copied_card = false
                end
            end
        end
        if context.press_play then
            if copied_card ~= nil then
                local copied = copied_card
                card.ability.extra.copied = copied
                print("copied!")
            else
                card.ability.extra.copied = nil
            end
        else
            if card.ability.extra.copied then
                local ret = SMODS.blueprint_effect(card, card.ability.extra.copied, context)
                if ret then
                    SMODS.calculate_effect({message = 'Copied', colour = G.C.GREEN}, card.ability.extra.copied)
                    print("result")
                    return ret
                    end
                end
            end
        end

#

it gave me an errror on load

#

I tried many times

#

I don't know how I ca nget it to work

daring heron
#

how would i make a joker that gains x0.25 mult per one of these jokers obtained? you dont need to keep them to get the mult, just have them in any of your joker slots and it gains x0.25 mult

daring fern
#
function table.contains(table, element)
    if table and type(table) == "table" then
        for _, value in pairs(table) do
            if value == element then
                return true
            end
        end
        return false
    end
end
tired kestrel
timid star
daring fern
timid star
#

a horse wins (is chosen as the new effect) after either a blind or ante

#

i want to figure out how i can change joker sprites and such

daring fern
timid star
daring fern
timid star
#

(of course to stay true to hrt, the horse winning is weighted, jovial wins the most, cyan rarely wins)

timid star
tired kestrel
#

@daring fern I don't know if you can help me and I'm sorry to bother

tired kestrel
daring fern
daring fern
#

Or a seal?

#

Or anything that goes on a playing card?

tired kestrel
#

it doesn't ay anything about a enchancement

red flower
#

smods itself does that too

tired kestrel
daring fern
tired kestrel
daring fern
tired kestrel
#

yeah.

#

a joker that can copy a played card

#

no mention about seals or enchancments

daring fern
tired kestrel
daring fern
tired kestrel
#

I mean I tried to do the same method as last time

#

but somehow

#

I at first thought I got it to work until that.

daring fern
tired kestrel
#

ok.

daring heron
daring fern
tired kestrel
daring fern
tired kestrel
# daring fern Code?
calculate = function(self, card, context)
        if context.cardarea == G.jokers and context.before and context.full_hand then
            local selected_copied_card = false
            local copied_card = nil
            local copy_num = 0
            for i = 1, #context.full_hand do
                local card_select[i] = context.full_hand[i]
                copy_num++
                end
            end
            if not selected_copied_card then
                if copy_num > 0 then
                    copied_card = card_select[math.random(copy_num)]
                    selected_copied_card = true
                else
                    copied_card = nil
                    selected_copied_card = false
                end
            end
        end
        if context.press_play then
            if copied_card ~= nil then
                local copied = copied_card
                card.ability.extra.copied = copied
                print("copied!")
            else
                card.ability.extra.copied = nil
            end
        else
            if card.ability.extra.copied then
                local ret = SMODS.eval_card(card.ability.extra.copied, context)
                if ret then
                    SMODS.calculate_effect({message = 'Copied', colour = G.C.GREEN}, card.ability.extra.copied)
                    print("result")
                    return ret
                    end
                end
            end
        end
#

this is the code now.

daring heron
daring fern
red flower
#

you're defining a new function

daring heron
#

oh

#

wait huh

#

i don't understand

daring fern
daring heron
#

wouldnt i need to put the code in the calculate funcion for a joker to gani xmult?

#

oh

#

but then how do i make it gain xmult when the player obtains one of those jokers?

tired kestrel
rugged helm
#

how would i apply the Chip flame effect to a soul sprite?

red flower
#

i wish

tired kestrel
# daring fern Lua doesn't work like that.

Ah. I think I might have slightly forgot but yeah, I never often to work around iwth lua a lot but I am personally good with Game maker and of course I'm also trying to learn on how lua worked

#

alright I updated the code and I still get this:

calculate = function(self, card, context)
        if context.cardarea == G.jokers and context.before and context.full_hand then
            local selected_copied_card = false
            local copied_card = nil
            local copy_num = 0
            for i = 1, #context.full_hand do
                local card_select[i] = context.full_hand[i]:get_id()
                copy_num += 1
                end
            end
            if not selected_copied_card then
                if copy_num > 0 then
                    copied_card = card_select[math.random(copy_num)]
                    selected_copied_card = true
                else
                    copied_card = nil
                    selected_copied_card = false
                end
            end
        end
        if context.press_play then
            if copied_card ~= nil then
                local copied = copied_card
                card.ability.extra.copied = copied
                print("copied!")
            else
                card.ability.extra.copied = nil
            end
        else
            if card.ability.extra.copied then
                local ret = SMODS.eval_card(card.ability.extra.copied, context)
                if ret then
                    SMODS.calculate_effect({message = 'Copied', colour = G.C.GREEN}, card.ability.extra.copied)
                    print("result")
                    return ret
                    end
                end
            end
        end
daring fern
#

You have to do copy_num = copy_num + 1

tired kestrel
#

also are arrays having the same issue?

#

does arrays in lua work like this?

local card_select[i] = context.full_hand[i]:get_id()

#

though

tired kestrel
#

huh.

tired kestrel
#

cause the 95th line was this

local card_select[i] = context.full_hand[i]:get_id()

red flower
tired kestrel
#

I'm still learning if any too

daring fern
red flower
#

i havent seen your code tho

unborn bay
#

note that in lua arrays start at index 1

#

just something to keep in mind

tired kestrel
red flower
#

yeah idk what youre doing but local card_select[i] is wrong

tired kestrel
#

what the?

red flower
#

yeah just delete the local

tired kestrel
#

since when did this?

tired kestrel
red flower
#

also doing card_select[i] = nil is useless

#

in lua everything starts as nil, you dont need to define it like that

tired kestrel
#

ok.

#

sorry I just often think about game maker or gml

#

but yeah

tired kestrel
red flower
#

i would delete this whole loop honestly

tired kestrel
prime beacon
#

Are all jokers in the pool by default / do I need to tell the game to add my joker? barring exceptions ofc

red flower
rugged pier
red flower
tired kestrel
tired kestrel
#

let me record

rugged pier
#

as in what do i change in the enhancement itself to make it unbreakable

daring fern
rugged pier
red flower
#

what somethingcom said

rugged pier
#

since return is set to nil

red flower
#

yes thats in the config

rugged pier
#

ah gotcha

#

thought this overrides that

#

thanks guys

red flower
#

take_ownership only overrides the parts you change

rugged pier
#

ahhh makes senes then

rugged pier
#

somethingcom515?

wintry solar
tired kestrel
#

Waht the-? somehow it did try to make the playing card to say "copied" as well as the main joker to say the chips amount and the nenxt thing I know when I was purchasing th evoucher it crashed

tired kestrel
#

hold on I might need tostart a new run and then check

red flower
#

has anyone ever made a clickable text hyperlink, i want to add links to the mods in my credits but i dont want a button for each

red flower
#

yes

tired kestrel
red flower
runic pecan
#

Is SMODS.current_mod.config not a thing anymore?

red flower
#

it is but SMODS.current_mod only works on initialization of the mod

tired kestrel
daring fern
red flower
runic pecan
slender zenith
#

how do i check if a card in a loop is the current scoring card?

i tried:

                if scored_card =~ card then```
with self.card and context.card too but they all give errors
manic rune
#

is that my mod

faint yacht
manic rune
#

mom im on tv

faint yacht
red flower
manic rune
#

:3

daring fern
manic rune
#

and im very honored to be the one you stole from lmfao
-# even though the code is obviously ass

faint yacht
#

-# If it works, it works.

slender zenith
manic rune
red flower
#

i mean i basically made my own code for it

#

but the ideas are the hard part

manic rune
#

o

tired kestrel
#

I tried only one that is supposed to copy playing cards, it didn't trigger anything.

#

uppon start

#

but it did load in

#

just...

#

it didn't allow the copy

#

or triggers

tired kestrel
#

wished I could've recorded it but honestly the card didn't do any triggers

tired kestrel
red flower
#

i still havent read your code so idk what youre doing

tired kestrel
#

not again hold on

#

alright here's the new code:

tired kestrel
tired kestrel
#

is this bot trying to block me from this server?

manic rune
#

🤔 what was the explanation for that again

red flower
# tired kestrel

3 things:
local variables don't work between contexts. save then in the cards ability table

don't use math.random, use pseudorandom instead to account for the seed

do the cardarea check after the main context check

tired kestrel
#

cause I know there's math.random but yeah.

primal robin
#

No way now I have infinite space for keybinds RUN

tired kestrel
red flower
blissful thistle
#

Hi everyone, Here, I'm using both the DebugPlus mod and EscapeExitButton.lua.
The lua functions properly, but the exit button also shows up when I hit "tab' for Debug Menu. Does anyone know how to fix this?

--- MOD_NAME: Escape Exit Button
--- MOD_ID: EscapeExitButton
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Add an "Exit" button into the "Escape" menu

----------------------------------------------
------------MOD CODE -------------------------

function G.FUNCS.exit_button(arg_736_0)
    G.SETTINGS.paused = true

    love.event.quit()
end

local createOptionsRef = create_UIBox_options
function create_UIBox_options()
    contents = createOptionsRef()
    local exit_button = UIBox_button({
        minw = 5,
        button = "exit_button",
        label = {
            "Exit Game"
        }
    })
    table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button)
    return contents
end

----------------------------------------------
------------MOD CODE END----------------------```
tired kestrel
#

ah.

tired kestrel
#

I just changed the code a bit and now this error came up

red flower
#

well dont attempt to compare a number with nil

tired kestrel
#

updated code:

if context.cardarea == G.jokers and context.before and context.full_hand then
            local selected_copied_card = false
            local copied_card = nil
            local card_select = {}
            for i = 1, #context.full_hand do
                card_select[i] = context.full_hand[i]:get_id()
            end
            if not selected_copied_card then
                if copy_num > 0 then
                    copied_card = pseudorandom_element(card_select, pseudoseed("seed"))
                    selected_copied_card = true
                    print("copy ready")
                else
                    copied_card = nil
                    selected_copied_card = false
                end
            end
        end
#

oh.

#

wiat I tihnk know why

red flower
#

copy_num doesnt exist

tired kestrel
#

I readded copy_num because it's supposed to be the one that detects the cards

#

wait something happened let me try to record

pure salmon
#

how do i set the hand score to 0 after scoring (i assume setting the hand's chips and mult during context.final_scoring_step to 0 will do the trick, i just don't know how to get or set those)

tired kestrel
tired kestrel
#

no "copied"

#

wait.

#

huh.

#

strange.

#

cause orginally I thought it's supposed to be like this (I know it's a rough edit):

#

Like when the joker starts it also gets the playing card to trigger and then the card would display the number

tired kestrel
red flower
#

sorry your effect it's a bit complicated lol I would need to try it out myself but I'm not at home rn

#

I would try asking eremel again later

tired kestrel
#

Yeah, but right now I think what I had is just enough until the time to ask again but yeah...

slender zenith
#

hey, anyone know why this isnt working?

#

its meant to loop through all other cards, and if theyre infected, add the chips variable from that card to the current card

red flower
#

for _, enhancement in pairs...

slender zenith
#

ohhhhhhhhhhhhhh

#

whoops

red flower
#

pairs gives you a pair of values

#

hence the name

slender zenith
#

thanks lmao

pure salmon
#

anyone know the sound effect name for fortune's nope?

slender zenith
manic rune
#

enhancement is a table of values, i thinj

#

i think

#

actually nvm

slender zenith
#

it has nothing to do with enhancements, it's not passing if scored_card == context.other_card then

manic rune
#

are you sure context.other_card actually exists

slender zenith
#

idk thats why i replied to the other guy

red flower
#

i think theres no other_card in main_scoring yeah

slender zenith
#

how else would i do this then?

#

wait idea nvm

red flower
#

idk what you want to do

slender zenith
#

my idea was stupid and didnt work

slender zenith
red flower
#

if scored_card ~= card then

slender zenith
#

thats the first thing i tried what

#

maybe i had an error elsewhere

#

wait im actually stupid

#

i wrote =~ 😭

slender zenith
#

thanks everyonee

gilded narwhal
#

Guys how exactly does the weighting system work for balatro

#

For booster packs

red flower
#

(boosters are similar)

pure salmon
#

why does this play the sound effect as soon as i play the hand? the effect and the message trigger at the right time

wintry solar
#

put sound = "cancel" in the return table instead

tired kestrel
#

apperently somehow the trigger card copy suddenly didn't get the copy mechanism to work.

#

somehow it didn't work to copy

tired kestrel
# tired kestrel

@wintry solarhey sorry to bother I somewhat figured out how I can get the playing card to copy work

#

except right now it did not go the way I thought of.

tired kestrel
#

sorry if I had to bother.

runic pecan
#

Should this +1 discard be permanent (like the voucher) or only for a round (like how some jokers change it)?

tired kestrel
#

just in case this is the code:

slender zenith
#

i adapted this idea a little, but this is what i ended up with, it also has a cool synergy with the virus joker as it converts cards before theyre scored

runic pecan
manic rune
#

i think it should only be temporary for the current ante or something, since the destroy effect itself is already pretty good

#

the perm discard pretty much makes it busted

manic rune
#

mhm, i think thats fine

runic pecan
#

Hmmm, but how do I reset it by the end of an ante, though?

manic rune
red flower
#

i hook calculate_context and check for context.end_of_round and G.GAME.blind.boss for my global effects

lucid owl
#

what happens if more than one mod takes ownership of a base item?

runic pecan
runic pecan
lucid owl
#

seems like a slight recipe for disaster

rugged helm
#

heyhey, would you mind sending the code you used to apply that shader? i'm trying to add a shader to a soul :3

brisk rose
#

Another day, anothe rewrite. Now the code basically identical the the SMODS.CardDraw, with the addition of going through and seeing what code results from that, and so on... and Negative still isn't dark mode, nor will the Ortalab shaders do much unless I disable the base dissolve shader, but then... a lot of the other things look like shit, and none of the things that are supposed to tell you to do that or not do much. Plus, they still don't look right at all even then

hard mica
slender zenith
#

bald jimbo

glad osprey
rapid stag
#

question, does anyone know the value of context.other_card.base.value when context.other_card is an ace?

plain apex
#

how does negative do the like +1 handsize/+1 joker slot while its there but properly go away when its played/removed/not there
trying to do something similar here (also dont understand how it does the text based on where it is) like i can sell it away on jokers with

if context.selling_self and card.ability.set == 'Joker' then
            G.jokers.config.card_limit = G.jokers.config.card_limit + 1
        end

but if that joker is destroyed the -1 joker slot effects are still there
and how do i check if its currently in the hand or whatever to remove / add the appropriate amount of handsize?

#

like this is what i've got so far and it partially works (unless its on a card in hand or you destroy the card)

SMODS.Edition({
    key = "Mythic",
    loc_txt = {
        name = "Mythic",
        text = {
            "{X:mult,C:white}X4{} to all values on this card",
            "{C:attention}-1{} Slot / {C:attention}-2{} hand size",
            "Idea: BoiRowan",
        },
    },
    discovered = false,
    unlocked = true,
    shader = 'nitro',
    in_shop = true,
    weight = 0.5,
    extra_cost = 4,
    badge_colour = HEX("ea763e"),
    apply_to_float = true,
    
    on_apply = function(card)
        -- Check if the card is a Joker and adjust slot limit
        if card.ability.set == 'Joker' then
            G.jokers.config.card_limit = G.jokers.config.card_limit - 1
        elseif card.ability.consumeable then
            -- Check if the card is a Consumable and adjust slot limit
            G.consumeables.config.card_limit = G.consumeables.config.card_limit - 1
        else
            -- If not a Joker or Consumable, grant a permanent chip bonus
            if card.base and card.base.value then
                local rank_value = SMODS.Ranks[card.base.value] and SMODS.Ranks[card.base.value].nominal or card.base.value
                card.ability.perma_bonus = (card.ability.perma_bonus or 0) + (rank_value * 3)
                card:juice_up()
            end
        end
        
        -- Apply Mythic enhancements to values in extra
        if card.ability and card.ability.extra then
            for key, value in pairs(card.ability.extra) do
                if type(value) == "number" then
                    card.ability.extra[key] = value * 4
                end
            end
        end
    end,
    
    on_remove = function(card)
        -- Revert the effect of Mythic enhancements
        if card.ability and card.ability.extra then
            for key, value in pairs(card.ability.extra) do
                if type(value) == "number" then
                    card.ability.extra[key] = value / 4
                end
            end
        end

        -- Restore Joker slot if it was a Joker
        if card.ability.set == 'Joker' then
            G.jokers.config.card_limit = G.jokers.config.card_limit + 1
        elseif card.ability.consumeable then
            -- Restore Consumable slot if it was a Consumable
            G.consumeables.config.card_limit = G.consumeables.config.card_limit + 1
        else
            -- Remove the chip bonus if it was applied
            if card.base and card.base.value then
                local rank_value = SMODS.Ranks[card.base.value] and SMODS.Ranks[card.base.value].nominal or card.base.value
                card.ability.perma_bonus = (card.ability.perma_bonus or 0) - (rank_value * 3)
                card:juice_up()
            end
        end
    end,
    
    
    calculate = function(self, card, context)
        if context.selling_self and card.ability.set == 'Joker' then
            G.jokers.config.card_limit = G.jokers.config.card_limit + 1
        end
        
        if context.selling_self and card.ability.consumeable then
            G.consumeables.config.card_limit = G.consumeables.config.card_limit + 1
        end
        
        if context.hand_drawn and card.ability.set ~= 'Joker' and not card.ability.consumeable then
            G.hand.config.card_limit = G.hand.config.card_limit - 2
        end
        
        --this doesn't work and you still need to figure out how to dynamically change handsize based on if this is in the hand or not
        if card.ability.set ~= 'Joker' and not card.ability.consumeable then
            G.hand.config.card_limit = G.hand.config.card_limit + 2
        end
    end,
})
cobalt iron
#

how do you adjust the sell value of a joker?

brisk rose
rapid stag
#

did you ever make any progress on this?

tired kestrel
plain apex
daring heron
tepid crow
rapid stag
# tepid crow I'm confused why don't you just... print it out

was wondering if anyone had it on hand or smth so that i didn't have to go through the trouble, while i was working on a joker functionality

i realised something and checked another thing and turns out i already had printed this value and worked it out before as part of my card art credits system. the .value for aces and face cards are literally just "Ace", "King", "Queen" & "Jack".

tepid crow
#

I guess I can see why you would ask instead of printing, but I don't see the point in bumping the question 30 min later. You could've printed it 10 times by that point

wintry solar
#

also, eval dp.hovered.base.value would be 10 seconds

rapid stag
#

i see cirDerp

hybrid shadow
#

how would i make localization text of a sticker in the localization file

rapid stag
hybrid shadow
rapid stag
#

...huh, all the stickers are in Other. interesting

#

in the table that gets retured from your localization file, you will want the structure something like lua descriptions.Other.[YOUR MOD STICKER KEY HERE], containing name = "[YOUR STICKER NAME TEXT HERE]" and text = { [YOUR STICKER DESCRIPTION HERE, EACH LINE STRINGS SEPARATED BY COMMAS, SUPPORTS MULTI-BOXING IN NEWER STEAMODDED VERSIONS] }

lofty sand
#

hey, I'm trying to yoink the ability from the arm boss blind to delevel played poker hand, does anyone know of a more elegant way to implement this than just ripping the code from the arm itself?

red flower
#

return { level_up = -1 }

#

i assume that works

lofty sand
#

dope, I'll give it a shot

#

also idk if you saw my message last night, but thank you SO much for showing me this file structure, it's so much easier to work with lmao

main mesa
#

Hey would anyone be able or willing to take a look at this crashlog? I crash when hovering over some jokers from extra credit, no clue why.

lofty sand
red flower
#

oh lol

rapid stag
#

oh is it balance = true in a joker return table for doing the plasma deck balance mechanic?

lofty sand
#

yep

#

it's pretty nice, much prettier code than the entire plasma deck code lol

hybrid shadow
rapid stag
hybrid shadow
#

i looked at the cryptid code for reference, apparently stickers dont have a unique prefix addition so i just used my mod's prefix (hmlt)

rapid stag
#

well if they did, it would be the prefix, then your mod prefix anyway

#

at least if other items are any consideration

hybrid shadow
#

yeah, i had the key as 'br_st' because 'breath' was already used with a joker

wintry solar
small finch
#

i found an old texture mod for cards i really like but it doesnt work what i do??
i think i can just edit the the assets a lil and put it in the actual balatro,
but id rather make a mod out of it

nimble gyro
#

hey yall just joined. any documentation to start off with yall can point me to?

shut crater
#

Tbh I just open my whole Mods folder in vscode, so idk about adding to workspace and whatnot

spiral crown
#

currently trying to get a random skip tag and am working from the follwing line but getting nil from psuedorandom

add_tag(psuedorandom(Tag()))

anyone got any ideas?

shut crater
#

pseudorandom takes in a string and outputs a decimal between 0 and 1

#

You probably want to select a tag from the table of all tags

spiral crown
shut crater
#

It's probably stored in G.P_CENTERS

manic rune
#

p sure its in G.P_TAGS or something

shut crater
#

Usually there are SMODS utilities for randomness but I don't think there's one for tags since there is no vanilla support for random rags

manic rune
long sun
#

hi again! i've got this ability:
(Uncommon) Score cannot exceed Blind requirements until final hand of round

#

how do i cap the score, as needed? (i'm not gonna use Cryptid's method, btw)

crisp coral
#

you have to patch into the same place Cryptid patches

shut crater
#

I imagine you'd have to do a lot of patching

long sun
#

grand, thanks ^^

#

do you know where Cryptid patches? in case you do, to save me searching for it

wintry solar
#

Nah that’s like a single line patch I think

#

Just target where it checks to see if you beat it, and if it’s not the last hand cap the score at target score -1

long sun
#

grand ^^

#

thanku!

pale venture
#

is there a way to check if you're in the continue page of the main menu?

glad osprey
#

how do i pass a sprite to a shader

hard mica
long sun
#

okay, i've got no clue how to patch this =w=

#

i have Cryptid's TOML file, but don't know if i need it

#

@wintry solar sorry to bother again, what exactly should i do? :P

#

cause, like

#

okay mm lemme map everything out

#

i wanna assign an attribute to the Joker, called bfdi_can_only_win_on_final_hand

#

then, in the patch, check, in a for loop, if any owned Jokers have that attribute = true

#

if so, cap the score

#

the problem is, i want this to work with Cryptid too

#

and all other mods that cap the score

#

but, patching the line will either remove Cryptid's cap, or mine

#

argh this is making my head hurt

#

i'll work on another Joker until i know what to do

stiff locust
#

does get_joker_win_sticker() only work on jokers
i need to do it for a deck

long sun
#

mm, that didn't take as long as expected

#

will brainstorm new abilities for other jokers ^^

nimble orchid
#

hello i'm new and trying to figure out how to make a midas mask adjacent joker but not really sure what i'm doing, i'm looking through the code of the 10 example jokers but can't find anything for enhancing cards

sturdy compass
red flower
#

I'm not doing anything other than jokers so I would really appreciate any other types of objects

sturdy compass
#

heard

#

I've been itching to work on smthn since I've been waiting for art on my other projects so this'll be a nice way to pass time while contributing to the community lol

polar star
#

I've been endlessly trying to code it so diamonds gain +10 chips, but so far I haven't seen any results. Any ideas why this doesn't seem to do anything?

rugged helm
#

PINK FLOYD JOKER??

polar star
#

possibly :3

rugged helm
#

fellow pink floyd enjoyer

red flower
sturdy compass
#

I wonder if adding a message_card to the return table would help? I think I remember seeing people with similar issues get it fixed like that oddly

polar star
#

thanks!

sturdy compass
#

Ahh that'll do it

red flower
#

changes to config need a new instance of the joker

sturdy compass
#

^

#

Restarted runs essentially have Jokers hold their old code

rugged helm
polar star
rugged helm
#

incredible

#

do you perhaps need more coders ..

polar star
#

hmmm, for now I wanna keep it just a fun project between my and my partner

rugged helm
#

perfectly fair :3

polar star
#

but maybe someday

sturdy compass
#

I think someone else was also doing an album mod but I haven't seen them around lately

rugged helm
#

WYWH the only pink floyd album you're doing?

polar star
lofty sand
#

I'm trying to figure out how to only return { level_up = -1 } if the level is greater than one, does anyone know how I could do this?

lofty sand
red flower
#

if G.GAME.hands[handname].level > 1 then

sturdy compass
#

This is what I was thinkin' of

red flower
rapid stag
#

question - if i do SMODS.poll_enhancement({ guaranteed = true }), this will generate a guaranteed enhancement, right?

additionally, i'm assuming that this will just return an enhancement key. how do i apply this to a playing card? cirDerp

rapid stag
red flower
#

set_ability accepts keys with smods

rapid stag
#

ahhh

red flower
#

but yes

long frigate
#

how do i affect the code of a pool such as making a joker specifically affect another card in the pool - once the joker is enabled it reactivates a planet cards pool if holding or if isnt holding when is holding lets you find more

next timber
#

why no icon :(

turbid maple
#

you didnt set y

#

thats why methinks

next timber
#

its. an animated atlas

#

they dont need y

#

right

turbid maple
#

y is the row

next timber
#

weird, this code is basically verbatim copied from my other mod and that one worked fine

turbid maple
#

🤔

red flower
next timber
#

yeah setting y instead of x worked

#

dunno why i dont have that issue for my other mod

lofty sand
red flower
#

it's because you have talisman installed :3

lofty sand
#

damn :(

#

is there a way I could make it compatable with talisman?

red flower
#

if you're using the vanillaremade repo see the note at the bottom of the file

small finch
#

i replaced the 8BitDeck in Balatro bc i dont knovv hovv to make a mod for it and got this anybody knovv y?

minor magnet
#

is there a way to discard cards automatically

#

discard_cards_from_highlighted doesn't really work for what i need

crisp coral
#

draw_from_hand_to_discard?

#

or just draw_card

red flower
#

oh i didnt know hook highlighted them first

lofty sand
wintry solar
#

Easiest way to make it compatible with talisman is to uninstall talisman and pester the devs of it to fix the problem

lofty sand
#

lmao REAL

red flower
wintry solar
#

Having a mod that requires every other mod to write stuff in a certain way on the off chance it’s installed is not healthy for the modding scene

lofty sand
#

fr

#

very annoying

scarlet thorn
#

I haven't had any issues with talisman so far

lofty sand
#

if I use that format will talisman be a depenency? that's annoying

red flower
#

no

lofty sand
#

ah okay dope

#

I thought defining to_big was required regardless

red flower
#

it is, but you can make a dummy function

#

oh i only use to_big once, nice

lofty sand
red flower
#

yes i dont know what context.level is tho

lofty sand
#

I assume its the level of the played hand, but im not sure either tbth

#

or wait no that wouldn't work

#

I'm just trying to get that value to one, idk what I'm going on about lol

red flower
#

to_big(G.GAME.hands[context.scoring_name].level) > to_big(1)
?

#

i dont think you need to_big for the first one but i included it in the example just in case

lofty sand
#

yeah, my brain was overcomplicating it for no reason

spiral crown
#

Okay, attempting to get my joker to message the name of the tag randomly chosen in the following code currently it is coming back as nil. My line of reasoning is msg should be equal to the table of the tag and by calling the key that I want 'name" I should get the player legible name of the tag. Any ideas?

lofty sand
#

is there a specifically a context for a hand leveling down? lol

red flower
red flower
turbid maple
#

the arm does it????

red flower
#

oh if they want a context to see when a level goes down then yes

turbid maple
#

i assumed he means a context that triggers when a hand is lvbelled down

#

ye

spiral crown
red flower
#

you probably need to hook level_up_hand

floral flicker
#

does anybody know how i can tag a seal like i can get a stone card with m_stone ?

#

it is for deactivate the gold seal in a challenge.

red flower
#

seals are just like "Gold" and "Red"

floral flicker
red flower
#

idk if you can ban them in challenges tho

cobalt iron
#

is there a way to change the ante?

red flower
#

ease_ante iirc

tired kestrel
#

Sorry about the miscomment

#

I have been waiting mostly.

cobalt iron
red flower
#

ease_ante(modifier)

cobalt iron
#

thanks

minor magnet
#

does card_limit not work for enhancements

#

it seems to only work for editions

rugged helm
#

how do i apply a drawStep to a soul layer?

hybrid shadow
#

how do i make a sticker have an effect when its on a card thats held in hand

zealous glen
glad osprey
#

just as a sticker

rugged helm
#

trying to draw the Flame shader effect on only the mask (soul) of this card

glad osprey
rugged helm
#

elaborate

primal terrace
#

Hell yeah, I've got a concatenated value, this is a start

lofty sand
#

I've managed to disable planet cards LMAO, I don't think I understand hooking properly

formal parrot
zealous glen
next timber
#

buh?? this happened when selecting small blind (attached is crash log, error header thing, and a relevant patch)

glad osprey
#

(draw = function(self, card, argsithink))

floral flicker
#

Do somone know if we can deactivate money earned by selling joker, tarot, etc...

glad osprey
#

to draw a sprite you need to get the sprite from card.children and use sprite:draw_shader

nova eagle
#

i have a question

#

i havent gotten around to actually testing this joker yet

#

BUT

zealous glen
nova eagle
#

in theory

#
SMODS Atlas {
    key = 'one for all',
    path = 'one for all.png',
    px = '71',
    py = '95'
}

SMODS.Joker{
    key = 'joker3',
    loc_txt = {
        name = 'one for all',
        text = {
            'Get {C:attention}$1 {}for each owned {C:attention}joker {}',
            'at the end of each round.'
        }
    }
    atlas = 'one for all'
    pos = {x = 0, y = 0},
    blueprint_compat = false,
    rarity = 1,
    cost = 6,
    config = {extra = {dollars = 1}},
    local_vars = function(self, info_queue, card)
        return { vars + { card ability.extra.dollars}}
    end,
    calc_dollar_bonus = function(self, card)
        return card.ability.dollars
    end
}
zealous glen
#

You’re breaking vanilla

next timber
#

right im guessing i should take ownership. just now remembered thats possible

nova eagle
zealous glen
next timber
#

also i see you're jovial now

zealous glen
#

Just change the localization

glad osprey
rugged helm
# zealous glen Check my mod
        x = 2,
        y = 3,
        draw = function(card, scale_mod, rotate_mod)
            card.hover_tilt = card.hover_tilt * 1.5
            card.children.floating_sprite:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil,
                card.children.center, 2 * scale_mod, 2 * rotate_mod)
            card.hover_tilt = card.hover_tilt / 1.5
        end
    }```?
zealous glen
hard mica
#

is there a thing to reset the run through code? im making a joker that either resets your run or gives you 1000 mult

zealous glen
turbid maple
#

horrifying

next timber
zealous glen
#

Just put it in your localization file

nova eagle
zealous glen
#

Check my mod

next timber
#

awesome

nova eagle
next timber
#

but also if i want to give it new attributes im patching into the Blind class should i just take ownership anyways

dull sage
next timber
#

cause im adding a win condition that isnt chips

#

so blinds need a custom attribute for that

rugged helm
#

hmm now the mask just doesn;'t show up at all

#

wait

hard mica
rugged helm
#

whatth efuck

#

that's so simple

dull sage
#

Let me ask a question. The "text" object defines the text that pops up when you hover over the card right
And inside this text you can use placeholders like #1# and #2#.

My question is where does it pull the values to put in those place holders? Is the config variable or is it the loc_vars variable?

zealous glen
zealous glen
lofty sand
#

does anyone know if I'm using level_up = -1 correctly here?

        level_up = level_up or 0
        if context.level_up_hand and level_up == -1 then
            card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
            card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize{type = 'variable', key = 'a_mult', vars = {card.ability.extra.mult}}})
        end
    end```
#

I feel like I'm not

rugged helm
dull sage
#

That didn't really answer my question

rugged helm
#

it's giving a mouse_screen_pos error

zealous glen
red flower
zealous glen
#

and which ones you’re passing

lofty sand
modern kindle
#

Gamers 👋

dull sage
zealous glen
dull sage
#

But where do the placeholders get their values???

zealous glen
zealous glen
nova eagle
#

its telling me that the { on line 45 is not being closed, but it very much is...

any solve to this?

modern kindle
#

How are you

lofty sand
lofty sand
#

I love spreading misinformation

zealous glen
haughty wraith
modern kindle
lofty sand
dull sage
#

Apologies, I reread your response and I misunderstood. Been at this issue for a while

red flower
nova eagle
haughty wraith
modern kindle
#

N has always been special

zealous glen
red flower
rugged helm
hard mica
#

@red flower sorry for tag but idk if this is the smartest thing to do but it does show stuff

red flower
nova eagle
# zealous glen 53 and 54

it looks fine to me... i have it set the same way for my other joker, and it isnt causing any issues

hard mica
#

does anyone know how to reset run through code?

rugged helm
#
 nil - unknown 
card.ARGS.send_to_shader - unknown, is this needed for every shader call? 
nil - unknown
card.children.center - unknown
2 * scale_mod - unknown
2 * rotate_mod - unknown```
#

are the nils and send_to_shader universal

nova eagle
modern kindle
#

The comma my friend

zealous glen
red flower
#

you know you can crop screenshots right

nova eagle
#

OH

zealous glen
#

Read the shader code to see which args are necessary

modern kindle
#

Note one has a comma and one doesnt

nova eagle
#

IM AN IDIOT

#

I FORGOT THE COMMA SOB

dull sage
#

Then I'm kinda of at my wits end with this issue. Why is it when the value is updated in the back end, it never updates in the front end? It's always showing male for every instance of the Seal

modern kindle
#

I was waiting for you to get to it but you were just missing it lol

#

So I had to help a little

nova eagle
rugged helm
#

idk how the shader code works really

zealous glen
modern kindle
#

You need a comma after atlas line too

small finch
#

i replaced the 8BitDeck in Balatro vvith this bc i dont knovv hovv to make a mod for it and got this anybody knovv y this happening?

nova eagle
dull sage
nova eagle
#

ok i found the issue finally

hard mica
#

how could i put a gif as a sprite/joker

zealous glen
#

With difficulty

modern kindle
#

Just do what I do and think really hard about it and then dont do it

nova eagle
#

so now testing the joker is giving me issues

rugged helm
modern kindle
#

We call that some good early econ

nova eagle
#

is there a reason it isnt giving me money for each joker? im pretty sure i set it up right...

zealous glen
rugged helm
zealous glen
# rugged helm ?

Yes I think those are the external variables required by the Hologram shader

minor magnet
nova eagle
#

here it should be giving me $3

rugged helm
#

so then how would i have the card send the proper variables for Flame, considering that scale_mod and rotate_mod are the only apparent arguments passed into the shader?

nova eagle
#

$1 per joker

modern kindle
#

My head is a little empty right now but can't you just monkey it by checking how many are in g.jokers.cards and then calculate the dollar bonus there

zealous glen
nova eagle
#

i did use some code from both golden joker and abstract joker, so i thought it would work

hasty mist
#

dratula pfp

zealous glen
nova eagle
#

OHH I SEE WHAT I MISSED

nova eagle
minor magnet
#

is there an easier way to do this

modern kindle
#

I wish I got one dollar for every joker I had

rugged helm
#

so how would i modify that table

#

i'm not really good at lua if you can't tell -w-

thorn flame
#

how do i load multiple folders inside the main content folder? e.g from lucky rabbit

#

im looking at the main luas but like

next timber
#

for some reason when i set the localisation for the small and big blinds, hovering over them causes a crash from. not being able to find their colour, i think??

karmic heart
#

How can I make a joker wait two seconds during its trigger?

#

I want it to play a funny sound before ending the run, rather than immediately ending

hard mica
#

does this function not work anymore?

old bane
#

i think you mostly just have to loop through the content folder and then loop through each folder in the content folder so it would be a loop within a loop

old bane
hard mica
old bane
#

it should work

hard mica
#

ok nvm it works

old bane
#

maybe instead of having that long if statement do
return math.min(bonus, 0)

#

okay

hard mica
#

i just put it the wrong way

#

my joker doesnt appear in the shop , how can i make it appear in the shop?

red flower
hard mica
languid rover
#

Hello everyone I wanted to ask for any advice on making my first Mod, It's not too complicated (at least the idea isn't I am hoping), but I wanted a Mod which would allow the player to be unable to lose during Ante 1-4 in exchange for making Ante 5-8 1.5x harder. I am trying to make it so that the mod simply checks if the player would lose the run it instead first checks the ante number and then if it is 4 or lower gives the player an additional hand (This would not stop losing by deck out, but I think that's permissable given the context of how hard decking out in antes 1-4 is without winning)

turbid maple
#

Are you asking how to implement it

languid rover
#

I don't really have a lot of Lua experience but I've done a fair amount of programming in Python, JS, C#, and AHK. I managed to setup my mod folder and the Metadata json file. But I'm hitting a major wall with how to actual get the functionality working

rapid stag
#

question - if it's present, shouldn't calc_dollar_bonus() always be triggered at the end of the round regardless of whether or not it returns anything above 0?

turbid maple
#

I assumed it'd just make your hands stay at 0 so you don't get bonus money

bold sleet
#

clueless dumbass that doesn't know what they are missing

turbid maple
languid rover
turbid maple
#

I think the simplest way to approach this would be to find the code that 1. decrements the hand after each played and 2. triggers a game loss when hands remaining is 0

then patch it to do what you want

#

I can't help you dig for the relevant functions right now though because I'm not home and don't have access to the source code sorry

#

The only relevant function I remember is play_hand_from_highlighted? I think that's what it was called

#

might be a decent place to start

languid rover
#

that's okay, do you have any idea which files I might want to look at?

turbid maple
#

misc/(something)_functions.lua?

rugged helm
#

anyone have ideas for what this joker should do?

#

(reference to The Wall by pink floyd)

next timber
#

smth about stone cards maybe

rugged helm
#

's what i was thinking too

#

maybe it retriggers stone cards but has a 1 in 5 chance to break them

red flower
rapid stag
loud vortex
#

I've been searching through the smod github pages, and I haven't been able to find any way for a joker to detect specific cards or suits in the "before" context stage. trying to make a joker that turns all played clubs into glass if a king of clubs scores.

red flower
hard mica
red flower
red flower
#

check if the variable is false at any time

tawdry shale
#

tried adding a second joker today, i'm in SMODS.joker and i just copy and pasted and changed a few things but my first joker is gone

hard mica
tawdry shale
red flower
#

(or nil)

tired kestrel
tawdry shale
#

custom joker

tired kestrel
#

or a joker that is made for to be as a playing card?

#

oh.

tawdry shale
#

my first one that was working yesterday but now it's gone

tired kestrel
#

for a moment I thought it was a playing card that acts like a joker when played?

red flower
jagged pewter
#

can someone help me?

runic frigate
#

im trying to create a mod but it doesnt show up when i open the game, i have a mod.lua folder, a mod.json folder and assets and im really new too all this so im not sure, can anyone help me with this problem?

turbid maple
#

what's your directory structure

#

you see the mod menu at least, right?

turbid maple
polar star
#

this function deletes all playing cards (both played and in hand) instantly, but I'm more looking for something individually checks each playing card and destroys them if they meet a condition, how would I go about this?

red flower
#

context.destroy_card is also the card to be destroyed so if you want only hearts you would do context.destroy_card:is_suit("Hearts")
if you want only played cards then add a check for context.cardarea == G.play

polar star
#

hmm alright, I did try adding context.cardarea == G.play before but it crashed my game for some reason

#

I'll fiddle around with it some more

runic frigate
turbid maple
#

IIRC when I was fucking up my .json file it'd say something about that

runic frigate
#

so like how do i do that, im new to all this sorry

turbid maple
#

uhh you know how you launch balatro and you get the black screen with white text on it

runic frigate
#

lovely?

turbid maple
#

yeah

runic frigate
#

yeah

#

oh ill check

turbid maple
#

You can scroll through it and see if it mentions your mod at all

rugged helm
#
    key = 'thewall',
    rarity = 2,
    atlas = "renjokers", pos = {x = 0, y = 1},--- soul_pos = { x = 7, y = 0 },
    cost = 7,
    unlocked = true,
    discovered = true,
    eternal_compat = true,
    blueprint_compat = true,
    perishable_compat = false,
    config = {extra = { XChips = 1.5 } },
    loc_vars = function(self, info_queue, card)
    return {vars = {card.ability.extra.XChips}}
  end,
    calculate = function(self, card, context)
                    if context.cardarea == G.play and SMODS.has_enhancement(context.other_card, “m_stone”) then
                return {
                    message = localize({
                    type = "variable",
                    key = "a_xchips",
                    vars = { card.ability.extra.XChips },
                                        }),
                    xchips = card.ability.extra.XChips,
                                    colour = G.C.CHIPS,
                }    
            
                    end
   end,
}```
#

anyone know why i'm getting an attempt-to-index error for 'card'?

runic frigate
red flower
rugged helm
#

which context should i check for?

turbid maple
runic frigate
red flower
turbid maple
red flower
runic frigate
rugged helm
#

gives each stone card x1.5 chips

red flower
#

context.individual then

rugged helm
#

that the only one aside from the stone check?

tawdry shale
#

okay i fixed the problem sorta but my second joker has "xnil" mult still

turbid maple
red flower
rugged helm
#

hmm

#

it didn't seem to work

red flower
turbid maple
#

Looks like you just need prefix (this gets added to ids you create so two different mods do not end up with the same ids for stuff) and main_file (which lua file the loader should launch)

rugged helm
#
    key = 'thewall',
    rarity = 2,
    atlas = "renjokers", pos = {x = 0, y = 1},--- soul_pos = { x = 7, y = 0 },
    cost = 7,
    unlocked = true,
    discovered = true,
    eternal_compat = true,
    blueprint_compat = true,
    perishable_compat = false,
    config = {extra = { XChips = 1.5 } },
    loc_vars = function(self, info_queue, card)
    return {vars = {card.ability.extra.XChips}}
  end,
    calculate = function(self, card, context)
                    if context.individual and context.cardarea == G.play and SMODS.has_enhancement(context.other_card, “m_stone”) then
                return {
                    message = localize({
                    type = "variable",
                    key = "a_xchips",
                    vars = { card.ability.extra.XChips },
                                        }),
                    xchips = card.ability.extra.XChips,
                                colour = G.C.CHIPS,
                }    
            
                    end
   end,
}```
turbid maple
#

so yeah you haven't told the mod loader what file to actually load so it doesn't load your mod

runic frigate
#

i read it on the github thing and i dont understand

thorn flame
#

this worked

#

thabnm

#

THANKS

#

not thabnm

rugged helm
red flower
#

can i see the log

rugged helm
#

once i restart my puter yeah

turbid maple
#
{
    "id": "testmod",
    "name": "Test Mod",
    "description": "Gives a +5 multiplier when a 5 is played.",
    "version": "1.0.0",
    "author": "Luke453",
    "main_file": "change_me_to_the_name_of_the_file_that_contains_your_mod.lua",
    "prefix": "idk_man_whatever_you_want_as_long_as_it's_unique_to_your_mod_and_you're_fine_with_typing_it_a_over_and_over_again",
}
runic frigate
rugged helm
#

oh, you mean the in-game log

#

yeah there wasn't one it just stopped responding

#

didn't happen this time for some reason, but it's still not working

#

ah, okay

#

removing the stone and cardarea checks made it apply, but it applied to every card

runic frigate
nova eagle
#

how do i make this joker only give mult when a played hand contains a 7 rather than per played 7?

rugged helm
#

not just add that to each stone card

loud vortex
hexed heath
#

is there a way to get the current unix timestamp in milliseconds

turbid maple
rugged helm
#

got it working :3

zealous glen
rugged helm
#

oh no not the flames

#

i gave up on that for now

runic frigate
rugged helm
turbid maple
# nova eagle

context.individual triggers for each individual card
check the wiki for other available context flags

turbid maple
red flower
fiery lark
#

How easy is this game to mod

#

I have very very limited coding experience

zealous glen
fiery lark
#

Like write mods

zealous glen
#

@red flower bad placeholder wording but what do you think

fiery lark
#

Is it smth I could do with very limited coding experience

zealous glen
fiery lark
nova eagle
#

what would i need to change to make this only trigger if a 7 is in your played hand rather than per played 7?

#
SMODS.Joker {
    key = 'joker4',
    loc_txt = {
        name = 'Seven Eleven',
        text = {
        '{C:red}+11 {}mult if played hand',
        'contains a {C:attention}7{}.'
        }
    },
    atlas = 'Seven Eleven',
    pos = {x = 0, y = 0},
    blueprint_compat = true,
    rarity = 1,
    cost = 6,
    config = { extra = { mult = 11 }},
    local_vars = function(self, info_queue, card)
        return { vars = {card.ability.extra.mult}}
    end,
    calculate =function(self, card, context)
        if context.individual and context.cardarea == G.play and context.other_card:get_id() == 7 then
            return{
                mult = card.ability.extra.mult
            }
        end
    end

}
shut crater
zealous glen
#

I noticed I have been inconsistent with "negative" and "Negative" before

red flower
nova eagle
zealous glen
nova eagle
#
SMODS.Joker {
    key = 'joker4',
    loc_txt = {
        name = 'Seven Eleven',
        text = {
        '{C:red}+11 {}mult if played hand',
        'contains a {C:attention}7{}.'
        }
    },
    atlas = 'Seven Eleven',
    pos = {x = 0, y = 0},
    blueprint_compat = true,
    rarity = 1,
    cost = 6,
    config = { extra = { mult = 11 }},
    local_vars = function(self, info_queue, card)
        return { vars = {card.ability.extra.mult}}
    end,
    calculate =function(self, card, context)
        if context.individual and context.cardarea == G.hand and context.other_card:get_id() == 7 then
            return{
                mult = card.ability.extra.mult
            }
        end
    end

}
#

this is what i have so far

runic frigate
#

wait i can see it in the mod section now i think i fixed it

#

thanks for the help @turbid maple

primal robin
hard flume
#

Hihi!

nova eagle
crystal flicker
#

i feel like the solution is simple here to make sure the text shows up correctly as per the calculation done to the "extra" variable, but would that mean i need to do my calculation in the loc_var function? when i tried that it gave me a weird bug where it calculated correctly but then changed it to 0chipsx0mult to there was no way to win the round

red flower
wild escarp
#

How should I be using remove? because this code just destroys all held and played cards.

if context.destroy_card and not context.blueprint then
    for i = 1, #context.scoring_hand do
        if context.scoring_hand[i]:get_id() == 2 then
            return
            {
                remove = true
            }
        end
    end
end
turbid maple
#

so youd have to check if context.destroy_card:get_id() == 2

wild escarp
#

Alright, thanks.

turbid maple
#

i forgor how to check if its part of your scoring hand though

shut crater
# nova eagle ```lua SMODS.Joker { key = 'joker4', loc_txt = { name = 'Seven E...

Ah I misunderstood what you meant by hand originally. So go back to context.cardarea == G.play, but you'll use context.joker_main instead of context.individual. The problem with that is that context.other_card only works for context.individual, so you'll have to iterate over G.play.cards and manually check if any card is a 7

turbid maple
#

oh theres context.scoring_hand right

wild escarp
#

I have scoring_hand inside destroy_card right now, maybe flip that?

nimble orchid
#

how do i mention a variable in the description of a joker?

turbid maple
#

no just like

check if context.destroy_card exists

then check if destroy_card is a 2 and is inside scoring_hand

#

so uhh actually you could just add another condition to that if

faint yacht
crystal flicker
faint yacht
#

Make it a local variable in loc_vars too.

crystal flicker
wild escarp
faint yacht
#

...fair enough.

nimble orchid
faint yacht
wind steppe
#

how do i do mod config

red flower
#

copy from another mod's config

nimble orchid
hasty mist
#

why does this trigger twice?

#

and why cant i hover over it

celest timber
#

how do i check if a card is highlighted?

runic frigate
#

how do i give myself a joker to test if it works

wind steppe
runic frigate
#

thanks

loud vortex
wind steppe
#

where would i find another mods config files (as in the files that display and save the config settings not the settings themselves)

sturdy compass
#

Just PR'd VanillaRemake with backs 🔥

red flower
#

thank you!! ill check it and merge tomorrow

sturdy compass
#

I'm probs gonna keep doing more work on it through tonight so there may be a few more when you go to merge

nova eagle
#

can someone help me make it so that this joker only triggers once if the played hand contains a 7?

turbid maple
#

you are checking individual cards with that

sturdy compass
#

You wouldn't use context.individual for this, individual is for every card of that type

nova eagle
#

so what would i use?

sturdy compass
#

You'd probably run this through context.joker_main, loop through context.scored_hand, and return your mult if you come across a 7

turbid maple
#

joker_main

#

what he said

#

yeah

#

thats the "standard" context that triggers once when a hand is played

red flower
#
if context.joker_main then
    for _, pcard in ipairs(context.scoring_hand) do
        if pcard:get_id() == 7 then
             return { mult = card.ability.extra.mult }
        end
    end
end
turbid maple
#

individual is for triggering an effect for each card individually

sturdy compass
#

Mans was quick with it

red flower
#

programming on phone is a pain im never doing it again

nova eagle
red flower
#

no

sturdy compass
red flower
#

there's no other_card in joker_main and cardarea == G play is never true

wind steppe
#

rental_compat works the same way as eternal_compat and persihable_compat right?

celest timber
#

how do i check if a card is on the G.hand.highlightedlist?

wind steppe
#

steammodded documentation only mentiones eternal, perishable, and modded stickers

red flower
wild escarp
#

I've got this code, which ends up destroying all 2s, played and held in hand. How can I make it affect only played 2s?

if context.destroy_card and not context.blueprint then
    for i = 1, #context.scoring_hand do
        if context.scoring_hand[i]:get_id() == 2 and context.destroy_card:get_id() == 2 then
            return
            {
                remove = true
            }
        end
    end
end
red flower
#

context.cardarea == G.play

celest timber
nova eagle
red flower
#

you're missing an end
also if you ask for every single syntax error you're not going to learn lol

shut crater
nova eagle
#

thats really helpful to know

#

previously i just had no clue what that did

lofty sand
#

yo after looking into hooks, I'm not sure it's what I want for the joker. the idea of the joker is to add mult to the joker whenever the hand delevels, regardless of if its from the effect of the joker or not (i.e. from the arm). does the arm use level up = -1 ? cause if it doesn't wouldn't a hook not work for that?

shut crater
red flower
#

the arm uses level_up_hand(), same as returning level_up directly so yes you want to hook that

lofty sand
#

got it okay

hexed heath
#

cooking

celest timber
lofty sand
#

pay to win

#

(joking, that's really funny)

hexed heath
#

open more tabs for more mult

lofty sand
runic frigate
hexed heath
nova eagle
#

nope, im stuck on this again

#

the } at the very end is whats giving me issues

turbid maple
#

literally p2w

nova eagle
red flower
#

you're still missing an end

#

the same one

nova eagle
#

ohh i see now

#

that seems to have done the trick

#

OHHHH I MISSED THE FUNCTION

#

cool, the joker works great now

#

thanks for the help

shut crater
#

click that and search for lua and then install it

nova eagle
#

i got no clue where to even find that

celest timber
#

uhm, so what im doing is discarding cards the moment they get drawn, but for some reason it discards like 2 times and then it stays like this, do i have to add a delay or something?

red flower
nova eagle
#

ah

loud vortex
vast bough
#

might be a silly question but what is the code for checking if a scored card is of a specific seal im going insane tryna bruteforce it

loud vortex
#

I feel like I'm going insane, and like I'm retaining no info despite scanning steammodded's github for literal days 😭

red flower
#

that's an example of how to use the context to iterate through a hand and check a condition

#

you need to change the is_face check for the other checks you want to do

#

kings are 13

red flower
torpid plume
#

hey y'all
i'm trying to make a joker (for learning purposes lmao) that converts all played cards into Polychrome Red Seal Steel Kings.
i know how to do the steel part (looking at the code of Midas Mask) but i have no idea what the syntax is for the edition, seal, and rank

#

any help would be appreciated

red flower
#

card:set_edition("e_polychrome")
card:set_seal("Red")
SMODS.change_base(card, nil, "King")

midnight coyote
torpid plume
modern kindle
#

im gonna have to max my numbers more if i want true use out of that ram joker....

hexed heath
#

DAMN

#

that's enough ram to open 3 chrome tabs

modern kindle
#

woah there, dont get ahead of yourself, its 2

modern kindle
celest timber
#

how do i get the max hand size?

vast bough
#

ram has gotten so much cheaper in the last like 5 years. i remember paying like 150 for an 8gb stick maybe a decade or so ago

midnight coyote
hexed heath
#

2 tabs + a new tab page

vast bough
#

verifiably true

midnight coyote
#

i hardly even use 9GB 😭

modern kindle
midnight coyote
#

i have 5 chrome tabs, discord, balatro, intellij, aseprite, 2 terminals open

midnight coyote
#

i see

#

restart that every so often

#

memory leaks are a bitch

vast bough
lucid owl
#

where are retriggers calculated? currently working on a joker whose effect triggers every time a card is retriggered

shut crater
lucid owl
#

yeah i'm beginning to realize this is a journey i may regret

#

unfortunate because the effect is very cool

midnight coyote
red flower
midnight coyote
#

i would SMODS.calculate_context on retrigger jokers

vast bough
midnight coyote
#

just make your own context

lucid owl
#

never done that before

#

what's the path for making a custom context exactly?