#💻・modding-dev

1 messages · Page 62 of 1

cedar flame
#

lemme try that, fingers crossed

frosty dock
#

if it's an object of a different type, it should all be fine, just note that the subordinate object type needs to be created after the caller

crisp elbow
#

Could this be because of the PNG file not being an 8BitDeck one? That shouldn't matter 🤔, it's just the suit in a sprite sheet

frosty dock
#

else the class has already being injected by the time the new object is created

cedar flame
#

oh hey, that did fix it for hand sorting! now i gotta figure out the deck preview

zealous glen
cedar flame
#

thanks :D

frosty dock
#

looks about normal, you don't have a loc_txt. I assume you don't have a localization file either?

frosty dock
#

assume A is injected before B, then A creates B while all A's are being injected, then during injection of B's, B creates another A that never gets injected

crisp elbow
#

Lemme double check (this is on someone's else's repo I just wanna make sure the actual setup is good)

#

and probably add it to the loc_txt

wintry solar
#

is the order just the order they are in the file?

zealous glen
frosty dock
wintry solar
frosty dock
#

if A injects before B, then A can create B's during injection because B's aren't yet injected. But not the other way around

wintry solar
#

well

#

Atlas appears to be injected after my new object

zealous glen
frosty dock
wintry solar
#

yeah

crisp elbow
frosty dock
#

it doesn't matter if the type of B has been created, in fact you can't create a B if its type doesn't exist yet

hushed cradle
#

1 sec

#
return {
    ['misc'] = {
                ['suits_plural'] = {
            ['cere_Leaves'] = 'Leaves',
            ['cere_Crowns'] = 'Crowns',
            ['cere_Coins'] = 'Coins',
        },
        ['suits_singular'] = {
            ['cere_Leaves'] = 'Leaf',
            ['cere_Crowns'] = 'Crown',
            ['cere_Coins'] = 'Coin',
        },
        }
}```
#

smth like that in the loc txt file

cedar flame
#

huh, weird that this fixes it for hand sorting but not the deck preview since they both use get_nominal!

frosty dock
#

oh

wintry solar
#

oh wait no it doesnt

frosty dock
#

deck preview uses registration order

cedar flame
#

is this because of suit_nominal_original

#

ah fascinating

frosty dock
#

specifically this

cedar flame
#

yeah i was looking at that bit... no way to really modify the object buffer order easily i assume

zealous glen
cedar flame
#

since SMODS itself registers the suits in vanilla order

frosty dock
#

obj_buffer receives keys at the end whenever objects are created

#

you could just manipulate that table

cedar flame
#

that feels ugly, but maybe it's the only way haha

zealous glen
frosty dock
#

clearly when creating an instance of a type, the type has to already exist

zealous glen
#

You don’t even need different types actually

#

You could try to create the same type of object

crisp elbow
#

The only other problem I'm having now is the texture just not showing up 🤔

frosty dock
#

creating an object of the same type definitely has potential to infloop if that's what you're saying. I'm not sure how exactly this works in lua, but I presume the for loop will catch the new elements

crisp elbow
#

it's named correctly in my files and I think it should be called accordingly with atlas pos

zealous glen
#

did you use the correct infix key

frosty dock
#

actually it will definitely, given it just goes through numerically until it finds a nil

zealous glen
#

Aka prefix

#

If you didn’t set a custom one, it’s the first four letters of your mod’s name

frosty dock
#

ID*

#

in lower case*

crisp elbow
#

Tried doing that with the hc and lc atlas, same result of it just showing hearts

#
    lc_atlas = 'fam_webs'```

(fam is the prefix in this case)
#

i tried it with and without

frosty dock
#

in the constructor, the prefix is out of place

#

it's not needed there

#

actually this might be a case of the few select patches that the update broke

crisp elbow
#

🤔 potentially

frosty dock
#

actually yeah that was about front sprites now wasn't it

crisp elbow
#

so it's not gonna work till a smod patch is out, good to know

frosty dock
#

working on it now

edgy reef
#

Kinda suprised so little broke.

#

Basically just SMODS.Sticker application and front atlases

#

ig it is a cosmetic update so not much was added

cedar flame
#

i think the update next year is gonna be the one that breaks a lot

hushed cradle
#

i still find it so crazy that i hadnt touched stickers until today, then i couldnt figure anything out and it turns out they just broke

hushed cradle
crisp elbow
#

aure the beloved

zealous glen
#

Joker idea:

Before your final hand of round, disable the Boss Blind

crisp elbow
#

chicot moment

#

but dusk

zealous glen
hushed cradle
zealous glen
cedar flame
#

got the suit order fixed!! thanks again for the help :D

wintry solar
#

turns out I wasn't injecting an atlas and my print message was wrong 🎉

#

is there a way to manually inject it?

frosty dock
#

yeah you can just call inject on it

#

SMODS.Atlas{...}:inject()

wintry solar
#

I get an assert failure because it can't find the mod path, I guess because the current mod isn't my mod anymore?

frosty dock
#

oh right

wintry solar
#

I mean, I can just have the atlas seperate, it's not a big issue

frosty dock
#

in that case you could just use SMODS.Atlas.inject() and pass in the object to that without creating an object of this type

#

as in just give it a raw table

#

anyways there's your fixes for 1.0.1g

crisp elbow
#

lemme know when it hopefully gets pushed for a fix POGGERS and if I need to change any other code

frosty dock
#

it's already up

crisp elbow
#

Ty sir

#

🙇‍♂️

#

or ma'am

frosty dock
#

sir is fine

vital raptor
#

I'm looking at the steamodded wiki and I am completley befuddled

shell tangle
#

Assuming for dev stuff, since you're in this channel, what's confusing? There are some example mods in the steamodded files for another starting point, as well.

vital raptor
#

oke I'll check out the example mods thx.

hushed cradle
#

how tf am i getting ghost patches

#

i do not have a patch for this

#

i swear

#

why is it there

#

wait thats probably a real thing isnt it

#

oh yeah that boss

#

still tho

#

my patches just randomly broke i swear

placid frigate
#

hey how does the new update effect mods

crisp elbow
#

the last fix that was needed was pushed maybe 15 mins ago?

#

It was all cosmetic stuff

lament fjord
#

Which files are modified with the new update

crisp elbow
#

How would I be able to try and have the new suits I added not appear in the initial deck? I see that Bunco did it through essentially creating a new function, is that the only way it's possible?

night pagoda
#

huh? arcana?

#

nvm, I think I figured this out

#

nope; this straight up crashes

#

still have no idea where that arcana desc came from

#

oh

#

it's Other, not Booster

plain wyvern
#

okay I'm going to sleep tomorrow I'll try and implement full suit texture packs

wintry solar
#

@zealous glen @shell tangle made a start, this is the entire defintion rn

AltTexture({
    key = 'test',
    type = 'Joker',
    path = 'hd_jokers.png',
    loc_txt = {
        name = 'HD Jokers Concept'
    }
})
night pagoda
crisp elbow
#

oh really?

#

🤔 I may have to implement that rq

night pagoda
#

I think this should do the trick:

in_pool = function(self, args)
    if your_thing_happens then
      return true
    else
      return false
    end
end
#

(in this case you can just return your_thing_happens I guess)

mental nacelle
#

what exactly does key_append do in create_card()?

#

i'm trying to set up a deck with 5 eternal jokers

hushed cradle
#

do i need a loc_txt for consumable types?

#

or can i fit it into the loc file

#

this makes it seem like i need a loc txt

#

unless im misunderstanding it completely

placid frigate
primal robin
#

Looks like booster packs opening and closing even more hardcoded than shop

opal spade
#

is registering locale-specific atlases possible for non-center objects?

#

or just having locale-specific version of an atlas in general

crisp elbow
#

Uhhhh I believe so?

#

As long as you're utilziing the API properly I think

opal spade
#

i should've probably checked the documentation first because it literally says it right there

hushed cradle
#

do smods backs have an apply to run func or how does that work?

opal spade
hushed cradle
#

ty

#
config = {
        vouchers = {
            'v_clearance_sale',
            'v_hone',
        },
        reroll_discount = -2,
    },```
#

negative reroll discount lmao

opal spade
#

art pass, still thinking of the effect for the one on the right but i like how it turned out

hushed cradle
#

art looks amazing

#
['b_cere_soul'] = {
                ['name'] = "Soul Deck",
                ['text'] = {
                    "Start run with an {C:eternal,T:eternal_sticker}eternal{}",
                    "{C:legendary,E:1}Legendary{} Joker",
                }
            },```
