#💻・modding-dev

1 messages · Page 98 of 1

tepid crow
#

yeah sounds like an event thing

pearl bane
#

yeah so adding a event in the extra queue does the job

young dew
#

is it possible to get how many times one card will be retriggered?

pearl bane
#

buuuut idk how to pass the card into it

frosty dock
#

'nother new wiki page

teal estuary
#

we are eating GOOD

rough furnace
#

Also thank you for including the assert in the load file example

frosty dock
#

sure lemme do that

rough furnace
#

Wow I didn't know about half these utilities

#

SMODS.stake_from_index feels like it should return nil if it doesn't exists

frosty dock
#

this way it can still be used to directly index things

#

nil can't

rough furnace
#

Fair

frosty dock
#

I've realized I did pull a dupe on some already documented util functions

gritty valley
#

@frosty dock u think function patching utils would be useful? It's not like it's hard to do in lua but it would just remove like a tiny bit of boilerplate.

rough furnace
#

Idk it would save like at most 2 lines, and possibly some overhead

frosty dock
#

would it even save lines?

gritty valley
#

Yeah like one, for the function back-reference

rough furnace
#

It could if it auto did the call

#

But not characters probsbly

gritty valley
#

Definitely more of a small thing lol

#

Idk if it's too small as a util func

rough furnace
#

I don't think it makes sense

gritty valley
#

Fair

#

Would've just made the PR if I was fully into it

rough furnace
#

Also I don't think the function could even replace the original very well

#

It would need a jank pass the table and key

gritty valley
#

Yeah it would still require the direct setting of the original function namespace outside the func most likely

frosty dock
#

could have a ref_table-ref_value approach but that still looks bad

local oldfunc = G.FUNCS.reference
function G.FUNCS.reference(...)
  local ret = oldfunc()
  -- stuff
  return something
end
-----------
patch(G.FUNCS, 'reference', 'after', function(result, ...)
  -- stuff
  return something
end)
#

would also likely need several different types of patching with different arguments to allow modifying return values and args and whatnot

#

not worth it

gritty valley
#

True, function patching just has too many dynamics to consider

frosty dock
#

just makes things more confusing because it's nonstandard

gritty valley
#

Maybe you should just make a wiki page on patching functions. So it's easier to understand for new modders. Low priority but I think it would be useful.

rough furnace
#

really util functions should mostly be things that are

  • Really complex/need a lot of work to do
  • Prone to causing issues that you can help avoid
  • done frequently
gritty valley
#

So yeah honestly not worth

rough furnace
#

yeah but something that is extremly common and done in 1 or 2 lines doesn't need a util function

tidal ice
#

ok so I want a consumable card to only be usable when in a blind, how would I do that?

tepid crow
#

create a custom can_use and check whether the player is in a blind

frosty dock
#

