#đŸ’»ăƒ»modding-dev

1 messages · Page 50 of 1

tidal edge
#

oh thats why i have two of them

tepid crow
#

if you want to prevent this issue in the future, nuke all other python installations except the one you want to keep
if you just want to bypass it right now, use py -m pip install pillow and wait for it to finish

lament fjord
#

(does pip have some kind of verbose flag?)

tepid crow
#

-v I believe

frosty dock
#

this worked, tysm

lament fjord
#

NFS apparently allows you to read to filedata directly without having to use a string in between

frosty dock
#

yeah that's what i did

lament fjord
#

Mhm

frosty dock
#

NFS.read('data', self.full_path)

#

I think with that, the sound PR is exactly where I want it

#

gonna merge it I think

tidal edge
#

it wont let me use py as a command anymore

languid mirage
#

add py to path

#

the other installation

tepid crow
#

could also restart the installer and check the checkbox that says "add py to path" iirc

tidal edge
#

ayyy i got it to work

#

the resizer

tepid crow
#

@mellow sable (or anyone else if they know the answer)
some booster packs in my mod get too many options to pick from and then you can't select some of the options
I recall cryptid having a fix for this, but I can't find it in the code anymore lol

edit: can be fixed by modifying G.GAME.pack_size before the UI function for the pack is called

tidal edge
#

yooo my completed planets

#

look better than i thought ngl

tepid crow
tidal edge
#

oh i mea

#

i guess i could put them for what planet's moons it its

#

back to work

tepid crow
#

I mean earth already has the moon there

tidal edge
#

also io's card indicator has been fixed

#

from akqj10 to aaaa2 as intended

tepid crow
#

also there's a random white pixel in the moon's planet indication

#

top left

tidal edge
#

and perfect

#

fully finished

wintry solar
#

How do they look in game?

tidal edge
#

ill check

#

hopefully they look good

#

ohhh shit

#

when i hover over one

#

it crashes due to nil value

#

and the graphics are all shit

unkempt thicket
#

this is not applying anything to the joker when used, does anyone know why? Club augmentation is supposed to apply snow_a_club to the selected joker when used but instead does nothing.

tidal edge
#

i made the px and py sizes the size of one of them

#

i dont understand

#

this is the image

wintry solar
tidal edge
#

i set it to 63 x 93 for the thing

wintry solar
#

Set it to 71 x 95

unkempt thicket
mellow sable
tepid crow
tidal edge
#

what about the nil value error though

#

its a problem if i cant hover over the planets

wintry solar
tidal edge
#

or else they crash

wintry solar
#

Have you set the loc_txt and loc_vars?

wintry solar
tidal edge
wintry solar
#

I don’t think mod_conv will work on jokers, that’s a base game function

tidal edge
#

this is the code i pasted

#

for every planet

#

just changing names and hands

#

and x pos and ypos

coarse widget
#

trying to do something really basic, just want to write a mod that changes the names of some jokers. is there an example mod that does this somewhere that i could model mine after?

tidal edge
#

idk why hovering over one of these would giv a nil value error

frosty dock
#

can you send the actual crash?

#

nil value error can be many things

tidal edge
#

k

#

this happens when hovering over every planet BUT moon and the vanilla planets

wintry solar
#

Do the other planet definitions look the same as moon?

tidal edge
#

yep

#

i copied moon

#

changed names

#

hands

#

and x pos y pos

#

they should be basically the same

frosty dock
#

can we still see one of the others?

#

clearly something's different

tidal edge
#

moon compared to one of the others

frosty dock
#

ugh

#

I've seen that crash and I don't remember why

tidal edge
#

maybe you arent allowed to use spaces in planet hand level ups

#

run has no spaces and gives no error

#

but the other hands all do

frosty dock
#

that makes no sense, but I'm not sure my dump matches yours

#

can you send this file: Mods/lovely/dump/functions/common_events.lua

tidal edge
#

i myself am stumped on what the issue could be

#

i just dont get it, the planets are literally exactly the same code; what was fucked up

tidal edge
frosty dock
#

sorry I was answering someone else

#

I'll have a look

tepid crow
mellow sable
#

yw

tidal edge
frosty dock
frosty dock
#

huh you're not even using the get_run function outside of run house?

tidal edge
#

nope

frosty dock
#

Enceladus also doesn't work?

tidal edge
#

yes

#

all other planets

#

except moon

#

and crash with a nil value when hovered

frosty dock
#

Enceladus should work from what I can tell

#

for titan and io, you capitalized the of in Run of Three / Run of Four

tidal edge
#

well lemme check if it does

frosty dock
#

which you did not do in the key, so these are different strings

tidal edge
#

oh lmfao

#

thats really stupid

#

ill check if it works now

#

yay it works

#

i finally have something sharable

tidal edge
#

and i credited you

frosty dock
#

just a small thing, don't upload the zip file to github

#

upload the files directly

hushed cradle
#

does anyone know what this is?

#

like in game

unkempt thicket
#

anaglyph deck?

hushed cradle
#

any way i can draw that somewhere on screen?

wooden nexus
#

Isn’t that anaglyph deck or am i stupid

hushed cradle
#

i mean

#

lol

frosty dock
#

the view deck overlay or what?

hushed cradle
#

like the stack of cards

frosty dock
#

oh

hushed cradle
#

sorry i wasnt descriptive enough lol

wintry solar
#

It’s just a load of cards

frosty dock
#

that's just a card area

wintry solar
#

In a card area

hushed cradle
#

oh sick

wintry solar
#

Like it’s literally your deck

hushed cradle
#

so if i

#

had a card area with a limit of 52

#

i could draw my own

wintry solar
#

Yeah

hushed cradle
#

cool

#

thank you

#

i feel kinda dumb now lol

#

ofc its a card area

#

its a deck

#

this just doesnt look as good

#

is the ambient tilt or whatever it is how i get it to be straight?

#

and not wobble

wintry solar
#

Uhhh let me check what I have

#

It’s to do with the type you set it as iirc

hushed cradle
#

ah okay

#

ty

wintry solar
#

Oh right yeah

#

I have a card area for each deck

hushed cradle
#

cool