#

how do i get this to display the eternal info thing

#

ive tried T:eternal

#

it works for things like vouchers but i cant figure it out for stickers

frosty dock
#

uh you don't, it draws from centers, not loc descriptions

#

you can use a fake center

#

G.P_CENTERS['sticker_eternal'] = { set = 'Other', key = 'eternal' }

hushed cradle
#

ah

#

thank you

#

works perfectly

solid salmon
#

Hey guys what's the consumable version of jokers_to_create and G.jokers.config.card_limit?

hushed cradle
#
if context.setting_blind and not (context.blueprint_card or card).getting_sliced and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
            G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
            G.E_MANAGER:add_event(Event({
                func = (function()
                    G.E_MANAGER:add_event(Event({
                        func = function() 
                            local card = create_card('Spectral',G.consumeables, nil, nil, nil, nil, nil, 'poltergeist')
                            card:add_to_deck()
                            G.consumeables:emplace(card)
                            G.GAME.consumeable_buffer = 0
                            return true
                        end}))   
                        card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_plus_spectral'), colour = G.C.SECONDARY_SET.Spectral})                       
                    return true
                end)}))
            G.GAME.blind.chips = G.GAME.blind.chips + (G.GAME.blind.chips * (card.ability.extra / 100))
            G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
            G.HUD_blind:get_UIE_by_ID('HUD_blind_count').UIBox:recalculate()
        end```
#

consumeable_buffer

#

and G.consumeables.config.card_limit

solid salmon
#

My mods aren't existing and what is this error?

zealous glen
hushed cradle
#

that might look really goofy, or really cool

#

lemme try it

#

oh

#

it just doesnt work

zealous glen
hushed cradle
#

wayy too hard for me

zealous glen
hushed cradle
#

yeah exactly, way too hard

languid mirage
crisp elbow
#

Yeah that's talisman

#

I think

#

Talisman makes your save unusable on vanilla Balatro because it saves your high score as it's bignum / omeganum chicanery

coarse nest
#

I'm currently making a 'sandbox' challenge generator thing that is a python gui and generates a challenge.lua file with the specific parameters selected and you'd just save it to a folder in your mods folder etc. I only just thought about joining the discord and checking, but is there something like this already and I've wasted my time or is this something actually useful and desirable? I'm having it do jokers, if they're eternal or not, their enchantment (ie, poly, negative etc), cards in the deck (suit, number, enchant, seal etc), consumables and vouchers. So yeah, is there something like this already or shall I keep going?

#

Because yeah, this is what I have currently, it will auto produce jokers, cards and consumables in the correct format, I just need to add in vouchers which I will probably do with just checkboxes. But the big work is then making a reference library and list of all the names and their code counterparts for generation etc and also all the other file stuff and formatting in it. That's just very time consuming and if something like this generator already exists then I don't really want to put the effort in doing all that.

#

But if it's not already been done, I can have up on github this ready to be shared and tested/used later today/tomorrow. Future plans being able to easily input things like challenge name, author, game conditions/modifiers etc so it can be used to generate full challenges to be shared.

solid salmon
#

how do i renable it?

#

i tried reinstalling it

#

and it keeps on dying

#

so can someone send it

wintry solar
#

It’s probably being eaten by your AV

stray orbit
#

im now looking for a way for a joker to add mult AND THEN upgrade per card scored

#

which idk how to do since adding mult uses return

hushed cradle
#

maybe add an event to add mult?

#

that way it returns first

#

if thats how it works im not 100% sure

stray orbit
#

ill look into events ty

hushed cradle
#

hope it helps

#

theyre a bit confusing but theyre probably useful for smth lol

opal spade
coarse nest
crisp elbow
#

pretty much yeah

wise silo
#

hello, im a noobie and im trying to change the game's sprite on my own, has anyone done that? i would really appreciate any help, specifically the cards

crisp elbow
#

Like what are you trying to change

wise silo
#

im trying to change the hearts into little amongus guys

#

to fit the amongus collab better

#

i think i figured out how to change the sprites of the deck, but im trying to figure out if its possible to change the deck ONLY after pressing the "collabs" tab in the settings

crisp elbow
#

I would say wait on it for now, I know someone is working on Alt Textures with the brand new stuff and idk if it'll be a seperate mod or in steamodded

wintry solar
#

Alt textures will likely be entirely separate to thunks stuff

mental nacelle
#

does anyone have an updated method for making decks?

cedar flame
mental nacelle
#

thank you

mellow sable
#

“Implements an unused deck hidden in the game's textures”
We have Golden Needle at home:

mental nacelle
#

im making a mod with a friend (only problem is we have a very small amount of Lua knowledge) so it's taking a while to get used to

mellow sable
#

Yeah, unfortunately there definitely is a learning curve

#

My best advice is to look at mods or vanilla things that have done similar to what you want, and base your items on that

mental nacelle
#

yeah, we've been looking through ModdedVanilla for it, i actually tried to get a deck going with Cryptid code earlier

#

it did not work

mellow sable
#

Cryptid uses its own system for registering items so that changes things a bit

#

Basically instead of:

SMODS.Back{
  code here
}

we use

local deck_name = {
  object_type = 'Back',
  code here
}
nocturne garnet
#

how tf do you get the edition that a card spawns with in create_card

mellow sable
#

Where is ret defined?

nocturne garnet
#

ret is the card

#

create_card returns the card created

mellow sable
#

If you do ret = create_card(…) I imagine that should work

nocturne garnet
#

ya thats what i did

mellow sable
#

idk then egg

nocturne garnet
hushed cradle
#

uh

#

what are you trying to do?

nocturne garnet
#

its nothing

hushed cradle
nocturne garnet
#

know what the edition of the card is

hushed cradle
#
if self.sprite_facing == 'front' and self.edition and self.edition.type == 'cere_mint_condition' then```
#
if card.edition then
  local edition = card.edition.type