(i actually couldn't bother explaining why a certain feature was missing here, so i just sneakily added it in)

balmy stump
#

i didnt think of this at the time but making huge joker slots like 10k or whatever would have made joker stencil too good, so this setup stops that from being possible

hardy viper
#

tru

tepid crow
#

apparently lua5.1 doesn't have integer division yet?? (only introduced in 5.3)

tidal ice
#

im trying to make an enhancement that causes a card to be destroyed similarly to glass but idk where the glass enhancement's associated code for being destroyed is

#

i tried to look

#

actually im just not gonna worry about this

tidal ice
#

ok so im making it where a consumable's affect expires after the blind ended but idk how im supposed to do so

#

like, I cant use context stuff

stiff locust
tidal ice
#

alright

remote shell
orchid thunder
#

Can I change the color of text on a badge

tidal ice
#

working on refreshments!

#

I wanna add some kind of detail on the bottom but I'm not sure what to do

thick panther
#

Maybe a shadow for the wine glass?

tidal ice
#

oh true

vale lake
#

does anyone know how smod bypasses localization for modded joker names?

tidal ice
#

which badge are you talking about

orchid thunder
tidal ice
#

oh then I'm not sure if I know anything about that sorry

orchid thunder
#

But instead of changing the background color I want to change the text color

orchid thunder
tidal ice
#

the badge for the main mod

orchid thunder
#

I can prob use similar code

tidal ice
#

you may be right

#

lemme see

#

here it is in a json file for a mod

orchid thunder
#

That didn't help but thanks for trying

tidal ice
#

slight update to wine but also the placeholder sprite because its funny

exotic hedge
tidal ice
#

Refreshment consumable cards

#

they may typically be ones with temporary effects but im considering changing that

stiff locust
#

water bottle

#

all played cards are scored

tidal ice
#

true

tidal ice
#

+4 discards

stiff locust
tidal ice
#

its only for one round so its not THAT good

thick panther
#

Hydra card that just adds 2 negative copies of itself. Doesnt do anything else

exotic hedge
#

Would this be its own separate consumable type or what

tidal ice
#

but it can get you out of a tough spot

exotic hedge
tidal ice
#

milk - +3 hands
bread sticks - blind is reduced by 25%

#

those are the ones thats coded so far anyways

exotic hedge
#

is there like a theme behind them or is it just bread sticks

#

Like I can see wine being discards in this case bc it’s red

thick panther
#

Maybe wine can also be -1 hand size as a trade off? +4 hands seems OP

exotic hedge
#

is there any theming like that for the other ones?

tidal ice
stiff locust
#

there are very similar alchemical cards that give +1 hand and +1 discard for round

#

+4 is insanely powerful

tidal ice
#

yeah it is I realize

#

well I do want these to be strong, they are temporary effects after all

#

but maybe I should dial it down a bit

exotic hedge
#

There should be a trade-off

#

Or +3 discards

coral grotto
shell tangle
gaunt thistle
#

smart

#

I feel like that fits thematically, but no idea on how that balances.

polar grotto
#

I wanna make some custom joker art

#

I have a really cool idea

#

Can someone give me a png?

placid frigate
#

where do I found the source code for the legendary jokers

#

never mind in the code it's Caino instead of Canio

placid frigate
#

So when I use my Joker all the messages work but the Xmult doesn't actually apply to the score. what would be causing this to happend?

teal estuary
#

can we see the code? its usually forgetting the right _mod in the return AFIAK

wooden nexus
#

Decided I'd start a new chapter in my modding journey

#

Crimson's Ultimate Card Collection became ShinkuLib, and now I'm using it along with your usual collection and make Shinku's Card Binder

#

Honestly, a cleaner name than well..

#

Y'know the acronym

#

Any Ideas I get are gonna be thrown against the wall here in the binder

wooden nexus
#

Goofy stuffs

tidal ice
#

I'm using FearJoker's lovely patches (with permission) to be able to have consumables that stay for a while to have temporary effects
I have calculate code that perfectly destroys a card after the round is over, but this isnt retriggering any cards

any help?

tidal ice
wooden nexus
#

Enhancements

tidal ice
#

the -1 ante enchantment is insane

wooden nexus
#

I'm not trying to go for balanced. I'm going for learning how to make stuff

tidal ice
#

ah yeah that makes sense

#

I need to try and make some enchantments myself eventually haha

wooden nexus
#

So the card binder's gonna be full of wacky stuff. Think Cryptid and Almanac but me learning how to do stuff

#

I may change it to something like 1 in 2 chance to do +1 ante or -1 ante

long gust
wooden nexus
#

?

#

But yeah, while stuff like Tier 3 vouchers will be in ShinkuLib, things like my Extreme Decks and whatnot will be in this card binder mod

#

Had a cursed thought:

What if you tried to Ortalab the Ortalab cards without reference of Balatro?

#

It's like Google Translating over and over

#

I may be making stuff with stuff from ShinkuLib down the line so...

#

Idk if i'll make it a dependency or one of those "If Mod Loads" atm

#

But safe than sorry, Gonna be dependency

gritty valley
#

Is there any way to make cards in hand give chips?

#

What the fuck thunk

obsidian jungle
#

Can I dm anyone in regards to modding. Got some questions about injecting. That's all.

hardy viper
rough furnace
#

I'm generally against DM support. It requires one on one interaction which can get annoting as the person giving support if you don't know how to do something or have to leave or whatever and now they aren't getting support. Also since others can see the coversation it means that the knowledge isn't he shared so people reading the channel don't gain that knowledge, aren't able to correct mistakes and also can't take over support if the original helper can't follow up

gritty valley
wintry solar
#

Does lovely 0.6 allow multi line targeting without using regex?

gritty valley
#

Or do you mean patching mutliple lines with one pattern

wintry solar
#

Patterns only looked for single lines unless they were regex patterns

gritty valley
#

Yeah I'm not sure then

wintry solar
#

I mean, does your PR actually patch or not?

#

Because you have a multi line pattern

gritty valley
wintry solar
#

Neat

rough furnace
#

I never got a response

wintry solar
#

That would be amazing if it does

obsidian jungle
wintry solar
#

No longer have to spend ages figuring out the exact regex string to match the specific area

karmic kelp
#

where does the game determine the hand type of the hand played?

rough furnace
obsidian jungle
#

Just dont have the best experience asking basic questions in some servers

frosty dock
#

we don't judge (except jokingly)

wintry solar
#

Or if you are a filthy pirate man

obsidian jungle
#

Fair enough

frosty dock
#

Also others might have the same questions and can find the answers too sometime later

karmic kelp
#

heck it'll help me, since I anticipate I'm going to need to patch the hand type evaluation stuff

#

but I'm not quite there yet so I can just keep a reference to this convo

obsidian jungle
#

I tried to mod an unity game, that was a pain

#

Now gonna try this first

#

got the metadata working now gotta figure out how to make the mod itself

frosty dock
#

I assume you already found the docs then?

obsidian jungle
#

Yep!

frosty dock
#

great

gaunt thistle
#

Also I didn't realize that you were asking about that in particular

gaunt thistle
#

I swear it's not

rough furnace
#

try the patch

hardy viper
rough furnace
frosty dock
#

I thought it worked tbh

hardy viper
gaunt thistle
#

last I checked the pattern patch is checked per line

hardy viper
#

local i, flag = 1 ❤️

gaunt thistle
#

maybe that changed

rough furnace
#

it was last I checked too

#

before that guy asked

rough furnace
frosty dock
karmic kelp
#

two currently drafted ideas
a card enhancement that makes a card act as the most advantageous rank
a joker that adds a wild 5 to all (or only some) hand evaluations

gaunt thistle
#

alright

#

well I misremembered

karmic kelp
#

all I know is I need to look at how it works to even see how possible those ideas are

rough furnace
#

oh so since beta7

gaunt thistle
#

I've been keeping you guys in the dark because I like to see suffering

#

(I legitimately forgot)

frosty dock
gaunt thistle
#

@crisp coral you'll never guess what just happened

frosty dock
#

so there's no fully functional implementation of that yet afaik

karmic kelp
#

I'm fine with it only counting the standard 13 ranks, since the theming is around there anyway

rough furnace
#

you may be able to get away with hyjacking the evaluate functions in SMODS.PokerHand's

#

not too familar with the hand evaluation system

frosty dock
#

I should try to make quantum ranks work again, haven't even tried in a while

rough furnace
#

oh yeah you could jsut hook get_id

#

I forgor it was a function

#

the wild 5 one could probably just add it to the played cards array and let the game caluclate it

frosty dock
rough furnace
#

true

mellow sable
rough furnace
#

but you coudl look at the played hand and figure out the most useful rank

frosty dock
#

Ideally we don't need to brute force it

rough furnace
#

I mean you could be smart with vanilla hands

royal ridge
#

tried to make quantum ranks before and got stuck on straight calculation

rough furnace
#

straights seem the hardest

karmic kelp
#

ideally it

#

it'd have to be compatible with modded hands like blackjack, right?

rough furnace
#

it's hard to support modded hands without manually supporting them, having them support you or brute forcing

karmic kelp
#

makes me wonder if brute force would be worth considering for that "ease" of compatibility then

#

since in theory the performance hit would only occur with quantum ranked cards, right?

rough furnace
#

depends

#

things start getting tricky with multipel quantum ranks, bigger hand sizes, etc.

frosty dock
#

3 quantum rank cards even at the standard 13 ranks would need 2197 full hand evaluations

karmic kelp
#

hm... I see your point on the need for compatibility then

tidal edge
#

yeesh baboy!

karmic kelp
#

but you could maybe make it so only evaluates hands between the best possible hand and the worst hand already known to be possible? that'd probably do something to reduce the search space

frosty dock
#

straights probably account for a lot of that time, but it's fairly fast to tell something isn't a straight

mellow sable
rough furnace
#

I mean you can always gurantee an x of a kind with x quantum cards

#

so you can start at that

nocturne garnet
#

what are quantum ranks

#

or enhancements

#

or whatever

rough furnace
#

card with any rank

tepid crow
#

like wild cards but for rank instead of suit

royal ridge
nocturne garnet
frosty dock
#

how "global" would the choice of card be? if there's a combination that makes a straight and one that makes a 3oak, it shouldn't contain both I presume?

rough furnace
#

not impossible

#

but a lot of work

frosty dock
#

cause otherwise we'd have fake straight flushes and stuff

royal ridge
#

nothing is impossible

nocturne garnet
#

unless we somehow overwrite every vanilla joker that uses ids and force every mod to use some Card:is_id() function or whatever

tepid crow
#

that would almost certainly have to be the case yes

nocturne garnet
#

that would take quite a long time

royal ridge
#

the conversion will be a joyous day

mellow sable
#

I’m already doing that with enhancements

frosty dock
#

regex my beloved

tepid crow
#

you probably would get very far with a simple regex yeah

rough furnace
frosty dock
#

Also probably it would be is_rank instead of is_id

rough furnace
#

it's not impossible

nocturne garnet
frosty dock
#

since rank IDs are just in order of registration and don't mean anything

nocturne garnet
gaunt thistle
#

cursed

tepid crow
#

congrats, it's both!

rough furnace
nocturne garnet
tepid crow
#

A regular expression (abbreviated regexp or regex) is a way to describe sets of characters using syntactic rules. Many programming languages use or support regular expressions. A regular expression is then used by a special program or part of a programming language. This program will either generate a parser that can be used to match expressions...

gaunt thistle
#

silence, regex is godliness

karmic kelp
#

incredible power if wielded properly

nocturne garnet
hardy viper
nocturne garnet
#

john balatro regular expression

#

full name

hardy viper
rough furnace
gritty valley
tepid crow
gritty valley
#

ever

wintry solar
#

Luna implemented quantum ranks right?

gaunt thistle
#

can't have performance issues if it's written in rust

gritty valley
gritty valley
hardy viper
#

not in a cremation way

#

in an at the stake way

tepid crow
gaunt thistle
#

all this complaining, sheesh

#

fine fine

#

I'll replace regex with a custom dsl

hardy viper
#

who wants to parse html with regex? i do i do!

rough furnace
#

I wrote a debian control file parser with regex

karmic kelp
#

so I take it I should probably work on the other things I have drafted for my mod for the moment

gritty valley
gritty valley
karmic kelp
#

oh no I meant in regards to the quantum rank enhancement I wanted to add earlier

gritty valley
#

Without being very slow

#

And/or buggy

karmic kelp
#

the add a 5 to hand evaluation did sound possible though... I just didn't catch where I'd need to hijack/patch

frosty dock
#

without some patches we have in Steamodded that would actually fail horribly

#

vanilla hand evaluation rejects anything with 6 cards or more

gritty valley
#

lol

frosty dock
#

Also for hand eval you'd probably need for the wild 5 to actually exist and not just be some dummy table

karmic kelp
#

I was mainly thinking of having it adjust what the hand would think it is

#

like how you can make a flush with wild cards, then lose the wildness due to Vampire, but it still evals as a flush

karmic kelp
#

again though, I still don't know (even roughly) where I'd need to adjust the base game's code, assistance on that front would be appreciated

tidal ice
hardy viper
#

thought jimbo was male

gritty valley
nocturne garnet
thick panther
#

How do you set the locked text of a joker?

placid frigate
#

What does unlocking the text do

thick panther
#

Do you put the unlocked text in unlock then?

hardy viper
#

it's not clear by the code though

wooden nexus
#

So what's wrong here?

#

I know, other than the fact I have a big if/elseif statement

gritty valley
#

How would I add an info box next to a jokers description that says like "art by _"

placid frigate
hardy viper
#

that is never true

tidal edge
# nocturne garnet

there should be a weird ass mod where all the unlocks are like riddles

nocturne garnet
#

there should be a weird ass mod where all the unlocks are fucked up

wooden nexus
tidal edge
hardy viper
tidal edge
#

weird cryptic riddles

#

to tell you how to unlock them

karmic kelp
#

I may be mistaken, but is it the fact that for the orbital tag, you construct the tag but never actually add it?

#

instead adding a blank orbital tag later

wintry solar
wooden nexus
#

wdym?

#

I want it to be just balatro tags, if i just use tags it'll grab other modded tags included my own

wintry solar
#

Instead of that god awful if tower

karmic kelp
#

what's the signature for that? didn't know that existed myself

frosty dock
#

you can still just make a list of all the tags you want to include and pass that thru

wooden nexus
#

I just looked at what was in Balatro and the one i found was Certificate's if statement

#

i can?

thick panther
#

Does this look about right? Im trying to make it look like meat/bacon. Maybe its too pink?

wooden nexus
#

It looks raw

tidal edge
#

what if it wasmore like this

#

bacon

wooden nexus
#

Looks more cooked

#

Mind if i try something?

thick panther
#

sure, im open to suggestions

wooden nexus
#

I made it more contrast?

thick panther
wooden nexus
#

Maybe you could make the darker colors in red and the lighter in yellow

#

Something like this

tidal edge
#

i want to eat that joker

karmic kelp
nocturne garnet
#

instead of using a horrendous if statement, use that

tidal ice
#

its a bit funky lookin but heres Hekikomori

hot drift
#

windows 10

#

looks nice tho

wooden nexus
#

It works now

nocturne garnet
#

okay it seems i will be cooking today

tidal edge
nocturne garnet
tidal edge
tidal edge
#

may i put forward an idea

thick panther
#

How do you modify hand size?

placid frigate
#

what's the difference between h_mult and x_mult

frosty dock
#

h_mult is +mult if card is held in hand

#

x_mult is.. well, xmult

placid frigate
#

oh so h_mult is for Jokers like The King

frosty dock
#

there is no joker named that

thick panther
#

I found G.GAME.starting_params.hand_size, and tried increasing it, but it didnt seem to work in a deck?

apply = function ()
        G.E_MANAGER:add_event(Event({

            func = function ()
                
                -- Increase hand size by 5
                G.GAME.starting_params.hand_size = G.GAME.starting_params.hand_size + 5

                

                return true
            end
        }))
    end,
placid frigate
nocturne garnet
#

that would be h_x_mult not h_mult

hot drift
#

h_mult is for Shoot the Moon

frosty dock
#

h_x_mult is used by steel cards

nocturne garnet
frosty dock
#

baron actually just uses an x_mult return val

nocturne garnet
#

wait what the fuck

#

h_mult is a thing???

#

i thought yall were talking about like

#

card ability's h_mult

#

you can return it??

#

i thought it was just like

placid frigate
#

you can just do h_mult by it's self?

nocturne garnet
#

i thought you just needed to return mult

#

whats the difference between returning h_mult and returning mult??

placid frigate
#

h_mult might just be a shortcut?

nocturne garnet
placid frigate
#

do you need to return h_mult?

nocturne garnet
#

idfk

placid frigate
#

it might be for cards that only stay in your hand, so they don't count if played wrong, Raised Fist also has it

nocturne garnet
placid frigate
#

I like the chains

autumn coral
#

q: i am NOT good at spriting, is this acceptable for legendary text or does anyone have any notes or something?

#

i was looking at how the legendary jokers names are written and trying to emulate it

thick panther
#

Is G.playing_cards the played poker hand or the regular hand?

maiden phoenix
frosty dock
#

ugh

#

SMODS.Tag:apply arg signature is inconsistent with other functions, it doesn't take self

wintry solar
#

Lots of tag stuff is inconsistent I’ve found

frosty dock
#

yeah

#

i was just looking at making docs for tags, but this can't really ship

wintry solar
#

I also have no idea what the custom generate ui function was doing other than not handling loc vars properly so I just commented it out in case it was needed

frosty dock
#

it'll break some mods but it's best to have things consistent

#

any other specific inconsistencies that come to mind?

wintry solar
#

I’m not a massive fan of the way they trigger by requiring the context in the config, I don’t remember if they have a set ability function or not either

maiden phoenix
#

Isn't there's one for orbital tag?

wintry solar
#

It is specifically for orbital tag, yeah

#

I don’t remember if it is called for every tag or not though

frosty dock
wintry solar
frosty dock
#

your loc_vars call just throws a tossaway empty table in as info_queue

#

I'd rather have some way to pass the Tag into generate_card_ui than taking loc_vars out, it won't work for custom generate_ui functions either

wintry solar
#

Yeah that makes sense

frosty dock
#

which we do have an argument for, I hope passing a Tag into doesn't doesn't break stuff too badly (it shouldn't)

wintry solar
#

well that makes a lot of sense, here I was thinking I'd just forgotten to add my info queue stuff to certain tags but I've actually just clobbered it away 😄

frosty dock
#

aight that's now working properly

#

while I break Tag:apply, does anything else need breaking 🤔

#

btw this is why I insist on having proper docs before we're stable

#

these things always happen

frosty dock
maiden phoenix
#

Not really breaking but rather fixing the editions having a white text?

wintry solar
#

enhancements*

maiden phoenix
#

Right mb

frosty dock
#

yeah that should also be fixed. i meant tags specifically

wintry solar
#

when is the set_ability called? will it help with the orbital tag problems that crop up every now and then?

#

or does it already do that by default?

#

I don't remember

frosty dock
#

it's called right when calling the constructor

placid frigate
#

How do I get my Joker to say the actual value of the Joker? Right now, when I play a heart card, the adds X_mult goes up instead of the actual value of the Xmult. As shown in the video, it's going up by 1 when it should be going up by .25. It also says the value it goes up is increasing, and the base value (the value it should be adding to x_mult) is nil instead of the base mult. I have no how this happened and no idea how to fix it if someone may help me

#

said video

maiden phoenix
#

Show your whole joker code

wooden nexus
frosty dock
#

alright it's live

#

PSA: As of Steamodded's latest commit 1216c, a breaking change has been made to tags (apply function signature changed from (tag, context) to (self, tag, context). Until the respective mod authors address this change, all mods that add tags to the game will not work with this version. If you are experiencing crashes due to this, please downgrade Steamodded temporarily.

maiden phoenix
# placid frigate

1- Your Xmult gain is actually 1 instead of the .25, try swapping those two's values
2- Your loc_vars returns a value that doesn't exists in its config called Xmult_gain, which explains the nil
3- card.ability.extra.Xmult = card.ability.extra.Xmult + 1 should have the 1 replaced by card.ability.extra.Xmult_mod (or Xmult_gain whichever you end up using)
4- In the return of the calculate function, X_mult_mod should be Xmult_mod instead

placid frigate
#

ok give me a sec to try out these in, I'll be back

thick panther
#

How do you destroy a card in the hand? I tried using SMODS.remove_from_deck, but it crashes with a nil value.

if context.joker_main then
            
            -- Get random card from hand
            local dCard = pseudorandom_element(G.hand.cards, pseudoseed('gluttony'))

            sendTraceMessage(dCard.name, 'TRACE')

            -- Destroy card
            SMODS.remove_from_deck(dCard, false)

            return {
                message = 'Consumed Card',
                colour = G.C.RED
            }

        end
placid frigate
maiden phoenix
#

No not really they're just variable names if used in extra

#

It's just that usually people use "Xmult" for the Xmult gained by the joker and "Xmult_mod" for the modification given to Xmult if it's a scaling joker

#

If the variable names don't match, the returned vars in loc_vars won't find said variable value

wintry solar
#

am I going crazy or does the boss.max on blinds not get used anywhere?

placid frigate
wooden nexus
maiden phoenix
#

It's just naming convention, call it the_xmult_i_give_to_the_og_xmult if you want lol

tidal edge
#

lets go gambling!

wooden nexus
tidal edge
#

oh K

placid frigate
wooden nexus
frosty dock
maiden phoenix
fallen tendon
#

ive been thinking

#

remember ro-balatro

#

what if i made a remake?

#

just improved it and such

wooden nexus
#

ro-balatro?

maiden phoenix
#

Sometimes jokers have a self.ability.x_mult defined or something like that, but it's annoying to work with

maiden phoenix
wooden nexus
#

oh

#

What if we just had one mod that recreates some of the big mods from 0.9X Steamodded that isn't updated

maiden phoenix
wooden nexus
#

oh cool

#

Gonna have to see what mods they ported already

wintry solar
frosty dock
#

yeah

#

we'll have docs for that shortly

obsidian jungle
#

does anyone know where I can find all these properties?

maiden phoenix
obsidian jungle
#

Thank you

wintry solar
#

@frosty dock also should the set_ability be passing self through it too?

obsidian jungle
#
G.E_MANAGER:add_event(Event({
  func = function()
    if G.GAME.hands_left == 1 then
      print("1 HAND LEFT!!!") 
    end
  end
}))```

Anyone know why this isnt printing anything
violet void
#

Hello, I'm adding a simple Joker to test this out but it's just not working 😦 Anyone knows what I'm doing wrong? Thanks

MyJokers.lua

-- Import utility functions
local utils = require(SMODS.current_mod.path .. "/MyJokers-utils")

-- Create an atlas for cards to use
SMODS.Atlas {
    key = "MyJokers_atlas",
    path = "MyJokers.png",
    px = 71,
    py = 95
}

-- List all Joker files here
local joker_files = {
    "enamored_joker",
}

-- Load and register Jokers using the utility function
for _, filename in ipairs(joker_files) do
    local joker = utils.load_joker(filename)  -- Load the Joker table
    SMODS.Joker(joker)                        -- Register the Joker
end```

MyJokers-utils.lua
```local utils = {}

-- Helper function to load all Joker files
function utils.load_joker(filename)
    return require(SMODS.current_mod.path .. "/jokers/" .. filename)
end

return utils```

enamored_joker.lua
```SMODS.Joker {
    key = "enamored_joker",
    loc_txt = {
        name = "Enamored Joker",
        text = {
            "Played cards with",
            "{C:hearts}#2#{} suit give",
            "{C:mult}+#1#{} Mult when scored",
        }
    },
    config = {
        extra = {
            s_mult = 5, 
            suit = 'Hearts'
        }
    },
    rarity = 2,
    pos = { x = 0, y = 0 },
    atlas = "MyJokers_atlas",
    cost = 7,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    soul_pos = nil,

    loc_vars = function(self, info_queue, center)
        return {
            vars = {
                center.ability.extra.s_mult,
                center.ability.extra.suit,
            }
        }
    end,

    calculate = function (self, card, context)
        if context.individual then
            context.other_card:is_suit(self.ability.extra.suit) then
                return {
                    mult = self.ability.extra.s_mult,
                    card = self
                }
        end
    end
}
tidal ice
obsidian jungle
#

Thats all the code

#

and a .json file for the metadata

tidal ice
#

then thats the problem

#

idk what you're doing

obsidian jungle
#

I have my mod in the mods folder

#

with that code

tidal ice
obsidian jungle
tidal ice
#

yeah the problem is that the code is only that

obsidian jungle
#

Ah 😭

tidal ice
#

in a json file aswell

obsidian jungle
#

nono

#

the code is in main.lua

tidal ice
#

ah

rough furnace
frosty dock
wintry solar
#

yeah that's what I meant 😂

obsidian jungle
rough furnace
#

run it at a later point

#

probably knowing what your goal is would help with where you want this to run

obsidian jungle
#

Just trying to print smth when I have 1 hand to figure out how stuff works

#

that's all

rough furnace
#

you can add the prop no_delete = true to your event to keep it around

tidal ice
#

telephone
I should maybe change the rings to a more pleasing color, I may just make it orange or blue

violet void
tidal edge
#

on this bg atleast

maiden phoenix
tidal ice
rough furnace
#

cc @obsidian jungle

obsidian jungle
#

Thank you :)

violet void
violet void
maiden phoenix
#

It does actually

violet void
#

Oh you meant that

Its there I had removed it due to message length

--- MOD_NAME: MyJokers
--- MOD_ID: MYJOKERS
--- MOD_AUTHOR: Me
--- MOD_DESCRIPTION: Adds leveled up Jokers of existing ones
--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-0812d]
--- BADGE_COLOR: c7638f

-- Import utility functions
local utils = require(SMODS.current_mod.path .. "/MyJokers-utils")

-- Create an atlas for cards to use
SMODS.Atlas {
    key = "MyJokers_atlas",
    path = "MyJokers.png",
    px = 71,
    py = 95
}

-- List all Joker files here
local joker_files = {
    "enamored_joker",
}

-- Load and register Jokers using the utility function
for _, filename in ipairs(joker_files) do
    local joker = utils.load_joker(filename)  -- Load the Joker table
    SMODS.Joker(joker)                        -- Register the Joker
end
violet void
#

I was looking for a tutorial like that, thanks for sharing the link 😄

maiden phoenix
tidal ice
maiden phoenix
violet void
obsidian jungle
#

Quick question, any way to wait in lua, I know that in roblox it's wait()

obsidian jungle
#

Ah, thank you

nocturne garnet
tidal ice
#

ok but genuinely that vid helped me a lot

obsidian jungle
#
G.E_MANAGER:add_event(Event({
  func = function() 
    while true do
      if G.GAME.hands_left == 1 then
        print("1 HAND LEFT!!!") 
      end
      print("Code ran")
      delay(10)
    end
  end
}))```

Tried to add a listener but my delay isnt delaying
tidal edge
maiden phoenix
obsidian jungle
frosty dock
#

events are usually blocking and repeat by themselves

maiden phoenix
#

Pretty sure you'd need to inject in whatever lowers the hand left

obsidian jungle
#

yeee, lemmie test some stuff

tidal ice
#

ok now I have art for all my jokers except the food suit ones which I am totally not gonna procrastinate on

placid frigate
#

I’ll watch them in the whole code tomorrow again thank you

maiden phoenix
#

Sorry it didn't fix it, hopefully you get it right next time 👍

placid frigate
#

I mean the mod still work’s indented but X_mult modifiers X_mult_mod instead of the other way around

maiden phoenix
#

Oh

exotic hedge
maiden phoenix
#

Swap the values in loc_vars maybe

exotic hedge
#

Wait is this the food joker one

tidal ice
maiden phoenix
tidal ice
tidal edge
#

xchips is cool

exotic hedge
#

why not just xmult it’s literally the same and maintains the integrity of the game 💔

violet void
frosty dock
#

new docs just dropped

tidal ice
tepid crow
#

also, wait

#

isn't Tag a Center?

frosty dock
#

no

tepid crow
#

oh it's not

#

bet

frosty dock
#

it behaves like a center in certain ways

#

but it can't actually extend Center because well.. tags just aren't quite centers

rough furnace
#

Tag's are also not cards

#

when spawned in

tidal ice
#

ok so im tryna make smth that works like Splash and its saying that scoring hand is nil, is there anything I'm missing?

autumn coral
#

card_eval_status_text isn't working for whatever reason?

frosty dock
#

now what's left

#
  • Stake
  • Seal
  • Challenge
  • Sticker
  • DollarRow
  • DeckSkin
#

why do we need DollarRow again

autumn coral
#

not sure why it wouldn't work, it does everything the exact way it's programmed, including rolling all of the other cards except for itself, but for some reason, it's so fucked up with eval status 😭

#

i like barely care honestly it's more of an aesthetic thing at this point

#

even when it was working it was laggy for some reason which is also hella weird

#

maybe i should put all of the other logic in an event manager or something?

tepid crow
tidal ice
#

ah

fallen tendon
#

why can i never have anything even slightly basic work when im coding

#

i cant seem to load files

autumn coral
#

real

fallen tendon
#

trying to get the left file to load the right one

autumn coral
#

u need to add () to the end of load_file

#

SMODS.load_file("file")()

fallen tendon
#

why

autumn coral
#

ik it's weird

#

dude i have no idea

tepid crow
#

it returns as function

autumn coral
#

that's how it works though 😭

tepid crow
#

also do assert(SMODS.load_file("path/to/file.lua"))()

autumn coral
#

that one

fallen tendon
#

ok it sorta works

#

im starting to remember why i abandoned robalatro in the first place lol

maiden phoenix
tepid crow
tepid crow
#

(I'm still not sure why that isn't default behaviour)

autumn coral
#

i will!

#

is it literally the same function

tepid crow
autumn coral
#

is there anything else i have to change or do i just do the exact same thing

#

oh nvm i found it in the api

frosty dock
autumn coral
#

how would it look tho /gen

#

like where do i add the text

tepid crow
#

these are examples from my own code

  elseif context.ending_shop and not context.repetition and not context.game_over and not context.blueprint and not context.individual then
      -- cannot use return, possibly not supported from this context?
      SMODS.eval_this(card, {message = "+2", colour = G.C.MULT})
  elseif context.selling_card and context.card.area == G.jokers then
      card.ability.extra.mult = 0
      -- cannot use return, possibly not supported from this context?
      SMODS.eval_this(card, {message = localize("k_reset"), colour = G.C.MULT})
autumn coral
#

oh cool thanks

tepid crow
autumn coral
#

nyope still nothing???

frosty dock
#

not my point, it will still fail if you try to call it

#

assert ensures you get proper error messages instead of some 'attempt to call a nil value'

autumn coral
#

weeeeird

tepid crow
#

not my point either, why do I have to ask for the error message

#

feels like I'm back to coding in C

autumn coral
#

oh

#

hm

#

that's not right...

#

oh lmfao

frosty dock
#

if I throw you a crash if things go wrong, it's on you to catch it first

autumn coral
#

dude this is so weird wtf

it prints fine to the console, but it will NOT fucking do the eval at all

tepid crow
#

but Lua has exception handling 😭

wintry solar
autumn coral
#

does it matter?

#

it DOES have the card, it just does NOT want to work with me

frosty dock
#

it's common practice in lua to build these sorts of functions in a way where they can be thrown directly into assert

autumn coral
#

this is it grabbing the key of the card in the same logic by instancing itself

#

i'm just getting pissed off that it isn't doing anything

wintry solar
#

it potentially matters, yes

autumn coral
#

hopw so

#

/gen

frosty dock
autumn coral
#

it'

#

it's not in the card logic, if that's what you're asking

#

this is separate logic since i'm using a custom function to add a custom button to my card which this is handling

#

said custom button

violet void
#
    key = "enamored_joker",
    loc_txt = {
        name = "Enamored Joker",
        text = {
            "Played cards with",
            "{C:hearts}#2#{} suit give",
            "{C:mult}+#1#{} Mult when scored",
        }
    },
    config = {
        extra = {
            s_mult = 5, 
            suit = 'Hearts'
        }
    },
    rarity = 2,
    pos = { x = 0, y = 0 },
    atlas = "MyJokers_atlas",
    cost = 7,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    soul_pos = nil,
    order = 3.1,

    loc_vars = function(self, info_queue, center)
        return {
            vars = {
                self.ability.extra.s_mult,
                self.ability.extra.suit,
            }
        }
    end,

    calculate = function (self, card, context)
        if context.individual and context.other_card:is_suit(self.ability.extra.suit) then
            return {
                mult = self.ability.extra.s_mult,
                card = self
            }
        end
    end
}

I'm trying to understand but the key is very much there

autumn coral
#

like there's no way i have this fucked up

#
SMODS.eval_this(card, {message = "Nothing to roll!", colour = G.C.RED})
#

is this not exactly how it's formatted???

frosty dock
wintry solar
#

it's almost 100% that your card value isn't actually a card

#

hence why I asked to see where you call the function

tepid crow
violet void
# frosty dock is this the only joker you're defining?
local utils = dofile(SMODS.current_mod.path .. "/MyJokers-utils.lua")

-- Create an atlas for cards to use
SMODS.Atlas {
    key = "MyJokers_atlas",
    path = "MyJokers.png",
    px = 71,
    py = 95
}

-- List all Joker files here
local joker_files = {
    "enamored_joker"
}

-- Load and register Jokers using the utility function
for _, filename in ipairs(joker_files) do
    local joker = utils.load_joker(filename)
    SMODS.Joker(joker)
end

Yes for now

autumn coral
#

i mean

autumn coral
#

whatever man i'll just throw it in chat

frosty dock
#

you're not actually returning anything from the file

autumn coral
#
d4 = function (card)
            if #G.jokers.cards-1 == 0 then
                print("Nothing to roll!")
                print(card.config.center.key)
                SMODS.eval_this(card, {message = "Nothing to roll!", colour = G.C.RED})
                return true
            end
            SMODS.eval_this(card, {message = "Roll!", colour = G.C.MULT})
            local count = #G.jokers.cards
            local counter = 1
            for i=1, count do
                if G.jokers.cards[i] ~= card then
                    local rarity = G.jokers.cards[i].config.center.rarity
                    rarity = (rarity == 4 and 4) or (rarity == 3 and 0.98) or (rarity == 2 and 0.75) or 0
                    local is_soul = false
                    if rarity == 4 then
                        is_soul = true
                    end
                    local c = create_card('Joker', G.jokers, is_soul, rarity, nil, nil, nil, "wbin")
                    c:add_to_deck()
                    local temp = G.jokers.cards[i]
                    G.jokers:emplace(c)
                    temp:remove()
                    G.jokers:remove_card(temp)
                    table.insert(G.jokers.cards, i, table.remove(G.jokers.cards,#G.jokers.cards))
                end
                counter = counter+1
                if counter > count then break end
            end
            WrenBind.can_roll.d4 = false
            return true
        end
edgy reef
frosty dock
#

you're calling SMODS.Joker in the file then calling it again on the return value of the file

autumn coral
edgy reef
#

Lovely fixes this so just thanos snap it (EXCEPT keep the negaive dollar portion, that's actually good).

autumn coral
#

that literally prints exactly what i expect

#

i mean

#

ok hold on

violet void
# frosty dock you're calling SMODS.Joker in the file then calling it again on the return value...

`return {
key = "enamored",
loc_txt = {
name = "Enamored Joker",
text = {
"Played cards with",
"{C:hearts}#2#{} suit give",
"{C:mult}+#1#{} Mult when scored",
}
},
config = {
extra = {
s_mult = 5,
suit = 'Hearts'
}
},
rarity = 2,
pos = { x = 0, y = 0 },
atlas = "MyJokers_atlas",
cost = 7,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
soul_pos = nil,
order = 3.1,

loc_vars = function(self, info_queue, center)
    return {
        vars = {
            self.ability.extra.s_mult,
            self.ability.extra.suit,
        }
    }
end,

calculate = function (self, card, context)
    if context.individual and context.other_card:is_suit(self.ability.extra.suit) then
        return {
            mult = self.ability.extra.s_mult,
            card = self
        }
    end
end

}`

Thanks, did this instead

tepid crow
#

triple backtick for an actual full codeblock

autumn coral
#
 local me = nil
            for i=1, #G.jokers.cards do
                if (card == G.jokers.cards[i]) then
                    me = G.jokers.cards[i]
                    break
                end
            end
            print(me.config.center.key)
#

this also prints j_wrenbind_d4

frosty dock
#

```lua
you_can_make_real_code_blocks_like_this()
```

violet void
tepid crow
#

what kind of keyboard do you have haha

#

the character is top-left for me

autumn coral
#

lowk so pissed off about this not evaluating correctly 😭

#

it is like. solely aesthetic at this point that has no reason to not be working

#

i even made it go through all of the jokers in the hand to find itself and then call itself and that did literally exactly the same thing

violet void
tepid crow
#

oh fun, those are on the right side of my keyboard

#

¯_(ツ)_/¯

autumn coral
#

i'll just try SMODS.find_card

violet void
autumn coral
#

oh that's fun

#

is there LITERALLY no way to make text appear outside of calculate?

#

istg tarot cards do this ALL the time

#

time to go look at the actual code ig

#

ok

#

i figured it out

frosty dock
autumn coral
#
function alert_no_space(card, area)
  G.CONTROLLER.locks.no_space = true
  attention_text({
      scale = 0.9, text = localize('k_no_space_ex'), hold = 0.9, align = 'cm',
      cover = area, cover_padding = 0.1, cover_colour = adjust_alpha(G.C.BLACK, 0.7)
  })
  card:juice_up(0.3, 0.2)
  for i = 1, #area.cards do
    area.cards[i]:juice_up(0.15)
  end
  G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.06*G.SETTINGS.GAMESPEED, blockable = false, blocking = false, func = function()
    play_sound('tarot2', 0.76, 0.4);return true end}))
    play_sound('tarot2', 1, 0.4)

    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.5*G.SETTINGS.GAMESPEED, blockable = false, blocking = false,
    func = function()
      G.CONTROLLER.locks.no_space = nil
    return true end}))
