#š»ć»modding-dev
1 messages Ā· Page 235 of 1
this is because i want specific "rare"
I saw people saying SMODS.calculate_effect is just an easier way to add chips and stuff without having to specify a message etc tho?
So how do I send a chip style message?
i actually didnt understand how/where SMODS.calculate_effect has to be defined
as opposed to "UPGRADE!" and mult
For a Joker during scoring, just return {chips = ā¦}
yeh but that doesnt give the little square with the +chips message
Im trying to do that too
It does tho
And its an edition so it applies to both jokers and cards
minus a few syntax errors, yes
ignore the commas I fixed them :p
quick question, what's the difference between self and card in joker calculation again?
also the first chips =
self is usually the parent, card is the actual card object being played
thank you
i wouldnt use self unless you know what u doing
card is usually enough
(plus context)
annoyingly the popup only displays the bonus properly when in hand, not in deck
Yeah, add a comment between the first card.edition.extra.more_chips and the first chips =
What is wrong with this thing, something looks weird to me
Does anyone know how to change the music and background when you have a certain Joker?
wym by change music ? play a different soundtrack entirely ?
Yeah. I've seen it done before
add_to_deck function in joker def, and code to play music
Look at jimball in Cryptid, that's just what you want to do . But be warned that playing music and sound effects requirs you to always use your mod prefix key
IT WORKING thx :)
-# not the display in the deck screen but thats fine for now
wdym (I think I removed a line you meant)
No I meant. Add a coma
actually ortalabs aint got something like that, but i'll probably go with the second option for now because its simpler to implement.. and I can reuse atlases and all that
Ortalab has the Zodiacs
how would i apply an effect to the screen, like making it go black?
does ANYONE know how to modify blinds
im trying to make a joker that makes the screen go black for 15 seconds and plays a blackout sound
ah ok
You might need to mess with shaders to do that unless love2d provides an easier way
but you can always make a new CardArea for Jokers and add it to the calculation process. That's what I did for my Zodiacs (no relation to Ortalab Zodiacs)
also while Im here, is there another way of storing variables or smthng? The playing card's edition's bonus chips dont display in the deck view (should have "currently 5")
i was trying to find the root that makes the ui but its not any of these
I'd try to find where the CRT effect is applied
that's like the layer you want to work on
Yeah that would work too, thats kinda what i did (extra table, append cards there and lovely patch to calculate in evaluate_play) but i was more worried about the UI feedback cause I really suck at UI so jokers were simpler for that
I have seen shaders applyto cards or to the shop but no idea how you would take control of the whole screen. Maybe if you learned how to add new ux and then wrote that ux with a z-index of zero
there's the CRT shader always applying on top of everything, so either infiltrating it or acting on top of it
For now I have the CardArea tucked just slightly onscreen with plans to figure out the UI later
but again
if they're one time effects
Ortalab has their Zodiacs
which are like Tags AFAIK
how do you add new tabs to your mod's config menu 
is it really possible to just go SMODS.current_mod.[tab_name]_tab = function() return { n = G.UIT.ROOT } end
SMODS.current_mod.extra_tabs https://github.com/Steamodded/smods/wiki/Mod-functions
ahhh