end```
#

think you can use edition.key too

#

which ive been told is better

nocturne garnet
#

it be done

hushed cradle
#

👍

#

just confused why you needed a for i in range 1000 loop is all

nocturne garnet
#

i added like 1000 editions because i thought it'd be funny

hushed cradle
#

oh right

#

mb

regal wolf
#

I can almost garentee there's a better way of doing whatever they're trying to do.

nocturne garnet
#

guys will my shop have an anaglyphic joker

hushed cradle
#

wtf

#

so you want your edition to have a higher chance of spawning?

#

so you made 1000 of them

nocturne garnet
#

i edited the weight and it still took like 10 tries to spawn one so

hushed cradle
#

if its just for testing you can do G.GAME.edition_rate = 1000000000000

#

or smth like that

#

well maybe actually

nocturne garnet
#

oh damn

hushed cradle
#

im not sure what the order of polling editions is

regal wolf
#

I KNEW IT

#

😭

hushed cradle
#

💀

crisp coral
#

😭

hushed cradle
#

you can always hook to create_card and do set_edition too

regal wolf
#

just do edition rate

hushed cradle
#

if its for testing ig

#

yeah thats easier

nocturne garnet
#

look i was NOT smart

hushed cradle
#

also debug mode lets you cycle editions

#

sorry im just tryna be helpful

#

not point and laugh at you

#

dw

regal wolf
#

we arent pointing and laughing at all

nocturne garnet
regal wolf
#

everyone single person here has done silly things like that

nocturne garnet
regal wolf
#

i once spent 4 hours trying to figure out why a feature wasnt working.

#

only to realise I hadn't actually loaded it.

#

😭

nocturne garnet
regal wolf
maiden phoenix
#

The worst ones are barely visible typo errors

nocturne garnet
languid mirage
#

this is fine 🔥

regal wolf
#

LOL

#

sorry what

#

100,000 + decks

coarse nest
#

Got back to working on it now and have vouchers and a library for them working. So it's just tedious library building and then non variable code formatting for the file and it should work. An example of what it's like though currently and the file it output

#

Got the extra common I need to drop in vouchers and consumables but yeah. It's promising enough at this point I'm confident in having it ready tonight/tomorrow

#

Do have to test if leaving edition written there but blank breaks anything though. As otherwise I've got a rabbithole of removing that from the generated code only if it's empty. Although I suppose I could just do a library where the names include that section of code but eh

wise silo
#

if i remove the 2, the game runs without any problems

solid salmon
#

I downloaded lovely and put in but it does not respond

wintry solar
regal wolf
#

it's probably the one in the steamodded examples

wintry solar
#

Yeah stealing is not cool

regal wolf
#

Bro

#

I think the steamodded examples are alright

hardy viper
#

you're not supposed to just take an example and claim it as your own smh

wintry solar
#

They’re not even supposed to be in the examples, they were merged by mistake but I’ve left them to be an example

languid mirage
wintry solar
#

If people are taking them and using them I will remove them

languid mirage
#

and half of those are from google

regal wolf
#

^

solid salmon
#

does someone have the extracted lovely

#

i need it

regal wolf
#

???

crisp elbow
#

@solid salmon if yours is crashing still because of "to_big", you need Talisman installed

#

and if that doesn't work, go to your appdata folder and delete your save.jkr

crisp elbow
solid salmon
#

its not crashing

languid mirage
solid salmon
#

its just load'nt

crisp elbow
wintry solar
#

I’ll just get them removed

crisp elbow
#

like it says to fail to load to_big

solid salmon
#

it just doesn

crisp elbow
#

is there any other details you can give me?

regal wolf
crisp elbow
#

Lovely logs?

#

anything at all?

wintry solar
#

Because I’ve made them for a different mod and people are just ripping them

regal wolf
#

"ripping them"

wintry solar
#

They were never supposed to be in the example mod

regal wolf
#

im sorry but if you're upset, the only person to blame is yourself

#

they've been in the example mods for a long time

#

and the example mods have had that message about copying the code for your own projects for a long time.

#

You can't go around accusing people of stealing code just because you didn't fix your "mistake".

#

If it was a mistake, why did you leave it in?

crisp elbow
#

yeah honestly if it's been in there for at this point months?

regal wolf
languid mirage
#

he said it

wintry solar
#

Because I don’t have write access to the repo

tepid sky
#

every time i try and discard wit this 1 dumb, stupid, idiotic joker it gives me all my cards in deck, anyone able to help me? left is what happens when 1 or more cards are discarded, right is the joker

regal wolf
wintry solar
#

And because people can look at them

regal wolf
solid salmon
#

also i have talisman

crisp elbow
#

in appdata/roaming

languid mirage
#

can we move on please

solid salmon
#

my guy it's just black

#

nothing else

wintry solar
#

Maybe I have a misunderstanding of what examples are for or something

tepid sky
#

yea like my question <3 :)

wintry solar
#

But still, I’d rather it wasn’t used in whatever mod this person is making

crisp elbow
#

i think it's appdata/roaming/balatro/saves

solid salmon
#

imma just delete the game and reinstall

tepid sky
#

bruh- i straight up broke my joker

crisp elbow
regal wolf
crisp elbow
#

again

regal wolf
#

Can you please show ur file structure

solid salmon
crisp elbow
#

what does the talisman folder look like?

solid salmon
crisp coral
#

is your version.dll still there

solid salmon
#

no i deleted it

crisp coral
#

because smods didn't load

crisp elbow
#

you need that

#

💀

#

That's the actual mod injector part

#

that makes steamodded work

#

which makes talisman work

regal wolf
#

😭

solid salmon
#

do i have to extract version dil

crisp coral
#

don't saves loaded with talisman work in vanilla after 2.0.0

#

please update all your mods, and readd version.dll

languid mirage
solid salmon
languid mirage
#

btw I really mean your shaders because e.g. sepia is directly from google, and I don't see the point in calling it yours

static juniper
#

I'm trying to iterate through every Booster Pack, and I'm using this for loop to do that, but right now it just crashes the game for "attempting to call table value". Any help on what is the correct way to iterate through all booster packs?
for k, v in G.P_CENTER_POOLS["Booster"] do

solid salmon
#

does someone have the extracted version.dil

regal wolf
mental nacelle
#

how would i put a specific Joker into a deck?

#

like, when the player starts the run using this deck, they start with the joker

#

wait i might be silly

regal wolf
#

Same way as you would with a consumable for the ghost deck

#

Except a joker,

static juniper
tepid sky
#

hmm so change calculate into context?

static juniper
#

As of now, it's adding to hand_size whenever calculate is called

zealous glen
static juniper
#

Check Merry Andy in the ModdedVanilla pack for an explanation of hand size

tepid sky
#

this better?

zealous glen
#

Read the Steamodded wiki

#

Or read another modded Joker

tepid sky
zealous glen
#

And you need to check for the correct context

mental nacelle
static juniper
#

You should not be putting it in the calculate function at all, afaik

static juniper
solid salmon
#

hey do i need lovely.toml?

tepid sky
static juniper
#

Right now, it's randomizing hand size literally all the time, which is what's leading to you drawing way too many cards

tepid sky
#

kinda goofy lol

#

should i make it everytime the shop is left? its kinda the same, since you get put into the shop right after a round is done

static juniper
#

You should have the calculate function like this
calculate = function(self, card, context)
And check that it's the start of the round like this
if context.setting_blind and not card.getting_sliced

solid salmon
tepid sky
#

hmm, thanks!

static juniper
#

It checks whether or not Ceremonial Dagger is destroying it. Wouldn't want it to have an effect when the Joker is being destroyed.

tepid sky
#

true

wintry solar
solid salmon
#

YES

#

it won't let me extract

wintry solar
#

You need to add an exception for it

solid salmon
#

i did

#

but

#

the game wouldn't load (without extracting)

wintry solar
#

How did you set your exception?

solid salmon
#

i went into the "quarntine" and restored it and gave an exception

static juniper
tepid sky
#

woops

zealous glen
tepid sky
#

don't mind the reply

#

just focus on my message :)

static juniper
#

"Attempted to call a nil value"
(It was table before when I was experimenting w/ other stuff)

    for k, v in G.P_CENTERS["Booster"] do
        
    end
end,```
wintry solar
static juniper
#

Ah, that's probably it

tepid sky
static juniper
tepid sky
#

oh snap

#

wow

wintry solar
static juniper
wintry solar
#

Are you using p_centres or p_center_pools?

static juniper
#

Ah, I should be using center_pools

wintry solar
#

Yeah

static juniper
#

I had that before but I changed it while testing :/

wintry solar
#

Centers is a table of keys and objects, pools is just the objects but split into sub tables

mental nacelle
#

i cannot get this deck to start with a joker at all

tepid sky
wintry solar
#

Yeah but that other list misses out a lot of useful information

tepid sky
#

true

#

but its usefull enoufh for non-complicated jokers

#

on which I am working rn

solid salmon
#

this is what happens when i try to extract

wintry solar
#

Add the whole folder as an exception whilst you extract

mental nacelle
tepid sky
mental nacelle
#

currently this (i was trying the config version with Abstract)

wintry solar
#

it doesn't look like backs support joker keys like that, you'll need an apply function

mental nacelle
#

my programming might be a bit silly because i started in Lua (with this mod) yesterday

wintry solar
#

nothing wrong with your programming, you're just trying to do something that isn't possible the way you're doing it

mental nacelle
#

I had an apply function while i was testing earlier

#

basically this

wintry solar
#

I think that will be fine if it's in an event like the consumable one in back.lua is

languid mirage
#

btw you don't need to use {} at the end

#

It's not like HTML tag

#

it just means reset formatting

mental nacelle
#

oh lol

wintry solar
#

needs a return true

#

oh

#

no

#

not quite

#

put the event inside the function

mental nacelle
#

oh ok

wintry solar
#
apply = function(self)
            G.E_MANAGER:add_event(Event({
                func = function()
                    for k, v in ipairs(self.effect.config.consumables) do
                        local card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, v, 'deck')
                        card:add_to_deck()
                        G.consumeables:emplace(card)
                    end
                return true
                end
            }))
        end
#

code is scuffed but the format is correct here

mental nacelle
#

ok

regal wolf
#

Yeah you only need to add {} if you have text afterwards you want to have the default text field formatting for

mental nacelle
#

should i have another function inside the event or not?

wintry solar
#

yes, events need a function

mental nacelle
#

hoping this works

wintry solar
#

return true after your materialize line

mental nacelle
#

ok

#

i tried to start a run with the deck, the game crashed

#

center is nil

#

should center be set at this point?

wintry solar
#

can you send the crash?