end
``` this is 100% what i need
tepid crow
autumn coral
#

technically the function i wanted is attention_text

#

let's see if it works

#

fucking hopefully man i want to move onto actually working on today's dice

frosty dock
autumn coral
#

god it's too large fuck

#

ughhh

maiden phoenix
frosty dock
#

it's kind of not in my symbol layer though, i moved it to my diacritics layer because I ran out of space in the other one lmao

#

i mean ` is kind of a diacritic character right

edgy reef
#

Rest should be fine

violet void
#

Is it possible to decide the order of a new joker? or does it automatically put it after the last

edgy reef
#

I hope

autumn coral
#

i got it to work this just sucks

maiden phoenix
frosty dock
autumn coral
#

also i can't use card_eval_status_text

maiden phoenix
#

What

autumn coral
#

i had to use attention_text

#

this happens outside of calculate

maiden phoenix
#

Yea

autumn coral
#

anyway i figured it out

frosty dock
#

there's no* way for you to change this
-# * except with lovely patches

violet void
#

altho for my purpose having them next to each other woud've been better

tidal ice
#

is there some kind of lovely patch or smth I grab so my consumables can be kept when taken from a pack

#

most I can find is cryptid's code cards but idk if I should just take this whole thing

maiden phoenix
#

Yea they use a lovely patch to do that