Is it fine if i check out your mod ?
can you lovely patch another mod - e.g. an smods util function?
can't figure out what to tell lovely for the filepath
hi guys, somehow my Resetting text is appearing Under a scroed card, and not under the joker itself. I have fixed this before but I forgot how I fixed it.
Yes but this part is hidden from the release version
target = '=[SMODS _ "src/utils.lua"]'
oop
if you want to activate it, there's a few comments in the main file and one comment in a lovely patch
Alright perfect Iāll check that out
Hey
Iām asking how can i make the joker description dynamically change every round
Like all of it
put all of it into main_end
just have the description be a variable
A string of?
Can it be a string tho
Hmmm iāll tru that
you have 1 variable
Yes but then you can't add color effects
and you can change the number of lines
AFAIK
Got it
main_end gives you more control
How do i use it tho
you create the nodes manually
does not seem to be working with
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'```
or
```[[patches]]
[patches.pattern]
target = '[SMODS _ "src/utils.lua"]'```
Examples:
I can show the code too if you want
Ofc
Iād love to
i was shy to ask
so in loc_vars you return main_end = foo(card) where foo computes the nodes dynamically and has access to the card itself as an argument
The code pwease
I have 2 beaincells
all i really need to do is impliment the custom hands
Here's a short example
local _generate_main_end = function(card)
if not misc.is_in_your_collection(card) then
local add_node = function(nodes, text, colour)
nodes[#nodes + 1] = {
n = G.UIT.T,
config = {
text = text,
colour = colour,
scale = 0.3
}
}
end
local nodes_ = {}
add_node(nodes_, '(Currently ', G.C.UI.TEXT_INACTIVE)
add_node(nodes_, tostring(card.ability.extra.blinds_defeated), G.C.FILTER)
add_node(nodes_, '/', G.C.UI.TEXT_INACTIVE)
add_node(nodes_, tostring(card.ability.extra.blinds_to_defeat), G.C.FILTER)
add_node(nodes_, ')', G.C.UI.TEXT_INACTIVE)
--sendDebugMessage(tprint(nodes_))
return {{
n = G.UIT.C,
config = {
align = "bm",
padding = 0.02
},
nodes = {{
n = G.UIT.R,
config = {
align = "cm"
},
nodes = nodes_
}}
}}
end
end
Iām a visual learner
and these two
satan and marle
satan buffs common suits while marle buffs rare suits
maybe extra chips per suit
Thanks i think i got it
keep in mind each line of text is a row
here I only use one row
Yup got it
what do you think they should do though
they effect every suit of a specific rarity
what are rare suits
i devised a system in order to balance out my mod a bit
there's 6 common suits which always appear in your deck
and there's 6 rare ones that only appear in standard packs
here's how the end result looks like (normal description above, main_end below)
but do they do anything by themselves
not really
i wanted to avoid cluttering the deck
by having 12 whole new suits in the deck by default
anyways, current joker lineup
oh my god, nasu grave is there
sadly i don't have any bomb puyo cards yet š
How do you change blind types š im trying to modify small/big blinds to be boss blinds
i think you gotta use lovely patches for that
Someone had shared with me patches to do that
I believe these were it
either with an Event or patches
the humble misprint:
@zealous glen you were right, ortalabs has literally what I need
...no the og misprint
idk what that means then
you can use it to see the top card of the deck
Oh hi. I know you :)
kinda
mtg aah joker
not a joker
yes
hello
i think it would actually be more broken if it was a joker since this is only for one blind
Another Homestuck mod hit Balatro
jokes on you, it was always homestuck
I donāt think this kind of effect is broken
Iām not sure itās even good
i dont think its broken but comparitively having it always happen is more powerful than for one blind
It does make the game harder to play a bit
I finished Women for Balatro, now I'm adding Worlds.
i think this is unintended
You heard it no more Women for Balatro. Carrot finished them
Cute
I did think of an Atomic Edition but it sounded too silly to me
Maybe that is your calling
they arent meant to be this small i just cant read
hehe silly :3
They are now. I donāt make the rules
not real because i cant do anything wrong
Thatās not their issue
i think i know why it crashed
Itās inevitable this will happen
tysm
theres not really a solution to this anyway other than moving it but putting it anywhere reasonable is probably gonna conflict with something
apparently args is a nil value?
People have suggested a CardArea API to handle this kind of screen space conflict
its teling me to check line 13
yeah but if it conflicts with widely used mods like betmna mods then you will also get less players to try out your mod
I still need help :>
Thatās equally Betmmaās fault
They donāt get to own that screen space just because their mod came first
i cant really do anything about this other than not have this effect cause where else am i really meant to put it i am not going to change everything just because another mod thought to put something there first
Other mods have the same effect, and they have other solutions
i dont know why its throwing this
The oldest one I can recall displays the cards shrunk on top of the deck
Three of them
i'm attempting to use sigil
Horizontally
Still really happy with these cards.
I think in Jokers you can just put the cards in the tooltip
i try to use sigil and the game crashes because args is a nil value apparently
how can I change the score required to beat a blind, while the blind is active?
Either as text or as cards
i would probably just do that if it was a joker sadly it is not
id personally go with the approach of showing the first card exactly on top of the deck, and if you hover on it then the other card pops out
-# like a flip phone, think of it that way
but this is your mod, so you do you
High Card mod had a new menu tab
In the deck menu
To see the whole deck
In order
Check my mod 
full crash log if it's useful
idk the deck menu is the only other place id move it but me personally id never use this effect if i had to go to the deck menu every time
its just a little nitpick about mod conflicts, you really shouldn't be troubled around that too much
Idk where to put world cards tbh
Solution: detect if Betmma is installed and uninstall it

