#đŸ’»ăƒ»modding-dev

1 messages · Page 63 of 1

crisp elbow
#

correct

#

as long as you have it like

#

mods/assets/

or mods/main.lua

#

just make sure to keep your heirarchies right

static juniper
#

It looks like this right now, is this correct?

wintry solar
#

that looks correct

static juniper
#

Glad you guys told me about this, probably should've known this from the start

hoary moss
#

Another question, How do you all create the custom assets for jokers, decks, etc?

crisp elbow
#

aseprite

static juniper
#

Like, how do we create the art or how do we implement them?

hoary moss
wintry solar
#

you can just use whatever graphics software you're comfortable with

crisp elbow
#

make sure Jokers are 71x95

#

same with playing cards

static juniper
#

You can create a sprite however you want. I personally use pixilart.com because it's free and I'm already super familiar with it, but I know other people use aesprite. I think #đŸŽšăƒ»fan-art has a downloadable basic Joker if you need a template.

hoary moss
#

Thank you, I’m gonna start working on my mod today

static juniper
#

Good luck!

hoary moss
#

Thank you.

wintry solar
crisp elbow
#

oh that's interesting

hushed cradle
#

uh so im tryna write api rn, and i got no idea what im doing really, ceres uses file loading so for the api should i chuck it into a file by itself, or do i make it another mod?

#

cos i take it a lot of people dont use file loading

regal wolf
#

api for what

crisp elbow
#

Perk cards (I think)

#

consumable type

regal wolf
#

as in like, a web api?

#

or like an "api" for mods to use

wintry solar
#

How did you make them originally?

hushed cradle
#

uh

#

so its just an extension of enhancement

hushed cradle
hushed cradle
#

and then i load that w nfs

wintry solar
#

Then you’ve already made the api!

hushed cradle
#

oh sick

#

lol

#

i wanna make it a bit easier to add more in the future tho

wintry solar
#

You could try it out by dropping one of your perks in a different mod to make sure it’s all accessing it properly

hushed cradle
#

if someone else wants to use it tho, will it be easy enough for them to load the file?

#

will they just need ceres to use it

#

ig that works

#

wait is that how it works

#

am i done?

#

so in future people can just download ceres and make their own right

#

but what if they dont wanna use ceres

#

can i seperate it out into its own mod or is that just too much hassle?

wintry solar
#

Yeah they’d just need ceres

#

You could pull it into a different mod if you wanted it to just be a perk api mod

hushed cradle
crisp elbow
#

Nah I would rather keep it in

hushed cradle
#

cool

crisp elbow
#

lowkey

#

Cause it's like if need be you can make it a seperate one

#

but the last mod to do that was uh

wintry solar
#

It should probably be separate

crisp elbow
#

Oddities

crisp elbow
hushed cradle
#

i dont remember oddities

crisp elbow
#

easy dev probably

crisp elbow
hushed cradle
#

i feel like i vaguely remember that on the old mod index

hushed cradle
#

should be a nice challenge

wintry solar
#

You can bundle it in with the ceres git download like cryptid does with talisman

frosty dock
wintry solar
#

But I think it being separate would be better for other people using it if they don’t want to use ceres

hushed cradle
#

thats what i wouldve thought

frosty dock
#

they're always curved like that right?

#

featureâ„ąïž

wintry solar
#

Is this cards now?

hushed cradle
#

yeah its meant to curve

frosty dock
#

yeah it's cards

#

might try and add some padding so it doesn't go outside the borders

mental nacelle
#

nostalgic ox... my sworn enemy.....

wintry solar
#

Yeah I’d probably make them a bit smaller

frosty dock
#

eh, that's their original size

wintry solar
#

Maybe I am just used to the small smods versions now

#

Or maybe the cycle at the bottom makes the spacing look crowded

hushed cradle
#

should i name the api after another planet lol

#

introducing eris, perk api thing

primal robin
#

Question. Glob is lovely/*.toml or lovely/**/*.toml?

frosty dock
#

the former. no subfolders as far as I'm aware

primal robin
#

That's sad

frosty dock
#

how's this

#

gave the rows slightly more spacing as well as some more above the page selector

drowsy tulip
#

is there a way to check when a certain effect is triggered

frosty dock
drowsy tulip
#

i tried reading through that but theres a lot of text and i cant quite seem to find what i need

frosty dock
#

or some function in the game's code, it really depends. Anything else I'll need a more specific question for

drowsy tulip
#

wait

edgy reef
drowsy tulip
#

i assume this is the step where it checks for effects?

frosty dock
#

yeah that's a bit more complicated, you'd have to patch into that calculation step to catch it

drowsy tulip
#

so do i just check context.other_card.effects?

#

or am i missing something

night pagoda
mental nacelle
#

cards do that

night pagoda
#

but blinds do not?

frosty dock
#

I wasn't too sure about that, turns out there's a card area type that doesn't do that

mental nacelle
#

this is so epic

night pagoda
#

it just looks a bit drunk on blinds lol - it fits cards but not blinds imo

#

yeah that's awesome

frosty dock
#

how does this compare to vanilla, I think the blinds in each row are a bit too close together?

#

vanilla padding is .1, it seems

night pagoda
#

they're close but it works well anyway

frosty dock
#

I'll try making it slightly wider

night pagoda
#

I'm wondering if the left bar's contents should be spread out to the height of the box

#

antes/scores

frosty dock
#

I don't think it does that normally? could add more antes though

frosty dock
#

matches pretty well imo, just a bit more padded

night pagoda
#

maybe less of this space?

frosty dock
#

seems that's just how the hitboxes of the cardareas line up

#

actually no there's some padding in there too

#

sneaky config smh

edgy reef
#

The sprites are also... rotated?

#

The ones on the far left are tilted a bit

frosty dock
#

nah they just do that

#

they rotate

frosty dock
edgy reef
#

kek

#

localthunk magic

languid mirage
#

I'm sure he was having just as much fun making it balatrojoker

frosty dock
#

I'll leave the spacing in i guess, can't figure out exactly where it's coming from

edgy reef
#

lmao

regal wolf
#

@coarse nest https://github.com/OceanRamen/ChallengerPlus I've created a better Challenge API for the challenge mod im making but it would also work for you.
I just added Challenge.author and Challenge.version.
All you'd need to do is create an SMODS file with ```
<header>
Challenge:new({<data>})
Challenge:new({<data>}) etc

All locs are handled by the API.
GitHub

Contribute to OceanRamen/ChallengerPlus development by creating an account on GitHub.

tepid crow
regal wolf
primal robin
#

Can I safely adjust booster pack's card pool by using take_ownership?

coarse nest
regal wolf
regal wolf
primal robin
#

If condition, change pool, else work as usual

regal wolf
#

couldn't you just add a queue? if empty use default pack logic. if there's item in queue, bypass pack logic and create pack with set cards.

#

i wouldn't take_ownership of the pool. it might create unintended consequences.

coarse nest
# regal wolf Haha sorry. Should be pretty similar

Just some header changes, no biggie. I'm going to make a swappable header section anyway, so challenges can both be generated as their own mod or as a challenge to go into your mod. All from the same GUI with a checkbox to change the output. But gonna bother with that tomorrow.

frosty dock
#

you could certainly take_ownership of the pack and give it a custom create_card function, but I think the precedence for when that does or doesn't apply to vanilla packs is still a bit jank

regal wolf
#

I mean if it's not easier for you to use my mod as opposed to the way you were doing it before then you don't ned to. I just thought it might be easier/better for you

frosty dock
#

(mod additions menu)

regal wolf
coarse nest
regal wolf
#

up to you!

coarse nest
#

Alternatively I could help you with you ingame one if you've got anything as a base on that I can see what I can throw at it. I'm guessing you've got the actual generation and backend down though and it's just the GUI?

frosty dock
#

literal pools can't be taken ownership of as they're not steamodded objects

#

paginated blinds are now coming to your local copy of steamodded

primal robin
#

I want make a stuff like "If arcana pack has sticker on it, then only tarots with min_highlight value can appear, else works as usual"

frosty dock
#

well cryptid does stickered packs