#

just gonna have to make it another function rather than reusing the ones for other card types then ig

#

thank you

wintry solar
#

I don’t think the tilt looks bad though

frosty dock
#

wtf i forgot to respond, yes it does

wintry solar
#

Should still be able to straighten it up though

hushed cradle
#

uh

#

maybe i dont need 52 cards for each

#

need to figure out how to line them up lol

languid mirage
#

every deck kinda needs to be its own cardarea

hushed cradle
#

it is 💀

languid mirage
#

well, probably not necessary

#

oh

#

lmao

atomic falcon
#

💀

languid mirage
#

search deck_height in cardarea

#

that's how the game handles it

hushed cradle
#

cheers

atomic falcon
#

đŸ»

hushed cradle
#

theres a cardarea:align so thats probably perfect

atomic falcon
hushed cradle
#

oh i didnt make them deck card areas

#

oops

#

theyre all title card areas

#

thatll be why

atomic falcon
hushed cradle
#

nvm still needs some work

atomic falcon
hallow forge
#

why not just 1 card per deck, if it's just stats

wooden nexus
#

So i’m trying to figure out how to make a deck based on abandoned. instead of everything but the face card only in the deck. Trying to learn how to add code to 1.0.0 decks

hushed cradle
#

they look better imo

wooden nexus
#

Gonna have to figure out where abandoned’s code is first and recreate it

hushed cradle
#

if you look in backs.lua in the game code its all there i think

wooden nexus
atomic falcon
#

ctrl+c, ctrl+v

hushed cradle
#

idk shit about steamodded so good luck

#

yes?

atomic falcon
#

no

frosty dock
#

you can have an apply function on your deck object

unkempt thicket
#

it worksbalatrojoker

wooden nexus
frosty dock
#

i just got my own spectral

#

otherwise, nothing much, just just watching some balatro university rn

wintry solar
atomic falcon
#

clearly underestimating lua

sand rune
hushed cradle
wintry solar
sand rune
frosty dock
#

they've sort of been updated, though I've just noticed deck of 4 still hasn't been fixed and I should probably add SMODS.change_base before I do that

wooden nexus
frosty dock
#

though basically for the decks, what you should do is pass an apply function and put any code in that would otherwise go in a Back:apply_to_run() hook, removing conditions that gate for this deck

sand rune
frosty dock
#

you may find hooking Back:apply_to_run() is still preferable sometimes, for effects that aren't specific to any one deck

frosty dock
unkempt thicket
#

how would you set a joker to have this? I looked at how it's done for editions and seals, but I think they are hardcoded

frosty dock
#

cryptid does it, but it should become steamodded core functionality at some point

#

needs some cleaning up first though

tepid crow
frosty dock
#

yeah it'd basically be a more generic version that allows changing one or both of rank and suit

tepid crow
#

ohh I see

#

even better

#

as long as I can skip the blind check

hushed cradle
#

anyone know how i change which deck the card area actually is?

