#💻・modding-dev

1 messages · Page 124 of 1

sturdy compass
#

::)

livid tapir
#

nvm jsut destroying everything but aces and tens

tall wharf
#

SMODS.Joker {
    atlas = 'AikoyoriJokers',
    pos = {
        x = 4,
        y = 0
    },
    key = "Netherite Pickaxe",
    rarity = 1,
    cost = 3,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {card.ability.extra.chip_add, card.ability.extra.chip_add_stack}
        }
    end,
    loc_txt = {
        name = "Netherite Pickaxe",
        text = {"{C:chips}+#1#{} Chips for {C:attention}#2#{} times",
        "for every {C:attention}Stone{} Cards scored",
        "{C:red,E:1}Destroys that card"
    }
    },
    config = {
        name = "Netherite Pickaxe",
        extra = {
            chip_add = 64,
            chip_add_stack = 5,
        }
    },
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if context.other_card.ability.name == "Stone Card" then
                
                for i = 1, card.ability.extra.chip_add_stack do
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            SMODS.eval_this(card, {
                                chip_mod = card.ability.extra.chip_add,
                                instant = true,
                                colour = G.C.CHIPS,
                                message = localize {
                                    type = 'variable',
                                    key = 'a_chips',
                                    vars = {card.ability.extra.chip_add}
                                },
                            })
                            
                            return true
                        end,
                        trigger = "before",
                        delay = 0.2,
                    }),'base')
                end
                
                G.E_MANAGER:add_event(Event({
                    func = function()
                        context.other_card:start_dissolve({G.C.BLUE}, nil, 1.6, false)  
                        return true
                    end,
                    delay = 0.5,
                }),'base')
            end
        end
        if context.destroying_card and not context.blueprint and not context.destroying_card.ability.eternal then
            return true
        end
    end,
    blueprint_compat = false
}
#

ill come back tomorrow

sturdy compass
#

I lowkey forgot I was on mobile so the formatting is absolutely horrendous and unreadable for me lmfao

tall wharf
#

here is the important bit

wintry solar
#

no not at all

livid tapir
sturdy compass
wintry solar
tall wharf
#

i want to add it in 5 stacks of 64

#

because giving flat 320 is kinda boring

wintry solar
#

I see

#

you don't need the event

tall wharf
#

do i just loop that 5 times

#

and it will work

stiff locust
#

yeah

#

do SMODS.poll_enhancement and poll_seal require the card to not already have an enhancement/seal to work

wintry solar
#

you don't need a card to poll

#

polling just gives you the key of a enhancement/seal

stiff locust
#

no but I want to apply a random enhancement and seal to a card and it's not working even though I did everything right

#

in context.before

wintry solar
#

set_ability needs a center given to it, not a key

tall wharf
stiff locust
#

how do I get it to work with a key instead of a center

wintry solar
#

just put the key in G.P_CENTERS[keyhere]

stiff locust
#

oh

wintry solar
#

the seal one should work though

stiff locust
#

so would this work
value:set_ability(G.P_CENTERS[SMODS.poll_enhancement({guaranteed = true, type_key = 'waterenhance'})], true, false)

livid tapir
#

guys how do i change the amount of discards

stiff locust
#

also yeah the seal's just not working, but it doesn't crash either, it does juice_up and then nothing happens

livid tapir
#

im tryna do a test and need more discards

stiff locust
#

hold tab with debugplus it probably has a thing for +discard

wintry solar
#

yeah that enhancement should work now

livid tapir
#

oh yea it does

tall wharf
candid epoch
#

holy

stiff locust
hardy viper
#

lovely like the runtime code injector for games built with love2d?

tall wharf
#

yes

#

(i have patched some code)

candid epoch
#

i really love the lego version

vagrant cedar
vagrant cedar
stiff locust
#

okay uhh

#

i did a stupid

#

forgot to put the code that sets enhancement/seal inside the context

#

the end was in the wrong place

#

it's still not working

livid tapir
#

i just realized i was looking at the actual hand instead of the played one

#

OMFG

#

pluh

dark kite
#

can hooks be used to add custom colors? for text formatting

stiff locust
#

okay i've got nothing

vagrant cedar
#

I'm just trying to make a simple Joker that just gives 69 mult, anyone know what I did wrong?

stiff locust
#

idk what i'm doing wrong here

livid tapir
#

guys please help idk what to do

SMODS.Joker {
    key = 'jjj',
    loc_txt = {
        name = "J. J. Joker",
        text = {
            "Retrigger entire hand",
            "if played hand contains",
            "an {C:attention}Ace{} and a {C:attention}10{}"
        }
    },
    rarity = 2,
    atlas = 'atlas',
    pos = {x=3, y=0},
    cost = 7,
    calculate = function(self, card, context)
        if context.joker_main then
            local has_ace = false
            local has_ten = false

            for _, hand_card in ipairs(G.hand.cards) do
                if hand_card:get_id() == 14 then
                    has_ace = true
                elseif hand_card:get_id() == 10 then
                    has_ten = true
                end

                if has_ace and has_ten then
                    break
                end
            end

            if has_ace and has_ten then
                local result = {}

                for i = 1, context.joker_count or 1 do
                    for _, hand_card in ipairs(G.hand.cards) do
                        table.insert(result, {
                            message = localize('k_again_ex'),
                            repetitions = 1,
                            card = hand_card
                        })
                    end
                end

                return result
            end
        end
    end
}
``` it seems i have no idea how to check scoring hand, not only that there could be another issue of what im doing that i just dont know of
HELP
PLEASE AAAAAAAAAAA
wintry solar
#

marie can you send me the whole code block?

vagrant cedar
#

I used the example jokers file so I have no clue what is wrong with this. Just trying to give a joker 69 mult

violet void
# dark kite can hooks be used to add custom colors? for text formatting

I tried and failed, if you want to use a lovely patch here's what I used

# Add new colors
[[patches]]
[patches.pattern]
target = "globals.lua"
pattern = "RARITY = {"
position = "before"
payload = '''
    ALIGNMENT = {
        cs_patron = HEX("8bfe0f"),
        cs_joker = HEX("fefe15"),
        cs_wicked = HEX("f80404"),
        cs_keeper = HEX("feae0a"),
        cs_muggle = HEX("cccccc"),
        cs_hacker = HEX("febfe9"),
        cs_thief = HEX("0146fe"),
        cs_archon = HEX("23ee9c"),
        cs_drifter = HEX("b3e87a"),
        cs_heretic = HEX("b9a0e6"),
        cs_spectre = HEX("0dfefe"),
        cs_chameleon = HEX("cc03ed"),
    },
    CS_ORANGE = HEX("b03815"),'''
match_indent = true



# Add new colors
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "legendary = G.C.RARITY[4],"
position = "after"
payload = '''
    cs_patron = G.C.ALIGNMENT["cs_patron"],
    cs_joker = G.C.ALIGNMENT["cs_joker"],
    cs_wicked = G.C.ALIGNMENT["cs_wicked"],
    cs_keeper = G.C.ALIGNMENT["cs_keeper"],
    cs_muggle = G.C.ALIGNMENT["cs_muggle"],
    cs_hacker = G.C.ALIGNMENT["cs_hacker"],
    cs_thief = G.C.ALIGNMENT["cs_thief"],
    cs_archon = G.C.ALIGNMENT["cs_archon"],
    cs_drifter = G.C.ALIGNMENT["cs_drifter"],
    cs_heretic = G.C.ALIGNMENT["cs_heretic"],
    cs_spectre = G.C.ALIGNMENT["cs_spectre"],
    cs_chameleon = G.C.ALIGNMENT["cs_chameleon"],
    cs_orange = G.C.CS_ORANGE,
'''
match_indent = true```
stiff locust
# wintry solar marie can you send me the whole code block?
calculate = function(self, card, context)
        if context.before then
            for index, value in ipairs(G.play.cards) do
                value.cut = false
                if value.ability_name == "Stone Card" then
                    value:set_ability(G.P_CENTERS[SMODS.poll_enhancement({guaranteed = true, type_key = 'waterenhance'})], true, false)
                    value:set_seal(SMODS.poll_seal({guaranteed = true, type_key = 'waterseal'}), true, false)
                    value:juice_up()
                    value.cut = true
                end
                if card_is_splashed(value) == true and value.cut ~= true then
                    value:set_ability(G.P_CENTERS.m_stone, nil, true)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            value:juice_up()
                            return true
                        end
                    }))
                end
                value.cut = false
            end
        end
    end

