#💻・modding-dev

1 messages · Page 77 of 1

wintry solar
#

but hey, this should work

edgy reef
#

Isn't there a SMODS function meant to eval outside of contexts?

loud citrus
#

oh shit! doesn't visually update until the hand is done but hey this is progress

wintry solar
#

this is the issue though, it sets the mult originally, does all the context.before stuff, then sets it again

loud citrus
wintry solar
#

it does it again after this

loud citrus
#

gosh this game is so weird to mod

wintry solar
#

you can also throw this in to get it to update update_hand_text({sound = 'chips2', modded = true}, {chips = hand_chips, mult = mult})

gaunt thistle
#

this game is both weird and great to mod

#

it's p fun

loud citrus
wintry solar
#

huh

#

try this one update_hand_text({delay = 0}, {mult = mult})

loud citrus
# wintry solar huh

i've got it to reset each time but unfortunately the that didn't work either, this is just getting weirder and weirder fool

wintry solar
#

OH

#

of course

#

if you put this mult = mod_mult(G.GAME.hands[text].mult) above the update bit it'll work

loud citrus
wintry solar
#

oh, replace text with context.scoring_name

loud citrus
#

i did that, the text still refuses to change, might have miss read the directions though

#

also even though it has yet to visually work thank you so much for spending your time to help ❤️
and for teaching me how the heck the game checks mult and chips

wintry solar
#

where did you put that line?

brisk rose
tepid crow
loud citrus
wintry solar
#

it needs to be below the adding line but you still need the update text line after it

loud citrus
#

like this?

wintry solar
#

move up one line

loud citrus
#

it works! wow i'm silly

#

also thank you balatroheart

wintry solar
#

no problem

loud citrus
#

i'm hopping this also helps other people

marble vine
#

might start messing around with my own mod (desperate for a reason to use lua i spent so long learning)

glossy stone
#

oh fuck i have a real bad jinker idea

Strong Winds (Uncommon)
+2 discards, 1 random card gets discarded after playing each hand

shell timber
#

someone should port oddityapi to 1.0.0

#

wait nvm it already is?

#

alright that's probably important

glossy stone
glossy stone
#

i have another idea for this tho now
When hand is played, discard 2 rightmost cards

#

live card reaction

umbral zodiac
#

anyone know what im doing wrong by trying to spawn a cryptid and hanged man card?

            local card = create_card("Consumeables", G.consumeables, nil, nil, nil, nil, "c_cryptid", "man")
            card:set_edition({negative = true}, true)
            card:add_to_deck()
            G.consumeables:emplace(card)

            local card2 = create_card("Consumeables", G.consumeables, nil, nil, nil, nil, "c_hangedman", "man")
            card2:set_edition({negative = true}, true)
            card2:add_to_deck()
            G.consumeables:emplace(card2)
brisk rose
#

So I have a mod #1271500476457812120 which is composed of code from other mods, and is all currently in 0.98 format. Its purely a joker mod. Besides changing the formatting of the joker definitions, and moving the calculate functions within them z what all wound porting to 1.0 entail?

#

@dense jasper pinging you because this is kinda a subset of your area of expertise

dense jasper
#

probably not a lot. you may have to adjust the calculate functions because of slightly different variable accessibilities, but most likely it'll be a lot of copy-pasting

brisk rose
#

Wonder if I can get find+replace with regex (in xed text editor) to handle a lot of the tedium

dense jasper
#

I feel like trying to get regex to do the job would be more work than just doing the tedium. when I do it I do one joker at a time and do a quick test to make sure the joker is working as expected.

brisk rose
#

Yeah that's fair tbh. The old cliche of automation being more work than just doing it manually

#

I'm sure there's an xkcd or 5 about that

#

which is why I sometimes automate automation using chatgpt

#

Mostly with bash scripts using imagemagick so far, lol. It's surprisingly good at it

#

But I wanna actually learn so won't be doing that for this

dense jasper
#

if you find you can automate some or most of the migration, sure, but make sure you still plan to go card by card to make sure everything's looking good

