#đ»ă»modding-dev
1 messages · Page 14 of 1
I meant the ability ^^ Iâm trying to see if the variables are remembered or not
discover_tallies
well the ability is basically a table of a few strings, id have to print it to know
Because I imagine itâs saved so I think you can get away with hooking load to set the sprite again
local set_discover_talliesref = set_discover_tallies
function set_discover_tallies()
set_discover_talliesref()
G.DISCOVER_TALLIES.aspects = {tally = 0, of = 0}
for _, v in pairs(G.P_CENTERS) do
if not v.omit then
if v.set and v.consumeable and v.set == 'Aspect' then
G.DISCOVER_TALLIES.aspects.of = G.DISCOVER_TALLIES.aspects.of+1
if v.discovered then
G.DISCOVER_TALLIES.aspects.tally = G.DISCOVER_TALLIES.aspects.tally+1
end
end
end
end
end
this
including Mobile.
why is this erroring of all things
actually just tried, it's not
uh 1.0 does that for you
i make it print something if that field is not nil, and renewed session does not have anything
yeah, i was about to ask
does anyone have a 1.0 mod i can steal the code from đ
Hmmm, are you sure you didnât quit before it autosaved?
how set sprites plz thx :p
are aspects nonconsumable centers?
they're consumable centers
the card is played, it's in the discard pile, so i assume it was played and remembered properly
then you're already covered by making a ConsumableType
how do i do that
also on another note, is 1.0 mod code gonna be very different?
its already different
yes
it would have been a nightmare for me because im 6k line in right now
search for ConsumableType in game_object.lua, examples are attached
there's no documentation for any of this
Hmmm⊠strange, I added an extra variable to the Card object and I think itâs saved without me needing to change anything
I'll get to docs, dw
i guess might have been a rendering problem... id approach from there first
But you said it didnât print the variable on reload right?
is it fundamentally different or it's just a few things?
its fundamentally different
right, but i think i should have inject something to the rendering anyways
ok i found it, so once I make the ConsumableType, I just do sth like SMODS.Consumable.Aspect{} ?
or how do i
@short surge by the way, did you manually animate Typhoid Maryâs effect? Or did you reuse the existing animation?
may i get a taste of it, like a small example?
syntax is no different from the other APIs
what does that mean aure
I don't recall i did any animation LOL
SMODS.ConsumableType{key='Aspect', yadayadayada}:register()
To be clear I mean probably using ease events to change the position of objects
does this support soul_pos?
you mean the speeding up part? i basically play two hands and refund one hand
SMODS.Consumable{set='Aspect', yadayadayada}:register()
yes
The speed-up I can kinda do by injecting into the function that updates each frame
so i can remove all of the boilerplate that i was using and just register a consumable type?
yep
if so, that rocks
I also learned how to use delays to mimic it
Kinda
also @frosty dock how would i recreate this
local get_type_colourref = get_type_colour
function get_type_colour(_c, card)
local fromRef = get_type_colourref(_c, card)
if _c.set == "Zodiac" then
return G.C.SECONDARY_SET.Zodiac
elseif _c.set == "Aspect" then
if _c.name == 'Breath' then return G.C.BREATH
elseif _c.name == 'Blood' then return G.C.BLOOD
elseif _c.name == 'Space' then return G.C.SPACE
elseif _c.name == 'Time' then return G.C.TIME
elseif _c.name == 'Light' then return G.C.LIGHT
elseif _c.name == 'Void' then return G.C.VOID
elseif _c.name == 'Mind' then return G.C.MIND
elseif _c.name == 'Heart' then return G.C.HEART
elseif _c.name == 'Life' then return G.C.LIFE
elseif _c.name == 'Doom' then return G.C.DOOM
elseif _c.name == 'Hope' then return G.C.HOPE
elseif _c.name == 'Rage' then return G.C.RAGE
end
end
return fromRef
end
or will this work still
so i wrapped draw_from_play_to_discardso that it draws back the played card, added to hand, highlights and plays them again with one extra hand given
that's pretty much all
you can pass primary_colour and secondary_colour to ConsumableType, for G.C.SET and SECONDARY_SET respectively
but wll it work with all this conditional though
i have a different color for each Aspect
uh I don't support that
your hook will still work
Just a generic thing for game objects iirc
btw my category name got borked
it works fine but its borked
SMODS.ConsumableType{
key = 'Aspect',
collection_rows = { 3, 2 },
primary_colour = G.C.SET.Aspect,
secondary_colour = G.C.SECONDARY_SET.Aspect,
loc_txt = {},
}:register()
very confused
probably because loc_txt is blank?
like, why is it that the atlas isn't set to the key by default?
in case you have multiple sprites in an atlas
i mean, fair; but you have pos for that
and wouldn't you rather have it display the incorrect sprite than crash?
yeah but then youâd have to have multiple objects with the same key
i'm just saying if you don't have a separate atlas value
just set it to the key as a failsafe
or you could just set the atlas
itâs usually better to throw errors for these things so itâs easier to find and fix the problem
@frosty dock can you confirm or deny
OH
so apparently uh
the registry process automatically slaps on the first four letters of your mod as a sort of identifier
ahhhhhh, gotcha
Through â---PREFIX:â
enhanceapi for 1.0 real?
You might need to define a process_loc_text function and pass the loc text yourself, Iâm not confident that ConsumableType handles that for you.
no it does
process_loc_text = function(self)
if not next(self.loc_txt) then return end
SMODS.process_loc_text(G.localization.misc.dictionary, 'k_' .. string.lower(self.key), self.loc_txt, 'name')
SMODS.process_loc_text(G.localization.misc.dictionary, 'b_' .. string.lower(self.key) .. '_cards',
self.loc_txt, 'collection')
SMODS.process_loc_text(G.localization.misc.labels, string.lower(self.key), self.loc_txt, 'label')
SMODS.process_loc_text(G.localization.descriptions.Other, 'undiscovered_' .. string.lower(self.key),
self.loc_txt, 'undiscovered')
end
Huh, nice
If youâre going to override it to pass your own loc text you do need to call the objectâs base process_loc_text function.
it was a bit of leftover .9 code
wait no ist still aa
oh i see whats going on
@frosty dock what goes in loc_text of ConsumableType
i think i figured it out
haha no i dont
arent example ones registered for tarot/planet/spectral
they dont have anything in loc_txt
oh my god fuck this
are you also tempted to hold control z until you get your 0.9 code back?
no
i see
i mean, that's the only method i have because i am
i have all of my 0.9 code intact on a branch
impulsive and unintelligent
all i need to figure out is why this is happening
is this how sprites are supposed to initialize?
I think?
Lemme see
Sprites donât have a defined âSetâ, which is what the the nil in that print message is
Same issue I had for a bit with Challenge API
yay finally a different goddamn crash
just put this because idk what these refer to :)
all i know is that these are needed if you want anything to show up
and after you fill them all out you get a different crash
what does any of this refer to
@edgy reef
Looks like collection needs to be a table.
what do i put in it then
Although I canât remember what the game has in G.localization.misc.dictionary
FINALLY
woooo
loc_txt = {
name = 'Aspect',
collection = 'Aspect Cards',
label = 'Aspect',
undiscovered = {}
},
i presume undiscovered is for like
if its not discovered
right
yeee
okay
it's not fucking crashing, i'll take it
but all my descriptions are blank...?
it's ported!!!!!
THERE we go
That art is so pretty
anyone have any good resources for creating mods?
What kind of resource
like a tutorial
im wanting to make my own custom joker mod, and have no clue how to do so
ah! ty!
what's the way to check if a mod exists in 1.0.0
oh no
wdym by oh no
đ
actually i can just. comment that line out for now lol
oh hm. set_ability is not set_abilitying
what's the way to keep jokers out of the pools in alpha? anyone around who knows?
you need a yes_pool_flag
this is so silly
but i think that needs to be set after the joker is added to pools
me when i play a hand when i have 4 hands and 3 discards (i've now placed myself in a situation where I have 3 hands and 3 discards meaning the total difference between them is 0)
or maybe you can also overwrite the inject function
hmmmmmm...
...should i give runner quadratic scaling, too...?
thinking of like
having it give +1 chip, and then one more the next time
sorry for being kinda annoying and asking about this a couple times, but what's the major difference going into SMOD 1.0?
like what would I have to modify in general
is it like wrapping no longer exist? or what is the fundamental difference that prevents pre-1.0 mods to be compatible?
you can literally just put yes_pool_flag in the constructor's table
How do i load custom booster pack names before localization initializes?
No initialization function
you can put literally anything in the constructor tables for 1.0 alpha
itll all get dumped to the P_CENTERS entry
oh that's not too bad i guess
I didnât go over all the changes
Only the ones I know
same for no_pool_flag, bingus, ahdbiwnwhdkcnals, and sbeve
bogos binted?
i was afraid i have to rewrite my mod entirely
oh cool
for now i'd stay as a caveman then
the way you initialize stuff is also different
now that sounds like a lot of work

it is, if you've been doing it manually
wdym manually
#đ»ă»modding-dev message
i did this shit with flags earlier btw lol
i don't think any jokers are written automatically LOL
my jokers were
joker mass production
ai jokers
I write all my joker with my lovely ctrl c and ctrl v
does 1.0 have anything to do with node hell?
no
localization stuff?
^just want to make sure im not reinventing the wheels
currently tackling playing card uis

localization stuff very
well if it has better way of dealing with generate_ui then im happy to surrender and convert everything by then
for now i do what this guy do
it does, its called lovely
yall what if i make the first mod with >100 jokers and its fuckign emoji....
actually based
đ
Does 1.0 work if I require the files where I define Joker data?
how does this sound for a reworked matador effect?
and $2 for every debuffed card played```
I would prefer if the reward for Boss Blind triggers were higher and it were more consistent
well, the problem is there are really two different types of boss blind abilities
well, three if you count flips as separate
debuffs, flips, and "fuck you"
debuffs and flips are obvious (the game refers to it as "drawn face down")
"fuck you" are things that activate at the start of the blind or before a hand is played
so my matador idea will still earn 4 dollars from even the water
also it's not plausible to check for ability triggers, since some bosses do stuff on set_blind (The Manacle, The Water) but some only set variables (Verdant Leaf iirc?)
that's why the second effect exists
and it's impossible to differentiate between these without hardcoding
hardcode means it doesn't support modded bosses which is a huge L
the second effect would give you 2 dollars for every debuffed card or joker in the calculation (which wouldn't work if matador itself is debuffed)
also example of what i said
That's what the API is for
according to the joker desc, The Water, The Needle and The Manacle would pay out
yeah, it would give a flat 4 dollars
instead of the 0 dollars they give right now
because current matador is "gain 8 dollars if you play a debuffed card"
but if you just check for set_blind then The Mouth and The Fish would also pay out
essentially
it's like. incredibly difficult to implement properly
oh yeah, there's also "not allowed!" to check for
Arm, Ox and Flint also procs
yea you gotta hardcode i think
like the only ones it won't proc on are the wall and violet
too many edge cases when considering modded bosses
I again think it should just have a large payout of the effect is triggered
Which includes hardcoding it
Am I stupid. My sprite doesn't apply to my joker for some dark reasons on 1.0. Do I need to do something else than just giving them the same key ?
Make sure itâs not because it expects your modâs exclusive* mod key
What does that mean ? I choose my key to look like this :
MOD_ID .. "_" .. CARD_NAME
Is it not ok ?
ty
hey, i'm trying to figure out how to add the blueprint compatible/incompatible label to my joker in steamodded, has this been done before and if so where can i find it?
self.ability.blueprint_compat_ui = self.ability.blueprint_compat_ui or ''; self.ability.blueprint_compat_check = nil
main_end = (self.area and self.area == G.jokers) and {
{n=G.UIT.C, config={align = "bm", minh = 0.4}, nodes={
{n=G.UIT.C, config={ref_table = self, align = "m", colour = G.C.JOKER_GREY, r = 0.05, padding = 0.06, func = 'blueprint_compat'}, nodes={
{n=G.UIT.T, config={ref_table = self.ability, ref_value = 'blueprint_compat_ui',colour = G.C.UI.TEXT_LIGHT, scale = 0.32*0.8}},
}}
}}
} or nil
This may help you
You tried looking at Blueprint loc def code?
i've done that, but i'm stuck with what to do from there
You put that in generate_UIBox_ability_table ?
i put it in steamodded's loc_def function which allows me to add it to main_end
right now it's doing nothing, probably because self.ability.blueprint_compat_ui is never defined anywhere
Well I can't help you I've no idea
ok that's fine
blueprint might make that in Card:update?
what
what did you do to seed money??????
banish.... đ
vanish
well the ones it says there... name, collection, label, and undiscovered
after making reserve area I thought adding a vanish button would be easy 
but cards in shop seems to use a different function to generate UI
What do you think of this edit job of the legendary background? I might make my own eventually, I just wanted to whip a quick proof-of-concept
looks good, pretty saturated but i assume that'd be changed past the proof-of-concept stage. what does the name plate say?
Salami Dave Solomon David
I'm not sure how to achieve the same style myself, or how to manipulate layer properties to get exactly what I want.
Continuing the proof-of-concept, I have this draft for what could eventually be the Soul sprite. Not sure if I go with the traditional bust of legendaries or with something like this, which I sketched over a reference panel. (Except for the halo, which I tweaked to make it fit in the frame)
Not sure about the neck
what language or thing is this supposed to be
Would you guys write "per sold consumable" or "per consumable sold"?
Universal metaconstant
ahh i see
I only added it for the ear tbf
i don't like the angle really
real magic
what the hell are those for
when padding is negative, each empty row node after two buttons moves them down a little bit
why does this need to run every frame
i mean computers are powerful enough(?) but why
it doesn't lol
i just need to somehow hook "deck was changed"
it is currently running every frame in my game
but just because i wanted to make sure that the logic worked lol
(notably it causes no noticable fps drops or other issues)
if the game doesn't lag then it's fine 
it's what makes these valid
2 sprites left to do
what are these so-called "sprites" you refer to
An update for my joker mod
The treasure chest and train looking ones are still placeholders
ok but whats a sprite tho
emoji jokers...
So true why haven't I been using emotes
emojiokers...
(it's because you want to make a mod that's actually good that people will enjoy)
(meanwhile i'm just making a flaming pile of garbage)
Naming my forum post mod a "[Content Mod]" was my first mistake lol
Because it's hot looking?
if you think those sprites are bad. get ready for my sprites
I never implied that đ€
these are the Real Sprites i'm going with btw
I mean that's how SAP did it for a while
i thought that was the implication with the placeholder sprites
No they're placeholders, they're meant to be ugly looking
the treasure chest and maglev (?)
More like a bullet train but yea they're placeholders art, next one to do on the list. Then the sprite grind will finally be over đ
onto the next 10 jokers
No please... đ
how many jonkers are you planning on
clearly i should make another 15 jokers right now
With this update, I'll be at 31 Jokers
also it occurs to me that đ is basically a 24-sided card
that's a lot
im just aiming for 15 atm lol
Smh no poop emote joker yet
tho with my luck as soon as its ready steamodded 1.0 will be released
That is my biggest fear rn
Played 2s give X2 Mult when scored
I'll play it with đ§» đ§
gigabrain strat
2s dont need another busted synergy
2s needs to be destroyed
đœ : 2s held in hand are destroyed
X3
Let's get the full combo baby
played aces give x1 mult when scored
view deck ui function is 200 lines, my lovely patches on it are like 180
should i like
just overwrite the function
lovely patches
i mean it was painful enough converting it to lovely, but it seems a little inefficient
less likely to implode if game updates change things (less likely, not impossible)
what are you doing that requires so much patching to view deck
suit and rank apis i assume
yeah
oh thats cool
aure out here being based af
i haven't touched anything substantial yet
just silly jokers
but yeah the patches on view deck are literally half of the lines of all patches for the playing card API
I'll consider changing back to just overwriting the function if I ever happen to worry about optimizing
modding this game is so much more enjoyable than any other ive ever tried lol
it just worksâąïž
When you mod a new joker do things such as foil, poly and negative have to be added manually (especially the Negative sprite) or does it just flip automatically?
(it definitely doesn't just workâąïž in terms of adding suits and ranks)
editions are shaders
you don't need to worry about them
yeah you get editions for free
oh also
thoughts on widening the suit tally display based on # of suits
(it looks so jank with even like 10 suits)
uh maybe not a terrible idea
if you have 10 suits shouldn't you just expect it to be cursed?
wait you can do that
yeah
I'll pretend that there aren't two files in there that make up half the lines of the entire thing
center and core?
core is just the copy patch
I was thinking language
language is tiny
Huh
poker hand and playing card
playing_card is literally 500 lines though
someone help me my spritesheet is all clocks
the next largest are center and blind, blind mostly because there's lots of functions used by blinds
The Blindomancer speaks...
omw adding a superboss that's just a self insert as a blind
lmao
Whats the time
it's out of my hands, i'm only a clock
# Stake modifier API
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''
if self.GAME.stake >= 2 then
self.GAME.modifiers.no_blind_reward = self.GAME.modifiers.no_blind_reward or {}
self.GAME.modifiers.no_blind_reward.Small = true
end
if self.GAME.stake >= 3 then self.GAME.modifiers.scaling = 2 end
if self.GAME.stake >= 4 then self.GAME.modifiers.enable_eternals_in_shop = true end
if self.GAME.stake >= 5 then self.GAME.starting_params.discards = self.GAME.starting_params.discards - 1 end
if self.GAME.stake >= 6 then self.GAME.modifiers.scaling = 3 end
if self.GAME.stake >= 7 then self.GAME.modifiers.enable_perishables_in_shop = true end
if self.GAME.stake >= 8 then self.GAME.modifiers.enable_rentals_in_shop = true end
'''
position = "at"
payload = "SMODS.setup_stakes()"
match_indent = true
overwrite = true
How do I do multiline patches in Lovely? This pattern isn't being detected
you need to use a regex patch
anyone know how i could forbid a voucher from appearing in ante 8 specifically
pattern patches are single line by nature
cause i just noticed my +1 ante voucher breaks the part whree you win the game
I'm just going to wrap it in an "if false" for now
what if we can make mods be disabled without reloading?
game objects can be removed fairly easily with a re-injection by checking if the corresponding mod is enabled
that leaves hooks, which could be reverted with a disable function
and lovely patches, which... uhhhhhhhh
would have to be wrapped in some sort of config check?
except that doesn't work for replacements
Strange thing I've noticed - Checking to see if i've configured my make_card for a spectral making joker correct so it can make Soul cards, if you get all the spectrals then try generate one it just starts making Incantations lol
It might be the fallback Spectral
yeah incantation is the fallback
Maybe if you get an image of before and after like git
How to make a regex patch?
pretty much same as a pattern patch, except the pattern is a regex
well the issue there is that steamodded uses lots of lovely patching itself now, and it's not something it can take control of
maybe post-load patching/unpatching is possible, but idk about that
Is it patches.regex?
yeah
no pools flag hates me
let me add it to my voucher
pls

this just doesn't work
Maybe see if anyone working here can help https://discord.com/channels/1116389027176787968/1225831216939536394 Idk if they have anything like that
I'm afraid these only work on jokers
the checking doesn't seem to be joker only
it checks outside of type check
but you might be right cause it doesn't work anyway

iunno, I'd need to have a closer look at that code to tell
what's the atlas field for animated sprites
G.P_CENTER_POOLS.Voucher[33] :: { ...["no_pool_flag"] = gondola_ante8,...,["key"] = v_gondola,...}
G.GAME.pool_flags :: { ["gondola_ante8"] = true,}
im very coinfused for why this doesn't prevent it

nvm got it
i have chcked and v.no_pool_flag and G.GAME.pool_flags[v.no_pool_flag] is true for my voucher
yeah, lovely patch hotreload isn't plausible without jury-rigging the lua runtime to reload everything
uh I figured
So maybe I just have to accept that disabling mods means reloading the game
in certain cases yes, but it also depends on how the patch is written
might allow mods to tell the loader if they can be hot reloaded
See how the game chooses a voucher to load
i think it does use this function
I edited this artwork I made during the beta. What do you think? (body horror)
cause this function creates the availabel pool and check things like required vouchers and adds blanks if none are left
but also this line just doesn't work so i might be wrong
But check the specific call
im pretty sure that is the call
again i have no idea why it doesn't works
but i have foudn a different solution
I mean, look at the inputs
morning balatrogamers
You can always hook the function that generates vouchers
nothing that should change anything
Morning akai, what do you think of The Red Hand
There is an argument to ignore pools
i looked into this for like an hour
I definitely tried
it just doesn't work
and idk why
i used a thing in the function it calls, which is called i can confirm that, and it just ignores it
maybe i made a mistake somewhere idk
the +1 winning ante works so im just gonna give up on it
lmao
actually i shyould prob check if that changes the final boss thing
surely it isn't basd on winning ante how often they appear
I think the game uses get_next_voucher_key to generate it
thats what i thought
but that does call get_current_pool
which uses the thing I was trying to use to block my voucher from being valid
but it doesn't work
Wait, did you try yes_pool_flag?
no i used no_pool_flag
i checked if the entire if condition would be true
and yes it would be
Try yes_pool_flag
so add should be set to nil
I think that's the one that should disable it
no_pool_flag is the other way around
yes i was using it that way
@zealous glen I figured the card save thing out btw buddy
it turns out you have to wrap Card.save and Card.load
or you have to put stuff in variables of a lower level for it to be saved, for example, self.ability.whatever
rip my winning ante has an effect on final biosses so im gonna have to look into pool flags again and see if it works

self.whatever won't do unless you wrap
how do I use steamodded alpha?
EDIT: figured it out, didn't work because of other mods
when does the update to the injector happen?
correct me if im wrong but i don't think it's released yet
Ah, I think that's what I did by default, because I created a level for my mod to keep it separate in case other mods messed with it
people are still actively committing
You make art, right? Do you have any advice for a noob like me?
I think it might be a good idea for SMOD to do the wraping
something like self.modded
so that people can start using self.modded.whatever
@frosty dock
^lmk if i should make a PR
everytime i try to add a custom name to a booster pack the game crashes and then it says it tried to index "Booster"
factorials damn
(Horror Terrors will only appear in shop if Tangle Buddies have been destroyed)
oh god not factorials n!
(Tangle Buddies don't have a destruction trigger, you have to either destroy them via Ankh, Ceremonial Dagger, Hex or other means)
that's what the little bit on the card references
Ankh and JXXI (J21 -> Joker with ID 21 -> Ceremonial Dagger)
omg factorials!
Still working on it, but now that I know how to animate I made it so you see the Ace be destroyed even if it's not in hand
it's generally a good idea to use config.extra, which always gets copied into ability.extra
I'd prefer not to mess with the inner structure of Cards
Surprised nobody did this before
I'm making an API for it so...
yes
can we mix and match stakes now?
you'll have to override the stakes but yes
since by default even if you say it applies them, it'll still apply all previous stakes
so this is still applying black stake, etc.
or we can make stakes that are just those, but that seems inefficient
You can take ownership of things in Steamodded so you can just change the stakes so they donât apply previous stakes
The spriting is done đ
That's epic
Ty!
Hand art courtesy of Gappie. Changing the colors of the UI elements makes me happier than it should.
does this work for tarots too?
It should
k ty
Changed both Jimbo Only and Jimboless in the ultimate collection
It's basically the exact same as the challenge deck.
It's jimbover
Hi Lyman
does playing card have this as well?
i can't put a custom name in a booster pack, can someone help me?
I don't know why but whenever I see Lyman post "It's Joker" I think of Twist by Korn.
Don't know why and I'm not going to explain myself.
so from what i understand a bunch of syntac changed in Steammodded, how would i go about figuring out how i'm supposed to change my code?
Any SMODS interaction would change, and thatâs pretty much it
but like, HOW do i change it
In general everything is a table now. You can look at the code and projects that are switching to 1.0.0 as a reference but documentation will likely come later
do you now of any mods that work in 1.0.0
Mine does 
where is it?
Not much yet but it should show some good usage of the API
whats with the return statements at the end of all the items folder files
that's something specific with my mod
you can just call customJoker:register(), but I have a main file that reads from all the other files and registers everything at the end
yeah im just gonna try to revert to the previous version
of Steamodded
i managed to get an error with no mods
what is this error
something went wrong :(
StackTrace crash?
steamodde
if joker_config.gm_shattered_mirror then
SMODS.Jokers.j_gm_shattered_mirror.calculate = function(self, context)
if not context.other_joker and context.cardarea == G.jokers and context.after then
for k, v in ipairs(context.scoring_hand) do
if pseudorandom('shattered_mirror') < G.GAME.probabilities.normal/13 and v.config.center ~= G.P_CENTERS.m_glass then
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.0, func = function()
local over = false
v:set_ability(G.P_CENTERS.m_glass, nil, true)
self:juice_up(0.3, 0.5)
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
return true
end
}))
return true end }))
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
return true end }))
end
end
end
end
SMODS.Jokers.j_gm_shattered_mirror.loc_def = function(self)
return {G.GAME.probabilities.normal, 13}
end
end
ok this is a strange enough problem that i'm going to ask here
this joker is supposed to turn scored cards into glass cards after the hand is scored with a 1/13 chance. it does this, but you can't actually tell that it changed the cards until you go into your deck menu. how do i get it to turn them into the cards "live" like midas mask does? i thought i was copying the method pretty accurately but i must be missing something
also for reference of what i mean by "you can't tell that it changed the cards without going into the deck menu"
whats the "true" argument in set_ability?
apparently something that makes it work better when it's set to false
it still isnt juicing the cards tho
because you arent juicing them
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
return true
end
}))
isnt that what this does?
midas does it like that
does midas juice cards?
i thought it did?
i dont recall it doing so but i dont use it much
it definitely plays sfx
it might also be something that works differently because you're at context.after timing
oh that sorta makes sense
instead of context.before
also did you know what this does? or just have a hunch that changing it would work lol
lol
well ty
moving it out of the event context seems to make it work
oh maybe its because midas needs to pause scoring for it to happen but the after scoring doesn't need to be paused?
not sure. only thunk knows.
whats the nothingy event at the end for?
oh i guess for the delay
yet again, i am being absolutely cucked by localization
lets goo
yeah i think it makes it stick there for longer
i was referencing morefluff for some of how it applied end of hand buffs and they put a delay in there
(since idt any joker in vanilla balatro does something to cards after scoring?)
makes sense, though i wonder if the simple "delay(0.4)" would work just as well
but it might need to be an event idk
this is just the function for the graphic of the discard ticking down right
the graphic and also the actual effect
huh
the G.GAME.current_round.discards_left = ... line between the two comments
wheres the part that determines how many cards are drawn?
actually that might be in draw card
trying to tackle these next
slowly but surely...
well ty bc it works now lol
i also checked and the sfx from midas is from the joker, not the buffing
that's right, the endgame for highcard is to like, have every card be it's own thing instead of being tied to a joker, right?
which is sort of weird
it feels like it ought to just be like an enhance tarot but it's not
yes, joker will instead convert normal card to xplaying card
are the x cards like, enhancements but with a different effect based on the rank?
well it will still to tied to each of the joker, but no longer need X-Playing Joker to activate joker ability!
actually, it's neither edition nor enhancement!
its a replacement "base" right
you can have all three on a card at the same time
its like an alt deck then?
not really, it's literally it's own thing
interesting
the deck gives you all 52 x playing cards as a deck to begin with
but i want those to be accessible to other decks as well
this will be huge for playing card modding
the concept of the highdeck mod as is fun enough to describe, the ultimate version is going to be buck wild lol

additional shit on cards means additional shit cards can do
i was trying this like a month ago and gave up, but now i have a much deeper understanding (i think) of how playing cards work, i think i can crack it happen!
this still on 0.9.8?
yeah...
a little awkward timing
but from what i heard it might not be too too bad for me to port
i hope
is 1.0.0 confirmed to actually be soon?
i did however wrapped like 50 functions by now so
apprently 1.0.0 "stable" is just waiting on lovely 0.5 "stable"
i know it's in development but "in development" seems like it can often turn into "5 months later still no idea when it will be ready" lol
oh
well we don't know about lovely 0.5 stable is gonna happen any time soon right?
I guess I will just keep at it, once i sort out everything i look into how to port
i assume just jokers won't be too bad to port (clueless)
well maybe good thing is i rarely used any api (i think)

other than looking for mods? i guess
anything with SMODS is api right
ok i guess only joker definition so far, for me at least
instead of SMODS.Joker:new(...,...,...,...):register()
you do SMODS.Joker {name=..., key=..., ...}
ok that's not really that bad tbh
yeah
same goes for sprites and stuff
i mean i only have 5 jokers lol
WHY ARE YOU MANUALLY REGISTERING FIFTY THREE JOKERS AAAA
oh no i mean i didn't
i thought id have to change every joker definition tho right?
yeah
oh wait actually this is really easy to change i think
i just turn my current joker definitions into a list and then parse the list into the new function
oh ok
which is like a really stupid looking thing but also idrc
yeah you can just parse that into a new table for the constructor ig
time to write python script to write lua
you also can just put calculate/loc_def/use/can_use/etc... functions directly in the constructor
i mean still idk if i want to bother changing to 1.0 until it's like. released
oh that's neat
no more 80 lines of SMODS.Jokers.j_*.calculate = function
caveman be like
yes_pool_flags can also be put straight in
pool flags are going to be like
food etc right
as well as no_pool_flag, asdf, random_thing_9000, etc.
but this is not really out for everyday users right?
like i think majority people are not git cloning
no this is for how gros michel/cavendish work
lol git clone
i'm so close to just
me, an intellectual: download zip
oh lol
who wants to deal with git if they dont have to tbf
because i am so tired of this localization bullshit
numbuh what even are you having trouble with
what the fuck is that
wrote a debug function that spits out everything of a card and hack every piece that's hackable
LOL
in the initial enhanceAPI release
the way how main is is crazy
how fucked is it
numbuh you're on 1.0 right
are you actually putting your localization stuff in a process_loc_txt function somewhere
i haven't give up on just wrapping
...wait, what?
smods has localization support now
but i am now leaning towards making my thing as a info tooltip instead of overwriting main frame
why is this the first i'm hearing of process_loc_txt?
process_loc_txt functions on registered SMODS.GameObject instances put things into localization
yeah, see
any localization entries defined outside of them get deleted
this is enhanceAPI shit
so why doesnt enhanceapi extend SMODS.Center for enhancements
...
THAT'S what the problem is
i think the current hacky way is
this thing is only ever gonna be used upon hovering, right?
just hack the table before hovering
oh sorry you only read text if its huge and annoying
why doesnt enhanceapi extend SMODS.Center
so you "see" what you want
but don't actually have to modify it
^kind of like "Texture Surprise" in Hunter X Hunter, if anybody gets the reference
like, look at how SMODS.Joker is defined in smods 1.0 and just do that but enhancementy
Anybody know how to add text to the new button" I have text="Test" but it doesn't seem to do anything
I'm inserting it using
-- Add Undo button
function create_UIBox_buttons()
local t = original_buttons()
table.insert(t.nodes, #t.nodes + 1, undo_button)
return t
end
Button itself works fine
you'd better be scared (art by Ein13)
good freaking luck with making an undo button btw (idk how the text works sorry)
why good luck?
because theres a million edge cases
Not if you're just using states lol
hell are the key ones for
maybe look into https://discord.com/channels/1116389027176787968/1232919198179528745 ?
it's the only other mod i know that's actually added a new button
I also added a button but it's a new tab when you view the deck
it's Diamond Queen Balor in my mod
I need suit pages API
i couldn't stop bragging about this
hmm almost identical and still doesn't work, weird
Text just doesn't show up
key will be mod logo
most likely
but stakes 8/16/24 are the big ones
that is pretty cool
might be a silly comment, but did you make sure you didnt use the same colour for text as the button?
Yeah, I didn't change the text color so it should be white
here's the full mod
local undo_button = {n=G.UIT.C, config={id = 'undo_button', align = "tm", minw = 2.5, padding = 0.3, r = 0.1, hover = true, colour = G.C.PURPLE, button = "undo_move", one_press = true, shadow = true, func = 'can_undo'}, nodes={
{n=G.UIT.R, config={align = "bcm", padding = 0}, nodes={
{n=G.UIT.T, config={text = "Undo", scale = text_scale, colour = G.C.UI.TEXT_LIGHT, focus_args = {button = 'x', orientation = 'bm'}, func = 'set_button_pip'}}
}},
}}
local original_play = G.FUNCS.play_cards_from_highlighted
local original_buttons = create_UIBox_buttons
G.FUNCS.play_cards_from_highlighted = function(e)
-- Save State
compress_and_save(G.SETTINGS.profile .. '/' .. 'undo.jkr', G.ARGS.save_run)
original_play(e)
end
G.FUNCS.can_undo = function(e)
if G.GAME.current_round.hands_played == 0 then
e.config.colour = G.C.UI.BACKGROUND_INACTIVE
e.config.button = nil
else
e.config.colour = G.C.ORANGE
e.config.button = 'undo_move'
end
end
G.FUNCS.undo_move = function(e)
G:delete_run() -- Can double as a faster reset key if slot is empty due to avoiding loading anims
G.SAVED_GAME = get_compressed(G.SETTINGS.profile .. '/' .. 'undo.jkr')
if G.SAVED_GAME ~= nil then
G.SAVED_GAME = STR_UNPACK(G.SAVED_GAME)
end
G:start_run({savetext = G.SAVED_GAME})
end
-- Add Undo button
function create_UIBox_buttons()
local t = original_buttons()
table.insert(t.nodes, undo_button)
return t
end
0.5.0 will be "released" for realsies when I'm a bit more confident in the new patch implementations
I'm like 85% of the way there
meth would it be trouble to include a version number in crashes? i haven't crashed 0.5.0 yet but i don't remember it being there previously
I overhauled how the pattern patch worked in 0.5.0 and I reeeeeallly want to make sure that there aren't any weird new edge cases
not a bad idea
a single person said "no i have the latest version" when i told them to update and i am forever mad about it
it was the latest when i downloaded so therefore its the latest version
aren't you on vacation
hey, does anyone know if itâs possible to make a joker give multiple different abilities in the same context? iâm trying to make a joker that copies adjacent jokers, but each joker can only have one return value per context. has anyone tried something like this before?
If it "copies" adjacent jokers, couldn't you trigger calculate_joker on them like blueprint/brainstorm does?
i have a joker that changes what it does when a blind is selected
yeah i can calculate it, the issue is returning what iâve got
Interesting... what are you returning?
the return value from calculate_joker e.g. {chips = 100, colour = G.C.CHIPS}
lmao awesome
peak vacation
Are you combining the sum of chips or other values together from both jokers and returning them?
i would ideally like to return them seperately so i donât have to account individually for all return keys
i think i saw someone made a joker that retriggered itself, thatâs the sort of technology i need
oh, I think I do something of getting other jokers thing with probability, i need to make a few adjustments because certain jokers. Is this kind of what you are looking for?
not really, iâd simply like to have a joker give one ability, followed by another ability in the same context
what blueprint does is runs calculate joker on the targeted joker and then returns it, but i canât do that for two jokers
for playing cards, you should put any additional properties you need on the suit or rank objects or override their populate function to add the information you need to the card, though you may also need to change Card:set_base() for that
Ah, some contexts do require you to return something
btw guys can you remember any tool tip on playing card that is more than one line?
glass card?
I mean like the hanging ones
?
like
i want to make it wrap
but i couldn't get the format right, i was hoping maybe there's stuff i can refer to
does glass card not have one? sorry that was mandela effect on my part
could i see how you made the tooltip?
why is this working anymore? it was earlier and now it just won't apply to the deck
final boss of Balatro
editions, seals
because i believe joker and playing card are quite different the way how the game handles it, and because of that playing card has not been cracked
oh right right seals
you are genius autumn love ya
damn i was doing that :(
no thanks
https://discord.com/channels/1116389027176787968/1219749193204371456
you can join in the fun!
let me cook it up with seals...
muhahaha
i still need help with this, does anyone know?
i just wanna create a custom tooltip on a joker and im not sure how lol
oh i believe it would have been much easier than playing card actually
check alchemy mod
im looking at it but the format seems quite different than normal, ill try to make more sense of it again
also tooltips are tooltips, same on any card
you dont get automatic line wrapping anywhere in the game thats all on you
if this works i will be shocked
uh I'm not sure the card is highlighted anymore when it's been played
and I see used_tarot in there
yeah i was not shocked lol
gonna have to look at midas mask
i more mean the random seal thing
wow this actually worked i coded something successfully
that wasnt just copying the main game
are you extending SMODS.Center now
you know you might get some help if people actually knew what you were trying to do
cuz like, i know i dont know what that line means. or what you're complaining about it doing or not doing.
Delay is an event
It's just an empty event that only takes up time
Can you share that? I have a dump function for tables I found online but sometimes it just doesn't work
I mean, you could use lovely patches
I hack the table just after it's created as a player hovers over it, but motly to add some information I have no idea how to otherwise add or to edit the existing objects
I think newt had a mod with a Pray button
That's such an awesome idea⊠I had had an idea for a Joker that allows you to see the deck, but my original idea was to just flip the cards in the deck face-up. This is such a better implementation lol ;_;
I think you need a new G.UI.R for that
What is the issue?
The control parts are all the {LETTER:value} that are written in localization files to grant special attributes to text
So if there's a {V:?} it uses the V control to select color, otherwise it uses {C:?} or nil
function sendNestedMessage(message, logger)
if client then
level = "INFO "
logger = logger or "DefaultLogger"
message = message or "Default log message"
message = tableToString(message)
-- naive way to separate the logs if the console receive multiple logs at the same time
client:send(os.date('%Y-%m-%d %H:%M:%S') .. " :: " .. level .. " :: " .. logger .. " :: " .. message .. "ENDOFLOG")
end
end
function tableToString(t, seen)
if type(t) ~= "table" then
return tostring(t)
end
seen = seen or {}
if seen[t] then
return "..." -- Handle cyclic references
end
seen[t] = true
local parts = {}
for key, value in pairs(t) do
local keyString = tostring(key)
local valueString
if type(value) == "table" then
valueString = tableToString(value)
else
valueString = tostring(value)
end
table.insert(parts, keyString .. "=" .. valueString)
end
return "{" .. table.concat(parts, ", ") .. "}"
end
Thank you
Done!
I'm curious if there's any pattern behind the names
mostly just reference to the series, it was not fully released yet so i created a few
What series?
But Who's on first
x-playing card api
.... i wanna make silly stuff for my suits/ranks even if its incomplete af lol
now I want to catch up on high card
is there a mod that adds devtools for testing mods?
thank you!
so i'm an idiot
and the problem was that i wasn't properly passing variables
đ€Ą
I think it's safe to say that Balatro has probably one of the most well structured modding communities out there
definitely one of the quickest
localization
is that how localization works asking for a friend
Damn ok..
(legally this is a joke)
i see
i think im cookin up a way to support this in my registration method
(emojiokers is actually just modified thac code lmao)
incredible
What? Using your past project for your own gains? How crazy do you have to be to do that????
Are you emojiokers because you're thac? Or are you thac because you're emojiokers?

Here's outtakes of Orson Welles, director of Citizen Kane, drunk as he films a commercial for Paul Masson Wine. Get the full story at http://pursuitist.com
i'm putting the other nickname back on
sorry lmao
oddityapi will come when smods has innate consumable rarity support
i forgor đ
which i guess is planned, judging from comments in smods
How do people write credits for Jokers/etc. which had external collaboration in their mods?
As in, what format do people use, not how to code it
I was thinking about adding it to main_end in grey, but maybe other people had better ideas
also stuff for putting consumables in shop and rarity pools i think? idk the comments are a bit vague and mysterious to anyone but aure
Maybe a custom tooltip đ€
tooltip sounds solid
I know how to hijack a tooltip from another card and edit it. Do you know how I create one from scratch?
i know its different for jokers
Because at least in 0.9.8 I only know of it being capable of asking the center pools to add to the info queue
you can add localization entries for it to call on in the "Other" category iirc
hmmm
đ
in 1.0 you'll need to put those in a process_loc_txt function somewhere
probably of the joker in question
Localizations are a bit inconsistent to me. For the most part I can edit them directly or add new ones, but thereâs a specific localization which I canât seem to edit
again i know tooltips are different for jokers i just dont know exactly how, that's for a planet
(Trying to add a tooltip for a edition)
I succeeded but I have no idea how. I added a new localization entry outside of Init. Didn't work. Tried inside. Nope. Both. Nuh-uh. I created a hook for localize just to print the output. Suddenly I have a tooltip. I delete the new localization entry inside Init and the hook. It continues working.
whoever told me to put the emoji on soul_pos you're a legend
Had that happen to me today while testing
Actually I should fix that bug
i think that's lyman
who's already a legend
#âă»modding-general message the Flint, Arm, and Tooth parts now stack
@grand violet @tawny perch What do you think of this for credits in the appropriate Jokers?
Also other people if they have opinions
oooo interesting
i like that its a separate box
I like that it's a separate box but that's a biiiiiig box
If G.GAME.hand[NAME].mult is for current hand's mult, what do I use to get base mult/mult of first level?
EDIT: s_mult!
i have a dumb idea that would require me to take ownership of nearly every vanilla joker.... and would not have innate support for modded jokers.... this would be so dumb lol....
what if i made ||something where when <thing>, trigger the joker on the right or similar, but i do it with its own "compat" flag and it works by running a function from the other joker's center obj....||
I agree, but I didnât want to split the credit line into two lines
you should be scared
Subfactorial scaling
Sub-transfinite-number-scaling smh
you'll need it for this stake
does it protect against inf loops?
like what does it do if A stake applies B stake, and B applies A?
Tbh I think itâs more interesting if the difficulty comes in different ways
Like thunk did with the recent update
hey i tried to use // on #G.deck.cards but for some reason it crashes the game, example :
self.ability.extra.mult = #G.deck.cards // 5
Whatâs //?
This last one is meant to be cruel but most of the stake ideas are less unfun
floor division
Is Euclidean division a thing in Lua?
no idea
I think thatâs the issue then đ
why can't you just math.floor(#G.deck.cards / 5)
oh, thanks
Apparently Lua 5.3 onwards has Euclidean division
Has what?
I remember I had a question for you
well this does fix it
Itâs the largest integer q such that divisor*q <= dividend (assuming everythingâs positive)


