#💻・modding-dev
1 messages · Page 352 of 1
well that depends on the seasonings methinks
thank you for thinking how you would season me if I were cooked
what you got so far
which I am
This code ends up giving x5 mult on all played cards if there is any wild card in the hand at all, what am I doing wrong?
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
for k, v in ipairs(context.scoring_hand) do
if v.config.center == G.P_CENTERS.m_wild then
return{
x_mult = card.ability.extra.Xmult,
colour = G.C.MULT
}
end
end
end
end
i got you bestie
but how are you cooked
Hand should be the string of the hand.
how would i get that exactly?
Hmmm I'd rather not talk right now, not the least because I should go to sleep
well, get some rest, and we can always talk later my friend
rest well
Put all the strings in a table then get a random value from there.
the keys or the names
it's not the undiscovered reverse zodiac or joker evolution?
Get the strings by iterating through G.GAME.hands with pairs and getting the key.
the undiscovered reverse zodiac seems like someone fucked up the undiscovered sprite for their consumable
Thank you dilly :)
undiscovered reverse zodiac
nah it's localizations...i'm pretty sure now that my smods is just too new and the API somehow made undiscovered_ localizations required when they weren't before, i guess?
i'll research smods history

oh that's what it was?
bump
oh hello
whats the intended behavior
just X5 Mult if wild card held in hand?
X5 mult on any played wild card, like trib, but wilds.
ah I see, and your brain is rotted so you wanted it to be mercury or pluto :P
(I like calling the hands by their planet names)
no its just what i pulled first
ah ic ic
i got a lvl 4 flush my next run
oh i'm just fucking stupid i think
i thought you were excited by the specific result, but nah just /a/ result
i dont exactly know if the locked hands have a chance to be leveled up but if it is that would be hilarious
context.individual calculation is triggered for each card played (context.other_card) this is all you need to check
They do if you’re not checking for visibility.
no argument and same, but elaborate :P
oh my god peak
This is a really fun concept
you're checking the entire hand in the code that should check a single card
oh this could blow
what if spectrum was rolled?
unless there's an in_pool too
its one of the scrapped decks from the demo
Oh huh
Okay, got it.
i just tweaked it a bit
but nah that doessn't make sense because you need to play a spectrum tio unlock it
so yeah there's an issue
this was the og
is it possible to return two separate tables from a joker calculate function, or force the game to get two separate tables from it somehow?
i'm stupid and didn't realize it could actually be this (completely unrelated in theory because the topic was fonts and such)
well now i know lovely patches can fuck literally anything
trying to make a joker that behaves as both a left and right blueprint
I wonder why it got scrapped 
no i couldnt get it to get stats so i just made it random
You could use SMODS.calculate_effect or you could return an extra table.
I meant the original
the unlock condition is "Play a hand type 75 times in one run"
ah yeah i see the issue
Good luck 😭
i tried calculate_effect but it led to issues with a bunch of jokers
it somehow made sixth sense straight up do nothing
should be possible?
like doesn't even sound that complex if you can do a normal blueprint
Then you could do return {first joker effects, extra = {second joker effects}}
ah
i do need to be careful of jokers that already return extra tables though
No, extra goes infinitely.
oh
so i just make sure the one with the extra table goes inside one without pretty much
my worry is nuking an extra table by accident
You would check how many extras there are in a loop then use it when there is no extra table.
though that'd only affect hiker and 8 ball in vanilla
why isn't blueprint in smods modded vanillia?
it would probably be very very helpful
hell yeah
like recursively?
Yes.
ah fun
i have code for that extra table thing
SMODS has an utility function to merge tables, although you might want to nest returns into extras
lol. I may occasioanlly play flush
best win strak: 3 lmfaooo
added another modifier, tell me if i should change anything
I used to have modded jokers here, but either the joker keys have changed or I don't play with those specific mods anymore, or smods removed that functionality
If you really want to remove all sources of money you'd also have to set all sell values to 0 although I don't think that's an already present modifier
i just wanna remove all normal methods
also what are all of the money tags
I only remember economy and investment
Yeah
There's another one but I don't remember it's name
Just check the collection
:)
You forgot speed.
That's the one I forgot
tag_speed is in the list
i dont think the id is the same as the name
Are you able to declare an object as a Center rather than as one of the specific center types?
what's its id
tag_skip
you can extend from SMODS.Center, why?
tyty
But it can't be used on its own?
I'm working on dummy items that primarily exist for ease of display in Challenges, but I'm encountering some issues with them still existing in pools and being counter for the stake ticker tally
So I'm trying to find the most effective way to have a displayable item that is otherwise ignored
Yeah I think you can extend from SMODS.Center
Not sure exactly how tho. I know Aiko's mod has a lot of dummy objects for UI stuff
I probably just have to follow the given implementation in the SMODS code then
iirc no_collection stops the counter too
far as I'm aware, no
I have all of these set to no_collection and they're still counted for joker stickers
posting waaay later, but unfortunately that didn't seem to work
(posting again just in case) i have a card modifier that makes played cards return to the deck. while the card modifier works perfectly, the effect of returning them to the deck results in strange ghost cards on the deck ingame. what's going wrong with this? i'm simply lovely patching G.FUNCS.draw_from_play_to_discard() and draw_card()
For example, the usable joker count is 270, 18 full pages. Meaning we should have 2160 stickers, but it's adding an extra 16 for these two dummy items set to no_collection = true because they're still part of G.P_CENTERS
This seems unintentional
On our part or on SMODS's part?
Another reason I'm having to wiggle around with it is because of mod compatibility, so someone encountered one of these because of the Equilibrium Deck
I wouldn’t worry about how cryptid fucks with pools if I were you
Which I believe is a similar pool issue
Although I would normally agree, I have been tasked by higher powers to ry
If they completely ignore the results of an in_pool function, that’s on them, not you
Do a Cryptid PR
But yes, if a mod doesn't respect weights or in_pool then it's their fault
Whilst I’m not hugely familiar with the cryptid code base, it does seem like a lot of it has been designed in a way to work with itself and not play amazingly nicely with other mods
i think it's "no_doe" to prevent something from appearing in deck of equilibrium
unless i misunderstood
I'm sure this is how everyone plays cryptid 🙂
When they see that Talisman breaks other mods they uninstall Talisman, surely 🙂
counterpoint is that the thesis of cryptid is getting silly game breaks such as this
personally i would find if very funny if i found this myself
Let her fix it then make a bug report about the "non CardSauce Jokers" not showing up in the shop
hehe
easy fix assert(not next(SMODS.find_mod("Cryptid")))
bump bump ghost cards when drawing cards from hand directly to deck
Yeah Im gonna do an smods PR
Oh wait
Hold on
I think they just fixed it -- nvm it was keku
It wasn’t a SMODS issue though, was it?
It was
Also I was telling someone to report the fix as a bug ;P
How does pseudorandom work? I see in the game's code for misprint it's doing this:
if self.ability.name == 'Misprint' then
local temp_Mult = pseudorandom('misprint', self.ability.extra.min, self.ability.extra.max)
return {
message = localize{type='variable',key='a_mult',vars={temp_Mult}},
mult_mod = temp_Mult
}
end
But why does this not always give the same result? I've tried to use pseudorandom in my own code and it seems to always give the same value
pseudorandom always gives the same value if you do the same actions on the same seed, that's the point
unless you're talking about something else
it shouldn't
Ive been trying to figure out the problem for a while, anyone have an idea on what it is?
I understand that, just not seeing where
It tells you that there's a missing } near line 10
can't tell you more without seeing the code
you're missing a comma after config
also the local Xmult = {...} won't do what you want
no this would be the same in any language
Got it
you're defining a table when you don't need one
just do local Xmult = value without the brackets
Grabbing the Lua extension would help to flag issues like this for you
That is very very useful for me
Considering I am just doing this for the first time with little coding experience at all
Thought that modding a game would be a good place to start
getting visual studio set up
how would i do exponent mult
Use talisman.
Visual Studio is massively overkill for Lua, VSCode would be just fine (if you're not too locked-in on VS). It's much more lightweight but has most of the conveniences
Okay yep made my PR
alr, ill keep that in mind
maybe I should try to make a BetterStats mod that actually displays all this shit in game
also, I was thinking about having it so that a multiplier goes up by .1 for each 25$ the player has, what would be the formula for that?
single_hand_round_streak is broken though
I've done many many rounds in one hand
Try looking at bootstraps or bull.
and these are supposed to be career stats, not current
Great idea, thank you
lemme check in the high scores section though, it may just be layed out weird
its now doing the same error code with line 12?
did you install the lua extension
I did
does it show you the errors in red?
nope, so that value is just kinda useless, even if it is the actual current streak
Trying to even load it with visual studio code at the moment
Got it
And no
SMODS.Joker{
name = "Midas Prime",
key = "Midas",
pos = {x = 0, y = 0},
rarity = 4,
atlas = "Lead",
config = { extra = {Xmult = 1.25, xchips = 1.25} },
cost = 6,
loc_vars = function {self, info_queue, center},
return { vars = { center.ability.extra.Xmult, center.ability.extra.xchips } }
end,
calculate = function (self, card, context)
if context.individual and context.cardarea == G.hand and not context.end_of_round and SMODS.has_enhancement(context.other_card,'m_gold') then
return {Xmult = card.ability.extra.Xmult, xchips = card.ability.extra.xchips}
end
end,
}
loc_vars is where it says the error is
it was working before?
i can assure you it wasn't
I meant like, the joker and game was loading. Or are you talking about that one specific place?
loc_vars definitely wasn't working, maybe because of the comma you were missing it thought it was part of the earlier config
That makes sense
how would i use features added by talisman in my own mod
bumpster, ghost cards when drawing from hand straight to the deck
it makes globals, so you kinda just use them
but there are emault implentations that don't use talisman
Thank you
I blame Lua's daft curly-brace function call syntactic sugar for making this less obvious to first-timers... my_function{ arg1, arg2 } is equivalent to my_function( { arg1, arg2 } ) for function calls, but not for function definitions
having a lovely folder at all in my mod crashes my game instantly
like as in crashes love
doesnt even open
this is an EMPTY folder
and it doesn't crash with no folder?
Send lovely log
no crash
but yeah that makes sense being empty might throw an error
well
because having a lovely folder is telling it to look for lovely patches there
that seems to be the issue
Then run ls -a
which folder
here (also i readded the patches i did have)
like it crashes
whatevers in the folder
just to be clear
wait about a single toml foile with no content?
file
Try rm .DS_Store
what even adds those? I thought that was like a windows thing
but isk why the unix style hidden name then
Finder
ah i thought i saw them on stuff that never touched macos
maybe not
for some reason the crash log aint showing
anymore
ig i restart computer
which i dont wanna do rn
so im nt
not
i mean plenty of types of crashes don't show logs
what about this
how can i replace the high contrast cards with my own?
like
mac only shows one crash log at a time
and the window with the previous crash log
isnt showing
Try to CD into your mods directory and run find . -name ".DS_Store" -delete
maybe this is because I'm a starter coder, but I'm not seeing what's wrong with the code like the game is saying
show a bigger screenshot
syntax stuff is silly and hard to debug
the documentation for the calculate function is confusing and misleading
what the documentation is actually telling you is what values the context table has
so when context.individual is true, and context.cardarea == G.play, then the context table has those values
alrighty, so what parts do I change
but if this was all ina a ruturn table wouldn't that be fine?
no fix sadly
Are you sure that lovelt folder is the one causing the issue?
Like if you disable that mod does it stop crashing?
removing my mod stops crashing
removing the lovely folder in my mod
also stops the crashing
from what I'm beginnng in this momentto understand, return tables are to edit the values in the table, right?
but like the patches are required for a lot of stuff
Wait question is your lovely folder open in finder rn?
Yes
well no
Can you make sure it'd not open in any then rerun the command sboce
not the context table, the return table is what effects the joker should have. Things like how many chips/mult to apply
Then try
what's the goal of the joker
did not work
?
for each Ace played, +10 mult
Can you rerun ls -a in the folder now?
and walk back what i said about return
ty that would be MUCH appreciated
Can you send me the log again since it was deleted
I'll need that
I dont need the first few lines
ok, so your if statement is correct which is good. Inside your if statement you want to check if other_card is an ace (which I don't remember off the top of my head but I think is something like other_card:get_id() == 14) and if it is, return { mult = 10 }
which log
lovely?
wait
i see a parse error now
fixed it
if you haven't already, I'd recommend checking out these examples to see how to write different types of calculate functions
https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
Rlly wish there was caino example lol
i would correct you, but then you might start calling j_caino wrong when you need to use it, lol
if context.cards_destroyed and not context.blueprint then
local faces = 0
for _, card in ipairs(context.glass_shattered) do
if card:is_face() then faces = faces + 1 end
end
if faces > 0 then
card.ability.extra.Xmult = card.ability.extra.Xmult + faces * card.ability.extra.Xmult_mod
return { message = localize(type = "variable", key = "a_xmult", vars = {card.ability.extra.Xmult}) }
end
elseif context.cardarea == G.jokers and context.joker_main then
return { xmult = card.ability.extra.Xmult }
end
TYSM (again)
you can view any vanilla joker impl in card.lua + search for their display name (e.g. "Mr. Bones"). then you just have to translate it a little into SMODS context (so no prob)
well it changed down
need an end for the if on line 40
thamnk, now to see if it works
GYAHAHAHA IT WORKS
i thought this joker would be easy to make, i have been proven very wrong (yall see any issues with calculate? i'm not sure what's being done wrong)
now to do this for multiple jonkers
how would i define a new currency?
thinking of actually combinging these tables and others like them
I kinda wanna write a sceipt that will take this file (unpacked profile.jkr) and two or more keys, and combine them, outputting the full file with the changed
taking the name and the order from the first table passed, which would be the one that's ip to date
were you able to unpack the .jkr files? I was trying to use cyberchef, but its deflate and love's deflate dont seem to work with eachother
there's already a utility online to pack and ipack these
You can also jsut have this done after leanching the game (which will have them unpacked for you).
yeah, but idk i feel more comfortable trying to script outside of balatro
i'm not much of a coder yet, lol
but because it is lua inside might be better
so i don't have to reimplement stuff in python or whatever
it only works for profile.jkr and meta.jke. I think save.jkr is a binary file
.
but the profile is what i need anyway
I think someone told me once it's an actual ramdump of the game
idk if true
easily could be badly misremembering
i just know i get garbage
yeah it's onlyu 18 k
nevermind
idk why it's weird
for some reason my ui isnt loading??
local ui = {n = G.UIT.ROOT, config = {r = 0, h = 8, w = 6, colour = G.C.MULT}, nodes = {
{n=G.UIT.C, config={align = "cm"}, nodes={
{n=G.UIT.T, config={text = "Testing", colour = G.C.UI.TEXT_LIGHT, scale = 0.5}}
}},
}}
G.HUD_upgradetree = UIBox({
definition = ui,
config = {parent = G.ROOM_ATTACH, type = "cm", hover = true}
})
print('added ui')
Are you returning and calling it anywhere?
i dont think so, but shouldn parenting it just make it show?
The code is separate from everything else if it's never called or in a function that runs.
yeah i added in in a addevent function
You want to make your UI appear when the player starts a new run correct?
So you want it on the deck?
no its ui that appears when you're using the deck
itll have an "upgrade tree" button at the top of the screen, which opens the ui for it
here we go again
shit youre right
Okay, so you want to add a button and overlay UI. Usually when working with UI you want to patch a call to the function you're using in the location you want it.
Kind of like i did here
yeah im just testing to see how i would actually spawn ui in the first place
False they are all the same type of file, and it was designed for save.jkr first with profile.jkr, meta.jkr and settings.jkr as afterthoughts
Does anybody know how to make the display work?
For a joker, because the value I am putting in keeps coming up as nil
Even though it's fully functioning
thank you
does anyone know where
's
code is? wanna setup a variable that tracks each time it hits 
ctrl+f Card.lua
HELLO UI
yeah i know that much (i had to take ownership of it before) but which part is the nope setup
why did i not send the code am i dumb
(ignore the findcard part obv that's the edit)
If you want to programmatticalt do it the source for https://balatro.shorty.systems/ is available here https://github.com/WilsontheWolf/balatro-save-loader. There's a "library" you can use for helping with stuff. Misc/test.js may be useful for reference
Buttons tend to be in their own functions and would call on your main function. G.FUNCS.insc_change_scribe = function(e) The place you are looking to make a patch is in the function G.UIDEF.view_deck in target = '=[SMODS _ "src/overrides.lua"]' to make UI appear in deck view. Though I'm sure there's other places you could patch to achieve a similar effect, that's just how I did it.
Vanilla balatro line 1966. searching localize('k_nope_ex') gets you to it
hell yeah thanks
was just poking around, but thanks for the refs 🙂
?
is it not card.lua?
Oh shit yea I forgot. I mucked up my line numbers by formatting the files
Just search what I said
oh ok ok
lovely dump > vanilla source
it's a hill I'll die on
or at least fight for
dying is a bit extreme
yeah but im slightly too lazy to do that
I use it when replicating vanilla code, when having cryptid and a few other common mods installed
in this specific situation it was better to use vanilla
can you explain why?
code lines won't be shifted by patches
oh you just mean for sharing where to look
yea
Ive got autoformat or smth, and at one point in the last 4 months I mustve ctrl+s'd card.lua
so all my stuff is mucked
Nah I always use source because otherwise some random person desjded to change one line halfway through and then I do something that I shouldn't do because it only works when their mod is present
yeah I guess that makes sense, I was operating under the assumption that only SMODS was in the mods folder but if you have other mods/patches then that would screw it up
Also it helped me fix an accidental dependency one time
if/when im making content in a mod, I like to use a simple cryptid modpack, so that I can quick reference vanilla and post-mod code
if context.end_of_round and not context.repetition and not context.game_over and not context.blueprint and context.main_eval then
level_up_hand(self, G.braidedhand, true, 3)
end
``` this doesnt seem to be running
I just realized that even if this is being stored as lua in game, it's definitely being unpacked to json
this is after tryign to trat it as a lua listin some onine lua running
GC, wilson posted this
lmfao
it could help you
wait, that's your site?
context.main_eval seems to be false, any reason why??
I never realized that, very cool
(posting again just in case) i have a card modifier that makes played cards return to the deck. while the card modifier works perfectly, the effect of returning them to the deck results in strange ghost cards on the deck ingame. what's going wrong with this? i'm simply lovely patching G.FUNCS.draw_from_play_to_discard() and draw_card()
You should just be able to emplace the playing card back into G.deck from G.discard
So I'm confused how the 'raw' view is still json that you create from the non json (presumably lua or lua flavored source?) It seems misleading
wdym? i'm specifically trying to fix the animation for cards being taken from the hand right into the deck
i use table.insert() at one point but it has basically the same function as :emplace()
Im saying like, after all calulations are done, whatever the context is for that idk, emplace the cards to the G.deck cardarea
Or loop over G.discard.cards and only those with the edition are replaced
i tried replacing it, and now this just runs several times, any help?
calculate = function(self, back, context)
if context.end_of_round and context.individual then
level_up_hand(self, G.braidedhand, true, 3)
end
end
i don't know if that would have any effect? all functionality for the card modifier is programmed and works, the only problem is the draw_card() animation i use creates those strange cards, they don't create any problems from a gameplay standpoint though
though I'm sure there's json modules for python, so if youe save thing can load and reconvert and pack it then I guess doing my merging outside of game wouldn't be any harder
Yeah the tool just works with json and its easier to just give json cause I can validate if it's correct or not. It's raw in the fact it'd not just a list of options I made for the user
Also can be pretty printerd
(The actual raw save would be entirely on one line I believe)
yeah that would need to be fixed ofc. But besides that, what is the data type of it?
just a big ol lua table?
fair
well I guess I'm either trying to do this in game which I don't like the idea of, or I'm using python to deal with the json. Though once again I need to make sure that your took can reverse the process
I mean if you want you can use my tool to just concert to and from the lus
You'd just have to write a tiny amount of code
Also my json conversion isn't perfect
I mean... that's only better insomuch as I don't really wanna relearn python when i should be learning lua
smods bundles a json lib with it
you could look at that
how can i get a card's enhancement in a way that will work as an input to set_ability? like i can see a couple different ways to get bonus card from this but which one would work as an input for that without me having to convert it to smth else first?
well if it isn't perfect json, i'd rather have the actual lua
just formatted a bit nicer
SMODS:get_enhancement or smth like it
dunno if its 'perfect' but its used for the mod metadata json files
I mean wilson's conversion in the first place
from his own mouth
.
?
wilson made the site? I wouldn't like wanna convert it to json for the shit of it myseelf
so i'd rather work directly with the lua than possibly nonstandard json
My json is standard it just doesn't support everything
plus i don't know python or anything else any better than lua at this point
Like infinity
fnuuy
But you could make a lua program to read the lua and then just write it to json using the json lib
i was just saying that the json lib existed, didnt know ur plans
all I want to do is take 2 (or possibly more) joker keys and combine the tables for them so they show up right on the stats screen
The stats screen in game?
yeah pretty sure it's where it reads this from, it's the only plac its stored
mods change keys and stuff sometimes
Why do you need to do anything out of the game then?
for the same joker
I don't really, i'm just less comfortable doing it hot
I think i could accomplish this with the debugplus console if i wanted
how did you do this :3
The game is probably easier to do stiff because all the data that's saved in the files is already loaded
My current project was gonna be out of game
until I just decided to make it ingame
better UX and easier development by miles
Also wanted to make it work without smods, but ........ not gonna happen 🙂
yeah it's just that.... it'd be a lot of relaunching and launching the game and replacing borked profile files from backups
just to edit a text file with a script
essentially
good luck.
debug plus watch lua path function:
is this direcated at me?
ye
as I said i know i could do that, but it'd suck for the above reasons
when it's a very simple task that should not involve all that nonsense in theory
the nonsense of starting and stopping a video game and debugging
you wouldnt have to start or stop ever
unless it crashes
you can just test the code instantly
I mean... borking my profile file and having to replace it with a backup would nessacitate such
yep
Ive got absolutely 0 idea how to run lua outside of a roblox project, or through lovely lmao
so its how I roll
unless I google "online lua compiler" lmao
i was messing around with a web based lua runner until i realized it was json
took me way too long
yeah, lol that
surprsingly worked with 500kb of text no issue
which isn't a lot
but is a big text file
how do i stop a suit from spawning in naturally?
an in_pool function that returns false
and would return true when you did want it to spawn
love.threads are a wild beast to tame
so the only real issue here is like.... idk how to develop inside of debugplus and not just lose everything if i press the wrong key and haven't caopied it to my clip board
i guess I'll have to be alt-tabbing
because i want to write it as something i can reuse
Guys, can anyone advise want to make a dna joker but I was told vanilla doesn't make sense, where to start?
the love terminal lets you copy the things you've typed in
"and i haven't copied it to my clip board"
youd be able to get them from there
as I said i'll just have to be tabbing in and out of notepad
yea
brain no worky sometimes
on god
is there a context for xmult?
wdym? like duplicare?
like every time an xmult triggers, activate this code
Or maybe im thinking of exponentia
Ill look rq, but def not in vanilla or smods
it would be cryptid/jens
oh i thought this was a typo of duplicate
i think cryptid has an exotic like it yeah
lmfaoo
Exponentia is an exponential Mult Joker. It gains ^0.03 Mult when XMult is triggered.
Cryptid is a content mod developed by MathIsFun_ with contributions from members of the Balatro and Cryptid Discord servers. This mod disregards the notion of game balance, adding various overpowered content for the player to use, and various difficult challenges to face, though players are given an extensive customization system to curate their...
yea that guy
how would one do it during gameplay because i understand it for like the config tabs and such but like idk how one would have it be while one is in the game 😭
cause i tried looking at how joker display did it and it's too confusing
You would have to manually add ur own elements to the specific area. Most if not all are in functions/UI_definitions.lua
Unless you just mean like testing stuff quick
Otherwise remember the lovely log keeps it
I think only the bottom part would be relevant there
how do i check if a consumable is a spectral card?
set == "Spectral"
i remember having to check set or something, but can't remember where it is
self.set or card.config.center.set
mm none worked
smth like that
lesgo
Who wouldve thought crashing would be a bad thing and lead to bad results
(not a debug plus issue wilson dw)
truly
gotta wipe my mods folder again woo
how would i implement this into my own joker?
mmmmmm
Honestly, best way is just copy the implementation and credit cryptid
totally, completely new to modding... what am i doing wrong here exactly
is JDJ ur mod?
Show where you define SMODS.Atlas (if you do at all. if you dont, thats the problem)
show the joker your making
yeah it's there
how do these functions operate exactly?
https://love2d.org/wiki/love.filesystem detailed here, but use NFS. instead of love.filesystem
and yeah same for 2x
does it have the .png extention?
yup
then I have no idea
is that for 1x or 2x
good point
the one in 2x should be 142x190
it is
try booting up the game again
still getting the message
odd
is it because of my dependecies maybe???
thats really old
you have assets/2x/Jokers/Jokers.png
remove the jokers folder in between
its just 2x/Jokers.png
oh lol
yeah it was on an example thing that hasn't been updated ever
how did we all miss that
You sure?
file extentions being disabled was screwing with me
love.filesystem is fine for save files
what do you mean remove the jokers folder?
is it in the range allowed? im mucking around in Mods/ and other folders in Appdata/Balatro and they werent too happy with me
isn't that how it usually is?
what
It's only allowed to write in AppData/Balatro
The game uses it for writing save files
you need to specifiy its in the folder in your assets defintiong
also DebugPlus uses it for it's config
you could replace "Jokers.png" with "Jokers/Jokers.png"
ahhh okay
odd. The code I was using mustve just been broken when I used love.fs, and I fixed it before switching to nativefs
tho that raises the question
why does talisman use nativefs then
eyyyy it doesn't crash yippee
does this mean I have to stringify it? Or am i doing something wronger?
I don't wanna screw up my profile and have to reload 50 times
oh wait i see
I want to preserve all the data
no I mean read the contents of profile.jkr and then write it to a new file
uh... that's what this is? just the unpacked version?
local x = NFS.read("...profile.jkr")
NFS.write("path", x)
how does one manipulate the new file in game though that way?
x is the string of the file
I think you can use compress_and_save("tmpprofile.jkr", G.PROFILES[1])
is there a way to make a joker spawn another card with the eternal sticker on it?
create the card and then :set_seal("eternal")
this seems like two many steps when I could just be editing the table? Kinda the whole point of doing it in game is for the game to already know how to deal with the data?
what is your end goal?
ive completely lost what you are trying to do
yea lmao^
smth about joker stats changing cause of a key change?
i think
So the problem I'm solving is duplicated joker entries in the table from modded jokers changing their keys over time. This means that the stats screen is all messed up and for me only currently shows vanillia objects despite some mod objects i still posess having better numbers in actuality. The solution is to give it the keys of the duplicate objects and combine the sibtitles in such a way that the key and order are kept for the current version, the the numbers for the same values are added, and any fields present on any version will now be there
I say jokers because that's goal one, but this is any objects shown on the stats screen
so why do you need to write your profile to a file at all?
i don't you're right
i can just store it as a temp variable
the profile doesn't save by default
eval G.PROFILES[G.SETTINGS.profile].joker_usage.j_joker.count = 1000000
look at stats
close game
stats are reverted when you check again
how would I add the eternal seal to this?
SMODS.add_card{ key = 'c_sbeven_blood_money', edition = 'e_negative'}
that's not the issue really. i already have abackup
i wanna save time and not have to reload if i make a mistake which i will many times
local card = SMODS.add_card{ key = 'c_sbeven_blood_money', edition = 'e_negative'}
card:set_seal(xxxx)```
...eternal is a sticker.
SMODS.add_card({ key = "j_mod_key", stickers = { "eternal" } })
yknow, youre right
Can you tell me how to make a particular Joker appear in the store less often than others?
why am I thinking seals
More than likely not the correct way, but using in_pool, return true if a pseduorandom number is greater/less than another number
Usually you should use a custom rarity for that type of stuff
set the rarity of the joker
Also, is that actually the same place in memory? The thing I was using contains exactly the same content as the the json files decoded from my profile.json directly as a lua table, idk if that points to the same place.
I ask because that could effect whetehr it woudld upfate and how desirable it is for my purposes
G.PROFILES[1] contains exactly the sata strructure I feel like I should be working with
hence why I wanted to copy it somewhere (a file was maybe silly) to work on it
or am i misreading the compressed tables in the logs and it also has the other crap in meta.jkr?
I have set the rarity of the joker own with a value of 0.003 and wanted a particular Joker with this rarity to appear in the store even more often, can I use shop_rate?
maybe a weird question why do you want different jokers of the same rarity to appear with different frequencies
To eleborate @frigid blaze if 3 pollable rarities isn't enough, you can wlways add more
like a 'supercommon' or 'ultrarare' or 'demicommon' or whatever
it's what is used for writing to the file. You have to call a function or two to write to disk
is there a way to bypass the Eternal sticker? i want to make a joker that can destroy consumables even if they are eternal
-# Just don't check if it's Eternal.
i'm not up to speed what's an eternal consumable
i think a lot of code with eternals is just hardcoded? don't quote me on that
I mean the thing i was using seems to be the literal bare table for the same thing?
from printing it
yes
how?
a string isn't useful in game
I mean... hence why it isn't useful to me either, lol. I want it loaded in memory as a table to edit it, just in a different location not to have to reboot or reload a backup of the profole.jkr if i messs up
...quite literally, don't check for card.ability.eternal, just call :remove() or :start_dissolve().
Card:remove() im psure
you surely see why having it loaded as a table makes it easier to trat it like one and combine entries, right
me saying im pretty sure as if I havent done it loads of times
does an eternal consumable just mean you can't sell it?
yes
im trying to make it so that when a specific joker is sold, it also destroys an eternal consumable
like the ability cards in Polterworx
this joker should turn all played cards into glass when a 3 of a kind is played, before scoring, but for some reason the cards dont become glass until after they get removed once scoring finishes
the fliping animation still plays at the right time tho
Consumables support eternal_compat & perishable_compat too, fwiw.
fire music
how do I make another joker do that?
just get the card and call the method
Check for consumable existence and randomly select a consumable in the same way Perkeo does it, then just slay with :remove() or :start_dissolve().
or :explode() if you're feeling especially fancy today
it looks right to me
i got it to work now, but how do I make a specific consumable spawn at the same time that a certain joker is added to the joker slots?
Would the effect "allow Stone Cards to stand in for any rank in a straight or X of a Kind" be a good Rare effect on its own?
basically a mini-shortcut
SMODS.add_card it via add_to_deck of said Joker.
would give stone cards a use so yea
you probably need to apply the glass inside the first flip animation event manager tbh
the true you have in set_ability is "delay_sprites"
set it to false
unless delay-sprites doesnt do what I think
yea that didnt work
cause midas mask and vampire use true...
i'll try that
yea try zombies
also didnt work
if I'm trying to give the player a consumable, what function should I be using?
like this?
if not from_debuff and next(SMODS.find_card('j_sbeven_blood')) then
SMODS.add_card{ key = 'c_sbeven_blood_money', stickers = {"eternal"}, edition = 'e_negative' }```
Should, ye.
How does one remake the old gold seal?
the consumable wasn't spawned at the same time as the joker was
...did it spawn at all?
SMODS.add_card?
only after the joker's ability was triggered and not when the joker was spawned
would that replace card:add_to_deck() in this code: ```lua
calculate = function(self, card, context)
if context.using_consumable then
G.E_Manager:add_event(Event({
func = function()
local card = context.card
card:set_edition('e_negative', true)
card:add_to_deck()
G.consumeables:emplace(card)
return true
}))
end
end
That would replace everything but return true in the function.
oh lol
Are you trying to make a negative copy of the used consumable when a consumable is used?
yes
oh also I forgot it should be only when a consumable is used from a pack
that probably makes it harder, though
I'll deal with that later
should I use create_ instead of add_?
SMODS.add_card({key = context.consumeable.config.center.key, edition = "e_negative"})
card:add_to_deck is actually only used to proc add_to_deck effects afaik
💯
I dont mean to be a bother, but bepis or something, are either of you able to help me test a mod?
mm sure :p
i'd also be fine with testing if you'd need it
how do I make the first mult get recognized as the game's current mult instead of a bonus mult to the total sum?
Are you trying to do emult without talisman?
Yes.
Return emult = number
Yes.
follow up question: if this joker gets procced twice for whatever reason, will it do (x^2)^2) or x^(2+2)
messed up the code somehow and it didn't work 😔
luckily no crash, but also no debug report, so I have no idea why it's not working
(x^2)^2)
god damn
Or (x^^2)
No, use SMODS.add_card
Also you spelled consumeable wrong (right)
lmao
yay, safe check 
good news, I got a crash report this time lol
something's wrong with the event manager methinks
Show vode
It needs to be full uppercase.
So, I'm getting pretty tired, and this is just shitty psudocode only trying to be lya off my head, but it should give an ideal of the rough scope of what I'm doing. It's also not done, but as i said, riired
combine = func(temp_profile, key1, otherkeys}
combined = temp-profile.joker_usage[key1]
additions = {}
for v, i in ipairs(otherkeys) do
doners[i] = temp-profile.joker_usage[v][i]
end
for pairs in e, r in doners do
for pairs n, m in combined
if is_number(combined[n]) and not n[1] then n[m]=n[m]+e[m]
end
end
for v, i in pairs (diners) do
if not combined[v] then combined[v] = v[i] end
end
can anyone make any sense of this at all? lol
ok, now to change it so it's only for consumables from packs you open lol
Maybe check if context.consumeable.area == G.pack_cards?
also, even though this definitely isn't real lua yet, it'ss till the closest to programming i've done since college over 7 years ago, lol
for anyone tuning in, this is a script to combine entries in my profile for jokers that are the same joker but had their key chanhed at some point
for the purposes of the stats screen
it's meant to be evauled directly with debugplus
nah, didn't work
this is what I have currently
but it's nothing uet, i'm just doing it on notepad from meory to get the rough lay of the land and get the spine of it down
Maybe check G.booster_pack and not G.booster_pack.REMOVED and SMODS.OPENED_BOOSTER ?
like this?
Yes.
while my game loads, is the booster_pack.REMOVED the check for if you skip the pack?
oh wait
ok good news and bad news
it's not working
but the copies are also not doing what they are supposed to do
like the copy gets consumed and then does nothing lmao
ok nvm it's just for planet cards
ok nvm I'm just wrong lol
didn't work 😔
calculate = function(self, card, context)
if context.using_consumeable and G.booster_pack and not G.booster_pack.REMOVED and SMODS.OPENED_BOOSTER then
G.E_MANAGER:add_event(Event({
func = function(self)
SMODS.add_card({
key = context.consumeable.config.center.key,
edition = "e_negative"
})
return true
end
}))
end
end
``` current code
really i should be combining the doners first, then adding all that to the first key, the current version of the joker on the file
Maybe check if G.STATE == G.STATES.SMODS_BOOSTER_OPENED?
but cba to refactor the psudocode atm
update: it no longer works with packs with the current if statement
if context.using_consumeable and G.booster_pack and not G.booster_pack.REMOVED and SMODS.OPENED_BOOSTER then
am I replacing anything with this, or just adding it on?
ok new update: it stopped working and for some reason, that one pluto was cracked out of its mind lol
so yeah anyone got any comments on this nonsense?
I used a single pluto like 12 times and then the effect just entirely stopped working
That worked!
it's kinda a niche thing because i doibt many other people care if modded jokers (and planned for other objects) show up accurately on their stats screen
but i don't like seeing it just full of vanillia objects when that's not accurate
fire
just so y'all can actually /see/ what the hell i'm on about
it's the count value that's used for these
I'm 100% against changing keys in a released mod cause people's current run might get borked
Tho when you update, you shouldn't really start an old run
But it's just that typa thing
so morefluff's coupon catelog should be right behind abstract, but it doesn't even show up because the second one is the actual current entry
it shou;d actually be number 1 with both combined
and yes, my win/los ratio is abusmal, lol
though not at this point funnily
overall tho....
164 wins to 1551 losses
but a lot of that is like... debugging my modpack
which are runs i never finish, and this losses
and the cine's used must be a real new value
i spend more time debugging than i do actually playing balatro
very much same
And maybe 20 finished runs
speaking of debugging, i fixed the source of an issue i was annoyed at for 3 days and i don't even know how i fixed it
I binged vanillia for a month or so when i first got it
aand used to play a lot more on mods casually before the modpack, lol
i play vanilla on mobile all the time but on PC, i have like 90 hours and maybe 6 achievements because i'm always fiddling with my mod
but also i just got back into the community like a month or 2 ago
i think i'mma get back to playing again once things settle down with the comeback
is there a way to make a mult for one card type and chips for another? this code I wrote is giving me just chips all around
i don't really enjoy vanillia balatro much anymore tbh besides as a timewaster
i'm modpilled af, lol
whenever i'm playing vaniliia i wish i had my mods
and i only play canillia on phone too
You're returning chips both times.
that's not twice though?those are 2 independent cases?
am i missing something?
you're returning chips = card.ability.extra.mult
yes however the first one returns before the other gets checked
instead of mult = card.ability.extra.mult
so if the first case is true then the second case never does anything
the return doesn't run if the if is false though?
and it won't both be true'
i don't think
It appears I celebrated too early (I used like 50 temperances)
yeah, exactly
you'll be in a little trouble if quantum ranks are ever figured out, but this is pretty much fine
lmaoooo thanks, I just saw that
test time
What are the standard values of the:
Rare
Common
Uncommon
Legendary
?
you mean the weights? or what they're called in the code?
3, 1, 2, 4
gyehehe we're working now, babyyy
but there's no real reason to use that system for most things
strings work now
all of my jokers are 1-4 and it's still supported syntax so I keep using it for consistency, I am not going through every single one to fix them
Weight
yeah thought that's what you meant anyway
well, maybe i'll go fix that when I go through uprooting all my loc_txt to turn them into localization files
so the way it works is they're given a number between 0 and 1 is rolled and depending on if it's higher than a cetain value that determies the rarity
of the joker being polled
I'm not sure if that's correct, since 1 is already a 100% chance of a lunge
they're talking about the old index sustem which is different
this has always ben used too, for polling afail
and legendaries can't be polled
When i install Steammodded directly from github it still says that there are files missing. I am on Mac s othat could be what causes it. @ in reply please
they on;y happen if it's manually set to 1
i kinda vibe with it, but i have other rarities in my game so it's weird to not think of all of them as strings
haven't modded any of my own yet
oh yeah I can see using it when you have custom rarities
I'll probably set my rarities later, I don't need to set them in shops at the moment
how to count: 1. 2. 3. epic. 4. exotic.
I also need to figure out how to do secondary types, cause I need to seaprate in Classic, Revival, Hero, and Villain
I'm not going to do Alien and Human cause that'll get really annoying
this is what they're taling about @daring fern
@frigid blaze
I get it, I'm interested in the standard weight of each rarity.
this is comprable to the number you can set on your own rarities as rate/weight
the image right above you lists them
i don't quite get the way the page on rarities in layed out
I just gotta get a border and those fuck ass lines out of there
this is such an intimidating image
the main fuck ass lines i see is yoru crt shader's scanlines :P
Pretty sure those lines are a bug not related to your mod
I like the CRT :)
I've seen them before on other jokers with no border
ohhh
yeah, the Jokers are the correct sizes in the code and separated, but they just kinda have those things there
Thanks, I'll think of something😀
and those fuck ass lines out of there
separate the sprites by 1 pixel. That's helped me before
they already are
Pranked. Turns out it did not, in fact, worked 😔
It gives you copies of cards that are already in your consumable slots if you have a booster pack open, and haven't selected a card yet
any way to fix this?
I assume I need to check if the context.card's area is not already in your consumable slots
and the dims are 71x95?
There is this card from ortalab that does a similar thing but I don't think it is working.
yeagh,
I think the problem is that the target was not found.
You could probably copy that patch but choose somewhere that exists.
mm that's unfortunate then. Idk why it's giving you the extra pixels.
If the software you're using has a grid system, maybe turn that on with a 71x95 grid view and see if any are overstepping their area?
Alternatively, make sure all sprites have at least 1 pixel space on all sides. That should probably help too.
HOW DID YOU FIGURE IT OUT @unkempt thicket
I'm having a similar issue
I have
discovered = false,
no_collection = true,
in_pool = false,
yes_pool_flag = 'uncompletable_condition'```
All set, but I keep finding the joker in the shop, is there something I'm missing?
in_pool = function(self)
return false
end
How do I get it to delete only the non-scoring cards? I tried context.cardarea ~= G.play but that also deleted the cards in hand
context.cardarea == "unscored"
Ohh I see ty
The deck fixing goes crazy
Also goated reference
I low key made it a little too op, but it should be fine if I just don’t think about it
Also ty
Oh actually?
How does one make a joker that copies all jokers?
copy_card
No, I mean their abilities.
Oh like blueprint?
Yes.
There's an smods.blueprint function
Somewhere
Does exactly that
But
There's some limitations
Yes, but how do I copy all joker's abilities?
You could try retriggers
You would have to Calc all jokers, combine their returns into 1 table, and return it. I haven't found a better way
A joker in my main mod is blueprint but left and right
And I've gone through hell making it work
Although smods 0500 might make it easier
There was something in the changelog I saw
just a bit (you can remove 16 cards from your deck assuming you have no -hands modifiers. Basically a free immolate but you choose what to remove lol)
You would end up with 5 cards max if you used that joker....
Or sorry
Wait no yea 5
No.
It's highcard
1 card
Non scoring as in not held in hand yea?
non-scoring as in played and weren't the high card
right there with ya lol
Lol
But yeah, I thought it'd be mostly alright since it has like near zero practical scaling, not really sure how to balance it in a way that still feels satisfying though
usable once per round would be a good start methinks
you could also do smthn like "playing a pair destroys all non-scoring cards. Chips from destroyed cards are split between the scored cards" or smthn
local hasActivated = false
if [the check you need for the joker] and not hasActivated
[all your code here]
...
hasActivated = true
end
this is the first thing that comes to mind. There's probably a built in check, but I don't know it
oh, and then also you need a func that runs at the end of a round to set hasActivated = false again