#

There's also Pokermon that does it if you need another ref

frosty dock
#

you don't need a lovely patch for that, steamodded supports it

#

keep_on_use function

maiden phoenix
#

Pretty sure they mean the "reserve" button?

tidal ice
#

oh

frosty dock
#

oh i misread

tidal ice
#

ah whoops

frosty dock
#

so sorry, it's 12am

#

yeah no that needs a lovely patch

#

mb

tidal ice
#

alright

#

im just trying to find what cryptid has

#

yeah idk where the code is

autumn coral
#

is there a way to make my sound have multiple different values it picks from randomly built-in or do i have to add that myself

fallen tendon
#

so uhhhhh, why cant balatro find the atlas for my consumables?

#

i made a class that adds the atlas but it really doesn't like me

frosty dock
#

when extending the class, it doesn't add any mod prefix

#

so you'd need to add it manually in this case

fallen tendon
#

what the hell

#

what even is the prefix for atlases?

frosty dock
#

just the mod prefix

fallen tendon
#

k

#

that is incredibly weird

tepid crow
#

pretty sure someone brought that up before 🤔

frosty dock
#

i don't see you using SMODS.ConsumableType here but I assume you also have that set up?

fallen tendon
#

oh god i need ot redo the art lol

frosty dock
#

extending SMODS.Consumable is at most for convenience