mental nacelle
#

yea

#

Oops! The game crashed:
functions/common_events.lua:2281: attempt to index local 'center' (a nil value)

Additional Context:
Balatro Version: 1.0.1g-FULL
Modded Version: 1.0.0~ALPHA-0820c-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.5.0-beta6
Steamodded Mods:
1: UltraHand by Xioxin [ID: UltraHand]
2: Baronana by Opal, Looby [ID: BANANA]
3: Inscrybed Jokers by LunaAstraCassiopeia [ID: InscrybedJokers]
Lovely Mods:

Stack Traceback

(3) Lua global 'create_card' at file 'functions/common_events.lua:2281'
Local variables:
_type = string: "Jokers"
area = nil
legendary = nil
_rarity = nil
skip_materialize = nil
soulable = nil
forced_key = string: "j_bnan_bogdonoff"
key_append = nil
area = table: 0x215b7d38 {click_offset:table: 0x21924848, children:table: 0x212466f0, shuffle_amt:0 (more...)}
center = nil
(*temporary) = table: 0x217345c8 {j_mime:table: 0x2173a580, j_ring_master:table: 0x2174ace8, b_challenge:table: 0x2175ec48 (more...)}
(*temporary) = number: 1
(*temporary) = number: 1
(*temporary) = number: 2.75122
(*temporary) = number: 0.0015
(*temporary) = number: 20
(*temporary) = number: 1
(*temporary) = table: 0x21b549c0 {click_offset:table: 0x21b54a88, children:table: 0x21b549e8, parent:table: 0x21b53d18 (more...)}
(*temporary) = nil
(*temporary) = C function: next
(*temporary) = table: 0x21b549e8 {1:table: 0x21b54b88, 2:table: 0x21b54d50}
(*temporary) = number: nan
(*temporary) = number: 2
(*temporary) = string: "attempt to index local 'center' (a nil value)"
(4) Lua field 'func' at file 'data/decks.lua:16' (from mod with id BANANA)
(5) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
self = table: 0x2168ef98 {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x216c6188 (more...)}
_results = table: 0x21939558 {blocking:true, pause_skip:false, time_done:false, completed:false}
(6) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
self = table: 0x217b1690 {queue_last_processed:6.9666666666666, queues:table: 0x217b16b8, queue_dt:0.016666666666667 (more...)}
dt = number: 0.00605956
forced = nil
(for generator) = C function: next
(for state) = table: 0x217b16b8 {unlock:table: 0x217b16e0, other:table: 0x217b1b58, tutorial:table: 0x217b1730 (more...)}
(for control) = number: nan
k = string: "base"
v = table: 0x217b1708 {1:table: 0x2168ef98, 2:table: 0x214754d0, 3:table: 0x216c8f90, 4:table: 0x219215f8 (more...)}
blocked = boolean: false
i = number: 1
results = table: 0x21939558 {blocking:true, pause_skip:false, time_done:false, completed:false}
(7) Lua upvalue 'gameUpdateRef' at file 'game.lua:2492'
Local variables:
self = table: 0x21250e58 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x21b511d8 (more...)}
dt = number: 0.00605956
http_resp = nil
(8) Lua method 'update' at Steamodded file 'core/ui.lua:81'
Local variables:
self = table: 0x21250e58 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x21b511d8 (more...)}
dt = number: 0.00605956
(9) Lua field 'update' at file 'main.lua:936'
Local variables:
dt = number: 0.00605956
(10) Lua function '?' at file 'main.lua:880' (best guess)
(11) global C function 'xpcall'
(12) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 851 of chunk main.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"])

#

for context, UltraHand allows you to select Jokers from the collection and InscrybedJokers adds 4 jokers

wintry solar
#

are you sure that's the correct key for your joker?

mental nacelle
#

yes

#

i can try it with j_abstract if need be

wintry solar
#

yeah give it a go

mental nacelle
#

ok using abstract gives a different crash?

wintry solar
#

huh

mental nacelle
#

Oops! The game crashed:
[SMODS BANANA "data/decks.lua"]:18: attempt to index field 'Jokers' (a nil value)

Additional Context:
Balatro Version: 1.0.1g-FULL
Modded Version: 1.0.0~ALPHA-0820c-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.5.0-beta6
Steamodded Mods:
1: UltraHand by Xioxin [ID: UltraHand]
2: Baronana by Opal, Looby [ID: BANANA]
3: Inscrybed Jokers by LunaAstraCassiopeia [ID: InscrybedJokers]
Lovely Mods:

Stack Traceback

(3) Lua field 'func' at file 'data/decks.lua:18' (from mod with id BANANA)
Local variables:
card = table: 0x27e31ef0 {click_offset:table: 0x27d78e48, children:table: 0x27e85e78, ambient_tilt:0.2 (more...)}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = table: 0x27ab74a0 {alerted:true, _saved_d_u:true, unlocked:true, _u:true, effect:Joker Mult (more...)}
(*temporary) = nil
(*temporary) = number: 0
(*temporary) = string: "j_abstract"
(*temporary) = nil
(*temporary) = string: "attempt to index field 'Jokers' (a nil value)"
(4) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
self = table: 0x2771d858 {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x278e33c8 (more...)}
_results = table: 0x27d17030 {blocking:true, pause_skip:false, time_done:false, completed:false}
(5) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
self = table: 0x27b2c0a0 {queue_last_processed:8.4666666666667, queues:table: 0x27b2c0c8, queue_dt:0.016666666666667 (more...)}
dt = number: 0.0060596
forced = nil
(for generator) = C function: next
(for state) = table: 0x27b2c0c8 {unlock:table: 0x27b2c0f0, other:table: 0x27b2c568, tutorial:table: 0x27b2c140 (more...)}
(for control) = number: nan
k = string: "base"
v = table: 0x27b2c118 {1:table: 0x2771d858, 2:table: 0x27a87160, 3:table: 0x27d36bd0, 4:table: 0x27e2fde8 (more...)}
blocked = boolean: false
i = number: 1
results = table: 0x27d17030 {blocking:true, pause_skip:false, time_done:false, completed:false}
(6) Lua upvalue 'gameUpdateRef' at file 'game.lua:2492'
Local variables:
self = table: 0x275f0cd0 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x27ecd1a0 (more...)}
dt = number: 0.0060596
http_resp = nil
(7) Lua method 'update' at Steamodded file 'core/ui.lua:81'
Local variables:
self = table: 0x275f0cd0 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x27ecd1a0 (more...)}
dt = number: 0.0060596
(8) Lua field 'update' at file 'main.lua:936'
Local variables:
dt = number: 0.0060596
(9) Lua function '?' at file 'main.lua:880' (best guess)
(10) global C function 'xpcall'
(11) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 851 of chunk main.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"])

#

Line 18 is G.Jokers:emplace(card)

wintry solar
#

oh it's G.jokers

mental nacelle
#

oh lmao

#

that worked, I have the joker now

wintry solar
#

okay

#

your key is wrong then

mental nacelle
#

yeah

wintry solar
#

did you define your mod prefix?

mental nacelle
#

my mod prefix is "bnan"

wintry solar
#

ss your joker pls

mental nacelle
#

the joker im trying to set in this deck should have the key "j_bnan_bogdonoff"

#

weak for a legendary probably

wintry solar
#

your key is j_bnan_j_bnan_bogdonoff

#

you dont need to prefix it yourself

#

smods handles that for you

mental nacelle
#

i did not know that

#

simple fix thankfully as we only have 3 jokers so far lol

wintry solar
#

should work now then!

mental nacelle
#

thank you so much for your help

wintry solar
#

no problem, happy to help!

mental nacelle
#

my deck code uses j_bnan_bogondoff

wintry solar
#

okay

#

can I see your mod header?

mental nacelle
wintry solar
#

hmmm

#

can only think of it being a typo

crisp elbow
#

Hmmmm

#

🤔 could it be the mod code header? Idk if it has to be formatted a certain way or not

mental nacelle
#

well my joker has key = 'bogondoff' and the deck code looks for 'j_bnan_bogondoff'

wintry solar
#

the header looks fine

#

this key is different to the one you had before, you had bogdonoff

mental nacelle
#

the key before was also 'j_bnan_bogondoff', so smod was making the joker's key j_bnan_j_bnan_bogondoff

crisp elbow
#

yeah it auto applies the uh

#

prefix to the key

wintry solar
#