edgy reef
# brisk rose So I have a mod <#1271500476457812120> which is composed of code from other mods...
  • SMODS.Joker:new replaced with SMODS.Joker. You can technically set the function definitions inside the initial joker definition instead of outside it.
  • Replacing if context.cardarea == G.jokers and not context.after and not context.before then with if context.joker_main (i think the former technically "works" but is too vague at times, resulting in triggering when it's not supposed to).
  • Updating older hooks to use built-in functions that didn't exist prior (such as using calc_dollar_bonus for golden egg and add_to_deck/remove_from_deck for some jokers).
#

Since this is a previous 0.9.8 mod and it's just jokers that should be all you need to worry about.

glossy stone
#

i'm struggling here, how do i make it so that when a hand is played - the 2 rightmost cards are discarded (much like the hook)
everything i can find which force selects/discards cards does so randomly so i cant rly look from othr jokers

wintry solar
#

You need to select the last card of G.hand.cards twice

glossy stone
#

yeah and then what about the discarding? i'm kinda a noob here... i tried looking at the hook's code but i'm still kinda struggling

wintry solar
#

Run the discard function on it

#

It’s something like draw_from_hand_to_discard

glossy stone
#

huh...

#

i can't seem to find any examples

#

matter of fact how to force select them

#

god i dont know anything

#

i'm so stuck

glossy stone
#

for so long

#

i'm stuck on 1 joker for over an hour now at least

wintry solar
#

draw_card(G.hand,G.discard, i*100/hand_count,'down', nil, G.hand.cards[#G.hand.cards], 0.07)

#

Try doing that twice

#

The hand count bit might need changing

#

This is just ripped from somewhere else and given a specific card

glossy stone
#

no need for events right? or.

wintry solar
#

Don’t think so

glossy stone
#

in the meantime i implemented this miku

crisp coral
#

half a chicot that always disables showdowns....

glossy stone
#

real...

tawdry locust
#

Hey pals, I'm working on a little shitpost joker mod and I'm trying to make a custom sound effect play when the joker effect effect triggers. I tried basing it off the steamodded custom music, as well as some other mods I found for custom sound effects, but no matter what I do it crashes saying it can't find the sound file. The file is an ogg and I made a /sounds folder in the same /assets folder that has the /1X and /2X folders for my joker sprite, and the joker sprite works fine. The closest I've gotten was replacing the file name in the music example mod, it was able to find the sound file and play it in place of the menu music. But I can't get anything to work to play the effect at a specific time

tawdry locust
#

That worked! Thank you. I will credit them accordingly

glossy stone
#

hey is there a way to randomize language of a string? cuz i have an idea for a joker -
Babel (Common)
Gain 6$ is played poker hand is a Main pleine (Poker hand and language changes at the end of each round)

primal robin
#

G.LANGUAGES contains list of all available languages in game.

So basically:

local languages_to_pick = {}
for k, v in pairs(G.LANGUAGES) do
  if not v.omit then languages_to_pick[k] = v end
end

local language, language_code = pseudorandom_element(languages_to_pick, pseudoseed("..."))
local language_font = language.font -- or language.font.FONT for love's font
glossy stone
primal robin
#

Maybe you should figure out by yourself

gleaming dune
#

on the topic of languages, does anyone have pointers on how to make mods that add new languages? ive never modded balatro before but i want to try adding a new language to mess with some names to make them funnier for myself

glossy stone
brisk rose
#

there's definitely info on it there regardless

gleaming dune
#

got it, thanks :)

crisp coral
glossy stone
#

yeah even now i'm still stuck, still can't discard the last 2 cards when a hand is played

#

i've been stuck on this LITERALLY ALL DAY

nocturne garnet
wintry solar
glossy stone
#

Okay so update, i made it sorta work? Instead of discarding the 2 rightmost it discards the 1 leftmost...

glossy stone
wintry solar
#

did you try the snippet I sent?

crisp coral
#

fyi G.hand.cards[1] is rightmost

glossy stone
opal spade
crisp coral
#

wait i'm not misremembering am i

glossy stone
#

HUH

opal spade
#

im going to check the state events now

brisk rose
#

it's not 0 indexed?

opal spade
wintry solar
#

I thought left was low

opal spade
#

G.hand.cards[1] is leftmost

wintry solar
#

it calculates hand effects from left to right

crisp coral
#

nevermind i'm misremembering

glossy stone
crisp coral
glossy stone
wintry solar
#

what does the joker do?

brisk rose
#

Is there like... some way to know without testing it the infortmation being handed to you, whether counting for something starts at 1 or 0?

wintry solar
#

or, what is it supposed to do

brisk rose
#

like I know the atlas grid is labeled starting at 0

crisp coral
#

except atlas

brisk rose
glossy stone
brisk rose
#

well that's easy then

crisp coral
#

and i guess the shader files

wintry solar
#

do you want the discard before scoring or after?

crisp coral
#

immediately implies before

glossy stone
#

yeah before, currently it does after tho

#

what to chaaange

wintry solar
#
if context.before then
  for i=1, 2 do
    draw_card(G.hand, G.discard, nil, nil, nil, G.hand.cards[#G.hand.cards])
  end
end
#

this doesn't work?

glossy stone
#

i'll try

glossy stone
#

...without enacting any discard effect.
Shit.

wintry solar
#
if context.before then
  draw_card(G.hand, G.discard, nil, nil, nil, G.hand.cards[#G.hand.cards])
  draw_card(G.hand, G.discard, nil, nil, nil, G.hand.cards[#G.hand.cards - 1])
end
#

this will discard both then

#

discard effects are a different kettle of fish

glossy stone
#

waaaaaaaaahhhhhhhhh

#

so uh

#

should i just add that discard effects downt work on it?

wintry solar
#

nah, we can sort it out

wintry solar
#

you could maybe try this

if context.before then
  G.hand:add_to_highlighted(G.hand.cards[#G.hand.cards], true)
  G.hand:add_to_highlighted(G.hand.cards[#G.hand.cards - 1], true)
  G.FUNCS.discard_cards_from_highlighted(nil, true)
end
#

I'm expecting there to be something wrong with this too though

glossy stone
#

YES IT WORKS!!!!

#

PURPLE SEALS HTR CASTLE WORKS

#

THANK YOU SO MUCH god the solution seems so easy now Cry

opal spade
#

of the joker

glossy stone
opal spade
glossy stone
#

...ok it still only discards the 2 lol

#

XDXDXDXD

opal spade
#

i think it should be fixable by putting that into an event

glossy stone
#

wait

#

WHAT THE FUCK

opal spade
#

what

glossy stone
#

get 2 powerful winds
discard moment
ok
sell one
play hand
??????????????

opal spade
#

what

glossy stone
#

2 cards were suddenly added to my hand?????? wtf??????

opal spade
#

what the heck

crisp coral
#

i'm going to assume it's because the discard wasn't evented

#

so it duplicates the cards

#

???

glossy stone
#

OKAY INTERESTING
I CAN ONLY SELECT 3
THAT MEANS
THAT 2 POWERFUL WINDS CAUSES THE 2 DISCARDED CARDS TO STILL BE SELECTED

glossy stone
wintry solar
#

uhhhh

crisp coral
#

yeah makes sense

glossy stone
#

we now have 90% of a working joker :3

molten hull
#

Hey is there anyway to mod the game from the android version I got it on my ps5 and phone is there anyway to play mods on my phone I don't want to have to buy the game for the 3rd time to play woth mods

glossy stone
#

how do i event it tho, i just put this Thing in one of those G E MANAGER ADD EVENT things and boom? or...

wintry solar
#

yeah

crisp coral
#

but it is possible

molten hull
crisp coral
#

not in this server

molten hull
#

Ok my bad sorry.

glossy stone
#

local event fucking freezes
(i need to have one of those self triggered true delay thing right?)

#

okay i dont know how to end this event help

crisp coral
#

return true

#

after the line that discards

glossy stone
#

that's it?

opal spade
#

ye u need to return true to end event

glossy stone
#

ah okay phew

nocturne garnet
glossy stone
#

ressource

nocturne garnet
#

goddamnit

opal spade
#

what does deteriorate mean

nocturne garnet
#

just makes it worse

crisp coral
#

permanent -1 to a random resource

opal spade
#

just say -1 to hands or discards

glossy stone
crisp coral
#

which is like. hands discards money?????

nocturne garnet
#

consumable slots, hand size, dollars, all that shit

opal spade
wintry solar
glossy stone
crisp coral
opal spade
glossy stone
nocturne garnet
#

yeah but im not gonna say Consumable Slots, Hands, Discards, Hand Size, and Dollars

crisp coral
#

oh my god mizu

#

i cannot escape her

#

the bell

opal spade
glossy stone
nocturne garnet
#

-1 Jokers

glossy stone
#

Mizu5 (Rare)
Queens give x2 mult, but 1 random card is forced to be selected

crisp coral
#

god.

glossy stone
#

i may add a mizu5 reference to OS ngl

crisp coral
#

i still have no fucking clue what's going on in pjsk

glossy stone
#

And I still have no fucking clue what to do with this phantom card bullshit problem

wintry solar
#

add a G.hand:unhighlight_all() after the discard line

glossy stone
#

AH

wintry solar
#

that should fix that bit

glossy stone
#

Okay, so now it practically works!

#

It discards 2 rightmost cards, but unfortunately after the hand is played...
but the fun thing is that if you have 2 Powerful Winds, the discards will count twice. HTR BROKEN?????????? (i'm prolly keeping that tho, just a funny interaction)

crisp coral
#

hrt ftw

#

err. htr

glossy stone
#

Mizuki_oops silly

#

anyways

#

i'll just change the desc to after hand is played. bleh.

glossy stone
glossy stone
#

horrible recorder solo

#

thanks a lot everyone!!! hehe

#

gn everyone!

limpid flint
crisp elbow
#

Car

full robin
#

Is there a pinned getting started page anywhere?

crisp coral
#

no, but

full robin
#

For dev I mean

#

Oh its there cheers

loud citrus
# nocturne garnet balls

small nit pick but fitting with the game's style, try making the text box taller rather than wider, it's typically as close as it can to match the horizontal space the name takes up (well still giving a nice flow to the text).

if you were to do this you'll end up with four lines of text instead of three.

tepid sky
signal crest
#

yes

signal crest
#

hes YIPPEIN

nocturne garnet
#

localisation files are so weird

#

how the hell do you even use them

#

someone gimme an example

opal spade
#

they return a table

nocturne garnet
#

yea but like how do you use them

opal spade
#

you define a table that returns localization entries that ur mod will use

nocturne garnet
#

wait nvm i think i figured it out

opal spade
#

indentation seems to be messed up but yeah

nocturne garnet
#

yeah i figured it out

hallow forge
#

That curse is cruel and unusual

nocturne garnet
#

localization folder -> localization file -> table shit

opal spade
#

it's not shit :<

nocturne garnet
#

stuff of table

maiden phoenix
opal spade
maiden phoenix
#

---CONFLICTS: [Xxjimbolover420xX]

nocturne garnet
marble vine
weak depot
#

is there a reason the sprite is refusing to work?

#

in files

#

there's also a 2x one

teal estuary
#

are you putting the atlas = “atlasname” in the joker?

weak depot
#

i'm very new to this and what's in that text is what i have relating to the image, can you please explain?

#

i'm looking in the atlas documentation but it's somewhat unclear so i'm kinda playing off context clues from it here

teal estuary
#

ah, sorry

weak depot
#

no worries!!!

#

i appreciate the help nonetheless :>

teal estuary
#

i would pull up my code but on mobile rn, but im also super new - instead of using path = “name”, i use atlas = “(same name as atlas’s name)”

#

and it works for me :]

weak depot
#

okay!

wintry solar
#

that's not at all how to do a sprite

teal estuary
#

(i didnt even notice the width and heigh in the joker, whoops)

weak depot
#

it's a deck

wintry solar
#

you need lua SMODS.Atlas({ key = 'popdeck', path = 'b_pop.png', px = 71, py = 95 }) SMODS.Back({ key = 'popdeck', atlas = 'popdeck', pos = {x = 0, y = 0} -- anything else })

weak depot
#

OH okay thank you :>

teal estuary
#

but yeah, what eremel said

weak depot
#

so you create the atlas as a separate table per se

teal estuary
#

yuh, its its own thing

#

you just put atlas and pos in the thing you are making

weak depot
#

bingo!

#

i'm proud of how that looks :)

teal estuary
#

it looks super good dude

#

i need to up my drawing game 😭

weak depot
#

lesgoo

teal estuary
#

thats a neat deck idea tbh

weak depot
teal estuary
#

that makes sense, i wish i had asperite tbh

#

i just use medibang and draw the best i can 😭

weak depot
#

ouch that's fair yeah

teal estuary
#

im getting somewhere though, im still stuck on how to code joker’s

#

thats my biggest hurdle, because code :(

weak depot
#

code is hard yeahhh

teal estuary
#

ong ong

weak depot
#

we're both new, if you'd like we can become like... co-developers? like bounce ideas off eachother n whatnot

#

just an offer ^^ no biggie if not

teal estuary
#

oh sure, i love getting to bounce around ideas

#

honestly just someone else to talk to about it is good enough 😭

weak depot
#

REAL

teal estuary
#

ong!!

#

i have a forum post for ideas for my own mod, if you are curious on what i’ve done

weak depot
#

alright!!

lament fjord
#

Here's a concept that's been around in my head:

Speedplay deck

Start at Ante 0
Increase Ante by 2 when boss blind is defeated
Double all income
weak depot
#

is there a place to look for all the SMODS functions you can call?

#

i'm trying to look for something to change a card's enhancement, and my best guess would be assert(SMODS.change_edition(x, y, z)) because the one for changing the base is assert(SMODS.change_base(x, y, z)) but that doesn't seem to work

wintry solar
#

they're generally in core/utils.lua

weak depot
#

yeah i'm just a little confused on how to set enhancements

wintry solar
#

use card:set_ability

weak depot
#

i'm gonna be writing all this down, thanks ;)

marble vine
#

i might try to throw together a mod that removes the save file limit, turning it into a dropdown menu that you can just add a new one to

hardy viper
#

is this meant to be a vanilla incompat speedrun or what

weary jungle
#

does balatro save all the hands you have played and how many times you played it or just the highest amount?

hardy viper
crisp elbow
#
  G.ARGS.LOC_COLOURS["dark"] = HEX("f8f800")
  G.ARGS.LOC_COLOURS["lightning"] = HEX("f8f800")
  G.ARGS.LOC_COLOURS["fire"] = HEX("f81020")
  G.ARGS.LOC_COLOURS["water"] = HEX("38b8f8")
  G.ARGS.LOC_COLOURS["ground"] = HEX("e97333")
  G.ARGS.LOC_COLOURS["fairy"] = HEX("ff3db6")
  G.ARGS.LOC_COLOURS["fighting"] = HEX("b85838")
  G.ARGS.LOC_COLOURS["colorless"] = HEX("c8c0f8")
  G.ARGS.LOC_COLOURS["psychic"] = HEX("c135ff")
  G.ARGS.LOC_COLOURS["metal"] = HEX("888080")
  G.ARGS.LOC_COLOURS["grass"] = HEX("289830")
  G.ARGS.LOC_COLOURS["dragon"] = HEX("c8a800") 
  return loc_colour(_c, _default)
end```

Did I fuck up this loc_colour function?
wintry solar
#

yes

hardy viper
#

average infinite recursion

crisp elbow
#

shit

#

how do I fix it 😭

hardy viper
#

local old = loc_colour
function loc_colour(_c, _default)
--stuff
return old(_c, _default)
end

crisp elbow
#

ohhhh

#

smooth brained moment kekw

hardy viper
#

lol it's okay with lua it's not immediately clear what something does

crisp elbow
#
local pokecolors = loc_colour
function loc_colour(_c, _default)
  G.ARGS.LOC_COLOURS["dark"] = HEX("f8f800")
  G.ARGS.LOC_COLOURS["lightning"] = HEX("f8f800")
  G.ARGS.LOC_COLOURS["fire"] = HEX("f81020")
  G.ARGS.LOC_COLOURS["water"] = HEX("38b8f8")
  G.ARGS.LOC_COLOURS["ground"] = HEX("e97333")
  G.ARGS.LOC_COLOURS["fairy"] = HEX("ff3db6")
  G.ARGS.LOC_COLOURS["fighting"] = HEX("b85838")
  G.ARGS.LOC_COLOURS["colorless"] = HEX("c8c0f8")
  G.ARGS.LOC_COLOURS["psychic"] = HEX("c135ff")
  G.ARGS.LOC_COLOURS["metal"] = HEX("888080")
  G.ARGS.LOC_COLOURS["grass"] = HEX("289830")
  G.ARGS.LOC_COLOURS["dragon"] = HEX("c8a800") 
  return pokecolors(_c, _default)
end```

Okay, so I changed it to this
#

game loads infe

#

*fine

#

get into jonklers tab

#

and then I crash

hardy viper
#

G.ARGS.LOC_COLOURS is nil

crisp elbow
#

huh ok

edgy reef
#

loc_colour needs called first.

#

Since that creates G.ARGS.LOC_COLOURS

hardy viper
#

true!

crisp elbow
#

true..

#

ty chat

weary jungle
#

How do you read the contents from a .jkr file?

brisk rose
#

For what purpose?

weary jungle
#

to get the hands played info

#

i can see in that one balatro save editor

#

i want to make a simple menu to display these stats, like how you can see cards or jokers

hardy viper
#

if i remember correctly

wintry solar
#

look at how the deck_win stuff works

hardy viper
#

also yeah just look at what vanilla does

brisk rose
#

Looks really similar

#

I do know that balatro doesn't include a json module in the environment

hardy viper
brisk rose
#

Ah makes sense

weary jungle
#

when i open a jkr in notepad++ this is what i get

glossy stone
#

I'm at school rn and I'm writing a LOT of ideas XD

#

how fun

hardy viper
#

not viewable in plaintext

brisk rose
#

Why.... do they essentially encrypt whst could be a plaintext table?

hardy viper
brisk rose
#

I doubt it changes performance much

hardy viper
#

to efficiently encode and decode the state of the game would be cumbersome

#

when you can just, save the exact state of the game and load that in

brisk rose
brisk rose
#

Like a ram dump for a rom

hardy viper
#

this chat discussed this before and thought that it could have just been a quick thing done in early development that never got replaced

brisk rose
#

Might be mistaken though

hardy viper
#

maybe saves would be incompatible then

brisk rose
#

I meant like... things getting messed up if saving was interrupted

#

Though I guess it might be buffeted before writing the same way it would inherently be in plaintext

hardy viper
brisk rose
#

Well if it has to be converted to plaintext first that's the stage that'd be more likely to be interrupted

#

If I understand this correctly

hardy viper
#

besides balatro isn't multithreaded so you're not getting interrupted either way

hardy viper
#

but like

#

files can't be written or read from while they're being actively written to right?

#

and you couldn't write parts of the chunk as they're compiled because there's no way the compiler would let you do that

brisk rose
#

True

#

So this is just faster

#

And not prone to the type of corruption i was thinking

hardy viper
#

i wouldn't say it's a good way of saving

#

the good thing is it's not computationally slow because luajit

#

it's miles slower compared to a typical approach but alas

#

still unnoticeable in the game

#

the downsides are storage space, cross compatibility (idk if a lua chunk compiled on windows can be run on something like mac, obviously there is no cross platform saving but it'd be a problem if it were to ever exist), readability, ability to debug

weary jungle
#

how do you print something to the console? im tring sendDebugMessage but it didnt work

#

if sendDebugMessage does work, where does it print?

#

ok you can just use print

opal spade
weary jungle
#

oh ok

hardy viper
#

yeah sendXMessage is generally only used for like, user stuff

#

you can just print stuff you want for your own debugging purposes

weary jungle
#

what is SMODS?

hardy viper
#

steamodded

weary jungle
#

does it get what the mod is, get the path to it and remove the admin only part at the start?

hardy viper
weary jungle
#

ok

#

that seems like data!

leaden prairie
#

helo

weary jungle
#

is there documentation on how to make menus and things

weary jungle
#

what is this?

#
--- MOD_NAME: Escape Exit Button
--- MOD_ID: EscapeExitButton
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Add an "Exit" button into the "Escape" menu

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

function G.FUNCS.exit_button(arg_736_0)
    G.SETTINGS.paused = true

    love.event.quit()
end

local createOptionsRef = create_UIBox_options
function create_UIBox_options()
    contents = createOptionsRef()
    local exit_button = UIBox_button({
        minw = 5,
        button = "exit_button",
        label = {
            "Exit Game"
        }
    })
    table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button)
    return contents
end

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

from an example mod

brisk rose
weary jungle
#

the documentation what after what?

weary jungle
brisk rose
#

*you're

weary jungle
#

???

brisk rose
#

Autocorrecy hates my guts

#

*Closest thing to the documentation you're after afaik

#

Is what I meant

weary jungle
#

where is the nodes coming from???

#

i cannot understand this

#

i took like 30 minutes finding random parts of code

#

so.. create_UIBox_options.nodes[1].nodes[1].nodes[1].nodes apparently is the settings ui?

#

im gonna sleep on this

brisk rose
#

Is there a way to do a second soul layer?

mellow sable
#

Yes but afaik you have to do all the work for it yourself

#

Cryptid implements this for exotic jokers

#

Although there’s probably a much easier way now that it’s several months since I implemented that

edgy reef
#

I'd assume it's just like the logic done for normal soul but checking different values and maybe doing different math so the rotation is different.

mellow sable
#

that's basically how Cryptid does it but I'm sure there's some better SMODS way of doing it now that doesn't need lovely patches or hooks

topaz sun
#

is there any context for hand drawn? something that would trigger after context.after

brisk rose
wanton adder
drifting smelt
#

very bad at modding

#

how would i make a mod that adds +16 to the starting cash

wanton adder
#

right

brisk rose
drifting smelt
#

like as base

brisk rose
brisk rose
brisk rose
wanton adder
frosty dock
#

I can add that

brisk rose
oak prairie
#

Hi o/ I would like to change the texture of the collab cards for a mod, is there any gyude or template mod to change textures? I saw a mod that did it but it didn't use a mod manager and it would be great if there is a way to do it with a mod manager :o

brisk rose
#

oh the friends of jimbo collab

#

forgot about that

glossy stone
#

okay thinking about this:
Miracle Paint (uncommon? common?)
+1 hand size this round whenever a Lucky card triggers

How should I balance it

nocturne stratus
#

reverse it? add chance to lucky cards based on hand size?

glossy stone
#

I mean the handsize is because of the "paint" in it but i can see it

#

Like for every hand size over 8, +1 chance to lucky cards?

nocturne stratus
#

i mean i wanted to go full on +8 base chance buff but sure

#

might be op ^^^^

glossy stone
#

MIGHT BE???

glossy stone
#

Holy shit miracle paint randomly came up in my playlist

frigid flame
#

you should probably specify if it does

glossy stone
#

yeah

frigid flame
#

I imagine +1 hand size per lucky card hit would be fair enough then

glossy stone
#

anyways what about this
Bitter Chocolate (Common)
+30 mult, -50 chips
-6 mult and +10 chips every round

brisk rose
frigid flame
#

Rn this is just popcorn with a downside

glossy stone
#

i mean it's bitter

#

maybe it should be a constant upside and a decreasing downside?

#

e.g. x2 mult, -100 chips
+10 chips every round

#

I'll try implementing that

#

or should it be +20 every round?

#

ok that sounds ok

#

and probably bump to uncommon

signal crest
#

is this..

#

2x mult with a downside that turns into an upside?!?

signal crest
#

/j

weary jungle
#

behold!!! data!!!!

hardy viper
#

banger

weary jungle
#

now to spend 70 years learning how to do ui

hardy viper
#

gl widegladeline2

weary jungle
#

what is this

wintry solar
#

where are you getting that from?

weary jungle
#

example mod, escapeExitButton

#
--- MOD_NAME: Escape Exit Button
--- MOD_ID: EscapeExitButton
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Add an "Exit" button into the "Escape" menu

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

function G.FUNCS.exit_button(arg_736_0)
    G.SETTINGS.paused = true

    love.event.quit()
end

local createOptionsRef = create_UIBox_options
function create_UIBox_options()
    contents = createOptionsRef()
    local exit_button = UIBox_button({
        minw = 5,
        button = "exit_button",
        label = {
            "Exit Game"
        }
    })
    table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button)
    return contents
end

----------------------------------------------
------------MOD CODE END----------------------
wintry solar
#

if you want actual UI design code look at Galdur or Flower Pot

weary jungle
#

someone did my idea 😔

#

flower pot

#

time to go on another chase to see where things are

glossy stone
weary jungle
#

how do i do something on keypress?

languid mirage
#

if you're using steamodded, SMODS.Keybind

#

there's an example mod for it

glossy stone
#
local bitterchoco = SMODS.Joker{
  key = "bitterchoco", 
  loc_txt = {
    name = 'Bitter Chocolate',
    text = {
      "{X:red,C:white}X#1# {} Mult,",
      "gives {C:chips}#2#{} Chips",
      "{C:chips}+#3#{} Chips per round played",
    }
  },
  rarity = 2,
  cost = 6,
  config = {Xmult_mod = 2, extra = {chips = -100, chip_gain = 20}},
  atlas = 'OSJokers',
  eternal_compat = true,
  perishable_compat = false,
  blueprint_compat = true,
  pos = { x = 2, y = 2 },
  loc_vars = function(self, info_queue, card)
    return { vars = {card.ability.Xmult_mod, card.ability.extra.chips, card.ability.extra.chip_gain} }
  end,
  calculate = function(self, card, context)
    if context.joker_main then
      return {
        chip_mod = card.ability.extra.chips,
        Xmult_mod = card.ability.Xmult_mod,
        message = "Bitter x2...",
        colour = G.C.MULT,
             }
    end
    if context.end_of_round and not context.repetition and not context.game_over and not context.blueprint then
      card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
              return {
                                message = localize{type='variable',key='a_chips',vars={card.ability.extra.chip_gain}},
                                colour = G.C.CHIPS
                            }
    end
  end
  }
#

what the hell is wrong with the chip gain

#

it's supposed to be +20 every round

#

but it goes haywire and goes -100 to -20 to +160 to +340

#

NEVERMIND IT DOES -100 TO 80 TO 260 TO 440

#

WHAT THE FUCK

weary jungle
#

am i missing a }??

glossy stone
#

OH GOD IT GIVES NEGATIVE SCORE TOO

#

NOOOOOOOO

#

I AM FALLING APART OVER HERE

loud citrus
glossy stone
#

(I mean i get the negative score when it's minus but wtf is GOING ON WITH THE CHIP GAIN?!)

loud citrus
loud citrus
glossy stone
#

Eh

#

It's supposed to go -100 to -80 to -60

#

But it suddenly does -100 to +80 to +260

weary jungle
#

nothing seems to be wronf

glossy stone
#

CAT REACT?!?!?

#

damn this is a mystery for the ages

umbral zodiac
#

anyone know how i would reorder the entire deck in a sorted way

#

i have ideas beyong my comprehension

#

this would be fun

glossy stone
#

I also had a joker idea like that
Magnet (Rare)
All hearts are drawn first

umbral zodiac
#

magnet with heartstone and oa6 😍

glossy stone
#

At least this one's easy to implement.

shell timber
#

does it work like blue joker or erosion

glossy stone
#

explain

weary jungle
#

I FORGOT FCOMMANS

shell timber
#

if you have 39 cards and then draw 8 does it trigger

glossy stone
#

39 - 8 = 31, it triggers

shell timber
#

alright

#

that's pretty fun

weary jungle
#

this is the BEST mod ever

glossy stone
umbral zodiac
glossy stone
#

I'm up to like 7.5 implemented jokers. Fun!!

umbral zodiac
#

u have to EARN your fps

weary jungle
#

can you remove the restart animation 🤔

umbral zodiac
#

my method has somehow resulted in having less cards than my deck has while in the shop

glossy stone
#

Anyways, gn chat :3

weary jungle
#

made my first mod 😎

languid mirage
#

I don't know exactly where sorting for G.deck happens, but a wacky way could be hooking draw card function

umbral zodiac
#

cardarea:sort

#

sadly didnt work 😭

languid mirage
#

That's different sort

umbral zodiac
#

ah

languid mirage
#

for G.hand

#

basically if you wanna find where smth is used just select function name and ctrl+shift+f

#

actually it might be something outside cardarea.lua cuz sorting is seed dependent

umbral zodiac
#

i mean shuffle is part of cardarea and that seems to be how the deck shuffles

nocturne garnet
#

WHERE IS THIS JOKER FROM!!!

#

wait

#

yeah where is it from

brisk rose
#

snoreseville

#

and you don't have it installed right

#

you need to use the release or release branch

#

to get all the art

#

and also your version is old

#

it's 1 in 64 fixed probability now

hardy viper
#

oh yeah how do i remove that that thing is so annoying

maiden phoenix
#

Just remove it from the mod ig 🤷

nocturne garnet
hardy viper
#

spades being negative doesn't seem like a curse

tepid crow
#

I'm assuming that's the "purified" version of the curse?

#

though the screenshot order also confused me at first

hardy viper
#

ohh

#

yeah

mellow sable
# nocturne garnet

gotta love how this was coded before the 6-month-old cryptid concept that gives steel and gold cards the negative effect

#

😭

tepid crow
#

implementing an idea usually isn't as cheap as thinking of it tbf

brisk rose
# nocturne garnet

so uh... there should be a differece more than badge color for purified vs active

#

also this makes me think of tetrapak

#

it... almost got ported, but then it hasn't yet

#

it was one of the mods that crashed on 1.0

#

it might work now, never tested the WIP port (it's public)

nocturne garnet
#

i just changed the handsize when a spades card is drawn

wintry solar
#

Does it properly reset when you discard them?

nocturne garnet
# nocturne garnet i just changed the handsize when a spades card is drawn

basically

if context.MODNAMEHERE_draw_card and context.card then
            if context.card:is_suit("Spades") then
                if card.purified == true then
                    G.hand:change_size(1)
                else
                    if context.card.facing == 'back' then
                        context.card:flip()
                    end
                end
            end
        end```
and
```lua
local oldfunc = CardArea.draw_card_from
function CardArea:draw_card_from(area, stay_flipped, discarded_only)
    local ret = oldfunc(self,area,stay_flipped,discarded_only)
    if area:is(CardArea) then
        if #self.cards < self.config.card_limit or self == G.deck or self == G.hand then
            local card = area:remove_card(nil, discarded_only)
            if G.jokers then
                for i = 1, #G.jokers.cards do
                    G.jokers.cards[i]:calculate_joker({MODNAMEHERE_draw_card = true, card = card})
                end
            end
        end
    end
    return ret
end```
nocturne garnet
wintry solar
#

I don’t think so

nocturne garnet
#

im pretty sure it does actually?

wintry solar
#

Also how does it handle converting a card into a spade?

nocturne garnet
#

okay wtf man

wintry solar
#

I only ask because implementing negative playing cards had a few bits that were a bit of a pain

nocturne garnet
#

wait a fuckin minute

#

so thats where this code was

#

damn

teal estuary
#

i know its usually a pain in the ass to ask for this, but i cannot figure it out for myself - does someone have or know where i could find the code that just does the "if X thing happens, gain 0.X amount of mult (starts at X mult)"

stiff locust
#
  1. the config section needs a value which scales
#
  1. you need one context for the "X thing" you want to trigger the increase
#
  1. you need the context context.joker_main to actually give the xmult
languid mirage
#

if you want examples, look in source code

#

for existing scaling jokers

wintry solar
#

Without knowing what the X thing is, it’s hard to point you in the right direction

teal estuary
#

specifically played hands, so if, for example, a flush was played it'd gain an arbitrary amount of mult

languid mirage
#

look at runner's implementation

#

in source code

teal estuary
#

istg, i did not see that before in there 😭

#

i've been using the moddedvanilla jokers as much as possible to learn

stiff locust
#

next(context.poker_hands['Straight'])

languid mirage
#

¯_(ツ)_/¯

teal estuary
#

tf

stiff locust
#

it happens

teal estuary
#

😭

languid mirage
#

try using crtl + F

teal estuary
#

thank you though

languid mirage
#

if you cant find smth

#

it's much harder to miss (unless you're bad at keywords)

teal estuary
#

ofc ofc

stiff locust
#

you can also search balatro's code itself

teal estuary
#

would i change chips to xmult or mult in this context? i presume xmult

nocturne garnet
teal estuary
stiff locust
teal estuary
#

oooh, good to know

#

ty

stiff locust
#

mainly the card = self return location

#

and things like self.ability.extra

languid mirage
#

depends on the file you got that code from

teal estuary
#

im mainly looking in card.lua

#

so

languid mirage
#

if you got the code from card.lua, self is indeed card

teal estuary
#

cool

#

ty

stiff locust
#

sidenote is there a way to force sell a joker

languid mirage
#

I'd try to search the function that's happening when joker is sold from press of a button

#

and see what it does when it is run

stiff locust
#

hmmm

teal estuary
#

would a_chips turn into a_mult or smth?

#

(im converting it all to mult, thats why its.. yeah)

wintry solar
#

Xmult or mult?

teal estuary
#

xmult, yeah

wintry solar
#

Then you need the xmult keys

languid mirage
#

so it will modify chips

stiff locust
teal estuary
wintry solar
#

iirc it’s just xmult

languid mirage
teal estuary
stiff locust
#

i don't want anything that triggers on sell to trigger

languid mirage
#

ok yeah then just do that

stiff locust
#

card:start_dissolve({G.C.GOLD}) should just work then?

#

i sure hope it does

languid mirage
#

start_dissolve removes card

#

ease_dollars adds money

stiff locust
#

alright

#

i also don't want it to add money

#

well hold on but

stiff locust
#

i just want the card to vanish and not trigger any effects

wintry solar
#

It depends how people patch in their destruction effects

stiff locust
#

i see

#

is there a way I can work around that without being able to change their destruction effects

teal estuary
#

anything here that looks off?

stiff locust
#

which makes it change based on game language

#

message = localize('k_upgrade_ex') should do that

teal estuary
#

ty

mental nacelle
#

is there a way to patch at a specific line (for instance, if there are multiple identical lines)

stiff locust
#

other than that i cant see anything that looks off

teal estuary
#

yipee!!

#

im leardining

stiff locust
#

and then if that is the same as the line below the one you wanna patch at in the actual code then you know it's the right one

#

(there's probably an easier way to do that but that's how i would do it)

mental nacelle
#

i might be silly i cannot find this

languid mirage
#

unfortunately for multi line patches you need to use regex

teal estuary
#

it just gained mult for a hand its not meant to, splendid trianglepupper

#

*it gains mult for EVERY hand played, even splendider

languid mirage
#

you have it trigger if hand contains high card

teal estuary
#

oh

#

oh right

stiff locust
#

yeah every hand contains high card

teal estuary
#

whoops

stiff locust
#

you can return the name of the played hand in a different way i think

teal estuary
#

i forgot thats how it worked 😭

stiff locust
#

probably one of the values returned by the line local text,disp_text,poker_hands,scoring_hand,non_loc_disp_text = G.FUNCS.get_poker_hand_info(G.play.cards)

teal estuary
#

this wont be an elegant way of doing it, but could i just brute force it by putting and not [hand] and not [hand] and not [hand]? raisedcateyebrow

stiff locust
#

you could but i wouldn't do that route

teal estuary
#

fair enough

languid mirage
#

you want it to only trigger on exactly high card?

teal estuary
#

yuh

languid mirage
#

pretty sure you can check that played hand is exact hand type?

wintry solar
#

It’s context.scoring_name iirc

#

Check the context guide

teal estuary
#

so something like (context.scoring_name["Hand Name"])? (reading through it rn)

languid mirage
#

no

#

scoring name is a string

#

not table

wintry solar
#

context.scoring_name == ‘High Card’

teal estuary
#

oooh, mb

languid mirage
#

probably would be nice to have entry value types in contexts guide

#

at some point

teal estuary
#

yuh

#

but ofc, this is already helpful enough

hardy viper
mental nacelle
#

self is apparently a boolean value according to balatro today

teal estuary
#

😭

teal estuary
languid mirage
#

no

#

😭

teal estuary
#

😭

languid mirage
#

you should try to understand what a lua table is

#

next() and table['key'] is essential lua syntax you need to understand

teal estuary
#

sure, okay (im not sure how to express a "sure" more intuitively)

wintry solar
nocturne garnet
teal estuary
#

i fixed it (by just not being stupid), however final issue - it doesnt actually give the mult and just displays an ERROR graphic 😭

#

the number does go up tho, which is nice

wintry solar
#

The localize key is wrong and the return key should be just xmult iirc

nocturne garnet
#

where the hell does it draw cards

#

i thought it was draw_card but its hella confusing

wintry solar
marble vine
#

what IDE/code editor do yall use?

teal estuary
#

Visual Studio Code

#

pretty good

loud citrus
# marble vine what IDE/code editor do yall use?

Notepad++
Not fancy but takes up no space and runs on pretty much everything, it can also edit many file types and has nifty tools for helping identify if your following the rules of the programming language.

brisk rose
#

it's a lot better than Windows' notepad and gets the job done for the little coding-adjacent stuff I currently do

marble vine
#

Interesting
I tried to setup mint before but i couldnt use the internet 😭

marble vine
marble vine
brisk rose
marble vine
#

I know, i realy want to setup dual booting but

brisk rose
#

though I guess it might just expect your shitty wifi arapter to be the normal intel and the couple other brands

#

I mean the chipset

#

which still applies to external adapters I think

marble vine
#

using this ✨ amazing ✨ usb adapter

#

(it disconnects and crashes my pc once a day)

brisk rose
#

tbh my wifi adapter situation has always been spotty. I dunno if it's linux or the... high end but poorly built, clevo laptop hardware

marble vine
#

i had issues even finding the windows driver for it, and there was just no linux one, at least not an official one

brisk rose
#

my wifi always disconnects and I have to flip it on and off to reconnect

brisk rose
#

in linux

#

iirc

marble vine
#

id just write my own but thats a learning curve i cant tackle yet 😭

brisk rose
#

what I mean is like... we don't really use traditional software drivers in linux land for most things. Besides like graphics cards it mostly all gets built into the kernel

#

like... I have a utlity called 'driver manager' and it's only for my gpu

marble vine
#

interesting

#

so mine just isnt built in

brisk rose
#

yeah, I guess so. I really am not an expert at the technical side of things so am likely getting things at least slightly wrong

#

but that's my understanding

stiff locust
#

alright chat how do I make an edition shader

#

i have a good idea of what I want it to look like and what I want it to do

#

but i don't understand edition shaders

feral belfry
#

hey, so im trying to make a copy of an existing mod to mess with the values, but the game keeps crashing on me, as ive changed the name of the file to diferentiate them. How can i fix this?

#

or, rather, how can i work around it

frosty dock
#

you need to give it a different mod ID

#

if you're running both

brisk rose
#

the mod id

feral belfry
#

where can i find that

frosty dock
#

top of the mod file

#

there should be a line that reads like --- MOD_ID: id_here

feral belfry
#

where

brisk rose
#

main.lua

feral belfry
#

oh alright thanks

brisk rose
#

a mod's main file, which has the ehader is usually either named [mod name] or just... main

frosty dock
#

out of curiosity, what mod is it that you're trying to modify?

brisk rose
#

god it has an overcomplicated structure for how simple it still is

#

but i guess it's just hyper-organization

#

and prepping for the future

feral belfry
#

oh uh

frosty dock
#

oh then you also need to change the mod prefix

feral belfry
#

should i try modifing something simpler?

frosty dock
#

but either of these will just result in something not loading

brisk rose
frosty dock
#

so it's more likely you just messed up somewhere

brisk rose
#

oh i see

#

nvm

feral belfry
#

im trying somestuff

brisk rose
#

you're just adding additional info to make sure it works

feral belfry
#

i mean the game loads but opening up any collection menu instantly crashed

brisk rose
feral belfry
frosty dock
#

looking at the code, changing the prefix does more bad than good

#

so don't

#

that looks more like steamodded just isn't loading the mod though

#

mind showing me the top few lines of main.lua?

feral belfry
#

is it something to do with the local prefix?

frosty dock
#

is the folder name 'Ceres'?

feral belfry
frosty dock
#

then that's your problem, the code assumes it is

#

also change the prefix back

feral belfry
#

alr

#

so i guess ill have to store standard ceres on a different foldder

frosty dock
brisk rose
#

Question, what exactly does the line that reads 'DeFused= {}" (used to read 'FusionJokers = {}" do?

#

I kept it because well.. i didn't wanna break anything

maiden phoenix
#

It's where the fusions are saved iirc

brisk rose
#

this is a 0.98 mod

maiden phoenix
#

I do the same for JokerEvo

brisk rose
#

so nothing in my case?

feral belfry
#

alr it works now! thank yall

maiden phoenix
#

Well you don't use it to save anything

frosty dock
#

it just creates a global table with that name

brisk rose
#

ah I see

#

god I really need to actually learn basic lua syntax

#

lmfao

frosty dock
#

I would have assumed the original would use it for function references or other globals, but if you were able to rename it without consequences, I guess that's not true?

feral belfry
#

alr this seems way too confusing to understand with no programming knowledge idt im doing this anymore

frosty dock
#

yeah that's a fairly important prerequisite lmao

feral belfry
frosty dock
#

then learn

frosty dock
feral belfry
#

aye captain

#

does my scratch knowledge translate at all here lol

#

programming languages are just scratch blocks but without the blocks

frosty dock
#

i guess the concepts translate

teal estuary
#

is it worthwhile to essenitally copy joker code from card.lua, and change necessary (like self > card) things to the API to make a new joker? im currently trying to botch a couple pieces of code together to make something that works 😭

frosty dock
#

it's certainly easier to use other modded jokers for that

#

it's an option but base game code for joker calculation is far from clean

teal estuary
#

essentially a joker that has a chance to give any played card a permanent either mult, chips or money attached to it - its definitely.. a lot 😭

#

i’ve been trying to both together hiker, cavendish and walkie talkie code, but i just couldn’t figure out how to make it all… work

frosty dock
#

well hiker-style money and mult don't exist in vanilla so there might be some patching involved to make that work. I'd refer you to a mod that does this but I can't think of one rn

teal estuary
#

that is fair enough tbh 😭

#

im happy to forego that if its too much effort, essentially all i wanna do is a random-lucky card generator, but in a hiker format

#

(since i love the hiker’s effect)

brisk rose
#

but it's also kinda broken (the mod in general) atm

#

but @dense jasper is working on that

umbral zodiac
#

amazing deck

obtuse badge
crisp coral
#

...which can easily be worked around so shrug

raw loom
glossy stone
crisp coral
#

i have a hunch that your end_of_round context is wrong

#

but i cannot check

tepid eagle
hardy viper
glossy stone
umbral zodiac
#

very serious deck

#

every frame the winning ante goes up by 1 so u cannot win with it

umbral zodiac
tepid eagle
#

ill add my new joker which lets you wins 1 game per round

hardy viper
umbral zodiac
#

good point ill make it always equal your current ante *2 + 1

hardy viper
#

eval (win_game or G.FUNCS.win_game)()

umbral zodiac
#

how would i theoretically patch (or override idk what its called in lua) win_game to not work

#

in theory

#

nevermind

umbral zodiac
hardy viper
#

it's over

umbral zodiac
#

NO WINNING ALLOWED

zinc zenith
#

If i'm making a custom challenge mode, if i want to ban a voucher do i put it under banned_other with it's ID like the others? such as v_paint_brush?

umbral zodiac
orchid thunder
umbral zodiac
orchid thunder
#

But that's the whole point of balatro

#

Is to win

umbral zodiac
#

no winning

#

i royally decree

#

you cannot win

orchid thunder
#

Il figure out a way to win

umbral zodiac
#

u literally cannot 😭😭😭

orchid thunder
#

What is I use the crash Ace to block the code that stoped you from cheat winning then just win

umbral zodiac
#

how would you block it from working

orchid thunder
#

Idk make a code that re-enables winnnig

umbral zodiac
#

i mean you can technically just manually run all the code that the win_game function runs but as far as i know i dont think you can just undo the override

orchid thunder
#

Just use crash to delete the deck from the game

umbral zodiac
#

can you do that

orchid thunder
#

Idk

umbral zodiac
#

bruh

orchid thunder
#

But I might as well because the deck is pointless

umbral zodiac
#

not really

orchid thunder
#

You can't win

umbral zodiac
#

do u play balatro for the fun or do you play balatro for the win

orchid thunder
#

For both

umbral zodiac
#

if the latter i suggest you reconsider

orchid thunder
#

It's not fun if I'm forced to lose

umbral zodiac
#

youre forced to play endlessly

orchid thunder
#

There is a thing called

umbral zodiac
#

the win ante goes up as your current ante goes up, so gameplay doesnt stop at ante 8

umbral zodiac
orchid thunder
umbral zodiac
#

at first i thought you were saying endless is mid

#

but are you saying "theres a thing called endless mode" ?

orchid thunder
#

Yes

umbral zodiac
#

i am aware

orchid thunder
#

Why be forced to lose when I can win and still go endless

umbral zodiac
#

you arent forced to lose

#

theres just no popup for you to win

#

same as if you won and decided to keep playing endlessly

orchid thunder
#

No win= lose

umbral zodiac
#

i mean by that logic endless mode is also a loss (ignoring naneinf)

#

both end the same way

#

one has a popup saying you won

orchid thunder
#

No because you already won

umbral zodiac
#

man its not like it undoes your progress 😭

#

you hit ante 9, you keep going with no popup, no different gameplay-wise to what would happen if i didnt disable winning

orchid thunder
#

When I lose the lose screen changes

tepid sky
#

Anyone knows how i would change a shader?

#

Do i like make a lovely patch?

#

Or sum

wintry solar
#

you can't patch shaders, you'll just have to make a new one

tepid sky
#

Hmm alr

#

Ty

glossy stone
brisk rose
maiden phoenix
wintry solar
#

^ this needs to be patched in to functions/state_events.lua though in your situation I think

#

or you can check for the current chip value first and if it's less than your modifier just return that

glossy stone
#

okay chat how do I check if discarded hand contains a straight OR 3oak OR flush... It should be easy but I can't get the check working

wintry solar
#

iirc it should be accessible as hand_chips

glossy stone
#

thanks

glossy stone
glossy stone
#

still SakiFall

crisp coral
#

get_X_same(hand, 3)

wintry solar
#

use context.scoring_hand and check for those ones

crisp coral
#

and get_flush(hand)

glossy stone
crisp coral
#

then check whatever Burnt Joker uses

glossy stone
#

do I just have to check for straight 3oak and flush? will that contain stuff like flouse and strush

crisp coral
#

yes

nocturne garnet
crisp coral
#

me when i post the same video in two channels

nocturne garnet
brisk rose
glossy stone
#

I tried to use level_up_hand cuz i see pampa's The Dream use it.
what the fuck

nocturne garnet
glossy stone
crisp coral
brisk rose
#

obviously

nocturne garnet
#

that is some abysmal resolution

tepid sky
glossy stone
#

i tried to use evaluate_poker_hand because i see a joker that checks for discarded full houses that way and wtf 2

#

i wish i could use context.poker_hands miramiku_dead

#

WHY CAN'T I CHECK THE FUCKING POKER HANDS

#

WHY IS IT SO HARD

tepid sky
#

🤷‍♂️

glossy stone
glossy stone
#
local trashtrash = SMODS.Joker{
  key = "trashtrash", 
  loc_txt = {
    name = 'Trash And Trash!',
    text = {
      "If discarded poker hand is",
      "{C:attention}Three of a Kind or better,",
      "{C:attenti}level up{} said poker hand",
    }
  },
  rarity = 3,
  cost = 8,
  atlas = 'OSJokers',
  eternal_compat = true,
  perishable_compat = true,
  blueprint_compat = true,
  pos = { x = 3, y = 2 },
  calculate = function(self, card, context)
    if context.pre_discard and not context.hook then
        local text,disp_text = G.FUNCS.get_poker_hand_info(G.hand.highlighted)
        if text ~= "High Card" or "Pair" or "Two Pair" then
                card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
                update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
                level_up_hand(context.blueprint_card or self, text, nil, 1)
                update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
end
end
end
  }

okay so what's wrong here, why can't this check if the hand is HC or pair or 2pair? what does get poker hand info actually do, what does it store the hand info as

#

i found the get poker hand info thing, how do i check

#
local trashtrash = SMODS.Joker{
  key = "trashtrash", 
  loc_txt = {
    name = 'Trash And Trash!',
    text = {
      "If discarded poker hand is",
      "{C:attention}Three of a Kind or better,",
      "{C:attenti}level up{} said poker hand",
    }
  },
  rarity = 3,
  cost = 8,
  atlas = 'OSJokers',
  eternal_compat = true,
  perishable_compat = true,
  blueprint_compat = true,
  pos = { x = 3, y = 2 },
  calculate = function(self, card, context)
    if context.pre_discard and not context.hook then
        local text = evaluate_poker_hand(G.hand.highlighted)
                if text["Straight"] and text["Straight"][1] or text["Flush"] and text["Flush"][1] or text["Three of a Kind"] and text["Three of a Kind"][1] then
                card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
                update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
                level_up_hand(context.blueprint_card or self, text, nil, 1)
                update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
end
end
end
  }

I tried to use evaluate_poker_hand but it broke AGAIN for a different reason

#

i think it's something to do with the G.GAME.hands.[text]? Don't know how to replace it tho