frosty dock
#

ok good

fallen tendon
#

mainly the multi-use system

frosty dock
#

multi-use is actually properly supported by smods now (this is what i was trying to say above when i misunderstood the question)

thick panther
#

How do I delay the add_joker to when the return message shows up? Currently, it adds the joker right when a hand is played:

if context.joker_main then
            
            -- Copy joker
            add_joker('j_JG_hydra', 'negative', true, true)

            return {
                message = 'Hydra created',
                colour = G.C.FILTER,
                card = card,
                chips_mod = card.ability.extra.addAmnt,
                mult_mod = card.ability.extra.addAmnt,
            }

        end
fallen tendon
#

oh btw, is there a way to put a calculate funciton into a class, and then add to that calculate function in objects created from it?

fallen tendon
#

how?

frosty dock
#

define a new calculate function on the object and call Class.calculate(self, card, context) inside

fallen tendon
#

ok

#

makes sense

tepid crow
#

was that ever fixed? 🤔

frosty dock
#

i don't remember that, but the code (at least in game_object.lua) for stakes was last modified in september

#

unless I'm misunderstanding the issue though, it's not set to not do prefixes somewhere-?

tepid crow
#

I'll quickly try to create a small example

autumn coral
#

is there an easy way to access all of the registered global sounds for my mod?