right now it's this

the part that makes every unscored card into a stone card works as expected
but I want the random enhancement + seal to trigger first, and any card with the random enhancement/seal won't be turned back into a stone card by the second effect

#

which is what value.cut is supposed to do

violet void
tall wharf
violet void
stiff locust
wintry solar
vagrant cedar
#

Anyone able to VC and help me fix my single Joker mod? It should be really simple because it's just one Joker that gives static mult

stiff locust
#

I haven't gotten the enhancement/seal effect to even run

tall wharf
#

ill get some sleep

wintry solar
#

change if value.ability_name == 'Stone Card' then to if value.config.center_key == 'm_stone' then

violet void
livid tapir
tall wharf
#

anyway

tall wharf
#

I'm going to add new blinds tomorrow

#

for no reason

stiff locust
#

is there any way I can make poll_enhancement ignore stone card but generate any other enhancement

dark kite
#

attempt to index field 'G' [a nil value]

wintry solar
#

just check if it's stone or not and repoll if it is

violet void
tall wharf
#

what does poll_enhancement do actually

dark kite
#

ok wait nvm i fucked up on my end LMAO

stiff locust
dark kite
#

yay yay yay it worked imagine me showering you in confetti

rough furnace
tall wharf
dark kite
#

quick fix tho

stiff locust
#

it's amazing

#

and it's free

tall wharf
#
local NON_STONE_UPGRADES = {}

for k, v in pairs(G.P_CENTER_POOLS["Enhanced"]) do
    if v.key ~= 'm_stone' then
        NON_STONE_UPGRADES[#NON_STONE_UPGRADES + 1] = v
    end
end
violet void
#

is it an even chance for each enhanchment or is poly rarer

stiff locust
#

it's enhancement, not edition

dark kite
#

you know what the hardest part of my mod is gonna be. how tf is flower pot gonna work if theres more suits than there are cards in a hand

violet void
stiff locust
violet void
#

but is it even

stiff locust
#

i think poll_ediiton weight goes foil < holo < poly < negative

dark kite
#

erm... thats lame!!

stiff locust
#

i cant imagine why poll_enhancement or poll_seal would have different weights

dark kite
#

i was thinking having it be any four different suits

rough furnace
#

IIRC poy and negative have the same rarity

tall wharf
#

wheel of fortune 2

stiff locust
tall wharf
#

New spectral card idea
50% go to the boss blind immediately
50% go to ante 1

violet void
livid tapir
# violet void idk what context.joker_count is shouldnt you be using #G.jokers.cards? also th...

ok fixed and it still does nothing
i just have some gut feeling that i used a single wrong parameter or smth and its fucking it up
heres my calculate

    calculate = function(self, card, context)
        if context.joker_main then
            local has_ace = false
            local has_ten = false

            for _, hand_card in ipairs(G.play.cards) do
                if hand_card:get_id() == 14 then
                    has_ace = true
                elseif hand_card:get_id() == 10 then
                    has_ten = true
                end

                if has_ace and has_ten then
                    break
                end
            end

            if has_ace and has_ten then
                local result = {}

                for i = 1, #G.jokers.cards or 1 do
                    for _, hand_card in ipairs(G.play.cards) do
                        table.insert(result, #result+1, {
                            message = localize('k_again_ex'),
                            repetitions = 1,
                            card = hand_card
                        })
                    end
                end

                return result
            end
        end
    end
livid tapir
tall wharf
#

how do you actually flip it and flip back

#

do you just make an event to do it or something

violet void
# tall wharf do you just make an event to do it or something

