#đŸ’»ăƒ»modding-dev

1 messages · Page 32 of 1

royal ether
#

chat i have no motivation to code :programming:

fast badge
#

then uh

#

dont

royal ether
#

ok

remote coral
#

What?

fast badge
slow ocean
fast badge
nocturne garnet
#

which one of these values correspond to the chip count

crisp coral
#

hand_chips i believe

nocturne garnet
#

either talisman changed something or i just did something wrong

maiden phoenix
#

What if you just do "chips = chips" ?

nocturne garnet
maiden phoenix
#

I remember having to refer to chips for a joker I made

nocturne garnet
#

hmm

#

what is args referring to here

maiden phoenix
#

The parameter from trigger_effect

maiden phoenix
nocturne garnet
#

what is used to trigger it

maiden phoenix
#

Just look at what trigger_effects functions calls elsewhere

zealous glen
#

It only appears twice and you’re looking at one appearance

nocturne garnet
zealous glen
nocturne garnet
#

and it isnt G.GAME.chips, thats score

zealous glen
nocturne garnet
#

oh my god

#

what is hand_chips

#

and why cant i use it

#

i keep seeing it

wintry solar
#

It’s in the evaluate_play function

#

It’s what it refers to as the number of chips scored in the hand

#

Just a local variable iirc

elfin nimbus
#

Not sure if this can be done, but is there a way to make it so that a Joker always triggers after another Joker regardless of position, if they both have to trigger in context.before?

#

Like, say I wanted a Joker to trigger after DNA triggers, regardless of position, but before any scoring Jokers. Is there a way to do that?

bold osprey
#

Could there be a problem if a Mod ID or a Mod Name is too long with Steamodded ?

frosty dock
#

names in mod badges are cut off, so no visual issues there

#

can't think of any non-visual issues, anyway

frosty dock
#

👀

edgy reef
#

What's being cooked?

mellow sable
#

👀

frosty dock
edgy reef
#

oooh, how would this work?

frosty dock
#

no "would"

#

i just implemented this

edgy reef
#

So it looks for a localization file and loads it into G.localization?

frosty dock
#

it looks for a file in Mods/your_mod/localization/ (either the current language, or default.lua or en-us.lua)

#

and it loads non-destructively into G.localization (fun fact, this code worked first try)

stray warren
#

How do you deal with two function hooks conflicting with each other? Is there a way to prevent one overwriting the other, or force one to load last?

frosty dock
#

just make sure the reference to your original function isn't global / reused

stray warren
#

This is the correct way to do it, right? At least that's what i've seen done before.

frosty dock
#

yeah looks right

stray warren
#

and then I return the table_val variable at the end

frosty dock
#

so what's the issue?

stray warren
#

Well some of the jokers in the PampaJokers pack use this same hook, and from my testing, the jokers that use the hook overwrite my hook, and the ones that don't use the hook, don't overwrite my hook

#

I guess this would apply to any modded joker that used that hook

frosty dock
#

does PampaJokers override this function destructively?

stray warren
#

I'm not quite sure what defines that, but this is the beginning and end of their function:

local generate_UIBox_ability_tableref = Card.generate_UIBox_ability_table
function Card.generate_UIBox_ability_table(self)

and end:

 return generate_UIBox_ability_tableref(self)
end

It seems like they do the same thing

frosty dock
#

I've forgotten how terrible not using lovely for these functions is

#

it should be fine so long as your mod loads last

#

given you always use the return value

#

add this at the bottom of your mod header

#
--- PRIORITY: 100
stray warren
#

That seems to have worked! Thank you!

frosty dock
#

np

stray warren
#

So I've been using self.area == G.I.CARDAREA[7] to access the shop cardarea. Is there an actual name for this? Like the others are G.jokers and G.pack_cards

stone fossil
#

i cant for the life of me find where the descriptions for the jokers in the source code are. want to look at how i can use the formatting

stray warren
stone fossil
icy drift
#

