#💻・modding-dev
1 messages · Page 158 of 1
or can i leave it empty and it will just add no effects
oh
i must have misread or misunderstood
Yes
Like a wise man once said: "run and find out"
it was weirdly easy to make this work
wheres the crashes, i cant have made it work first try
stakes are pretty easy tbf if they're only simple
yea, but knowing me, theres a very niche crash out there
okay, its not appearing now, am i forgetting to close something? I only edited the loc_text and now its gone
how does one make it so a joker can appear multiple times even if you have on already
Some special return using the in_pool method
Should be in the docs
How do playing cards work
Is I do
end```
Then is context.full_hand[i] the card object
im so confused, it just stopped working idk why
I dont understand, what iscausing it to not work
it was working just fine a minuite ago
wait
IT ADDED BACK THE FUCKING IGNORE
is G.GAME.edition_rate added or multiplied to base amount
I made it work, but I had to go the lovely patch way
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''
elseif self.config.center.consumeable and self.config.center.demo then
self.children.center = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS["Tarot"], G.c_locked.pos)
'''
position = "after"
payload = '''
elseif not self.params.bypass_discovery_center and _center.set == 'Alignment' and not _center.discovered then
self.children.center = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS[_center.atlas or _center.set],
(_center.set == 'Alignment' and {x=1,y=0}))
'''
match_indent = true
# Set Alignment undiscovered desc
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''
if not self.bypass_lock and self.config.center.unlocked ~= false and
(self.ability.set == 'Joker' or self.ability.set == 'Edition' or self.ability.consumeable or self.ability.set == 'Voucher' or self.ability.set == 'Booster') and
not self.config.center.discovered and
((self.area ~= G.jokers and self.area ~= G.consumeables and self.area) or not self.area) then
card_type = 'Undiscovered'
end
'''
position = "after"
payload = '''
if not self.bypass_lock and self.config.center.unlocked ~= false and
self.ability.set == 'Alignment' and
not self.config.center.discovered and
((self.area ~= G.cs_alignments and self.area) or not self.area) then
card_type = 'Undiscovered'
end
'''
match_indent = true```
Do let me know if there's a better way (it wouldn't work before because vanilla code specifically checks if center is either Joker, booster, or consumable so my center being "alignment" never passed the if checks)
how could i replace the base game shaders with my own?
you can lovely patch this
or hook Game:start_up()
and override self.SHADERS[shader_name]
for the ones you want
oh, im not sure if i want to try that in case i break something
thanks though
and also, is there a way to make it so Legendaries can be in the shop
uhm lmao
whats 9 +10
910
Can someone please help me I can’t get version.dll into the steam file been trying to fix it myself for 1.5 weeks now and I am officially lost
do you own a legit copy
Of course I do
why not verify the integrity of the files
I have done this every single day for the past 1.5 weeks and nothing has changed I tried reinstalling Balatro and changing the permissions on the Balatro steam files and nothing has worked so far
Can i see a photo of the files
Have you added the exclusion in your anti virus?
Yes and yes
Is there a way to set an incompatibility with smods the same way you can set a dependency? As in make the mod not load itself if the specified mod is present?
What's the code for reserved parking jimbo
Yes use conflicts
line 3302
Ah the classic phone camera screenshot
I don't have access to the code atm
what number is in the appid
2379780
Is the code long
and is there nothing under the .txt file
No that’s all the files
when you first ran the game, did it ask for admin privileges
No but when I try to insert version.dll it does
if you try to run it with it does it, or only when you try to insert it
Only when inserting
are you able to insert it or does it not let you if you dont grant permission
It starts inserting but doesn’t show up in the end
check if your anti virus is killing it
Turned off antivirus completely and it still doesn’t work
I’ll try
hi, so i wanted to add an animation to a joker effect?
looks like this now
i wanted the cards to flip and change rank before flipping back
had some difficulty with the event manager
wrong code wait
What do I click
how do i spawn a ui box in play area
It all brings me to the same Balatro merchandise website (except for the forum that brings me to Reddit)
does the antivirus trigger
like does it show
⚠️ virus detected
No
It just disappears
what antivirus do you use
Bit defender
I did
It doesn’t pop up anywhere
was the file removed by bitdefender or windows defender
do you know that
have you checked quarantined files in bitdefender and windows defender
No it asks for admin permission and when I try to do it with admin permission it doesn’t work and when I try it without it disappears without notification
this is definitely defender eating it
defender moment i guess
are you sure you turned defender off
I deactivated everything
i do need some help regarding adding UI to the play area
Is there a good native way to add a card TO the played hand before scoring? (like a DNA type but it adds to the played hand not the held hand)
so like a random card
yeah, if played hand is 4 cards or less add copy of random played card into played hand
oh like add it to the hand that is being played
yes, pre-score
so like if you are playing a 4oak it would become a 5oak
or a two pair would become a full house
or a high card would become a pair, possibilities are endless 🥳 (EDIT: not endless, like 12 possibilities max)
well if we do it in steps have you know how to create a copy of a random card in played hand to hand
Create said _card, _card:add_to_deck() table.insert(G.playing_cards, _card), G.play.cards:emplace(_card) would be the gist of it... but for recalculating the played poker hand, not so sure-
^^^
Yeah i could maybe just manually change the hand-type instead of recalculating?
you dont need to recalculate if you add a context before the calculation
is there a mod that adds a ui box above the consumable area, or occupies that small space?
no as in here
none that I know of
ok
Ortalab Zodiacs kinda
Unless it's between the joker and consumable area I forgot
how do i add discarded card back into the deck
okay so i'm trying to think up ideas for a joker replacement mod (based off of paper mario enemies), and since there are so many spiked enemies, I wanted them all to have some trait that they share, so they can synergize off of each other. Are there examples of mods that have a similar sort of idea to mine that can give me some pointers?
I feel like I'm overcomplicating things here. Is there a simple way to check if a joker is available, then put it in the joker slots? I'm trying to make a deck that always starts with a specific joker if it's been unlocked & discovered.
I've tried create_card(), add_card(), and G.jokers.emplace(), but nothing seems to be working so far.
have you tried looking at other modded decks that do this, one that i do know if from "SDM_0's stuff" called lucky deck, lucky 7 deck
I'll take a look. thanks!
i've been trying to make an edition that retriggers a joker if it has this edition and i just can't get it to work, i was told about the retrigger_joker_check = true flag but i have no idea where to place it
loc_vars = function(self, info_queue)
return { vars = { self.config.repetitions} }
end,
calculate = function(self, card, context)
if context.retrigger_joker_check then
return {
message = localize('k_again_ex'),
repetitions = self.config.repetitions,
card = self
}
end
end
trying to make a joker that checks held glass cards in hand and retriggers cards for each glass card... probably an order of things issue but rn my local variable updates too late, like it updates after the check in the repetitions context is already made
(bump)
(also bump)
Would it be possible to differentiate when a Lucky card triggers its $20 effect vs its +20 Mult effect?
That's interesting, what mod?
mine
Is it downloadable? Looks really cool
Ohhh I see in the bio, sick
Also what do y'all think of the wording of this Joker:
Change the rank and suit of all played cards into the rank and suit of the leftmost played Steel card. (Only activates if at least one Steel card is played)
With your MTJ mod, is it old or new calc? Cause it sounds really cool too
has a discord and the latest commit is only compatible with new calc, but if you play old calc, i would appreciate it if you test the 0.8.4 release as after i push out the 0.8.5 release i need to fix stuff in 0.8.4 so it works with old calc
How are you handling existing words or not? Are you making it so if a word doesn't exist in your dict it doesn't eat a hand or is it just kaput
it becomes a high card
Icic
And to win i presume you just have to guess the word in 6 hands or however many hands you have
Ok, so download 0.8.4? And if it crashes ping you with the cause? I can probably do that. I do have a few mods installed, so idk if it would conflict, I doubt it would unless it changes stuff heavily
if you run old calc yes, or join the discord server so then others would also be aware that it is known
Also thank you guys for putting all this work in for free mods, it's pretty cool of y'all to give stuff like this to the community. I appreciate it heavily
Can you send me a link?
it should be in #1308457194894921729
or the thread for cross mod content in the cryptid server
i give it 10 for balance reason
maybe when i figure out how to put the card back in the deck
anyone know how to make an event give a specific joker?
i think i should add "if letter in word keep as many copy as needed in the deck when play/discard"
notice the score having fire but round is still not over
Yea i see that, maybe you could add a on discard just add those cards to deck
But I suppose with so many discards that bloats the deck
Or could make it so cards discarded are destroyed and you just create new ones that are added to deck
i don't know how this behaves with the mod that allows you to continue playing even when you achieve the scoring
Ives
idea
creates negative copied of alphabet cards for every letter played
perfect for mass deck manip
That's works actually yea
On round end just destroy all negative letters
Ezpz
Lmao
anyone able to help me with this only recently started trying to make a mod
does anyone know where tarot odds are stored? say I want death to appear twice as often
Hell yea
We love things that explode themselves
Yea I've been glancing there as you've been working
You're doing a stellar job so far I wish I could help with your questions when you have them lmfao
need feedback
can I see your code for question 1
I'm only 3 days into modding this myself so I'm still learning
I'll take a gander at playing it soon ™️ to give you some proper feedback
letter deck sleeves
the letter deck is kinda difficult tho
it doesn't scale that well
because not enough jokers support it
Then you just gotta make some so if people build around letters it's easier
i already implemented a joker that gives you what you spelled
You can have some that mult for consonants, vowels used
For length of word
'Complexity' of word
Or if the letter is a less common letter used for words
You can have quirky things like if they spell something it'll take x% from the blind
how do you make the playing cards themselves into different cards, like how you did with the letters?
All sorts of ideas
config = { extra = { Xmult = 1.6} },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult} }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 6 then
return {
card = context.other_card,
x_mult = card.ability.extra.Xmult
}
end
end
end
yes
i just wiped the cards of their faces and slap letters on them
ah gotcha, so if i wanted a different sprite for the cards, i should do that?
try putting your juice command in this if statement
"if context.other_card:get_id() == 6 then"
a boss blind that just has you spell pokemon names is funny
check if it's a six, if it is, juice
God aren't there a bazillion Pokémon too
i rendered the letters separately
there are
but how about
spell Gardevoir
that's a bit specific
maybe
name a psychic type Pokémon
i tried doing that and it just procs at the moment the hand itself is played but not any more when each card procs iirc hold on lemme finish this enhance i was doing 1 sec
If the word is long are you granting hand size by default?
Or can it only be as long as the hand size you have
As example gardevior is 9, but you only got 8 cards
+3 should be fine
word length +3
That makes sense
adding Scrabble to Balatro
Good lord
Thanks I got it fixed
Why would you do this
i am bad at coming up with shapes
I can barely make things in English and you out here in kanjis
it's only for the boss blind chips
Gotcha gotcha
it's fineeee
Lmfao
tbh I'm still learning timing because I believe this should work
that's checking for each individual card so idk why it would only trigger once on main scoring
any idea on how not to make the config tab do this?
- base
- strangely both are selected?
- after clicking enter...
i do this and it just procs like i said, when the hand is played but not any more after that
i think it might be because of this
context.cardarea == G.play
i think G.play is just the generic score timing
so maybe nest your ifs?
if context is individual and card id is 6 juice, then if context is play do xmult
not certain that will work but worth a shot
I had a really cool idea for a Chess themed balatro mod but I honestly dont know where to get started with modding this game, if anyone has a good video or can point me in the right direction it would be super appreciated
reading this and all the api doumentation on the right will definitely get you off the ground a little
huge thanks akrone
np fella