#

idk maybe have a look at that?

primal robin
#

Oh cool, i'll take a look

lusty epoch
#

It uses a lovely patch for that though

#

Just a heads up if you can’t do that

drowsy tulip
#

how do you get the effects that a card has triggered when scored?

hoary moss
#

Quick question to y’all, what programming software do you use to code your mods for balatro?

mental nacelle
#

lua

#

i think thats the only option

shell tangle
#

Software is different from language, a lot of people use Visual Studio Code.

hushed cradle
#

visual studio

mental nacelle
#

oh i'm silly

#

i use vs code

static juniper
#

VS code

hoary moss
#

i have no clue how visual studio code works

#

help please

shell tangle
# drowsy tulip Please

I mean, you can search the hand for cards to see if any have mult enhancements, if that's what you're asking?

coarse nest
drowsy tulip
#

i figured i need to get the variables from effects but idk how to do it properly

shell tangle
#

Look at how Golden Ticker does it in card.lua.

coarse nest
# hoary moss ok

I've never coded in lua so can't tell you what it offers for lua but at the very least it will be stuff like suggested completion for commands already written and used, putting opening and closing brackets when you use one, some form of debugging etc. It'll at the very least have more QOL than just barebones text editors.

drowsy tulip
#

also i wasnt talking about enhancements, but specifically effects

shell tangle
#

Extract Balatro.exe, and drag the files out somewhere to look through the source code. If you want effects, though, that's a ton more complicated to do.

drowsy tulip
#

what kind of dark magic is this

#

is there like a list of all the card effects by id

#

if i understand correctly this might work

coarse nest
#

Like the enhancements like lucky, bonus etc?

#

Line 647 in game if so

drowsy tulip
#

no like +mult or +chips

coarse nest
#

Not sure, but in the enhancements it does have the code used to make them perform what they do and you can get the id for it that way I assume

#

Mult card just has mult = 4 for example on it

hoary moss
#

wish me luck i will need it, i may not make it out alive, thats programming folks.

drowsy tulip
#

can you like

#

check if a card has the mult variable

tepid onyx
#

I've been modifying the Choose First Shop Joker Mod. I've got 15+ years of experience developing in JS, Java, Python, etc. , but this is my first time working with Lua. It's tough for me to wrap my head around it, but I'm getting there. I'm trying to add to the Choose first shop joker mod, and enable the user to choose the two first shop jokers instead of just one.

Usually you hover over the joker you want to select in your collection, and then press f4. The joker turns negative in your collection, and then it shows up in the first shop. I've added another keyboard input handler for F5 to do the same thing F4 was doing with some changes. That part is working, but I can only get one of the jokers I select to show up in the first shop or any shop.

Here is my code so far:

--- STEAMODDED HEADER
--- MOD_NAME: Choose 2 First Shop Jokers
--- MOD_ID: choose_two_first_shop_Jokers
--- MOD_AUTHOR: [Luke]
--- MOD_DESCRIPTION: Choose first joker with F4 and second joker with F5
----------------------------------------------
------------MOD CODE -------------------------
local forced_joker_shop = nil
local forced_joker_shop_add = nil  --// Added by me