is it bogdonoff or bogondoff

mental nacelle
#

oh my god its a typo

crisp elbow
#

happens to the best of us

mental nacelle
#

its bogdonoff in the joker but bogondoff in the deck

crisp elbow
#

kekw just change it to bogdonoff it should work

mental nacelle
#

i would have spent hours looking for a solution if it wasnt for yall, thank you

sturdy cobalt
#

scream if you love bogdonoff

crisp elbow
#

Who up bogdonoff their buskin

nocturne garnet
wintry solar
shell tangle
#

Neat.

frosty dock
#

wtf

#

i just realized why beta languages don't work

#

thunk somehow bound them to achievements not being disabled, of all things

languid mirage
#

hm

#

how does that even happen

wintry solar
frosty dock
#

yeah i saw, must have forgotten about it

#

will add this in for now

#

there's a PR about similar things, but I'm not too happy with its current state

wintry solar
#

oh the betmma one?

frosty dock
#

yeah

wintry solar
#

yeah I wasnt too sure what the point of that was

#

oh I sort of understand the reasoning behind it upon further inspection

static juniper
#

So I'm trying to make a voucher that makes it so Booster Packs contain 1.5x more cards. This is the code I have now.

    for k, v in pairs(G.P_CENTER_POOLS["Booster"]) do
        v.config.extra = floor(v.config.extra * self.config.extra.mult)
    end