are there examples of Stickers in any mod? i want to make a new Sticker type for my mod and I don't know where to start
cryptid?
has banana perishable sticker i think
i think thats in cryptid
i can check after this scores
nvm im an idiot
changed card = context.other_card to card = card and it worked instantly lmao
thanks anyways
Happens to the best of us
bump on this
I cant find it
i also think editions could work for my thing, cause I'm trying to make it so that Jokers will have a large chance to spawn with "Drained" which disables its ability for 3 rounds. The drained would cause it to be like a greyscale version of the Joker.
sorry im blind
i have a lot of shop rerolls surely itll just show up
ill find it eventually no way it can evade me forever lol
would i be able to make a greyscale with shaders tho 🤔 or would i just have to use whole new sprites
greyscale with shaders is absolutely possible yeah
okay cool
im gonna try and make a chess mod where theres a tarot card that turns a few numbers into face cards but are still like the same chip value, so like 10s would become bishops, 9s become knights, 8s become rooks and then everything 7 and lower stays the same, might make aces pawns or might do something different with pawns like theyre own unique 1 card
I think it would be cool if aces could promote to other faces in some way, like maybe another tarot card can do that or an enhancement?
(that is if aces end up being pawns in ur mod)
maybe but aces have a lot of unique and cool jokers, might make a way to make them face cards while staying aces
but that may be out of my coding skill set which is not much lol
only modding ive worked on were some old among us stuff 💀
how much mult should i give the lord
since each jim is its own Joker, each Jim you have will multiply the mult by 1.25x, so with 5 Jims you get 1.25X ^ 5.
make it so selling 1 jim kills all the jims
yes it does
fikre
try 1.5x and see how that feels
make it say if one jim goes away then cos i didn't quite understand that was the thinjg
you're right
lemme fix that
i thought it was like selling the original destroy the copies
nono selling any jim destroys all jims
perfect
sure
ok 1.5 feels right
maybe even a little weak
but 2 is way too much
and 1.75 feels way too random
#1308143451040124969 also makes a new sticker type (that is, a new classification which includes several new stickers), so that may be instructive
god that first joker has been in a dire need for a redraw for weeks
I still don't get how I'm supposed to use debuff_hand() , can anyone enlighten me ? (by "how to use it" I mean, on what and with which args ?)
just gotta fix jimbo switch and make these 4 and my first ever balamod is officially done i think..
chat what do we think of surmacchio
is there a way to make SMODS.calculate_effect trigger in an enhancement after the enhanced card adds their rank's chip value?
I like the idea tbh
no clue, i dont really work much with enhancements
thank you!!
what are you trying to do?
hi, sorry, dont mean to interrupt! just asking again, cause this is the last thing i need to know to finish this event
I'm using the buf.xchips function to add xchips to the score, but it's triggering before the card's chips, unlike vanilla
You gotta use create_card
local card = create_card('Joker', G.jokers, nil, nil, nil, nil, [JOKER'S KEY], [3-LETTER STRING])
The key should be something like j_prefix_key where prefix is the joker's mod prefix and key is the key for that joker. If it's a vanilla joker you dont need the prefix part
oh yeah, im familiar with the joker key stuff, whats the 3-letter string though? anything specific?
me when I don't use SMODS.create_card
I never learned how to use it 😭
it just provides a cleaner interface
ah, theres a better way to do it?
the 3-letter string can be anything
SMODS.add_card{ key = 'j_blablabla' } is all you need to create a joker with a certain key for example
do you know what it's supposed to do in this scenario
Yeah, smods is the best way
Not a clue
that's why we don't like functions with like 8 arguments
if you want it after chips you need to add it into the calculation functions properly
that string is a randomness seed used to make card queues distinct on the same seed
it doesn't do a thing for making a specific joker
Makes sense. So it only actually does something when you're creating a set of random cards?
yes
As in lovely stuff?
you only need to lovely patch once iirc, the rest can be done in a hook
SMODS.calculate_individual_effect this is the function you hook to do the actual calculation, and then you patch SMODS.calculation_keys to put 'xchips' in the correct place
then you can just return xchips
You can patch SMODS stuff? I thought that could only be done to the vanilla functions
do i need anything else?
with lovely 0.7.1 you can, yes
awesome
anyone know why my mod icon isnt loading? i'm just using the reroll tag icon for the moment but that doesnt seem to be showing up
Do you have the icon's 2x version as well?
It has to be 34x34, I think
I'm pretty sure there isn't a forced size requirement and you can do whatever 🤔
Damn :/
it doesnt feel like ive done anything different to other mods code im looking at
it just isnt going through
Lovely & SMODS versions?
I mean what I'm assuming is debugplus above it seems fine
ya debug plus above is fine
but give your lovely & smods versions anyway
lovely is 1.0.0 and smods is 1.0.0 alpha i think
lovely version aint 1.0.0
check the command line prompt, it should say the lovely version in the first line
I believe that's the "API version"?
oooh
to support breaking changes etc?
i can try do a new install
no just check the first line in the cmd prompt 😭
ah! sorry LOL
I'm not 100% sure, would have to ask metherul
lovely 0.6.0 should be recent enough afaik - how about your exact smods version? after the ~
"1.0.0~ALPHA-1219e-STEAMODDED"
i see that cerulean bell does forced hands so im assuming it can read what card was selected, can i use that to allow a player to select a card for a specific joker ability or is it just highlighting a position of the card in hand?
im looking to make a +4 card where players can select the suit to add 4 cards of at start of round, but im not too certain on how to allow players to just select the suit without playing the card itself
eh should be fine too
it feels weird cause all the other mods i load are fine but mine, and the rest of my mod works, but the icon just seems insistent on not changing
you should be able to take a look at the code for strength etc, they check which cards are selected highlighted?
You could try disabling all other mods except your own? I've seen that be an issue only once before but lets just rule it out
only other one i have atm is debug plus but ill give it a shot
Cerulean Bell just highlights a card and then forces it to remain highlighted
thats a fair idea, i completely disregarded tarots because they require the use consumable shit
but maybe itd be helpful
still no change
tragic, i thought it would also register what card it was, appreciate it
gonna install the newer lovely version just incase that fixes it
Oh but wait, I think you'd use the same thing Cerulean Bell uses actually
Can't hurt. After that try changing the path to something that doesn't make sense, like tolgicon.png -> notexisting.png
o7 will give it a shot
probably just identify whatever card has highlight yea?
Could you also send the entire file you have?
the image file?
I'm assuming the code
ah! yeah can do in just a sec
Yeah the code file
I think it's G.hand.highlighted[POSITION IN HAND]
cant i just do G.hand:add_to_highlighted(selected_card, true) instead?
oh hey good catch eremel
don't use the SMODS.INIT stuff
ooooh does that mess w it
it's old steamodded code, and if you include it steamodded will attempt to load your file in "compatibility mode"
ah! gotcha
which messes with stuff like the modicon
i got that code from an older video on how to mod the deck images
I spy ortalab artist bubbles 👀
That'd just try to select the already selected card
ah gotcha gotcha, much appreciated
If you wanna reference the highlighted card you'd probably use this
awesome will do
Just look at the code for the tarots like death and stuff like lars said
affirm
yep, already there
ive done about 20 other jokers before this, i just didnt think about tarots at all for some reasin cause i was thinking about the consumable use ability being useless to me rn, but neglected entirely that i dont need to utilize it being a consumable lmao
thank you for point me int he right direction both of you =]
This got the icon working!!
gotta figure out another way to replace the deck images but ty for the help :) much appreciated
okay yeah i definitely need more than just this
How does Steamodded handle cards without ranks with respect to their id/nominal value?
Negative numbers too or… ?
I think aure meant create_card instead of add_card?
oh let me try that
(wait, what even is the difference 🤔)
Does add_card exist?
How do I go about it? Just use
target = smods\src\utils.lua ?
SMODS.add_card(t) -> Card
This function replaces add_joker. It takes the same input parameters as SMODS.create_card (below) and additionally emplaces the generated card into its area and evaluates add_to_deck effects.
seems like it
hmm seems like add_card should actually work by looking at the code
whats with the -> Card
It seems like it returns a Card
how do you get a mod to load an extra .lua file again?
yeah you'd need to handle the return but the original add_card actually should be doing that for you
it's target = '=[SMODS _ "smods_rel_path"]' iirc
been trying to access joker descriptions, but i dont think im doing it right, im somewhat new to lua, any pointers?
card.ability.extra.word_count = 0 for i = 1, #G.jokers.cards do local key = G.jokers.cards[i].config.center.key local _joker = G.P_CENTERS[key] local word_count = select(2, _joker:gsub("%S+", "")) card.ability.extra.word_count = card.ability.extra.word_count + word_count end return { mult = card.ability.extra.word_count }
it's in the docs, but assert(SMODS.load_file('jokers.lua'))()
Ok thanks!
Any way to delay the sprite of a card becoming debuffed if turned wild in a suit debuffing boss blind
yes
crap im outta time but im unsure of whats happening then, ill look into it more when im able to return
thank you for the help!
I think the easiest way is to look at how Spinagogue does it in Cosmos and figure out how to patch
doesn't sound very hard
Idk lua
My own evaluation was that this seemed too strong, but I got a divergent opinion 🤔
uncommon imo
just realized _joker would be a string list, gotta combine em first
How can you always apply a shader to a consumable type, such as the shiny Spectral shader
Ngl, it'd be funny to just have a literal placeholder joker that sells for the most recently bought joker's price
thank you
I got it
is smods_rel_path the root folder of smods?
I tried looking at the lovely repo, but couldn't find info on this
Card:draw
I think
yeah lovely stuff is undocumented
it's e.g. src/core.lua
I don't think so. I think _joker would be a prototype
Have I got your hamster on the wheel, Victin?
I had a Hamster on a wheel but I never released it
I mean with my placeholder joker idea
idk how to use that :(
I think 1 and a half people do, maybe 2 and a half
I meant get you thinking lmfao
these guys in negative look cool though
How can you have half a person?
very carefully
Vertical or horizontal slice?
dealers choice typically
TOML parse error at line 1, column 1
|
1 | [manifest]
| ^
missing field `patch
what does this mean for me
I pick diagonally
how do i make an english localization?
like what is the id for the english locale
oh wait im dum >_<
either en-us or default
whats the difference between chip_mod and chips for cards?
wdym?
so i'm trying to make it so that each played card of a certain suit gives + chips (similar to how it's done for the various suit jokers) and I found two different mods using different methods for chip gain:
- Pokermon used chips = extra chips + total chips
- The example just used chips_mod = extra chips
im asking what difference this makes
if any
i wouldn't know
is there a way i can run code when you start a new run
not with a specific joker or anything just in general
is there a function i can hook or smthn
like running a specific part of your code?
giving yourself the item and using it would work no?
I use Game:start_run (gets called for both a new run and continuing a run)
just check the args then
what kind of global?
so what's it keeping track of if I may ask
if I am looking at a randomly-selected joker, how would I go about finding out if it has a variable with a specific name?
someone wanted polymorph (my spectral) to scale handsize reductions per use of the spectral like ectoplasm so i'm making a config that makes it happen
but my current code for it has the value persisting between runs
what's wrong with copy-pasting Ectoplasm's code?
i completely forgot that was an option
accidentally creating a negative Ouroboros from Inscryption
if joker.card.ability.extra.variable ~= nil
should check if it exists i think
How do I get the horizontal position of a card again?
in x/y coords?
yes
ectoplasm uses a global variable too
My lovely.toml file is require in my mod yes?
like in your sprtesheet?
uhm
open it in your art editor and see what pixel the far corner is on
G.GAME.ecto_minus
yeah G.GAME.ecto_minus
which conveniently gets reset since G.GAME gets reset at the start of each run
so yeah I can't exactly do that unless I like
hook G.GAME somehow and put the variable there
you don't need to
that would be pretty nice actually
ectoplasm just does
G.GAME.ecto_minus = G.GAME.ecto_minus or 1
G.hand:change_size(-G.GAME.ecto_minus)
G.GAME.ecto_minus = G.GAME.ecto_minus + 1
so it doesn't even need to be defined beforehand
the or 1 makes sure it has a definition
unless you didn't mean the pixel position on screen btw
and meant the spritesheet or smth
god it looks SO COOL
Is there a way to return multiple set of values from joker calculation
It's for a blueprint-like jokers but its copying more than 1 joker at once, so I can't keep hardcoding the value or use stuff like SMODS.calculate_effect because it would mess up the calculation timing
I think thats pretty much what Infinite Fusion does but it's completely discontinued under new calc sooo
What color does the game use for face down cards in the deck UI?
I think it's orange but which orange
i've done this now and it works properly
however the card description doesn't update with the new handsize reduction
wait it's a spectral do I have to use self.config.extra instead of card.ability.extra
afaik ectoplasm doesn't even keep track or the handsize change internally, rather always using the G.GAME.ecto_minus
that was the issue it seems to work now
so just make sure to return that in the loc_vars
yeah well when I tried doing that I got attempt to index a nil value crash
even with the or 1
probably, it happened on boot
yeah you could try G.GAME and G.GAME.<your_spectral_minus> or 1
Do any of the UI wizards ("uizards") know?
nevermind
closing and reopening the game and continuing a run resets the value
fucks sake
you're not storing anything relating to the minus in the spectral right?
i fixed it
I did this and got this error
okay then
if joker.card.ability.extra ~= nil then
but also i think you'd need to check if extra is a table or variable?
idk how to do that
cause some people assign a variable as card.ability.extra = 0 but others do it inside extra
What do you think?
Hey what is the thing you need to call in order for the UI to zoom off screen to the top
Small variation:
also for my future reference:
Skyscraper
Scoring cards give +1 Chip per card of lower rank in your full deck
new jonkler
another ouroboros joins the ring
does anyone have any example code for adding shaders to a joker that i could take a look at
You can do it in Card:draw
As in, built into Steamodded
I had an old patch to do it but I don't think it's necessary nowadays
But I know 2.5 people who have ever used Card:draw
i saw on the wiki about using the draw func but doesnt really say how exactly and all example jokers and stuff ive taken a look at dont do it
ask aure
"Ouroboros"
"Retrigger all cards infinitely"
how do i make it so that only the jokers from my mod will spawn? (config option would be appreciated as well, so that I can toggle it on and off)
another?
ouroboros
should have known i wouldnt be the first to think of that
also the art #1178472913012273203 message
I haven't put it in-game yet
nevermind the old effect
cant veiw that embed
It's another message in this server
im probaly gonna do +2 mult when scored
ahhh
carries over between runs
Background could be better, though I remember just not finishing it
needs more of whatever I did here #⚙・modding-general message
it woke up
banger
incomplete friends
wait does anyone know how to make it so that only the jokers from my mod will spawn
cause I know pokermon does it but idk how they did it
ouro and friends
i wonder why balatro has translucent sprites for its consumables?
is it used anywhere?
maybe undiscovered?
hmmm
since ive done sprite of the day its back to code
hey do you have any ideas why i cant get my mod to even load?
its definitely in my lovely.toml but i genuinely dont know what to even put in there
is lovely.toml even required?
no
how would i make a joker give discards / other constant things like how juggler, andy, etc do?
you mean i dont need to have it in the folder
add_to_deck and remove_from_deck
and thats outside of the calculate function, right?
yes
ok
hey do you mind sending my your mods folder as a .zip
where can i find those functions in the code? common_events.lua?
my your or your my
probably card.lua
yep, found it
how do i make a config ui for my mod?
making sure that even when buffed, Fibo's mult is a fibonacci number
Guys I keep on getting a "tried to compare a string with a number" error and idk wtf i'm doing wrong ;-;
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.scoring_hand then
if context.joker_main and next(context.poker_hands['Flush']) then
return {
chips = card.ability.extra.chips,
colour = G.C.CHIPS,
message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }
}
end
end
end
btw this is for a joker that gives chips for any hand that contains a flush
At least specify which line it errors on.
it errors on a common lua function (line 894) so idk
yeah function/common_events.lua (line 894)
oh nvm i got it
used someone's previous solutoin
how do you prevent ghost cards? i'm trying to remove an entire played hand but the only cards being removed are scored ones, and the non-scored cards become ghost cards. they're all visually destroyed, but only scored ones are taken from the deck (ignore the jankiness of my effect stuff)
im going to ask again because i feel like ive tried everything, why cant i get this mod to load
heelo friends, im looking for the function that gets called when cards are modified in hand
does it have to do with the update_play_tarot function or is there another one
bump
I want to press a button and have it do something like this
I'm going to sleep on this
Everything LOOKS okay but somehow it isn't
And no error messages too
i think you need to create lovely.toml and inject your main.lua
I was told by two people i didn't need a lovely.toml
Ill try again
you don't
Whats my solution 😭
How am i stuck on the first step
I've been closing and opening balatro for 6 hours 😭
whats happening?
whats your main.lua look like?
i had just deleted everything in an attempt to start over
did the mod appear in the menu at all
first try yes
i managed to mess that up though
somehow
do you remember what you had in it then?
cause the only thing i had to add for it to show up was
quick question some mods dont have a "main.lua"
or is that just a colloquial name for the main mod file
TO = {} -- my mod id
SMODS.Atlas({
key = "TO",
path = "TwitchOverlay.png",
px = 34,
py = 34,
})```
hmm
dunno probably the latter
let me try that
TwitchOverlay.png is inside the assets folder of my mod, in both folder 1x and 2x
so
/TwitchOverlay
|---/assets
| |--/1x
| |-- TwitchOverlay.png
| |--/2x
| |-- TwitchOverlay.png
|---main.lua```
I'm going to work on more boss blinds
nvm i lied we arent jonkling
this
your folder hierarchy sould look like what i posted earlier
in main.lua?
no
we seem to be jonkling again
i lied
sigh
okay its failing to collect data from the atlas
meaning what set my key as is probably wrong
show me whats in yuour main.lua
did i read TO as to? yes
make sure you have a consumnable.png file where my TwtichOverlay.png are
yes
same error but i cant find dul_dul
yup
whats in your json file
you cant see it but its there
i dont have dependencies in mine
hmm
i dunno if it changes anything
ok show me the main.lua now
it might not have anything to do
Yeah nothing to do with it
Same error
in id in the json put RelCol, im trying something, im pretty sure it wont do anything
but at this point
TwitchOverlay.json
{
"id": "TwitchOverlay",
"name": "Twitch Overlay",
"display_name": "Twitch Overlay",
"author": ["PILIX123"],
"description": "A mod that reads the game state to transmit it to Twitch.",
"prefix": "TO",
"main_file": "main.lua",
"priority": -10,
"badge_colour": "",
"badge_text_colour": "",
"version": "0.0.1",
"dependencies": [],
}
main.lua
TO = {}
SMODS.Atlas({
key = "TO",
path = "TwitchOverlay.png",
px = 34,
py = 34,
})
in a folder named TwitchOverlay
i should reacreate your mod and see if it works?
why not at this point
okay lemme try
what platform are you on
windows
i was using old calc before
dunno what that is
im using smods "1.0.0~ALPHA-1312a-STEAMODDED"
didnt work anyway, same error but this time it cant find to_to
i know you are on 1.0.0 alpha 1304a
nope
thats what youre logs were saying
ok
and tried it
so im the one behind now
https://github.com/Steamodded/smods/wiki/Your-First-Mod
did you see this guide?
ok, thats what i used,
i dunno then
maybe lovely isnt injecting your mod correctly
i cant think of anything else
good idea
if it does then i'll just reinstall everything
How would one go about deactivat ing/activating a blinds ability?
similar to how luchador works, where you sell the joker to deactivate the blind
you can probably find the code of luchador somewhere, but except that i have no clue
alright
did you clone the smods repo into youre mods folder or did yhou install it normally?
both smods and talisman would need to be from source but still
clone?
git clone
i extracted both from the zip after downloading
simple feature
what does it do?/j
no way 😭
welcome to programming
im a gungeon modder and a software engineering student
i know this battle i just dont know the first thing about lua
😭
this aint even lua
its just a file structure issue
i would have struggled finding it if i was on my own too
im glad i could help
i know stone joker counts the amount of stone cards in your deck, is there a solid way to copy that for other enhancements?
i still need to figure out the event that gets triggered when cards get changed from normal to something like steel/lucky
to check if there is any or count the amount of a specific card
imma reinstall steamodded
the amount of a specific enhancement in your deck
i dunno
comment out all the files in localization and the other one you got, it might be because they have errors
i know how stone joker does it but its very specifically for stone cards
how does it do it, it might give me an idea
ok i checked steel card
what do i use to comment out an entire section of code?
--[[comented text]]--
both of them have a variable called "self.ability.steel_tally" and "self.ability.stone_tally" respectively
ahh thanks
i could try wild_tally or something but
i imagine since no joker uses it it wouldnt work
ok !
LETS GOOOOOOOOOOO
these consumable cards
lyman reference
since youve seen the code for the occult cards do you have any idea why it throws errors
my first guess is this?
let me just redownload
where do you get a list of custom rule for challenges like "double_ante" and fast_scaling"
wait hold on
this might seem stupid but how do i make the sticker work properly
SMODS.Sticker{
key = "self_destructs",
default_compat = true,
atlas = "lettersStickers",
pos = {x = 0, y = 3},
rate = 0,
badge_colour = G.C.RED,
sets = all_sets,
calculate = function(self, card, context)
if context.end_of_round and context.individual and card.ability.akyr_self_destructs then
card:start_dissolve({G.C.RED}, nil, 1.6)
end
end,
}
i am probabl stupid
you know what ill do consumables after jokers
do it with i =1 instead, and remove the i++
what i want it for the summon card to give two more occult cards
its gonna loop until the min between the two values in the min function
dunno didnt do much lua still
im still figuring out where the data comes from for what i need to do
so i usually loop over the hand and joker roster
hmmm
it would be funny if i finished this mod without actually learning lua
im going to do that
i wont learn any lua out of this, well i probably will because imma have to do http requests but like still might not undersand any of it
go get the error lense plugin
its gonna be much easier for you to spot all the errors
yes sir
i can show you what it looks like
yeah but inline instead of like hidden
so i can know whats going on if you share another screenshot
i added an extra = sign
im not sure why i needed to??
i feel like 1 shouldve worked
i think in this you were missing a comma at the end of the fiorst line
parens arounf the expression?
because = doesnt return anything and == return true or false
im so painfully close to reading the card's description, ive managed to read the card's name with "name_text" as the type, but i cant figure out what the description type is
you cant do assignation in the return i think, if you do the assignation line before the start of youre return does it complain?
yeah it crashed
idk if it can do raw descs
put it right above the return?
yellow is fine
what does it even mean
dunno dont mean anything to me
trying to find any way to access a card's description
i still need to figure out how to get the updated state of a card after using a consumable
im new to lua so im learning that simultaniously
oh no
anyone know the best way i can start making a translation mod to add another language to the game?
(moved this here because it's related to mod dev)
G.localization.descriptions.Joker.j_joker.text
How does the rate work for items to appear ina shop, like am I putting in a percentage, like .5? or is it needing a whole number, how does it scale this?
theres no built in way to track how many wild cards you have in deck
time to make a custom tally
what does this mean magic woman?
ooh ooh speaking of
peering through the code
found something
i think this is what sets stone and steel tally
thanks, this would be much easier lol
item's weight / total weight is the probability of drawing afaik
so its rolling to see what type to sell first, then rolls again to determine out of that type, which one to sell?
i suppose
yea
apparently when doing this, wild_tally returns as a nil value
and what about consumables
i assume that its because m_wild isnt a thinggg
actually does anything actually require its own lua file?
localization does if you use the handy smods localization loading
💀
is there a function to add a consumable card manuall, similar to add_joker()?
use SMODS.has_enhancement
i got it working! (ignore the temp art, or dont lol)
this is what i did
local card = create_card('Alphabet',G.consumeables, nil, nil, nil, nil, "c_akyrs_"..k)
oh i see !
where would this be like
more in depth?
is it on the github
this is def rare, also dagger gaming :P
key = "ancients",
primary_colour = G.C.RED,
secondary_colour = G.C.BLACK,
name = "Ancient Gifts",
}
SMODS.Consumable{
key = "ancient_clarity",
set = "ancients",
atlas = "leapfrog",
pos = {x = 0, y = 0},
loc_text = {
name = "Ancient Clarity",
text = {
"Disables boss Blind for 1 turn",
}
},
use = function(self, card, area)
G.GAME.blind.name:disable()
end
}``` any idea why the game says the set name is "error" but the card displays properly with artwork, title and desxriptions are not there...
think I spotted it, name needs to be inside of loc_text... lol
we both referenced the same thing today
correction, did not fix it
something must have been off with the formatting, copied it from another working one and tis working now:
missing a comma line 11
you can detect such errors from the first line of crash itself
i think you mean WE referenced it. #1329607872891457566
wish i knew about this game earlier everyone has already done half of the ideas
LOL
if i find out theres a goth joker im going back to enter the gungeon
PEAK??
there will be more
oh u cooking
these look sick
its dark
and he's bleeding
did i do it wrong? this pixel is x 70 y 94
hex code for balatro black?
joker atlas is 71x95 i believe
69x93 for the actual card texture, with a 1px transparent border. So 71x95 total
Huge
these are the first three jokers ive made, still a wip (the novelist was a friend's idea)
open to feedback too :)
FIRSST
Shakespeare
Peak
Lol k9
So I have an idea for a mostly chess themed mod for Balatro, a bunch of jokers neat mechanics and a few tarot cards along with some other stuff. I just need help with the coding part of stuff, i can do the art for the jokers and come up with ideas i just am not very good at coding.
If your interest dm me and ill send all I got at the moment
If you have ideas for jokers i can also add those in the mod (tho its balanced around vanilla keep that in mind.)
What mod even is this
Neat
trying to remove a consumable card with the return message, it plays the message, but does not destroy the card... elseif context.before and card.ability.extra.remaining == 1 then card.ability.extra.remaining = card.ability.extra.remaining - 1 return{ dollars = 1, focus = card, card = card, removed = card, destroy_card = card, message = "Depleted!", remove = true, }
this is beautiful artwork
Consumable destruction works differently, remove only works on playing card (iirc?), you should look into start_dissolve
yeah, that gets tricky, becasue doing it that way, I cant send a message with it, as sending the message needs to be done at the end of the function, so I wouldnt be able to send the message
You could use card_eval_status_text for that
If it appears too early maybe put it in a G.E_MANAGER event
Does the card self-destructs or it's a joker destroying it?
start dissolve and add remove card context?
its going to self destruct, basically it gives one gold per hand played for the next x hands played
then when it hits 0 remaining hands, it self destructs
Damn you're lucky I'm working on something exactly the same