i dont play with it so its not a real mod
Joker idea: If Talisman is installed, turns all numbers into tables
where can I find it?
Do I put them in the top right near the Joker spot or something?
Like underneath
(āÆĀ°ā”°)āÆļøµ ā»āā»
can anyone help?
please?
args if they were a nil value
about to leave but does anyone know how legendary jokers render?
like the multilayer?
yeag
they have two attributes
pos = { x = 0, y = 0},
is the background
soul_pos = { x = 0, y = 1 },
for example
is the thing that renders above
I have a joker that creates a copy of itself every time a boss blind is beaten, but it always just copies itself infintely. Is there some stupid obvious oversight im missing
they render multilayer
so why exactly is it saying that args is nil?
How does it copy itself
is this a "use ... instead of args" moment or no (i'm too new)
@acoustic kiln
Beloved DreamWorks film Jrek
so how the crash happens...
is that i try to use sigil
and then
args a nil value
lua
G.E_MANAGER:add_event(Event({
trigger = "before",
delay = 0.0,
func = function()
local new_card = create_card('powercreep', G.jokers, nil, nil, nil, nil, 'j_pow_powercreep')
new_card:set_edition({ negative = true }, true)
new_card:add_to_deck()
G.jokers:emplace(new_card)
end
}))
end```
show the full calculate function
```lua
code
```
oh lol
calculate = function(self, card, context)
if context.joker_main then
return {
card = card,
Xmult_mod = card.ability.extra.Xmult,
message = 'X' .. card.ability.extra.Xmult,
colour = G.C.MULT
}
end
if G.GAME.blind.boss and G.GAME.chips / G.GAME.blind.chips >= 1.50 then -- Combined condition
G.E_MANAGER:add_event(Event({
trigger = "before",
delay = 0.0,
func = function()
local new_card = create_card('powercreep', G.jokers, nil, nil, nil, nil, 'j_pow_powercreep')
new_card:set_edition({ negative = true }, true)
new_card:add_to_deck()
G.jokers:emplace(new_card)
end
}))
end
end,
missing a condition for the second check
it triggers on every context
idk try printing stuff until you find out
i keep looking at this and i'm like "how would this cause a crash when sigil is used"
Damn, this descriptions feels bad
holy shit ur the goat thanks
is args the problem here?
because the crash message specifically points out args
you'll have more success trying to print it and going back the chain of function calls until you find the issue
the easiest way is probably via sendDebugMessage
add debug prints after problem child lines to see where the code fails
printing is the best debug process
fuck unit tests
or whatever they call it today
test driven development
[SMODS puyomod "suits/suits.lua"]:13: attempt to index local 'args' (a nil value)
doesn't really help?
i mean if it's crashing the game you need to print before
and if you don't understand what's being printed, again, go back the function call chain
i mean, doesn't the crash log tell me what line is causing the problem?
not necessarily
It can crash at that line, but the source of the issue can come earlier
well before it was telling me to check line 13
is it because args is like
not doing anything
If args is nil, then the issue is either that you shouldn't expect it to not be not nil, or that something is misassigning it nil
on the latter case, the issue isn't with that line, but earlier
on the former case, the issue is with that line, because you coded something incorrectly
i don't see any earlier place where something would go wrong
make sure you understand why rare_suits is called, what arguments are passed to it, and what those arguments can be
this ONLY HAPPENS WHEWN IN UYYSE SIUGIL
it's being applied to in_pool
sorry i'm tyring to stay calm buit i JUST CANT
THUS SHIT IS PISSIBNG ME OFF
go do something else to calm down then come back later
getting stressed won't help, but a clear mind will
duuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuude
isaac
all it really seems to be doing is flooding my console with "What!?"
another isaac mod
*mod with isaac in it
i literally removed it because it wasn't doing anything of use to me
but does it have dancing isaac
im NOT doing allat
you ought to print something more useful
args
lmfao
as I said
hell yeah
\
it prints args directly before the return function
still don't get how this is meant to help me
at all\
like yeah, that's what's being printed
an absurd amount of times
it's never that easy, is it.
it should just work. i should have code, and it should just work with EVERYTHING
but nooooooooooo, apparently args is a nil value
dude. fuck
i'm getting a bit...
fuckkkk
am i getting lightheaded???
why??????
this shouldn't be making me THIS mad
i would recommend stepping away for a bit if its actively infuriating you to the point of lightheadedness
i would really like at least some guidance after this
i yield.
balatro is playing me like a fiddle.
I know loc_vars in blinds is limited, but what's incorrect here? the #1# in the desc always displays as 'nil', even though the blind logic itself works and confirms the value being passed does exist
i'm also tired so I might be missing the obvious
hear me out
@wintry solar is it possible for me to replace JUST the soul graphic in malverk without supplying a replacement for the base card itself?
like, say
key = '[myPrefix]_Soul',
set = 'Spectral',
path = [myAssetPath],
[...etc]
soul_keys = {
'c_soul'
},
loc_txt = {
name = 'Soul'
}
})
or would that not work/is not supported 
How do yall come up with these ideas
for me it's equal parts sadism, insanity, whimsy, curiosity and sorrow
i just have an idea and pray someone else didnt already do it
how do i play custom sound effects?
I don't think that would work
hey lads
im trying to hook into Card:apply_to_run to add a new voucher but for some reason this is returning the error card.lua:260: attempt to index local 'center' (a nil value) when i buy the voucher
im not sure whats going wrong with it since center is clearly the paramater of the function is it not
function Card:apply_to_run(center)
local center_table = {
name = center and center.name or self and self.ability.name,
extra = center and center.config.extra or self and self.ability.extra
}
if center_table.name == 'Booster Feast' then
G.E_MANAGER:add_event(Event({func = function()
change_booster_shop_size(1)
return true end }))
end
return _apply_to_run(center)
end```
now, why on earth would args be nil?
sounds like a load of hoopla to me
this is the current code btw
how do i replace the soul card then, because in base, the card is split across two different assets; the shared tarots/planets/spectrals graphic and the decks/enhancers graphic - do i have to do something like
key = '[myPrefix]_Soul',
set = 'Spectral',
path = [myAssetPath],
keys = {
'c_soul'
},
soul_keys = {
'c_soul'
},
loc_txt = {
name = 'Soul Card'
}
})```
and the asset has the base graphic and soul graphic in sequence? like this
the code keeps looking for the sound in resources/sounds, but i didnt tell it to do that and all my other music is in assets/sounds
that'll work fine
still stuck on this
My main issue with UI is that I don't know how to put cards in there.
what it's doing is making it so that cards in the pool common_suits appear everywhere, while cards in the pool rare_suits do not appear in the deck, but everywhere else
and this specific code has a problem when trying to use sigil
still dont understand the issue
when i use sigil.
uh, it crashes
apparently because args is nil
which shouldn't be the case becaus i have no idea why args is being treated as nil
this looks like you're just printing 'args' as a string, which is of course just going to say 'args' instead of whatever the value actually is
my mistake
can you really blame me though
i don't know how to print values
so like
how do i print args as a value
since none of yall actually told me how
you guys should've TOLD ME
then all of this would have been prevented
it should just be args, without quotes
sorry i'm like
really fucking tired of this shit
well great
how would i go about replacing the main menu png? that says "BAL TRO"
i dont want to just have people swap the file inplace if possible
i've never used sendDebugMessage before, only print() which requires the console to be enabled
do you have debug mode/console enabled? i.e. do you see the console in-game
not this?
nope, that's the lovely console
well it still prints there
if you do print()?
alright then do print(args)
idk if this is the right chat but i cant get lovley to start it keeps crashing
oh yeah, finally getting a bit of a glitter effec for my secret rare cards!
How do I go about making my UI a card area?
I'm trying to get world cards to only show up there
Can't you just do a nil check for args?
how would i do that
if args and args.whatev then
return not args or not args.initial_deck
that fixed it!
replace G.SPLASH_LOGO, I imagine
but now, all of the rare suits are in the deck again
which i don't want
i'm going in circles man...
the sigil problem is fixed but the rare suits are in the main deck again
Can someone help me with the lovely mod it keeps crashing as i start it (sorry if this the wrong chat)
post crash log
alr
there we go
1 sec
it just works.
yay
it JUST works.
now, i need to deal with you two.
satan and marle.
satan buffs common cards while marle buffs rare cards
ignore that i said cards
i meant to say suits
@red flower someone else looked at it and we figured it out
and these jokers too but that's for later
hello chat
ive made this patch to try and change Game:update_shop(dt) so that instead of only making 2 booster packs in the shop it makes G.GAME.shop.osquo_ext_booster_max of them instead, but with this it still only makes 2 packs
ive tried using eval to check the variables and G.GAME.shop.osquo_ext_booster_max - #G.shop_booster.cards is equal to 1 so it should still make another pack when i set it to 3 but it doesnt for some reason, am i missing something?
[patches.pattern]
target = 'game.lua'
match_indent = true
position = 'at'
pattern = '''
else
for i = 1, 2 do
'''
payload = '''
else
for i = 1, G.GAME.shop.osquo_ext_booster_max - #G.shop_booster.cards do
'''```
the code im targeting is in `game.lua` in the aforementioned `Game:update_shop(dt)` around the part that does booster packs if you need to look there
yeah i know lol
k
so are you just trying to make more boosters?
trying to make more booster packs generate in the shop with a global variable that i can change
what exactly does to_big do?
if it's just more rather than less, the way that I do it in my mod is this if it helps
they exist but don't have unique effects yet
casts a number into a big number from Talisman (which is a table with an exponent and a mantissa)
oooh so i can just do a add_booster_to_shop when the shop opens?
interesting
where do i put this exactly though and how would i use it
or, wait
so yeah.
you can put it anywhere in the code, the only problem if that pseudorandom_element doesn't take into account the weights so you would have to find how the shop generates boosters for that
hell fucking yeah. now all i need to do is figure out how to get world cards within it
how do i change a card's suit?
actually i'm thinking of changing the effect
SMODS.change_base
lovely, thanks
This didn't take as much effort as I thought tbh
hmmm i see
this could also work for when redeeming a voucher right
since thats how im using this
yeah, I use it for a tag too
i'd also need to make a tooltip for common puyo and rare puyo cards
they'll just tell you what puyos are rare and common
making a tooltip is easy, right?
How would I go about having World Cards appear in their special area? Just so I know for the morning
yeah
one more thing though I'm not sure what "JoyousSpring" is representing here, is that the mod name or the joker/voucher/tag whatever
SMODS.add_card({key = "world_key", area = G.your_area}) or something like that
thats the mod's global table yeah
Oh cool!!! Can I use object tags for it?
just realized i forgot the most important part of the screenshot lol
oooh is this a hook
yeah you would need to add it to the localization and then do it like this
yeah
wdym
how do i format the tooltip
I have a custom object type that all World Cards are automatically added into. Can I use that instead of each individual card key?
oh yeah you put that in set instead of key
also i'm not familair with this calculate_context thing how do i actually use this
in a voucher specifically but also generally
with the color and everything
calculate_context is what SMODS calls first to then call all the other calculate functions
but now that you said you're doing a voucher you can just put this part inside the voucher's calculate
except the joyousspring thing obviously
yeah they work just like joker descriptions
:3
so like
do i just put in the key of the suit
in the description
i dont really undestand what exactly you want to do
like how the suit shows on a suit joker
will the tiles show up on her sprite
instead of typing out the name of every suit individually
i think you need to type it
aaah thanks lad
its not quite as flashly as the patch method since it doesnt expand the booster pack area but it works
it does I'm pretty sure
i dunno, i considered adding tiles below the joker but i think that would conflict with how jokerdisplay's ui is placed
put tiles above then, nothings ever above
oh wait i totally forgot this exists too
i love undocumented functions
jokerdisplay is also above
š
wait what
im going to send myself away
would become obsolete if you have jokerdisplay, i plan to make it so that the ui of the mod will show conditions to proc follow-up effects, ultimates, and such
straight to the sun
youre telling me theres been a thing that does the thing im trying to do this whole time
sorry i completely forgot about it lmao
omg thats why it didnt work when i patched it because SMODS already has a thing for it
it's not formatted like the misc section
probably the best approach to take if i were to make my mod compatible with jokerdisplay, i think displaying the stats would be overwhelming
dangit i shouldve checked SMODS code
you can still put colors in the descriptions using {C: and stuff
and i got stuck while looking through documentation, where can i get help?
here
okay
lmao
im reading over this part
so where do i put my tooltip
loc_vars
they have to be in descriptions = { Other = {
this seems to be how a +150 chips joker should be done, but it crashes when a card is played
and i cannot for the life of me figure out what i've misunderstood
what's the crash log
unlocked and discovered shouldn't have the quotes btw
alright so its very nearly function
only problem now is that when you first redeem the voucher it doesnt change the shop to reflect the new size
not sure why but it might be because redeeming a voucher doesnt count as G.STATES.SHOP which the function checks for
is there a way around this
it seems to work either way, but i removed them and it still crashes
or maybe i should put the call in calculate instead of redeem hang on
no wait that wouldnt work
it looks fine to me unless I'm missing something, are you trying to continue a run after modifying the joker?
formatting.
Half way done with adding Worlds :)
right now i have
G.E_MANAGER:add_event(Event({func = function()
SMODS.change_booster_limit(card.ability.extra.bonus)
shop:recalculate()
return true end }))
end,```
you only need the change booster limit line, you can delete the rest of it
Now to actually add the cards and figure out how to make them functional
no wait i dont have shop:recalculate thats a holdover nvm
yes, that was my mistake, thank you!
sorry, i just didnt consider it would make a difference lol
config values stay the same on reload so if you change that it'll likely crash
so what would i do in order to have chips happen when a specfic set of suits is played
thank youuu
done that but the issue is still there, it doesnt update the shop you buy the voucher in, only future shops
Actually. Sleep time. I'll work on it in the morning.
i would have to make actual groupings for the suits so that i can call them
this is what i do with the cardarea, if it helps
it should do, let me check locally
how would i do that
It should!!! Thank you so much
i mentioned earlier the function being called checks for G.STATES.SHOP when adding boosters so maybe when redeeming a voucher that's considered false so it doesnt add them?
I assume this is in a lovely patch?
actually would i be able to call common_suits
or would that not work
yes
OK bet
ii really should create like
grouping of suits
so i can easily call them
so i don't have to do them all seperately
i'm saying this again
can i just create a group of suits
crap
hm
how do i tell the game to check if its exactly four of a kind
rn it works for all poker hands including four of a kind
huh yeah, that seems to be the reason, you can just add this in your redeem function then and it'll work
for i = 1, mod do
SMODS.add_booster_to_shop()
end
local commonsuits = puyo_puyored_suit
this is currently my code :3
sweet, thanks a lot lad
theres uh, nothing on calculate saying how to do this rn, it just says how to check if poker hand exists in the played hand
i've got a bit of a confusing wording problem to deal with...
so basically, The Ox, when in the collection, just says (Most played poker hand) in place of the hand, when it really refers to the most played poker hand as of the last boss blind, but that doesn't really matter
I have a new boss blind that increases the blind size if your money is below the amount you had at the end of the last boss, but the collection text for this is waaay too long, because I can't do the same trick the ox does in terms of shortening it
any ideas on how to phrase this in a way that cuts it down
context.scoring_name
got it, tks :3
i dont think thjis is correct
oh that was a lot easier than I thought it would be
@ivory coral it's patched in latest smods to work properly now
oh you mean so it doesnt need that extra bit
yeah
oh cool thanks
first i have to figure out how to make the joker score chips for a specific set of suit
i know showdown has a joker like that
color splash i think?
yeah, i don't understand this.
can someone like, help me with this?
i haven't done anything like this before
like, scoring chips when specific suits are scored
My pampered sensitive eyes cannot handle the purity that is blinding light-mode un-highlighted code
SMODS.calculate_context({you_context_name = true, copied_card = card}) then you can access it with context.you_context_name and context.copied_card
This is my stand...
GET LUCKY!!!
hard to proc consistently but i think X4 Mult whenever a card is scored makes it worth the gamble
:3
Hello folks, I've been learning Lua and would like to start looking around the source code to get a better idea of how the game is built so I can develop my own mod. Since I'm fairly new to this, would anyone be kind enough to explain to me how I can access/view the source code?
Use a file unzipper like 7zip or Winrar on your Balatro executable, and the source code is right there
Awesome, thank you!
What would be the most effective way to make a voucher effect that gives you a tag on boss blind defeat like anaglyph?
The decks use trigger effects/contexts in SMODS, but afaik vouchers don't have anything similar?
Would I basically just define vouchers as a cardarea so that I can evaluate them like other cards?4
Oh well, they are a cardarea already, I assume
Just not normally touched by SMODS.calculate_context()
...what? i click my new tab and get this error.
contents of the right image is going into SMODS.current_mod.extra_tabs
I think that G.UIT.T node needs to be nested in another table:
nodes = {{ n = G.UIT.T, ...etc }}
ohhhh
forgot about that
my toggles suddenly stopped working? the only thing i can think of that's different is that this might be the first time i've used one since i refactored the config ui into its own lua file. these toggles worked before - but now it's just not liking it?
i didn't change anything about the toggle code
other than that i moved the whole ui code
How are the callbacks defined? They might be pointing to a function that isn't in the current scope
They might need to be in the G.FUNCS global namespace, or preferably defined as members of your mod table if they're not already
in the create_toggle({}) call,
ref_value = [the associated item in config.lua],
callback = CirnoMod.callback_[ref_value]Toggle```
for each toggle
That looks right, assuming everything else is good. Are you reassigning CirnoMod.config to SMODS.current_mod.config at any point after the very start?
it's one of the first things that happens and it only happens once
is your callback function doing anything in particular btw? I don't think I normally give my toggles one
the only place it's defined or referenced is in the create_toggle
Oh, you haven't actually defined that function? You can probably remove it then
well that fixes the crash, thanks
i'm probably not gonna need the callback for anything anyway
Yet again, i'm not surprised that it didn't work, but i'm surprised that it ever worked in the first place
⨠coding āØ
is this the correct way to check for joker's rarity
yooo cross mod content by accident
no matter how many spaces i put, it doesn't do the spaces.
oh yeah the X doesn't work with space lol
it just doesn't
...THUNK!
The actual, mostly-unmodified clip from Star Trek II: The Wrath of Khan.
yeah it's weird lol
new deck today
is there maybe a whitespace character i could use instead
trick it into doing what'll effectively be a space
or is there only a limited characterset that the game's font or whatever is happening internally recognises?
oh right found it
it happens in the loc_parse_string at functions/misc_functions:1634
how do I check for joker's rarity š
oop - uhhhh this looks correct? does it cause crashes?
idk man š
i need help
I tried to use a while loop
im trying to create a card in G.consumables, but whenever i do it just. creates over it.
not in it.
and i have a completely useless draggable card.
G.consumeables moment?
do u know what went wrong?
nice
it's ok it's online class
im jealous
still think I'm cooked
probably use SMODS.add_card
š
thats a thing??
yeeee
I tried to use a while loop and got stuck in an infinite loop
I could not tell what's wrong with envious_roulette
I HATE MULTITHREADING !!!!
good morning
oh my god i changed one word and it worked instantly
was looking at balatro multiplayerās networking code iām going to blow up!
hello!
meowning
iām not sure how lovely works with imports? i tried installing a json package w luarocks but it doesnāt find it
people be like
"just add multithreading to Minecraft it ain't that hard"
people who have never programmed anything complicated in their life be like
š
true and real
check out my epic jojoker
cross mod content when
collab moment?
"When a Tarot card is used, 1 in 4 chance to create a random Negative Tarot card"
I'm just using common sense wording from vanilla
i have an edition that makes the card trigger twice but the values are halved
The Duo now does nothing 
exactly
giving twice of X1 Mult is really nothing
create half a tarot card

sliced is a pretty cool edition (?) btw
it is an edition yeah
"the solo: X1 mult if played hand contains a high card"
... 
how do I fix envious_roulette š
{X:inactive} is not the same colour as {C:inactive}?
have you tried debug printing and
something about this being 1 in 2 instead of 2 in 4 hurts my soul
people have already answered that's the correct way
it's sliced
what does that do
chance to destroy at end of round
does sliced halve the base probability? I diagnose myself with unable to read
deck effect that applies to all owned jokers
you're supposed to remove cards with context no?
wait no
that's just jokers moment
if ur new, i suggest checking out #1349064230825103441...
-# shameless plugging!
SHAMELESS PLUGGING!!!
do you round odd probabilities up or down
so which part didn't work
no
always return 0, causing an infinite loop
probabilities are unaffected
How do you do joker retriggers? I don't know if I didnt check docs close enough but couldnt find anything on the matter
last one of these for a bit, i'll share some that have special conditions to trigger other than "joker did thing do transform oog oog"
but this one shows off functional not-zany and the ijiraq ingame
then this doesn't answer why the fraction is 1 in 2 instead of 2 in 4 on space joker
i think you'd want to use a for loop if you just want to go thru all the cards no?
because in challenge menu the dice doesn't do shit yet
unless, it halved both the 2 and the 4?
if a joker is destroyed via envious_roulette, #G.jokers.cards goes down by 1, while i increases by 1, thus breaking the iteration
I really advise against using while loops unless absolutely necessary
what did you put in the extras.odds_rare
bro
oops all sixes doesn't take effect on run menu
that's why it still says 1 in 2
{odds_uncommon = 20, odds_rare = 15, odd_legendary = 10}
yeah but isn't Space Joker typically 1 in 4
IT'S SLICED
IT HALVES THE ODDS
NOT THE PROBABILITIES NORMAL
WAAAAAA
ah
halving the odds = doubling the probability
I see now
imagine
youre flipping one coin instead of 2
if you really intend on using while loops for this one, put a var outside it like local stop = false, then set it to true when roll returns 1 (aka while not stop do), relying on G.jokers.cards seems really unreliable
Bloodstone: played cards with Hearts suit give X0.75 Mult
exactly
literally yes
well yes, but it says it halves all values, which I initially interpereted to be both the numerator and denominator because they are stored as separate values

the numerator is usually from game variable
G.GAME.probabilities.normal
so it's the wording that causes confusion
i dont think i = i + roll actually does anything here, now that i think about it
this is a common aiko occurence which i find hilarious
values are halved if possible
you could just as easily feed G.GAME.probabilities.normal/2 to the loc_vars and use it in the calculations
i don't know how to word it
painge
that's the culprit I see
Goodnight balatro bozos
orr wait, can you show me the entire code

i have a really vague idea on how the code looks like rn š
yeah I was getting caught up on the wording
have you seen this
my wordings are crazy
no no, i got it wrong with for loops, since it always comes with for i = so i always changes each time another loop runs inside it
this is what lack of sleep + tests do to you
š
-# (i don't know English)

See personally I would feed the text for the option instead of its index to the main description
yeah it's the first word
lack of tests? well then you should be fine! 
and the purpose of this is to do wat
lack of sleep AND tests everyday
:3
in which case do you need the last line at all?
in case you're confused
at end of round, higher joker rarity = higher chance to be destroyed
i see
very interesting Joker concept though
there is no freedom š
ado reference
wait what was the ado reference
freedom
me selling chaos
ah. see I am a fake fan, who only knows usseewa
i went to her concert once...
and the One Piece Red songs
sooo if i have 5 jokers then it will keep running the loop until it destroys all of them?
actually, in the middle ground
probably stop at about 2-3 jokers
if all else fail just destroy a random one
since i = i + roll doesn't work, it's an infinite loop
I had freinds that went to an Ado concert in Chicago? I think is where it was
and I don't think envious_roulette works either
yeah but is it supposed to destroy more than one joker here?
each joker, depending on its rarity, rolls a Gros Michel-like logic
is there a SMOD.Blind code example since my brain cant fully understand what's in the documentation
yeah no the logic is definitely wrong here
I see
what you are doing is increasing i by 1 everytime a joker is destroyed, i suppose?
my code looks funny
One day I will complete my multi-wave finisher blind...
if a joker is not destroyed, increase i by 1
if it's destroyed, i stays the same while decreasing #G.jokers.cards by 1
guys
i just found my own bug
THE NATURE DEBUFFS ALL CONSUMABLES
the Perkeo Observatory killer
:3
IT IS SUPPOSED TO GIVE X0.5 MULT PER FACE CARDS IN HAND AND AT PLAY
yeah uh your code is confusing as hell, doesn't help with the fact that im on my phone too
I FORGOT TO REMOVE SET BLIND
š
I COPIED THIS SHIT RIGHT FROM EXPIRY
based
oh anyway jsyk

btw did any of y'all see this post on reddit? because there is a demon inside me that makes me want to implement it
passing your problems to aiko or someone else, sorry :(
double it and pass it to the next person
i feel like I've had this concept in my head before
this is exactly the level of insane I love to see
but not start new run
further insanity, if you manage to duplicate it, you have to play a game for each copy
imagine getting this card inside of a sub-run where you already had it
and surely the sub-runs count towards completion?
I need to stop before I actually try to do this
would it be funny if i made a mod which turns all text into binary
e.g. I have 5 jokers
at end of round, each joker is supposed to go through Gros Michel-like logic
if it's not destroyed, increase i by 1 (undestroyed joker passes the iteration to the next joker)
if it's destroyed, decrease #G.jokers.cards by 1 (destroyed joker passes its own iteration to the next joker)
at least that's what I intend it to
but i = i + roll doesn't work, envious_roulette doesn't destroy jokers
oh no what if I made a joker that does something different depending on the current day of the week
or a Joker that specifically only does something on Leap Day
Leap Joker (Common)
X29 Mult if triggered on Feb 29th
otherwise +4 Mult
changed to for loop and removed i = i + roll
it worked, but destroyed every joker š
so envious_roulette works
the only problem is i = i + roll

and iterations too
this is cursed
how do I hook functions? for example run my own when a shop is entered, and when in the playing stage, selecting blind etc
lua is like a house made of playdoh and you can just overwrite functions by redefining it
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
hello
hewwo
i think instead of losing maybe you just end round without going to the shop
You can, which is very powerful, but there are no safety checks.
Make sure you're not breaking anything in your mod or in other's mods by hooking important functions incorrectly
no i'm planning on removing hands/discards as a resource
nice washing machine
-signed, someone who accidentally broke the Multiplayer mod with a bad hook to Game:main_menu
me when i forgot to return the original value
how do people get so good at washing machines
I'M NOT THAT GOOD
me when I brainfart and call the hooking function inside the hooking function and create an infinite loop
lv13 AAA
where are you that you have easy access to japanese washing machine games im jealous
yeah but that means nothing
Bangkok...
the closest one to me is a 30 min drive
damn trying to find an arcade that doesn't suck ass around murica is impossible
lucky you
wait for like
a few months
they are trying to get maimai to the US
ahhh
idk why there is a true value there on the error š
alright im gonna try to figure this out one more time before I either wait for blinds to get calculate functions, or figure out how to patch it in
is there a way to have a blind debuff all consumables?
okay so just to check is it really as simple as just:
local update = Game.update
function Game:update(dt)
update(self, dt)
... my own code
Pretty much. I'd also rename update for clarity, and return the result of the original function. Just for the sake of mod compatibility if other mods also hook update to return a value:
local game_update_ref = Game.update
function Game:update(dt)
local ret = game_update_ref(self, dt)
-- things and such
return ret
end
Lua is a little scary like that. Everything is global by default, local limits their scope. Gotta be careful with what you're introducing into the global namespace
got it :D
With great power comes great responsibility - some dead guy
is there a way for me to like use ctrl click to view definitions in balatro src
like it's just syntax highlighting in vsc
i think you'll have to like
put stuff in lua things
normally i just look in the source code myself
ah
Should do the trick
Along with the Lua extension, though its not always great at resolving more complex relationships
mfw forgot to install lua lsp
thanks!
stealing this trick for tmr
my wacky patching experiments are NOT succeeding
trying to patch in a game variable that suppresses the creation of consumables really just leads to create_card returning nil which is a scary thing that should never happen
because things that use create_card and then do something to that created card are not nil checking, and probably didn't need to until I came along
im not a bot
happy pi day silly
why are there so many special days in march
MAR10 was mario day
#1346716313934102598 give me ideas pls
is there a way to trigger a blind after before the final scoring step?
probably once calculate functions are added to blinds
I believe you'd have to patch this in currently
press_play only activates pre-scoring
thank you
omg peak pain again š
i'm in it too, one of my blinds is currently extremely evil because it scrambles suits of played cards before scoring, so any hands relating to suit are completely ruined
I'm trying to make a Joker retrigger the right-most Joker, but it's not working; how do I do it?
calculate = function(self, card, context)
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
if context.other_card == G.jokers.cards[#G.jokers.cards] then
return {
message = "Again!",
repetitions = 1,
card = card
}
end
end
end,
my dumb ahh brain cant figure how to make it work)
How could one make a joker multiply all values of another joker by a certain amount?
if you wanna be able to reset them, store them on the multiplied joker, and then check if ability.extra is a table or a value. if it's a value, multiply that value, if it's a table, go through the table and multiply every number
this will multiple generally every value, though, which will definitely mess with some jokers in unexpected ways
I donāt recommend this but Cryptid does it, so maybe try seeing how they do it
what's the function run when hands are played / discarded? i can't find it in the src qwq
oops