end,```Problems:
1. The voucher does not come into effect immediately, only in the shop _after_ the voucher is purchased.
2. This voucher does not reset after a run.  It continues to be in effect during every run until you reload the game.
3. Speaking of reloading the game, doing that will stop the voucher from working properly.

Anyone have a good solution to these problems?
coarse nest
#

I'm possibly going to have the challenge generator done in about an hour. Would anyone be up for helping me test it to see if I've missed anything?

dim nimbus
#

What are all the color variables that I can use in text localization? I can't figure out how to get the spade color lol

frosty dock
#

you can just search loc_colour in the source code. For spades it's {C:spades}

dim nimbus
#

forgot the last s, thanks!

coarse nest
#

Nobody has done any mods where they've added extra card numbers right? Like things above J Q K A etc. Just checking as I'm trying to code my builder as mod friendly as possible with easy additions where possible. Add a new joker in? Just add it to the dictionary and you can use it in it etc.

frosty dock
#

steamodded has an API for ranks

#

not entirely sure if any mods that use it have ever been fully released though

crisp elbow
#

I think the only one that's tried it is Everdeck

#

and that was the only one that ever got like anywhere

coarse nest
#

If it's got API for ranks I may as well toss in a library then. Will also do it for suits.

crisp elbow
#

it did get dropped because the guy never paid for Balatro

#

I think

#

he modded it without fully testing all of their stuff and then dropped the project kekw

frosty dock
#

that sort of format would also make mod support easier given you could basically only have text inputs for arbitrary modded jokers/vouchers/consumables or whatever

coarse nest
#

I dislike how phallic my code looks

frosty dock
#

Lmao

crisp elbow
#

I see a butt

#

lmao

#

god we also need a new version of deck creator fr

frosty dock
#

pretty sure 10 should be T there

crisp elbow
#

I hate that it wasn't ever updated

#

😭

#

I've made a deck or two in lua but man I just wanna pick up and go

coarse nest
#

Ahh is 10 coded to T? Thanks for pointing it out

frosty dock
#

i mean more complex deck effects require coding either way

#

but still I agree

crisp elbow
#

fair

#

Stuff like the enhanced decks from Cryptid definitely need code

#

🙂

#

or the suit only decks with no boss blind appearing

#

like the club deck where the club doesn't appear

coarse nest
#

I mean, I am making a deck building program

#

This is an earlier revision since I can't launch it currently with the dictionary changes etc

crisp elbow
#

I feel again the only problem with it that Aure mentioned would be mod compat

#

it's why an ingame editor would be easier in that regard

coarse nest
#

Yeah true

frosty dock
coarse nest
#

Currently this just spits out a lua for a challenge which has the right deck and jokers etc

crisp elbow
#

like smodded 2.0 or whatever changing everything again would fuck it up

#

that's the only real "problem" with modders in the balatro community (or well any community), people will release a mod and then drop any support for it for a while until it's redundant

coarse nest
#

I need to work on having a previous popup window that handles stuff like author name, challenge name, game conditions, banned stuff etc

crisp elbow
#

or well obsolete because old code

coarse nest
#

But for now just a basic start is what I'm wanting

crisp elbow
#

best example I can think of with it is Jellymod since it was made before Steamodded was even a thing and unfortunately was pretty broken from the start

coarse nest
#

Regarding mod compatibility, I've made it that the libraries are easily added to for now, I can eventually have it that it enables/disables mod stuff to the libraries depending on checkboxes. But I'm shit with coding and hate doing it XD

frosty dock
#

jellymod is a tough case as it suffers both from early modding being widely incompatible with itself and also from being unmaintained

frosty dock
coarse peak
#

@mellow sable

#

yo

#

how can I get all the information on a legendary joker in an Immolate filter?

#

i see next_joker in one of the filters but it just returns the enum

mellow sable
#

are you using the C++ or OpenCL version

coarse peak
#

opencl

coarse nest
coarse peak
mellow sable
#

next_joker_with_info

coarse peak
#

thanks

mellow sable
#

yw

coarse peak
#

does that return a JokerData?

frosty dock
#

not sure how you'd have python interfacing with lua that way, but sure

mellow sable
coarse peak
#

alr ty

coarse nest
coarse nest
#

Need to fix joker edition buuuut

#

This was generated by the program, so really close.

unkempt ridge
#

Lemme cook
This is only art so wip

coarse peak
#

tf are these

unkempt ridge
#

the Ace cards of the Minor Arcana
https://en.wikipedia.org/wiki/Minor_Arcana

The Minor Arcana, sometimes known as Lesser Arcana, are the suit cards in a cartomantic tarot deck.
Ordinary tarot cards first appeared in northern Italy in the 1440s and were designed for tarot card games. They typically have four suits each of 10 unillustrated pip cards numbered one (ace) to ten, along with 4 court cards (face cards). Tarot ga...

vital raptor
#

how would you add +mult to a card at the end of a round?

opal spade
#

cus even in the video - you switched off HD Jokers and yet the changes made by HD Jokers remained

#

maybe it could be handled via a list where you enable/disable the various alt textures and order their priority? (basically like minecraft handles it)

maiden phoenix
#

I was going to be like "that's a strong tarot card" but it doesn't seem to be one?

unkempt ridge
#

It is a tarot card
It's just a minor arcana

#

Tbh it does fit spectral more but

opal spade
#

1 in 4 chance

#

👍

unkempt ridge
#

No random crits

maiden phoenix
#

Does it only work on edition cards. If yes that's too niche if not that's too op lol.

coarse nest
#

Ayyy, generated code

#

Now to just get the other categories formatted and add the footer stuff etc and this is ready for people to test

maiden phoenix
#

Oh you're doing this on SMOD 0.9.8?

coarse nest
#

Oh wait got to change that

#

I dunno. I'm pretty much just looking at how other challenges are done and trying to work out how to make a template from that.

#

So guessing an outdated one

#

Is there an up to date challenge mod template anywhere?

maiden phoenix
#

My mod's challenges uses the 1.0.0 format if that can help

#

Or maybe SMOD wiki page have something challenges

#

Nvm it doesn't

coarse nest
#

Alright if I can copy your homework that'd help a lot XD

maiden phoenix
coarse nest
#

Perfect thank you

maiden phoenix
#

Shouldn't be too different from what you have

#

You can delete the INIT too it's unecessary in 1.0.0

coarse nest
#

Would it just be an SMODS.Challenge{ section I just put in for the file ? Guessing everything above that is checking dependencies for other mods?

maiden phoenix
#

Oh yea all the things above it is just stuff for my mod

opal spade
#

unrelated to the challenges but why not use localization files

maiden phoenix
#

I haven't got to it yet

coarse nest
#

So this is what I've got in a file to just test it showing up and no dice. Not showing under my mods at all or in the challenges. My version of SMOD should be right, installed it yesterday. I only got Balatro on the 21st, sunk 80 hours into it, decided to get a custom challenge and edit it to do a test I wanted, then just went down this rabbit hole making a program to do it for me

unkempt thicket
#

does anyone know how I can make this show in a info_quene (the stuff seals and editions use)?

coarse nest
#

Got the program generating and working for me at least. Tested to be consistent for me, it's at least a start. If I can get the newer version of challenge mods working I can easily update the code and the way it generates the script. So if anyone can help with that I'd appreciate it.

cedar flame
#

@coarse nest for adding ranks here's some example code:

SMODS.Rank {
    key = 1, -- the number or name (ex. "Jack") of your rank if it has one
    card_key = 1, -- the short key put after the suit when coding a card object (ex. for the card "H_5" the card_key is 5). this seems to usually match the shorthand
    pos = { x = 0 }, -- x position on the card atlas, here 0 because it's to the left of 2
    nominal = 1,  -- the number of chips this card scores
    next = { '2' }, -- the next rank directly above it, not sure what this does?
    shorthand = '1' -- used for deck preview (ex. 1 of Spades)
}

i haven't figured out how to get the rank to work correctly in straights, though

mellow sable
#

does anyone know of a way to make a UI element draggable?

cedar flame
#

i have a local copy of this that i converted to 1.0.0 that i just haven't committed yet

#

i can push it up somewhere if you want

mellow sable
#

...I'm not even using steamodded for this mod

cedar flame
#

fair

mellow sable
#

but MoveableContainer is probably what I'd want, yeah

mellow sable
#

honestly not even too bad now that it's "working"

hallow forge
#

what's working?

mellow sable
#

it's draggable now

#

i removed all the fluff from balalib so now it's basically exactly what I want

#

all that's left is putting it into the right position

crisp coral
#

real

limpid flint
#

God tier

#

Will it remember the location?

mellow sable
#

I plan on adding that feature tomorrow, shouldn’t be too hard

wintry solar
#

It doesn’t have to a full sprite sheet, you can just have a selection of sprites as long as you tell it what they’re for

#

I’ll hopefully get time to work on selecting multiple packs today, going to concept a few different layouts first

limpid flint
#

Hey, you are genuinely a GUI wizard at this point

stray orbit
#

i love how the outline changes colour with the other menus

#

never noticed the game does that til now

coarse nest
#

Ayyy managed to get the game crashing from too many vouchers somehow XD I gave myself all the vouchers, once it played the foil shake animation for the jokers as they appeared and I assume started to load the vouchers, it crashed. So now might have to test to see the limit as to how many vouchers is too many.

#

Also, anyone got any examples of a mod to add in another button on the homescreen that then goes into a new page etc? Since I may be up for learning how to implement my deck generator into the actual game etc.

frosty dock
#

generally that's a bad idea because it goes off the screen if multiple mods try to do it

frosty dock
#

it's better to make a tab in the mod's page in the mods menu, like settings/credits tabs that usually exist

coarse nest
#

That would also be fine.

coarse nest
# tepid sky custom decks?! 👀

I've made a python program that allows you to custom generate a challenge with jokers, cards, consumables and vouchers of your choice.

#

So sort of sandbox modey

tepid sky
coarse nest
#

I've got it shared in modding

tepid sky
#

nice, i'll check it out once i got some time :)

coarse nest
#

Palette is broken though so avoid that and it should all be fine. I intend on pushing an update fixing it later though. Going to also add in the ability to change the challenges name, the deck used, some extra rules/modifiers etc if I can work it out.

#

But yeah, python script program is cool and all but yeah would be better to get it in game. So a tab in the mods page sounds good. How would I go about doing that?

frosty dock
#

Palette is no longer broken because it's been removed

coarse nest
frosty dock
#

ah

coarse nest
#

One typo that really got me is consumables though. The game code and by extension the needed bit in challenges, has it as consumeables even though it's spelled right in game on display.

#

So I had the correct spelling in my generator and it wasn't working, had fun figuring that bit out.

proud harbor
#

where would i go to trouble shoot / get advise for why modding isnt working?

crisp elbow
limpid flint
#

if you are making your own mods, here

frosty dock
#

right when you thought you knew anything about this game's UI...

coarse nest
#

Assumption failed?

night pagoda
#

How do I draw a transparent box under a custom cardarea?

#

I tried this (which is a edited copy of a thing in CardArea:draw()) but it doesn't show up

MyCardArea.children.area_uibox = UIBox{
definition =
    {n=G.UIT.ROOT, config = {align = 'tm', colour = G.C.CLEAR}, nodes={
        {n=G.UIT.R, config = {
        minw = MyCardArea.T.w,
        minh = MyCardArea.T.h,
        align = "tm",
        padding = 0.1,
        mid = true, r = 0.1,
        colour = {0,0,0,0.1},
        ref_table = MyCardArea}},
    }},
config = {align = 'tm', offset = {x=0,y=0}, major = MyCardArea, parent = MyCardArea}
}
mental nacelle
#

i love it when atlas [a nil value]

languid mirage
#

how did we get here

mental nacelle
#

did i forget to save? am i silly?

#

no! atlas [a nil value]

crisp elbow
#

can I see the snippet please

#

i may be able to help 🔍

mental nacelle
#

im just trying to get my blind atlas to work

crisp elbow
#

oh I mean the code snippet

mental nacelle
#

its this, and then in all of my blinds i have atlas = 'bnanblinds',

opal spade
#

what is your mod's prefix

mental nacelle
#

oh is this another prefix thing

crisp elbow
#

also make sure to add atlas_table = 'ANIMATION_ATLAS'

opal spade
#

wait you dont need a prefix for your mods own atlases

mental nacelle
#

ok

#

that worked! thank you both so much

opal spade
#

i didnt do anythin

mental nacelle
#

i know but still

#

thank you regardless

coarse nest
#

What we thinking? Have it all on one page/window or have them each accessible with a next button? Since I'm doing a page 1 for things like name author etc, you hit next then go to this window. I could make it that each get their own window accessible with next.

regal wolf
#

Looks cool, but why not just do it in game?

#

I'm working on the BU-CB mod and for that I'm just going to have a challenge maker in game

coarse nest
#

It's an eventual thing but I'm not a coder, a python generato is the best I can do for now XD

regal wolf
#

Ah, Gotcha

coarse nest
#

Ah if you're already on it I can stop then XD

regal wolf
#

No no!

#

I was just asking a genuine question

#

like maybe there was some upside I hadn't realised

coarse nest
#

There's more upside getting it done in game for sure, since you can interact with other mods and read their additions and add that to your options etc.

#

I guess the only upside to doing it outside of game is that I'm not even a coder and made a fully functional challenge generator in a day? XD

regal wolf
#

yeah its definately a lot quicker outside of the game

#

the ui engine is a little annoying lol

#

What mod are you using to inject the challenges?

coarse nest
#

If you're already working on one though I might just do this as a two page thing then, get the titles etc and just leave it as that to work whilst yours is being done.

regal wolf
#

dont let me stop you. mine is probably a little way away. I'm working on a few things at the same time

coarse nest
#

So I have it generating a full lua file for steammoded which you just make a folder in your mods folder with the name of your challenge, enter it, save the file to that and it'll be under your challenges.

regal wolf
coarse nest
#
--- MOD_NAME: Generated Challenge
--- MOD_ID: GenChal
--- MOD_AUTHOR: [HoneySoakedSeagull's Challenge Generator]
--- MOD_DESCRIPTION: A challenge generated with HoneySoakedSeagull's Challenge Generator.

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

function SMODS.INIT.HSSCGCC ()

   G.localization.misc.challenge_names['c_mod_GenChal'] = 'General Challenge'
   table.insert(G.CHALLENGES,1,{
       name = 'Custom Generated Challenge',
       id = 'c_mod_GenChal',

       rules = {
           custom = {
           },
           modifiers = {
           }
       },
       jokers = {
          {id = 'j_marble', eternal = true, edition = 'foil'} ,
          {id = 'j_marble', eternal = true, edition = 'foil'} ,
          {id = 'j_marble', eternal = true, edition = 'foil'} ,
          {id = 'j_marble', eternal = true, edition = 'foil'} ,
          {id = 'j_marble', eternal = true, edition = 'foil'} ,
          {id = 'j_stone', eternal = true, edition = 'foil'} ,
          {id = 'j_stone', eternal = true, edition = 'foil'} ,
       },
       vouchers = {
          {id = 'v_palette'}
       },
       deck = {
           cards = {{s='C', r='K',e='m_stone',g='Red'},}, 
           type = 'Plasma Deck'
      },
       restrictions = {
           banned_cards = {
           },
           banned_tags = {
           },
           banned_other = {
           }
       }
   })

end

----------------------------------------------
------------MOD CODE END----------------------```
#