I made it into a utils function

    for i=1, #table do
        local percent = 1.15 - (i-0.999)/(#table-0.998)*0.3
        G.E_MANAGER:add_event(Event({trigger = trigger,delay = delay,func = function() table[i]:flip();play_sound('card1', percent);table[i]:juice_up(0.3, 0.3);return true end }))
    end
end

function cs_utils.unflip_cards(table, trigger, delay)
    for i=1, #table do
        local percent = 0.85 + (i-0.999)/(#table-0.998)*0.3
        G.E_MANAGER:add_event(Event({trigger = trigger,delay = delay,func = function() table[i]:flip();play_sound('tarot2', percent, 0.6);table[i]:juice_up(0.3, 0.3);return true end }))
    end
end```
#

yes its events

stiff locust
violet void
#

thats its intended effect tho

stiff locust
#

then why did you write "and vice versa"

violet void
#

it found a better hand

stiff locust
#

.

livid tapir
#

(Finds a better hand if possible)

stiff locust
#

i don't understand the design philosophy but pop off I guess

#

also uhh

#

objection

#

a five of a kind with 9s is better than one with 6s

#

it did not find the best hand it could make

#

🤓 ☝️

violet void
#

oh yeah I turn the fewer cards into the ones that there are the most of

stiff locust
tall wharf
stiff locust
#

balatro monopoly mod

tall wharf
#

noooo 😭😭😭😭

stiff locust
#

might do that at some point

#

i say might because I already have another mod idea to do first and i've already got tsunami to deal with

wintry solar
#

base enhancements and seals all have the same weight, editions are foil:20, holo:14, poly:3, negative:3 but in a no_neg poll poly is 6

stiff locust
#

noted

wintry solar
#

iirc, enhancements and seals default to a weight of 5 for comparison with modded content

livid tapir
#

once i get this workng.... >:)

livid tapir
livid tapir
violet void
#

um... can you return a table like that for repetitions?

livid tapir
#

i have no idea its just what i thought from hack 😭

violet void
#

what happens if you return what youre inserting in the table in the for

livid tapir
#

probably bad

#

ngl

#

lets see

livid tapir
#

and does nothing

#

sadlys

violet void
#

I dont think you can retrigger jokers like that

livid tapir
#

but yeah i dont think thats gonna work to retrigger the entire played hand

#

here is what im doing rn

SMODS.Joker {
    key = 'jjj',
    loc_txt = {
        name = "J. J. Joker",
        text = {
            "Retrigger entire hand",
            "if played hand contains",
            "an {C:attention}Ace{} and a {C:attention}10{}"
        }
    },
    rarity = 2,
    atlas = 'atlas',
    pos = {x=3, y=0},
    cost = 7,
    calculate = function(self, card, context)
        if context.joker_main then
            local has_ace = false
            local has_ten = false

            for _, hand_card in ipairs(G.play.cards) do
                if hand_card:get_id() == 14 then
                    has_ace = true
                elseif hand_card:get_id() == 10 then
                    has_ten = true
                end

                if has_ace and has_ten then
                    break
                end
            end

            if has_ace and has_ten then
                local result = {}

                for _, hand_card in ipairs(G.play.cards) do
                    table.insert(result, #result+1, {
                        message = localize('k_again_ex'),
                        repetitions = 1,
                        card = hand_card
                    })
                end

                return result
            end
        end
    end
}
violet void
#

um no that doesnt look like it will work

livid tapir
#

ye uh but
i just wrote stuff 😭

violet void
#

relatable

livid tapir
#

i still dont get what retrigger api is and if it could help in this scenario

#

searching it up gave literally no info

rough furnace
#

just like do what photograph does

livid tapir
#

ok i have an idea
let me try smth

#

i MIGHTVE made something
now its just time to test

calculate = function(self, card, context)
        local has_ace = false
        local has_10 = false
        if context.cardarea == G.play and context.repetition and not context.repetition_only then
            if context.other_card == 14 then
                has_ace = true
            elseif context.other_card == 10 then
                has_10 = true
            end
            if has_ace and has_10 then
                if context.other_card then
                    return {
                        message = 'Again!',
                        repetitions = 1,
                        card = context.other_card
                    }
                end
            end
        end
    end
rough furnace
#

this will only retigger cards that are both aces and tens

#

actually not even

dark kite
#

take ownership is really annoying if im trying to change how calculation works

#

ough

rough furnace
#

this will only retrigger if other_card is both the number 10 and 14

#

the loop from before was correct

rough furnace
livid tapir
livid tapir
dark kite
#

i straight up just pasted the flower pot code in and edited it

#

so theres bound to be some error

#

most likely as to what im putting through the function

rough furnace
#

self in the vanilla code and smods code is different

#

should use card instead of self

#

self is the center

dark kite
#

ah

rough furnace
#

also the name check isn't nessicary

dark kite
#

i assumed it wasnt

rough furnace
#

but theres liely another check above that yopu are missing

livid tapir
rough furnace
#

no

#

like this loop was correct

livid tapir
#

ok

#

so what happens with the other loop
do i replace that with smth else

rough furnace
#

yeah the return from the second block

dark kite
livid tapir
#

?

violet void
#

why so much tabbed

rough furnace
#

why are you looping the return?

livid tapir
livid tapir
#
            if has_ace and has_ten then
                local result = {}

                return {
                    message = 'Again!',
                    repetitions = 1,
                    card = --[[i have no idea]]
                }
            end
rough furnace
#

yeah something like that

livid tapir
#

btw do i put card as G.play.cards bc well i dont see how id repetition the entire played hand a different way

rough furnace
#

the calculate is called for each card

livid tapir
#

oh
cool

#

so card = card

livid tapir
#

card is an argument of calculate, i assumed that was well
the card its on rn

rough furnace
#

card is your joker

livid tapir
#

oh
wait then what is self doing ther?

rough furnace
#

your center

livid tapir
#

oh ok

#

so then its a context?

#

context.other_card?

rough furnace
#

yes

livid tapir
#

ok imma test it now🤞

#

ok then :(

#

ok maybe its that i had 27 of them

#

i tried one and it did the same thing

#
    calculate = function(self, card, context)
        if context.joker_main then
            local has_ace = false
            local has_ten = false

            for _, hand_card in ipairs(G.play.cards) do
                if hand_card:get_id() == 14 then
                    has_ace = true
                elseif hand_card:get_id() == 10 then
                    has_ten = true
                end

                if has_ace and has_ten then
                    break
                end
            end

            if has_ace and has_ten then
                local result = {}

                return {
                    message = 'Again!',
                    repetitions = 1,
                    card = context.other_card
                }
            end
        end
    end
``` theres gotta be smth im missing here
#

ooh i have an idea

#

use config for has_ace and has_ten instead

#

maybe

rough furnace
#

wrong context

livid tapir
rough furnace
#

if context.cardarea == G.play and context.repetition and not context.repetition_only then

livid tapir
#

thx

#

still nothing AAAAAAA

#

ok so i added a debug print in the seconf if block and it doesnt even print

#

OH WAIT IM STUPID

#

YES IT WORKS

#

LETS GOO

#

tysm

dry merlin
#

what would be the best and easiest way to have a joker cycle through different abilities in sequential order? id really like it if i could find a joker that does something similar but i cannot, vanilla or otherwise
so you get the joker and it has abilities 1-7 lets say, and when you select a blind it moves onto the next ability (either starts at a random point or always starts at one)

livid tapir
#

i did a flush

#

the amount of lag is getting VERY PAINFUL

stiff locust
# dry merlin what would be the best and easiest way to have a joker cycle through different a...

assumes joker has config = { extra = { rotation = 7 } }

<calculate line>
if context.setting_blind then
  card.ability.extra.rotation = card.ability.extra.rotation + 1
  if card.ability.extra.rotation == 8 then
    card.ability.extra.rotation = 1
  end
end
---example rotation effect
if context.end_of_round and card.ability.extra.rotation == 1 then
---end of round effect
end

something like this should work
the rotation starts at 7 because if you get the joker from the shop, it will then advance the ability rotation by 1 on the next blind, so it actually starts at 1. If it started at 1 from shop, then it'd actually start at 2 in the next blind, which skips rotation 1, you can change the starting value for rotation if you don't like that, or during set_ability you can call a random value for the rotation to have it start on a random one

#

and it resets to 1 when it hits 8 so it goes 1 through 7 then back to 1

dry merlin
#

awesome, thank you so much!

stiff locust
#

anywho

#

how the hell do tags work

#

I thought I did everything right with mine but I keep getting this crash

#

and I can't understand the code around that line to figure out why it's happening

#

but I can only assume it's because of poll_edition

wintry solar
#

try moving the end after the return

stiff locust
#

ah shit

#

didn't work

#

identical crash

#

i assume you meant the end 4 lines from the bottom and the return 2 lines from the bottom

#

or did you mean the return/end at the top

wintry solar
#

the one near the bottom

#

oh

#

SMODS.create_card takes a table

#

not a load of args

stiff locust
#

oh

#

that changed the crash

#

attempt to call field 'poll_edition' (a nil value)

#

is this the same thing where it has to be a table

#

IT WORKED

#

uhhhh

#

okay new problem

#

or do I make it a feature

#

it's pulling a random edition from any edition including modded editions

#

I want it to just be foil/holo/polychrome how do I do that

wintry solar
#

you need to add an options table to poll_edition

stiff locust
#

can you elaborate

wintry solar
shut sigil
#

I'm trying to make deckskinslite accept my skin, but I can't seem to get it to work

stiff locust
#

it didn't work

#

i think i know how to fix it

#

but i don't like the fix

#

okay i don't know the fix

#

nevermind

#

I hate the fix

#

and now it hates me again.

#

it doesn't make any sense

stiff locust
#

card:set_edition(SMODS.poll_edition({_key = "bubble", _mod = nil, _no_neg = true, _guaranteed = true, _options = {"e_foil", "e_holo","e_negative"} } ) )
it says poll_edition is a nil value it's a function what does that even mean

#

i did everything it said to do

wintry solar
#

poll edition is a base game function

#

it doesn't take a table

stiff locust
#

why is it on the SMODS edition page

#

what do you mean it doesn't take a table it

wintry solar
#

because it's an important edition function

#

it takes individual arguments because it's a base game function

stiff locust
#

right great so I had it before

#

except that card:set_edition(poll_edition("bubble", nil, true, true, {"e_foil", "e_holo","e_polychrome"})) didn't work either because it just ignores the options

#

it's making a lot of cryptid editions

#

this is frustrating

wintry solar
#

can you run eval print(poll_edition("bubble", nil, true, true, {"e_foil", "e_holo","e_polychrome"})) a few times in debugplus?

stiff locust
#

i don't know what that means also I don't know how to run debugplus commands also I should probably update debugplus for this I haven't done that in a loooong time

#

figured it out

#

cry_glass

#

ran more

wintry solar
#

you have something messing with poll edition

#

do you have your entire mods folder open in your vsc workspace?

stiff locust
#

no but I can do that

#

got it open now

#

is it fucking gamblecore istg

#

okay no that just plays a sound

#

it does hook the function to play that sound and that's it

wintry solar
#

search function poll_edition

silk compass
#

Hey guys, anyway I can change the font of specific UI elements?

#

for example changing the font for the chip x mult calculation

stiff locust
wintry solar
#

no it's not cryptid

stiff locust
#

betmma vouchers showed up with this

#

other than that, it's Steamodded and Gamblecore, and gamblecore just hooks it to play a sound

wintry solar
#

can you show the gamblecore one?

stiff locust
#

oh my god it's the gamblecore one

#

it doesn't have the options part

#

that's why isn't it

rough furnace
#

run eval debug.getinfo(poll_edition)

wintry solar
#

yup

stiff locust
#

fuuuuuck

#

okay well

#

damn okay

#

i'll check if this issue is known and if it's not i will make a pr to fix

#

it has occured to me i have no idea how to do that

rough furnace
#

how to make a pr?

stiff locust
#

yeah

#

idk if thats even what i should do right now

rough furnace
#

I mena for someothing simple like this probably just edit from the githbu web view

wintry solar
#

is it your own mod?

stiff locust
#

no

#

i found the "fork this repository and edit this file" button

rough furnace
#

yeah

#

and then with the fork you can make a pr

stiff locust
#

huh

#

oh I see

#

okay right

#

I think I did it

#

I don't know how to check if I did it right

#

but it says I did it

#

that change does fix the issue and it now respects the options field

#

so yeah i guess that means my tag is done now

#

i appreciate the help

wintry solar
#

no problem!

#

now make sure it works on better calc 2 😉

wintry solar
#

latest smods version rewrites calculation

stiff locust
#

oh

wintry solar
#

so you might need to make adjustments to previously written code

stiff locust
#

right okay

stiff locust
wintry solar
#

1306 is the first one

stiff locust
#

ok but when was it

rough furnace
#

the 13th month 6th day

stiff locust
#

oh that was

#

what

#

13th month???

frosty dock
#

2 days ago

stiff locust
#

it's

wintry solar
#

yes it is the 13th month

stiff locust
#

january is the

#

what

frosty dock
#

it's the 13th month until we officially move into beta or it becomes the 14th month, whatever happens first

stiff locust
#

right

#

okay

#

so instead of noting the year you just

#

keep counting the months

#

I think I get it

frosty dock
#

it's fine we're moving into beta soon enough™️

rough furnace
#

well we couldn't roll back to 01 cause 0101 is lesser than 1231 which would break dependacies

stiff locust
#

is this going to break a fuck ton of mods

wintry solar
#

it will break some mods

stiff locust
#

.

#

do you have any examples of mods that it breaks

rough furnace
#

Crytpid

wintry solar
#

if your mod just adds jokers and doesn't do any lovely shenanigans with scoring it'll be fine

stiff locust
#

cryptid does like everything I expected that

#

uhhhhh

#

yeah about that

frosty dock
#

anything that has enhancements or editions or modifies functions like eval_card and evaluate_play

rough furnace
#

even if it does lovely shenangigfans with scoring it might be okay

stiff locust
#

okay I don't have enhancements or editions or modify functions

rough furnace
#

(like JamMod)

stiff locust
#

I just do 1 lovely patch to do the splash logic

wintry solar
#

that should be okay

stiff locust
#

as long as you guys didn't touch the splash logic i'll be fine

rough furnace
#

side not when do we remove the old calc warning on the tutorial?

wintry solar
#

but it means you can do stuff like this

return {
  chips = 10
}```
#

and it just works

stiff locust
#

does it remove the hardcoded messages though

rough furnace
wintry solar
#

I think when cryptid and talisman are ported at least

wintry solar
stiff locust
#

like when you return chips it always does +chips in blue and you can't change that

wintry solar
#

no you can change that

stiff locust
#

but it's hard coded

#

i tried this like a week ago and it didn't work

#

and they told me it was hard coded

wintry solar
#

you can either do chip_message = 'blablabla' or remove_default_message = true

#

it was

stiff locust
#

oh my god

wintry solar
#

but this is better

stiff locust
#

well I feel like I need to wait for at least cryptid and talisman to be ported

#

cause if some of my mods do use better_calc and some don't then I can't keep my current modlist

rough furnace
#

well no

#

most old calculations still work

stiff locust
#

most?

wintry solar
#

just enhancements and editions dont work

#

but they were mega scuffed anyway

stiff locust
#

right okay

#

what else does better calc do

wintry solar
#

provides calculation contexts to everything consistently

stiff locust
#

wait everything

frosty dock
#

it be better 😎

stiff locust
#

does that include consumables

wintry solar
#

yes

frosty dock
#

yes indeed

stiff locust
#

holy shit

wintry solar
#

want a context.before effect on your deck?

stiff locust
#

hell yeah I do

wintry solar
#

better calc does that 😎

stiff locust
#

better calc is based as shit

wintry solar
#

no

#

it's better

gaunt thistle
#

it's alright I guess

stiff locust
#

yeah ok it's better

rough furnace
#

when are we getting worse calc?

#

want to add chips in your joker? too bad

wintry solar
#

worse calc was initial merge 🙃

frosty dock
#

wait it's supposed to be better as in still not great but it least it doesn't suck as much?

wintry solar
#

yeah ofc

wintry solar
#

great calc can be whatever shit victin wants to make

rough furnace
#

tbf the calculation system is pretty neat, just a bit clunky to use, especially for peopel not familar with it

stiff locust
#

also did you guys fix that smods bug where localization can't override vanilla

rough furnace
#

people not familar with it being not thunk

frosty dock
#

that's a thing when you use a default.lua file

#

which uh

#

i think

#

we're removing anyways

stiff locust
#

huh

frosty dock
#

at least we talked about removing it in favor of a metadata config

rough furnace
#

take ownership of english

gaunt thistle
#

mediocre calc

stiff locust
rough furnace
#

idk I'm meming

#

possibly

stiff locust
#

yeah i had a mod idea but it needs to override vanilla localization

frosty dock
#

no

gaunt thistle
#

I hear you can do it if you patch the localization file with regex

frosty dock
#

you just need your loc file to be named en-us.lua and not default

stiff locust
#

oh

#

huh.

rough furnace
#

I hear you can do it if you summon thunk and then get him to change localization

stiff locust
#

i don't think thunk would approve of the changes made to accommodate Bunc Munc

#

that's the mod name

working on it hurts my head

frosty dock
#

I hear you can do it if you summon the right cosmic rays to flip a bunch of bits

stiff locust
#

wait

#

wait it did work

#

kind of.

frosty dock
#

💀

#

what's kind of

rough furnace
#

could probably also take ownership of whatever you want to do and then use loc_vars to point to a different key

rough furnace
stiff locust
rough furnace
#

oh

stiff locust
#

and not the Jokers

#

or anything else.

#

it should be changing a lot more than just the seals

rough furnace
#

send en-us.lua

#

oh yeah I syhould work on my new language a bit mroe

frosty dock
#

mroe

#

right, that lagnuage

stiff locust
#

it's a secret

rough furnace
wintry solar
#

"my code doesn't work" "I won't share it with you to help fix it" based

stiff locust
#

this is going to be way funnier if nobody knows what it is until it just shows up out of nowhere

rough furnace
#

My clipboard history go brrrrrr

stiff locust
#

but yeah I just took the en-us.lua file from vanilla, copy pasted it, and i've been manually making changes

#

and none of those changes are registering, except the ones I made to seals

rough furnace
#

if your translating everything why not just make a new language?

stiff locust
#

didnt even know you could do that

rough furnace
#

If I end up finishing my new language I will put it in the example mods

stiff locust
#

okay

#

guess I'm making a new language now

#

also totally unrelated question

#

is there a way I can make chicot appear in standard packs

rough furnace
#

maybe in_pool

stiff locust
#

with like a 2% chance

keen sleet
#

Would anyone mind helping me figure out what's wrong here? I'm trying to make a joker that adds a random edition to cards before they score but it happens all out of order.

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            context.other_card:set_edition(poll_edition('digital', nil, true, true), true)
            return {
                extra = {message = "Upgrade!", colour = G.C.CHIPS},
                colour = G.C.CHIPS,
                card = card
            }
        end
    end
stiff locust
#

why did you set the _options field to true

wintry solar
#

you'll need to use context.before and iterate over context.scored_hand

keen sleet
#

The joker adds the edition to all of the cards right when you play your hand, but the edition doesn't seem to count in scoring yet, and the upgrade message shows up after the card's scored. I kinda only want the cards to get their edition right when they're scored, not all at once

stiff locust
#

yeah put it in if context.before then
and use for index,value in ipairs(G.play.cards) do and then use value to refer to the card

wintry solar
#

^ context.scoring_hand is better that G.play.cards here

stiff locust
#

depends what you want

#

g.play.cards will include unscored/extra scored cards

wintry solar
#

scoring_hand also includes extra scored cards

stiff locust
#

i'm used to that because yk the whole splash mod

wintry solar
#

yeah makes sense

keen sleet
#

Okay I see, I'll try adding the editions in context.before, thanks guys

#

There isn't really a modding wiki right now is there?

#

Closest I could find is steammodded's wiki which is super unfinished and doesn't really explain much about anything that can be gleaned from the source code

#

Which is good enough for now, but still a chore

rough furnace
#

smods wiki and it explains a decent number of balatros core code

#

what are you wanting to know?

keen sleet
#

It'd just be nice to have on hand so I can look stuff up myself. Where is it?

rough furnace
keen sleet
#

I see, that's the wiki I was using before but it looks a lot more complete now. ty

frosty dock
#

feel free to move somewhere else

rough furnace
#

we should have a proper getting started making a mod page

#

let me go do that

dry merlin
#

im trying to have a joker have a Hiker effect, just with more chips but i keep getting a nil value no matter what i try

    if context.individual and context.cardarea == G.play then
      context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0
      context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + card.ability.extra.chip_gain
      return {
          extra = {message = localize('k_upgrade_ex'), colour = G.C.CHIPS},
          colour = G.C.CHIPS,
          card = card
      }
    end

this code is straight from hiker

keen sleet
rough furnace
#

Aure should I put the first mod guide under the guides section of the sidebar, by itself abocve Game Objects or with home?

wintry solar
#

I think top of guides

viscid bough
#

is it possible to prevent sold cards from giving money? and instead add that amount to a joker's sell value?

rough furnace
#

probably want to lovely patch Card:sell

viscid bough
rough furnace
rough furnace
hardy viper
rough furnace
wooden nexus
#

Welp, After falling asleep for hours now

#

I still have no clue how to add effects to playing cards

hardy viper
rough furnace
#

ok apparently i don't know how hyperlinks work

hardy viper
#

also, centers page has things you didnt list there anyways (tags)

rough furnace
#

no tags have their own page

fallen tendon
rough furnace
#

ok wait should page be hyperlinked or no?\

autumn coral
#

i think i fixed the custom fonts in balatro problem

#

we'll see

runic pecan
#

It is Day 5 and I still couldn't make my mod displayed in the in game mod list.
Did I do something wrong in my Holotro.json?

rough furnace
#

I belive that version is invalid

#

but also check the logs

runic pecan
rough furnace
#

yeah

#

or one of the other ways to check logs

runic pecan
#

Let me go checking now...

rough furnace
#

There will be a message like this one

autumn coral
#

oh my fucking. god did it launch???

#

i think i actually made a fucking font what

rough furnace
#

also iirc the language api lets you set a custom font

autumn coral
#

that doesn't work for what i was trying to do

#

i found out a way to load unlimited fonts in realtime

#

aka just making a fucking love2d font

#

i didn't realize you can literally supply filedata to it

#

there's a fucking nfs function for that lol

runic pecan
#

Found it:
INFO - [G] 2025-01-08 09:47:23 :: ERROR :: Loader :: Found invalid metadata JSON file at C:\Users\Riv_Falcon\AppData\Roaming\Balatro\Mods/Holotro/Holotro.json, ignoring: [SMODS _ "src/utils.lua"]:563: bad argument #1 to 'match' (string expected, got nil)

rough furnace
#

cryptic

#

oh thats the version check

runic pecan
#

Is there a strict format for version or something?

rough furnace
#

semi strict

#

it at least needs a major number

#

you don't need to specify a version iirc

runic pecan
#

Will this do?
Or am I only allowed to put numbers in it?

rough furnace
#

no like 0~alpha...

runic pecan
rough furnace
#

try it and see

vagrant cedar
#

I don't understand anything on this page

#

I accidentally got rid of my examplejokers file

#

And I dont understand the smod wiki

gilded narwhal
#

HEY GANG does steammodded allow you to take ownership of a stake

runic pecan
#

Ah crap
I forgot to rename the sprite
Be right back

gilded narwhal
#

Because I want to have it to where a specific stake has a different effect on specific decks

vagrant cedar
#

omg i found it

autumn coral
#

there's literally a function called take_ownership

#

check through cryptid i'm like 100% sure they did it

gilded narwhal
#

Okay I'm just making sure that works with stakes 😭

autumn coral
#

i don't know why it wouldn't- if it doesn't, check cryptid because again, anything remotely complicated has been done by math and not by steamo

#

literally the only people breaking ground from the looks of it are me and him lol

#

i mean i'm sure steamodded does a lot but i wouldn't know because i end up writing my own core functions more than i end up using it LMFAOOO

runic pecan
autumn coral
#

actually i think that wilson's mod is really complicated lol

#

and there are some others

autumn coral
gilded narwhal
#

yk i was about to say that mine is doing something cool but like it's not really

runic pecan
autumn coral
#

mine added a whole new mechanic i had to write my own core library for lmfao

hardy viper
autumn coral
rough furnace
autumn coral
#

where do you define the atlas

#

show me that

runic pecan
autumn coral
#

show me your mod directory

#

specifically what's in the assets folder

gilded narwhal
#

This is like the most complicated thing I've done 😭

#

I'm still proud of i t

autumn coral
#

looks nice

runic pecan
autumn coral
#

shrugs

#

i'd get rid of the underscores in the file names btw

hardy viper
#

huh

#

doesnt like every filesystem on the planet support underscores in filenames

autumn coral
#

yeah no i know

#

i have no idea how steamodded loads atlases from different mods

#

that's the only reason why i said that lmfao

hardy viper
#

ah

autumn coral
#

because i know prefixes are underscores

rough furnace
#

that won't make a difference

autumn coral
#

k

#

i just assumed that if it wasn't something silly like filepath then it was that

#

lol

rough furnace
#

if anything would break it it would be spaces but idk if they even do

autumn coral
#

btw my font technically loaded i just don't think i know how to use dynatext yet so i gotta figure it out lmfao

#

hacky solution btw (this doesn't include the object you need as well to initialize the font):


local function new_font(filepath)
    local fdata = NFS.newFileData(SMODS.current_mod.path..filepath)
    return love.graphics.newFont(fdata)
end
zealous glen
#

Finally, a balanced Joker

dark kite
#

back home from work time to remember why flower pot hates me

vagrant cedar
#

Somebody able to help me figure out what I did wrong? I'm basically trying to make a Perkeo but for Jokers instead of Consumables

rough furnace
#

whats wrong?

vagrant cedar
#

It just fully crashed game

#

It shows up in mods, lets me get the card

#

But as soon as I left shop game crashed instead of it giving me a Joker

rough furnace
#

send the crash

vagrant cedar
#

ok

dark kite
#

ohhh yeah i was trying to find out why scoring_hand was nil

#

i couldnt seem to find any declaration of scoring_hand anywhere

vagrant cedar
#

@rough furnace

dark kite
#

ah actually

rough furnace
#

oh it proably needs to be G.Jokers.cards

#

for the random element

vagrant cedar
#

Only on random element?

dark kite
#

i think its cause it tries to check before cards are even scored

rough furnace
#

yes

vagrant cedar
#

new error unlocked

rough furnace
#

sned code

vagrant cedar
#

It's the third Joker

#

The other two worked before I added it

long sun
#

making consumables for my consumable-oriented mod pack! :D

zealous glen
#

zodiac number 6

long sun
#

these are the Zodiac ^^

#

ya i'm aware that people have done this already but!

dark kite
#

suits["Hearts"] + suits["Diamonds"] + suits["Spades"] + suits["Clubs"] + suits["Stars"] + suits["Shields"] does this work for counting up numbers?

long sun
#

i meeeeeeean!

zealous glen
#

I'm not criticizing

#

I'm people

long sun
#

not saying you are :}

#

i'm using the blues of the Spectrals because the yellows are used by the Tarots :D

zealous glen
#

I just wish I remembered who 4 and 5 were

long sun
#

so the Spectrals perfectly combine the two!

zealous glen
#

me, ortalab, balatrostuck

long sun
#

ooh can i see yours? ^^

zealous glen
#

the other 2 might've been just suggestions without mods attached

#

I'm thinking they'd be their own thing similar to planets for for now they're Jokers

long sun
#

have there been Luigi Poker cards yet?

zealous glen
#

and they level up alongside planets

dark kite
#
            if context.after then
                local suits = {
                    ['Hearts'] = 0,
                    ['Diamonds'] = 0,
                    ['Spades'] = 0,
                    ['Clubs'] = 0,
                    ['Stars'] = 0,
                    ['Shields'] = 0
                }
                for i = 1, #context.scoring_hand do
                    if context.scoring_hand[i].ability.name ~= 'Wild Card' then
                        if context.scoring_hand[i]:is_suit('Hearts', true) and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
                        elseif context.scoring_hand[i]:is_suit('Diamonds', true) and suits["Diamonds"] == 0  then suits["Diamonds"] = suits["Diamonds"] + 1
                        elseif context.scoring_hand[i]:is_suit('Spades', true) and suits["Spades"] == 0  then suits["Spades"] = suits["Spades"] + 1
                        elseif context.scoring_hand[i]:is_suit('Clubs', true) and suits["Clubs"] == 0  then suits["Clubs"] = suits["Clubs"] + 1
                        elseif context.scoring_hand[i]:is_suit('Stars', true) and suits["Stars"] == 0  then suits["Stars"] = suits["Stars"] + 1
                        elseif context.scoring_hand[i]:is_suit('Shields', true) and suits["Shields"] == 0  then suits["Shields"] = suits["Shields"] + 1 
                        end
                    end
                end
                for i = 1, #context.scoring_hand do
                    if context.scoring_hand[i].ability.name == 'Wild Card' then
                        if context.scoring_hand[i]:is_suit('Hearts') and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
                        elseif context.scoring_hand[i]:is_suit('Diamonds') and suits["Diamonds"] == 0  then suits["Diamonds"] = suits["Diamonds"] + 1
                        elseif context.scoring_hand[i]:is_suit('Spades') and suits["Spades"] == 0  then suits["Spades"] = suits["Spades"] + 1
                        elseif context.scoring_hand[i]:is_suit('Clubs') and suits["Clubs"] == 0  then suits["Clubs"] = suits["Clubs"] + 1 
                        elseif context.scoring_hand[i]:is_suit('Stars') and suits["Stars"] == 0  then suits["Stars"] = suits["Stars"] + 1
                        elseif context.scoring_hand[i]:is_suit('Shields') and suits["Shields"] == 0  then suits["Shields"] = suits["Shields"] + 1 
                        end
                    end
                end
                if (suits["Hearts"] + suits["Diamonds"] + suits["Spades"] + suits["Clubs"] + suits["Stars"] + suits["Shields"]) > 3 then
                    return {
                        message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                        Xmult_mod = card.ability.extra
                    }
                end
            end
        end``` mm this doesnt seem to be doing anything when i test it houugh
zealous glen
zealous glen
long sun
#

ooh!

#

and ooh!

vagrant cedar
long sun
#

aware

#

i'm talking about the cards used in the casino Luigi runs

jovial widget
twilit tinsel
#

30 DONE

#

THERES SO MANY LEFT

zealous glen
long sun
#

WOAHHHHHHHHH

zealous glen
long sun
#

THE PROGRESSSSS????

zealous glen
#

then there will be only brazil

jovial widget
#

Well I had a Joker idea I'd love to be added but I don't know how to code

#

I'd want to do it myself so I wouldn't bother someone

long sun
#

i see you're doing them in alphabetical order :D

zealous glen
jovial widget
#

Ah

#

Its like a zombie card so it slowly infects your hand

long sun
#

what do infected cards do?

jovial widget
#

Add +1 mult each

zealous glen
#

a bit of manual labor but it's doable

thick panther
zealous glen
#

if you don't want to make an Enhancement I'd look a L Corp for reference for these extra effects

jovial widget
zealous glen
#

Would need a hook or patch to spread

jovial widget
#

Hm...

zealous glen
#

The Joker itself should be straightforward

long sun
#

would be fine? i guess?

#

idk if it removes enhancements it feels pretty myeh

jovial widget
jovial widget
long sun
#

right

#

will the effects persist if you sell?

jovial widget
#

I do want it to still be used late-game

jovial widget
#

Once infected always infected I'd say

#

Unless destroyed

dark kite
#

okay yeah i think im going mental i dont understand why this isnt working

long sun
#

do they still spread?

jovial widget
#

Oooh I didn't think about that

#

You could get one card infected then just sell the joker

#

The infected card would still spread and count so...

#

Yeah I'd have to maybe give it more thought

jovial widget
#

I don't just want the infected cards in the hand to add mult

#

I'd want infected cards from the full deck added too

#

If that makes sense

vagrant cedar
#

@rough furnace Were you still helping, I wasnt sure if you got busy or something

zealous glen
#

@long sun I'd talk more about my zodiacs and/or ask about yours but I ought to go to sleep 😴

long sun
#

Fair! I'm going to bed too actually =w=

#

I don't have any ideas yet, I usually make the graphics first and work around them

#

Anyway! Niiiight!

jovial widget
#

Night

zealous glen
jovial widget
#

Yeah I'm not an artist at all, was glad I was able to make the edits look somewhat good using the regular +4 mult Joker as a template

dark kite
#

why is this flower being so difficult

zealous glen
#

see if vanilla flower pot doesn't have any implicit contexts

dark kite
#

guh?

zealous glen
#

else

dark kite
#

a

#

yeah im seeing some elses beforehand

#

it looks like it goes context.before -> context.after -> else

#

and flower pot is in that else section

zealous glen
#

I don't see after

#

in fact

dark kite
#

scroll up a little, "else" changes to context.after / context.before

zealous glen
#

that else comes after if context.after

dark kite
#

yes

zealous glen
#

so it's if not context.after

dark kite
#

huh,

zealous glen
#

to be specific

dark kite
#

would probably be like

zealous glen
#

I think this is if context.joker_main

dark kite
#

if not context.after or context.before or smth

zealous glen
dark kite
#

ill try your suggestion first

zealous glen
#

before blahblahblah main blahblahblah after

vagrant cedar
#

Victin you able to help me rq?

zealous glen
#

rq?

vagrant cedar
#

yeah i just have a single joker not working

dark kite
#

huh, weird, that doesnt crash anything but not only does the code not function but the effects of the normal flower pot are still present

zealous glen
#

oh is it "really quickly"

vagrant cedar
vagrant cedar
vagrant cedar
#

It's supposed to be like Perkeo but for Jokers

zealous glen
#

my guess is that it's missing a if not context.repetition take a look at that line in the lovely dump

vagrant cedar
#

I have no clue what any of that means

twilit tinsel
zealous glen
#

my bad I didn't see there was more to the file

#

I think you used pseudoseed wrong

vagrant cedar
#

oh?

zealous glen
#

read vanilla code

#

read the steamodded wiki

#

read the lovely dumps when the crash log points you to there

#

goodnight

vagrant cedar
#

idk what lovely dumps means

zealous glen
#

you installed lovely

#

you have a lovely folder

#

the lovely folder has a dump

tall wharf
sick sparrow
#

how to add deck skin?

sick sparrow
#

most deck skins found on nexus replace cards_1 instead of adding it along with SMODS.DeckSkin

tall wharf
# sick sparrow most deck skins found on nexus replace `cards_1` instead of adding it along with...

https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin
optionally have my code


SMODS.Atlas {
    key = 'vocalatro_clubs_1',
    path = "collabs/mikugumizunda.png",
    atlas_table = 'ASSET_ATLAS',
    prefix_config = {
        key = false
    },
    px = 71,
    py = 95
}
SMODS.Atlas {
    key = 'vocalatro_clubs_2',
    path = "collabs/mikugumizunda_cb.png",
    atlas_table = 'ASSET_ATLAS',
    prefix_config = {
        key = false
    },
    px = 71,
    py = 95
}
SMODS.DeckSkin({
    key = 'vocalatro_clubs',
    suit = "Clubs",
    ranks = ranks,
    lc_atlas = 'vocalatro_clubs_1',
    hc_atlas = "vocalatro_clubs_2",
    posStyle = 'collab',
    loc_txt = {
        ["en-us"] = "Miku, Gumi, & Zundamon",
        ["ja"] = "ミク, メグッポイド, ずんだもん",
        ["th_TH"] = "มิกุ, กุมิ, และซีนดาม่อน"
    }
})
GitHub

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

sick sparrow
#

how to get card count on playing deck?

tall wharf
#

?

sick sparrow
rough furnace
#

thats vanilla behaviour]

tall wharf
#

you hover over the deck i guess

sick sparrow
sturdy compass
sturdy compass
#

no

rough furnace
#

are you sure about that?

sturdy compass
#

Ah he was responding to the second part

#

I thought it was a counter to what I was saying lol

thick panther
#

what size should a suit atlas be if its just 1 suit (2-A)?

runic pecan
#

Probably 923x95?

#

Like, lining them in one(1) row

thick panther
#

ok, i got it right first try.

sick sparrow
#

how to move cards from one CardArea to another?

crisp coral
#

the methods are all in cardarea.lua

runic pecan
#

For some reason GitHub desktop doesn't let me publish my mod repository.
"Bad credentials", it says.

tall wharf
#

i just use the git command line

crisp coral
#

i just use the vsc github extension

rough furnace
#

yeah not too familar with github desktop but check if you can re-login

tall wharf
#

actually

#

"have you tried turning it off and on again" type response

sick sparrow
crisp coral
#

suit yourself

dark kite
#

gonna try and crack down on this flower pot one more time

runic pecan
dark kite
#

this is what ive got at the moment and it doesnt seem to be working for me

#

currently it just doesnt do any of this and acts like normal flower pot mechanically

#

theres really just like, one thing that just isnt clicking for me to understand whats going wrong

#

and when i find it.

sick sparrow
#

how to prevent game over from running out of G.deck?

#

the mr. bones method has bugs and will crash/break the game

thick panther
#

does the top suit blend in too much with Hearts? what color would work well to keep it in theme but easier to see?

sick sparrow
#

how to prevent game over from running out of G.deck?

tall wharf
#

try purple maybe

#

tho I'm not colourblind myself

thick panther
tall wharf
#

mmmmaybe

#

still i think you'd have to ask a colourblind person for this if you are concerned about the legibility

#

i can only say so much

thick panther
#

i just want to make sure i dont confuse heart face cards /w amongus skin with the mod face cards.

sick sparrow
#

how to prevent game over from running out of G.deck?

tall wharf
#

also arch user 😭

#

i still have arch installed on my pc

#

i just don't use it

dark kite
#

in like half an hour

rough furnace
#

you don't even lose if G.deck is empty

shadow token
#

I just installed cryptid and I keep crashing within 5-10 mins of play time with no specific trigger

sick sparrow
rough furnace
#

What are you trying to do?

sick sparrow
rough furnace
#

why

sick sparrow
#

intentional

rough furnace
#

You can probably patch this check

dark kite
#

how have i spent an entire day fighting Flower Pot

#

and lost

#

i dont get it.

#
            if context.joker_main
            then
                        local suits = {
                        ['Hearts'] = 0,
                        ['Diamonds'] = 0,
                        ['Spades'] = 0,
                        ['Clubs'] = 0,
                        ['Stars'] = 0,
                        ['Shields'] = 0
                    }
                    for i = 1, #context.scoring_hand do
                        if context.scoring_hand[i].ability.name ~= 'Wild Card' 
                        then
                            if context.scoring_hand[i]:is_suit('Hearts', true) and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
                                elseif context.scoring_hand[i]:is_suit('Diamonds', true) and suits["Diamonds"] == 0  then suits["Diamonds"] = suits["Diamonds"] + 1
                                elseif context.scoring_hand[i]:is_suit('Spades', true) and suits["Spades"] == 0  then suits["Spades"] = suits["Spades"] + 1
                                elseif context.scoring_hand[i]:is_suit('Clubs', true) and suits["Clubs"] == 0  then suits["Clubs"] = suits["Clubs"] + 1
                                elseif context.scoring_hand[i]:is_suit('Stars', true) and suits["Stars"] == 0  then suits["Stars"] = suits["Stars"] + 1
                                elseif context.scoring_hand[i]:is_suit('Shields', true) and suits["Shields"] == 0  then suits["Shields"] = suits["Shields"] + 1 
                            end
                        end
                    end
                    for i = 1, #context.scoring_hand do
                        if context.scoring_hand[i].ability.name == 'Wild Card' 
                        then
                            if context.scoring_hand[i]:is_suit('Hearts') and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
                                elseif context.scoring_hand[i]:is_suit('Diamonds') and suits["Diamonds"] == 0  then suits["Diamonds"] = suits["Diamonds"] + 1
                                elseif context.scoring_hand[i]:is_suit('Spades') and suits["Spades"] == 0  then suits["Spades"] = suits["Spades"] + 1
                                elseif context.scoring_hand[i]:is_suit('Clubs') and suits["Clubs"] == 0  then suits["Clubs"] = suits["Clubs"] + 1 
                                elseif context.scoring_hand[i]:is_suit('Stars') and suits["Stars"] == 0  then suits["Stars"] = suits["Stars"] + 1
                                elseif context.scoring_hand[i]:is_suit('Shields') and suits["Shields"] == 0  then suits["Shields"] = suits["Shields"] + 1 
                            end
                        end
                    end
                    if (suits["Hearts"] + suits["Diamonds"] + suits["Spades"] + suits["Clubs"] + suits["Stars"] + suits["Shields"]) > 3 then
                        return {
                            message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                            Xmult_mod = card.ability.extra
                        }
            end
        end
    end```
#

what does it want from me

#

blood sacrifice?

rough furnace
#

whats wrong?

dark kite
#

nothing happens 😭

#

its like the code isnt even there, like it still functions like normal flower pot

rough furnace
#

try putting a print in it

dark kite
#

im essentially trying to have it so that flower pot instead activates if there are 4 or more different suits

#

i tried sending a debug message and nothing showed

rough furnace
#

actually shouldn't you increase the > 3

dark kite
#

hm?

#

whaddya mean?

rough furnace
#

like in the check

#

ight now you just check if it has greater than 3 of the suits

night pagoda
#

how do I add custom unlock description for SMODS.Back without using loc_txt? I recall that loc_txt had an ['unlock'] field inside the same table with the description and name (althought the skeleton on the wiki right now is empty for some reason), but if I had to add it to the localization file, where would it location be?

storm oar
#

3 means 4 or more

dark kite
#

^

storm oar
#

and that's the intention

rough furnace
#

wait you said you put a print and it never runs

#

how are you injecting it?

dark kite
#

wrongly, probably!

rough furnace
#

show

dark kite
#

how should i be printing it?

#

because whatever i did was most likely completely incorrect

rough furnace
#

you can use print("whatever") or sendInfoMessage("whatever", "Mod")

dark kite
#

yeah, from what i can see nothing prints

sick sparrow
rough furnace
#

idk lovely patch or hooking

tall wharf
#

i argue this is easier than modding Minecraft

#

but also less compatible

#

from experience

rough furnace
#

I mean its way more comaptible than the early days

tall wharf
#

fair

dark kite
#

this is where ive put the print

#

but when i play a valid hand that should activate, nothing happsn

rough furnace
#

did you check the lovely consoel

#

also thats not really a good spot to put a print

dark kite
#

where should i put it?

rough furnace
#

not in a table

dark kite
#

also yes, i checked the lovely console

rough furnace
#

ok so how are you inecting it

dark kite
#

take_ownership

rough furnace
#

show the code

dark kite
#
    { 
        loc_txt = 
        {
            name = "Flower Pot",
            text = 
            {
                    "{X:mult,C:white} X#1# {} Mult if poker",
                    "hand contains four different suits.",
            }
        },
        calculate = function(card, context)
            if context.joker_main
            then
                print("help")
                local suits = {
                ['Hearts'] = 0,
                ['Diamonds'] = 0,
                ['Spades'] = 0,
                ['Clubs'] = 0,
                ['Stars'] = 0,
                ['Shields'] = 0
                }
                for i = 1, #context.scoring_hand do
                    if context.scoring_hand[i].ability.name ~= 'Wild Card' 
                    then
                        if context.scoring_hand[i]:is_suit('Hearts', true) and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
                            elseif context.scoring_hand[i]:is_suit('Diamonds', true) and suits["Diamonds"] == 0  then suits["Diamonds"] = suits["Diamonds"] + 1
                            elseif context.scoring_hand[i]:is_suit('Spades', true) and suits["Spades"] == 0  then suits["Spades"] = suits["Spades"] + 1
                            elseif context.scoring_hand[i]:is_suit('Clubs', true) and suits["Clubs"] == 0  then suits["Clubs"] = suits["Clubs"] + 1
                            elseif context.scoring_hand[i]:is_suit('Stars', true) and suits["Stars"] == 0  then suits["Stars"] = suits["Stars"] + 1
                            elseif context.scoring_hand[i]:is_suit('Shields', true) and suits["Shields"] == 0  then suits["Shields"] = suits["Shields"] + 1 
                        end
                    end
                end
                for i = 1, #context.scoring_hand do
                    if context.scoring_hand[i].ability.name == 'Wild Card' 
                    then
                        if context.scoring_hand[i]:is_suit('Hearts') and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
                            elseif context.scoring_hand[i]:is_suit('Diamonds') and suits["Diamonds"] == 0  then suits["Diamonds"] = suits["Diamonds"] + 1
                            elseif context.scoring_hand[i]:is_suit('Spades') and suits["Spades"] == 0  then suits["Spades"] = suits["Spades"] + 1
                            elseif context.scoring_hand[i]:is_suit('Clubs') and suits["Clubs"] == 0  then suits["Clubs"] = suits["Clubs"] + 1 
                            elseif context.scoring_hand[i]:is_suit('Stars') and suits["Stars"] == 0  then suits["Stars"] = suits["Stars"] + 1
                            elseif context.scoring_hand[i]:is_suit('Shields') and suits["Shields"] == 0  then suits["Shields"] = suits["Shields"] + 1 
                        end
                    end
                end
                if (suits["Hearts"] + suits["Diamonds"] + suits["Spades"] + suits["Clubs"] + suits["Stars"] + suits["Shields"]) > 3 then
                    return {
                        
                        message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                        Xmult_mod = card.ability.extra
                    }
                end
            end
        end
    },
    true
)```
#

moved the print for the moment

#

oh

#

also i changed it to context.before just to test something

#

ignore that LMAO

rough furnace
#

your function args are wrong

dark kite
#

oh?

rough furnace
#

it should be self, card, context

thick panther
#

how do you add a custom color to be used in loc_txt, like the other suit colors?

dark kite
#

adding that in didnt really do anything

#

its very odd considering the description change works fine

rough furnace
#

put the print at the beginning of your calcualte and see if it runs

dark kite
#

it prints

#

so there must be something wrong within the if statement

dry merlin
#

im trying to have a joker have a Hiker effect, just with more chips but i keep getting a nil value no matter what i try, cam amyone help?

if context.cardarea == G.play then
                if self.ability.name == 'Hiker' then
                        context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0
                        context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + self.ability.extra
                        return {
                            extra = {message = localize('k_upgrade_ex'), colour = G.C.CHIPS},
                            colour = G.C.CHIPS,
                            card = self
                        }
                end

this code is straight from hiker

storm oar
#

you dont need the ability.name check if it's in a calculate function for a joker

#

at least I'm pretty sure

merry raven
#

So I updated my Steamodded and got to work on updating my old Enhancement code, since effect is gone

However, I got an error message saying that there was an attempt to call a nil value in my main.lua, which is used to load files. It's this line: SMODS.load_file("data/enhancements/arc.lua")()

arc.lua is one of seven Enhancement files and it's the only one that got updated just to test the waters, but suddenly the game couldn't recognize it? Did I install the new Steamodded update correctly?

#

According to the error, it appeared at line 15

dry merlin
# storm oar you dont need the ability.name check if it's in a calculate function for a joker

my bad pasted the wrong code



    if context.individual and context.cardarea == G.play then
      context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0
      context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + card.ability.extra.chip_gain
      return {
          extra = {message = localize('k_upgrade_ex'), colour = G.C.CHIPS},
          colour = G.C.CHIPS,
          card = card
      }
    end
rough furnace
merry raven
#

Lemme try

#

Alright, it managed to detect the file

rough furnace
#

syntax error

merry raven
#
if context.cardarea == G.play and context.main_scoring then
            if card.ability.extra.stored_chips > 0 or card.ability.extra.stored_mult > 0 then
                card.ability.extra.stored_chips = 0
                card.ability.extra.stored_mult = 0
                return{
                    chips = card.ability.extra.stored_chips
                    mult = card.ability.extra.stored_mult
                    message = "Jolted!",
                    sound = "fm_jolt",
                    colour = G.C.BLUE
                }
            end
        end

But I closed it?

rough furnace
#

your missing some ,

merry raven
#

O

#

Aw man the Steamodded update kind screwed over some of the pacing in my code

#
calculate = function(self, card, context)
        if context.cardarea == G.hand and not context.before and not context.end_of_round 
           and card.ability.extra.hands_seen < 1 then
            card.ability.extra.hands_seen = card.ability.extra.hands_seen + 1
            return{
                message = "Amplified!",
                sound = "fm_amplified",
                colour = G.C.BLUE
            }
        end
        if context.cardarea == G.play and context.main_scoring then
            if card.ability.extra.hands_seen > 0 then
                card.ability.extra.hands_seen = 0
                return{
                    mult = 15
                }
            end
        end
    end

For example, this card was supposed to gain +1 to hands_seen after a hand is played without it in it, and it will play a sound effect. When scored in a later hand, it will grant 15 mult

Now only the +1 gain works, the sound effect doesn't work nor the gaining 15 mult part

#

@wintry solar Pinging you just in case for you to look at later. Did I download the wrong version of Steamodded?

sick sparrow
#

the voucher popbob

#

(in fact, the voucher tab does not fit within the screen bounds, had to stretch to show all vouchers)

sick sparrow
valid trench
#

does anyone know why my custom challenge just says ERROR even if I make it only a key and nothing else

cerulean rose
cerulean rose
valid trench
sick sparrow
#

how to hook the card:start_dissolve()?

steep rain
#

how do I use eval_this and where do I put it

quaint latch
# sick sparrow how to hook the card:start_dissolve()?
local hook = Card.start_dissolve
function Card:start_dissolve(dissolve_colours, silent, dissolve_time_fac, no_juice)
  -- insert code before here
  local ret = hook(self, dissolve_colours, silent, dissolve_time_fac, no_juice)
  -- insert code after here
  return ret
end
royal ridge
quaint latch
#

rihgt yeah

#

much appreciated toneblock :D

random sleet
#

much programming

quaint latch
#

i love programming

runic pecan
#

Did NOT expect it was just that easy

quaint latch
#

so glad its my job

merry raven
#

I'm trying to debuff three different cards in hand, but it doesn't seem to work, just displays the message on those three randomly picked cards and that's it

local available_cards = {}
                    for _, card in ipairs(G.hand.cards) do
                        if not card.debuff then
                            table.insert(available_cards, card)
                        end
                    end
                    
                    for i = 1, math.min(3, #available_cards) do
                        local card, card_index = pseudorandom_element(available_cards, pseudoseed('wish_debuff'))
                        G.GAME.blind:debuff_card(card)
                        card_eval_status_text(card, 'extra', nil, nil, nil, {
                            message = "Taken!",
                            sound = "fm_corrupted_wish_taken",
                            colour = G.C.BLACK
                        })
                        table.remove(available_cards, card_index)
                    end

Any insights?

#

This is for a blind btw

quaint latch
#

try card.set_debuff(true) instead of G.GAME.blind:debuff_card

merry raven
#

msg = string: "card.lua:600: attempt to index local 'self' (a boolean value)"

Somehow the error just travelled all the way to a different file
Line 600 in card.lua is here

for k, v in pairs(self.ability.debuff_sources or {}) do
        if v == 'prevent_debuff' then
            if self.debuff then
                self.debuff = false
                if self.area == G.jokers then self:add_to_deck(true) end
            end
            self.debuffed_by_blind = false
            return
        end
        should_debuff = should_debuff or v
    end
quaint latch
#

Interesting

#

ah

#

looks like SMODS has a function for that xd

valid trench
#

does anyone know where the game stores the current deck selected in a run

quaint latch
#

seems to be uhhh

#

G.GAME.selected_back

valid trench
#

alright simple enoguh

#

ty

valid trench
#

deck for context is just ""

#

I keep getting attempt to index fails and I think I'm just too stupid to see why

#

oh wait I need to actually declare the variable before I call it lol

dry merlin
#

im trying to do a misprint like effect, random mult within a range, but for each card played
but for some reason it keeps giving me small decimal numbers instead of numbers in the range
can anyone help?

#
   if context.individual and context.cardarea == G.play then
        local temp_Mult = pseudorandom('misprint', card.ability.extra.mult_min, card.ability.extra.mult_max)
        if context.other_card:get_id() <= 14 or context.other_card:get_id() >= 0 then
        return {
          mult = temp_Mult,
          card = context.other_card
        }
      end
    end    
random sleet
#

pseudorandom doesnt take min/max values iirc you have to do the math yourself

dry merlin
#

how does misprint do it? or is it different cuz of smod

random sleet
#

o maybe im dum

frosty dock
dry merlin
#

should be in .extra right?

#
config = { extra = { mult_min = 25, mult_max = 55 } }
#

Idek what I changed but apparently it's fixed now

nocturne garnet
lyric blade
#

Is there a way to return mult_mod AND Xmult_mod as a Joker?

runic pecan
#

" unexpected symbol near '}' "

lyric blade
runic pecan
lyric blade
#

Now help me (jk)

#

Np

runic pecan
#

And now this joker would crash the game at second round

lyric blade
#

when you start round two?

#

Or at the shop in second round?

runic pecan
#

when selected a blind after first shop

glass scaffold
#

Is it possible to make it where a sound is played when you win a run?

#

And if so, I wanna do that

lyric blade
#

hmmmm riv idk

#

can't help you sorry

runic pecan
#

I thought "if G.shop_jokers then" meant to prevent this kind of error

lyric blade
#

Huh lol

#

Maybe if G.shop_jokers >= 1? If it shows the amount of the jokers in shop

runic pecan
#

Is that how it works?

lyric blade
#

idk

teal estuary
#

just do what you did with one, and do it with the other

#

but change the names

#

(and if you want messages, use eval_this)

lyric blade
#

I want one joker to do both

teal estuary
#

copy what you did with mult/xmult, and change the names to match the one you didnt do

#

thats essenitally it

nocturne garnet
#

idfk what you mean by "is there a way"

teal estuary
#

you can make it do everything in the game if you wanted

#

yeah theres nothing stopping you from stacking effects on a joker

lyric blade
#

Yeah I did it with return, I can't return two things can I? In the context.joker_main

nocturne garnet
#

it seems that my joker cant be destroyed at end of round if its copying a joker 😭

nocturne garnet
#

you can return as many things as you can

#

its a table