Me making a joker go "Nope" using card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize('k_nope_ex')}) (Don't mind the weirdly sized border, windows capture is being weird)

nocturne garnet
#

i am not a very smart person

#

how do you get and use hand_chips

#

its not there by default, and i cant find how to get it

wintry solar
#

where are you trying to use it?

nocturne garnet
#

its supposed to happen whenever a face card is scored

#

im assuming i cant use hand_chips on every context huh

#

damnit

wintry solar
#

hand_chips is in the evaluate_play stack

#

you can't access it from anywhere else

#

what are you trying to do to it?

nocturne garnet
#

i just wanted to use it in a calculation

#

just a X1.2 chip mult whenever a face card is triggered

maiden phoenix
#

You tried "chips" ?

#

Oh I checked my code and I actually use hand_chips in a context.after

wintry solar
#

I don't think hand_chips is ever passed through apart from the deck calculation

#

although I also don't see where it is ever defined?

#

unless it's global

zealous glen
storm shale
#

I had a challenge idea in which the player starts with a full deck of permanently debuffed cards. How would I go about making that show up in the starter deck?

#

I think I can get everything else set up except for that by looking at the challenges code and some other mods that have added challenges.

storm shale
#

I did an alternate method but the challenge is locked. How do I make it unlocked?

crisp coral
surreal marsh
storm shale
#

err, 20/21*

crisp coral
#

oh

#

prolly a hardcoded thing shrug

storm shale
#

regardless i'm gonna have to figure out a better place to inject my change because I'm currently doing Blind:debuff_card but I think that causes that one joker that triggers when boss blind is triggered to trigger

oblique gust
#

guys how can i get the localized name of a modded joker from my mod? (load priority considered). for 0.9.8.
simply using G.localization or localize{type = 'name_text', key = xxx, set = 'Joker'} just wont work, but for vanilla jokers both works fine

tepid crow
#

hey guys, is there a good example of how tags are implemented in steamodded somewhere?

#

either an example in steamodded itself or a mod that does it would work
nevermind, think I found it

tepid crow
oblique gust
#

correct

tepid crow
#

can I ask where and why? it seems kind of counter-intuitive

#

the best reason I can come up is some kind of "when ... spawns joker X"

oblique gust
#

like using it as a loc var for descriptions, showing the name in another joker's infobox

#

if you wanna make a joker that has some co functions with another from another mod in this case its not counter intuitive at all

#

what keeps haunting me is that i can easily get the localized names of vanilla ones but for modded ones its not working, returning a nil, like they got discarded or sum

tepid crow
#

sorry, the reason I used the word "counter-intuitive" is because the base idea of most synergies in balatro is that they synergize on something together, not directly with each other if that makes sense

oblique gust
#

nah ur good im just explaining

neat chasm
#

I've picked up a little bit of lua, but I was advised to look in the balatro source code to figure out how the unmodded stuff works as well. I've figured out everything on that front, and I've found the code says what jokers are and what they require to be jokers, but I was wondering if someone could point me toward the info on individual jokers, as I can't find it. All good if not, I get discussing source code could be a touchy thing.

fallen tendon
#

most everything you need is either in card.lua or common_events.lua

neat chasm
#

thanks!

zealous glen
spice scroll
#

hey i have this joker here which gives more mult foir each 2 in the deck

#

and i copied the code and edited it from cloud 9

#

but the joker doesnt seem to update as often as cloud 9? and it doesnt use the current deck in the collection menu

#

anyone know whats up?

zealous glen
#

And not G.deck?

spice scroll
#

thats how it was in cloud 9 but ill try it

#

yeah no playing cards was right that broke it

hushed estuary
#

There might be another calculate

#

Like, for a different context

#

Actually nevermind

spice scroll
#

maybe its cause its only calculating unde rjokerinfo.calculate? but idk

#

tbh its not too important because the joker works for all calculations its just a bit laggy on updating sometimes

crisp coral
#

Cloud 9's check for 9s is under update not calculate

#

the former updates every frame (hence you'll always see C9 displaying correctly), the latter only updates every action

spice scroll
#

ooooohhh okay thank you very much

#

so would i do function jokerInfo.update?

#

like this?

crisp coral
#

is this 1.0.0?

spice scroll
#

nope

crisp coral
#

if this is 0.9.8 then you'll need to hook onto Card.update

#

ah

spice scroll
#

okay yeah thats giving me the same results so, hook onto card.update?

crisp coral
#

yup

spice scroll
#

how would i do that

oblique gust
crisp coral
spice scroll
#

cool thank you ill try it

#

btw while youre here i wanted to ask

#

is it possible to have infoboxes on different columns

#

cause this onne kinda escapes the screen lol

crisp coral
#

it'd need a rewrite of the uibox likely

spice scroll
#

alright

spice scroll
# crisp coral

im assuming this goes in main and not in the joker file

crisp coral
#

you can try adding your own localization of Wheel of Fortune instead

spice scroll
#

and ill have to add a key to the joker manually or is that just the slug?

crisp coral
#

should be your slug, with a "j_" at the beginning

#

so if your slug is joker_slug, your key is j_joker_slug

spice scroll
#

it works

#

thank u

#

ill put u in the special thanks :)

spice scroll
#

ok sorry but where would i define what the #1# value is here

edgy reef
spice scroll
#

i think my solution is gonna be to just define my own wheel of fortune description without the additional definitions

edgy reef
#

It’s what determines if the card info text (I.e. name and desc) is above or below the card.

spice scroll
#

i just gotta find out how to make it point to G.GAME.probabilities.normal

oblique gust
frosty dock
#

it doesn't happen at load

#

if it does, it will get eaten by a loc reset

#

wait no, 0.9.8

#

screw me

#

it does happen at load then

#

you'd have to do it post-load then somehow

oblique gust
#

im more confused rn lol. like, post steamodded load?

#

do i have to use lovely to do it?

#

now it became much harder than i thought itd be

oblique gust
#

aight i got this. its SMODS.Jokers['j_modded_joker'].loc_txt.name

#

now its much more easier than i originally thought

nocturne garnet
#

i dunno about you but i dont think 15 * 2 is 60

zealous glen
#

But 15*4=60

sonic mortar
frosty dock
sonic mortar
#

what? why are you pinging me? slugwhy

frosty dock
#

oops

#

sorry

nocturne garnet
#

am i??

#

its just a message though

frosty dock
nocturne garnet
#

yeah i knew that would probably happen

frosty dock
#

it also modifies hand_chips

nocturne garnet
#

OH.

#

i did not know

wintry solar
#

Just make a local variable for your chips and return that outside of the for loop

nocturne garnet
wooden nexus
nocturne garnet
#

why is what what

wooden nexus
#

your video

nocturne garnet
#

oh

maiden phoenix
#

OBS moment

nocturne garnet
#

resolution or something i dunno

#

i just use this things recorder

wooden nexus
#

Don't use that lol

nocturne garnet
#

why not

wooden nexus
#

Because you can't fix the problem that way

#

use OBS

#

much better for ya

shell tangle
#

Is there something wrong with this grammar? Still a tad unfamiliar with lua, so, might be obvious somehow, but this is throwing an error saying that the bracket doesn't get closed.

  SMODS.current_mod.process_loc_text{
    G.localization.misc.dictionary.b_play_cap = "START"
    }
end```
crisp coral
#

that's not how you use process_loc_text

#

your function would be

function SMODS.current_mod.process_loc_text()
    SMODS.process_loc_text(G.localization.misc.dictionary, "b_play_cap", "START")
end
shell tangle
#

Completely different than I expected. I'll compare it with the source code and see which parts are connected, hopefully figure it out myself, but, might end up coming back for clarification. Thanks.

maiden phoenix
#

should specify "card"

nocturne garnet
#

arghhh what did i do wrong this time

maiden phoenix
#

When you iterate over the jokers, the sold one becomes nil

#

I think

crisp coral
#

self.ability.name should be card.ability.name

maiden phoenix
#

That too

native gorge
#

hey ! you probably got this question a thousand times but, i would like to create balatro mods, is there some tutorials somewhere please ?

frosty dock
#

other useful resources include code of other mods as well as Balatro's source code, which you can view by extracting Balatro.exe with 7-zip

native gorge
#

should i come here if i have some question or can i dm you @frosty dock ?

zealous glen
#

Can't it work like calculating jokers?

maiden phoenix
#

It's the same logic but it doesn't work 1:1 the same

zealous glen
#

Couldn't you hook calculate_joker?

maiden phoenix
#

That's how it works yea

zealous glen
#

hmmm

#

I think using the existing contexts covers most cases I can think of

maiden phoenix
#

Gonna add a "Reach times X the score goal" too

zealous glen
#

@mellow sable Idea: do you think it's possible to attach an AnimatedSprite to a Joker (like a soul sprite, but its own individual object) without crashing the game?

mellow sable
#

ooh

#

Probably

frosty dock
#

I am not always available

#

and I'm not the only knowledgeable person around here, either

native gorge
#

i have a question, as i'm starting to learn how it works, i'm gonna ask stupid questions lol : i'm looking at the dna joker in the game.lua file and i don't understand why there's nothing in the config section (see in the image)

wintry solar
#

the config is where the jokers store extra values, often the amount of mult/xmult/chips they give. DNA doesn't have any of this and all it's logic is done when calculated

native gorge
wintry solar
#

yeah, look in card.lua at calculate_joker

native gorge
#

can't find calculate jokers 😕

#

and i don't understand card.lua xD

nocturne garnet
native gorge
#

and i guess this is the config for the dna joker, right ?

#

also, how do you use a different text editor for this file ? u just extract balatro, edit and compress ?

nocturne garnet
#

whar

native gorge
wintry solar
#

yes

zealous glen
native gorge
#

Thx !

stray warren
#

I'm getting an error in my code: attempt to call field 'end_calculate_context (a nil value). I'm on version 1.0.0-ALPHA-0608a-STEAMODDED and this occurs within the JokerAPI example mod. Any ideas what I could be doing wrong?

#

I've got the crash report if that would help

mellow sable
#

The example mod is outdated

stray warren
#

It was doing that with a different custom joker as well. This is the calculate function for it:

calculate = function(self, context)                 --define calculate functions here
        if G.GAME.blind.triggered and not context.blueprint then 
            card.ability.extra.x_mult = card.ability.extra.x_mult + 0.25
        end
        if context.end_of_round and not context.individual and not context.repetition and not context.blueprint and G.GAME.blind.boss and not self.gone then
            card.ability.extra.x_mult = card.ability.extra.x_mult + 0.25
        end
        if SMODS.end_calculate_context(context) then
            return {
                Xmult_mod = card.ability.extra.x_mult,
                card = self,
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.x_mult } }
            }
        end
    end,
crisp coral
#

function(self, card, context)

#

end_calculate_context should be context.joker_main

stray warren
#

That seemed to do it for me. Thanks!

stray warren
#

Is this how you access the hand_type of the current scoring_hand? if v.config.hand_type == context.hand_type then I'm not quite sure how to access that

crisp coral
#

what is v?

stray warren
#

I'm looping through the planets in G.P_CENTER_POOLS.Planet

#

it's the value at that index

crisp coral
#

the context should be context.scoring_name

stray warren
#

Sweet, that fixed the error i was getting

spice scroll
#

okay so for this joker

#

i wanna have a message showing what hand was the last hand played

crisp coral
#

oh yeah i just did that for one of my jonklers lmao

spice scroll
#

and basically keep track of the last hand played and compare it with the current one to gain mult

crisp coral
#
if context.cardarea == G.jokers and context.before and not context.blueprint then
  local hand = context.scoring_name
  if hand == card.ability.extra.last_hand_played then
    --- increase xmult
  else
    --- reset xmult
  end
  card.ability.extra.last_hand_played = hand
end
spice scroll
#

but for now this is crashing the game upon hovering over and im not sure why, cause i looked at another modded joker for reference and its able to have a variable be a string just fine

crisp coral
#

your extra.crack_hand is a table not a string

spice scroll
#

ohhhh i just get rid of the parenthesis?

#

or

#

brackets

crisp coral
#

yeah

frosty dock
#

sorry I'm tired

#

nvm me

crisp coral
#

aure go to sleep

frosty dock
#

no

#

I just woke up

crisp coral
#

go back to sleep

frosty dock
#

don't mind me

#

I'll go away

crisp coral
#

(if the last_hand_played is not nil, return the localization for the hand played, otherwise return the localization for none)

spice scroll
#

is your joker basically the same as this one? lol

crisp coral
#

mine levels up hands

spice scroll
#

ah

crisp coral
#

but similar trigger

spice scroll
#

can i see?

crisp coral
#

mm it uses 1.0.0 functions

spice scroll
#

oh im just curious as to what it is lol

crisp coral
#

oh lmao sure

spice scroll
#

nice

#

btw heres mine in game it uses sould for the hand

crisp coral
#

clever tbh

spice scroll
#

ty

#

all of them currently

#

ngl it feels so weird coding without semicolons lol

crisp coral
#

i think i'd die when i have to use c++ again

unkempt thicket
#

what is 1.0.0 version of this?

crisp coral
spice scroll
#

i edited it a bit to add a multiplier if the hand is none and i think its working properly now

#

thanks for the help

#

dios mio

#

i can already tell this is going to be annoying accidentally playing a straight flush

spice scroll
#

how do i get this to only trigger once per end of round? its triggering a bunch of times

crisp coral
#

context.end_of_round triggers for every card

#

you also need to check not context.individual and not context.repetition

spice scroll
#

so like this?

#

think its working now yea thanks

maiden phoenix
#

Or just use context.joker_main

crisp coral
#

context.end_of_round does not have a context.joker_main

spice scroll
#

what is the variable for your current score?

#

G.GAME.chips?

maiden phoenix
gaunt thistle
#

the somewhat-technical reason is that Lovely hooks the Lua runtime before the game is even loaded. the best language for this is something that compiles to a native binary - C++ and Rust were the obvious choices, I went for the latter because I'm way more productive in it.

spice scroll
gaunt thistle
#

(reading back through message history)

spice scroll
#

knockin em out today

gaunt thistle
#

if the author is here then you definitely should not be redistributing a modified balatro executable

frosty dock
#

💀

gaunt thistle
#

yeah, I found 3 others that were doing the same thing.

crisp coral
#

💀

nocturne garnet
#

did anyone make a soyjak joker yet

#

if not i will be truly disappointed

nocturne garnet
#

they're scared of him

nocturne garnet
#

how can i get a joker's name and extras if its not in the deck

#

im trying to make a joker that copies a completely random joker every blind

vivid eagle
#

that

#

already exists lol

nocturne garnet
#

damn

vivid eagle
#

though maybe not exactly like you envisioned

nocturne garnet
#

still, how do i do it?

maiden phoenix
nocturne garnet
#

works with steamodded 1.0.0-alpha right?

mellow sable
#

ye

frosty dock
#

works without steamodded, actually

nocturne garnet
#

ah i see

maiden phoenix
#

works without any device

#

Just shout it out real loud irl

nocturne garnet
#

accidentally summons jimbo, the god of all balatro

nocturne garnet
maiden phoenix
#

You just call it like anything else

nocturne garnet
#

nvm think i understood

wintry solar
#

how would I reference files in the steamodded assets from the game_object.lua?

late socket
#

anybody in here interested in helping me troubleshoot my lua code to make some new jokers?

#

shoot me a message if you want to work on jokers with me

stray warren
#

Is this the context for when a card is getting destroyed?

calculate = function(self, card, context)
        if context.destroying_card then
            card.ability.extra.current_mult = card.ability.extra.current_mult + card.ability.extra.mult_gain
            card_eval_status_text(card, 'extra', nil, nil, nil, { message = localize('k_plus_planet'), colour = G.C.SECONDARY_SET.Planet})
        end
    end,

I tried this, and it's not triggering when I use the hanged man to destroy cards.

unkempt thicket
#

what is the context for selling other jokers in 1.0.0?

mellow sable
#

Take a look at m’s implementation if you want to know more

#

context.card is the card being sold

stray warren
#

Is that the same for destroying_card?

unkempt thicket
lunar patio
spice scroll
#

I FIGURED OUT THIS JOKER BY MYSELF LETS GO

#

im very proud of myself

fast badge
#

goat

spice scroll
#

is there a function for whenever a joker is removed from your jokers for whatever reason?

frosty dock
#

remove_from_deck

spice scroll
#

so jokerInfo.remove_from_deck?

#

or is that a context

frosty dock
#

for 0.9.8 you'd have to hook Card:remove_from_deck()

spice scroll
#

awesome

#

this joker is done then

#

thought it would be super hard but it wasnt bad

zealous glen
frosty dock
#

you actually have to

#

otherwise it breaks if you have 2 and sell one

spice scroll
#

oh dang youre right

#

how would i do that?

#

or

#

actually i could just check if theres another copy when i remove it huh

frosty dock
spice scroll
#

so, at runtime

#

do i just put an if find_joker in the main file?

crisp coral
#

imagine using find_joker

spice scroll
#

i just have this in the main.lua

zealous glen
#

I guess not necessarily

crisp coral
crisp coral
#

with with i get to use two extra characters

zealous glen
crisp coral
#

still gramatically correct

zealous glen
#

As I said

fast badge
zealous glen
#

Skill issue

spice scroll
frosty dock
zealous glen
crisp coral
frosty dock
crisp coral
#

is it still "Grey Joker (WIP)"

spice scroll
#

nope

crisp coral
#

oe

zealous glen
frosty dock
#

why? it finds cards

crisp coral
frosty dock
#

not just jokers

spice scroll
fast badge
#

can it find my dad? 😔

zealous glen
frosty dock
#

if your dad is a consumable, maybe

fast badge
maiden phoenix
zealous glen
#

You need to check inside the function

#

And hook it

zealous glen
frosty dock
#

it isn't even my function

zealous glen
# frosty dock

It doesn’t even find consumables if you don’t have Jokers

frosty dock
#

don't complain to me

spice scroll
#

so like this then

crisp coral
#

not me

frosty dock
crisp coral
#

or aure ig

zealous glen
zealous glen
fast badge
#

hru btw aure, feeling better?

frosty dock
zealous glen
frosty dock
#

getting there

fast badge
#

good good

#

shoulda eaten the Döner

zealous glen
frosty dock
#

but you can have an empty cardarea for jokers and it will still find consumables

zealous glen
#

Only because an empty list evaluates to true in Lua balatrojoker

spice scroll
frosty dock
#

if G.jokers or G.jokers.cards don't exist, you're literally not in a run and have no business calling that function

zealous glen
frosty dock
#

it's empty

zealous glen
zealous glen
fast badge
frosty dock
#

self.cards literally gets initialized to an empty table in CardArea:init()

zealous glen
#

Otherwise multiple mods couldn’t overwrite the same function

zealous glen
spice scroll
#

honestly for now

#

ill burn that bridge when i get to it

zealous glen
fast badge
#

mfw i write non compatible code

spice scroll
#

yeah i did that

fast badge
#

(me when i delete the joker atlas)

spice scroll
#

oh yeah btw

#

got a voice actor from final fantasy to do a line for this mod

#

so thats a thing

mellow sable
#

I’ll probably be a good bit less active this week since my finals are coming up

honest elbow
#

Best of luck to ya

mellow sable
#

tysm

fringe crater
#

Hey guys

#

I'm just porting my mods from balamod to steamodded

#

does steammodded have a console?

#

Some way to run commands like balamod?

crisp coral
#

there's a console with lovely or with the debug tool

#

no direct commands

fringe crater
#

being able to add console commands from inside your own mod is super handy

#

balamod is very good

#

I guess I'll just add a button in-game to trigger what I need

#

oooh i like steamodded's error stack trace

patent helm
#

Every guide and mention of Steammodded im seeing says version 1.x.x but the latest version is 0.9.8 as of April 6th?

fast badge
#

1.0.0 is in alpha and not released yet, its the main branch if you still want to download it

fast badge
#

How do I put multiple lovely patches into one file correctly?

#

maybe you know @zealous glen

#

nvm found it

fast badge
#

@frosty dock Can I not apply patches to the loc files?

crisp coral
#

localization/en-us.lua

fast badge
#

kms

#

thanks

#

Jokes on you, didn't work either

crisp coral
fast badge
#

hmmmm

crisp coral
#

wrong pattern

#

most likely

fast badge
#

Okayie

crisp coral
#

alternatively it just doesn't search in localization

fast badge
zealous glen
fast badge
#

Aha

zealous glen
#

Antonidas after you cast a spell:

gaunt thistle
fast badge
#

Pepega

#

I worked around it so its fine

gaunt thistle
#

gotcha gotcha

#

yeah they're not loaded in the same way as normal game assets

nocturne garnet
#

Me whem

#

this is what i get for searching in steamodded 0.98 mods while making a 1.0.0 mod....

frosty dock
crisp coral
frosty dock
#

ok

royal ether
#

dammit vscode didnt save the tabs i had open

crisp coral
#

steamodded hot reloading is basically unusable for me rn guh

#

if i reload via crash it doesn't load lovely

#

if i reload via mod menu it reloads via steam which is so fucking slow

frosty dock
crisp coral
#

manually reloading

frosty dock
#

it's mostly good for reloading mods that aren't lovely mods

#

there's literally no better way for lovely mods than just killing the game and starting a new process

crisp coral
#

and why wouldn't that work

frosty dock
#

I mean I can try with the executable directly

#

I would just need to figure out how to always know where it is

#

and I also can't disregard launch args

#

which I guess just means I need the argv

remote coral
abstract venture
#

how would you change the behavior of a consumable when used?

#

ik theres a .use() but idk how to use it kittyderp

#

nvm stack overflow got me

abstract venture
#

alr im still stuck, how would i change the value of a planet card mid game?

#

if thats possible

#

like how ectoplasm changes from -1 to -2 when you use it once

wintry solar
#

@frosty dock looking for a way to access the steamodded assets folder for PaletteAPI, any help?

frosty dock
#

that's where I keep the top-level directory of steamodded

#

So SMODS.dir..'assets/' should have you covered for the assets folder

wintry solar
#

I get this error when I use SMODS.dir

#
G.SHADERS['recolour'] = love.graphics.newShader(SMODS.dir.."assets/shaders/recolour.fs")```
this is my code in `game_object.lua`
wintry solar
#

in fact, upon checking, I don't have a SMODS.dir at all

#

oh this is a sequencing error

frosty dock
#

it's not available before mods are loaded

#

during injection should work fine

#

I've made other APIs automatically use it instead of the mod dir when there's no current mod, so I haven't run into that sort of issue

wintry solar
#

yeah I've got it fixed now

#

just needed to throw it through the SMODS.Shader object

brisk pond
frosty dock
#

read Balatro source code and use vscode global search or similar to your advantage

#

at this point someone probably will know if you ask here though

wintry solar
#

you can also throw a lua for k,v in pairs(G.table) do sendDebugMessage(k..": "..tostring(v)) end

#

and it'll spit it all out to the console

frosty dock
#

sendDebugMessage(inspectDepth(G)) balatrojoker

#

note: it will be harder to make sense of than just reading the code

#

this is bad advice

zealous glen
wintry solar
#

there's a built in table printer?

sonic mortar
#

tprint, i believe

zealous glen
#

Also keep in mind if you add anything new it’s good practice to create a sub table for your mod

mellow sable
#

print(tprint(table))

#

tprint just converts it to a string

wintry solar
#

I wish I had known this sooner

zealous glen
#

I think there’s an actual printer but I’m not sure

unreal nacelle
#

This may be a bit redundant of a question to ask here, but how does one code Jokers into the game? (Mainly asking because I have ideas for a 'series' of Jokers, like the Cosmic and Combat Ace series', but have absolutely no idea on how to code, yet I want to give it a shot)

zealous glen
unreal nacelle
#

Which I have no idea on how to do that, since I have no idea where to even start when it comes to coding for Balatro

unreal nacelle
#

No idea on how to do so.

spice scroll
#

add custom sound global is giving me an error, i was told it was included in steammodded 0.9.8 tho

mellow sable
#

Fixed in Steamodded 1.0 🙂

spice scroll
#

whats the method in 0.9.8?

mellow sable
#

Oh I had to update the modloader myself to fix it

#

But the general idea for file-related bugs is to use nativefs to make a copy in the main folder of the game and load the sound with that

wintry solar
#

I had some issues trying to load Cryptid with my palette stuff because of that, but I think it seemed like an issue you have introduced with how you load files there

mellow sable
#

How did you fix that? Want to make it as compatible as possible

wintry solar
#

I didn't

#

I just uninstalled cryptid haha

mellow sable
#

Do you know what the error was?

wintry solar
#

lemme reinstall in and grab the error for you

#

G.SHADERS[self.key] = love.graphics.newShader(self.full_path) offending line

#

but it works perfectly without crpytid/talisman installed

mellow sable
#
shaders = {'recolour', 'negative', 'holo', 'polychrome'}
for _, v in pairs(shaders) do
    local file = NFS.read(SMODS.current_mod.path.."/assets/shaders/"..v..".fs")
    love.filesystem.write(v.."-temp.fs", file)
    G.SHADERS[v] = love.graphics.newShader(v.."-temp.fs")
    love.filesystem.remove(v.."-temp.fs")
end
#

Excuse that formatting issue

#

But I got a similar bug when trying to install and this was how I fixed it

wintry solar
#

Yeah I've seen that, but it seems unsustainable to have to rewrite every file loading with that

mellow sable
#

Pretty sure file loading issues happen even without Cryptid for me

mellow sable
wintry solar
#

I mean I haven't thrown a load of mods in there, but cryptid is the only one I've encountered the issue with so far

mellow sable
#

Idk why Cryptid in particular would cause the bug

wintry solar
#

could it be the nativefs part of talisman?

mellow sable
#

idts

#

you’re not even using nativefs to load the file

wintry solar
#

deleting talisman at least loads the game

#

I was just wondering if something it does overwrites the base game functionality

mellow sable
#

If you remove the Talisman dependency from Cryptid as well, does that load?

mellow sable
wintry solar
#

yes

#

it does load without the dependency

#

look you can have a lovely lesbian white hole

mellow sable
#

wait actually how does Steamodded even load NativeFS?

#

I think it just doesn't use it if it's not there

fallen tendon
#

how the hell do you use the actual steamodded sound api

mellow sable
#

maybe just loading nativefs crashes the shader, period

wintry solar
#

it's in loader

mellow sable
fallen tendon
#

i cannot for the life of me figure out the play function

wintry solar
#

It doesn't load it

mellow sable
#

ok so maybe it's just nativefs causing the crash

wintry solar
#

but

#

you can still use NFS.read

mellow sable
#

it loads love.filesystem into NFS if nativefs isn't found

wintry solar
#

oh yes

#

I can't read

fallen tendon
mellow sable
#

alr lemme paste the relevant source code

wintry solar
mellow sable
#
SMODS.Sound({
    key = "music-Jimball",
    path = "music-Jimball.wav"
})
wintry solar
mellow sable
#

idts

mellow sable
#

I don't think love.filesystem is overridden though

#

it's the other way around

fallen tendon
#

do you play the sound through play_sound()?

mellow sable
#

ye

crisp coral
#

the nfs thing was supposed to be for thunderstore

wintry solar
#

but when I have talisman I don't hit that error, so I guess it's loading it in before this check,

#

and then it kills love.filesystem being used

fallen tendon
#

well thats fun

#

any errors with these?

#

and yes SwordLunge is an mp3 i double checked

wintry solar
#

It can't open a .ogg file?

fallen tendon
#

its an mp3 file

wintry solar
#

the error message doesn't say that though

fallen tendon
#

if i have to convert every mp3 into an ogg i am going to die of pain

#

wait what

#

why is it trying to open an ogg

#

ogg files fail too

#

why is it looking in resources/sounds?

#

what the hell

wintry solar
#

it's doing some fuckery with looking in the base files

fallen tendon
#

how do i make it do some virginity

#

ive been using play_sound('SwordLunge')

#

it there soething else i should use?

mellow sable
#

don't use mp3s

#

convert to wav if you don't like ogg

fallen tendon
#

it happens to oggs too

wintry solar
#

play = function(self, pitch, volume, stop_previous_instance, key) this is how you play it I think

fallen tendon
#

actually ima check if it happens for wav

wintry solar
#

oh you can do play_sound too

fallen tendon
mellow sable
#

I mean I used wavs so đŸ€·â€â™‚ïž

crisp coral
mellow sable
#

although I just used play_sound so play might be bugged

wintry solar
#

I don't see play_sound anywhere in jimball

crisp coral
#

if you use mp3 in your mods i will hunt you down

crisp coral
fallen tendon
#

THIS IS A WAV FILE

wintry solar
#

that explains that

fallen tendon
#

AND IT THINKS ITS AN OGG FILE IN RESOURCES/SOUNDS

mellow sable
#

which calls play_sound internally I think

#

nvm it uses Sound:play

wild gyro
mellow sable
#

but it's not in resources/sounds

wild gyro
#

then put it there

fallen tendon
wild gyro
#

easy

#

(if only)

wintry solar
#

it's not ebign registered properly

#

so it's ending up in the base play_sound function

fallen tendon
wintry solar
#

try putting your mod prefix on the key in play_sound

mellow sable
#

not with global sound

#

SMODS.Sound[prefix]:play

#

or something

fallen tendon
wintry solar
#

đŸ„ł

#

I found that unintuitive at first

#

but once you remember it's okay

fallen tendon
#

yay now i can release v1.2.3

nocturne garnet
#

why the hell wont it work!!!

#

what stupid thing did i do this time

crisp coral
#

g.jokers.cards

nocturne garnet
#

on steamodded 1.0.0?

crisp coral
#

pseudorandom_element takes a table as the first argument, not a cardarea

nocturne garnet
#

dang

crisp coral
#

cardareas are tables but hush

nocturne garnet
#

why must allat be so confusing goddamn

spice scroll
#

im at an impasse, should i change my mod to be 1.0.0a

pros:
-doing custom sounds and music will be (presumably) easier
-i wont have to update it later

cons:
-i have to rewrite the whole mod
-will be harder for vinny to download it if 1.0.0 is still in alpha
-future updates might break it

#

how time consuming is the leap to 1.0.0a?

surreal marsh
# spice scroll how time consuming is the leap to 1.0.0a?

porting is not that time consuming as you may think and you don't need to rewrite the whole mod. The main differences are in this guide (also mod prefix that isn't in it). Once you understand these differences it's just using regular expression to replace old code patterns with new patterns

zealous glen
#

Or using a for loop

frosty dock
zealous glen
#

If you already used a for loop then it ought to be easier

#

IIRC Betmma had bad coding practices balatrojoker

frosty dock
#

I've never intended for that sheet to be complete, either

zealous glen
spice scroll
#

i thiiiiink i am? tbh dps handled the joker setup for cardsauce so

#

yeah i am

surreal marsh
surreal marsh
#

probably because there weren't many voucher mods to reference at that time

frosty dock
edgy reef
#

Choosing to understand Steamodded API has been a blessing. I can do anything.

#

Except UI

#

I barely understand UI

frosty dock
#

no one does blueprint

edgy reef
#

It’s so bad you probably can’t make API out of it without it also being scuffed and unreadable.

oblique gust
#

hey is there any mod using take_ownership in 0.9.8? wanna check some examples

#

or its actually the same as 1.0.0 shown in the doc?

zealous glen
frosty dock
#

e.g.

#
SMODS.Joker:take_ownership('joker')
SMODS.Jokers['j_joker'].config.mult = -4
fast badge
#

(you can give SMODS 1.0.0 take_ownership a table????)

frosty dock
#

yeah

fast badge
#

With multiple jokers?

frosty dock
frosty dock
fast badge
#

Learn something new every day

wintry solar
#

I’m slowly getting a grasp of UI stuff but it’s a long process

oblique gust
#

so i tried like

SMODS["Joker"]:take_ownership('j_joker')
SMODS.Jokers['j_joker'].cost = 1

but it said j_joker is nil, in the second line. am i missing anything?

fast badge
#

SMODS.Joker:take_ownership

#

not SMODS["Joker"]

frosty dock
#

I forgot you have to register in 0.9.8

fast badge
frosty dock
#

SMODS.Joker:take_ownership('joker'):register()

oblique gust
#

like
:register() right

#

okay

frosty dock
#

mb

fast badge
frosty dock
#

💀

fast badge
#

straight back to the code factory

maiden phoenix
#

Ayo?

regal wolf
#

? ? ?

wintry solar
#

That is the most unhelpful crash log I’ve seen in a while

shell timber
#

can you screenshot your install folder

mellow sable
#

They’re devving a mod

wintry solar
#

But why would you have crash reports turned off

frosty dock
#

I'm not sure why that would display

wintry solar
#

How is anybody supposed to provide any insight

frosty dock
#

oh, 0.9.8

#

wait no that still shouldn't show

#

what..

fast badge
crisp coral
#

what steamodded version are you using

fast badge
#

@regal wolf

regal wolf
#

not using steammodded

#

using lovely.

frosty dock
#

oh just lovely

#

that makes more sense

regal wolf
#

i fixed the issue

frosty dock
#

i should have seen that 💀

regal wolf
#

trying to rewrite the sound_manager is a pain though

#

stupid love.threads

crisp coral
#

oh

nocturne garnet
#

where can you find every joker in the game

#

in steamodded 1.0.0a

#

someone told me G.jokers.cards but thats just the jokers that you currently have

zealous glen
#

Maybe centers

wintry solar
#

yeah I think G.P_CENTER_POOLS.Joker should have them all

nocturne garnet
#

omg its finally starting to work

hallow forge
#

i love that sprite

nocturne garnet
#

isnt it awesome?

hallow forge
#

yes

nocturne garnet
#

i worked REALLY hard on the sprite!

hallow forge
#

i can tell

nocturne garnet
#

mane.........................

#

how am i supposed to get name here

hallow forge
#

probably something in P_CARDS or whatever its called

#

G.GAME.P_CENTERS[slug].name?

nocturne garnet
#

im not using steamodded 0.9.8

hallow forge
#

i think that's still there tho unless Steammodded just changes the whole code for the game

#

as in that should work for vanilla jokers at least

nocturne garnet
hallow forge
#

np

nocturne garnet
#

steamodded 1.0.0 uses key instead of slug so i thought it might have changed

hallow forge
#

you may need to do something else for modded jokers tho, im not sure but just a heads up

edgy reef
#

Is this getting the name within the joker description?

#

You can use localize{type = 'name_text', key = joker_key, nodes = {}}

storm shale
#

I'm trying to get my mod working for Steamodded 1.0.0 (I tested with 0.9.8, the last official release) and I'm getting a weird crash log. Something about a "regex" variant that isn't recognized within Toml?? I don't imagine this was caused by my mod at all. I downloaded the zip directly from the GitHub, deleted the old 0.9.8 folder in the Mods directory, and put it in.

crisp coral
#

update lovely

storm shale
#

ah i got 0.4.0 cuz 0.5.0 is in beta so i thought i wasn't supposed to

maiden veldt
#

how would i add the Blueprint/Brainstorm compatible tooltip to one of my own jokers?

spice scroll
#

someone tried to put it into my mod in 0.9.8 and it just refused to work so i have no idea unfortunately

maiden veldt
#

ah, thanks

spice scroll
#

if anyone knows how to though id also like to know

crisp coral
#

why is my music still playing when music slider is 0 uhh

nocturne garnet
#

aw dangit! aw dangit! aw dangit! aw

#

just for one joker.......

crisp coral
#

the problem here is that you're adding a string to your chosenjoker

#

and a string does not have calculate_joker

nocturne garnet
#

aw dangit!

#

i am clueless on how to fix this

storm shale
#

yeah that'll do it

#

So is the idea behind your card that it becomes a random joker each time blind is selected?

#

out of all possible Jokers?

nocturne garnet
#

yea

storm shale
#

random shot in the dark, could you perhaps initialize a Card object with the corresponding joker? idk

edgy reef
#

You can store a joker inside another joker's config but be warned the game WILL NOT like it.

#

You could use the key of the joker to find it's config and call calculate from there.

zealous glen
fast badge
#

so doing it with any random one would be pretty easy

narrow pollen
#

well, now that i'm past a life emergency that kind of limited my ability to function socially... i figured out an effect for a card i made art for!

#

(i guess the updated art isn't in the game just yet; but that can be easily fixed.)

#

here's the updated art, for those curious.

#

(for those curious: it wasn't anything that affected me; family dog was just goin through some stuff and now he's better)

fast badge
#

Any way to print the key(s) of the context (table) so I can figure out what the context for the trigger is to debug it? Would a k,v interation and printing them work? (Yup, printing the key worked fine for me)

hallow forge
#

randomly swaps between Amber Acorn, Crimson Heart, and Cerulean Bell

fast badge
wintry solar
#

Ah I see

nocturne garnet
#

is it just me or do soul sprites kinda break stuff

fast badge
zealous glen
night pagoda
#

I'm trying to modify suit functions that are for disabling & enabling/populating my suits, but I can't get them to work: I call :disable() on my suits, yet they still appear in card packs, what am I doing wrong?

#

update: nvm, it works, it seems like something else doesn't

nocturne garnet
# nocturne garnet

nvm its just that i shouldnt use both regular jokers and jokers with soul sprites on the same sheet

night pagoda
#

how do I inject with lovely using multiple lines as a pattern?

zealous glen
zealous glen
gaunt thistle
#

Regex

night pagoda
#

How do I use it?

zealous glen
#

I think there’s an example

#

In the GitHub

night pagoda
#

oh, found it, ty!

gaunt thistle
#

also keep in mind that you can keep your patterns short by using wildcards n such

#

regex is cool ablobmelt

fast badge
#

Regex is cool, but regex also hates you

zealous glen
night pagoda
#

ouch (it works)

#

but I hate this thing

fast badge
#

\\s*\\ mania

night pagoda
#

progress on something

#

hiding the tallies when there's zero cards of suit

crisp coral
#

firch cooking

night pagoda
#

yaay!

#

(testing this with checkered deck)

nocturne garnet
#

yippeee

night pagoda
#

Is it possible to change the order of suits?

#

small thing but it feels wrong to have custom suits at the top of the list instead of the bottom

gaunt thistle
#

if it works then it works

night pagoda
#

yeah...

gaunt thistle
#

nothing to be ashamed of

#

such is life

nocturne garnet
#

my 3 new jokers

night pagoda
#

is there add_to_pool but for consumables?

#

or, a different question, which function adds the registered consumable to the pool?

frosty dock
#

it works for anything that uses get_current_pool

night pagoda
#

oh, awesome

#

when add_to_pool gets called?

frosty dock
night pagoda
#

sweet!

unkempt thicket
night pagoda
#

unregistering them is yuck and causes a lot of jank

hallow forge
#

King of um... idk

unkempt thicket
night pagoda
unkempt thicket
#

i'll have 150 decks that start with 4 suits

#

4 different ones for each

night pagoda
#

uhmmm, what am I doing wrong?

#

(I'm assuming it uses card_key?)

remote coral
night pagoda
#

???

#

what?

night pagoda
# night pagoda uhmmm, what am I doing wrong?

@frosty dock sorry for ping!
it seems that the poker hand preview doesn't work on cards that aren't in the pool, but are still registered. Which would make sense for something that previews cards elsewhere but not in the poker hand menu. Is there anything I can do?
I don't have registering/unregistering at all now, I don't use disabling (as in disable bool) either. I only change if suit is added to the pool

#

As soon as I populate the pool, the preview fixes

night pagoda
#

on the same note, custom suits still appear in the loading screen

night pagoda
#

is there an 'on play' function in pokerhand api?

night pagoda
#

I copied sixsuits' poker hand code and it seems like every straight spectrum is royal

cosmic kernel
#

Does anyone have any idea if it's possible to manually enable an entier mod only for a single deck.
Reverie for its own deck only in my case.

crisp coral
storm shale
fallen tendon
#

where is calculate_enhancement located in the source code?

fallen tendon
#

anyone know how to get this to not replace the name of the card yet still have a badge?

maiden veldt
#

how do i stop my joker from shaking when winning the blind? it's activating an effect like Shoot the Moon / Baron for cards held in hand after a hand is played

fallen tendon
maiden veldt
#

my code doesn't have any juice_up()'s in it

frosty dock
maiden phoenix
night pagoda
#

other spectrums work fine so far for me

spice scroll
#

hey, i have a joker that generated planet cards for your most used hand, but it generated them seemingly based on what the most used hand was at the start of the round. im guessing i need to change the underlined bit, but confused on what to change it to

night pagoda
#

it is used in blinds for that reason

fast badge
#

refer to this code from the SC:

if G.GAME.blind:get_type() == 'Boss' then
                    local _handname, _played, _order = 'High Card', -1, 100
                    for k, v in pairs(G.GAME.hands) do
                        if v.played > _played or (v.played == _played and _order > v.order) then 
                            _played = v.played
                            _handname = k
                        end
                    end
                    G.GAME.current_round.most_played_poker_hand = _handname
                end

In other words, you have to set it yourself by iterating over the hands and checking the played stats

spice scroll
#

the SC? thank you tho

fast badge
#

Source code

spice scroll
#

ah

#

so like this im guessing

#

also

fast badge
#

Well full house is the most played?

#

Seems to be working to me

spice scroll
#

yeah but that was at the start of the blind

fast badge
#

?

#

I dont quite understand what you're trying to achieve

spice scroll
#

it was the most played at the start of the blind

#

the joker currently works most times but not when your most played hand changes in the blind

crisp coral
#

the cards are done with this shit

fast badge
#

Laterr!!!!!!!!!

crisp coral
#

jokes aside, anything messing with the G.FUNCS.get_poker_hand_info or evaluate_poker_hand functions

night pagoda
spice scroll
#

this can access this, right

#

OH

#

maybe updating order is missing?

#

like that perhapst

fast badge
spice scroll
#

i fixed it and its working

#

this is the greatest high

fast badge
#

How'd ya fix it

spice scroll
#

added the order update

fast badge
#

That's funny

#

no way that the source code is faulty itself lol

spice scroll
#

must be some sorta difference for it only checking each blind

spice scroll
#

got another joker working

#

hell yeah

#

last question for tonight

#

this joker works but the joker message doesnt time with the card actually changing and it bothers me lol

#

is there a way i can fix this

maiden phoenix
#

Maybe move the card_evals inside the G.E_MANAGER

fast badge
#

^

spice scroll
#

like, all of it, including the for k v?

maiden phoenix
#

No just the card_eval

#

Below the v:juice_up or something

spice scroll
#

oh right rightt

#

nah that makes the message appear after the entire hand was scored

crisp coral
#

try card_eval before the add_event for juice_up

spice scroll
#

id tried that first, is close but the transformation still happens before

#

actually

#

hold on

#

think i got it?

crisp coral
#

hm

#

after color = ... add instant = true

spice scroll
#

wow i tested it out and got this lmao

#

hmmmm

#

yeah that does work but its a bit fast

#

ill fiddle around with it more thanks

#

im ideally looking for how, say, midas mask or vampire are animated with their messages and card switches, but for some reason even copying the code it orders differently

spice scroll
#

well, formatted like midas mask/vampire was how it was in the screenshot i sent

zealous glen
#

I mean what does it look like

crisp coral
#

event ordering is funny

zealous glen
#

Event handling balatrojoker

spice scroll
#

the current version or the one in the code i sent

zealous glen
#

The one you’re complaining about

spice scroll
zealous glen
#

I feel like adding a delay would resolve it

#

But I’d see how they do it

frosty dock
#

midas mask uses context.before

#

otherwise you'd have to use events

brisk pond
#

is there a way to make a part of the sprite change during the run?
I have these Jokers with a number on the bottom that changes depending on the used tarots.
Do I need to make a new full Joker sprite for every number?

#

like this

frosty dock
#

you can either use completely different sprites for each, or use a floating soul sprite for the number

brisk pond
#

perfect

#

just wanted to know if it was possible/easy to do

night pagoda
#

@frosty dock it seems like your slothful & envious jokers do not work :P

#

(the suit jokers)

#

also all poker hands that aren't spectrum (and take spectrum as atomic part) do not score their cards

frosty dock
#

oh it's all of them?

#

I might have borked something in the API then

#

nvm I was just returning the wrong thing

night pagoda
#

yep

frosty dock
#

my suit mult jokers were missing effect 💀