That, bar the plasma, was fully generated with it earlier.

regal wolf
#

Ohhh ur doing it like thatttt.

coarse nest
#

Probably not the best way but it works XD

regal wolf
#

if ur not happy with that u could always make them inject into BU-CB

coarse nest
#

I've no idea how to do that. As said, I'm not a coder at all. I've no prior experience with lua, I literally just got Balatro on the 21st, sunk over 80 hours in a week into it, decided I wanted to do some ideas I brainstormed, made a custom challenge and then went into making this generator.

regal wolf
regal wolf
coarse nest
regal wolf
#

like the only "release" says "depreciated"

#

but its still 0.9.8 or smth

crisp coral
#

because 1.0.0 isn't technically released

#

hh

coarse nest
crisp coral
#

still, i'd suggest against using 0.9.8 code

coarse nest
#

Well I can make the shift to BU-CB without much issue

#

I've made the code really easy to edit for what output you get etc

#

This is what I wrote earlier to control the header output in preperation for me giving the first page for inputs etc. I can just wipe this chunk out and do the return stuff etc

#

And yeah, I could have it all under the lua_code = but I want it formatted in the program to make editing easier. Which makes what I'm about to do simple as well.

coarse nest
# regal wolf yeah exactly

Is there a way to credit an author for it? Or would I just have it as a ruled out thing in the file? Or as part of the callenge name etc

regal wolf
#
return {
  name = "Fleeting Memory",
  id = "c_mod_fleeting_1",
  rules = {
    custom = {
      { id = "all_perishable" },
      {
        id = "cm_credit",
        value = "Djynasty",
      },
    },
    modifiers = {},
  },
  jokers = {},
  consumeables = {},
  vouchers = {},
  deck = {
    type = "Challenge Deck",
  },
  restrictions = {
    banned_cards = {},
    banned_tags = {},
    banned_other = {},
  },
}

example challenge file

#
      {
        id = "cm_credit",
        value = "Djynasty",
      },
#

just add sometihng like this to the custom rules of the challenge.

coarse nest
#

Perfect thank you.

regal wolf
#

No problem

coarse nest
#

I assume that I can still use ' instead of "?

regal wolf
#

of course

#

it doesn't matter in lua

coarse nest
#

Good because it does in python XD

regal wolf
#

xD

coarse nest
#

The code generation part writes everything between the " so whenever a thing is quoted with " it can break that line.

crisp coral
#

why does BU-CB have no commits for two months lol

regal wolf
#

*repo

crisp coral
#

oh right

regal wolf
#

and then I started work on a new version of the mod

coarse nest
#

And generator is updated to output for BU-CB (bar credit stuff etc)

#

Looks correct yeah?

regal wolf
#

i think so

coarse nest
#

Bar some formatting mistakes I made for the gen, will fix that whilst adding in the stuf for rules and restrictions.

cedar flame
# coarse nest ```--- STEAMODDED HEADER --- MOD_NAME: Generated Challenge --- MOD_ID: GenChal -...

here it is reworked for 1.0.0 format:

SMODS.Challenge {
    name = 'General Challenge',
    key = 'general_challenge',
    jokers = {
        {id = 'j_marble', eternal = true, edition = 'foil'},
        {id = 'j_marble', eternal = true, edition = 'foil'},
        {id = 'j_marble', eternal = true, edition = 'foil'},
        {id = 'j_marble', eternal = true, edition = 'foil'},
        {id = 'j_marble', eternal = true, edition = 'foil'},
        {id = 'j_stone', eternal = true, edition = 'foil'},
        {id = 'j_stone', eternal = true, edition = 'foil'},
    },
    vouchers = {
        {id = 'v_palette'}
    },
    deck = {
        cards = {{s='C', r='K',e='m_stone',g='Red'}}, 
        type = 'Plasma Deck'
    }
}
#

(you can add the rules and restrictions the same way, i just left them out in the example for length)

coarse nest
#

For banned cards, consumables, vouchers, jokers and packs can be listed, I don't suppose that individual cards like the 6 of Diamonds could also be listed? I highly doubt anyone would want to but if it's possible I should probably include it in the dictionary list it references

coarse nest
cedar flame
cedar flame
#

has jokers, challenge, and a new hand type

coarse nest
#

I suppose the simplest question is, would it be worth adding an option to export it as an SMODS file or should I just leave it as BU-CB only

cedar flame
#

what is bu-cb?

coarse nest
drowsy tulip
#

hey real quick what's the scale and color code for light gray texts like this

cedar flame
# coarse nest This

i see, seems like if you're just focusing on making a challenge it shouldn't be too hard to make a file for both formats

#

you just need to replace the table.insert call with the SMODS.Challenge call where the formatting is basically the same

coarse nest
#

File for both formats is I literally just swap the return and the SMODS line depending on the state of the checked box.

#

Providing SMODS supports the credit stuff in custom still

opal spade
drowsy tulip
#

thx

cedar flame
coarse nest
cedar flame
#

yeah that's not bad

coarse nest
#

It's pretty much just two if statements and a checkbox

#

I used the smods.challenge code and yeah, it's not showing up. Is there a specific placement I need to put it or am I right with how I have it as the .lua in it's own folder in mods?

cedar flame
#

that should be all you need, you still need the mod header/footer comments and you also have to have steamodded installed

#

but if you have both of those it should automatically work

wintry solar
#

If you drop the lua file you’re outputting that might be helpful

coarse nest
#

Also, can't seem to get banning individual cards to not cause a crash, so don't think that's possible so I don't need a dictionary for it at least

coarse nest
# coarse nest Ahhh it still needs all the --- header stuff?

Tried it even with the header stuff, just swapping the body out for the new code and no luck still. I've not been using the generator for it, just copy and paste what was written etc. Once I have a confirmed working file I would then tune the generatos output

wintry solar
#

Can we see the file?

coarse nest
#

And as

#

Neither appeared

#

Regarding steammodded version,

cedar flame
#

could you show your mods menu? just to make sure that the mod shows up and doesn't have a conflict with another one

#

that's the most likely thing i can think of

coarse nest
#

And obviously all mine are just challenges. The generated challenge is what I change and save over with the new stuff and it just disappears from the list.

#

So yeah, unless a visual change or the enabler messes it up...

cedar flame
#

silly question but did you go to the last page of the challenges menu? modded ones show up after all the vanilla ones

coarse nest
#

Yeah it's not there

#

And also my modded ones show up first usually.

wintry solar
#

Are your other mods from your generator?

cedar flame
#

i'm wondering if this is a mod id conflict

wintry solar
#

Do they have the same mod ids?

coarse nest
#

The ones by me use the older version. There's different mod ids

cedar flame
#

interesting...

#

i may be able to test your mod later today to debug but it'll be a bit

coarse nest
#

General Challenge is GenChal, Lucky Cat is LuckyCat, Hurru is HR

#

I might see about removing Lucky Cat and Hurru (Hurru was just a test gen to see about having multiple etc) and see if having the old challenge code there confused it or something

#

Yeah, removing the other two and having the header etc added does have it work

drowsy tulip
#

is there a list of all the context types cause i cant find anything on the github wiki

wintry solar
#

It might need some loc txt to show up? I dunno, everything looks fine and the mod is being loaded so 🤷‍♂️

#

Oh

#

Can I see the other headers?

coarse nest
#

So it must be defaulting to the older code type when it sees function SMODS.INIT.HSSCGCC ()

coarse nest
coarse nest
#

Welp, it's showing now with the other two added back in but ends up at the end known as ERROR

cedar flame
#

hmm, probably needs a localization/en-us.lua file

#

containing this:

return {
    misc = {
        challenge_names = {
            c_mod_hr = "Hurru"
        }
    }
}

or whatever your key is with what the name should be

coarse nest
#

Sounds like it could be the culprit

#

I'll test it with genchal

#

If it works it's not hard to add onto the generation

coarse nest
crisp coral
#

that means a file called en-us.lua in the folder called localization

opal spade
#

loc_txt = {
name = <name here>
},

opal spade
cedar flame
# opal spade in challenge definition

