#đŸ’»ăƒ»modding-dev

1 messages · Page 49 of 1

rough furnace
#

hell yeah

crisp coral
#

this is a fucking mess

#

IT WORKS

#

AJHETKAHBAWBTAW

#

THIS IS SO FUCKING STUPID

edgy reef
#

YEEEEEEES

wild gyro
#

this was a good idea

crisp coral
#

wait what if i remove isaac.states.drag.can = false

#

aw you can't drag him

#

no way the balatro cursor is trans

wild gyro
#

real

crisp coral
#

okay so i can hold him and he will be bigger

#

but he can't be moved

#

hm

#

perfect

unkempt thicket
#

how would one go about adding a new object type like editions, enhancements, and seals? (that's not a consumable)

crisp coral
#

SMODS.Edition, SMODS.Enhancement, SMODS.Seal

#

all three of them are present in Cryptid if you want to steal from it

wild gyro
#

isnt it about a new type of those though

crisp coral
#

o

#

extend SMODS.Center

unkempt thicket
crisp coral
#

wait let me pull specialist music

hallow forge
crisp coral
#

specialist plays when you drag isaac now

rough furnace
#

next I just need to add cursor placement and then it's a real command line

mellow sable
#

testing for mod compat be like

limpid flint
#

What is that?

restive osprey
#

Wrong channel whoops

sand rune
#

If the UI is rendering every frame that solves one problem. Next one, for the joker area do you know by chance what is used to display max joker, i thought it was G.jokers.config.card_limit but modifying that doesn’t seem to change the max value

mellow sable
#

Basically if you have mods installed you can use it to see if they were tampered with for a replay

wintry solar
#

I think we might want to change how stickers are drawn on a card, there’s a very limited number of positions and I think having them be positioned according to the code might be better

fringe hamlet
#

there's no need to display all the information on the left side, the blank space on the right side of the Joker should be utilized

#

It's not difficult to add new content with SMODS.Sticker now. Considering there may be an increasing number of stickers in the future, it might be a good idea to have a centralized information button floating on the edge of the card

wintry solar
#

I mean the actual images

#

Tooltips are fine, we can just make them display in a grid instead of a column eventually

fringe hamlet
#

OK

frosty dock
#

the current sticker sprites are card-sized

wintry solar
#

Yeah make them more like tag sized would be best I think. I was imagining the column down the left of the card with 4 slots and then when you have more than four they continue to be placed at the bottom but adjust to still fit on the card but overlapping

frosty dock
#

there could eventually be more then one column if we don't want them to become as indistinguishable

wintry solar
#

Yeah that sounds good

frosty dock
#

Also tag sized is probably too large, 3 tags don't fit a card's height without overlap

wintry solar
#

Whatever size standard stickers are then

fringe hamlet
#

How to solve the problem of having too many badges?

wintry solar
#

It’ll be 22x22 ish?

wintry solar
frosty dock
#

I tried a solution with scrolling before, but I wasn't able to get it to be dynamic

#

columns should be better

narrow pollen
zealous glen
#

@errant sand look

zealous glen
zealous glen
zealous glen
errant sand
#

There's 2 as?!?

crisp coral
#

it's isaac...

zealous glen
#

Isaac and his Issac lived alone in a small Issaac on a Isac

errant sand
#

Damn, I'm too dyslexic

night pagoda
#

wtf is happening, I have shuffling code whenever I try to inject???????

frosty dock
#

huh

#

that should not be happening

night pagoda
#

yeah I'm going insane!

#

something fishy is happening

crisp coral
#

what the fuck

#

where did that come from wuh

night pagoda
#

that "end" gets teleported from the other place for some reason

#

lovely possessed by amber acorn

#

??????????????????? (made the injection into one line without spaces)

frosty dock
#

something something before patches

night pagoda
#

yeah but removing only this patch completely unshuffles it

night pagoda
languid mirage
wild gyro
#

fast

wintry solar
#

I wonder if the smods patch is conflicting with it and causing some shenanigans

sand rune
#

is there a nice way to hook into Game:start_run

zealous glen
#

Everyone say "Thanks Myst"

zealous glen
sand rune
#

Unless there may be a better way you reckon?

zealous glen
#

Idk about the deck but I set my mod's global variables in

#

init_game_object

sand rune
#

ooh hang on didnt know that existed

#

and how did you override that? when i try

local init_game_object_ref = Game:init_game_object

it complains or do I override differently (new to Lua sadly)

hallow forge
#

do Game.init_game_object

zealous glen
hallow forge
#

then pass self as the first argument

sand rune
#

.... oh maaaah gawd

#

ima go dig a hole and die of embaressment ty

zealous glen
#

Sometimes I try to hook and I fail because I do local obj_ref = Class:obj instead

#

or whatever

sand rune
#

right so we can use the Class.method but when we use the Class:method override it needs self to be passed into the ref before original args

zealous glen
zealous glen
sand rune
zealous glen
#

I didn't look into it

sand rune
#

😼

zealous glen
#

I just looked directly at other mods lol

sand rune
#

ah see thats where I went wrong.. apparently I like pain and hitting myself with bricks >_>

hallow forge
#

it's still a good idea to know lua first

sand rune
#

also

#

for the joker cap; that would b G.jokers.config.card_limit right?

odd sinew
#

how do i make mods for the game?

frosty dock
#

Mind Useful resources at the bottom of the page, too

wooden nexus
shell tangle
zealous glen
sand rune
wintry solar
#

what function did you throw it in?

sand rune
#

it was in ease_dollars so i made a func to recalc and assign accordingly

mellow sable
#

steamodded

sand rune
wintry solar
#

no don't do that

sand rune
#

i never said it was a good idea.. just that it is in an idea.. totally not what I did for v.0.1 of my mod

brisk pond
#

Still struggling with the first part

#

how do you give the player the ability to choose something?

limpid flint
#

Round start, Display all legendary jokers in the center of screen and prompt player to choose one?

mellow sable
#

the way cryptid implemented something like this was having you type it in

#

but that also made more sense with the theme of the consumable, showing the legendaries in a collection view and clicking would be better probably

brisk pond
#

ok maybe this will work:

  1. Start of blind
  2. Trickster starts juicing up
  3. Pop Up appears where all legendary jokers are shown
  4. When you click on one, the Pop Up disappears
  5. Trickster takes that form and stops juicing up
tepid crow
#

I have an idea about some type of effect that prevents face cards from showing up

is there a good way to check whether a card is an actual face card?
card.base.value == 'Jack' or card.base.value == 'Queen' or card.base.value == 'King' isn't very mod-compatible
and card:is_face will always get ruined by Pareidolia and other mod "all facecards" jokers

brisk pond
#

card.rank > 10 and card.rank < 14?

tepid crow
#

that's... not bad actually

#

we're still assuming all mods put their face card ranks in that range

brisk pond
#

ok then card.rank > 10 and not card.rank == 14

#

so aces are ignored and every card higher than 10 is good

#

then it depends on what you want to do with the cards

hallow forge
#

just check how is_face does it while paredolia isn't owned

brisk pond
tepid crow
brisk pond
#

if you are trying to think of all the possible mods, then you won't make yours

tepid crow
#

hah ain't that the truth

brisk pond
#

just do it the most natural way and you're good

tepid crow
brisk pond
tepid crow
#

something something "best effort" guarantees

tepid crow
brisk pond
#

the idea is this

tepid crow
#

I feel like you probably want some config.aligns?

#

idk I'm def no balatro UI expert

crisp coral
#

just use an object node and add a cardarea?

#

i don't see why you need five object nodes

brisk pond
#

because I need 5 buttons and with this solution all the buttons are aligned with the cards

hallow forge
#

You could just have a card area where you can select any one of the shown cards

brisk pond
#

i don't think you can put a cardarea inside a button

tepid crow
#

you could have a cardarea with a max select of 1, and a submit button below it?

#

and the submit button just finds the selected card

brisk pond
#

Everything has a colour!

edgy reef
#

Incorrect depth most likely.

hallow forge
edgy reef
#

UIBox_button is inside a table when it shouldn’t be probably.

crisp coral
#

i don't use UIBox_button actually lol

brisk pond
brisk pond
#

I never used it before

crisp coral
#

i absolutely dont lol

#

relevant code

brisk pond
#

so you put button in the config of a node?

brisk pond
brisk pond
#

"Columns are for nodes arranged vertically"

crisp coral
glass scaffold
#

Is there any documentation on how to make a joker from scratch?

brisk pond
#

a lot actually

glass scaffold
#

Oh cool

#

where?

brisk pond
#

or just check Steamodded's Wiki

glass scaffold
#

btw can standalone .lua files be in the mods folder or do they all need to be in 1 folder?

brisk pond
#

if the mod is only one .lua file it can be in the 'Mods' folder

glass scaffold
#

Ah got it

brisk pond
#

gonna be Hover + left/right arrows

frosty dock
#

you won't be able to disable any such mods individually

lament fjord
#

What was the alternative you tried there?

frosty dock
wintry solar
bleak rain
#

How does the new localization work for Vouchers?

zealous glen
zealous glen
zealous glen
brisk pond
#

it doesn't in any way create a column

wintry solar
wintry solar
brisk pond
#

also, I would need to add a sprite for every modded legendary...?

tepid crow
# zealous glen `is_face` IIRC

Would break even during the base game once pareidolia shows up, which is why others were suggesting to do the id check

crisp coral
#

it'd be better to use a row node there

#

not a column node

zealous glen
#

IIRC there is a vanilla function to check if a card is a face card, which is how Pareidolia does it

zealous glen
#

Search box only needs to account for one card at a time

crisp coral
#

card.base.face_nominal?

tepid crow
#

I think aces also populate that space for some unknown reason

crisp coral
#

oh

#

SMODS.Ranks[card.base.value].face

zealous glen
#

Wrong

tepid crow
#

Oh that one might be interesting? I havent looked at smods support for ranks yet

zealous glen
brisk pond
zealous glen
#

This is how the vanilla game does it

#

is_face, as I said

crisp coral
#

this one also checks for parei

#

and the actual is_face function is modified by smods

function Card:is_face(from_boss)
    if self.debuff and not from_boss then return end
    local id = self:get_id()
    local rank = SMODS.Ranks[self.base.value]
    if not id then return end
    if (id > 0 and rank.face) or next(find_joker("Pareidolia")) then
        return true
    end
end
tepid crow
# zealous glen

That's just gonna break the second the player buys pareidolia

#

I'd like to replace a face card with another random card

zealous glen
#

Ah I see

tepid crow
#

I mean, I could also nuke all face cards, and it probably would be funny

#

But I'm not sure that's very fun to play with lol

brisk pond
#

it crashes while starting the game

tepid crow
#

You're missing a =

#

Inner node's config.colour

brisk pond
#

thanks

#

the good part is that it doesn't crash

wintry solar
#

Put the object in its own row node

brisk pond
#

still having problems with the cardarea

#

maybe the one I copied wrote has only space for 1 joker

wintry solar
#

Can I see the card area definition?

#

Oh it’s in that file earlier

brisk pond
#
local function createCardArea()
    G.Trick_CardArea = CardArea(G.ROOM.T.x + G.ROOM.T.w / 2, G.ROOM.T.h, 5.09 * G.CARD_W, 1.03 * G.CARD_H, {card_limit = 5, type = 'title', highlight_limit = 1})
    local center = G.P_CENTERS['j_caino']
    local card = Card(G.Trick_CardArea.T.x + G.Trick_CardArea.T.w / 2, G.Trick_CardArea.T.y, G.CARD_W, G.CARD_H, nil, center)
    G.Trick_CardArea:emplace(card)
    center = G.P_CENTERS['j_triboulet']
    card = Card(G.Trick_CardArea.T.x + G.Trick_CardArea.T.w / 2, G.Trick_CardArea.T.y, G.CARD_W, G.CARD_H, nil, center)
    G.Trick_CardArea:emplace(card)
    center = G.P_CENTERS['j_yorick']
    card = Card(G.Trick_CardArea.T.x + G.Trick_CardArea.T.w / 2, G.Trick_CardArea.T.y, G.CARD_W, G.CARD_H, nil, center)
    G.Trick_CardArea:emplace(card)
    center = G.P_CENTERS['j_chicot']
    card = Card(G.Trick_CardArea.T.x + G.Trick_CardArea.T.w / 2, G.Trick_CardArea.T.y, G.CARD_W, G.CARD_H, nil, center)
    G.Trick_CardArea:emplace(card)
    center = G.P_CENTERS['j_perkeo']
    card = Card(G.Trick_CardArea.T.x + G.Trick_CardArea.T.w / 2, G.Trick_CardArea.T.y, G.CARD_W, G.CARD_H, nil, center)
    G.Trick_CardArea:emplace(card)
end
wintry solar
#

Change the 1.03*G.G_CARD_W to 5.09

brisk pond
#

changed it to 12 and it is good

#

but I can't highlight the cards

wintry solar
#

No don’t fix it

#

Just change the number in the multiplication

#

So it respects the card size

brisk pond
#

ohh ok

brisk pond
hallow forge
#

is the highlight_limit 1

brisk pond
#

yeah

hallow forge
#

why's the type title?

surreal marsh
#

add something like this maybe

brisk pond
hallow forge
#

is that cardarea highlightable?

brisk pond
#

i don't think

#

which one is?

wintry solar
#

you can set the type to joker

brisk pond
#

the game one features the buttons "sell" and "use"?

wintry solar
#

or maybe hand

brisk pond
#

which cardarea is the collection?

crisp coral
wintry solar
#

collection card areas are created on demand

brisk pond
crisp coral
#

why is it in mod config anyway

#

that's incredibly annoying when switching jokers

hallow forge
#

probs for testing

brisk pond
#

i fucking hate ui

crisp coral
#

mood

hallow forge
wintry solar
#

wrong

#

ui is life

#

❀

brisk pond
regal wolf
#

the ui engine isnt actually that bad once you figure it out

#

but it has a steep learning curve, bc its a custom engine

#

but once you get it, you get it

brisk pond
#

you have to figure it out

wintry solar
#

well what's your current problem?

brisk pond
crisp coral
surreal marsh
zealous glen
surreal marsh
wintry solar
#

what type is it set as?

crisp coral
brisk pond
wintry solar
#

err

#

try it during a game

#

highlighting jokers requires G.jokers to exist

zealous glen
zealous glen
zealous glen
crisp coral
#

the fuck did i do lmao

wintry solar
#

or at least highlighting a joker in a joker type cardarea does

zealous glen
crisp coral
#

oh ok

zealous glen
wintry solar
#

I've graduated from shader school

#

I am a ui scholar now

brisk pond
zealous glen
zealous glen
brisk pond
surreal marsh
# surreal marsh

inject into it and return nil if card.area is your area đŸ€”

hallow forge
#

have you considered simply adding an exception to the code that adds the buttons

brisk pond
#

it broke with the last G.UIT.C i wrote

regal wolf
#

whats the problem

brisk pond
crisp coral
#

then don't have the area config type be jokers?

wintry solar
#
local card_highlight_ref = Card.highlight
function Card:highlight(is_highlighted)
    if self.area and self.area.config.type == "cerlo" then
        self.highlighted = is_highlighted
    else
        card_highlight_ref(self, is_highlighted)
    end
end
local can_highlight_ref = CardArea.can_highlight
function CardArea:can_highlight(card)
    if self.config.type == 'cerlo' then
        return true
    end
    return can_highlight_ref(self, card)
end
#

change your cardarea type to cerlo

#

I think this works

brisk pond
#

wooooo i got my own cardarea

wintry solar
#

it might not do

#

but I think it should

#

Myst, does the mod index git pages tend to link to releases or main branch?

crisp coral
#

main branch, or file in source code if it's something like betmma's

brisk pond
wintry solar
#

hmmm

#

replace the cerlo's with title

#

I don't know why it won't draw the cards

#

oh wait

#

yes I do

brisk pond
wintry solar
#
local card_area_draw_ref = CardArea.draw
function CardArea:draw()
    card_area_draw_ref(self)
    if self.config.type == "cerlo" then
        for k, v in ipairs(self.ARGS.draw_layers) do
            for i = 1, #self.cards do 
                if self.cards[i] ~= G.CONTROLLER.focused.target then
                    if not self.cards[i].highlighted then
                        if G.CONTROLLER.dragging.target ~= self.cards[i] then self.cards[i]:draw(v) end
                    end
                end
            end
            for i = 1, #self.cards do  
                if self.cards[i] ~= G.CONTROLLER.focused.target then
                    if self.cards[i].highlighted then
                        if G.CONTROLLER.dragging.target ~= self.cards[i] then self.cards[i]:draw(v) end
                    end
                end
            end
        end
    end
end```
#

this should draw the cards

regal wolf
#

just create some columns

wintry solar
#

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

regal wolf
#

G.UIT.C

#

use the same code that thunk uses to place the card on the main menu

#

and place them inside the columns with some padding

#

you can adjust the size, the scale, etc.

wintry solar
#

that's not the problem

regal wolf
#

whats the problem?

#

perkeo seems to be in the wrong place no?

brisk pond
regal wolf
#

what is the problem you have

brisk pond
#

@wintry solar I put 'title' and erased the CardArea:draw and it works

wintry solar
#

yeah I thought it might

#

there'll be some other parts of card area that populates things for draw that are being skipped by using a custom type

brisk pond
#

but now it might create errors with other CardArea title?

lament fjord
wintry solar
#

I think you'll be able to highlight in the collection now iirc

lament fjord
#

And did you try passing in a decoder over the file data and using that for the source?

zealous glen
crisp coral
#

I AM IN A MIDDLE OF SOMETHING ELSE

#

you don't need all the qol on one specific card, the deck view qol is there because it's used for the whole game

zealous glen
#

It’s the other way around

#

The card shouldn’t work in a specific way because the QOL isn’t there

#

You don’t add QOL for a specific card

#

You change how the specific effect works

#

Thunk has expressed a similar opinion

#

Also Marvel Snap operates on similar principles

crisp coral
#

also the entire time until you specified i thought the you were talking about the card itself, not when the blind from the card is active

#

whatever

zealous glen
#

As I said I didn’t foresee people having that interpretation

hallow forge
#

how is this argument productive?

zealous glen
#

Since most of the time you’d use it immediately, and you wouldn’t use it during another Blind or anything

hallow forge
#

the misunderstanding was already figured out

zealous glen
#

I was just curious about her opinion since she replied to my comment about hard platformers

#

Since it’s an expression of more general design principles

brisk pond
#

Now the problem is passing the value to The Trickster

G.FUNCS.Trick_Select = function()
    if G.Trick_CardArea.highlighted[1] then
        local selected = G.Trick_CardArea.highlighted[1].config.center.original_key
    end
end
zealous glen
#

The game giving the player the time to plan their decisions isn’t an argument for obscuring information

#

Well, not obscuring

brisk pond
zealous glen
#

Just maintaining it hidden inside a couple of menus

brisk pond
#

and making it go away after i select

zealous glen
brisk pond
#

ok

frosty dock
lament fjord
#

Do you happen to have the code from your experiment? I want to try

brisk pond
#

is there a wait_until() function?

crisp coral
#

there's juice_card_until

zealous glen
#

A trick I’ve made is to create an event that either executes a function or creates a copy of itself

brisk pond
#

it prints nil

crisp coral
#

yea that's basically what juice_card_until does

zealous glen
#

I see

brisk pond
#

and it prints right after creating the UIBox

#

i'm testing a solution

#

my solution was a failure

#

i'm invoking your help

#

@fallen tendon

#

@wintry solar

#

@zealous glen

wintry solar
#

I have been summoned

brisk pond
#

it prints 'nil' without waiting for the Popup to go away

wintry solar
#

did you try what victin suggested with the events?

brisk pond
#

yeah and it blocks the game

#

it freezes

zealous glen
brisk pond
#

can you show me?

wintry solar
#

can it return G.GAME.Trickster?

#

that should be true once it's set

zealous glen
#

No

#

Just always return true

#

Unless it’s an ease event

wintry solar
#

I mean if they want to stop other things happening until a choice has been made

zealous glen
#

Otherwise the EventManager doesn’t know the event is finished

#

And it freezes the game

zealous glen
wintry solar
#

I thought if it didn't return true it just did the event again

zealous glen
#

Idk. I only see people who make it return nil by not including a return

#

So it freezes

brisk pond
#

I tried this too and it just freezes

#

without creating the UI

wintry solar
#

does it create it outside of the event?

brisk pond
#

yes

#

wait here

#

I send you the mod

wintry solar
#

try doing that and return G.GAME.Trickster as the only thing in the event

brisk pond
wintry solar
#

will take a look

brisk pond
#

Trickster.lua, line 105 to 113

lament fjord
wintry solar
brisk pond
#

check if you have multiple Tricksters

zealous glen
#

The menu is a bit invasive but cool

wintry solar
#

multiple doesn't workl

brisk pond
wintry solar
#

I should be able to make it stop the game

brisk pond
#

thank you eremel we love you

#

❀

zealous glen
#

There is stop_use

#

And whatever the pause menu does

brisk pond
#

I'm taking a 5 minute break to restore some braincells

fallen tendon
#

Thats what i used for variable and it keeps the game running but you cant interact with it

#

If you want the game to stop you can turn it into an overlay

wintry solar
#

just cleaning some stuff up and getting multiple to work

#

do you want them to have independent selections?

brisk pond
#

yeah

wintry solar
crisp coral
#

swag

wintry solar
#

so am I right in thinking this is effectively all 5 legendaries in one in terms of effects and you just choose which to apply per blind with this voucher?

brisk pond
#

yep

wintry solar
#

just going to try one more thing

brisk pond
#

you have total freedom

wintry solar
brisk pond
wintry solar
#

it should track the tooltips correctly this way

maiden phoenix
#

If you keep the same legendary, does the stats gained stays inbetween transformations?

#

Or like if you pick x, change to y and change back to x

wintry solar
#

it gains stats for all forms at all times

maiden phoenix
#

Oh wow so if I grind Yorick for example and switch to another legendary with XMult it keeps it?

wintry solar
#

yeah, and then when you switch back it will be as if you had never switched

maiden phoenix
#

Neat

brisk pond
wintry solar
#

yeah just adding a couple of notifications

#

hmmm

#

not sure on the ! for discards

#

it's nice to know it's having an effect though

brisk pond
#

i think it is better without notifications

#

because you have no way of knowing which legendary it applies

#

please leave it as it is @wintry solar

wintry solar
#

the messages are still in, see how you find them but they're easily removed

#

I think they'd be useful

#

it's not intuitive that the counters continue progressing when that joker isn't chosen

#

I did speed up the discard one

hallow forge
#

I was trying to make some planet cards but when i hovered over them, i received this error. anyone recognize it or know how to fix it?
functions/misc_functions.lua:1918: attempt to index field 'colours' (a nil value)

zealous glen
#

Try seeing what is calling .colours

#

It might be an UI error since I had something similar, but I think it was colour

hallow forge
#
colour = part.control.V and args.vars.colours[tonumber(part.control.V)] or loc_colour(part.control.C or nil, args.default_col),

the line in question

wintry solar
#

what function is it in?

zealous glen
#

Yeah it’s a UI issue

hallow forge
#

localize

zealous glen
#

What’s your localization

#

For this card

hallow forge
#

like the loc_txt?

wintry solar
#

yeah

zealous glen
#

yes

#

I just use a single localization file now

hallow forge
#
SMODS.Planet {
    key = 'tetra',
    name = "Tetra",
    loc_txt = {
        name = "Tetra",
        text = {
            "{S:0.8}({S:0.8,V:1}lvl.#1#{S:0.8}){} Level up",
            "{C:attention}#2#",
            "{C:mult}+#3#{} Mult and",
            "{C:chips}+#4#{} chips"
        }
    },
    config = {hand_type = 'h_bj_natural'},
    atlas = "planets",
    pos = {x = 0, y = 0},
    loc_vars = function(self, info_queue, card)
        local hand = self.config.hand_type
        return { vars = {G.GAME.hands[hand].level,localize(hand, 'poker_hands'), G.GAME.hands[hand].l_mult, G.GAME.hands[hand].l_chips} }
    end,
}
wintry solar
#

define colours in your loc_vars

hallow forge
#

k

zealous glen
#

I haven’t made a Planet

wintry solar
#

colours is what V: looks at

#

I assume default planets have a colours argument too

zealous glen
#

Oh

#

Why use V then

wintry solar
#

colours = {(G.GAME.hands[_c.config.hand_type].level==1 and G.C.UI.TEXT_DARK or G.C.HAND_LEVELS[math.min(7, G.GAME.hands[_c.config.hand_type].level)])}

#

because it changes based on level right?

hallow forge
#

yah that worked, ty

zealous glen
#

Because I changed the level colors

#

But I didn’t have to touch any individual Planets

wintry solar
#

planets already have this option sent to them

zealous glen
#

Here

zealous glen
wintry solar
#

a custom planet

#

with its own loc_vars

zealous glen
#

Ah the levels aren’t added automatically

wintry solar
#

you can imagine V in loc_txt as a varying colour, which you define in your loc_vars as colour = {option1, option2}etc.

zealous glen
#

It’s in the localization

wintry solar
#

yes

zealous glen
#

whack

languid mirage
lament fjord
#

uhh... wait why is Steamodded loading the sounds on the main thread, and not delegating that to the sound manager thread

brisk pond
crisp coral
wintry solar
lament fjord
#

gah then

#

Tried merging in the sound changes, lag spike problem still remained. Tried hooking the sound playing and modulation functions to see if I could catch the channel being filled, I couldn't see any channel filling

languid mirage
crisp coral
#

like the MODULATION function in misc_functions?

lament fjord
#

Yeah

crisp coral
#

that's only used if the thread doesn't exist though

crisp coral
wintry solar
#

The game defaults that way

lament fjord
languid mirage
zealous glen
regal wolf
#

guys

#

please help with fixing vanilla game bug

#

bc i have spent the last few hrs trying to find the exact cause of it and I got nothin

languid mirage
#

hm what bug

regal wolf
# languid mirage hm what bug

bug that causes cards bought from shop to be burried under random amount of consumeables from the top when you have a large quantity of consumeables from perkeo

#

it only occurs when cards are bought, it does not occour when cards are generated from emp or pri

lament fjord
#

Hmm why is the waviness of cards not visual-only?

regal wolf
#

wdym

#

also @languid mirage if your working on a better deckviewer saturn already has features like that in development if u want to help with that

languid mirage
#

I'm just working on better settings menu

regal wolf
#

ohhhh

#

mb

languid mirage
lament fjord
#

Also switched back to the luajit that Balatro comes with, why the f does 2.0.5 chug a lot less than 2.1

mellow sable
tepid crow
regal wolf
#

the problem is with align_cards()

#

the card gets emplaced into the correct position, but then after align_Cards() it gets placed 5-8 positions back.

lament fjord
#

For serious play I'm going with 2.0, but I'm determined to get to the bottom of 2.1 performance regressions

regal wolf
#

the issue is that it NEVER happens when using emp or pri

#

its so weird

tepid crow
#

(mb for the reply ping D:)

lament fjord
#

Just had a thought about a workaround for the issue that might also look cool: Adjust consumable spacing so that consumables at the end are spaced out more than those at the beginning

#

Add functionality for the spacing to shift around the mouse location if its near the consumable slots, and youd get a sort of riffling effect

#

@regal wolf

regal wolf
#

I don't think that will solve the bug, but I'll give it a try

lament fjord
#

If it truly is a "move consumable to position" thing, then this should mitigate it at least

languid mirage
#

it's not 100% vanilla

#

but it shouldn't be too hard to adjust it

#

like the only difference is that incantation allows non-negative consumables to stack and take up 1 slot

zealous glen
#

Yeah everyone was like “this could be a great QOL mod” but alas the author didn’t want to make it a QOL mod

regal wolf
#

yeah, maybe.

#

There are ways to work around the issue, for now at least I want to try and fix the bug.

wintry solar
#

sounds like a great cartomancer feature 😉

languid mirage
#

why would I steal someone else's core mod idea 😭

zealous glen
#

I think making it into a QOL is different enough

#

You might opt to reimplement rather than copying or referencing the code

#

But it is a good standalone QOL feature

languid mirage
#

pretty sure jen mentioned adding an option to toggle it being qol at some point

#

I think it's easier if I just PR that feature

wintry solar
#

any remember how to fix the problem where you drag cards around and tey don't go back to where they should be?

sand rune
#

Anybody got some repo's or advice how to spawn UI elements?

languid mirage
#

only negative consumables can stack

wintry solar
#

@tepid crow

tepid crow
#

HAHAHAHA

#

it certainly do be doing stuff

#

I actually had a very similar issue with my card sleeve

frosty dock
#

Lmao

wintry solar
#

pls help

frosty dock
#

it's not a bug, it's a feature blueprint

night pagoda
#

how about a deck with all cards from all of the decks? balatrojoker

tepid crow
#

yeah sorry, this was my fix for the element not snapping back (just stop the player from moving it) 🙃

    card.states.collide.can = false
    card.states.hover.can = false
    card.states.drag.can = false
    card.states.click.can = false
#

but let me know if you find an actual fix >:)

wintry solar
#

perfect

#

I don't know why the second page ones wont get put in the card area either

languid mirage
#

uhm why do I have random nil

#

apparently it appears if I open options -> settings

#

apparently nopeus causes it

royal ether
#

someone didnt remove a text field correctly

rain imp
#

I tried installing love for mod support, but it bluescreened me with this. What have I done wrong? I have Steamodded 1.0.0 installed and working

tepid crow
rain imp
#

None of the instructions told me to

#

Oh, wait, I got it

#

No

#

But deleting it still crashes the game, from Steamodded side this time

#

So something broke inside of it

#

Aight, the mod was the culprit of that one

#

But adding lovely back without the mods crashes still

#

Without lovely and mods it runs

tepid crow
#

Without lovely it is just the base game, right?

rain imp
#

Yea

#

Nvm

#

I verified files and it fixed itself

#

Steam has found a broken one

#

Weird that it ran without lovely anyway, but idk

tepid crow
#

Still works if you add the mods back too?

rain imp
#

I suppose, the mod that broke it required lovely

#

Yea, it's fine, thank you!

tepid crow
#

Nice đŸ‘đŸ»

unkempt thicket
#

I think I'm doing something wrong

mellow sable
zealous glen
mellow sable
#

boss rush

zealous glen
limpid flint
#

is it possible to add additional information in crash screen?

zealous glen
#

I’d like to see the full file name for once

limpid flint
#

Oh that too

frosty dock
#

yeah SMODS.load_file exists, it just needs to be used

zealous glen
#

how

frosty dock
#

SMODS.load_file(path)

#

it's relative to your mod dir

zealous glen
frosty dock
#

if there's a file at <your_mod>/path/to/file.lua, all you do is SMODS.load_file('path/to/file.lua')

zealous glen
languid mirage
limpid flint
#

Nice

#

Now no one will be playing the game

shell timber
#

+10x mult while the dvd logo is hitting the corner

languid mirage
#

I think it will be funny to do this if game was inactive for like 5-10 seconds

limpid flint
#

1 second

languid mirage
#

😭

#

also I now have to add CRT shader to it because I couldn't get a separate canvas to work

#

rn its either one or the other

crisp coral
#

make it play the dougdoug corner sound when it corners

languid mirage
#

😭

#

that might be hard (it's a shader)

#

I guess it's not impossible, but probably not something I want to bother with

brisk quartz
tidal edge
#

hey! i've been posting on modding-chat. but i might as well post here as it seems more centred on developing mods

#

im creating a hand, and i've been trying for about a day to get this down

#

i've done almost everything except implimenting the hand

#

im wondering if anyone could provide some help on what the coding behind this hand would be

#

screenshot for context

languid mirage
#

did you see example mod in steamodded?

frosty dock
#

not that useful for this tbh - it only has a composite hand

frosty dock
#

which doesn't work for this

#

it's technically composite, but it doesn't compose strictly out of other hand parts

languid mirage
#

eh

#

it does have main parts you need

tidal edge
#

high card + pair doesnt work to my knowledge

#

ive already tried

languid mirage
#

because high card in game is defined as not any other poker hand

sand rune
#

Question, is there a way to prevent a joker from being sold e.g locking it but not debuffing, alternatively how could I spawn a UI block under the joker area?

tidal edge
#

i think what i need is related to straights

#

whatever code checks a card

#

and then makes sure its one after

#

ive tried to find it

#

but i keep failing

frosty dock
#

so it should use atomic_part, not composite

sand rune
languid mirage
#

ah true

red flower
#

havent coded a hand before but is it something like this

tidal edge
frosty dock
# tidal edge and then makes sure its one after

such a thing doesn't exist in vanilla, ranks are highly hardcoded. Steamodded does change this, given the value of a card, you can get all the ranks that come after it by SMODS.Ranks[card.base.value].next

frosty dock
#

hand contains all cards in the played hand as Card objects

frosty dock
red flower
#

yeah, the first one I've noticed but I didn't want to just solve all the problems for them lol

frosty dock
#

then there's also the fact that get_X_same looks for exactly pairs, it won't tell you if there's a higher amount of same cards

#

I should probably add a utility function for that like get_X_or_more_same(n, hand)?

tidal edge
red flower
#

If you want to make other types of run hands that are considered separate then I think the base get_X_same is more useful then so you can distinguish between pair + card and three of a kind + card
I think

frosty dock
#

not really

#

a 3+1 run still contains the 2+1 version

#

base game code accounts for these containing hands explicitly

#

which is barely extensible

#
atomic_part = function(hand)
  local ret = {}
  local _pairs = get_X_same(2, hand, true)
  for _, _pair in ipairs(_pairs) do
    local rank = SMODS.Ranks[_pair[1].base.value]
    local run = false
    for _, card in ipairs(hand) do
      for _, next_rank in ipairs(rank.next) do
        if card:get_id() > 0 and card.base.value == next_rank then table.insert(_pair, card); run = true end
      end
    end
    if run then table.insert(ret, _pair) end
  end
  return ret
end
#

or maybe instead of get_X_or_more_same, I'll add an optional argument to get_X_same that will count higher pairs

#

so like get_X_same(2, hand, true)

#

perhaps that's cleaner

red flower
#

what does atomic_part do btw? does it add it to the result table that evaluate_poker_hand gives you?

tidal edge
#

i dont think this does actually exist

#

infact, i got an error about it when selecting a card

frosty dock
#

I literally just said I need to make it

tidal edge
#

oh

#

i read it as

#

"this might exist"

#

sorry :(

frosty dock
#

no, I just wrote the code under the assumption it exists

languid mirage
frosty dock
#

there could be multiple next ranks

languid mirage
#

that would be two pair then

frosty dock
#

no

#

two different ranks that both follow the pair's rank

sand rune
#

@frosty dock quick question, do you know if there any resources for spawning custom UI’s and any ordering one should be aware of as you seem quite knowledgeable about the game?

languid mirage
#

ah

tidal edge
#

well it does fix the issues

#

AA2 is now possible

lean ledge
#

I have a bit of a question about the inner workings of Balatro, if anyone can help me

#

How does Balatro take the string used for random Seeds and uses that?
Like
I'm making my own card rogue lite (Based on Uno instead of Poker)
And I wanna implement a similar Seed system
But for some reason Unity's Random class can only contain an Int?
So I thought, okay I'll take a 8 character string, convert it to number, and we're good to go
However, if there's too many numbers, the string exceeds the limit of Integers...
So I wanted to ask how Balatro does it
Maybe I'll get some inspiration

tidal edge
#

jee just realised how common this hand i made is

lean ledge
#

Like I know Balatro doesn't use Unity for its engine so I'm not expecting a clean 1 to 1 conversion

frosty dock
lean ledge
#

As much as I'm hoping to hear more about the inner workings of the game and maybe get some inspiration to fix my own situation

frosty dock
#

this

languid mirage
lean ledge
#

Oh yeah I wasn't gonna copy him one to one

#

I don't even know what his algorithm looks like

frosty dock
# frosty dock this

I'm more than happy to try and explain something in more detail, should it be needed

languid mirage
frosty dock
tidal edge
#

really? working fine in my experience

frosty dock
#

base.value doesn't account for stone cards having no rank

#

get_X_same accounts for it, but say you had a stone card that was originally a seven and played it along a pair of sixes

tidal edge
#

is there a way i can prevent that

sand rune
frosty dock
#

should be this

frosty dock
wintry solar
#

I am also around to help out with ui related queries

sand rune
tidal edge
#

:D

#

(to make it work currently i just used "get_X_same(2, hand, true)")

frosty dock
#

alright you'll be able to keep that, just adding in the patches to make it work

tidal edge
#

but theres one more thing i was wondering

#

would there be any major issues if i tried to make a "house" variant of it

#

eg.

#

55566

#

replacing the high card with a rank one higher with a pair

frosty dock
#

yeah no doubts it could be extended to that

#

thinking the or_more arg to get_X_same should also be useful for that

#

get_X_same(1, hand, true) basically gives you the cards grouped into lists of cards that share the same rank

#

that's probably good enough to generalize

#

just pushed the util to main

tidal edge
#

would that be to replace the other get_x_same code from the previous code

frosty dock
#

you can keep it as is, the third argument of true now just actually does something

tidal edge
#

so what exactly would i change if i wanted it to account for a "run house" as i call it

frosty dock
#

let me write up a generalization

frosty dock
# tidal edge so what exactly would i change if i wanted it to account for a "run house" as i ...
function get_run(hand, len1, len2)
    local ret = {}
    local minlen = math.min(len1, len2)
    local pair_list = get_X_same(minlen, hand, true)
    local _pairs = {}
    for _, v in ipairs(pair_list) do _pairs[v[1].base.value] = v end
    for _, rank in ipairs(SMODS.Rank.obj_buffer) do
        local curr = _pairs[rank]
        if curr and #curr >= len1 then
            local run = false
            for _, next_rank in ipairs(SMODS.Ranks[rank].next) do
                local other = _pairs[next_rank]
                if other and #other >= len2 then
                    for _, v in ipairs(other) do
                        table.insert(curr, v)
                    end
                    run = true
                end
            end
            if run then table.insert(ret, curr) end
        end
    end
    return ret
end
tidal edge
#

oh what the hell

frosty dock
#

I rephrased in terms of ranks because that's more efficient

tidal edge
#

before you posted that

#

i think i solved it kinda

#

i have no idea how, and full house and other run hands work normally

#

i just changed it from > 0 to > 1

frosty dock
#

that should make no difference

tidal edge
#

i tested more

#

and it just replaced run of three

frosty dock
#

did you make it a composite hand with full house?

frosty dock
tidal edge
#

loll

#

sorry

frosty dock
#

len1 and len2 would be the min amount of cards needed in the lower/higher rank respectively, you can pass these in as needed from your atomic_part function

tidal edge
#

i know it sounds stupid but, if i wanted to use this function; where do i put it

frosty dock
#

atomic_part = function(hand) return get_run(hand, 2, 1) end

tidal edge
#

and i assume before or after the atomic part function i also put the thing (the big code that you sent a min ago)

frosty dock
#

you'll want to put that somewhere in top scope of your mod file

#

i.e. not in a poker hand object

tidal edge
#

i put it directly after the header

#

because thats all i can think of

#

does that work

frosty dock
#

sure

tidal edge
#

after i put it there it errored

frosty dock
#

hm

#

are you missing a comma somewhere?

tidal edge
#

well everything is exactly how it was put in messages

#

maybe i need to add a { onto that end

#

well that gave me another error

frosty dock
#

I'll have a look if you send the file

tidal edge
frosty dock
#

oh you need nothing from the previous atomic part function

#

the end of that file should look like

  atomic_part = function(hand) return get_run(hand, 3, 2) end
}
#

oops, there

#

and get rid of the excess } after the get_run function

tidal edge
#

this is my end of the file

tidal edge
#

the line doesnt have one

frosty dock
#

i did not send that last message as i wanted it to, apparently

frosty dock
tidal edge
#

oh ok

#

oh yeah shouldnt the end of the file have an "end" somewhere

frosty dock
#

maybe also read up on lua syntax a bit more and get a code editor that catches these syntax errors as you go - vscode has a lua extension

tidal edge
#

lol

frosty dock
tidal edge
#

oh my it didnt immediately crash

#

it might work

#

awww nope

#

what went wrong?

#

is somethign wrong with my atomic part for the house, its not working

frosty dock
tidal edge
frosty dock
#

oh wait you only ever sent a snippet and not the full crash so I can't tell, did you update steamodded?

frosty dock
#

yeah well

#

you can't expect a functionality I just added to be there if you don't update

#

i thought that was self explanitory

tidal edge
#

didnt know it was updated

#

ssry

#

and i think the last hand i need to add

#

is the flush run

#

a normal run

#

but all cards have to be of the same suit

frosty dock
#

that doesn't make too much sense for a 3-card hand

tidal edge
#

yeah your right

#

nevermind

#

run of four it is

#

i guess the mods done for now

#

ill check if it works

#

ohh what the fukc

#

i didnt even change anything

#

i just rebooted it and it did this

#

what does that error mean

#

its linking to a non mod file

frosty dock
#

i think that means your above_hand isn't valid

tidal edge
#

whats wrong with that

#

its literally called run house in my mod

frosty dock
#

are you registering run of four after run house?

frosty dock
#

ah nvm, it just needs your mod prefix

#

rh_Run House

tidal edge
#

still the same crash

#

i assume this is right

frosty dock
#

i forgot about the class prefix, actually

#

h_rh_Run House

#

mb

#

alternatively you can save the run house object like local run_house = SMODS.PokerHand { ... and then do above_hand = run_house.key

#

that gets you around dealing with the prefixes

tidal edge
#

i'd rather keep it prefixed for now

frosty dock
#

it will still be prefixed

#

it just means you don't have to denote them explicitly

#

but h_rh_Run House should work

tidal edge
#

omg

#

all that didnt matter

#

because i needed it above 4oak

#

not run house

#

😭

frosty dock
#

💀

tidal edge
#

its beautiful

#

but its not done quite yet

#

time for the planets

#

which are very easy

#

thank god

lament fjord
#

@regal wolf heard you're investigating a vanilla memory leak, got any leads?

regal wolf
#

not investigating it yet, but its on my list

#

theres a few different possibilities, and I also saw someone report a memory leak from just afking on the main menu.

#

so there might be multiple, lua is notorious for memory leaks

lament fjord
#

After a while of natural play, I get slowdowns, especially when I move my mouse around (not even over anything in particular)

#

I've hooked the nuGC function to print if it hits its memory limit, and it's reporting that it's getting those, in rapid succession, in this state

#

So yeah bona fide memory leak

tidal edge
#

would the planet atlas want the size of the 1x atlas or the 2x atlas

#

for px py

tepid crow
#

1x

tidal edge
#

if i use my 1x size, what xpos and ypos would i need to display the first planet?

lusty epoch
#

Assuming everything is correctly spaced, first one would be 0,0, 1,0, 2,0 etc

regal wolf
tepid crow
#

if you get like a black/gray box you're outside the boundaries (which really should throw an exception, not just silently throw up nothing, but ya know)

tidal edge
lusty epoch
#

It shouldn’t

lament fjord
tidal edge
#

idk why i put the right values

lament fjord
#

That's when the symptoms start that is

lament fjord
#

Wherever I happen to be

regal wolf
#

it happens as soon as you load up? or after some amount of time?

lusty epoch
lament fjord
#

After a while of playing

regal wolf
lusty epoch
#

Use 71 and 95 in code

tepid crow
regal wolf
#

i wonder if its data not being correctly deleted

tidal edge
#

i tried and it did this

wintry solar
#

Then your sprite sheet is wrong

tepid crow
tidal edge
tepid crow
#

what's the first 71x95 pixels of that sheet from the top left?

lusty epoch
#

try using this one

#

(make sure the image is named correctly though)

#

see if it works

tidal edge
tepid crow
#

I think cryptid has a nice little auto upscaler

languid mirage
#

you need python

tidal edge
#

yeah i do

#

but it just quickly opens

#

and closes instantly

languid mirage
#

without the <>

tidal edge
languid mirage
#

pip install PIL or something

tidal edge
#

that gives an error

primal robin
#

Hello everyone. How can I do smooth transition for changing alignment in UIBox?

tidal edge
languid mirage
#

google it

#

the first error

crisp coral
#

here's one i use that converts all files in assets/1x when run in the mod folder

lament fjord
#

There aren't a whole lot of heap profiling tools for luajit 2.0

#

Might have to grit and strain through luajit 2.1 again

maiden phoenix
#

Genuine question, why do people use a Python program to scale their art? Don't most art programs allows that?

tidal edge
#

i installed pillow module which is the same thign

tepid crow
#

try py -m pip install pillow and possibly (?) restart the cmd after you've installed it

tepid crow
tidal edge
tepid crow
tidal edge
#

is that why

tepid crow
#

if you see this

C:\>py -m pip install pillow
Requirement already satisfied: pillow in c:\users\user\appdata\local\programs\python\python311\lib\site-packages (10.4.0)

then you already have it installed yes

tidal edge
#

well it didnt show that

#

it just

#

kept

#

going

#

and its still doing this

#

but when i dont use py

#

it works

tepid crow
#

đŸ€”

#

what does py -m pip -V say

tidal edge
#

well just to try to fix some stuff

#

im quickly installing a new python

#

ill try that when im done

tepid crow
#

alrighty

#

I suggest not having multiple python versions installed at the same time unless necessary btw

#

can get kinda messy

mellow sable
#

I literally just make the spritesheets in Paint

#

I also “made” resize.py (or rather, prompted an AI to make it balatrojoker )

tidal edge
mellow sable
#

m7

tidal edge
#

this is my best balatro art

#

its a grey piece of cheese

unkempt thicket
#

what am I missing?

mellow sable
#

Vulcan in the planet example mod and Labyrinth in Cryptid

#

And for both of them I used tools to help me (not AI lmao)

tidal edge
languid mirage
#

you don't have it

#

look at other game objects

mellow sable
maiden phoenix
tidal edge
#

still cant get that python thing to work

#

pillow just doesnt want to work

#

the programs tell me that PIL is not installed when ran

#

i've checked about 20 times

#

and i have installed newest pillow

#

i feel like im bashing my skull against a wall of knifes

#

jgskjfsjdasjldas

tepid crow
tidal edge
#

nothing so far

#

nothing

#

absolutely nothing

tepid crow
#

it returns without no output?

tidal edge
#

after a while

#

it did this

#

and thats it

tepid crow
#

and py -V?

#

wow sorry that's stupid

#

I mean pip -V

lament fjord
#

Is this before or after you reinstalled python

tidal edge
tidal edge
tepid crow
#

well there's your issue

#

your pip isn't your python's pip

tidal edge
#

how do i fix that

lament fjord
#

If you somehow installed pip through some mechanism outside of using python to do so, uninstall that

tepid crow
#

no

#

he installed python once through python.org (presumably), and once through the windows store

#

both come bundled with pip