#š»ć»modding-dev
1 messages Ā· Page 347 of 1
finished PRing all my (useful for other mods) 'at' patches today to smods
people can't complain about my 'lovely hygiene' now
is there a way to remove the seal/edition from a card?
I do such with Jarate.
"Clear glass bottles he fillz wiz hiz pizzz"
Anyone get that reference?
I GOT SHADERS TO UPDATE IN REAL TIME RAHHHH
Not the tf2 part generally, the specific source of the quote
Gonna have a joker that's ability changes depending on the boss blind, so I kinda need this bit to be a variable or somethin. Game doesn't seem to expect new lines here and cuts it off
Here it is for the cutious. I've never played tf2 in my life and my vast majority of knowledge about it comes from this song, which I love
An original song by Random Encounters
The Medic's looking for a career change.
ITUNES ⤠https://itunes.apple.com/us/album/medic-a-team-fortress-2-musical/id616843942?i=616844575&app=itunes
AMAZON ⤠http://bit.ly/REAmazonMedicAlbum
Music written & performed by Lena Gabrielle (lenagabrielle.com) ā¤
http://www.youtube.com/user/TheUntoldTaleBt...
make it 2 strings, not a \n
"Text1","Text2"
I tried that initially but it didn't like it. Seems to just return the first string
Is this for a blind?
For a joker. I'm doing somethin kinda weird
Hmm, I'll try that. Wonder if that will limit my lines for each description. Thank ya
why isn't this code working?
it checks for the ingredients correctly and spawns the result correctly, but the code for removing the green joker & candy doesn't work
you're just removing them from the area, try SMODS.find_card("j_green_joker")[1]:start_dissolve()
yo I request some help
I want to make a joker which randomly picks a joker from your negative jokers
with
if
G.jokers.cards[i] ~= card
and G.jokers.cards[i].edition.negative
and not G.jokers.cards[i].ability.eternal
and not G.jokers.cards[i].getting_sliced
then```
being what I've done
however it crashes if there are no negatives because G.jokers.cards[i].edition.negative is equal to nil
how do I check if the value is equal to nil before indexing it?
and G.jokers.cards[i].edition and G.jokers.cards[i].edition.negative
thank you so much I've been at this for three hours
And as you mention picking a random negative Joker, could initialize a blank table, then add all the Jokers that are negative into it, then pseudorandom_element on the table to get your random choice, but only if said table has more than 1 item (#table > 0).
if i use an atlas that doesn't exist ingame, will it still work (except for when it tries to display it ingame of course)
or will it crash on startup
So... I wanna finally revive DeFused. The actually Fusion Jokers is already ported to very modern Smods https://github.com/wingedcatgirl/Fusion-Jokers And will be the new base. Removing the Fusion mechnanics and giving the jokers actual rarities that would make them pollable should be trivial
But I also need to port the Jestobiology jokers:
https://github.com/lshtech/Jestobiology
And Vultbines jokers: https://discordapp.com/channels/1116389027176787968/1227317656131211284/1244573783210196995 Over to that codebase
They are based on older, in the case of Vultbines much older, versions of smods. So, I'm just wondering what all that would entail
(The embeds were a bit much)
ty for removing the embeds lol
Embeds are always a bit much haha
i want something to be able to use atlases from other mods, it would be hidden from the collection, so the only time it would ever appear is when the mod is installed anyways
the atlas object or the asset file?
wdym
try assert(...) around your code that references the atlas maybe? and make sure your mod loads after
but also idk how you would remove the automatic prefix added
i'm making inverted versions of every single boss blind, (the inverted versions would be hidden from the collection, and they can only appear in the place of the boss blind it's replacing), and i want it to use the original sprite (except perhaps with the negative shader applied)
how would i do that
I mean there are multiple standardized ways of checking for other mods being loaded
if statements basically
I mean.... there's no way to automatically do this for any arbitrary blind, so you could just make your own atlas with each icon that you've implemented
if next(SMODS.find_mod('Bunco')) then as example.
but yeah this
assert would do the opposite of what she wants because it will crash if its not there
i would fallback to a default atlas if it doesnt exist or do what ali said
oh yeah sorry i forgot how lua works for a second
just like your own
maybe look into global atlas table?
(I think)
G.ASSET_ATLAS["modprefix_key"] iirc
doesn't work cuz prefix i think
in any case, just using the table works fine
alright
now how do i change atlases in an if statement
i know how to change pos, but not the atlas
To list atlases...
for k, v in pairs(G.ASSET_ATLAS) do
print(k)
end
I think it'd be
atlas= variablle
and set that variable with the if statement
pseudocode, not lua
how do i add sprites into ui elements
oh if this is for changing atlas when you create the object then im not sure
iām looking through the gameās source code and iām not finding anything thatās exactly clear
I think it's what I said? I've seen similar oncstructions
there's nothing in there that's exactly clear š
calculate = function(self, card, context)
function rollanomaly()
local anomalychance = pseudorandom('wehttam29')
if anomalychance >= 0.5 then
center.ability.extra.anomaly = true
else
center.ability.extra.anomaly = false
end
end
if context.before then
self.loc_txt.text = {"PRESSRIGHTPRESSRIGHTPRESSRIGHTPRESSRIGHTPRESSRIGHTPRESSRIGHT"}
end
if context.joker_main then
return {
card = card,
mult_mod = 7,
message = "+7 Mult",
colour = G.C.MULT,
extra = extras
}
end
end
is something wrong with this? (im trying to expirement with changing loc_txt with code
iāve figured it out up to this point
where object params are a variable that is defined in an if statement
there's SMODS.Sprite but honestly good luck
iāll just brute force it
thanks for the nudge
Sprite(x,y,w,h,atlas,pos)
the aim here is to change the atlas to the cryptid blind's atlas, but only if cryptid is installed
will atlas accept an SMODS atlas
put it in a G.UIT.o
or do i have to make one like the base game
G.ASSET_ATLAS["modprefix_key"]
alright
plenty of people's smods.object contructors are only variables
then probably next(SMODS.find_mod('Cryptid')) and "modprefix_key" or "default_key"
bump?
the problem is the loading order
and this would be setting the variable you use in the constructor?
or is it directly in the constructor?
atlas = next(...
ah directly, though I think both approaches work
replace it with an extra variable and change that
yeah it would be the same i think
i think ill just worry about this later in development
I think lua evals everything very directly
lol
what are you trying to do?
which makes things easier
okay so:
every hand, theres a 1 in 2 chance (nonaffectible by oops all 6s) for an anomaly to spawn
if an anomaly spawns, press right to fix it
each right verdict gains +8 mult, wrong verdicts reset mult.
im testing out changing the card's description to just PRESSRIGHT over and over again for an anomaly
I think something that wants a string will just as easily take something that evals to a string
is what I mean
I would recommend either using a localization file and returning a key in loc_vars or using main_end
as i said you could change the whole text to variable #1# and change that variable instead
or that
line breaks is an issue then again, but yeah
why doesn't this work?
ill probably do that yeah
drawn_to_hand
oh
I remember when I got chatgpt to evaulate loc_vars to automate making https://gaycoonie.github.io/DeFused from the lua file
(yes strmnn, I know I should learn to code :P
it still doesn't do anything
:)
but you gotta admit, making a script to convert it would be almost as much work as doing it manually, this way actually did save monotonous effort
i just copied the code from the serpent and replaced 5 with 8, why doesn't that work?
hey so @red flower with the G.ASSET_ATLAS the modprefix_key would accept an atlas made by smods, correct? i could make an atlas with the key of, say, ādiff_atlasā and then make an atlas variable with a value of G.ASSET_ATLAS[āastropulvis_diff_atlasā]
hand_space doesn't mean anything there i don't think, you need to copy the rest of the drawing code
yes
okay, thanks for the help
what else would i need from G.FUNCS.draw_from_deck_to_hand?
most of the code there seems unrelated to the serpent
vanillia code is a cluttered mess
i think it's pretty simple there i dont agree
I've looked through the dumps before, with ~70 mods, it's... trancendental what it becomes
the problem is that i dont think you can do that effect how you want without making it weird or patching
this would be so much easier if someone recreated each vanilla blind using smods.blind
well thats another problem
Is there any way to get a localization key from another mod?
yeah but I've also looked through the unzipped exe itself plenty
things for one object with be scattered over 5 files
and different parts of 1
how do i make something thats an altered random chance? I want to have the game randomly pick a difficulty for boss blinds, but I have a 'risk' value that is intended to increase the chances of higher difficulty the higher risk is
vanilla code in a nutshell
and instead of objects calling functions, functions will just refer to the objects in a hardcoded way, it;s... a hell of a lot messier than smods code
I would honestly patch your code into G.FUNCS.draw_from_deck_to_hand
i need to basically manipulate randomness
yes, this was more what I was getting at, where objects barely exist
well it wasn't made to be modular and expandable
must just not be how thunk's brain works
thats more of an smods problem for not providing an api for that honestly
i could PR it..
would be very nice
fwiw, the draw_card is the actual function doing the moving of cards... and it can take a card as an argument to target which specific card to draw.
the endgame of smods is essentially rewriting balatro in an inherently modular, expandable, and api driven manner, but that's years away when the game is no longer reciving updates and we can afford to start from scrtach more or less
at least that's how I see it
hey all. is there a, like, relatively simple (or at all) guide on how to start modding/make a simple mod? or at the very least a simple mod to work off of/access the source code
eh idk im not going to be there to see it probably but this one issue could probably be solved now
that would be an absolute dream come true
anyway do this
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "if G.GAME.blind.name == 'The Serpent' and"
position = 'before'
match_indent = true
payload = '''
if G.GAME.blind.config.blind.key == "your blind key" and
not G.GAME.blind.disabled and
(G.GAME.current_round.hands_played > 0 or
G.GAME.current_round.discards_used > 0) then
hand_space = math.min(#G.deck.cards, 8)
end
'''
alright
tbh smods comes a lot closer than many other modding framkeworks already from what I know already
especially given the codebase of the game
now i need to learn how patches work
why doesnt this work? (I understand the hardcoding is kinda stupid but i don't know lua like at all so i really just want anything that works lol)
I can't find the returning repetitions thing anywhere in vanilla or steamodded, it's in the cryptid code so it might just be from that (or im blind and it is in vanilla), but i dont play with any other mods often so idk what else i could check
I feel like if i were to have (first known how to code, lol) and written balatro, it'd probably be structured a lot more like smods from the start, but that's probably wishful thinking
wheres the documentation for patches? i forgot where they actually are
ty
you need to enable joker retriggers as an optional feature
i still have to rewrite this monstrosity to be a function instead of hardcoded lmao
because i have so many jokers that do score manip like this
how?
bump
Is something wrong with this?? the context.before functions arent running
have they changed how to check if a card is a certain suit or is it card:is_suit('Hearts')?
its still that yeah
thank god, cause I gotta redo a lot of code to make a new ver cause STEAMODDED updated.
this is what im doing rn
u need this
ah
SMODS.current_mod.optional_features = {
retrigger_joker = true,
}
this still doesnt work
does the code appear in the lovely/dump
still doesnt work, am i meant to just put that at the start of the .lua?
bump
context.before just does not run
it has to be bl_modprefix_key
oh i see
wait is this in the patch you uploaded in github recently or isnt out yet?
works now
how would i bind a variable change to a keypress
there's a SMODS.keybind object
haven't looked into it though
yeah, seems like it'd get the job done
?
also that's some strange editoralizing with the key at the end I think, I could think of ways that it'd be useful to refer to it like any other smods object
Is it possible to block a joker from showing in the collection at all? Trying to make a joker that has different abilities depending on the boss blind, but it's really beginning to seem like it's gonna be best to make several individual jokers and maybe try to disguise them as one
Actually that's kinda still an insane idea on second thought
#1290829201108107354 does something kinda similar by default
sorry i didnt see the message
yes
no_collection = true
idk why it isn't working then
(this is a dumb question im aware) whats the like "name" for money? the rest of the joker works (just a test) and it gives it but it still says +nil dollars
all the color codes are at the bottom
(thanks for this page for unrelated reasons) but the color is correct it just says +nil (as in dollars = 7 isnt the proper way to format it)
am i misunderstanding things on a fundamental level due to being dumb? probably
are you returning dollars as the third entry in your loc_vars function
no i was not. it works now, thanks
it is out
I have a joker which triggers a unique effect depending on the suit of the card which is scoring. However if a wild card is played instead of all of them scoring only the first effect will trigger
do I need to specify this in a loop or something?
oh yeah i saw you needed to have both sleeve and deck to be able to steal
yeah
show code
does anyone know why this doesnt work?
i added this and it still doesnt #š»ć»modding-dev message
does any part of your code work? or does just nothing trigger
if context.other_card:is_suit("Spades") then
return {
chips = card.ability.extra.chips,
card = card,
}
end
if context.other_card:is_suit("Hearts") then
return {
x_mult = card.ability.extra.Xmult,
card = card,
}
end
if context.other_card:is_suit("Clubs") then
return {
mult = card.ability.extra.mult,
card = card,
}
end
if context.other_card:is_suit("Diamonds") then
if pseudorandom("lovely_opal") < G.GAME.probabilities.normal / 2 then
G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.money
G.E_MANAGER:add_event(Event({
func = function()
G.GAME.dollar_buffer = 0
return true
end,
}))
return {
dollars = card.ability.extra.money,
card = card,
}
end
end
end
end,
})
just a worse version of all of the suit gem cards
once lua encounters a return statement, the rest of the function is skipped
ohh
so you need to reorganize your function so it does all the correct calculations and just returns everything once at the end
nothing retriggers
the joker is added properly but that's it, it doesn't do anything
I would put something like
local chips = nil
local mult = nil
local xmult = nil
local dollars = nil
at the top and then just set any of those variables to the desired value for the suit
no message either?
correct
if you print pass do you get the intended value
return {
chips = context.other_card:is_suit("Spades") and card.ability.extra.chips,
mult = context.other_card:is_suit("Clubs") and card.ability.extra.mult,
x_mult = context.other_card:is_suit("Hearts") and card.ability.extra.Xmult,
dollars = pseudorandom("lovely_opal") < G.GAME.probabilities.normal / 2 and card.ability.extra.money
}
could work.
stupid question but how do i see what i print, im not seeing it in debugplus or the lovely window
Otherwise, this would've been much larger.
any idea why negative chips turn invisible?
well those are the two places you'd see it so if you don't see it, it's not printing
i mightve screwed with the game speed a bit
it seems like the stuff past if other_card.config.center.blueprint_compat then is never running even when the cards are blueprint compatible
try other_card.ability.blueprint_compat
thank you so much! it works perfectly!
well my adaption of your suggestion works but like tyyyy
is it possible to do -mult?
like -3x or something
I'll try it
returns nil
context.other_joker?
same result but in the mult box
weird
tf is wrong with my joker code ```lua
function round(n)
return math.floor(n + 0.5)
end
SMODS.Joker {
key = 'chaotic_randomizer',
pos = { x = 0, y = 5 },
config = { extra = {} },
blueprint_compat = false,
atlas = "Jokers",
rarity = 2,
cost = 6,
loc_vars = function(self, info_queue, card)
return { vars = {} }
end,
calculate = function(self, card, context)
if context.end_of_round and not context.repetition and context.game_over == false and not context.blueprint then
local randomized_something = false
for i, other_joker in ipairs(G.jokers.cards) do
if other_joker ~= card and other_joker.ability and other_joker.ability.extra then
for k, v in pairs(other_joker.ability.extra) do
if type(v) == 'number' then
local original_value = v
local random_multiplier = 0.5 + math.random()
local new_value = round(original_value * random_multiplier)
other_joker.ability.extra[k] = new_value
randomized_something = true
end
end
end
end
if randomized_something then
play_sound('tarot1', 1.1 + math.random()*0.1, 0.5)
return {
message = "Chaos!",
colour = G.C.JOKER_RARITY[card.rarity],
card = card
}
end
end
return nil
end
}```
crashes when i try to do stuff with it, i think its just returning nil
can you give us more details
uh
its trying to randomize the values of the other jokers you currently have
im js not the sharpest tool in the shed
and is it not doing anything? Does it return the message at least?
nothing
is context.repetition the right context check? That seems like it's meant for when this card is being repeated
what's the goal for your joker
.
retrigger all food jokers
I think I initially had it check for something else and that didnt work so i changed it, but now that i fixed other stuff maybe it'll work if i switch back, one sec
Hi Folks, when checking for unlock, how can I check to see if another joker is unlocked or not?
honestly after a quick glance this code looks pretty solid
can you do some print debugging to figure out which code is being run and which isn't
it works for me, except the JOKER_RARITY bit crashes but without that it works
of course it works for you lmao
rigged game fr
house always wins
i set it to other_joker and it still isnt working, would that be the right one?
oop i have a small brain i see what i did wrong
i forgot to edit it so it works with mults which is what i was testing it with smh
if you get rid of the context check can you get it working at all
Here's the answer of how to check to see if another joker was discovered
G.P_CENTERS["j_Fox_gumoss"].discovered
i think like every part of this is broken š
if i get rid of the context check it says pass is 0 even when the other joker is popcorn
if i get rid of that check it goes:
breadverse (the joker i made): "Again!" (doesnt actually do anything)
popcorn +20 mult
breadverse: "Again!" (still doesnt do anything)
oh wait
the first one is probably it retriggering itself because i removed the check for what it should retrigger
can you post updated code
hey guys hope you are all doing great today. quick question, is there any way in this code to destroy every card but the first?
if #context.full_hand > 1 and G.GAME.current_round.hands_played == 0 then
-- something here to destroy every card but the first
for i = 2, #context.full_hand do
destroy_card = #context.full_hand[i]
return {remove = true}
end
end
end```
ignore my cooked debug messages
which of the cooked debug messages print?
I imagine you want context to be context.after so that this triggers after scoring
probably yeah, but right now its just destroying every card so i need a way to either select the cards, or just remove everything from the 2nd slot on in the full hand
actually I've never looked at context.destroying_card, gimme a sec
is there a more recent tutorial on joker creation out there, or is the one at #āć»modding-general the only one that's there
all of them because I made the checks that didnt work into comments
before that it was everything before #3
thank you! where would you be able to look up stuff like this?
so based on the docs and a quick search through the Source Codeā¢ļø I would probably do something like this (also disclaimer, I've never used context.destroy_card so this may be totally wrong)
if context.destroy_card and context.cardarea == G.play and not context.destroy_card == context.full_hand[1] and not context.blueprint then
return {remove = true}
end
THANK YOU all i needed is to find out how to iterate in the array, and this is perfect
not sure if it works because im taking a break but its a good start
you probably don't need to iterate the array
I think that's your whole calculate function
oh true nvm that was stupid of me to say
will try that too
is this possible to do?
both the "add joker to your hand" and "+^1 Mult" effect
thank you
that was an oversight lol
I believe Talisman adds exponential mult
adding a negative joker is definitely doable as well
yeah, I've definitely done that
bump
yeah haha
when does the game recognize when an ante has been skipped? i thought the 'Skipped' text was what this was looking for but i guess not
what mod lets you use a debug console?
debugplus
where did you find the docs for repetitions
I couldnt find docs anywhere so i just looked at other mods and that's what most of them seem to do
can you send a link to a mod that does it
interesting
context.retrigger_joker
I've seen other people use it but I've never messed with it
cryptid does here (i think im allowed to post this cause its just chilling in the mods folder but if not then oops)
that looks like playing card retriggers, no?
sharing mod's code is fine
just not unaltered balatro code according to the rules
all mods are under the license
open source, baby
that is a major point of contention
shoot maybe i dont really play cryptid enough to know what most of the jokers do lemme try to find canvas or smth that i know does
whether gpl3 works like that or not
i don't really want that legal debate lmaop
I want it too but I don't understand the argyments well enough to say for sure
just assume Yes and move on
me neither
looking at the smods code it looks like its just
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card == ?? then
return {
repetitions = card.ability.extra.retriggers,
}
end
also I wrote the code that fixes negative chips and mult, what should I do so that it gets into SMODS by default lol
well canvas uses context.retrigger_joker_check which i dont see in the steamodded docs so it might be custom
^
smt is wrong with my joker image initialization help a stupid fellow out
how do i retrigger all cards of a specific suit?
ok it works now, still need to make the checks work tho
maybe that fixed them too :clueless:
nope
bump
Can you tell me what the problem is?
I thought we answered that, which effect are you still asking about?
adding a joker into your deck
I mean it's certainly possible
check for other_card:is_suit in context.repetition
and return repetitions = number
ok fantastic. That's all I needed as motivation š«”
k_fut_collection
Thanks, I'll give it a try
mwybe look at betmma's "balatro moble" joker or whatever it's called
the draw_card function might be a good place to start
ok anyone know how to fix the other problems?
summary:
the 2 checks i commented out aren't working, the thing that prints context.other_card seems fine but the thing that prints blueprint_compatible says nil no matter whether it is or not, and the thing that prints pass says 0 no matter whether it's a food card or not
wrong chat
also, i cant help with the actual code since i am very inexperienced at that, but conceptually maybe you could make an enhancement that makes it look like the joker, add a card with that enhancement on blind select, destroy the joker on blind select, and add the joker when you play the card?
i guess that wouldnt keep the joker editions tho
look at aikoyoris shenanigan's freedom deck and entropy's define card, both do similar things
it'll definitely break magnificently if you try to play a joker from your hand unless you write some custom logic
is that within #1209506514763522108 ?
fire
that was my first guess too lol
oh thats really funny
oh, it is that one. cool
I would probably actually not do it that way and try putting the actual joker in your deck and writing it whatever functions it needs to act as a playing card
but I'm also not sane
this code is wild to read
not bad... but a bit hard
i tried doing that and i've got it to work one way (jokers in play areas) but not the other
but it requires a bunch of rewriting of bettercalc so unless anyone feels like doing that i would advise to not do that
I assume this is the part I'm looking for in adding a card to your deck?
it would crash the game if tried as is because jokers dont have ranks or suits
that's adding something to G.jokers
I think this just puts it in the normal joker cardarea
even the card2:add_to_deck()?
deck is a decieving word on balatro
right but you can just give a joker the fields/functions that playing cards game
ah š
all cards everywhere are the deck
add_to_deck executes the effect joker gives when obtained
well all the ones the palyer owns
tbh I'm not sure balatro mobile is technically shuffled into deck
but it could be if it wanted to be, lol
ah ok, thanks
it can go in the card play area
you need to give joker no_rank, no_suit (any_suit?) and always_scores, although i dont remember if playing card calc is hardcoded for enhancements or not
would I be doing something like card.area = G.deck?
did you look at the draw_card function
no
it seems to be how vanilla moves cards between cardareas
bump
I been digging through the Sourceā¢ļø to try and decipher how context.retrigger_joker_check works
what file is that within the lua dir?
the plant haters rejoice
š
common_events, though I would strongly recommend opening your whole mods folder in vscode so you can shift+F search the whole codebase
currently on a different computer than the one I mod the game on
brother I teach computer science principles, I know better than to open a stranger's zip file
nor do I particularly want to
but if you sent code snippets I will gladly help debug
have a feeling you are comparing the keys incorrectly for issue 2
probably
playing card calc doesnt do calculate on things that arent playing cards so you'd have to figure that out
but idk what the right way is lol
and i'm not sure that's where blueprint_compat lives
so I guess you don't DL mods?
unless you can see the repo
i originally had smth with .config.center which is how vanilla seems to do it but that just returned false every time, i switched to this cause someone else said to try but neither works lol
I use linux so I'm unconcerned about malware, but fair
to clarify I'm undo no dissilusion that malware on linux is impossible or even tricky to make and propogate
it's just not common enough to be a major target in the consumer space
now it's just returning true for everything š
changed it back
I simply do not have experience actually modding in earnest
so i'd be shooting in the dark as much as you
well i gotta sleep thanks everyone who tried to help
well... i can read documentation :P
np :3 hope you sleep well and figure it out soon
perhaps, but rn he was doing basic debugging of how to detect a food joker
and if it was blueprint compatible
I cannot wrap my brain around the call order of retriggers
as in was listed as such
gotcha
yeah I haven't the foggiest, lol
I fixed negative chips/mult though so that was a big w
ayyy nice
they're simply broken in default SMODS
so I made a post with the fix in the server
idk if that was the right place for it though lol
if you're confident in it you could make a pr on github
that is probably the correct thing to do but that also sounds like a lot of work
I mean if you have the code done it's just cloning, pasting your code in, commit/pushing, then opening a PR with a semi cogent description
what could go wrong?
:P
fine, you've convinced me
tree .
āāā assets
āĀ Ā āāā sample.png
āāā localization
āĀ Ā āāā en-us.lua
āāā main.lua
āāā modules
āĀ Ā āāā atlas.lua
āĀ Ā āāā joker.lua
āāā smods.json
atlas.lua: ```SMODS.Atlas.new("custom_sprites_atlas", Sol.EAtlasMode.A_Directory, "assets/")
return {} main.lua:SMODS.Mod:new("chaotic_randomizer_mod"):init()
SMODS.load_localization("chaotic_randomizer_mod", "localization/en-us.lua")
require(SMODS.get_mod_path("chaotic_randomizer_mod") .. "/modules/atlas")
local chaotic_randomizer_joker = require(SMODS.get_mod_path("chaotic_randomizer_mod") .. "/modules/joker")
SMODS.Joker.register(chaotic_randomizer_joker)
why doesnt this load a texture for my joker š
don't forget to fork :P
this.... doesn't even look like smods code?
did you use chat gpt?
wdym i copied it from a different mod that worked idk...
it worked on my other mod
š¤·āāļø
when a year ago? if that's smods code, it's ancient
lol
i guess ill read the api š„
yeah, would reccomend
yh ik where to find it i aint that dumb š
ty btw
š
lol, just tryomg tgo be helpful
the wiki is actually kinda hard to find tbh
if you're using ai to make a joker, don't, it has no idea how SMODS works
then read it maybe? lmao
are there any mods that add a true color inversion shader? (negative isn't true color inversion)
That's probably one is the easier shaders to code
If you don't mind trueblack
yeahh
to hell with design rules
Based
im not at my computer so ill have to learn tomorrow
but i was just wondering how easy it was
i think negative used to be true inversion but then it was discovered that some couple jokers look like a very very racist, old practice when true-inverted
dw i wasn't trying to dissuade, just throwing a little tidbit of info out there
Huh, interesting
I'm creating a joker which inverts the effects of boss blinds, and i need to code a brand new boss blind for every single vanilla and as many modded ones as i can manage for it
the general color for each blind is inverted
that's sick ngl
and when i learn how to utilize the atlases correctly, the blind token will apply the shader to it too
Here's an example
Currently the token uses a placeholder sprite
but ideally, it'll have the same sprite as the plant, but inverted
the blinds I've already implemented so far are: the clock, the shard, the manacle, the wall, the serpent, the goad, the head, the club, the window, the plant
Oh my
That is ambitious
Imagine not having individual lua files for every joker anyways 
you what
Ngl glsl looks like a bitch and I'd almost be tempted to try to use psuedo-shaders using love.graphics methods and get the game/smods to somehow treat them as real shaders when i get around to modding
I used to have my entire code in a single lua file but i reluctantly switched to multiple files pretty recently
But that'd probably be way more of a pain anyway
oh dear god
What is that directory viewing thing though
looks extremely useful
(I'm quite new to vscode)
The one on the right?
I just open individual files and keep them in tabs
i am new to coding
only began coding a month ago or so
Anyways in your file explorer, right click the folder and āOpen with VS Codeā
i ā¤ļø having separate files for almost every single item
Yeah I think you lose most of the benefits of using something approaching an ide that way
I've never used anything like that outside of college myself
Bit I'mma need to suck it up to properly code and mod
i used to have every item use it's own atlas but that got extremely annoying extremely fast
especially when i started making exotic jokers
That is terrifying
Lucky-Rabbit/content/<item type>/<item name>.lua my goat
what the fuck
just have like 6 atlases, one for each item type
Maximus/items/<item type>/<item name>.lua my beloved
technically card markings use the Decks atlas because i was too lazy to separate them lol
one lua file, one atlas per item, i am SO glad I don't do that anymore
Doing file-per-item makes navigation FAR more manageable
I think you can just make a loop to initialize all of them from the filename
speaking of card markings #ShamelessPlug new card modifier type called markings coming soon in v1.1.0 #1342484578236895274
it seems pretty tedious to manually add each new item to the load list in the main lua file though
Not really tbh
the time saved from not having to scroll around a file with 3k lines is absolutely amazing
My method is keeping an array of file names in my main.lua and looping through that array in the loading function
I'm in both minds about it still tbh
So in reality all I have to maintain when adding something new is a string in the array
i'm evil and have just been stacking on function by function into main.lua so it's a mess, i'll make a utilities folder eventually
yeah definitely
me who has literally everything except blinds and the modicon on the same atlas
i just have a lib.lua file for functions and variables
Which you could add with a bash, python, or likewise script if you were so inclined
That is also terrifying
i think i'd lose my mind having to count the exact units until an item's pos
this was probably the hardest thing ive coded thus far (except for my factorial mult joker), this took HOURS of headaches
it's really funny to me that balatro's atlas indexes start at 0, and they're coded in a language whose arrays start at 1
Ngl though I love /looking/ at huge atlases
I could do that but my adhd brain has an organization process for card collection order (and yes I maintain collection order via load order and not an order attribute lol)
currently x2 y32
The way balatro handles atlas positions is EXTREMELY good, i absolutely love it
the x and y
It's extremely intuitive and simple
i love the 0 indexing
Atlases have zero indexing tho! 
i just wish atlases other than boss blinds natively supported animations
i hate having to use the jimball method
woe massive atlas of everything be upon you
it's so tall
aww come on you could make 200 jokers
In an earlier dev build of Astronomica i had an animated spectral card with 100 frames, ALL of which were on the same Y pos
wow
a lot of stuff isn't implemented yet but the lucky rabbit atlas is great
but what i really prefer is the silly card atlas, my beloved
If you set up an atlas like this, it will loop through each x index on the y it is given
this my friends.... is peak
works on blinds, not on cards
Oh bruh
cards dont use AnimatedSprite lmaoaoaoaoao
Ah
you have to do the animating part yourself
That would explain it
yeah for cards you gotta do a bunch of weird stuff
for a "balanced, hopefully" mod i don't think i could take balancing 200 jokers
Iāve done jimball method before but only once so I wouldnāt know 
peep the 3d hand for terminal velocity
epic
Meaning i have to do this monstrosity
atleast you aren't doing soul animations
delta time šØšØšØ
Anyways hereās this rather large joker spritesheet (still unfinished!!)
yeah, looked at gateway's code once and almost had a stroke
Most of which are not yet released
I think the most egregious thing I've done so far is call every single context in smods in a single joker
what did you call every single context for?
A joker that scales whenever anything happens
I miss my stickers :(
what happened to the stickers š
I hope you realized omitting any sort of context check got you that functionality lol
ah yeah that would probably suck lol
I had to exclude some of them because they're broken or annoying
like context.cry_press
or context individual
An exclusion list sounds much more manageable wouldnāt you agree? š
Thunk happened
Keep in mind i only started coding a month ago
ruling with an iron fist
OH
behold clickbait thumbnail
i also created my own global variables for pi and euler because i didn't know math.pi existed
2.172782u171 or whatever
Oh hey another soyjoker
please excuse the horrible screenshot im on mobile
You scare me
the developers yearn for chudjoker
This was the second joker i ever coded btw
You are incredibly ambitious for a new coder lmao
This was the first
All it is is blueprint that aims leftward s
Most of this code is copied from old blueprint in cryptid though
But it's heavily modified
thank you! :3
I like making weird and unique stuff
Iām very glad you took it as a compliment because it was very much intended as one
3rd thing i coded for my mod is far too long to send even if i zoom all the way out š
I also added a uhh
Direct Score addition mechanic for jokers
Only issue is
it's all hardcoded
and i tried migrating it to it's own function but i didn't know how
multiple jokers use this btw, so the code has to basically be copied and pasted for every single one
I also created this monstrosity
WHAT
what is that for?
Why is that table so LARGE
this is all the code for the joker that scales for every possible context, i had to define each context twice because i wanted the upgrade screen to specifically not show up for every card discarded, but still upgrade for each
It is what is needed for thy ability.
he has alot of things he can do
like 15 different things that can happen when you meet the 1/13
Someone wanted me to make a Spider Joker that gave +8 mult āfor every spiderā (when in reality it was just a 1/10 chance in disguise)

wild
oh my fucking god i love this
This is definitely a seals on everything feature
and each one has thier own sound effect so before coding even starts theres this massive line of sounds as well lol
this is all the code (so far) for my joker that inverts the effects of every boss blind
this is only a fraction of how large its gonna be too
in its finished state itll be roughly 30-50 times longer
since i need to code a brand new boss blind for EVERY single boss blind
i mean, you can just do SMODS.Sound:register_global() if you don't have anything whose key isn't the same as its filename... right?
or am i wrong. because i'm pretty sure that will just do all that
you know when you read your old code and go "what the hell are you doing"
sob. just return it normally
also, for my factorial joker, i did something really stupid
i have two different functions for factorials
exact computation and a less accurate formula
idk i didn't even know that was a thing i've been doing that with every sound i add to the mod š
i use exact computation for smaller numbers (3 to 720), and the faster, less accurate formula for larger numbers (above e1000)
all 73 of them added in that way
the fuck??? i thought factorials were not made this way
any reason this isn't working? ```lua
SMODS.Joker {
key = "firstBrother",
loc_txt = {
name = "El Primero Hermano",
text = {"The oldest.", "{C:red}X1{} mult for each Brother Joker you have", "(Currently {C:red}X#1#{})"}
},
atlas = "dexsJokers",
pos = { -- 0,0 placeholder
x = 0,
y = 0
},
cost = 1,
discovered = true,
config = {
extra = {
Xmult = 2
}
},
loc_vars = function(self, info_queue, card)
return {
vars = {card.ability.extra.Xmult}
}
end,
calculate = function(self, card, context)
if context.joker_main then
return {
Xmult = card.ability.extra.Xmult
}
end
-- card.ability.extra.Xmult = 1 + #find_joker('secondBrother') + #find_joker('thirdBrother') +
-- #find_joker("fourthBrother") + #find_joker("fifthBrother")
end
}
the code actually switches from small to large depending on the number
are you using stirlings
wdym?
arent factorials like 5 * 4 * 3 * 2 * 1 or something
or am i just stupid
for the approximation method yes
oh so it's like an approximation function
for the exact computation i use the more accurate computation
function UTIL_TABLE.small_factorial(n) is for numbers below ~e1000, function UTIL_TABLE.efactorial(n) is for numbers above ~e1000
makes sense
keep in mind this was the second joker i ever coded
that's actually quite impressive that you defined functions so quickly
why do I have to be a computer nerd whon hates math š
bump
The reason i don't use stirling's approximation for every number is because with smaller numbers its inaccurate and trigegrs my ocd
people like you are the reason why forge has 30 lines of code that approximate 1
for example, 3! is 5.6 instead of 6
like.... sometimes I have an acedemic interest in the qualitative trivia of math
Try lowercase xmult
but for larger numbers it doesnt matter because its all scientific notation anyways
and I did well in school
but i'm not a fucking calculator, I was barely made to do sums let alone calculus
Use SMODS.find_card instead of find_joker (and donāt for get j_<mod key>_<card key>)
personally i think doing anything above e10 with no stirling is a bit ridiculous
but you should round the number to the nearest int
perhaps
this is the exact code, I think it is actually quite lower
this basically sets your Xmult to the factorial of your current Xmult at the end of the round
it's also demicolon compatible!
We love demicolon
i really like math jokers but my mods naming gimmick makes it hard to put any in
like this is a bit of a stretch already
this joker is secretly xChips
I was considering adding diagonalization to my mod but it would be too overpowered, even by most op mod's standards
diagonalisation lmfao
it'd probably be so fun to do math jokers if i ever actually wanted to do math outside of school
(those who know, know)
shit, that reminds me of my algebra 2 homework i still never did
does anybody know how to force a hand to be debuffed?
š ±ļøalculus š ±ļøalgebra and š ±ļørigonometry
it's 11pm on a sunday i'm just not going to do it š„
š ±ļøarithmaitc
my algebra period is 2nd period so maybe i can lock in in biology
to explain diagonalization scaling:
f(1) = 1
f(2) = 2
f(3) = 3^^7625597484987
what the fuck
f(4) is basically unfathomable
š ±ļøalatro
man i just now got to logarithms wtf is diagonalization
basically n{n}n where {n} is the number of arrows
im sorry POLTERWORX who?
This is just pure number vomit
LMFAO
at a certain point the numbers don't even mean anything the game is just impossible to lose
what omeganum's "limit" is displayed as ingame
you need a joker called Bunny... who's just a bunny
yeah
That's why I've held off on implementing diagonalization
š ±ļøystic š ±ļøummit
i still don't fully comprehend omeganum but i've also never bothered reading how it works when i was anything but tired out of my mind
making a joker where it's āāā...āāāN Mult where N is the amount of chips mod 3
the mod 3 is very important
wtf is the arrow
chat is this joker fair?
name = 'We Do Some Trolling',
text = {
'{C:red}+69{} Mult, {X:mult,C:white}X10{} Mult',
'{C:red}1 in 10 chance every blind{}',
'{C:red}selected that the game ends{}'
}
},```
I just realized I have a math joker thatās compliant with Bountifulās āBā name scheme lol
I have talisman for mod depend reasons, but play on vanillia scoring
we should have an emote like
but it says True... instead
i wanna implement like a joker with 10 arrows or something but the values are so infinitesimally tiny that it's still only common worthy
why is the mod here not using the assets from the 1x and 2x folders
I hate modders that just use variables for XMult/Mult/Chips. Like there is a reason that LocalThunk put (Currently: x) at the end of his jokers instead of this bullshit
can i see the atlas and joker code?
did you put the atlas= "atlaskey"
and the positioning values
i don't think (Currently: x) works in this one
from time to time i play cryptid just to see how high i can get the number and at a certain point it doesn't even register in my mind, my comprehension of numbers stops at 1e308 and my only measure of scale is that a billion is too many to have of anything
i do want a binomial dist. joker
I'm also implementing a joker that utilizes the collatz conjecture
not sure what it'd do
for the math nerds here
it'd uh.... dance around while scoring if it worked
X2.99874 mult
and just be nonsense
Thatās what the āapproximatelyā is for lol
yeah lmao i think hes reading the joker wrong
I forgot
forgot I can't read
it's the first thing on the joker page
that's optiona;
which is what I actually forgot
idk how it works if you don't use it? Just have filenames for each joker which match their key?
for those unaware, the collatz conjecture kinda looks like this
or is it only optional as in it'll boot without it?
but you get jimbo
New joker idea:
Robber
Takes 5$ from you every round.
-# Fuck you.
didn't seem to work, and now my game is crashing when I buy the joker lol
fun fact about the collatz conjecture if you write it in base 3 it becomes computationally easier
crash report:
unfortunately there aren't very many ternary computers around nowadays
fun fact about the collatz conjecture if you write it in base 1 it becomes computationally easier
how tf do you write anything in base 1?
It's SMODS.find_card not just find_card
ah, thanks
i doubt the truthfulness of this claim
it's kinda crazy how the only reason ternary computers aren't more widespread is because they're hard to develop for and manufacture parts for
on paper, they're more powerful and more power efficient
crazy is a weird way of typing logical
Real
uhh here's 20$ šøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšø
but it adds those to its sell value or something... hmmmm
make a ternary computer solely for collatz conjecture brute forcing
it's a cursed joker so it doesnt offer any benefit
hell it doesnt even adjust for the rental tag
ohhh ok
fun fact about the collatz conjecture i have absolutely no idea what that even is
fun fact about the collatz conjecture The Collatz conjecture[a] is one of the most famous unsolved problems in mathematics. The conjecture asks whether repeating two simple arithmetic operations will eventually transform every positive integer into 1. It concerns sequences of integers in which each term is obtained from the previous term as follows: if a term is even, the next term is one half of it. If a term is odd, the next term is 3 times the previous term plus 1. The conjecture is that these sequences always reach 1, no matter which positive integer is chosen to start the sequence. The conjecture has been shown to hold for all positive integers up to 2.95Ć1020, but no general proof has been found.
uhhh the maths is that 1020 -> 10201 for odds and 210102 -> 101201 for evens. the /2 function for base 3 is a trivially easy mapping with only one required stored value
it would be significantly faster computationally but the downside is it's a ternary computer
ah, thanks. It works now!
why don't they just do x0 +1, are they stupid? /s
ture...
i failed math multiple times so thats how i would do it if i was to do something with the collatz conjecture lol
but yeah, this is generally how the conjecture works in practice
woops
happens to the best of us
Cmon, if we're talking about integers in the collatz conjecture, why not we try infinity? I mean, it never changes to 1
i still lose sleep over missing commas
Calling infinity an integer is a stretch
sure wish VS flagged that as an error šŖ¦
infinity is not an integer
uhhh... here's 20$ againšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšøšø
oh well its not crashing anymore at least
but yeah my joker idea was to take an input (for example, money), and take the "steps" as chips, and the "highest" as mult
would be pretty complicated though
we have went from square -1 to square 0
wow...i have... 40 dollars... this is the most money i have had in my life as a math professor
can somebody let me know why this is debuffing every hand?
for i, v in pairs(context.full_hand) do
v:set_debuff(true)
end
return {
message = "devastating."
}
end```
is this a roleplay now
balatro when i ask to get 25% of infinity because i ate pizza
no i was making fun of bad teachers paychecks
naneinf is not a pizza
you can win a naneinf blind with mr bones right
this seems insanely overpowered unless im misunderstanding
beans are not 5
can't you just always reach the blind requirement in 4 hands or less?
is it tho? its a consumable
i cannot believe that pizza is consumeable i thought it was inedible this entire time
perkeo and a few blueprints with this would be crazy
true perkeo and blueprints could def make pizza very op
you should stop eating at pizza hut then
yeah that's on me
I yearn for the day someone gets a Perkeo and beats Ophiucus in my mod (Ophiucus puts a negative Soul in your consumable slot when you beat it lol)
me with my unused testing joker that reduces the blind requirement to 0
if you reach naninf and had perkeo and pizza you could just play an infinite game
because 25% of infinity is still infinity
any reason why the texture for this still isn't doing anything
What does your atlas object look like
this is what my atlas key is like
SMODS.Atlas{
key = 'Jokers', --atlas key
path = 'jokers.png', --atlas' path in (yourMod)/assets/1x or (yourMod)/assets/2x
px = 71, --width of one card
py = 95 -- height of one card
}
?
sorry i forgot what an object was my brain doesnt work
why are there so many card areas what do those do lol
stuff with other mods lol
i don't like how they're not aligned
bottom right is spells above that is abilities (both by betemma) and above that is horoscopes (from maximus)
spells and abilities just straight up don't work
well shit
he's beautiful
screenshot your assets folders
what does +^1 mean exactly
is there a way to change the effect a joker has when you pick it up?
I'm trying to do a "when you pick up this joker for the 1st,2nd,3rd time" thing
^2 mult
ah
I guess since it doesn't scale I can just write ^2 lol
so I know that pressing alt+f5 is supposed to reset your game, but sometimes it doesn't work. Anyone know why this is?
reduced the description for clarity
why does this change anything?
it'd look the same if extensions were hidden and it was named smods.png.png
I mean testmod
unless that's some other ui element, lol
i am not hiding extensions
If you want to be consistent with other mods that add exponentiation, I'd recommend using {X:dark_edition, C:white} for the ^2
okay, sorry, just never know sometimes
its alright
oh, neat! I didn't know there was already a precedent
but makes sense
unrelated but https://www.youtube.com/watch?v=Xg-qfsKN2_E
āę»ć¬ćććććććäŗćć«ćŖ
Streaming / DL https://lit.link/mikitop
Twitter https://twitter.com/mikito_p_
ā
Music & Words - ćæććØP
Illustration - GAS (ex.ććć)
ā
Off Vocal - https://www.dropbox.com/sh/ltrd6mp3ul2f47d/AAAOElqai9TVwe1UzXgnClNRa/ROKI_offvocal?dl=0&subfolder_nav_tracking=1
ā
ćæććØP
HP - https://w...
yep!
WAIT I know this song
I didn't realize it was called Roki lol
very good song. Fun bop :]
what's the badge for negative?
can I find it in the docs somewhere in steammodded?
"badge"?
I might be wrong, but I'm pretty sure this thing hanging off the side that gives you more information on a topic related to the description is called a badge
that's the tool tip
the badge is the name for the thing that says uncommon
there's badhes for rarities, mods, and people also use them for credits sometimes
info_queue[#info_queue + 1] = G.P_CENTERS.e_negative
yeah sometimes i call tooltips info queues, but I don't know how sementically sound that is
or i guess more likely 'info queue box"
aka where the mod badges for the things they describe should go
so they actually get to exist
Seals also have badges for some reason lol
and you can see where every enhancement, edition, seal, sticker, whatever comes from that goes into a card
true
in a many multiple mods setup, like I play, this would be very nice
I've asked the smods folks about it
eremel says he'll look into it
ohh ok
Any ideas as to why Playing Loki gives {X:dark_edition, C:white}^2{} Mult. doesn't make the text white properly?
maybe try removing the space?
oh hey, that worked. Thanks!
ofc!
If you have 4 perkeo triggers every round and you're copying this, its just ez win
well what can i really do about it other than hope the players dont get a bunch of perkeo triggers
maybe make it 25% of the remaining chip amount?
that won't stop a 3x blueprint + perkeo setup from trivializing all blinds, but it will stop it from outright winning everytime
but then it wouldn't ever win would it?
i do like the concept of being like 25% of the blind off and knowing you can't score that but luckily you have the pizza to get you that bit
blinds should be trivial if you're scoring high enough
humans arent supposed to be doing this
I know bro
though they might have a better shot if their retinas weren't burnt out
what if it like spoiled over time? and like when the round ends if you don't use it it goes from 25% to less?
so like if you were just duping it with perkeo it would get worse?
would that work?
or maybe you could make it only work once per blind
I think if people want to set up an interaction so they can click use four times to negate the game thatās on them
I donāt see why your end goal should be allowing the player to guarantee win off a consumable, but alright
Your example would be a guaranteed win lol
you still had to get the other 75% though through actual good plays not a guarenteed win
Sure, but rule #1 of game design is that humans will optimize the fun out of a game. It feels lazy to leave that tantalizing, fun-ruining mechanic in the game when there are good solutions to fixing it
like if you have 1 pizza and you dont have dupes or anything you use it thats it just 25% of the blind score one time
I mean.... the player owns the game once they're playing it, so design as you please, but dpn't tell the player how to have fun.
What I mean is, you can and probably should balance around your own mod, but also give players the optoon to turn things off it they feel like they'd make sense to be modular, even if those toggles would unbalance the game
I think perkeo is much more to blame here, it limits consumable design massively
Like the entire game is clearly designed around having 1 of each card available at once, perkeo completely changes that
the thing is imo that for all the people who have fun doing that shit, there's at least as many who can't be assed
who if they do break the game would do it with their own unique playstyle and stubborness
basically the type of people who don't do photochad
whats the width and height a joker sprite needs to be again i still dont understand how to actually get it to show in the game but im pretty sure without it the game will crash on startup
I donāt disagree, but half of the fun of any game is restriction.
I can tell you from personal experience that all jokers being negative loses the fun factor really fast once youāve hit ante 8.
Similarly, having jokers that give X100 mult and insanely high numbers just for the sake of it make the battle nonexistent, and thus the gameplay. (Both things Iāve messed around with in mods Iāve made lol)
I donāt disagree that a player should play how they want, but in order for the player to play, they need gameplay to interact with. And that requires challenge
I could break the game in a cheap and easy way that feels unfun to me
but I just... don't
because it'd be unfun
71x95
ty
challenge is fine, but you don't hold all the cards
you could easily hold well under 1/20th of them in literal terms
Ah shit, I gotta go to bed. Itās 4am lmao
Fun talk. Iāll be back sometime in the future to ask more modding related questions. Goodnight, yāall
sleep well :3
like i think it feels fair if you dont count the possibility of duplicating it endlessly because its only going to help you on that one blind and you still had to score the rest yourself
i think it'd be great if it only worked once per round
it's like... someone could just debugplus through everything, like some of thse strats people worry about are that assininely irrelevent to balance
personally i think both perkeo and observatory suck design wise
not saying that's nessacarily true here
i wasn't folowing the actual topic
but basically if someone wants to make a toy out of the game instead of playing the intended story mode, they will
and more power to them
perkeo is my fav vanilla joker, it just gets kinda op outside of vanilla
like perkeo + pointer is just a budget creative mode should you choose to utilize it that way
I think OP is when you're easily scoring more than 10,000,000 in ante 8, anything under than that tbh can be just like... what if all the jokers were actually good tho?
not op for their rarity
just good for it
which amounts in a higher power level
i think perkeo is really weird because if you ever have a cryptid or something you just win the game
personally, at least in my mod, i like to make super op stuff, but they have to be creative and hard to get (basically, can't get it without any challenge, and not something boring like x294828482 mult or whatever)
i like making jokers that buff weaker vanilla jokers