#

actually nvm i like what i have

frosty dock
#

oh nvm i see what that is

#

the way above_stake tries to get the stake it needs is weird

#

your solution actually prevented the mod prefix from being applied because it already existed, so that part does nothing. only prefixing above_stake was ever needed

#

there's probably a better solution to that

wintry solar
#

I think I made it not prefix it so you can put it above other mod's stakes

#

but we can probably add an extra flag in there for that situaton right?

frosty dock
#

nothing prefix_config can't solve

tepid crow
#

should probably be done using prefix_config yeah

frosty dock
#

also gonna failsafe the crash by making sure the stake actually exists

tepid crow
#

understandable errors are always nice

fallen tendon
#

yay i love bringing back all my balatro modding rage

#

testing your changes, only to realize you never hit save

autumn coral
#

real

fallen tendon
#

also anytime you make changes having to fix 7 different syntax errors

frosty dock
#

it has the same behavior of just adding the class prefix

tepid crow
#

uhhh hold on

frosty dock
#

also throw prefix_config on it?

tepid crow
#

oh same issue as above_stake?

#

yeah same solution

wintry solar
#

yeah

tepid crow
#

something something consistency

frosty dock
#

yep, it's another change of default behavior, but better to do it now than never

#

this is why we should have done more docs much sooner, this wouldn't go unnoticed as much