#
    local row = {n=G.UIT.R, config={align = "cm", padding = 0.07, no_fill = true}, nodes={}}
    for j = 1, args.col do
      S.card_display[#S.card_display+1] = CardArea(
        G.ROOM.T.x + 0.2*G.ROOM.T.w/args.row,G.ROOM.T.h,
        G.CARD_W,
        0.95*G.CARD_H, 
        {card_limit = deck_limit, type = 'deck', highlight_limit = 0, collection = false})
      table.insert(row.nodes, 
      {n=G.UIT.C, config={maxw = 0.2, align = "cm", padding = 0, no_fill = true}, nodes={
        {n=G.UIT.O, config={colour = G.C.CLEAR, object = S.card_display[#S.card_display]}}
      }}
      )
    end
    table.insert(deck_tables, row)
  end```
#

thats the code for the card area

#

can i pass it a key or anything?

#
    current_center = current_center + 1
    local center = G.P_CENTER_POOLS[args._type][current_center + (S.current_page*(args.row*args.col))]
    if not center then break end
    local card = Card(S.card_display[i].T.x + S.card_display[i].T.w/args.row, S.card_display[i].T.y, G.CARD_W, G.CARD_H, G.P_CARDS.empty, center)
    for j = 1, deck_limit do
      S.card_display[i]:emplace(card)
    end
    S.card_display[i]:s_create_view_deck()
  end```
#

thats my code for emplacing the top card

wintry solar
#

card.children.back = Sprite(card.T.x, card.T.y, card.T.w, card.T.h, G.ASSET_ATLAS["centers"], G.P_CENTER_POOLS.Back[count].pos) this is what I'm doing

#

do your cards drag around btw?

wintry solar
#

do they snap back to the area?

hushed cradle
#

yeah

wintry solar
#

huh

#

I will have to study your code

hushed cradle
#

its pretty rough lol

#

just tryna get it to work then ill clean it up and resend if youd like

hallow forge
#

i added a lovely folder named lovely to my mod and now the game is crashing immediately, im not sure why

wintry solar
#

hmmm, is that all you have for this screen?

hushed cradle
#

1 sec

#
  G.SETTINGS.paused = true

  local deck_display = {_type = 'Back', col = 5, row = 2,}

  G.FUNCS.overlay_menu({
    definition = s_create_options({
      back_func = 'saturn_stats',
      title = 'Click on a Deck to view Stats',
      nodes = s_create_deck_display(deck_display),
    })
  })
end```
#
  args = args or {}
  args._type = args._type or 'Back'
  args.col = args.col or 5
  args.row = args.row or 2
  args.specific_center = args.specific_center or nil
  local deck_tables = {}
  local cards_per_page = args.col*args.row
  local current_center = 0
  local deck_limit = 1

  S.card_display = {}

  for i = 1, args.row do
    local row = {n=G.UIT.R, config={align = "cm", padding = 0.07, no_fill = true}, nodes={}}
    for j = 1, args.col do
      S.card_display[#S.card_display+1] = CardArea(
        G.ROOM.T.x + 0.2*G.ROOM.T.w/args.row,G.ROOM.T.h,
        G.CARD_W,
        0.95*G.CARD_H, 
        {card_limit = deck_limit, type = 'deck', highlight_limit = 0, collection = false})
      table.insert(row.nodes, 
      {n=G.UIT.C, config={maxw = 0.2, align = "cm", padding = 0, no_fill = true}, nodes={
        {n=G.UIT.O, config={colour = G.C.CLEAR, object = S.card_display[#S.card_display]}}
      }}
      )
    end
    table.insert(deck_tables, row)
  end

  if args.specific_center then
    local center = args.specific_center
    local card = Card(S.card_display[1].T.x + S.card_display[1].T.w/args.row, S.card_display[1].T.y, G.CARD_W, G.CARD_H, nil, center)
    S.card_display[1]:emplace(card)
    return {
      {n=G.UIT.R, config={align = "cm", r = 0.1, colour = G.C.CLEAR, emboss = 0.05}, nodes=deck_tables},
    }
  end

  for i = 1, #S.card_display do
    current_center = current_center + 1
    local center = G.P_CENTER_POOLS.Back[current_center + (S.current_page*(args.row*args.col))]
    local card = Card(S.card_display[i].T.x + S.card_display[i].T.w/args.row, S.card_display[i].T.y, G.CARD_W, G.CARD_H, G.P_CARDS.empty, center)
    card.children = Sprite(card.T.x, card.T.y, card.T.w, card.T.h, G.ASSET_ATLAS['centers'], G.P_CENTER_POOLS.Back[current_center + (S.current_page*(args.row*args.col))].pos)
    for j = 1, deck_limit do
      S.card_display[i]:emplace(card, nil, true)
    end
  end
  
  local t = {
    {n=G.UIT.R, config={align = "cm", r = 0.1, colour = G.C.CLEAR, emboss = 0.05}, nodes=deck_tables}, 
    {n=G.UIT.R, config={align = "cm",}, nodes = s_create_page_cycle_options({_type = args._type, colour = lighten(G.C.GREEN, 0.03), _type = args._type, row = args.row, col = args.col})}
  }
  return t
end```
#

that crashes btw

#

the sprite thing isnt working

#

cant tell why

wintry solar
#

that's strange

hushed cradle
#

anyone know how i can stop the cards from tilting about

#

actually its not that big a deal

#

but if anyone does know please lmk

dawn oar
#

Would anyone have any idea where card trigger order would be located
I want to try things held in hand such as baron and steels trigger after jokers instead of before

hallow forge
#

evaluate_play function in state_events if i recall

dawn oar
#

ty

tepid crow
wintry solar
hushed cradle
hushed cradle
#

and they like spin about idly

lament fjord
#

I want to run heap analyses, does Balatro (or Steamodded at least) use some kind of system that I can use to introspect/analyze/reflect the contents of things the heap walker encounters

tepid crow
wintry solar
#

ugh I have no idea why my cards don't go in the card area

tepid crow
# hushed cradle yeah

also, I'm very interested in why your card elements do snap back but mine and eremel's don't đŸ€”

hushed cradle
#

the card areas are display through nodes with objects right

#

i just make a node with an object thats a card area

#

then emplace a card

hushed cradle
#

oh ive already tried that nvm

#

it decreases it a bit

wintry solar
#

yeah I did that but they still don't snap

#

it's weird

hushed cradle
#

what kind of card area is it?

#

mines title if that makes any difference

wintry solar
#

a deck

hushed cradle
#

mine still snapped as decks

#

hmm

wintry solar
#

let me try title

hushed cradle
#

the code i sent is literally all i have for it

#

apart from the create_options but thats literally just ui

tepid crow
wintry solar
#

they snap back with title T_T

#

okay well I can investigate this

tepid crow
#

what?? but I just emplace mine on top of the cardarea of the deck select

#

whose top card does snap back I'd like to add

#

but my card doesn't

lament fjord
#

So apparently Balatro internally uses an OO framework, does steamodded use it as well or is it a different one

#

At least now I have some idea of how I can introspect heap objects I come across

tepid crow
#

are you talking about Object, Node, etc?

lament fjord
#

engine/object.lua iirc

tepid crow
#

yes that's Object, and Node is one of the subclasses that extends that

lament fjord
#

Does steamodded also use this, or do they have their own

tepid crow
#

and yes, SMODS' GameObject extends Object

lament fjord
#

Okay

wintry solar
tepid crow
wintry solar
#

I don't know

#

but I've literally copied that cardarea and it doesnt snap

#

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

tepid crow
#

tf?

#

isn't that also the one used in the collection deck and in-game deck (the one with "view deck")?

#

Cuz all of them have their top card snap back 😭

#

well that can't be good

wintry solar
#

I'm using shop now

tepid crow
#

eh, that seems decent

#

don't stack any cards though, doesn't look very good

wintry solar
#

yeah

#

but I can't figure out why the card doesn't snap at all

#

like even if I hook align_cards to use a different types alignment it doesn't snap

#

the snapping must be somewhere else in the code

hushed cradle
#

using shop looks so good

#

im gonna do that too

#

ty

wintry solar
#

some of these tooltips have tiny text but I'm not sure if I can be bothered fixing that for now

hushed cradle
#

lol

#

this is what mine look like atm

#

probably gonna have to make my own ig

compact idol
hallow forge
#

no biomes for you

wintry solar
#

uhhhh where did your trees go

tepid crow
#

seems like a featureTM to me

compact idol
#

accidentally put the position fix in the draw function so it was getting "fixed" every frame lmao

#

is there a better way to solve card positions in new card areas than just editing the transform of each contained card? bc this feels really hacky and prone to breaking

#

oh I should probably just inject something into the align_cards function huh

hallow forge
#

maybe look at reverie to see how they did it

tepid crow
mellow sable
# wintry solar

It’s not applying any of Cryptid’s fancy rendering tricks 😭

tepid crow
#

I should probably actually just do the same thing in the deck select tbh

wintry solar
#

what rendering tricks am I missing

glass scaffold
#

If I want to make my custom joker art, what canvas size should I use?

wintry solar
#

71x95

glass scaffold
#

Thanks

wintry solar
#

@tepid crow omg I think I've fixed the snapping thing

tepid crow
#

please enlighten me

wintry solar
#

oh wait no I haven't

#

ffs

tepid crow
#

I just got jebaited so hard

compact idol
#

rip

wintry solar
#

so did I

#

it works until I try and change the sprite

tepid crow
#

the fuck?

wintry solar
#

IT WORKS

tepid crow
#

don't do this to me

#

not again

hallow forge
#

red deck

wintry solar
tepid crow
#

okay... looks good...

#

what'd you change?

wintry solar
#

card.children.back:set_role({major = card, role_type = 'Glued', draw_major = card})

#

you need this

#

and then it works

#

#magic

tepid crow
#

no that might make sense

#

I noticed something a couple min ago

wintry solar
#

I tried to set the role but I didn't know the correct syntax T_T

#

I just went looking for where the game actually sets the back of the card

tepid crow
wintry solar
#

I put the role on the node containing the cardarea instead of the card

#

yeah the sprite isn't attached to its box

tepid crow
#

yeah exactly

wintry solar
#

if you click on the deck it flies back

tepid crow
#

yup

unkempt thicket
#

how do you change the probability of a specific item showing up in shop or packs?

wooden nexus
tepid crow
#

that's for booster packs at least, not sure if it works for any other things

tepid crow
wintry solar
mellow sable
#

Enhanced.toml I think

edgy reef
#

Probably injected into the draw function.

glass scaffold
#

How to I tell my mod to use assets from the assets folder?

crisp coral
#

if you're using steamodded declarations then they will automatically use assets from assets/1x

glass scaffold
#

So I don't need to change the atlas parameter?

crisp coral
#

oh, have you made a SMODS.Atlas?

glass scaffold
#

Using this example from the wiki:

local j_example = SMODS.Joker:new('Example Joker', 'example', { mult = 10 }, {x=0,y=0}, {
    name = 'Example Joker',
    text = { '{C:red}+#1#{} Mult' }
}, 1, 2, true, false, true, true, 'Mult', 'my_mod_jokers')
j_example:register()```
tepid crow
#

you're using 0.9.8 on purpose?

crisp coral
#

that is VERY old

glass scaffold
#

Alright, what's the skeleton for 1.0.0?

tepid crow
#

on the wiki, the numbered pages

glass scaffold
#

Oh, so the "Creating new game objects" page is not for 1.0.0

tepid crow
#

nope

compact idol
glass scaffold
#

where's the skeleton for making a 1.0.0 joker?

hushed cradle
#

in centers

#

smods centers

tepid crow
wintry solar
#

why do you need to offset?

tepid crow
#

the sleeve sprite needs to be in a very weird position

#

and right now it's just... on top of the deck

#

probably because of CardArea:align_cards()

wintry solar
#

can you make the sprite bigger so it fits?

tepid crow
#

yeah that's what I was thinking too

#

actually, don't think that'll work because I also need it to be slightly wider than the cards in its cardarea

#

yeah when glued it just sets all properties (x, y, w, h) to the major's

wintry solar
#

even if the actual sprite itself is bigger?

tepid crow
#

I'll just try and see

glass scaffold
#

How do I change cards (when scored) into a different suit and rank?

tepid crow
glass scaffold
#

And I can remove the loc_vars and calculate functions without consequence?

Nvm, just tried it and it works (somehow)

tepid crow
#

not sure

#

try and see I'd say

tepid crow
wintry solar
#

you could try Minor instead of Glued, I think that has a similar effect

tepid crow
#

I can make the card higher, which "stretches" the sprite (which I can then fix again by scaling sprite properly, but that's all so... eh)

tepid crow
#

(aka actually behaving according to offset)

wintry solar
#

nice!

#

@brisk pond you can use SMODS.load_file(path) (I saw that sneaky message delete)

brisk pond
tepid crow
#

figuring out the answer to your own question the moment you press enter it is always nice 🙃

gilded narwhal
#

Pantheon spirits

wintry solar
#

I think using the smods version avoids having to return a table in each file

#

52 card decks?!

tepid crow
#

lmao the rightmost 2 drawing over their neighbours

wintry solar
#

I guess the game draws from left to right

tepid crow
#

by order of G.I.CardArea iirc

wintry solar
#

I think 15 is a good number

tepid crow
gilded narwhal
#

I didn't rlly know what to do with that one

#

Because in cookie clicker it buffs seasonal events

wintry solar
#

right, it is way past the time I should have been asleep...

gilded narwhal
#

How do you represent that in balatro

wintry solar
#

I guess selecting them properly will happen tomorrow

tepid crow
gilded narwhal
#

Because having certain seasonal events active has different unlocks and buffs

#

So selebrak just makes those more prominent

tepid crow
tepid crow
# gilded narwhal

I mean that table basically reads like "golden cookies appear more often"?

gilded narwhal
#

That's fair

#

Okay I changed selebrak

#

But are the others alright in terms of balance

tepid crow
#

I'd say they at least "feel" legendary

glass scaffold
#
        if SMODS.end_convertCards_context(context) then
            return {
                card:set_base(G.P_CARDS["h_a"])
            }
        end
    end```

Got this much done, what else do I need so it can be triggered and convert the cards after scoring?
tepid crow
tepid crow
#

yeah you can copy hiker's code

glass scaffold
#

Cool.

Problem: How?

tepid crow
#

2 notes:
I think you need to use calculate = function(self, card, context) instead of the example's calculate = function(card, context)?
it's G.P_CARDS["H_A"] (they're always capitalized)

glass scaffold
tepid crow
#

do you know how to look through the game's code?

glass scaffold
#

Most likely no

#

would I use Local Files or %appdata%/Balatro to find it?

tepid crow
#

local steam files

#

open with 7zip

#

hiker's code is around card.lua:3066

#

you only care about "when" hiker triggers though, if that makes sense

glass scaffold
tepid crow
#

the "when" is the if-chain above it

#
            if context.cardarea == G.play```
#

because that's the condition for hiker to trigger

#

aka the condition for your joker

glass scaffold
#

and then the return { card:set_base(G.P_CARDS["H_A"]) } goes after that G.play thing?

tepid crow
#

I'm honestly not sure

glass scaffold
#
        if context.individual then
            if context.cardarea == G.play
            return {
                card:set_base(G.P_CARDS["H_A"])
            }
        end
    end,
    atlas = "AryaTheWitch"```

This check out?
tepid crow
#

the return seems to create both the pop-up for the... joker? and sometimes also an action?

glass scaffold
tepid crow
#

huh, I can't get a message to appear lol

glass scaffold
tepid crow
#

well you do seem to be missing an end

glass scaffold
#

where?

tepid crow
#

oh and also the then

#

in the second if

#

unless lua syntax allows it like that

glass scaffold
#

Alright, last check before run.

tepid crow
#

got the then, didn't got the end

glass scaffold
#

where does the new end need to go?

tepid crow
#

to close the 2nd if block

glass scaffold
#

💀

tepid crow
glass scaffold
#

But where does it need to go?

the ends already look like they close it

tepid crow
#

that's cuz you're not indenting correctly

#

should look like this

#

do you see the change?

glass scaffold
#

Now I do (pushed the changes)

#

Now let's test it

#

Cause Balatro's successfully running

tepid crow
#

always a good first step

glass scaffold
#

Aaaaaand no effect.

#

Played a hand, didn't trigger at all.

tepid crow
#

wow I just edited that image without noticing the issue myself lol

glass scaffold
#

What was it?

tepid crow
glass scaffold
tepid crow
#

second guess was close

#

function name should be calculate, not convertCards

glass scaffold
#

brb, getting food

#

THEN we test again

tepid crow
#

ait Imma go to bed

#

maybe someone else can help you out with the message thing

#

oh and use context.other_card:set_base(...) instead of card.set_base(...)

#

I think card is the joker
ah, nevermind, self is the center and card is the joker instance, similar but not the same

glass scaffold
#

Every change pushed.

#

Testing time

#

IT WORKS

#

But I need to get that AFTER it scores

#

and message still

#

BUT IT WORKS

compact idol
#

anyone know what's wrong with this lovely patch? the print statements aren't running and it doesn't show up in the lovely dump. this is specifically targeting evaluate_play after the joker_main and edition contexts.

[[patches]]
[patches.pattern]
target = "state_events.lua"
pattern = '''local nu_chip, nu_mult'''
position = "before"
payload = '''
for i=1, #G.biomes.cards do
    local _card = G.biomes.cards[i]
    print("biome eval trigger A")
    local effects = eval_card(_card, {cardarea = G.biomes, full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, biome_main = true})
    if effects.biomes then 
        ("biome eval trigger B")
        local extras = {mult = false, hand_chips = false}
        if effects.biomes.mult_mod then mult = mod_mult(mult + effects.biomes.mult_mod);extras.mult = true end
        if effects.biomes.chip_mod then hand_chips = mod_chips(hand_chips + effects.biomes.chip_mod);extras.hand_chips = true end
        if effects.biomes.Xmult_mod then mult = mod_mult(mult*effects.biomes.Xmult_mod);extras.mult = true  end
        update_hand_text({delay = 0}, {chips = extras.hand_chips and hand_chips, mult = extras.mult and mult})
        card_eval_status_text(_card, 'jokers', nil, percent, nil, effects.biomes)
        percent = percent+percent_delta
    end
end
'''
match_indent = true
crisp coral
#

target = "functions/state_events.lua"

compact idol
#

y'know, after like 6 years of programming you'd think I'd be better at it by now

#

thanks lol

mighty pendant
#

info_queue[#info_queue+1] = ... there's literally a function called append, what are you doing?

wintry solar
#

it's faster than using table.insert

mighty pendant
#

I'm also trying to work out where the game creates packs inside the shop

mighty pendant
rain imp
#

Is it possible to give Wee Joker a different texture? Afaik it just takes the usual Joker's texture

frosty dock
#

yeah you can just change its atlas/sprite position

mighty pendant
#

as in little

rain imp
#

Great, does it need to be patched in or a base lua function will do?

rain imp
frosty dock
mighty pendant
frosty dock
#

if you want a different joker to be wee, I think you can just make its (internal, not key or display) name 'Wee Joker' and it'll work

#

actually I've yet to try that

mighty pendant
frosty dock
#

steamodded mostly uses keys instead because why decollision two separate strings

mighty pendant
#

I think

rain imp
frosty dock
#

jokers have no atlas associated with them usually, it will just default to the Joker atlas

#

you can assign a different one through steamodded by doing something like SMODS.Joker:take_ownership('j_wee', { atlas = 'your_atlas', pos = { x = 0, y = 0 } }) where your_atlas is defined through SMODS.Atlas, and the x and y values match the joker's position on the atlas

rain imp
#

I found this one

mighty pendant
#

pos={x=0,y=0}

frosty dock
#

the shrinking happens in code elsewhere

#

{x=0,y=0} is just the position of the standard joker, and it uses the name elsewhere as a condition to shrink

rain imp
#

Ohh, so it counts the tiles by itself? That's why it is so confusing

rain imp
frosty dock
#

it isn't in one place

#

there's another bit of code in Card:load()

rain imp
#

Anyway, issue solved, thank you!

tidal edge
#

how do you make a joker like "the duo" and "the tribe", the only feature i need is x2 mult when a hand type is played

zealous glen
#

You can read the source code for those

tidal edge
#

ok

zealous glen
#

Though IIRC they use a variable not in extra, which you could use, but you can also define your own

tidal edge
#

uh

#

which file in the game is the joker file again

zealous glen
#

you can look at card.Lua but generally it’s easier to open the folder inside a decent program and searching all of it

frosty dock
tidal edge
frosty dock
#

or you can just put the key there, like 'h_rh_Run'

#

I just like to not hardcode prefixed keys

tidal edge
#

wow that was easy

#

time to do that 3 more times

mighty pendant
#

what's a run? A smaller straight?

tidal edge
#

its a hand in my mod

#

also for some reason i cant enter a seed

#

i havent even messed with text input it just did that

#

well its fine now

mighty pendant
tidal edge
#

yep

mighty pendant
#

interesting, doesn't sound too hard to find

tidal edge
#

yeah but it gets rarer later on

#

run of three has to contain a 3oak and a high card

#

run of four contains 4oak

#

and run house is the same thing

#

but the high card is a pair

mighty pendant
#

run of five contains 5oak?

tidal edge
#

what

mighty pendant
tidal edge
#

run of five doesnt exist

#

because that would require

#

5 cards

#

and then a high card

#

run of four has to contain 4 cards and a high card

mighty pendant
tidal edge
#

that could be cool compatability

#

ill add it to the feature list

mighty pendant
mighty pendant
tidal edge
#

eg.

#

22233

mighty pendant
tidal edge
#

yeah

mighty pendant
tidal edge
#

a full house but

#

last 2 cards

#

are a rank above

#

the first 3 cards

mighty pendant
#

speaking of which do you have flush runs?

mighty pendant
tidal edge
#

;yeah

tidal edge
#

would be a bit too specific

mighty pendant
tidal edge
#

if we did that

#

anyway

#

i gotta go for a bit

#

share more info later

mighty pendant
#

alright 👍

tidal edge
#

check out the forum post

#

if you want to talk more

mighty pendant
#

I need to work out why my omni cards aren't working

frosty dock
zealous glen
mighty pendant
zealous glen
#

Sublime Text

frosty dock
#

paste seed bug is fixed on latest

languid mirage
frosty dock
#

me when ERROR

languid mirage
#

yea I'm just creating shader for jen

#

shaders are awesome

zealous glen
shell timber
#

there is one issue in that the original card gets drawn below

languid mirage
#

it's a 1 patch fix

#

if you find in code how negative is drawn

#

you can see that there's a check with like if card is negative then only negative shader is used

#

but otherwise its dissolve shader (which causes the card being rendered behind)

oblique gust
#

guys serious question what is match_indent even doing

#

i remember asking it somewhere several times but got bumped away

frosty dock
oblique gust
#

oh so it wont at all be the cause of any failed patch but kind of a prettifier

frosty dock
#

yeah

oblique gust
#

thanks A LOT now i fully get it

frosty dock
oblique gust
#

and i got 2 more Qs
whats its default if its not present? or its required?
and does the priority work as steamodded (the bigger the later?) or the opposite?

languid mirage
#

it is required

#

priority 0 applied first

#

but because like 99% of mods have priority 0 it's random

#

between other 0 priority patches

#

iirc unreleased lovely version supports negative priority already which is nice

oblique gust
#

k got it

languid mirage
#

also if u copied someone else's patch with overwrite you can safely remove that line as it does nothing

#

only "at" patch will overwrite

zealous glen
frosty dock
#

yeah it doesn't apply to regex, only pattern patches

#

regex has line_prepend instead

languid mirage
#

lovely gives a warning in console when you have parameter that does nothing in your patch

primal robin
#

Question. I want to add custom configuration to blind object, which can be used by others for integration with my mod. Which variant is better: use blind.config.extra or create own table like blind.config.my_mod?

frosty dock
#

blind config as opposed to card config does not have special keys

#

so it really doesn't matter

brisk pond
#

Is there a way to add a new deck art into this menu?

wintry solar
#

not at the moment

#

AltTextures have been put on the side for now

#

it'll look like this eventually

primal robin
#

Also, can i somehow flip blind chip sprite upside down?

wintry solar
#

or does this look bad

languid mirage
#

looks good

primal robin
#

Looks cool

brisk pond
#

looks great

languid mirage
#

but probably better to have some better selected deck indication

wintry solar
#

oh it will do

limpid flint
#

What will right panel do?

wintry solar
#

I think I'll have the deck appear in that panel

brisk pond
brisk pond
limpid flint
#

I'm also thinking about stakes

wintry solar
#

stakes will be on the next page

#

this is my current idea

#

the bit at the bottom is what you've selected, and the green lights will indicate which stakes are applied for that

limpid flint
#

What about placing the stakes on the deck to indicate you're choosing it

#

I'm just thinking out loud

languid mirage
#

can't put my finger on what exactly

shell timber
#

the miscoloured ui elements with extra backgrounds?

#

granted it's just a mockup

languid mirage
#

no I mean layout

limpid flint
languid mirage
#

maybe it's the green/red dots

limpid flint
#

But I mean it's certainly going to change

languid mirage
#

well, I'm simply giving my opinion

limpid flint
#

What does the dots indicate anyway

languid mirage
#

which stakes apply, probably

#

that took me a second to realize

crisp coral
#

too big, i'd rather have them as lists like houserules does

limpid flint
#

Really think it would be cool to simulate someone actually playing in a casino

lament fjord
#

Current progress: I can use Lua's introspective capabilities to get ahold of the source locations where classes are defined

#

Not exactly names, but pretty close

limpid flint
#

You pick a deck from the deck piles, pick which stake to gamble on

#

Stack the stakes like they are actual stakes

languid mirage
#

maybe this could work (without applies previous stakes text)

tepid crow
languid mirage
#

yeah I was thinking of that as well

#

probably want to make it a bit smaller tho

limpid flint
#

What I imagine is, like real stakes, you will stack them, the one on the top applies all the below ones
On second thought it might look bad in practice/hard to be implemented

wintry solar
#

Yeah I have no idea what the best way to display stakes is

wintry solar
tidal edge
#

hey does anyone know why this joker wont work

#

its supposed to only give 2x mult

#

for h_rh_run

#

but it gives 2x for everything

wintry solar
#

Pretty sure your type should be a string

tidal edge
#

oh ok

#

lol

frosty dock
#

yeah else it's just nil

tidal edge
#

uh

#

it still wont work

zealous glen
#

That said, I think you could use the Stake chips without the green and red dots, just highlighting them in some way (size, saturation, outline, etc.)

tepid crow
#

just wondering, what would a "quick start" look like?

limpid flint
#

I imagine it will remember your last run's setting and you can apply it in one single click

#

So you don't need to click here and there... click this... click that

tepid crow
#

ohhh just a single "play previous", kinda like the game already does for the normal play menu

#

yeah makes sense

wintry solar
#

Yeah it’ll function as it currently does in terms of pre selecting things for you

crisp coral
mighty pendant
#

do I need to add all language support for my mod?

limpid flint
#

But in this there are multiple pages

wintry solar
#

You just won’t need to cycle through 50 decks or stakes to find the one you need

limpid flint
#

In the game right now you just click new run, but in eremel's you will still need two clicks

wintry solar
#

I don’t see that as an issue tbh

limpid flint
#

Well maybe, there's always room to improve it

zealous glen
#

I think it’s an issue

#

But you could just add a single button quickstart

crisp coral
#

i also see that as a nonissue

limpid flint
#

Maybe just make play button always visible, and the select stake/deck a toggle

#

I consider it a potential issue

wintry solar
#

I thinking adding one extra click if you’re playing the exact same deck stake combo is fine when you consider all the saved clicks if you want to change either option

bright abyss
#

uh, does modding this game require knowing like, any pre-existing coding languages

tepid crow
#

I wouldn't try learning how to program by modding balatro if that's what you're asking
if you already have experience with some other language (e.g. Java, Python, C, whatever) then using Lua isn't very hard

limpid flint
wintry solar
#

But if anyone wants to mock up some stake selection ideas I am more than happy to take a look and find a solution that everyone likes

crisp coral
#

what's the variable to make the sound start over like the old behavior?

#

by sound i meant music

limpid flint
bright abyss
wintry solar
tidal edge
#

and im doing

#

fineee

wintry solar
#

I’d like the solution to make it easy to select the one you want, but also able to see what effects you are applying to your run, especially as custom stakes aren’t ordered in any sort of way from what I remember

limpid flint
#

Aren't they supposed to be ordered

tepid crow
wintry solar
#

If I remember right, there is an option to set which stake it comes after, but I think it still just puts them in injection order in that category

#

As soon as two different mods try and add their own stake chain, or you have branches in your own stake chain it becomes a mess to flick through

tidal edge
#

how do you make your jonkler blueprint and brainstorm compatible

zealous glen
#

Usually nothing

tidal edge
#

well

#

my thing that gives 2x for hand types

#

is not brainstorm compat

#

i just happened to get the both of them

#

and it said incomptabile

zealous glen
#

But did you test it?

#

Because saying it’s compatible is separate from compatibility

#

The message is just a Boolean variable set when you create a Joker

zealous glen
tidal edge
#

oh

#

it does actually copy it

#

but

#

how do i make it

#

SAY

#

compatible

zealous glen
#

And quickstart helps you 1-click modded content

tidal edge
#

because its annoying

#

that it doesnt

zealous glen
#

Check the wiki

#

Or another mod

tidal edge
#

the balatro wiki or another wiki

zealous glen
#

Steamodded wiki of course

#

It’s something like blueprint_compat

zealous glen
tidal edge
#

also why WONT THIS WORK

#

my hand is named

#

Run

#

and the prefixes make it

#

h_rh_Run

#

but it gives mult

#

for every hand

zealous glen
#

Idk ping aure

bright abyss
#

good ones*

zealous glen
#

I think beginner programmers need to understand that computers are stupid

unkempt thicket
#

i just looked at other mods code and see what they did and figured out how to mod from there

zealous glen
#

After you get past that barrier it becomes easier IMO

limpid flint
zealous glen
unkempt thicket
#

base game, other mods in alphabetical order

zealous glen
#

In fact, mods shared here need to be open source

#

I started with a single Joker mod for Steamodded 0.9.8

#

You can try modding a single Joker into 1.0.0

wintry solar
#

That sounds way more convoluted than just having pages of stakes in the order they’re in their table

zealous glen
#

How so?

limpid flint
#

My personal opinion is the stakes should be shown in one page...to indicate their stacking effect

shell tangle
# bright abyss how

I'd also like to suggest taking a look at this mod to try and start off with, it's meant to be for beginners, but is still a little WIP. Let me know if there's anything that doesn't feel clear in the explanations. Doesn't have the atlas with it yet, though.

zealous glen
#

So that kind of breaks down

wintry solar
limpid flint
#

By subgrouping them it will look tidier

#

Not all at the same time

zealous glen
#

Like a deck

#

Or a pile of chips

#

Or a mound of chips

bright abyss
limpid flint
#

Besides the selection part that is

zealous glen
#

With Steamodded there’s some incomplete documentation, and undocumented vanilla options, so you can see how other mods set up what they’re doing even if they’re doing B

#

But I think starting with a single Joker is easier

wintry solar
#

I could make a tower of chips to represent the stakes that are applied, would you want them to have tooltips too?

bright abyss
#

how could i crack open some joker coding

limpid flint
#

Should be separated tho, or else it could look like a mess

shell timber
#

oh yeah a pile of chips sounds good

limpid flint
#

Do you imagine the tool tip only showing the top one? Or the one currently hover over?

zealous glen
#

How many can there reasonably be until they can’t fit?

#

And how many would the average mod have?

zealous glen
tepid crow
mellow sable
bright abyss
#

and how would i unzip it?

zealous glen
#

With anything that unzips

mellow sable
mellow sable
zealous glen
#

You can copy the .exe then unzip the copy

bright abyss
#

like opening the archive?

zealous glen
#

What archive

limpid flint
#

Zip file

bright abyss
tepid crow
#

yes, like opening the archive

crisp coral
#

so the average would become 0.6

bright abyss
#

oh hey and i have a code editor installed from that one time a friend tried to convince me to raid some crypto scam server

zealous glen
#

Balatrostuck wants to add 1 Stake IIRC

limpid flint
#

2 or 4

zealous glen
#

I don’t think 2 is good because the tooltip could go offscreen

#

Unless it’s like

#

Misprint

wintry solar
#

Something like this?

bright abyss
#

i've always found just being able to crack open a game's brain while it's running lol

wintry solar
#

And when there’s too many in the stack, they stack tighter

limpid flint
#

Stakes added by different mods will mix or will be separated ?

#

I mean their applied order

shell timber
#

stake tech tree

languid mirage
# wintry solar

I dont like the idea of stakes being ordered same way as decks, just makes no sense

bright abyss
#

wonder where these jokers are hiding

shell timber
#

honestly a tree pattern would be interesting if mods have stakes that're applicable out of order

wintry solar
#

I just don’t see how else you’re going to display them on the screen

languid mirage
#

my idea

#

it's not ideal, but it makes a bit more sense imo

zealous glen
# wintry solar

Missing a quickstart button. Also I’d do a proof-of-concept to see how high can the stake tower get

languid mirage
#

stake tower has the same issue as old menu with tons of modded stakes

zealous glen
zealous glen
#

That’s just there for diegetic purposes

wintry solar
#

It’s just a visual representation for how many stakes you’re applying

languid mirage
#

but at some point it will look like this

#

which is what we're trying to avoid?

wintry solar
#

No I’m trying to avoid having to single scroll through the entire stake selection to find what you’re looking for

zealous glen
#

An idea. Have the chips in chip-shaped holes, and desaturate unselected ones

wintry solar
#

You’ll always be able to see the top chip of the tower, and it’ll only be stakes that are being applied, not all of them

zealous glen
#

Alternative they could be distinguished by size or outline

wintry solar
#

Desaturating the ones that aren’t applied you mean?

bright abyss
#

where are the jokers stored in the files

tepid crow
zealous glen
#

Although

#

Since Stake colors are important, maybe desaturating them isn’t a good idea

bright abyss
#

like their coding

limpid flint
#

Selected one a bit brighter

#

Or just simply a checkmark

zealous glen
tepid crow
zealous glen
#

Oops

limpid flint
#

Or circle it

zealous glen
#

My bad for the ping

bright abyss
#

the occasional ping is cool

#

it just sets me off when i get like, more than 2 in one conversation

zealous glen
bright abyss
tepid crow
zealous glen
#

Name or key

#

Sometimes you search for the overlap

#

But sometimes it’s hard to tell what the key should be

#

Or thunk made a typo

tepid crow
#

god the caino typo stil fucks me up

bright abyss
#

oh god is it just defining jokers as not any of the jokers behind the joker it's referencing

tepid crow
#

no it's basically just if joker.name == "Campfire" then ... for 2000 lines

bright abyss
#

oh so the actions are defined off of the name?

zealous glen
#

Steamodded does define everything* locally

#

Not for modded Jokers

#

Just for vanilla ones

bright abyss
#

well yeah the vanilla ones

zealous glen
#

Also context

bright abyss
#

time to name every joker perkeo!

tepid crow
zealous glen
tepid crow
#

I suggest you just go read the code at card.lua tbh

bright abyss
wintry solar
#

I don’t think reading the source code is relevant until you’re writing calculate functions tbh

tepid crow
#

sure, but they seem interested in the inner workings

bright abyss
#

i just kina wanna make some neat jokers

unkempt thicket
#

the debuffing of suit

#

is somewhere else

wintry solar
#

@shell tangle has a great resource that writes some base game jokers in the modded style

zealous glen
#

Which I’ve been using

bright abyss
unkempt thicket
bright abyss
#

so like, does that joker give you 3x mult and debuff all of your heart cards?

unkempt thicket
#

whats shown just gives 3x mult

#

this does the heart debuffing

bright abyss
#

oh, neat

#

why does it mention debuffing?

#

oh wwait lmao

#

im a bit dumb

#

thats the description

zealous glen
#

And I plan to have three localizations

bright abyss
#

well that's a lot of code for a flat 3x mult

zealous glen
#

I mean most of that is just setting variables every Joker needs

zealous glen
#

You didn’t escape the escapes

bright abyss
zealous glen
#

But you know

bright abyss
#

there's a wiki?

zealous glen
#

Name price tooltip rarity etc.

unkempt thicket
#

this part gives the x3 mult, while the rest is mostly setting up the joker

#

that key in message won't work though its mod specific

bright abyss
#

...do you have the link to the wiki?

unkempt thicket
#

I have it open constantly

bright abyss
#

neat

#

thnks for tolerating me

#

maybe ill just try making a basic chip joker

golden lake
#

you guys are my favorite modding community fr

bright abyss
#

i feel like my thousand yard stare is swiftly getting larger (longer, wider? idk)

frosty dock
limpid flint
#

I have no clue what other modding community looks like

unkempt thicket
#

are the other ones bad?

bright abyss
#

idk what any of those mean lmao

unkempt thicket
bright abyss
#

what's the difference between the display name and actual name?

unkempt thicket
#

actual name will appear in the code and mod folder, display will appear on the badge

bright abyss
#

neat

#

what's the badge?

languid mirage
bright abyss
#

oh wait

#

sorry i missed that message lmao

#

uh, will messing with the code disable achievements?

languid mirage
#

a badge is a thing like "Negative" on tooltip

bright abyss
#

ah

languid mirage
#

but it will display your mod name

#

for items that your mod added

unkempt thicket
#

an identifier that tells what joker is from what mod (the six hundred suits is the badge for this example)

bright abyss
#

ah god adding new stuff to the sprite sheet would prob be a pain

languid mirage
#

you just create your own atlas

#

look at any other mod

shell tangle
bright abyss
#

oh yeah totlly forgot about that

#

sorry

languid mirage
#

example from cryptid

shell tangle
unkempt thicket
bright abyss
#

neat

#

lot of weird text lol

unkempt thicket
#

i only use four of these atlases, the rest i am working on

tepid crow
#

is the example mod ultimate random deck the best way to do randomness in Back:apply?
because I don't think that respects the game seed?

frosty dock
frosty dock
tepid crow
#

is there... a better way?

frosty dock
#

consult Antimatter deck

#

but I'll update the example mod

tepid crow
#

alright I'll take a look

crisp coral
tepid crow
# frosty dock consult Antimatter deck

You mean cryptid's antimatter deck right?
I'm probably stupid but I can't find any randomization being done in antimatter's (or misprint's) apply

I was looking for more of a simple randomize starting hands and discards (while respecting the seed) if that matters
I could also:
a) hook Game:start_run myself, and call my own apply afterwards, but that seems prone to breaking for a variety of reasons
b) use lovely to move the seed generation in Game:start_run forward so it's before back:apply_to_run(), but if multiple mods do this it'll probably break

#

alternatively, if you can do random with run seed in back:apply and I just need to wait for you to update the example mod lmk