separate localization files are much more flexible though, since it allows changing the language instead of hardcoding the text in the object definition

languid mirage
#

it is supposed to be an automatically generated challenge

#

is it not?

opal spade
#

like usually I'd be all for loc file use, but for this usecase I feel loc_txt is the better solution

cedar flame
#

either way!

crisp coral
#

true

coarse nest
#

So generating an extra file isn't hard but regarding folders I'm not sure. It's probably pretty simple too though.

opal spade
#

loc_txt supports multilingual definition so it could be automated to generate those too

#

it would look like this
loc_txt = {
<languagecode> = {
name = <name>
}
}

#

['en-us'] for english

coarse nest
#

Where abouts in the file is it to be placed? It keeps crashing my game on launch

#

Is how I currently have it

opal spade
#

you forgot the ,

coarse nest
#

That'll do it XD

#

Still shows as error though.

opal spade
#

what's the error

coarse nest
#

In the challenge list the challenge shows as ERROR

crisp coral
#

the name should be a string

opal spade
#

wait

#

yea

coarse nest
#

Yup working now

#

I'm really not a coder XD

#

I think my best option for adding in localisations would be to have a dropdown box of languages that reference a dictionary for the language codes and then has the textbox to put the name in it for those that want to.

#

Sound good?

opal spade
#

ye

#

don't forget the , after each language table though

coarse nest
#

That's actually easy to have added

tepid sky
opal spade
#

so ['en-us'] = {}, etc

coarse nest
#

This is how my joker lines are generated

tepid sky
coarse nest
#

With the written output being {id = 'j_marble', eternal = true, edition = 'foil'},

tepid sky
#

dang, u going to replace every mod with this one 😆

coarse nest
#

So would basically do the same section for localisations but obviously only for what's needed etc

tepid sky
#

but this is so cool! can't wait for it to be finished (and i mean finished finished)

opal spade
coarse nest
#

So if custom joker generation (at least for existing abilities being reused but values tweaked/combined etc) is as I believe it to be, I can make a simple joker mod generator

tepid sky
coarse nest
tepid sky
#

oh well

coarse nest
#

It's the code for generating jokers in the challenge.

crisp coral
#

so the visual, mod skeleton and the loc_txt

opal spade
cunning barn
coarse nest
#

So assets would just be a case of you'd have to have them already, can't get around that, but having the code auto generate based on selections is what I would be able to do. Having you name your asset etc. Basically I can make code be written and have strings be added and swapped based on options selected. So anything that can use that I can do

crisp coral
#

i think it was this

static juniper
#

Asking again for help with this problem. I'm trying to make a voucher that makes it so Booster Packs contain 1.5x more cards. This is the code I have now.

    for k, v in pairs(G.P_CENTER_POOLS["Booster"]) do
        v.config.extra = floor(v.config.extra * self.config.extra.mult)
    end
end,```Problems:
1. The voucher does not come into effect immediately, only in the shop _after_ the voucher is purchased.
2. This voucher does not reset after a run.  It continues to be in effect during every run until you reload the game.
3. Speaking of reloading the game, doing that will stop the voucher from working properly.

Anyone have a good solution to these problems?
crisp coral
#

what you're doing is directly modifying the center, which is persistent

#

you may need a lovely patch for this

static juniper
#

Ah, the day has come for me to learn how to do that?

crisp coral
#

look at Cryptid's Off by One

wintry solar
#

I think taking ownership of them and adding a modifier variable in there would also work

crisp coral
#

would that work for modded boosters

wintry solar
#

Errrrr

#

I’m sure you could set up a loop through the pool and take ownership of them that way

#

But that does seem kind of jank

crisp coral
#

it is

static juniper
#

Making a lovely patch sounds complicated and I'm not afraid of jank, so sure, how do I do that?

crisp coral
#

that's why i recommend checking off by one

wintry solar
#

Lovely patches are super easy tbh

static juniper
#

I've still never done one before

wintry solar
#

Then it’s time to learn!

static juniper
#

Hooray

wintry solar
#

They will open up so much more for you honestly

static juniper
#

Where do I start?

solid salmon
#

fellow mod devs i need assistance

wintry solar
#

Look at any mod that uses them

#

To get the structure

opal spade
opal spade
wintry solar
#

Then look at the code in your lovely dumps to find your patterns

static juniper
#

Where do I find them? The lovely folder?

opal spade
#

ye

#

lovely patches are lovely.toml in the mod's root folder and any .toml files in the lovely folder

frosty dock
#

ffs what's happening, I'm going insane

#

why are some of my sprites not animated

static juniper
#

I'm trying to interpret this Lovely patch code and figure out what everything does. Let me know if I'm getting anything wrong.

[patches.regex]
target = 'card.lua'
pattern = 'G.ASSET_ATLAS\["centers"\]'
position = 'at'
payload = "G.ASSET_ATLAS[(G.GAME.viewed_back or G.GAME.selected_back) and ((G.GAME.viewed_back or G.GAME.selected_back)[G.SETTINGS.colourblind_option and 'hc_atlas' or 'lc_atlas'] or (G.GAME.viewed_back or G.GAME.selected_back).atlas) or 'centers']"

[[patches]] and [patches.regex] are required to make the code recognize there's a patch.
target is the file you want to patch
pattern is the specific segment of code you want to modify. I don't know what the \ means yet.
position is where you want to modify the code. before means placing it before that segment, after means placing it after that segment, and at means directly replacing that segment?
payload is the segment of code that is being added to the file at position relative to pattern

Did I get all of that right?

frosty dock
#

[patches.regex] specifies the type of patch. the other one that's ofte used is [patches.pattern] it's a lot more efficient than regex and enough most of the time, but it's more restrictive, i.e. you can only match single full lines.

#

if you don't know regular expressions, have fun figuring that out

#

the \ escapes the square brackets, which otherwise have reserved functionality of grouping characters together

frosty dock
#

inconsistently either everything is animated, nothing is, or only the top half

static juniper
frosty dock
#

yeah the rest is all correct

wintry solar
frosty dock
#

the tooltips go off screen (yes ik I can re-align them but wtf)

#

is this some weirdness relating to updating object nodes inside other object nodes

wintry solar
#

Is default 5 rows of 6?

frosty dock
#

6

wintry solar
#

It would probably be easier to make them cards instead

frosty dock
#

it's a bit over-padded still but I can figure out the specifics for that once everything else is right

wintry solar
#

Like galdur does for stakes

frosty dock
#

hm alright I'll try cards

#

but do cards fully support animated sprites?

wintry solar
#

You can use card areas then which are a breeze to update on page change

#

That’s a good question

frosty dock
#

ik it didn't work out natively for aura, but it might just be due to that one undefined global

wintry solar
#

Are you also planning on paginating tags and seals after blinds?

frosty dock
#

yes

wintry solar
#

🥳

frosty dock
#

ah yes this thing

#

wtf it actually works

#

okay that's stupid

hoary moss
#

How do you all code mods for balatro? Asking because I want mod for balatro. Are there any video guys I can watch?

frosty dock
#

there's some (written) documentation and lots of mods that you can look at for reference

#

do you have any experience with coding?

static juniper
#

So when making a lovely patch, do I put it in the lovely folder or do I put it outside in the Mods folder

hoary moss
#

So any gaps in knowledge I have, I can ask him for help

maiden phoenix
static juniper
#

There's some written documentation on the Steamodded Wiki

#

The Steammodded-main folder also has a few example mods

hoary moss
#

Thank you, Lua is a language language I am not that strong in.

static juniper
#

I also suggest either extracting the game file or looking through the lovely dump to see how the game does things

static juniper
#

Because I know Cryptid both has a lovely.toml and a lovely folder

crisp elbow
#

I think you can do both?

frosty dock
#

it works as long as it's in your mod's folder in either one of lovely.toml or lovely/*.toml

regal wolf
#

You can either have it as a "lovely.toml" folder inside your mod directory.

#

Or you can have it in a sub-directory inside your mod directory called "lovely"

#

for example

static juniper
#

Should I have a mod directory? I've always just put things right in the Mods folder

crisp elbow
#

Yeah

#

You definitely should

#

It makes debugging mods easier

#

It's the recommended way to do it if a mod is hardcoded

#

for looking for a specific directory

regal wolf
#

I mean it's just good for a million reasons.

static juniper
#

Do I just add a folder inside of Mods, put everything in it, and everything still works?