#💻・modding-dev
1 messages · Page 73 of 1
not exactly
glitched/misprint from cryptid just gives x0.1 to x10 to all values randomly
this gives either +3.25 to -1.25, x3.25 to x-1.25, -3.25 to --1.25 or /3.25 to /-1.25
@opal spade you know your infinite fusions thingy
how the hell did you make it retain the jokers on reload 😭
i never found out how
hint:
no shops!?
buys everything in shop and eats it?
Destroys a random Joker at end of shop and copies its abilities, 1 in 3000 chance to destroy a newly created card
Odds halve at end of shop
what's the proper way to delete/dissolve a card from your deck? it seems just doing card:start_dissolve() causes bugs and makes invisible cards sometimes
in that block what actually tells it to destroy the card
I'd still say check sixth sense
all i see is spectral consumable shenanigans
Man.

return true
do those get called when discarding as well
i don't think checking vanilla cards is good considering they sometimes take really weird different routes you can't do with a mod
i usually check modded jokers so in this case something like the queens gambit from cryptid would be good
phishing!
i forgor where x_chips
i hooked card.save and card.load to save/load infinifusion values
awesome ty
Ok
or Q either
btw if you'd like some help with the joker copying, I can help coding that
like I think you could even make it so after copying a joker it changes it's description to match the copied joker
Would this bee too OP?
This is exotic tier…
would that gain ^0.5 if a joker gave x5?
It’s probably better than most Cryptid exotics too
Yep
If you had X5.5 Mult it would still gain ^0.5 Mult
that seems pretty good for an uncommon lol
I forgot to put 'resets each round'
oh
here is an interesting thing: every code comment in the Balatro source code
is there any way to make this little tab on the side be a playing card instead of an enhancement or joker? im currently using this code:
info_queue[#info_queue + 1] = G.P_CENTERS['m_steel']
or just any custom text
I think you can use any localization key
this is probably dumb but how do i make a localization key without attaching it to a card?
{set = , key = , specific_vars = {}}
which set
Still pretty powerful, Rare at bare minimum
you'd have to check how vanilla does the card localization
wawa
that looks uncommon at best
high quality art
hims do be pimched tho
joker pimch
i forgot to make it Not legendary so now we have the worlds worst legendary
please break up that line
erm decent, rather
zooom
blueprint this for a Lot of fun
only 9000 jokers to go
if only i knew more than very little about scp shit 🥸
its fine though i can just recruit somebody to do all the creativity for me /j
why make an scp mod if you're not super into it?
love the idea, would love to help, i suggest making the first card the well known ones like 682, 096, 049, peanut (the statue that snaps your neck) (dont remmeber number rn) and stuff like this, im very knowledgeable in the scp wiki, so if you need help dont hesitate to ping me or shoot a dm
if only there was a mod with a game that took inspiration from scp
/j
if i wanted to make a custom object type that could be discovered would i have to save their discovered status myself? if so where would i hook/patch to do that
i feel so stupid rn
im used to checking if a joker is in collection by checking the collection
but you can just
check if the card's area is marked as collection
failed to make a working tab so i'll come back to it later
I know grim mod has discoverable object type (skills) and collection tab
yeah, i'll take a look at it when i get back to collection
i've tried to have a look but couldn't find anything, but is it possible to change one hand into another? trying to get straights to turn into straight flushes but unsure how to do so.
Betmma has ascension, a joker that does that sort of thing
awesome ill give it a look, cheers
@mellow sable when you added the edition calc with retriggers, did you only add it for playing cards or am I blind? nvm I am indeed blind
Im sad that mods arent available for mobile, i dont even have a pc
how do i upload this mod as a real mod instead of a single file https://discord.com/channels/1116389027176787968/1290380419606380646
For context they're just replacing he en-us locale. My impression is that lovely could do it fairly trivially. Though that would probably also break anything that might patch into it, so I'm not sure
Guys, is there a guide somewhere on how to make joker mods? 🥹
you can't patch loc files
Ah okay
Apparently smods will just replace them anyway if you make a mod with just a header and put the new loc in a folder called localizations
you can follow the instructions in the Steamodded Wiki, that explains some of the stuff, or you could reference the example mods packaged within Steamodded (ExampleJokersMod would work)
ouroboros soloes ngl
Stuntman goes hard
its not actually that powerful lmfao
the challenge still has the effects on cards in collection
Its a concept or its a new functional jimbo?
Debuffs are funny
20 rounds is crazy
can anyone tell me why this joker isnt working? like, what am i missing?
you can't just return joker_slots from calculate, that's not how that works
oh that was randomly there, i accidently left it there
look at an actual joker slots effect, it works via add_to_deck/remove_from_deck
also mult_mod will be +4
i removed it, but the problem is the game doesnt even detect this is as a mod
oh right
ik, it was also removed since i noticed it
your header is indented
which means?...
there's whitespace before the --- on each line
ah
i removed the space, it still doesnt detect
current code
wait lemme send as a txt
oh my fucking god
im stupid
the game is still not detecting it...
found the issue
i didnt have a ---------------------------------------------- thing that seperates the header from the rest of the code
holy shit steammodded is sensitve
It's been si long since I've played vanilla that it took me like 3-5 hours to win a run
Though that might be because I also have to unlock stuff
Whoops meant to put this in modding-chat
will anything evil happen if i try to give a decimal amount of money
or does it just work
Yeah give imaginary money instead mate
In function Game:update(dt) and modulate_sound(dt), what does the argument dt mean?
I wanted to figure out the length of music1, but the original file is very pitch-shifted
delta time iirc
so like time between last and this frame started rendering
The speed modifier for music1 is definitely somewhere around 0.7X, but I need to know what dt is to get a better value
If it is 0.7X, then the length of music1 would be 4:08.029
delta time is the time since the last frame
it should change based on fps (so i assume it'd be 1/60th of a second at 60fps), but it shouldnt really matter for your purpose bcos in music it's probably used only for interpolation
delta isnt (or at least - shouldnt be) a fixed value, it changes every frame
(it also changes with gamespeed but you can just divide dt by gamespeed)
also it is exactly 0.7
its what now
it makes sense, just didnt expect that
yeah real dt is dt / G.SETTINGS.GAMESPEED
I guess game speed really does mean game speed
and the music speed is changed to compensate
if I'm understanding that right
Actually G.SPEEDFACTOR, because G.SETTINGS.GAMESPEED is base value
shrug
yo is it possible to disable a boss blind in challenges
i need to disable crimson heart and verdant leaf
nvm found it
i might be a little evil
lol "disable a boss blind"
I'm getting flashbacks
When I was making upgrademod, I overhauled Chicot and Luchador to make the "boss blind level" feature
infinite money with reroll surplus 
I’ve done a lot with the game music
Game runs music at 70% pitch and speed of sound files
how tf do you remove rank sprites from cards 😭
bro looking like an Ace
hes the REAL scholar
is there anything stopping you from just automatically installing dependencies in your mod if they don't exist?
os.execute("cd %appdata%/Balatro\Mods & git clone (link)") would just work wouldn't it? unless i have a fundamental misunderstanding of os.execute or smth
oh wait you'd need git for that
not everyone has git 
regardless surely there's a similar approach with something else
i completely understand why steamodded can't do something like this because there's no central hub for mods but why can't individual mods with dependencies like cryptid do something along those lines
resolving dependencies automatically is something we do want to implement within steamodded
it's a bit of a bigger project tbh
but no we can't just use git
that too
looking to make a custom suit give +1 mult to any cards of itself when played
kind of like how normal cards give + chips
i want my suit to give + mult
is that possible
Is there any sort of document or manual going over the different custom functions, variables, states, etc?
something akin to this? https://rivalsofaether.com/workshop/
https://github.com/Steamopollys/Steamodded/wiki/05.-SMODS.Center theres SMODS wiki
thanks
I DONT UNDERSTRAND HOW CARD AREAS WORK
they hold cards
im so bad at drawing that the joke art on the left is better than the art with effort wtf
I think they're all fine tbh
how would one make this bigger
card area the card is sticking out the top
if you created the card you should be able to change its size no?
(cardarea).T.w = width
(cardarea).T.h = height
(cardarea).T.x = x pos
(cardarea).T.y = y pos
so i need to change the t.h?
change height and y position slightly
change the height by the number you want, and the y position by half that number
ok
that should make it centered
i dont know where the hell i am changeing it tho
ok
Look for the atlas in the joker code maybe try changing that
long bucket XXXXXDDDD
Long bucket
(I think that's how atlas works)
Like, there's x and y pos on atlas
no its the card area
the card area is too short thats my problem
increase this?
like, in the code or in the game?
increase it more?
ok
wait
i cant tell if thats
oh
thats the position of the cardarea innit
this should be what you wanna change, no?
il try it
ok so how do i make a deck actually do something, im trying to make a Common Deck where every joker is common but i have literally zero idea how to do that part
nothing
are you trying to change position or size?
idk
??
as far as i can tell, thats about modifying the collabs and stuff
yes its a template for changing the collabs
oh, i probs only read the title
https://github.com/Steamopollys/Steamodded/tree/main/example_mods/Mods try looking into the deck examples here
idk if that will help but try it anyway
i think itll help a little
i hope so
idk any other places that show custom decks excpet looking at other mods custom decks
i was wondering if theres an option to add a whole custom localization into the game through steammodded? like how brainstorm adds a new menu to the settings i can add a new option in the localization menu?
like a new language?
yeah
yeah, adding a new option in the localization menu should be pretty easy
I don't think steamodded supports anything like that though?
so you're probably gonna have to do it yourself 😅
dang, im flipped is what your saying?
I think steam-modded will load your localization file for you once you do define a new language
well yeah ik that
i just wanted to make this an option to disable without restarting the game
so like without disabling the game
a joke language?
Gimme a sec
guess il just have to ask math guy when hes on because im at a loss here
is there a way to stop certain joker rarities from appearing in the shop
you should be able to make a new language like this G.LANGUAGES['en-test'] = {font = G.FONTS[1], label = "English 2", key = 'en-test'} @ebon blade
I think it should fallback to english values
just put thise below the header im assuming?
ill try
but it might need to be loaded later
completley works at the top
also looking at it you'll probably need to lovely patch to have it remeber your language choice when restarting
i honestly dc about it remembering my choice
it might get annoying, and if it does ill deal with it
for now i have like, over 9000 assets to change text on
cya never
fair
(not in a rude way)
btw, debug+ is amazing, thanks for making it!
this lovely patch should work ```toml
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''['all2'] = {font = 9, label = "English", key = 'all', omit = true},'''
position = "after"
payload = '''
['en-test'] = {font = 1, label = "English 2", key = 'en-test'}
'''
match_indent = true
overwrite = false
where do i put this?
?
make a lovely.toml if you don't have it already. You also need this at the top toml [manifest] version = "1.0.0" dump_lua = true priority = 0
done, thanks!
keep getting this error, am I implimenting it wrong?
I'm using this, which is what is also used in the SMOD example jokers
whatever the current context is, it doesn't have a other_card
That brings me to my next question. What the heck is other_card and the regular card? I thought that card referred to the card that owns the function itself going (ie a joke) and other card was a different card
other card is present for cases where it makes sense to have one, such as when scoring cards, or baseball card's effect
So why is it throwing a nil when I submit a face card? Maybe it’s something to due with how it’s nested?
I would need more code
thats running on any time calcualte is called, including ones without other card
you wat to stick that into the other if check you have
you could theoretically hook the function that generates jokers for the shop and prevent any jokers with unwanted properties?
maybe there's a better approach than that though
yeah that's what I did, but now it's just not triggering at all I think???
I'm still testing to make sure
messages and scoring doesn't work but I seem to get text updates at least
are blind names hardcoded? i tried changing the name of small blind
yeah I don't get anything added to scoring at all it's super weird I don't know what's happening
is it bc I don't have a context.joker.main?
absolutely unsure
your returning above the if so it never gets past that
oh wait
nvm i read that wrong
this code is confusing
if I told you what should happen, would it help?
you should probably just fix the indentation, that would help a lot
are you using the localization file? there might be multiple entries that map to Small Blind, make sure you change all of them
i need to change all of them? alright then, to work i go
it did nothing
indentation isn't for your computer, it's for the people reading your code
it won't change the output
if its something like
Blind = {
bl_small = {
name = "Small Blind"
do i need to do G.localization.misc.Blind.bl_small = ['Small Blind'] = "(whatever)"
or do i remove the .blind and just do bl_small
honestly steammodded doesnt cover this stuff and neither does lovely
So right now the code is meant to just take a regular face card and give the joker +10 chips and +1.5 mult. However no messages are popping up and the joker doesn't add to the score
if you're planning on making a whole new language entry, I'd say just create a whole new localization file at that point
but if you want to do it in code (for some reason?) it'd be more like:
G.localization.misc.Blind.bl_small = {
name = "",
text = {"", ""}
},
iirc
The actual card will target enhanced face cards and destroy them, but for now I'm just trying ot get this to work
oh my god im stupid, i couldve done that all along
I will say that different mod makers do their joker coding in radically different ways, I'm just trying to follow the smod example jokers
so it looks more like this as a whole
it probably should be card = self in the return
but other than that I don't spot any issues on a quick glance
I dunno. Nothing's working at all
if i do rewrite a localization, how do i make it appear in my game?
does Wilson's language edit not work?
wdym "not a steamodded mod"
Just do what dimserene did with #1290380419606380646 to make it one
It is dw
But yeah it's trivial to make it an smodded mod
so do i just put the header in and its fine?
Yep
alrighty
And put the loc file in the right folder
And I presume the lovely thing will work to add a new entry instead of having to overwrite en-us
which means?... im still sorta new to balatro modding
or modding in general
The way dm frys it in that zip
Okay so I did this and now:
- scores 100% correctly
- it messages with the multiplier but with the blue chips color (prolly just missing some more functions to get it normal) [maybe also a rounding error?] No chips message though
- Actually updates when a face card is played
you cannot have the same message key twice
for some reason this happens when i change to my language, even though i didnt touch blue joker
So how would I get it to show two messages
I'm not sure you can haha. Maybe someone here knows for sure though
i mean maybe try copy pasting the whole block with one message each and itll try doing 1 message after another in the order of the code
for you
you can't... return twice though?
not the return
only from the if
so it calls the if part twice
without dependence on the other if, like no if (smthn) then (smthn) else (smthn)
oh wait, you can probably just do what Walkie Talkie does? @lime trench, see https://github.com/Steamopollys/Steamodded/blob/main/example_mods/Mods/ExampleJokersMod/ModdedVanilla.lua#L318
so it would go like,
if context.cardarea ++ G.play and context.other_card:is_face() then
card.ability.extra.chips = card.abilty.extra.chips + card.ability.extra.chip_gain
if context.cardarea ++ G.play and context.other_card:is_face() then
card.ability.extra.mult = card.abilty.extra.mult + card.ability.extra.mult_gain
retrun
definatley a better idea
but would my option theoretically work?
I'm not sure, I've never really taken a good look at SMODS.Jokers
it's all very abstract 🤷
Is there any way to make the custom smods rank not appear in the deck preview until it exists?
Sorta like Bunco's Exotic Suits but for ranks
anyone know why this would be error
I think that only works for playing cards and not jokers sadly
That's not the color erroring, that's the rarity text.
how would i make it not say error then?
Just to check is that meant to be the rarity or the consumable type?
type also its not a consumable
You likely need to add the text into G.localization.misc.dictionary with the key "k_craft"
Oh ok
Is other_card.card_type == 'Enhanced' valid or not?
I was trying out context.other_card.ability.name ~= "Default Base" but it wouldn't trigger on enhanced cards for some reason
apparently not. damn
thanks that fixed it
I've been trying to get it to detect enhanced face cards but It's just unable to detect any enhanced cards for some reason. I don't know what to do.
is there a way to retrigger a played card without returning
how can i summon a specific joker
Like make a joker/consumable that summons a specific joker?
yes
like fro example i have a craft card when you craft the joker i want to summon it into thwe joker slots
I know bird jokers has a joker that turns into another specific one under specific circumstances. The code there might be useful
whts the mod called again
I'm sure there are other better examples too but I can't think of them atm
bird jokers?
Yes
Summon a specific joker using add_joker
can you give an example?
like add_joker = "key"????
add_joker wouldn't be a good idea anyways cause it skips a bunch of checks the game typically does when creating and adding jokers.
but :}
What check would be relevant? (besides joker slots being full)
and for that i could only allow you to craft if you have a joker slot
Does it like not do the calc for editions/stickers?
I am aware that it does not consider joker slots, but I'm curious about the other checks
Oh yeah snoresvilles bug code might be good to look at
i can look at that
Is that what you use for bug? If so it can do editions at least
Editioned bugs can actually be vaguely useful
And they have higher sell value :p
im still confused how it works
I do wonder why we don't just use SMODS.create_card for this?
but does add joker have a chnace of adding an editon
For the purpose of adding a specific joker it's just SMODS.create_card{ key = <joker key>}
oh that soubnd 100000000 time easyer
Does that also have a chance of making a joker with an edition?
It's basically just a less long create_joker call. It still uses that function.
I poll for edition and add the edition to the joker
Ah you add it manually. I see
wait HUH
oh ok
this is my first mod and im wanting to add a freaking crafting system 😐
YOOOOOOOOO
ok i got to go but tomorrows goals are too
- make them craftable more than 1 time
- make the costing system accualy work
wait huh
and I was out there defining card directly
G.jokers:emplace(card)
card:add_to_deck()
also how do i use add to deck to summon a certin card
put the smods.create_card as a definition to a local variable, then paste the code I made replacing card with the local var
add_to_deck is there to trigger card effects
oh ok
G.jokers:emplace(bucket)
bucket:add_to_deck()```
last line bad
bucket not card
also apparently the smods create card has an option to do that automatically, will tell more once I read it
nvm it doesn't
Oh
It probably shoud
Well card:add_to_deck worked for me
heyo
it triggers the add to deck effect of the wrong card
you need to trigger buckets effect not cards
it checks for area to use for vanilla create card but it doesn't do anything for emplacement, just returns the new card
Ok fixed new commit out for Minecraft
Hey is there like a document for all the different objects and what not in Balatro?
I have asked this before but I'm not talking about like SMOD stuff I'm talking about documentation about like base game stuff like other_card and what not
other_card is a part of a context
Thanks!
Also I wanted to ask a couple of questions.
-
How would I get this to notify like normal (i.e when it triggers it does the update chips and then update mult and when regular card scoring is finished it does the add chips and add mult message)
-
For the life of me I'm having issues with trying to get this to only effect Enchanted Face cards. I can get face cards selected, but I can't get enchanted ones.
I think after that I'll work on trying to get this able to enumerate
you can't return two messages, if you want to messages you'd have to put one into card_eval_status_text with first argument being context.blueprint_card or card
I tried it out, it's not ideal. I feel like there is a joker out there that adds both mult and chips though...
yeah and it does that through card_eval_status_text
scholar does it by sending just the chips and mult w/o message, but it's a different context so it could be handled differently
chips = self.ability.extra.chips,
mult = self.ability.extra.mult,
card = self
}```
this is scholar
in smods card would be card = card
wait yeah it would be different bcos it's other_card
Right now the message appears but it just appears in the top left and is yellow. I did copy it from Luchador though.
To be fair, this is my first time modding this game
card_eval_status_text(context.blueprint_card or card, 'jokers', nil, percent, nil, {chip_mod=, message =})
bleh
@lime trench remove the first message from calculate return and put it here + copy the chips mod there, put this line before return
like this(?)
I am so confused on what you said tbh.
return needs chips_mod to modify chips
card_eval_status_text is just the visual message
context.blueprint_card or card is so it works properly with blueprint
(if u don't do that then chips would display on your joker when it's blueprint doing the effect)
It just... keeps throwing an error that there's something wrong with the syntax and I don't know what it is
I can't for the life of me figure out what could be "unexpected"
ah didnt' notice that
and now this
Okay this is weird bc only the balatro debugger catches it and notepad++ is weird about it.
because the last } highlights line 40 but the bracket for SMODS.Joker also ends at that last bracket.
so
please properly indent your code
anyways you don't have an end for the calculate function
Okay now for question 2 before I even figure out how to destroy those cards and enumerate it.
Just wondering if you explored the balatro game code yet, some of the code checks for enhancements like gold cards for the achievement
how can i make a deck that affects chips/mult after each hand played?
Ive like... really tried to look around. I haven't seen any code for achievement checking but I've tried like ~= "Default Base" and other_card.card_type == 'Enhanced' and they haven't worked
when checking vanilla code it's important to take the original context into account
OH WAIT HTE CODE FOR VAMPIRE I HAVENT CHECKED THAT
for example other_card doesn't exist in context.before, so your code can never work by definition
other_card is for context.individual
and context.repetition
If ur talking about context.before I already removed that hours ago, I was just using it for some dumb testing stuff.
Yeah this can work a bit, though i'm still unsure if this is written around pre-defined variables or not.
yeah i don't think this is it
why is your message outside of the return table
well, not really, I am trying to get it for every played enhanced face card
it returns within the loop, ending it early
I tried fixing that but it still doesn't update at all
im losing my mind
y
talisman?
there's context before and there's context after, but is there a context for when a joker gives score like when a joker gives chips?
i;m looking for somthing like a during context
joker_main
mod badges?
Like the jing above that but below rarity
can you show it?
Ok so I'm want to make community jokers and I want the rarity to be a specific rarity but still have the mod name but then have another that says Community
can i get help? why game crash?
Did you try to modify a vanilla joker's description?
something related to blue joker
my hero 
eremel posted a thread about joker contexts way back
also looking through state_events.lua is a good way to see how a lot of the contexts work
oh that's where i find them, thank you so much!
not this specific one
i didnt touch the blue joker
well something did
does rocket add the extra money after defeating the boss blind? or does it do it at the start of the round?
after iirc
awesome, thanks
When you talk about extra money, do you mean the money you earn or the value added on top of the income
Yea it does it when you finish the Boss Blind, before payout
value added
I really need to go through and rewrite my context stuff to be actually usable by other people, it as quickly thrown together for my own reference as is
does anyone have a full migration list from 0.9.8 to 1.0.0?
SMODS.registerUIElement seems outdated on the mod im migrating
and i cant seem to find the modern counterpart
Does Steamodded allow for you to take ownership of a tarot card?
Yes
does anyone know what's causing this error?
this is my set_ability function
don't know what i'm doing wrong tbh
sorry better ss
intresting
what does your config look like?
I feel ike it might be a good idea for cryptid to maybe merge it's value changing schenangians to steamodded
theres a lot of mods that make good use of them
well cause it's just a part of cryptid
but theres a bunch of mods doing simialr stuff
oh god i think my mod might have too much Xvalues
i have like
10 features that revolve around it
uhhhhhhh what config 😭
on the joker object
ohoh yeah
key = "final_girl",
loc_txt = {
name = "Final Girl",
text = {
"If {C:attention}final hand{} of",
"the round is a {C:attention}#2#{},",
"{X:mult,C:white}X#1#{} mult"
}
},
rarity = 1,
pos = { x = 0, y = 0 },
cost = 4,
blueprint_compat = true,
discovered = true,
calculate = function (self, card, context)
if context.cardarea == G.jokers and context.joker_main and next(context.poker_hands[card.ability.extra.poker_hand]) and G.GAME.current_rounds.hands_left == 0 then
return {
message = localize { type = "variable", key = "a_xmult", vars = { card.ability.extra.x_mult } },
Xmult_mod = card.ability.extra.x_mult,
colour = G.C.RED
}
end
end,
loc_vars = function (self, info_queue, card)
return { vars = { card.ability.extra.x_mult, card.ability.extra.poker_hand } }
end,
set_ability = function (self, card, initial, delay_sprites)
card.ability.extra.x_mult = 2
card.ability.extra.poker_hand = "High Card"
end
}```
so you'll need to add config = {extra = {x_mult = X, poker_hand = Y}},
you can't modify an extra table that doesn't exist
in fact, you don't even need set ability here, just add the config properluy
ohhhhh i see
oh god
tysm!!
honestly, having a values modification package seems neat
yeah or just steamodded has it
isn't it basically just
for key, value in pairs(card.ability.extra) do
card.ability.extra[key] = value * whatever_your_modifier_is
end
I don't know if steamodded needs a wrapper function for that or not
maybe not
I suppose there should be some type checking in there
^
maybe it could handle it
i just do if not card.ability.extra then return end
also theres a few cases
like cryptid is supposed to be able to tell me if mine changes for uses where I don't use my ability
like I have a joker that uses a common round_resets value for it's stuff
why not specify card.ability.set == 'Joker'
why not :3
Very noncommitedly playing around with notmario's website template with DeFused
and this had no business working
and yet
lol I zoomed out to get jokers in that weren't in the original fusion mod (and thus website) and still only got those
but yeah, it seems to have worked very well
Whats the effects of uncanny face, commercial driver and camping trip?
Damn, camping trip should be in the official game imho
yeah I can't take any credit for any jokers in defused
they're all from various fusion mods
just.. added as normal jokers
But still, i "hope" some get implemented in balatro because golden egg and camping trip seem like good jokers to add, know what i mean?
yeah I do
also that's no where near all of them, my screenshot on my OS is just acting weird
whenever I use shift + prtscrn to capture a protion of my screen it overwrites the last capture
JustLinuxThings
Yeah, i never really had or used a linux pc in my life
it's usually great
but then shit like this happens sometimes, lol
here they all are. Pushing the prtscrn button again afterwards makes it work
the only errors chatgpt made that I see are on Heart Paladin and Party Animal
I'm surprised it worked to tell it how the loc variables worked at all
figured out how to disable editions for all challenges, now i need to disable them for specifically one challenge
Not entirely sure how challenges work but you shoud be able to look at it's config for like banned cards and then act accordingly
i hooked set_edition to just do nothing when G.GAME.challenge is true
else it functions normally
balls
seems relevant
could reference restrictions.banned_other or smth
this might make sense to pr to steamodded
Is that a debugger mod?
Yeah dev branch of DebugPlus
Oh awesome! Thanks for making that, that actually would help a bunch
yeah I use the eval all the time
just add something like "no_fluorescent" to the challenge modifiers and check for G.GAME.modifiers.no_fluo or something like that
looking at doing a "no_editions" thing (as most editions wouldn't do anything anyway)
I would see about just banning specific editions
so its reusable
although no editions could be handy
i was gonna split it into no editions for jokers and no editions for cards
but my mod doesn't exactly need either of those, it just needs no editions whatsoever for this
Oh there's that? I was looking for something like that for a joker I'm making
it isn't a base thing, i'm trying to get to one though
Ah
is canio still misspelled in the source 😭
Is there any way to try and replace a localization with a table? Trying to make something similar to the Wheel of Purchase mod to replace 'k_nope_ex' with a random line of text each time from a table
Why no editions on jokers? Doesn't really fit the having to play around debuffed cards theme
actually fair point
No. The game does have some random lines (see jimbo win/lose messages) and iirc it just puts a random prefix to the localization key
is there a way to set a blind's chip requirement when you are not in that blind
Yeah
Cryptid does it for the timer one
I think there's a keg you can reference somewhere
I honestly do not know much about the codebase to know if the code for vampire in card.lua works in this situation. I though it would work but it doesn't even seem to trigger the second if statement.
Oh that is interesting
Jimbo:add_speech_bubble('lq_'..math.random(1,10), nil, {quip = true})
The way it does it in here is draws the speech bubble but does a math.random val to make it work
🤔
how would i check for if a card is a joker?
context.card.ability.set == 'Joker'
oh thanks
How are you checking the block runs or not?
Because there’s nothing in it that will indicate it being successful
So I guess it's just literally in the second if statement?
because taking out the for still doesn't make it work
What’s it supposed to do?
Gain chips and Mult based on enchanted face cards and then destroy them. I don't have the code to destroy them up yet though.
i think i finally managed to get rid of editions in this challenge rule
(and specifically left them on Jokers)
And what isn’t working?
When enhanced facecards are played, the if statement doesn't fire at all. So I don't get any chips or mult upgrades.
I know it probably has to do with the methods I'm using to check for enhancements
Because it works without the enhancement check
huh
So it's sort of like a scaling card like Runner and Green Joker, but also has Vampire's ability to effect enchanced cards except it destroys them instead of removing the enhancement.
So when a played enhanced face card scores, the joker gains +10 chips and +1.5 mult (tenative) for every enhanced face card that scored. It will then destroy those cards and then add the chips and mult to the final score (like runner, green joker, tarot joker, etc).
sorry, I kept thinking they were called enchanted bc enchanted and enhanced look incredibly similar and are kinda synonyms.
and yes I did make sure that it was "enhanced" in the code
i can't believe i spent so long trying to program a different mod element out of my mod's challenge
or do the funnier thing
for i, v in pairs(G.P_CENTERS) do
if v == card.config.center then
if string.sub(i, 1, 2) == "j_" then
print("is joker")
end
end
end
I love an O(n) approach for something that can be done in O(1)
efficiency is for losers after all
wait until you see how DebugPlus changes ranks
I paid for the whole computer so I'm gonna use the whole computer
surely you just copypaste strength code
No I support modded ranks and going both directions
there are modded ranks?
SMOD has support for it yes
uhhh theres an api for them
if key == 'up' then
if _card.playing_card then
for i, v in ipairs(getRanks()) do
if _card.base.value == v then
local _next = i + 1
if _next > #ranks then
local new_card
for i, c in pairs(G.P_CARDS) do
if c.value == ranks[1] and c.suit == _card.base.suit then
new_card = c
break
end
end
if not new_card then
log("Error: Could not find card with rank", ranks[1], "and suit", _card.base.suit)
return
end
_card:set_base(new_card)
G.GAME.blind:debuff_card(_card)
else
local new_card
for i, c in pairs(G.P_CARDS) do
if c.value == ranks[_next] and c.suit == _card.base.suit then
new_card = c
break
end
end
if not new_card then
log("Error: Could not find card with rank", ranks[_next], "and suit", _card.base.suit)
return
end
_card:set_base(new_card)
G.GAME.blind:debuff_card(_card)
end
break
end
end
end
end
nested loops go brrrrr
code too long it breaks in the middle of a line on my phone discord
unfortunate for me
the funny part is suits is so much cleaner code
can't you extrapolate the ranks[1 or _next] into a variable?
avoiding the basically duplicated code?
I might make a function because its used all over the place in DebugPlus
I mean I looked at SMODS implementation of Strength and I feel like a lot of that should also be accessible to mods
"lot of that" basically meaning the "get the next rank function"
Oh yeah did I mention all this code needs to work with both vanilla and SMODS
iirc SMODS added a change rank function I could use but it wouldn't work with vanilla then
I don't remember
Cause I couldn't use it
Base sounds like enhancment not rank though
ok
I still need vanilla compat
oh wait it is vanilla
I am using it
I am stupid
So probably a stupid question, but how is a smods.[anything] function vanilla?
Card:set_base is vanilla
SMODS.change_base isn't (but is basically just a fancy Card:set_base)
Okay I think I might know why? I think it’s because I’ve maybe been putting this in reverse? So it only just does the score? I haven’t checked without the context.joker.main I think….
Can’t check now since I’m working
ah okay (to both of you)
Makes sense
Ignoring the fact you said slightly contradictory things, I get the gist
we did? 🤔
anyone know how to make custom rules appear in the challenge's "custom rules" section? i'm assuming it's localisation
i dids it (referencing cryptid and sdm's stuff)
What's this?
A custom challenge Mod I made a while back. people have been asking how to do stuff with custom challenges so i thought i'd just send it here
Ah, cool
Guys, noob question: what does the #1# mean in something like "At the end of round, gains {C:mult}+#1#{}" ? Is it referencing the config variables?
its a placeholder
references the first item in the array returned by loc_vars
usually this is tied to a config variable but can be anything
Got it
is there a way to make a jokers desc text size be one of its values
im making a very silly scaling joker and i want some of its text to get larger when its mult values get larger
is anyone willing to help me out here? i've been trying to get help as to why the game has been crashing when i get my hands on a joker from jen's almanac
try removing betmma vouchers
bwuh
so i add raw_key = true?
i thought you were replying to the guy who asked abt the default joker atlas
Wait shot i was
I'm an idiot
Sp sorry
So
I got confused because they seem to have deleted their question
this looks like a rarity error that i had a bit back (spawning a joker w/o a rarity breaks bcos particles refer to rarity color)
So did more testing to find out it really really was just the method I was using to validate enhanced cards was not working and found another cool bug where the card will just score 2x the amount it should and i have no ideal why. 🫠
Hey gang
Got another tattered deck
TATTERED BLACK:
8 joker slots. Only the leftmost 4 can trigger during a hand
soo, the rightmost are slots for econ jokers?
also would passive jokers like shortcut count as not triggering
devious indeed
Do y'all like this better?
Kind of like the previous one better to be honest...
by changing card.T.scale its size is changed smoothly when dragging, but when hovering or clicking on it its size flickers🤔 how to fix
likely because cards scale slightly when hovered for a pop out effect.
dose anyone know why juice_until_eval isn't working?
that is so cool!!!
isn't it it ends if true?\
try acrobat_ready ~= true
I don’t know all of them exactly, but:
mult, chips, money, attention (used when referring to Jokers or specific hands for example), inactive (small gray text), red, green, blue
those are the ones i know
did not know about green and blue thats fun
you can check it by looking at the function that sets them, I'll look it up rn
oh there’s chance too
loc_colour at functions/misc_functions.lua
ah ty
im bad at art so this is my definition of cooking
forgort to make the text look very good but whatever
@languid mirage #🎨・fan-art message just gonna reply to you here since I realized I was kinda clogging up the fan-art channel with steamodded stuff
Agreed that some rounding would be a good idea, I don't think 16 digits of precision is needed when going into negative exponentiation haha
yeah, I wanted to have smol numbers being show in full to avoid confusion with like misprinted scaling jokers (cryptid)
like the ramen was showing it goes down by 0.00 every card discarded because of silly rounding
didnt think rounding was needed since I forgot about stacking chicots
as long as there's e-notation, rounding should be fine right?
TIL you can just
make jokers consumable
now i just need to figure out how to lovely patch looking for a smods patch line
is that even possible?
a really awkward thing because the patch i need to make for what im doing to work is putting a line inside of the smods payload
nvm i might not need it after all for now
yeah
has there been any documentation on the event manager
Which mod allows to quick reload game and mods for dev purposes?
iirc smods does something like that when you enable or disable a mod on the main menu
hold m
is that steamodded or debugplus
debugplus allows you to refresh the atlas after pressing m
steamodded
No such thing exists for code within the game currently, due to the way lovely works - best option is restarting the whole game (which SMODS does automatically on enabling/disabling a mod)
I see
personally I just wrote a little script that closes the current running balatro.exe and starts a new instance
While working on UI more quicker restart method would be really cool
this should be a debugplus thing i find relaunching the game annoying
@rough furnace you should do that (assuming it's not already a thing?)
but m reloads everything?
power of m
are you sure? 🤔
like holding m restarts the game
It was considered, sadly lovely injects stay unchanged on game reload
Isnt m just an atlas reload?
am I wrong?
holding m restarts the game
pressing reloads atlas
oh
oh neat, holding m restarts the game
it doesn't reload it, the game actually closes and restarts
Ⓜ️
i wasn't insane, good
and it's actually a steamodded thing 😅
is it possible to hook a challenge?
How do you set up and play custom sounds?
Use lua SMODS.Sound({ key = ‘key’, path = ‘path.ogg’ }) and play_sound()
what do you mean?
if you mean changing what a challenge does, im sure its possible if you search in challenges.lua
I don't like how cursed the current method or relaunchkng the game is, so I would want to wait for @gaunt thistle to eventually make lovely compatible with loves built in restart, and to be honest I just use the command line so for me I just Ctrl + c, up arrow, enter so it's super quick for me restsrting the game
where does the path start
i want to make a mod that adds keyboard shortcuts for buy/buy+use/sell. are there any examples or API docs that show how to access those buttons?
i feel dumb but where would i find said challenges.lua
nvm
So uhh... guess who found out that Balatro's built in Debug tools actually had a bug in them the whole time?
Turns out every attempt I was trying to do WAS completely valid. It just never updated most of the tags. So if I were to turn a card into an enhanced card via debug, it wouldn't update it's .ability.set to "Enhanced"
I found this out by testing a custom Enhanced only deck
Prolly should go and test it with a normal enhanced face card from a booster but still
enahnced cards aren't in built in debug tools
that would be a DebugPlus bug possibly
... is it a bad time to realize now that I've been mixing up editions and enhancements.
I think its a really bad time ashydj
nah I had to think for like 10 seconds to remeber if enhancements were enhancments or editions
editions and enhancements are difficult to distinguish sometimes
Thoughts on this?
what is it? like a back?
Yeah tattered green deck
nice
I think it's good but tbf I'm not an artist
I think the burn marks and the aging shading look awesome.
Yea
Aseprite spray tool 🥰
Also, I wanted to ask does just putting context.destroying_card in an if statement destroy played cards? Because I'm trying to look at jokers that destroy cards in play and i can't really find anything else in them that would destroy the card.
it's probably something in the return
classic example of just check someone else's mods code
I checked Queen's Gambit in Cryptid and I didn't find anything else that would destroy the queen in the rest of the code...
plus jokers in the source code that do this just seem to have context.destroying_card in the if and nothing else
could be wrong, I am rushing my investigation
bc i got ot go to work
i imagine it goes through every joker, calculates it with context.destroying_card for every played card, and if it returns true it'll destroy the card
so like
if context.destroying_card then
if context.destroying_card.ability.edition.polychrome then
return true
end
end
would destroy any played polychromes
that's pseudocode but you should get the point
Ah
if you go to state_events.lua:957, you can actually see when this return is used
Thanks!
(cg already explained really well how to do it)
when yall make joker art do yall use asperite or a different app?
Most people use aseprite yes
i use an old branch of aseprite (i'll probably buy it sometime)
idk if smg would wanna use it
Super Mario galaxy?
i… am steve
YES
its peak i know 🖐️
🤚
So this deck has a gimmick with infinite debt but making money isn't possible, so the required score goes up with amount debt
Sp far it's 1.25x (multiplicative) per $10 in debt
Is this balanced?
have you tried playing with it yet? or is this just concepting and you're not planning to turn it into an actual mod?
This is concepting
though it sounds kind of difficult tbh
Every purchase permanently leaves you deeper into a scoring hole?
After $100 of purchases you end up with a blind requirement of 9.31* baseline
I would guess that's about the amount of cash that I go through in a single money-stingy run
Okay how about
+0.02x blind size per $ in debt
So $100 in purchases is 3x base
BUT money is also never a bottleneck
am i right in reading that set_edition(false) creates a card with no edition
or just doesnt set one
i've been trying to hook card:set_edition so it doesn't accept specific editions when custom rules are active
wait
immediately after posting this here after fiddling with it for hours i notice something obviously wrong with my code
Absolute novice here, how do I cause a joker to set chips or mult to a flat value, as opposed to adding or multiplying?
i'd guess that instead of having chips = chips + x (where x is your number), have chips = x
mood
one of my main issues i've had for hours is that no cards have editions (despite them very clearly being foil or holo)
if i don't have "if edition then" or "if not edition then return end" i get an error every time
i might be the worst programmer on the planet i can't figure out how to hook set_edition
what do the args for play_sound mean, other than the key/sound obviously?
Alright, I managed to figure out flat setting and it does manifest in the added chips at the end of the hand, but once I apply it it doesn't actually appear in the hand screen (however, when it gets updated with standard chip-and-mult affecting jokers, it does appear)
SMODS.Joker {
key = 'kaz_warningsign',
loc_txt = {
name = 'Warning Sign',
text = {
-- "{X:mult,C:white}Factorial {}Mult"
"Sets chips and mult to flat values"
}
},
atlas = 'concordancejokers',
pos = { x = 0, y = 0 },
cost = 14,
calculate = function(self, card, context)
if context.joker_main then
hand_chips = 123
mult = 456
update_hand_text({delay = 0}, {chip = hand_chips}, {mult = mult})
return {
message = 'Set!',
}
end
end
}
shouldn't it be more like this?
local run = true
if edition.foil and G.GAME.modifiers.no_foil_jokers and self.ability.type == "Joker" then
run = false
end
if run then
return set_edition_ref(...)
end
let me have a go at that
iirc update_hand_text is visual only
Makes sense, I just mean that I've gotten the underlying chips to be altered (each hand ends up scoring 56088 chips when all is said and done) but the chips and mult sidebar does not update to match, instead listing 0 x 0
I'll get a recording with OBS real quick
this has the exact same problem, edition is apparently nil
oh, seems like Balatro can call Card:set_edition() with no arguments to remove editions?
or if edition and edition.foil and ...
that's probably better
i've had a problem like this a lot today, every card apparently has no edition
Here's what I mean
im cycling through buffoon packs and getting absolutely no edition cards now
can you post your full code Opal?
i'll post only the relevant stuff (as i plan on using this as boilerplate for other editions)
sure
you should really slow down that animation lmao I can barely tell what's going on
Alright, I'll take a second recording on slower speed real quick
this is the setup for the no_foil stuff
as codeblock pls
oh sure
Here's the slower recordings (second one to show how standard jokers do end up updating the sidebar)
the entire thing (minus the Steamodded comments)
function Back:apply_to_run()
Backapply_to_run_Ref(self)
--BASE GAME EDITIONS
G.GAME.modifiers.no_foil_cards = false --no foil cards
G.GAME.modifiers.no_foil_jokers = false --no foil jokers
end
function SMODS.current_mod.process_loc_text()
-- Banning Foil Edition
G.localization.misc.v_text.ch_c_no_foils = {"{C:attention}Foil Edition{} cards will no longer appear"}
G.localization.misc.v_text.ch_c_no_foil_cards = {"{C:attention}Playing cards{} can no longer be {C:attention}Foil Edition"}
G.localization.misc.v_text.ch_c_no_foil_jokers = {"{C:attention}Jokers{} can no longer be {C:attention}Foil Edition"}
end
local start_run_ref = Game.start_run
function Game:start_run(args)
local result = start_run_ref(self, args)
if not saveTable then
if args.challenge then
local _ch = args.challenge
if _ch.rules then
if _ch.rules.custom then
for k, v in ipairs(_ch.rules.custom)do
-- EDITIONS - BASE GAME
if v.id == 'no_foils' then --removes foil edition from all cards
G.GAME.modifiers.no_foil_cards = true
G.GAME.modifiers.no_foil_jokers = true
elseif v.id == 'no_foil_cards' then --removes foil edition from playing cards
G.GAME.modifiers.no_foil_cards = true
elseif v.id == 'no_foil_jokers' then --removes foil edition from jokers
G.GAME.modifiers.no_foil_jokers = true
end
end
end
end
end
end
return result
end
local set_edition_ref = Card.set_edition
function Card:set_edition(edition,immediate,silent)
local run = true
if edition and edition.foil and G.GAME.modifiers.no_foil_jokers and self.ability.type == "Joker" then
run = false
end
if run then
return set_edition_ref(self, edition, immediate, silent)
end
end
SMODS.Challenge{
loc_txt = "Test",
key = 'test',
rules = {
custom = {{id = 'no_foil_jokers'},
},
modifiers = {},
},
jokers = {
},
restrictions = {
banned_cards = {},
banned_tags = {},
banned_other = {}
},
}
this is literally the entire mod (without the other editions)
I'm going to check if I can cheese it by just adding +0 mult
EDIT: Alright that did work but it feels massively inelegant
That might work. You could also try using mod_chips and mod_mult, see state_events.lua:706?
cannot replicate, editions work fine for me - how extensively did you test?
oh wait
that should've prevented the foil 🤔
in my instance of the game, every card fed through card:set_edition() seems to have no edition
i had other mods loaded (notably Bunco), let me see if that messes with it
i've had DebugPlus loaded to give myself Buffoon tags, looking in its code doesn't show and interference
i see the problem now
try this one instead
local set_edition_ref = Card.set_edition
function Card:set_edition(edition, immediate, silent)
local run = true
if edition == "e_foil" and G.GAME.modifiers.no_foil_jokers and self.ability.set == "Joker" then
run = false
end
if run then
return set_edition_ref(self, edition, immediate, silent)
end
end
trying now
loading the challenge from where i left shows the popcorn joker as not foil, which is promising
turns out steamodded overrides the default behaviour of Card:set_edition a lot, see https://github.com/Steamopollys/Steamodded/blob/main/core/overrides.lua#L1385
also, looks like edition == "e_foil" might not be enough, you should also check the table version
ah, i didn't think to check for steamodded overrides
by table version do you mean edition == {foil = true}?
looks like it yeah
let me try that then
I'm just going with what the documentation says though
I'm now moving on to implementing the factorial functionality for Warning Sign, and even with to_big added I get a "for limit must be a number" error when trying to take the factorial of mult
local function fact (n)
if n == 0 then n = 1
else
for i = 2, n-1 do
n = i*n
end
end
return n
end
SMODS.Joker {
key = 'kaz_warningsign',
loc_txt = {
name = 'Warning Sign',
text = {
"{X:mult,C:white} Factorial {} Mult"
}
},
atlas = 'concordancejokers',
pos = { x = 0, y = 0 },
cost = 14,
rarity = 'cry_epic',
calculate = function(self, card, context)
if context.joker_main then
mult = fact(to_big(mult))
return {
mult_mod = 0,
message = 'Factorial!'
}
end
end
}
other way around - to_big doesn't return a number, it returns a table
(assuming that's the Talisman to_big)
i've got this checking for if (edition == "e_foil" or edition.foil)..., not sure if that works tho
Ah
Even without it it still says I'm inputting a table so I'm not sure what the right function to use here would be
seems good yeah
maybe talisman's numbers support to_number? it'll almost certainly break when going over Lua's integer limit though
oh wait, don't forget to check if edition exists
was just about to reply that, lol