tepid crow
thick panther
#

Is there a way to retrigger each played card x amount of times? Basically blueprint, but greater than 1 time.

rough furnace
#

did you document deck skins btw?

#

noticed earlier they had no docs

fallen tendon
tepid crow
fallen tendon
#

unless manipulating values that are direct entries in the joker table is somehow forbidden

#

because said values are not going down

#

at all

tepid crow
fallen tendon
#

ok

tepid crow
#

use . instead

#

or self:

frosty dock
thick panther
fallen tendon
#

looks like its both the former and the latter

frosty dock
fallen tendon
#

sorry

#

my brain isnt working too well

frosty dock
#

you can have a config var in extra to be sure, or safeguard with or 0

tepid crow
edgy reef
#

btw Aure you nuked a smidge too much, adding this patch back should fix negative dollars missing from the cashout

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "local r = {n=G.UIT.T, config={text = localize('$'), colour = G.C.MONEY, scale = ((num_dollars > 20 and 0.28) or (num_dollars > 9 and 0.43) or 0.58), shadow = true, hover = true, can_collide = false, juice = true}}"
position = "at"
payload = '''
local r
if i == 1 and num_dollars < 0 then
    r = {n=G.UIT.T, config={text = '-', colour = G.C.RED, scale = ((num_dollars < -20 and 0.28) or (num_dollars < -9 and 0.43) or 0.58), shadow = true, hover = true, can_collide = false, juice = true}}
    play_sound('coin3', 0.9+0.2*math.random(), 0.7 - (num_dollars < -20 and 0.2 or 0))
else
    if num_dollars < 0 then r = {n=G.UIT.T, config={text = localize('$'), colour = G.C.RED, scale = ((num_dollars > 20 and 0.28) or (num_dollars > 9 and 0.43) or 0.58), shadow = true, hover = true, can_collide = false, juice = true}}
    else r = {n=G.UIT.T, config={text = localize('$'), colour = G.C.MONEY, scale = ((num_dollars > 20 and 0.28) or (num_dollars > 9 and 0.43) or 0.58), shadow = true, hover = true, can_collide = false, juice = true}} end
end'''
match_indent = true
fallen tendon
#

well thats fun

#

offending line

fallen tendon
#

and my config

frosty dock
frosty dock
fallen tendon
#

also omg galdur really should just be base steamodded

#

i cannot beleive i have lived without it for so long

#

decks and stakes are so effortless

frosty dock
#

uh now you removed both self and :

#

you need SMODS.Gear.use(self, card, area, copier)

tepid crow
#

oop

frosty dock
#

speaking of galdur, these stake changes might break it a little bit

fallen tendon
#

sad

tepid crow
#

really?

fallen tendon
#

YES IT WORKS

#

thanks so much!!!!

wintry solar
#

I don't think they should do

frosty dock
#

there's some places where it uses applied_stakes being prefixed the way it currently is

wintry solar
#

oh

#

I'll take a look

frosty dock
#

lines 410, 663, 994 in galdur.lua, that looks to be all though

wintry solar
#

it might break the save stickers though

frosty dock
#

the actual keys don't change

#

they're just stored with all prefixes

wintry solar
#

oh true

#

aure your line numbers are outdated D:

#

but I can see where you mean

frosty dock
#

too bad so sad

#

i should update galdur

thick panther
#

Can you have multiple returns for a Joker in different contexts?

frosty dock
#

anyways there's actually 3 different prefix_config options just for stakes now

#

should there be some umbrella option that covers as a default for all of them?

thick panther
#

Like a return in context.repetition and one in context.joker_main?

rough furnace
wintry solar
#

is there a reason you would want to use one but not the others?

tepid crow
wintry solar
#

it might be the memory leak fix too

frosty dock
wintry solar
#

cool

#

I suppose I should probably update it to a json manifest too

frosty dock
#

you might have one of these

#

not sure how useful a unified default option gets in the general case tbh

autumn coral
#

how do i get my config to actually, like, save

#

😭

#

i have it working but i can't figure out how to make it save the values

#

it just reverts when i open it again

tepid crow
#

are you looking at the right location btw?

autumn coral
frosty dock
#

oh not that config

autumn coral
#

whar

frosty dock
#

don't mind me

autumn coral
#

oh nw

#

this ui shit is a HEADACHE

#

tbh this is at the bottom of my list of shit i'm focusing on rn with this mod

#

god speaking of which i should start an actual github repo

frosty dock
#

usually this works fine for saving once you exit the mods page, given you're writing to your mod's config table

frosty dock
autumn coral
#

i tried that

#

the first thing u said

#

anyway i'm fuggin hungry

#

not that like. anyone asked

wintry solar
#

how are you referencing your config file?

tepid crow
autumn coral
#

um

autumn coral
#

i based it on cryptid tbh

wooden nexus
autumn coral
#

is it not just. a config.lua file

#

or am i stupid?

frosty dock
mellow sable
#

ok

autumn coral
#

i call Wrenbind_config = SMODS.current_mod.config at the top of the file

frosty dock
#