Orginal_get_current_pool = get_current_pool
function get_current_pool(_type, _rarity, _legendary, _append)
    sendDebugMessage(inspectDepth(G.GAME.current_round)) 
    if forced_joker_shop and forced_joker_shop_add and G.shop and (_type == 'Joker' or _type== 'Tarot' or _type== 'Planet') and not(G.GAME.was_forced_joker_shop)  then
        local _pool, _pool_key = EMPTY(G.ARGS.TEMP_POOL), ''
        G.GAME.was_forced_joker_shop = true
        G.GAME.
        _pool_key = 'Joker'..(_rarity or pseudorandom('rarity'..G.GAME.round_resets.ante..(_append or '')) )..(_append or '')..G.GAME.round_resets.ante
            _pool[#_pool + 1] = forced_joker_shop
            _pool[#_pool + 1] = forced_joker_shop_add --// Added by me
        G.GAME.dollars = 25
        G.GAME.shop.joker_max = 3

        return _pool, _pool_key
    end
    if G.shop and not(G.GAME.was_forced_joker_shop) then
        G.GAME.was_forced_joker_shop = true
    end
    return Orginal_get_current_pool(_type, _rarity, _legendary, _append)
end

local Original_Controller_key_press_update = Controller.key_press_update
function Controller:key_press_update(key, dt)
    Original_Controller_key_press_update(self, key, dt)
    if key == 'f4' then
        if self.hovering.target and self.hovering.target:is(Card) and G.SETTINGS.paused and not(G.GAME.was_forced_joker_shop) then 
            local joker_name_with_j = self.hovering.target.config.center.key
            if string.find( joker_name_with_j,"j_" ) then
                local edition = {negative = true}
                self.hovering.target:set_edition(edition, true, true)
                forced_joker_shop = joker_name_with_j
            end
        end
    end
    if key == 'f5' then  --// Added by me
        if self.hovering.target and self.hovering.target:is(Card) and G.SETTINGS.paused and not(G.GAME.was_forced_joker_shop) then 
            local joker_name_with_j_add = self.hovering.target.config.center.key
                if string.find( joker_name_with_j_add,"j_" ) then
                    local edition = {negative = true}
                    self.hovering.target:set_edition(edition, true, true)
                    forced_joker_shop_add = joker_name_with_j_add
            end
        end
    end
end
----------------------------------------------
------------MOD CODE END----------------------```
drowsy tulip
#

and if it gets triggered

coarse nest
#

I'd imagine there's something for that for sure yes.

drowsy tulip
#

i mean worst case scenaro i can check for mult enhancement and if lucky card triggers

coarse nest
drowsy tulip
#

and holo

#

its better than nothing

regal wolf
#

and a lua

#

you can do

#

like this

#

to get synatx highlighting

tepid onyx
#

Got it lol. Any ideas why it's not working? All I did was create another var to hold the selected joker, and then added that to the pool just like the original mod did

regal wolf
tepid onyx
#

No, I'm getting no errors at the moment, but when I start the game only one of the selected jokers shows up in the shops. Is there some reason it wouldn't let you populate the _pool with more than one item before returning it?

wintry solar
#

it only runs your force code once

#

it will call get_current_pool for every card spawn, so when it runs the first time it executes your code, sets the G.GAME.was_forced_joker_shop to true, which then means the second time it goes through it doesn't enter that block

tepid onyx
#

Ah okay! So could I just add another part that's like:

local firstSelect = true

if(firstSelect)
  was_forced_joker_shop = true

So that it runs one time for the first one to set firstSelect and doesn't set the was_forced_joker_shop = true until the second run?

wintry solar
#

I would probably structure it as your buttons adding the keys to a table, say forced_joker_shop = {}, then in your get_current_pool override check for #forced_joker_shop > 0, and just put the first element of it in the pool. It'll force the order but it will ensure that each card is forced before running the rest of the function normally

tepid onyx
#

Okay so I change forced joker shop into a table, and then use something like table.insert("forced_joker_shop", joker_name_with_g) in the button handlers? I'm really new to love2d and lua. Once I've done that and check whether #forced_joker_shop > 0, should I just use the same for of adding them to the pool as I was? for example:

   _pool[#_pool + 1] = forced_joker_shop[1]
   _pool[#_pool + 1] = forced_joker_shop_add[2]

or is there a better way to add them?

#

Also are tables 1-indexed? Never dealt with a lang like that lol

wintry solar
#

they are 1-indexed, yeah

#

I'd add the first one and then remove it from your forced_joker_shop table

#

You don't need to add the second one to the pool as it'll get picked up the next time round

#

basically the pool is send to the card creation and a random element of it is chosen, then when it wants to create another card it requests a new pool. If you send just one joker back as the pool it'll have to be that one

#

hopefully that makes sense

tepid onyx
#

I think it makes sense. I really appreciate your help either way! Here's what I've got at this point:

local forced_joker_shop = {}
local forced_count = 0
local forced_joker_shop_add = nil  --// Added by me

Orginal_get_current_pool = get_current_pool
function get_current_pool(_type, _rarity, _legendary, _append)
    sendDebugMessage(inspectDepth(G.GAME.current_round)) 
    if forced_joker_shop and G.shop and (_type == 'Joker' or _type== 'Tarot' or _type== 'Planet') and not(G.GAME.was_forced_joker_shop)  then
        local _pool, _pool_key = EMPTY(G.ARGS.TEMP_POOL), ''
        _pool_key = 'Joker'..(_rarity or pseudorandom('rarity'..G.GAME.round_resets.ante..(_append or '')) )..(_append or '')..G.GAME.round_resets.ante
        if #forced_joker_shop > 0 then
            _pool[#_pool + 1] = forced_joker_shop[1]
            table.remove(forced_joker_shop, 1)
            forced_count = forced_count + 1
            if forced_count > 1 then
                G.GAME.was_forced_joker_shop = true
            end
        end

        G.GAME.dollars = 25
        G.GAME.shop.joker_max = 3
        return _pool, _pool_key
    end
    if G.shop and not(G.GAME.was_forced_joker_shop) then
        G.GAME.was_forced_joker_shop = true
    end
    return Orginal_get_current_pool(_type, _rarity, _legendary, _append)
end

local Original_Controller_key_press_update = Controller.key_press_update
function Controller:key_press_update(key, dt)
    Original_Controller_key_press_update(self, key, dt)
    if key == 'f4' then
        if self.hovering.target and self.hovering.target:is(Card) and G.SETTINGS.paused and not(G.GAME.was_forced_joker_shop) then 
            local joker_name_with_j = self.hovering.target.config.center.key
            if string.find( joker_name_with_j,"j_" ) then
                local edition = {negative = true}
                self.hovering.target:set_edition(edition, true, true)
                table.insert(forced_joker_shop, joker_name_with_j)
            end
        end
    end
    if key == 'f5' then  --// Added by me
        if self.hovering.target and self.hovering.target:is(Card) and G.SETTINGS.paused and not(G.GAME.was_forced_joker_shop) then 
            local joker_name_with_j_add = self.hovering.target.config.center.key
                if string.find( joker_name_with_j_add,"j_" ) then
                    local edition = {negative = true}
                    self.hovering.target:set_edition(edition, true, true)
                    table.insert(forced_joker_shop, joker_name_with_j_add)
            end
        end
    end
end

I changed forced_joker_shop to a table, made the buttons insert the joker into the forced table, and then when running the override I'm checking if there's a joker in the table and if so adding to the pool and then adding 1 to force_count. When forced_count > 1 I'm setting was_forced_joker_shop to true.

Does that seem right or am I off base somewhere?

wintry solar
#

that looks okay but you have some extra logic in there that's not needed. You can remove the entire forced_count bit, remove the and not(G.GAME.was_forced_joker_shop) from the if, and actually remove the if #forced_joker_shop > 0 check as you already check for the existance of the table

#
function get_current_pool(_type, _rarity, _legendary, _append)
    sendDebugMessage(inspectDepth(G.GAME.current_round)) 
    if forced_joker_shop and G.shop and (_type == 'Joker' or _type== 'Tarot' or _type== 'Planet') then
        local _pool, _pool_key = EMPTY(G.ARGS.TEMP_POOL), ''
        _pool_key = 'Joker'..(_rarity or pseudorandom('rarity'..G.GAME.round_resets.ante..(_append or '')) )..(_append or '')..G.GAME.round_resets.ante
        _pool[#_pool + 1] = forced_joker_shop[1]
        table.remove(forced_joker_shop, 1)
        G.GAME.dollars = 25
        G.GAME.shop.joker_max = 3
        return _pool, _pool_key
    end
    return Orginal_get_current_pool(_type, _rarity, _legendary, _append)
end
#

like this

#

you can also neaten up those set editions to be self.hovering.target:set_edition('e_negative', true, true)

tepid onyx
#

Okay I gotcha. I tried to run it with those changes, and it crashed when it was about to load the first shop. I'm not sure why, but have you used the mod I'm talking about? If not, you have to select the jokers from your collection before you ever select new game or continue, so I'm starting to wonder if it's even possible to select two different jokers before the game starts based on what you told me about the pool. I attached my stack trace btw

If it's a lot easier to implement, I know the two jokers I want to use most games(Burnt Joker and Blueprint). Idk if it's possible to just set that value at some point in the game if I'm not able to get the two joker selection to work

hallow forge
#

do stakes that apply multiple stakes have working ui's in the stakes section of thr run UI, i keep crashing

hushed cradle
#

so steamodded isnt recognizing Ceres

#

apparently its a lovely mod

#

anyone know any common causes for this?

#

minus stupidity

hushed cradle
#

spelling mistake in my dependency somehow 😭

wintry solar
wintry solar
coarse nest
#

Ayy, got my challenge generator supporting a toggle between itself being an individual SMODS or being a BU_CB file. Changes how the file starts etc. Just need to adjust formatting of the output and build the first page that takes the inputs of author and banned stuff etc. Eh, mostly tomorrows job I've slacked a lot today and don't intend on changing it XD

#

The toggle should be coded in clearish enough as well that if anyone else has a different header set for a challenge file it can be coded in as an option.

coarse nest
#

Is there a list of the steammods 1.0 language code things?

        ['en-us'] = {
              name = 'Genchal'
         }
      },```
For this. I need to make a dictionary up in my code and do a dropdown for all the language options so they can be added in to the generation.
opal spade
coarse nest
#

Ah yeah so there is, didn't check that XD

opal spade
#

smods has something in the works regarding custom languages afaik but no idea how far they've done with it

coarse nest
#

The 15 in localization are enough for me to work with for now at the very least

coarse nest
#

Localisation has been added.

#

Oh wait, need to do a , after it right?

#

Answer is yes, yes I do.

coarse nest
#

For anyone interested, if you have multiple entries in loc_txt for the same language, it thankfully doesn't crash and just uses the last in the list.

#

So woohoo I don't have to code a lockout in the dropdowns for each language added XD

hushed cradle
#

what does this even mean 😭

opal spade
#

something tried to play a sound using something that is not a valid pitch

hushed cradle
#

i figured that much

#

just im not sure why or how

#

fixed it

#

somehow

hushed cradle
#

if i want to add the basic joker description to an info queue

#

ik that i can do

#

info_queue[#info_queue+1] = G.P_CENTERS['j_joker']

#

but how do i pass in vars when i do it like that?

#

figured out i can use localize{type = 'descriptions', key = _c.key, set = _c.set, nodes = desc_nodes, vars = specific_vars or {}} i think

opal spade
#

want to try making a mod that makes more contexts work in more cardareas

hushed cradle
#

those cards and stickers do not go there lol

opal spade
#

why not

zealous glen
#

Artifacts and enchantments

hushed cradle
#

so if i do this info_queue[#info_queue+1] = G.P_CENTERS['j_joker'] then

#

i end up w this

#

how do i stop ending up w that?

zealous glen
#

I always have to look at an example for how to format the table

#

I think it needs at least three items

#

Localization set, key, and vars (if any)

hushed cradle
#

i tried {type = 'descriptions', key = 'j_joker', set = 'Joker', vars = {4}}

#

but that caused a crash i think

#

ill try again

zealous glen
#

I think it’s something like that

#

See if you can find an example

hushed cradle
#

well almost

#

if v == 'negative_consumable' then info_queue[#info_queue+1] = {key = 'e_negative_consumable', set = 'Edition', config = {extra = 1}} end

#

thats how its done for negative ones

#

but that didnt work

maiden phoenix
wintry solar
hushed cradle
#

thank you

#

ah i finally got it

#

info_queue[#info_queue+1] = {set = "Joker", key = "j_joker", specific_vars = {4}}

#

thats what i have to do apparently

wintry solar
#

yeah I thought it might be specific_vars

hushed cradle
#

went digging around in cryptid cos i had a feeling there would be an example there

wintry solar
#

but my code for seals is {key = card.ability.extra.balloon.."_seal", set = 'Other', vars = G.P_SEALS[card.ability.extra.balloon]:loc_vars(info_queue, card).vars}

#

đŸ€·â€â™‚ïž

hushed cradle
#

that looks confusing

#

maybe its because theyre different places in the loc files?

wintry solar
#

I think the type argument is probably what caused your crash

hushed cradle
#

oh maybe

#

it seems odd that i dont need it tho

#

now got perks working completely separate from ceres

#
local example_perk = SMODS.Perk{
    key = 'example',
    atlas = 'perks',
    pos = {
        x = 0,
        y = 0,
    },
    config = {
        jokers = {
            {
                key = 'j_joker', 
                amount = 5,
                edition = 'e_negative',
                sticker = 'eris_temporary',
                ignore_space = true,
            },
        },
        consumables = {
            {
                key = 'c_fool',
                amount = 2,
                edition = 'e_negative',
                ignore_space = true,
            },
        },        
        tags = {
            {
                key = 'tag_buffoon',
                amount = 1,
            },
        },
        money = 10,
        -- burn/shred card
        burn = true,
        shred = false,
        message = 'Example!',
        colour = G.C.GREEN,
    },

    loc_vars = function(self, info_queue)
        -- you will have to manually add any tags/joker/consumables to the info queue
        -- theres no easy way for me to pass in the correct vars to jokers that have them
        info_queue[#info_queue+1] = {set = "Joker", key = "j_joker", specific_vars = {4}}
        info_queue[#info_queue+1] = G.P_CENTERS['c_fool']
        info_queue[#info_queue+1] = G.P_TAGS['tag_buffoon']
        info_queue[#info_queue+1] = {set = 'Other', key = 'eris_temporary'}
        return {
            vars = {
                5,
                'negative',
                'Joker',
                2,
                'negative',
                'The Fool',
                'Buffoon',
                10,
                'temporary'
            }
        }
    end,
}```
#

this is what the code for a the example perk code is

#

would you say this is simple enough?

#

the fallback calculate function can handle money, jokers, consumables, and tags

#

and ive got more to add too

wintry solar
#

ewww hardcoded loc_vars D:

hushed cradle
#

oops yeah thats my bad

#

the values are all in tables within tables so kinda annoying to get to

#

at least thats my excuse

wintry solar
#

but hardcoding like this is just a bad as hard coding them in your localization file itself

#

also I don't think any of them other than the numbers need to be variable

hushed cradle
#

ill fix that up rq then

royal ridge
#

funniest thing i've ever seen

hushed cradle
#

lol

#

ive been playing way too much of it

surreal marsh
#

why wild cards dont work

royal ridge
#

curious how the mechanics will be adapted to balatro

hushed cradle
#

well atm im got it set up so

#

you have a seperate hand area for any perk cards

#

you get 1 advantage after winning each round

#

ive already got a few perk card effects made

#

but atm im tryna make some kinda api thing for them

#

for anyone else interested in making their own

#

ah im now getting this

#

tried moving the card loc txt into the smods object instead of the loc file

woeful epoch
#

youre playing 9-8-6-5-4

surreal marsh
#

it should be a flush

woeful epoch
#

oh right LMAO

#

uhh

#

krill issue

surreal marsh
#

i just installed Familiar đŸ€”

#

return value of ref function isn't used 💀

wintry solar
hushed cradle
#

i do now

#

working as intended

#

mostly

#

still a couple things i need to fix up

#

but i changed a lot of the base game i feel like

wintry solar
#

I think that's okay for an optional module

frosty dock
#

hm

#

what layout should i use for seals?

#

2 rows like the rest?

wintry solar
#

I would prefer 2 rows, yeah

#

can the page toggle be outside the black background?

zealous glen
#

A circle

#

Actually a spiral

#

In perspective, so they shrink in the middle and grow larger in the edges of the screen

#

When you select the next one, it “zooms” in or out

unkempt thicket
frosty dock
regal wolf
#

might be too annoying to do tho

zealous glen
#

Background colours where?

regal wolf
frosty dock
frosty dock
#

at least not exclusively for tags, and I'm not doing it for everything

tepid sky
#

so uuh- my Xmult seems to be working like regular mult? anyone got any idea why?

hushed cradle
#

return Xmult_mod

tepid sky
#

oh- that was it?

hushed cradle
#

yeah

tepid sky
#

wow, such a small error :(

drowsy tulip
#

is there an easy way to give yourself cetain jokers

#

for debugging purposes

frosty dock
drowsy tulip
#

also is this correct for checking the first card in the scored hand

hushed cradle
#

lua starts at 1

night pagoda
#

How to make SMODS.Booster act as a consumable booster pack (with playing cards drawn to the middle of the screen)?

edgy reef
#

draw_hand = true

night pagoda
#

awesome, ty!

coarse nest
#

Just got a bit more of output stuff to link, the rules stuff and to adjust the text box locations for mod name, id, author etc and boom this is an easy challenge mod generator

hushed cradle
#

do editions have calculate functions?

#

surely right

unkempt thicket
#

not really, i got around it using a lovely patch though. there's also several config stuff you can do for money, chips, Mult, ect

hushed cradle
#

damn, what im tryna do isnt available as a config thing

#

so guess i gotta patch

wintry solar
#

They don’t no

#

They were lost to better calc

opal spade
coarse nest
#

Is there any way I can add a version into a SMODS file? I'm guessing I can just put in a line with --- Version: to have it at least written in the file to see and check. Or is there a way to make it also display as well?

opal spade
#

--- VERSION: 1.0.0

opal spade
coarse nest
#

Oh nice. Where abouts do I put it in? Up in the header?

opal spade
#

ye

coarse nest
#

Thanks

opal spade
hushed cradle
#

playable jokers sounds funny

coarse nest
#

And we have a full header generated with all the inputs.

#

I just need to add a section for rule stuff, tidy up the UI a little, maybe make some more pages to the app etc and it's done

hardy viper
#

i don't think you need the -------mod code bit

coarse nest
#

Correct, it's not needed. May as well remove it then

opal spade
crisp coral
#

lol???

#

that's hilarious

opal spade
#

i do need to change that so it runs a new calc for joker retriggers

#

cus that square joker should've grown

regal wolf
#

i imagine it takes all the jokers in the joker card Area

#

so if its not in the card area it wont get triggered on action

night pagoda
#

What is the second layer sprite position for the SMODS.UndiscoveredSprite? I assumed it was soul_pos but it's not

coarse nest
#

Acceptable GUI, yes or no?

tepid sky
coarse nest
#

Personally I'm slightly bugged by the Mod Description not matching with the way the languages section is done but it's a while ordeal to tackle and match XD

hardy viper
coarse nest
#

I'll take it.

tepid sky
#

if its easy and working it doesn't need to be looking amazing, simplicity looks great too

coarse nest
#

I'll have to make Rules with the custom and modifiers have it's own page, should I still roll with this or should I split it into two pages, one being jokers and cards and the other being consumables and vouchers?

#

So 3 page program or 4 basically

tepid sky
#

👍

coarse nest
#

I'm asking which haha

frosty dock
coarse nest
#

Was reffering to my own code lol.

frosty dock
#

yeah I also wasn't being clear lmao

#

steamodded handles mod names and descriptions differently from everything else, too

coarse nest
#

Yeah I could tell you meant that haha

#

Would be great if they could handle for localisations both descriptions and names

#

Something like loc_txt = { ['en-us'] = {name = 'Nom Nom'}, ['en-us'] = {description = 'this is a mod I made, have fun'}, },

shell tangle
#

Double checking - the only deck trigger_effects are at final_scoring_step for plasma and eval at the end of the round during the money totaling for other stuff, right? And any new ones effectively require a lovely patch?

edgy reef
#

The only time they're used is for Plasma and Anaglyph yes.

wintry solar
#
local total_rate = G.GAME.joker_rate + G.GAME.playing_card_rate
  for _,v in ipairs(SMODS.ConsumableType.obj_buffer) do
    total_rate = total_rate + G.GAME[v:lower()..'_rate']
  end```
getting a crash on this for a custom consumable type, it's set up exactly the same as another one I have but that one seems to work fine?
zealous glen
#

What's the crash?

#

Also, how to apply Hologram's effect to a soul sprite?

#

Okay looking at Ceres apparently I do need a lovely patch

hushed cradle
#

yeah thats what i did lol

wintry solar
#

arithmetic error on the total_rate line

wintry solar
zealous glen
wintry solar
#

hook at the end of Card:draw and check for your card and just put the shader on the floating sprite

zealous glen
wintry solar
#

the second one

zealous glen
#

So I'd stack two draws?

wintry solar
#

oh possibly

zealous glen
#

The way you're doing it makes it incompatible with other mods if they use the same line

#

But there's a patch which should make it compatible

wintry solar
zealous glen
#

Have you tested which of the two values is nil?

cedar flame
#

my best guess is that some value of v:lower()..'_rate' isn't initialized for some reason

zealous glen
#

Wait it should be the second value since otherwise it would break earlier

cedar flame
#

the stack trace says the local value of total_rate is 30

zealous glen
cedar flame
#

oh, and v = "Zodiac"

#

so my guess is zodiac_rate is nil

#

in which case the game can't add it to a number

hushed cradle
#

im tryna make a deck thats just spades

#

but i cant get it to remove the non spades before the screen finishes wiping

#

because im using events

#

but if i dont use events

#

then G.playing_cards is nil and itll crash

edgy reef
#

..But that should be impossible, G.GAME[self.key:lower() .. '_rate' is created every time the game calls init_game_object (which turns into G.GAME after a run is started).

hushed cradle
#

so im a bit stuck

edgy reef
#

So this is exactly how it's accessed

zealous glen
hushed cradle
#

yeah but it changes the suit

#

i wanna remove non spades

edgy reef
zealous glen
hushed cradle
#

gimme a sec

cedar flame
zealous glen
hushed cradle
#

how do i do that?

wintry solar
#

yeah I have no idea why this crashes

#

as you can see, there are other custom types that are previously accessed

#

time to examine some tables

#

oh

#

I might know why this has happened

#

was using a save state from before this type was created 🙃

zealous glen
hushed cradle
#

is that better?

zealous glen
#

Wait, why is the name j_cere_miku? Shouldn't that be the key, and the name "Hatsune Miku"?

zealous glen
zealous glen
#

Okay, it doesn't. How do I access the key of a Joker while it's being drawn?

wintry solar
#

card.config.center_key

zealous glen
wintry solar
#

yes

zealous glen
#

oh

wintry solar
#

it can also be a . though

#

it doesnt matter

zealous glen
#

that's why I asked

wintry solar
#

the config has the center_key saved, or you can access the center directly and grab the key

#

it should do

zealous glen
#

Neither worked

#

oh wait

#

I was stupid

wintry solar
#

oh it'll be self.config.center_key in the draw function

zealous glen
#

No, no, I think I just forgot to update the Atlas

#

Well, it almost worked

#

Miku is there but not the card

hushed cradle
#

this is the only deck that bunco adds i think , and it doesnt even have an apply func?

zealous glen
#

She's also not Hologram

cedar flame
hushed cradle
#

💀

#

thank you

#

i dont even have an excuse for not seeing that

cedar flame
#

happens to me all the time 😛

hushed cradle
#

im still not really sure how much this is gonna help me tho

#

it doesnt seem like it removes any cards from the deck

#

just changes the suit

primal robin
#

How I can define multiple config tabs for mod?

zealous glen
zealous glen
wintry solar
#

sounds like a wrong key issue to me

zealous glen
#

Okay the localization did have the wrong key

zealous glen
wintry solar
#

what does the patched file look like?

zealous glen
#

Ah wait I think I was off by one in the atlas coordinates

#

So the background is the soul and the soul is empty

#

where did she go 😭

tepid crow
#

did you swap the soul and background

tepid crow
zealous glen
#

I've fixed the coordinates now, I think, but I don't understand why I have the outline of Miku but no Miku

tepid crow
#

oh yeah you can actually see the outline

edgy reef
#

Is the shader bonking the Miku sprite?

zealous glen
#

also maybe I need to make it transparent so it will work?

tepid crow
#

it's probably the shader doing something yeah

wintry solar
#

yeah the shader nukes anything that has no transparency

#

if (tex.a > 0.999){tex = vec4(0.,0.,0.,0.);}

zealous glen
#

Not sure why it shows the specter (outline) of Miku but ok

wintry solar
#

it adds some glow too

coarse nest
#

Do I do this monstrosity between the buttons to keep the window the same size as all the others or have it in between the jokers and cards (or maybe below) and as a result have a bigger window and go through the ballache to resize the others? Or should I just not care about the window resizing as you click next and back?

zealous glen
coarse nest
#

Love the Brazillian Miku heavily

zealous glen
#

@hushed cradle use your Joker's key instead of their name in the patch, that's my suggestion

tepid crow
coarse nest
#

So do I go with the monstrosity of deck between back and next or do I add little bits to the height of each text frame for the other sections in order to compensate?

tepid crow
#

could theoretically also include it under the cards header?

coarse nest
#

But as it stands, once window size stuff is done, I just need to make a dictionary for custom and modifier options, build the stuff for restriction generation and it's complete. There'd be nothing more to add or update in this other than possible bug fixes/adding options for it to detect dictionaries added into it's folder which would allow modded jokers/effects/consumables etc to be used easier.

tepid crow
#

in any case, resizing the window just feels kinda weird to me

wintry solar
#

I'd just dump the whitespace between the content and the nav buttons

coarse nest
#

Cards header is a scrolling box that you populate with add card

#

I have it a fixed size to show 3 at once with any more being viewable by scrolling.

#

I could split jokers and cards into seperate windows though. Would make making a full custom card loadout easier instead of a tight 3 space thing

#

Yeah that's probably the best option. Gives a big box for jokers which will be more than most people would give but eh haha

primal robin
#

When i'm set G.GAME.used_voucher['v_planet_metchant'] = true for example, it doesn't appear in "vouchers redeemed this run" page. What i'm doing wrong?

tepid crow
#

(it also should've resulted in an error since used_voucher doesn't exist... đŸ€”)

primal robin
#

What about G.GAME.used_vouchers["v_magic_trick"] = true?

#

It also don't work

tepid crow
#

works for me - make sure you "apply" it after any resets are done to G.GAME and G.GAME.used_vouchers

primal robin
#

So weird

tepid crow
#

G.GAME gets completely rebuilt at the start of each run for example

primal robin
#

Like this code works well before. But today it crashes and after crash fix voucher doesn't appear.

#

I did not change it at all lumaangry

tepid crow
#

good old "but it was working yesterday"

primal robin
#

With cryptid crash

#

Looks like issue

coarse nest
#

Oof I went from 657 lines of code to 1135 XD

tepid crow
primal robin
coarse nest
primal robin
#
Card:apply_to_run(G.P_CENTERS["v_magic_trick"])

Easy crash

#

Now 2 of my boss blinds crashes because of it

#

Well

#

Waiting for fix

#

Because i'm too stupit to implement better voucher applying, with animation, etc

rigid moss
#

Hey guys, does anybody know how enhancements draw their sprites on cards? Like where in the code does steel enhancement is applied to card sprite? Im making a mod that adds consumables capable of upgrading/modifying jokers and I would like to see applied cards on jokers visualy.

#

like for example when I use autograph card, I want to see actual autograph (or multiple of them) on a selected joker

tepid crow
#

enhancements are done by rendering the enhancement, then the suit/number on top of it

#

iirc

#

I should probably double check that

rigid moss
#

do you know in which file the rendering is implemented? Because i'm having trouble finding it

zealous glen
#

I think it might be Card

#

Look for draw

tepid crow
#

probably Card:draw if I had to guess yeah

coarse nest
#

Does anyone know where I can find all the custom rules and modifier ID's or are lines 6-22 in challenges.lua my best bet and anything else I can pick from challenges.lua is all I'll be able to find?

zealous glen
#

But not draw_from

zealous glen
#

If it changes the colours of the Jokers it’s likely it needs to be a shader

mellow sable
#

You could maybe use sticker API, unless you need shaders

zealous glen
#

I think this should have its own API

#

RIP Joker Stamp API

rigid moss
#

ok thanks guys

mellow sable
#

I’m also down to implement Joker seal effects in Cryptid at some point

rigid moss
#

and how about consumables that should make part of a selected joker invisible? Like for example c_tearedChunk? Is there some built in function for applying masks?

mellow sable
#

You’d have to get a shader applied on it

tepid crow
#

shader would probably work, and LÖVE itself also might have something implemented

tepid crow
zealous glen
wintry solar
#

theres a shader property now to stop the base layer being drawn

regal wolf
#

the dissolve effect is done through shaders so it's definately possible

zealous glen
coarse nest
wintry solar
#

I don't remember what it's called but it was definitely added

coarse nest
#

I can't seem to find results for daily in any of the main folder files. So it must be tucked away somewhere

wintry solar
#

no_base = true on the shader object or something like that

zealous glen
#

Is that for Steamodded Editions or does Steamodded have a shader object

wintry solar
#

steamodded has a shader object

tepid crow
coarse nest
#

Only one way to find out XD Not 100% sure what they're supposed to do though.

#

Daily might only give one attempt per day and is tracking the date and time somewhere. In which case would have to fail or beat the run to test either.

tepid crow
#

daily challenge is something thunk talked about - iirc it was about getting the highest score on a specific seed

#

set_seed is probably a helper for that

coarse nest
#

Ahhh so would have a web server connection etc, yeah definitely not going to work then XD

#

Going through challenges though these are all the custom rules I could find.

#

Need to work out how to get a value input box to appear on the ones that have values which is why I currently have them omitted

#

If anyone knows of any more that work without additional mods they'd be hugely helpful

tepid crow
#

is that... string injection?

coarse nest
#

So the code between the " " will be inserted between two ' ' for the generated output. So because they have the worded value also having ' it's a way I can impliment the fixed value without needing another addition for them

#

Otherwise I'd need to have a second area they could inject etc.

tepid crow
#

yeah, string injection

#

doesn't that break for non-string value = ?

coarse nest
#

For the others that have value's I'll probably write something to tack on the value if it's reading it from a box made for them.

#

Would be a second if line where the number is a second variable.

tepid crow
#

I feel like the (kinda janky) string injection is unnecessary if you're gonna have an edge case anyways, no?

coarse nest
#

Since for those I'd need to add the value section anyway as part of an if statement. Since if I had something like all_eternal, value = it'd probably break

#

Chances are they'd end up similar to my card code.

#

I could probably optimise it a little by having it do the dictionary compare in the if statement but there's no need for optimisation at this level

tepid crow
#

me after looking at lua for hours: "huh this kinda looks like python"

coarse nest
#

Haha. It is lol

tepid crow
#

I know. I should probably go to bed soon lol

coarse nest
#

I mean, it's important to look after yourself so yes. Get a drink of water and go to bed

opal spade
#

ok i just woke up and realized that my method of appending extra area calculations after jokers are calculated simply wont do

#

i need to override the joker calcs to be a part of my calc because red seal

#

or maybe i should wait till joker retrigger api is released bcos thats a major update that might break everything im doin rn

opal spade
#

why does evaluate_play fire twice

#

upd: nvm im just stupid

opal spade
opal spade
cunning barn
#

i actually think that this is a fun idea
this gives me a challenge deck idea if this becomes like a Thing
jokers don't spawn in shops but they can show up in card packs and things that give consumables
and when they're triggered as part of a hand they affect that hand
that would be sick as heck

opal spade
cunning barn
#

i wonder what a normal playing card would do in a joker or consumable slot

opal spade
#

rn the plan for that is to have it act the same as held in hand with exception of edition

cunning barn
#

interesting...

opal spade
#

btw by default jokers (and consumables bcos for this anything thats not a playing card is a joker) have no suit, no rank and are always included like stone

#

the plan for that is to make an api that would allow to define that per joker

#

so like lustful joker would be hearts

languid mirage
#

🩭

tepid sky
#

flames option? >_>

languid mirage
#

was already there

#

funny vanilla settings support

tepid sky
#

ah okay

#

prob would be my playing corner :>

tepid sky
#

if i wanted to play a sound when a spesific vanilla joker scores, how would i do that?

solid salmon
#

does anyone have the link to debug+

primal robin
#

Still have empty tooltips. How to fix? Steamodded APLHA-0820c

primal robin
#

In last Steamodded my shop hijacking created new funny bug

hushed cradle
#

mine are working

night pagoda
#

I have 830b and my sticker tooltips aren't working either

hushed cradle
#

thats odd

#

im not sure then sorry

solid salmon
#

where are the decks in the game files

coarse nest
#

In what way? They're all listed below line 626 if you just need the names, I'm guessing you're wanting to edit the functions though?

#

Which they have some effects there, but not everything

hushed cradle
#

if you go to backs.lua, the apply_to_run function shows you a lot of stuff you can do

#

like vouchers, discards and hands etc

hushed cradle
#

if i use in_pool for an edition

#

how do i make it return false for jokers

#

also is there a global list of every card in use?

#

like every card in the deck, consumables, and jokers

tepid sky
tepid sky
#

i prob am

zealous glen
hushed cradle
#

ive figured it out kinda

#
local ease_dollars_ref = ease_dollars
function ease_dollars(mod, instant)
    local inc = 0
    local areas = {
        G.jokers or nil,
        G.hand or nil,
        G.deck or nil,
        G.play or nil,
        G.discard or nil,
        G.consumeables or nil,
    }
    for _, area in pairs(areas) do
        for __, card in pairs(area.cards) do
            if card.edition and card.edition.type == 'cere_mint_condition' then
                inc = inc + card.edition.extra
            end
        end
    end
    ease_dollars_ref(mod, instant)
    ease_dollars_ref(inc, instant)
end```
#

think thats a decent way of doing it

opal spade
stray orbit
#

i want to make a joker that turns some percent of +chips into +mult, will i have to patch every single instance where chips are added or is there a less complicated way?

crisp coral
#

hook to these four functions that manage the evaluations

#

alternatively just calculate it during context.joker_main as normal

#

although that might not be accurate to your desired effect

opal spade
#

basically u need to calc other_joker with other joker being the rightmost non-debuffed joker (or consumable)

#

other_joker fires off after joker_main for that specific joker

#

also this is how i find out other_joker is one of the few calcs that fires off for consumables

stray orbit
#

including when cards initially score

#

also which file are these in

brisk pond
#

how do you get the name of a joker?

#

i tried config.center.name but it gives me the key sometimes

opal spade
#

why would you need the name anyway

languid mirage
#

use key

crisp coral
#

if not then i'd also be worried

#

eval_card in state_events.lua iirc?
calculate_joker and get_edition in card.lua
eval_this implemented by steamodded

stray orbit
#

idk much about lobotomy corp but i watched my friend play ur mod and its awesome

opal spade
brisk pond
nova mortar
#

Talisman keeps crashing my game

#
main.lua:1333: attempt to index global 'SMODS' (a nil value)

Additional Context:
Balatro Version: 1.0.1g-FULL
Modded Version: ???
Love2D Version: 11.5.0
Lovely Version: 0.5.0-beta6

Stack Traceback
===============
(3) main chunk of file 'main.lua' at line 1333
(4) global C function 'require'
(5) Love2D function at file 'boot.lua:323' (best guess)
Local variables:
 c = table: 0x0102f0b010  {gammacorrect:false, version:11.5, audio:table: 0x0102a85700, title:Balatro (more...)}
 openedconsole = boolean: false
 confok = boolean: true
 conferr = nil
(6) global C function 'xpcall'
(7) Love2D function at file 'boot.lua:362' (best guess)
Local variables:
 result = boolean: true
(8) global C function 'xpcall'
(9) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
 inerror = boolean: true
 deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
 earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
#

Mods are Talisman, lovely, Cryptid, and steammodded

#

Talisman has 'Talisman' as the name

opal spade
#

you dont have steamodded

#

check inside the steamodded folder

nova mortar
#

Huh

#

Seems to be an issue of steammodded having wierd

opal spade
#

it should be something like this

#

you might have it nested

nova mortar
#

No, fixed the issue

#

It's steammodded-main not being steammodded

frosty dock
#

steamodded doesn't need a specific name

#

it just can't be nested

nova mortar
#

No, no

#

The way I solved the game to play Cryptid is by renaming Steammodded-main to steammodded

languid mirage
#

I can assure you it doesn't matter how steamodded folder is named

nova mortar
#

And if it is steammodded-main it doesn't work

#

I cannot explain to you how that worked, I only know that it does

frosty dock
#

are you sure you didn't rename anything else?

nova mortar
#

Yes

frosty dock
#

because it very much does matter for cryptid/talisman

nova mortar
#

I changed Steammodded-main to steammodded

#

Suddenly, it worked

hushed cradle
#

do stakes have loc vars now?

brisk pond
#

Can you tell me whats wrong with this?

local UTIL = SMODS.load_file('Util/Util.lua')()

if THEMED.CombatAces then
    THEMED.CAJOKERS = {
        [1] = 'j_Themed_CA-General',
        [2] = 'j_Themed_CA-Mercenary',
        [3] = 'j_Themed_CA-Promotion',
        [4] = 'j_Themed_CA-Recruiter',
        [5] = 'j_Themed_CA-Secret Agent',
        [6] = 'j_Themed_CA-Soldier',
        [7] = 'j_Themed_CA-Supplies',
        [8] = 'j_Themed_CA-Veteran'
    }
    SMODS.Consumable {
        key = 'CA-Contract',
        loc_txt = {
            name = 'The Contract',
            text = {
                'Creates a random',
                '{C:attention}Combat Ace Joker',
                '{C:inactive}(Must have room)'
            }
        },
        atlas = 'Tarots',
        pos = {x = 1, y = 1},
        cost = 3,
        unlocked = true,
        discovered = false,
        can_use = function()
            if #G.jokers.cards < G.jokers.card_limit then
                return true
            else
                return false
            end
        end,
        use = function(self, area, copier)
            UTIL.createJoker(THEMED.CAJOKERS[UTIL.randomInt(8)])
        end
    }
end
#

UTIL.randomInt(N) gives a random int from 1 to N

frosty dock
brisk pond
#

thanks

frosty dock
#

that should probably be required

nova mortar
#

Cryptid has crashed my pc - and subsequently my sound

hushed cradle
#

my apply stakes isnt working and im not sure why

#
local steel = Ceres.CONFIG.run_modifiers.stakes.enabled and SMODS.Stake{
    key = "steel",
    pos = {
        x = 0,
        y = 0
    },
    sticker_pos = {
        x = 0,
        y = 0
    },
    atlas = "stake_atlas",
    sticker_atlas = 'sticker_atlas',
    applied_stakes = {"gold"},
    unlocked_stake = "cere_carbide",
    colour = HEX("8E989E"),
    shiny = true,

    modifiers = function()
        G.GAME.starting_params.consumable_slots = G.GAME.starting_params.consumable_slots - 1
    end,
}```
nova mortar
#

I think it just crashed youtube, actually

#

And the internet, apperantly.

hushed cradle
nova mortar
#

Cryptid bricked my computer

frosty dock
hushed cradle
#

nws

#

thanks for letting me know

frosty dock
rough furnace
#

Ooh api design

#

TBH I would replace the steamodded header with a configuration file that has all its props plus some more [such as main file (for steamodded to load) and the source repo/download link]

#

Could still load steamodded headets for files without the configuration file to support backwards compatibkity

#

Also you should let me disable the config loading in said conifg file to prevent it from trying to load my config.lua

frosty dock
#

hm ideally it's just the same file between the mod's manifest and what you upload to the index

zealous glen
hushed cradle
#

uh

#

sure

#

i mean i know why it wasnt working

#

but if you have an opinion on smth else feel free

zealous glen
# hushed cradle sure

I don’t really like the added challenge provided by the stake. It limits how you can interact with the game, but not in a particularly interesting way (also, I don’t think it’s very impactful, but anyways)

#

Thunk did have Stakes which similarly limited how you interacted with the game by increasing costs

#

But I think the change to Stakes that add Stickers was a smart move, because they instead allowed you to interact with more of the game

#

The off-the-top of my head suggestion is to make Stickers that make Tarots disappear at the end of turn; I have a similar mechanic which is just temporary cards (which could be anything), so that’s why I thought of it

#

It’s not a Sticker although the placeholder graphic is reusing the Perishable sticker

hushed cradle
#

💀

#

probably a better idea tbh

zealous glen
#

Great minds etc.

hushed cradle
#

oh yeah ofc

#

i didnt have many ideas for stakes apart from the defective sticker

#

which i quite like

#

so ill probably change the stake to implement that sticker somehow

solid salmon
#

what's the boss version of G.GAME.Round?

zealous glen
# hushed cradle

Although I’ve been thinking about this mechanic, and while I intend to make it synergize with destroy effects, I do wonder if that would be too strong

zealous glen
hushed cradle
#

aw

zealous glen
#

It just feels terrible to the player

#

I probably would go with this alternative either, but at least consider giving it a chance to double the effect

hushed cradle
#

it can have positive effects tho

zealous glen
#

Although I don’t like that either

#

I don’t see what benefits it could provide

hushed cradle
#

any joker that resets or loses value can not

zealous glen
#

That’s not really worth it

#

Besides for most of them you can just not reset them

hushed cradle
#

i mean i kinda struggle to see how im supposed to make any stakes that are enjoyable then

#

idea is meant to be theyre hard

#

harder than gold

#

gold stake isnt exactly a fun time

zealous glen
#

Stickers make Jokers cheaper, but furthermore they make holding onto Jokers worse, which encourages more dynamic, changing gameplay

#

Alternatively, they encourage skipping more, which, as much as I think it’s a bad, boring mechanic, is what thunk would like to encourage

#

You can make the game harder by turning it into a nail and making anything other than a hammer unable to beat it, but is that fun?

hushed cradle
#

i do understand what youre saying

#

im just not good at coming up w ideas that are both challenging and fun

solid salmon
#

how do i make this work for boss blinds (i have never done something like this before)

zealous glen
#

I think it is hard

#

Otherwise game design would be easier

#

But try thinking of trade-offs for the player

zealous glen
zealous glen
solid salmon
#

i did

#

and it said boss was a boolean value

zealous glen
#

Do you want it to be retroactive or not

solid salmon
#

if that means repeating then yes

zealous glen
#

No it doesn’t mean repeating

solid salmon
#

then idk

#

what it means

hushed cradle
#

retroactive is something like fortune teller

#

it keeps track of all tarot cards used

#

so when you get it

#

its mult starts at whatever number that is

#

something like constellation isnt

#

when you get it it starts at 0

#

then only counts planets used after you get it

hushed cradle
coarse widget
#

is there a good example of a mod that patches the joker and card art? i made some modifications but im not sure how to patch them into the game. just want a really basic example i can copy for personal use

hushed cradle
solid salmon
#

then no

#

i want it to start at 0

hushed cradle
#

okay well your joker needs a config table

#

something like

#
config = {
  mult = 0,
  chips = 0,
}```
#

then in the calculate function

#

youll need

#

you can use this function to see if the current blind is a boss

zealous glen
hushed cradle
#

then do card.ability.mult = card.ability.mult +100

#

to increase the mult for example

#

similar thing w chips

#

and use this function for changing handsize

zealous glen
#

The 100 could be values stored in the extra table

#

While they don’t change, I think it’s good practice especially because you can dynamically add it to tooltips with loc_vars, which means you can later change it automatically by changing a single number

solid salmon
hushed cradle
#

yeah ik but i wanted to give a super simple example

#

so dont put that actual function anywhere

#

you can just do if blind:get_type() == 'Boss' then

#

where blind is the blind

#

im not sure what the blind is tbh

#

G.GAME.blind maybe

zealous glen
hushed cradle
#

i like that that feels pretty vanilla ish

#

i might not use that idea exactly but i def see what you mean now

solid salmon
hushed cradle
#

you dont copy that function

frosty dock
#

uh why

#

you just need to use that function

hushed cradle
#

do G.hand:change_size(1)

#

that and Blind:get_type() are already in the game

#

so you can use them yourself

solid salmon
#

ok

#

i think i got it

hushed cradle
#

you should make extra a table

#

with +10 and +100

#

and then add extra[1]

#

to mult

#

and 2 to chips

#

its better practice to not have them hardcoded in the calculate function

solid salmon
#

so another config?

hushed cradle
#

nono just change extra from 100 to {10, 100}

#

well probably {mult = 10, chips = 100}

#

and then do card.ability.mult = card.ability.mult + card.ability.extra.mult

#

same w chips

solid salmon
#

ok

#

i think im getting it

hushed cradle
#

youll want to change if blind:get_type() == 'Boss' then tho

#

blind isnt actually the blind

#

i just dont know what its called

solid salmon
#

G.GAME.Blind?

hushed cradle
#

might be

#

anothing neat thing you can is

#
                ['name'] = 'Large Joker',
                ['text'] = {
                    "Gains {C:mult}+#2#{} Mult when each",
                    "played {C:attention}Ace{} is scored",
                    "{C:inactive}(Currently {C:mult}+#1#{C:inactive} Mult)"
                },
            },```
#

if you have #1# and #2#

#

in your loc txt

#

instead of +10 and +100

#

then you can have a function that passes in the correct values to the text

#
loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.mult_mod, card.ability.extra}}
    end,```
solid salmon
hushed cradle
#

youll have to start a new run if you havent

solid salmon
#

ok

hushed cradle
#

can i see your joker code?

solid salmon
hushed cradle
#

okay you probably need to stop just copy pasting my code because im not rewriting it specifically for your joker

#

that loc vars func is specific to one of my jokers

#

in yours you want to return your extra values from your extra table

#

not mult_mod (doesnt exist)

solid salmon
#

so like this

hushed cradle
#

yes

#

perfect

#

well it should be

solid salmon
#

ok

#

it still crashed with the concatenate error

hushed cradle
#

lets see the whole code?

#

and maybe send the error again too

solid salmon
hushed cradle
#

you might need help from someone smarter than me

#

im not sure why thats not working

solid salmon
#

i know

#

mathisfun

#

he has experience

hushed cradle
#

he is def way smarter than me

solid salmon
#

also i feel like this joker is imbalanced so perfect

mellow sable
#

You’re not actually doing anything with the mult/chips

#

Look at Supercell from Cryptid for an example

#

Wait nvm I think ability covers that

nocturne perch
#

did you actually close the SMODS.Joker table?

#

there's no closing bracket in the image

mellow sable
#

Based on the crash it looks like a loc vars issue

hushed cradle
#

yeah thats why i was confused

#

the return looks formattted right

primal robin
#

For now I'm using G.GAME.pool_flags as a storage for all my mod's run data. Maybe there's "better" place?

unkempt thicket
#

what file is the planets calculated?

hushed cradle
#

i just use G.GAME.(modname)

tepid crow
#

in any case, the answer is probably Card:use_consumeable(...) @ lines 1264-1267

brisk pond
#

how can I get the cardarea of a joker from its card?

hushed cradle
#

card.area

#

also its probably in G.jokers

primal robin
hushed cradle
#

nws

#
G.FUNCS.hit = function(e)
    if not (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.SMODS_BOOSTER_OPENED) and
        G.hand.config.card_limit <= 0 and #G.hand.cards == 0 then 
        G.STATE = G.STATES.GAME_OVER; G.STATE_COMPLETE = false 
        return true
    end

    delay(0.3)
    
    G.hand:emplace(G.deck:remove_card())
end```
#

anyone know why this isnt working?

#

could it be another state issue?

unkempt ridge
#

Welp this is working
But not with base game enhancements??? somehow??
If anyones curious and wants to peek, check here. Considering it's something involving rand_enhancement.name. Not sure how we'd get the name/key of both modded and unmodded things

frosty dock
#

you should use rand_enhancement.key instead

#

looking at it, even that's unneeded

#

you can just pass rand_enhancement into set_ability directly

unkempt ridge
#

rand_enhancement doesn't work, but rand_enhancement.key does

hushed cradle
unkempt ridge
#

and tehcnically Ace of wands too

hushed cradle
#

awesome

#

i wanted to but i was too lazy

#

so im glad someone is

#

are you gonna do reversals for all of them lol

unkempt ridge
#

Don't count on it, but we'd love to

hushed cradle
#

yeah it seems like just way too much hassle tbh

zealous glen
hushed cradle
#

im slowly getting round to the major ones tho

hushed cradle
#

she doesnt have a name

zealous glen
hushed cradle
#

not in the game lol

zealous glen
charred harbor
#

Hey, I'm making my first mod here. Using Steamodded can I just drop in a SMODS.Joker line instantly?

hushed cradle
#

for sure

frosty dock
unkempt ridge
#

Oh lemme test that

charred harbor
#

The API guide for Steamodded is a bit sparse...

hushed cradle
#

steamodded itself has some example mods which are pretty good

#

and you can unzip a copy of the games exe to look through the source code too

#

which is def recommended

charred harbor
#

Yeah, I've been looking around, it's just hard to isolate what I'm actually looking for

charred harbor
hushed cradle
#

in the steamodded folder itself

charred harbor
#

Sick, ok

hushed cradle
#

if youre wondering how to make a joker functional, then if its similar to any in game jokers you can look around the Card:calculate_joker function to see how to game calculates that

#

and apply something similar to yours

opal spade
#

modded vanilla is an example mod that's rlly good at teaching smods via vanilla jokers

charred harbor
#

That's very helpful, totally missed those examples

hushed cradle
#

play button has a thing for one_press only

#

then that gets reset

#

which i wasnt doing

unkempt ridge
hushed cradle
#

might be a bit strong

#

but the idea is awesome

unkempt ridge
#

Now to just figure out if there's a way to undisable a boss blind after a hand is played

primal robin
unkempt ridge
primal robin
#

Cool

haughty wraith
# hushed cradle im slowly getting round to the major ones tho

somewhere in my texts, they described how they would work and how they worked in the deck and the remaining 52 cards were ordinary and inverted.....in my opinion, all the ideas have already been described in my texts (I have too much free time....)

brisk pond
#

guys i've got this function that creates a joker from its key

function UTIL.createJoker(key,edition,forced)
    if THEMED.Debug then
        print("Creating Joker: " .. key)
    end
    G.E_MANAGER:add_event(Event({
        func = function() 
            if forced or (#G.jokers.cards < G.jokers.config.card_limit) then
                local _card = create_card('Joker',G.jokers, nil, nil, nil, edition, key)
                _card:start_materialize()
                _card:add_to_deck()
                if edition then
                    _card:set_edition(edition)
                end
                G.jokers:emplace(_card)
            else
                if THEMED.Debug then
                    print("Cannot create Joker: "..key.." because there is no room")
                end
            end
            return true;
        end}))
end

can I put a return somewhere so that the function returns that card or its position?

night pagoda
#

Is there a reason a drawn card using draw_card() might appear invisible? Losing my mind

unkempt ridge
sonic mortar
#

still trying to figure out how to resize a card on the fly slugsweat

unkempt ridge
#

Maybe jus have it check for context changes and then modify the hitbox size? Not sure if that'd do anything.
We know lambert kinda does a similar context check thingy but

night pagoda
#

Something stupid happens and I'm going to explode:
Whenever I pull a card from G.deck to G.hand using draw_card, it appears invisible, BUT if I don't specify the card it is visible!
???

#

😭

languid mirage
#

do you have cartomancer mod?

night pagoda
#

yup

#

...fuck

languid mirage
#

:)

night pagoda
#

I deal with this for like three hours and it's not even localthunkage?

languid mirage
#

if I dont hide cards then the shadow stacks

#

and looks weird

sonic mortar
#

it's also why during the animation of my zen consumable, some of the cards pulled are invisible

#

spooky

night pagoda
#

anyway, thanks!

unkempt ridge
night pagoda
#

I feel like I lost too much braincells