though not majorly i don't think. it shouldn't try to double prefix applied stakes

wintry solar
#

it doesn't seem to break galdur

frosty dock
#

not surprised if it only breaks pink stake

autumn coral
#

i'm not saying it's impossible i fucked it up i just dunno what i did wrong? i have ref table and ref value

frosty dock
#

and the rest of the stakes are fine once that's changed

wintry solar
#

let me try with cryptid stakes

autumn coral
#

is the config ref_table not just the config itself?

#

or should it be the key?

#

like this is my config file ```
return {
["IsaacSaveFileNum"] = 1,
["IsaacVersion"] = "Repentance+"
}

wintry solar
#

ref_table should be Wrenbind_config assuming you don't nest tables

autumn coral
#

i didn't

#

i don't know why this isn't working

wintry solar
#

it could be because you aren't using the config tab

autumn coral
#

OH WAIT

#

i figured it out i think

fallen tendon
#

is there a better way to identify a card's enhancement than ability.name?

wintry solar
frosty dock
#

card.config.center_key

autumn coral
#

nope nvm

fallen tendon
#

and tthats just the m_key variety?

sonic bone
#

hey gamers, im very new to this so bear with me but is there a way to read the total chips and mult (before jokers) of the played hand inside the calculate function of a joker?

autumn coral
#
{
                    n=G.UIT.ROOT, config={align = "cm", padding = 0.05, colour = G.C.CLEAR}, 
                    nodes={
                        create_option_cycle({
                            label="Choose Your Isaac Save File",
                            min=1, 
                            max=3, 
                            ref_table=Wrenbind_config, 
                            ref_value="IsaacSaveFileNum", 
                            options={1,2,3}
                        }),
                        create_option_cycle({
                            label="Which Version Are You Playing?", 
                            min=1,
                            max=3, 
                            ref_table=Wrenbind_config, 
                            ref_value="IsaacVersion", 
                            options={
                                "Repentance+",
                                "Repentance",
                                "Afterbirth+",
                                "Afterbirth",
                                "Rebirth"
                            }
                        })
                    }
                }
wintry solar
#

oh no it does break galdur

autumn coral
#

wait

#

actually

#

huh

hidden timber
#

current state of the Balatro Mod Manager. Not many changes to see, but a lot of backend-work (stable functionality) was done.

autumn coral
#

no it still doesn't work even without the min and max

#

so confused

fallen tendon
autumn coral
#

ok whatever i'

#

i'm moving onto other things

#

lol

fallen tendon
#

i end up being turned away from stuff like dimserene's modpack because i dont know where i can put my current modlist

fallen tendon
#

great!!!!!

#

also is there a windows verison

hidden timber
fallen tendon
#

great

tepid crow
autumn coral
#

yeah

#

wait

#

oh

#

i'm using extra_tabs

#

hol up

tepid crow
#

use the config_tab

#

(cryptid probably does it differently because they want a fancy name for their tab)

tepid crow
sonic bone
#

is that inside context?

exotic hedge
#

Does anyone here know how to make a paper texture :>
(This isn't just blueprint to the left if you're wondering)

autumn coral
#

i'm getting "attempt to index field color (a nil value)" for some reason

#
local wrenbindTabs = function() return {
    {
        label = "Isaac Settings",
        chosen = true,
        tab_definition_function = function()
            return {
                n=G.UIT.ROOT, config={align = "cm", padding = 0.05, colour = G.C.CLEAR}, 
                nodes={
                    create_option_cycle({
                        label="Which Version Are You Playing?", 
                        ref_table=Wrenbind_config, 
                        ref_value="IsaacVersion", 
                        options={
                            "Repentance+",
                            "Repentance",
                            "Afterbirth+",
                            "Afterbirth",
                            "Rebirth"
                        }
                    }),
                    create_option_cycle({
                        label="Choose Your Isaac Save File",
                        ref_table=Wrenbind_config, 
                        ref_value="IsaacSaveFileNum", 
                        options={1,2,3}
                    }),
                }
            }
        end,
    }
} end

SMODS.current_mod.config_tab = wrenbindTabs
#

is this not right?

tepid crow
sonic bone
#

really?

#

ok ill try it

tepid crow
fallen tendon
#

revamped all the card enhancing gears, and made slingshot one of them because oh my god slingshot was just annoying and uninspired and also really really bad

autumn coral
#

just use that u mean?

tepid crow
#

yeah

autumn coral
#

oh i see it

tepid crow
autumn coral
#

i think i got it

#

it still isn't saving

#

😭

arctic lion
#

hmm i've just completed my config implementation and it just ✨ worked ✨

#

granted mine were only bool values but should be the same concept

autumn coral
#

🤷‍♀️

#

is this not. exactly this?

SMODS.current_mod.config_tab = function()
    return {
        n=G.UIT.ROOT, config={align = "cm", padding = 0.05, colour = G.C.CLEAR}, 
        nodes={
            create_option_cycle({
                label="Which Version Are You Playing?", 
                ref_table=Wrenbind_config, 
                ref_value="IsaacVersion", 
                options={
                    "Repentance+",
                    "Repentance",
                    "Afterbirth+",
                    "Afterbirth",
                    "Rebirth"
                }
            }),
            create_option_cycle({
                label="Choose Your Isaac Save File",
                ref_table=Wrenbind_config, 
                ref_value="IsaacSaveFileNum", 
                options={1,2,3}
            }),
        }
    }
end
#

did i fuck up somewhere or am i going insane

wintry solar
#

how are you checking if it saved

elder vapor
#

don't you need to save it in a different func

autumn coral
#

what

#

😭

wintry solar
#

you don't need a different function

autumn coral
#

i am checking if it saved by going from config to additions and then back

arctic lion
#
epicbossmusic = SMODS.current_mod
epicbossmusic.config_tab = function()
    return {n = G.UIT.ROOT, config = {r = 0.1, align = "cm", padding = 0.1, colour = G.C.BLACK, minw = 7, minh = 2}, nodes = {
        {n = G.UIT.R, config = {align = "cl", padding = 0}, nodes = {
            {n = G.UIT.C, config = { align = "cl", padding = 0.05 }, nodes = {
                create_toggle{ col = true, label = "", scale = 0.85, w = 0, shadow = true, ref_table = epicbossmusic.config, ref_value = "boss_regular_enabled" },
            }},
            {n = G.UIT.C, config = { align = "c", padding = 0 }, nodes = {
                { n = G.UIT.T, config = { text = "Regular Boss Music", scale = 0.5, colour = G.C.UI.TEXT_LIGHT }},
            }},
        }},
}}
end
autumn coral
#

and it reverts back

arctic lion
#

mine's mostly UI guff

autumn coral
wintry solar
#

you have to press the back button to save it

autumn coral
#

it still doesn't work

#

on either of them

arctic lion
#

is your ref_table and ref_value is correct it should store it

autumn coral
#

yes

tepid crow
#

doesn't create_option_cycle need a callback to store it's result

wintry solar
#

oh yes that's probably it

autumn coral
#

finally, an answer that isn't "do you know how to program or are you making shit up"

#

speaking of, what would i even do for that

#

ig i could just reference the game code

wintry solar
#
G.FUNCS.cycle_update = function(args)
    args = args or {}
    if args.cycle_config and args.cycle_config.ref_table and args.cycle_config.ref_value then
        args.cycle_config.ref_table[args.cycle_config.ref_value] = args.to_key
    end
end
autumn coral
#

oh

tepid crow