#💻・modding-dev
1 messages · Page 326 of 1
K
that sisi monster i hate:
Still doesn't do anything
so is there some calculate that runs after the final score of the hand is calculated
What do I do?
what is it with murder drone pfps needing constant hand holding
oh nrvm,
i figured you were doing it for longer than that
also what other murder drone pfps needed constant hand holding
learning lua first is lame
but programming knowledge is appreciated
who needs to learn lua when
yeah, lua was easy to learn since i made a lot of stuff with python
?
discord user F
i did the think without taking ownership, i just hooked the loading function and it works perfectly
:>
Something I recently discovered that is super helpful is opening the whole Mods folder in vscode instead of just your mod. Then vscode will recognize SMODS stuff and global function names and you can Ctrl+click on them to see how they work
And searching a function name will bring stuff up from the lovely folder so you can see the source code
wait thats huge, i need to do that
i do this but for some reason some stuff isnt recognized
Yeah massive life hack
Like what?
G.playing_cards
Huh, that's odd. Yeah idk much but opening the mods folder as my workspace did the trick for me
yeah works with other stuff tho
I do notice that sometimes because of how Lua is, some fields on some tables won't get recognized
the thing is very wacky, sometimes it doesnt play the animation, sometimes it doesnt convert or destroy any cards, am i using wrong contexts?
For testing purposes why don't you force one the if statement to always be true or always be false
And focus on each part separately
what context are you targeting
also yes this
ill do that now
im not actually sure how to do that, i havent used vsc for that long
when a single card is played
(on the first hand of the round, i set the requirement here to >0 to test it without resetting over and over)
This isn’t set out how I would imagine any joker would be set out
this is the second time I've had to make something manually calculate the score to do it's effect
uhh
if I had a nickel etc
oh wait nevermind
i think you need to use a different context than context.cardarea == G.play but im not sure what
No
As I said, everything is calculated first
Actually, there is one
Plasma Deck
But SMODS doesn't make it available to everything
it only makes it available to Backs
current_round.current_hand.chips is a thing?
Technically it still runs at calculation time, but it can access the current chips
I haven't seen that in the dumps
Same
and I don't think it's documented
But chips and mult are global anyway
isn't it just hand_chips
It is
I tried using it but it was wrong
It would use the previous hand's chips
context.joker_main?
I was trying it yesterday
what is your joker supposed to do
Though I don't have that code because I didn't commit something that didn't work
hand_chips and mult are definitely the ones you should use
hm
No G.GAME
i doubt this will work but try context.cardarea == G.jokers and context.before, it's the context that DNA uses
instead of context.cardarea == G.play
where is the original image of roffle
and instead of using context.other_card use context.full_hand[1]?
yeah that seems to work perfectly - except destroying the card
destroying a card is handled in a different context
ahh hmm
im aware, tried to reorder all the contexts but i still dont know how i can do it without any problems
to trigger the randomization i first need another context
i figured but
which defeats the purpose
Let me type it up for you, hold on
That works but as I expected it makes my Blind too strong lol
By the way, is there a context for after scoring regardless of whether you drew cards or not?
Sometimes you don't draw cards but I'd like to execute some (Blind) code at that time
if context.before and G.GAME.current_round.hands_played == 0 and #context.full_hand == 1 then
— set ability here
end
if context.destroying_card and G. GAME.current_round.hands_played == 0 and #context.full_hand == 1 then
— do check, return { remove = true }
end
what’s wrong with context.after?
That's before scoring still, no?
but how will the randomization work? are the "do check"s the check for odds?
The check for your 1 in 4 yeah
I thought it was before, main, after, final, then draw
Oh, but not after discarding, right?
Correct
I need a context after playing or discarding
Just check for either
But you might not draw after discarding
So I'm back at my original problem
everything is perfect now, thank you
What effect are you trying to do?
why can’t if context.after or context.pre_discard then work?
pre_discard is before discard, right?
Yes but it’s the only one time discard context iirc
It needs to happen after discard to be consistent
There should be something that triggers fear
After
I don’t remember right now though
I'm printing this and putthing it on my wall
Drawing cards triggers after, just not all the time (if you don't draw cards)
its fear, fear breeds more fear
how does the jiggle effect on dna and invis joker work?
juice_until
terror ensues
panic begotten
chads photo'd
mets well'd
so I have this saving Joker like Mr Bones, but I've encountered the issue that after Ante 8, it appears to stop saving you
why are there so many roffles?
How does one make a blueprint for booster packs?
what does that mean
Bruh you cannot keep asking "how does one make a blueprint for _____" when no one has done it and expect an answer
You are braving a new frontier
is your mod on github
I'm gonna explode
Mine or theirs
Classic
Sounds interesting but the condition feels a little convoluted
like the way its worded?
It just feels like a lot of independent steps and checks
The mechanic itself, not the wording
fair
It feels like you want a risk to break stone cards without giving any reward, but is that necessary?
Stone cards are not exactly trivial to get in the first place
yours
So the player is already investing some amount of resources into having stone cards in their deck, and now they're losing that stone card
Yes but I forgot to push last night so if you're looking for the frog code it's gonna be half finished
stone cards in trade for permanent econ, but it takes a lot of stone cards unless you have luck
first part should be "Played Stone cards have a 1 in 5 chance to break" -- cutting words to the point that the description doesn't scan well makes it take longer to read
I couldn't find the GitHub so even that would help as a reference later
this was close to the original text i had
i feel like having to play 20 stone cards on average to get the effect of a third of a mime is... pretty bad
thanks
it's hard to balance but i'd try removing the 1 in 4 -- this would also make it easier to write the description clearly
"played Stone cards have a 1 in 5 chance to break and permanently increase Gold card payout by $1" or something
that would be way too powerful then
i wasnt set on the numbers yet tho
"break" is also inconsistent with glass card description
good catch
Yeah, this isn't an ability that the player is going to completely run away with. You need to be investing resources into having both stone cards and gold cards, and you are permanently losing those stone cards
a mime gives you $3 extra per gold card without having to mess around with any stone cards
I would say make it a single chance, and balance around that
but this would be permanent, meaning after getting rid of the joker the buff sticks
glass joker is hard to scale even though you can also scale it using hanged man etc
usually i cant get glass joker past like x2.5
If the stone card breaks, guaranteed upgrade, but only a 1 in whatever chance
That's fine, I still think this ability is very weak in its current state
But if you don't agree, implement it as written and playtest
Technically none of us know how strong this will be until we see it in action
im also trying to balance it with the rest of my mod, there is another joker that does the same thing but for steel mult instead of gold card payout, and a joker that increases all odds by 1 when held,
i made a spreadsheet actually lol, because i wanted to keep the general game balance throughout my mod
i havent gotten to the playtesting section yet, but im only a few jokers away from feeling like the pack is ready to test out in its entirety, thats when ill tweak the numbers of everything.
the general idea of the mod is to increase the usage of some of the lower tier vanilla jokers by adding jokers with synergies. This one and the steel one were for the marble joker, since i never take it
Valid, then don't worry about balance right now
Yeah that's cool, I get why you'd want to have an ability like this, just a matter of tuning
absolutly. Perma scaling is a very tricky thing to balance, but this idea is what originally got me into making balatro mods lol, i just have to add it
its also why ive spend 3 days figuring out how to get it to work
I spent over a week on a single joker lol, it be like that
Are all stake stickers past orange forced to be shiny? I've added a new stake above gold, and despite having shiny = false in the call to SMODS.Stake, the sticker still shines
how exactly do you get set_card_type_badges working?
you should take a look at steammodded API on how to set up ur first mod
that page doesent really answer my question
like i copy and pasted and example mod just so i can see if balatro detects it
it didnt at first
but then i added the steammodded header and now it just crashes
so thats what i dont understand
Did you install Lovely too?
version.dll?
Your calculate function doesn't take any parameters
bro omg
u are goddam right wth
why did i do that
how is ur header looking like?
--- STEAMODDED HEADER
--- MOD_NAME: Edition Examples
--- MOD_ID: EditionExamples
--- PREFIX: edex
--- MOD_AUTHOR: [Eremel_, stupxd]
--- MOD_DESCRIPTION: Adds editions that demonstrate Edition API.
--- BADGE_COLOUR: 3FC7EB
--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-0905a]
is it the steammodded version fault?
i didnt put steammodded as a dependency honetly
honestly
this is mine and works really well
but mine is just a bunch of random jokers i do for fun
what i think it is that you dont have an atlas ready in ur mod folder?
and it tries to collect the files but the files dont exist so it gives u an error
so what do i do?
this is my mod folder for example
this is the asset folder
inside folder 1x i have the art for my jokers
and on 2x i also have them
you have to set up ur atlas
i have that folder
do u have an atlas ready?
??
what does joker art have anything to do with the game crashing and not detecting the mod?
the error of ur game crash
says
"failed to collect data for ATLAS edex_edition_example"
so the problem is in your atlas
i would assume its on the formatting of files and stuff
cuz if its giving an error its detecting the mod anyway
so what should i do?
if i was you i would check this link:https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua that gives an example mod
Steamodded example mods. Contribute to Steamodded/examples development by creating an account on GitHub.
and make sure the mod set up on the folder is correct
because im pretty sure its a formatting issue
specially because ur header didnt specify what your main file was named
and its in your main that you set what ur atlas is
what do you mean by this?
you cant just make ur mod folder in anyway you want, you have to name things the right way
where is ur header file?
whars the variable that stores the current chips that a hand will score before its added to G.GAME.chips
i believe it's just called hand_chips
ah okay ty!!
how could i get my card to only show up when a certain criteria is met? for context i have a soul type spectral that i only want to show up if i have a legendary
use in_pool
in_pool = function(self, card)
return true -- if you want it to appear
end
What's the best way to create cards with nonstandard dimensions?
I have a card that's 169x123. So I just have to manually set its scale in set_sprites?
hi winter :D
Hello!!!!
would i have to include a return false?
how have you been!
Hmm decent?
decent is positive so this is delightful
return false if you don't want it to appear on the pool
for your example you can probably have in_pool loop through your current joker list and check if any of them have a legendary
No, SMODS provides a way to do it
for whatever reason setting pixel_size wasn't getting me what I wanted
it's either pixel or display
both exist
display seems to have worked for me
I am still kind of stuck on trying to make this joker, it's a combination of raised fist and strength, the highest scored card in your played hand ranks up
Wide......
pixel_size is for setting the bounds of the sprite without scaling it
photograph for example uses a pixel_size of 71x80 to center it
same with wide joker
hmm and for whatever reason it appears to be drawing the sprites of this twice?
The Joker on the left is fine, but there's something weird with the Tarot, Voucher, and Booster
That doesn't look like it's an issue with the size of the sprite
I already fixed the sprite size issue
what do I do?
does balatro store more than 2 decimal places internally and just displays the first 2 or does it cut off at 2 decimal places after each step
What is this to_big thing doing everywhere and why doesn’t it work
Hmm yeah I'm not sure why it appears to be drawing all the children twice. Bizarre
Dumb question mayhaps but can sounds be in subfolders
Like, can I have assets/sounds/english/sound.ogg
Oh, are they children of a sprite?
Yeah
Children are drawn automatically
Yes.
So if you draw them manually they're drawn twice
You need to tell SMODS to not draw specific keys
Huh, ok
I know, which is why I set them to custom_draw because I need them drawn in a specific order. Tables with named keys aren't treated as ordered for the purpose of drawing
It crashed on my end which is why I was surprised
Currently have a vanilla-ish legendary:
All 3s scored give X3 mult
what should i do instead, its a bit broken
But did you tell SMODS to omit the default draw?
This is what happens without the order
Wait, forget I said anything, I forgot the mod prefix 
And no, the code for drawing children will pass on this if one of these is true
what do you mean
if you set a child to custom_draw = true, this code won't run
this code causes a stack overflow when the mythic joker attempts to spawn in (it even lags my entire computer)
it would be nice to know why
SMODS.Tag {
key = "mythic_tag",
atlas = "crp_tags",
pos = { x = 7, y = 0 },
min_ante = 5,
config = { type = "store_joker_create" },
apply = function(self, tag, context)
if context.type == "store_joker_create" then
local rares_in_posession = { 0 }
for k, v in ipairs(G.jokers.cards) do
if v.config.center.rarity == "crp_mythic" and not rares_in_posession[v.config.center.key] then
rares_in_posession[1] = rares_in_posession[1] + 1
rares_in_posession[v.config.center.key] = true
end
end
local card
if #G.P_JOKER_RARITY_POOLS.crp_mythic > rares_in_posession[1] then
card = create_card("Joker", context.area, nil, "crp_mythic", nil, nil, nil, "cry_eta")
create_shop_card_ui(card, "Joker", context.area)
card.states.visible = false
tag:yep("+", G.C.RARITY.crp_mythic, function()
card:start_materialize()
card.misprint_cost_fac = 2
card:set_cost()
return true
end)
else
tag:nope()
end
tag.triggered = true
return card
end
end,
}
I mean, clearly it's drawing them twice. Have you tried setting the keys to be ignored?
I could, sure
Can someone please help me with this?
No change
Gonna try to draw them all relative to the center
They all became small. Strange
does anyone know where i can find the create_card syntax?
the wiki
which part of the wiki?
utility
Idk what to do
it doesnt allow for playign cards?
Okay so I added a manual frame draw flag and it fixes it, implying that this draw function is definitely being called twice
I am...... confused, at the very least
i am NOT good at all but shouldnt you add context.cardarea == G.play in there somewhere?
what does it do currently?
Maybe it's a bug
I'll enable it in the collection to see if it's something specific to do with the challenge screen
Nothing at the moment, what it's meant to do is in the message you replied to
whoops
well, its not checking which cards are played
again i started coding little ago but it should check for the highest PLAYED card right?
It's checking for the lowest scored card
Did you add print statements to see which code is getting called and which isn't
Okay it's not specific to where it's drawn
I don't even know where I should put them
Ok so just to clarify, you want the highest ranked card held in hand to give mult equal to rank and then raise its rank?
I want the lowest scored card to gain a rank after a hand is scored
Before the if statement, after the if statement, inside the event
Wherever you're not sure code is getting run
Because either the function to rank up isn't getting run, or it's getting run but doesn't work
So lowest scored played card gets a rank up and nothing else? Okok
You want specifically scored card? Right now it looks like it's doing the raised fist thing of lowest in hand
We can address that after though
So what do I do?
Where does the print even show up in-game?
If you have the DebugPlus mod it will show up in the game, otherwise it will show up in the lovely terminal that pops up when you start the game
Well it always shows up in the terminal
But it will also appear in game with DebugPlus
I need to start using print debugging, probably would make figuring out stuff on my own faster
It's a great strat
Has anyone tried using the vscode debugger?
I wonder if that works
That would be nice
why isnt my joker showing up in the collection?
also the mod isnt showing up in the mods list
So that's the root issue
just looked it up, what do i do with the json file?
i havent made it
You just make the json file (separate from your main.lua) and fill out the template from the wiki
alr, is this formatted right { "id": "JoLanMod", "name": "JoLan Mod", "author": ["JoLan"], "description": "My mod, just playing around and figuring out code.", "prefix": "jln", "main_file": "main.lua", "badge_colour": "c7638f", "dependencies": [ "Steamodded (>=1.0.0~BETA-0416b)" ], "version": "1.0.1o-FULL" }
its not working
Hm
Is your steamodded version older than that version?
Maybe just use the default for now and see if it works
I'm on mobile rn so I can't look at how I set my project up, sorry
But you have other mods installed and they show up?
Like your mods folder is usually detected properly?
yes, but i disabled them all bc i didn’t want them to interfere
yes
It looks like you're missing the priority field
Not sure if that would prevent it from being detected
what’s that?
I would try matching the wiki exactly
{
"id": "",
"name": "",
"display_name": "",
"author": [""],
"description": "",
"prefix": "",
"main_file": "",
"priority": 0,
"badge_colour": "",
"badge_text_colour": "",
"version": "",
"dependencies": [],
}
this code causes a stack overflow when the mythic joker attempts to spawn in (it even lags my entire computer)
it would be nice to know why
SMODS.Tag {
key = "mythic_tag",
atlas = "crp_tags",
pos = { x = 7, y = 0 },
min_ante = 5,
config = { type = "store_joker_create" },
apply = function(self, tag, context)
if context.type == "store_joker_create" then
local rares_in_posession = { 0 }
for k, v in ipairs(G.jokers.cards) do
if v.config.center.rarity == "crp_mythic" and not rares_in_posession[v.config.center.key] then
rares_in_posession[1] = rares_in_posession[1] + 1
rares_in_posession[v.config.center.key] = true
end
end
local card
if #G.P_JOKER_RARITY_POOLS.crp_mythic > rares_in_posession[1] then
card = create_card("Joker", context.area, nil, "crp_mythic", nil, nil, nil, "cry_eta")
create_shop_card_ui(card, "Joker", context.area)
card.states.visible = false
tag:yep("+", G.C.RARITY.crp_mythic, function()
card:start_materialize()
card.misprint_cost_fac = 2
card:set_cost()
return true
end)
else
tag:nope()
end
tag.triggered = true
return card
end
end,
}
"id": "JoLanMod",
"name": "JoLan Mod",
"display_name": "JoLan's Mod",
"author": ["JoLan"],
"description": "A mod where I tinker around and try to figure out what I'm doing.",
"prefix": "jln",
"main_file": "main.lua",
"priority": 0,
"badge_colour": "FFFFFF",
"badge_text_colour": "000000",
"version": "1.0.0",
"dependencies": ["Steamodded (>=1.0.0~BETA-0416b)"]
}``` still not working
Try leaving dependencies as the default from the wiki or even blank
Hey gang how would I copy multiple jokers at the same time
copy as in duplicate or copy as in blueprint
Copy as in blueprint
Is it because you're calling tag:yep inside of the tag's apply function?
This (also should this be rare or uncommon)
still not working
I honestly don't know, maybe your folder structure is incorrect?
Here's mine
im a magician (i changed absolutely nothing)
Was it the file name
maybe try to change the version to something normal like 1.0.2?
i think it was bc i never did ctrl+s lmao
oh lol
That's crazy
its just so peak
I think there's an SMODS helper method but I don't think it's documented
tysm for the help
I would suggest opening the mods folder in vscode and searching for blueprint
Welcome to the modder club 😎
use the SMODS blueprint effect helper function and merge the outputs
then return it
What is it now?
You use self.ability instead of card.ability
It should always be card.ability in the calculate function
Now nothing happens when I score it again
You don't need line 112 at all
That's a vanilla way of checking which ability to use
I deleted the line and this crash happened
if i want to make another joker, do i just attach it after the code ive already done?
You make a second Smods joker
Did you also delete the corresponding end?
Which one is it?
how do i do the atlas thingy, it seems complicated
How much coding experience do you have? Like not just Lua but in general
me?
Atlas is just a big picture with all your joker sprites, each joker picks a position on the image
how do i make one
Yeah, it seems like you're getting hung up on the basics of Lua, which is gonna make things extremely difficult for you
I mainly use clickteam, which is event based and not text based
I only started Lua 2 days ago
gulp (i have the exact same issue)
i would say consult the lua manual but the lua manual kinda poopoo
Also
Any of them, they're all the same
wdym by merge?
Lines 128-131
anyone knows how to put in a custom sound? it pops up with this
how can you find the chip value of any given card?
ik you can just select the position, but how do you put the joker sprites on those positions, do you just make something thats like 142 x 190 and put 4 jokers in there and then just say (0,0) (0,1) (1,0) and (1,1)? (also idk where those points correlate to, is it just a normal coordinate grid)
0,0 would refer to the topmost leftmosr joker in an atlas
also yes it's just normal coordinates
think of each number in coordinates as being multiplied by the pixel size you set for the atlas
then the game uses that as the offset for rendering
I tried deleting all the ends one at a time, whenever I deleted one at least three errors appeared
the picel size is just the size of each joker, right?
in pixels yeah
a standard joker is 71x95
all cards in balala are 71x95 actually, though some cards like consumables and vouchers simply don't use some of the extra space
This error actually seems like you have an opening curly brace that doesn't have a matching close
Well, you can only have one return
yeah my sprite doesnt quite take up the full 71x95 but its still 71x95, just with some inivisble space
Although you might not need to merge them
But you need to handle multiple outputs
Maybe you'll want to make use of an extra subtable
should i name my 1x and 2x sprite sheets different things?
no
No, and I would suggest referencing the example jokers while you're still starting with the basics
https://github.com/Steamodded/examples/tree/master/Mods/ExampleJokersMod/assets
The examples are limited but a great starting point
Where do I put it
is it possible to play your game on a browser :?
Idk I can't see the line the error is referencing
But it says the opening curly brace is on line 84
Yes but maybe not on Mac?
Windows
I can select a tank but nothing happens then
how do I connect a second player
key = "boss_rush",
loc_txt = {
name = "Fusion Fiasco",
text = {"Combine the abilities of three random boss blinds."}
},
atlas = "Blinds",
pos = {y = 0 },
frames = 1,
what am i doing wrong here??
I don't have right control
frames goes in the atlas.
oh
May need an external controller. I haven't gotten around to adding key rebinding
I guess I won't play then 🤔
why does it look like this
Pos only has a y value and no x?
Here it is
for animations, yes
Interesting, I'm unfamiliar with animations
What is wrong?
I'm like 98% sure it's something to do with the ends not matching up. Every if, for, and function should have its own end. Any extra ends will make Lua freak out
how did you define your atlas
SMODS.Atlas{
key = "Blinds",
path = "Blinds.png",
px = 64,
py = 64
}
maybe put both x and y in the pos
i tried that already
It no longer crashes
however, it now says nil 5 times when I score a hand
Can you send a new screenshot of your calculate function with the print statements you added?
guys why does this not trigger on jokers that don't use joker_main
I think I forgot the quotes
pretty sure blind chips are like this
YIPPIE
why is it 64x64
???
but why is the 1x 64x64
K so your loop is running, that's good. Inside that loop you need that code from before where it finds the lowest card and stores it in raised_card
thats what i found on the wiki page??
?
please im so confused
like does SMODS.blueprint_effect only use joker_main????
i realized that 64x64 was supposed to be the 2x size
Do you need to return the blueprint_effect call
34x34 with 1px margin on all sides so 32x32
i believe this margin is important
also your mod is very funni i played it :)
this doesn't fix it
Like it's ONLY on jokers that use joker_main for some reason
It works just fine on those
But it does nothing for stuff like photograph or dna
bleehhhhh hii :3
yoyo!!!
This doesn't work either even tho i literally just copied the code from blueprint
Same problem too
note that the pseudorandom calculation here will always take effect for every calculate context
could be a coincidence that they don't work because of that
How would I go about fixing that then?
that's the problem i don't think you can lmao
calculate whether to trigger or not in context.before and then store it and use that stored value for the rest of the contexts
you can do that yeah
Actually hold on lemme just remove the pseudorandom in there and see if it works properly without it just to make sure that's the issue
I had an idea for my mod, I decided that I want to absolutely scare the player shitless so I’m going to make a blind blind where you cannot see the required score and it can be anywhere between x0.5 to x1.5

better yet, the player must score a hand within a specific hidden range and all they get is an ominous "too high" or "too low"
point and click backrooms in my balatro
I'm sorry?
Real, find jimbos 7 pages or whatever
i already have a game mode where you have to score within ±2%
Silly alert
you should play aikoyori's shenanigans

math is real, I'm a cs teacher 😔
ok now that i think about it how would a chess deck actually work
how would you select which pieces to move
With the mouse :3
and where to move them
Also with the mouse :3
I think that's just chess
temp_ID = G.hand.cards[i].base.id; raised_card = G.hand.cards[i]
This?
yep
the problem is that it would be fucking boring
Real
Oh it’s gonna be a nightmare to code it actually just makes the background run sm64 through an emulator core and you get mult equal to how many stars you have on the save
Among other milestones with unique abilities like vanish cap, metal cap, etc
this was not this issue
What the fuck's wrong with you? /pos
This is how it decides what joker to copy
A lot!!! :3
magnificent
I just want to be like heck you play a different game now
Throws Mario at you
SM64 is bold too because oh how inefficient N64 emulation still is
didn't someone already mod doom into the collection tab
Wait did they? That’s so funny oml
and this works for only context.joker_main?
-# but can it run doom
is there any more elegant and vanilla-y way to phrase/format this?
really wish there was a quartered/halved equivalent for 5
Use lowercase x :3
Wait maybe? Am I stupid
Yeah
I'm not sure what it does. It seems to imply it changes the hand's base values no matter where it is in the order
Is that what it does?
Still does nothing except say test
Although it says test less in the debugger now
yeah it affects base mult like the flint
Def don’t say base, jimbo just says ‘+4 mult’ no need to overcomplicate it :3
you need to store other_joker in ability.extra if you plan to access it across multiple contexts
how difficult is it to make a mod that just changes how the card look?
Tbh that's pretty much how it'd be written then
Oh is base a different thing?
But it doesn't work like jimbo
Lol you good. I'm just a silly raccoon
So just like move other_joker to extra and use that?
I’m literally a silly bee shark ong :3
Let me get the screenshot rq
Raised Fist Strength Joker
Ah yes... threads in text channels, delicious (I think I'm gonna throw up)
:p
I'm just making fun of discord, not y'all
I could use '/' instead of '÷' but it still looks weird to me to have it like that, but otherwise it just looks odd saying anything else as well
the flow of chat was making it difficult to follow
might have it be /4 instead just so I can have it say tripled and quartered respectively
Fair tbh
I mean... fifthed is a word
Maybe you could reuse the phrasing of The Flint?
Something like Multiply base Mult by 3. Divide base Chips by 5
That night be better
flint is "Base Chips and Mult halved" tho isn't it
Also I'm not very confident in this usage making sense to people even if it technically englishes
Then Base Mult multiplied by 3. Base Chips divided by 5
this is why I was saying this, just so it is like the flint
You could also have a At the very beginning of scoring
It may be less correct, but more understandable
honestly wording the jokers is the most annoying part of creating jokers istg
I’m having an issue when creating consumables with a joker and putting it into my consumables area, I keep getting the error ‘’’ functions/common_events.lua:2312: attempt to index local ‘center’ (a nil value)’’’
can we see your code
Sorry for bad image quality, it’s on my school provided computer
Keys can't have spaces.
Oooooh, that’s why! Thank you!
Also you should be checking context.main_eval not context.cardarea
Gotcha
Wait I am still getting the same error
I swapped the spaces for underscores (in both the consumable script and the script I sent) and swapped cardarea to main_eval
Try replacing everything in the if with SMODS.add_card({set = 'Tarot', area = G.consumeables})
i was editting the wrong file
in reality it took literally just deleting one line
My enhancement is making the game crashes when it score. So I guess the problem is coming from my calculate fonction but ehm.. Can't find the problem :c could someone help me please ?
edit : the idea of my enhancement is to scale flat mult based on how many void card there is in full deck (kinda like steel joker)
I'm making a planet card for a Blackjack hand (3 or more numbered cards summing to 21) and I'm not sure if this is readable (the hand graphic at the bottom)
Didn't think the image would be this small...
Sorry if I am being annoying but what do I do if my consumable is invisible in the collection and gameplay
wdym by invisible ? no texture ? or like doesn't exist at all ?
(and no you're not annoying, this channel is here for that !)
I can hover over it in the collection menu and it will show the description. It also shows particles there
What does your atlas look like?
2nd one
I'm not sure, but why self.ability?
Because that's what seems to trigger the crash
maybe you should do more something like XYZ = 21, but that would make the thing not symetric
always card.ability in calculate
No, I meant what does the file look like?
Yeah, tried that, it did NOT look right
maybe you should do 0 2 1 ?
instead of X Y Z ?
how do i use detailed_tooltip for ui
im PRETTY sure i asked this in here before, but i couldn't get it working
There is both the file open in ms paint and the code for the consumable
don't crash anymore ! :D (the effect of the enhancement isn't working lmao but at least that's not crashing)
does anyone know why ability is nil here
I would say have it be 3 cards numbered by dots like it is on saturn that add to 21, or something to that effect
The variable order for loc_vars should be self, info_queue, center
or if you'd like, you can change center to be card
never really knew the order mattered, thanks!
card is more accurate anyway since it represents an actual card instance
center is usually used to refer to the general definition that all instances take on as a base
which is what self is here
thank you for letting me know
I had this one (with 4, 7 and 10) but it's very hard to read a number >6 with dots
Hmm I see
maybe 6, 6 and 9 (3x3 square)
Has anybody else had issues with changing the chip / mult scoring background colors and completely breaking the effect alongside Plasma Deck?
Whenever I ease the scoring background colors it breaks the Plasma Deck coloring and then it doesn't change color again until the game is restarted
5+5+5+4? having it be 3 would be nice for clarity hmm
also would be nice if there was a way to indicate numbered cards, assuming that means no faces or aces
need help making this work
calculate_reroll_cost is a function, you need to hook it.
how do i hook it 😭
You should change from a calculate to an add_to_deck and a remove_from_deck
Just different functions
First image is the issue, second is my code on the consumable end, 3rd is atlas code(second one down), fourth is the atlas image open in ms paint. Plz help
😭😭😭
Assuming you set it up right, when you add it to the deck it'll change the value right then and there as opposed to you waiting for the card to calculate. Same with a remove
would this be too dark for a card border
do you make the the in mspaint
(card edge)
k
how do i change the reroll cost back / make it normal
I admit that I completely abandoned the idea of showing the No Face cards rules on the planet
But Aces do work (and quite well) as either 1 or 11
Take a look at how the reroll vouchers do it
Is your 2x file the same but double scaled?
Yep
its x5 and 1/2
still on the same code, no crash now, but I guess my function don't detect my Void Card (custom enhancement), what's the typical syntax to check if a card is from a certain enhancement ?
Here are 2 suggestions
And honestly, I really like the 021, it's really clear!
Thanks!
Use SMODS.has_enhancement(v, 'm_prefix_key').
I prefer the first one too yes !
yeah, making card art seems tough. there's probably always going to be compromises with art this small
will try that thanks !
people be adding any celestial objects as planet cards now
'm_prefix_key' is the key of the enhancement ?
Trance used to have this same issue with this. Their solution involved patches for the plasma deck specifically: https://github.com/SpectralPack/Trance/blob/main/lovely.toml
All the (local) planets were taken, okay‽
m_yourmodprefix_keyofyourenhancement
is there a sun card in vanilla game ? 🤔
it's ok this is one of mine
thanks !
Would copy-pasting it from there just work?
feel like im missing a lot of somethings
Oh, constellations are a cool idea ... wait, how many cards are in that hand?????
You need a comma after the first line of the return, it's a table
add_to_deck doesn't do contexts and returns
Take a look at the documentation for it on the Joker page
12+
Also, that's not how return tables work
You return values, you don't set values, so you don't return those, you just put them into the function
here's a simpler card
Also, you don't call a context within add_to_deck, that would be in calculate
but calculate doesnt work because this is a constant
There's a lot of problems here
if you're happy with this then fair fair, maybe put 2 aces on it? smth like ace ace 9. I'll be honest tho this isn't hugely important, I hadn't even comprehended that those small cards were on planets lmfao
What do you mean it's a constant?
lua is fine, but steamodded is genuinely unreadable for me
the reroll cost is... always 7 dollars
until the joker is sold
admittedly they do get a bit crazy
Okay, so you'd do that in update, not add_to_deck
Also the joker_main context only triggers when you're actively in a round after playing cards
full disclosure, i have borderline no idea how steamodded works and am learning through this because the documentation is confusing
It's the specific event where jokers like, give mult or chips
i need to add rhythm game to balatro
Long story short, wrong function, it should be update, wrong context, it shouldn't have one, and wrong execution, it shouldn't be in a return
Why update tho?
Try putting this somewhere in your code but outside of all things:
local oldcalculatererollcost = calculate_reroll_cost
function calculate_reroll_cost(skip_increment)
if #SMODS.find_card('j_modprefix_key') > 0 then
G.GAME.current_round.reroll_cost = 7
return
end
return oldcalculate_reroll_cost(skip_increment)
end
That would also work well
astra
would i call this to make it 7 or something
how do i add stepmania to balatro
aiko.
This doesn’t make sense! What is going on???
No, it gets called automatically every time the game try's to get the reroll cost.
replace the prefix key with the joker name?
hi aikoyori
You replace prefix with your mod prefix and key with speakerbox
we should add taiko to balatro
With the patch from that now it just breaks after the Plasma Deck effect
like that?
Ok good
Oh please use a metadata json instead of a header
I think the ----MOD CODE------ at the top concerned them
I'm using a header ;~;
You too 
why?
It's outdated and is likely to get phased out at some point. It's also just faster with json
well i need like a template or something
Got that shit on LOCK
guys why does this not print a message
card.ability.extra.activated is always getting set too late and causing the return to not go off at the right time
Is it like a context.after thing?
No, it's because everything is being done in that event manager
Functions are triggered after non-functions every time
So it's checking for the variable before it's set
I see
I'd take everything out of the function except stuff inside the if played_card.set_ability then condition, so that everything is still timed properly
Bump
Also, does card:is_suit() check for cards marked as no_suit and card:get_id() for no_rank for modded enhanced cards?
ok uhh not sure where to place this since It might be a mod issue, I was just doing some playtesting, and for some reason I think every card to the right of blueprint is counted as a blueprint copy? midas mask wasn't working, castle wasn't working until I move it to the left of blueprint
Yes.
I have not messed with any blueprint code at all so idk what would cause this?
Does anyone know if there is a way to tell my LSP about the Smods types?
Could really help to have autocomplete + typings
display doesn't work, can't figure out why because the functionality is working
xmult not Xmult
i think both works
it works
that wont fix the joker not updating
wdym not updating
the display is frozen at X1
the first X1 is unchanging
And it won't gain any xmult unless you add to the card.ability.extra.Xmult variable
and the currently to #2#
Should just be a matter of including the SMODS folder in your workspace. Can also do the same for Balatro source
it can change...
the amount... the joker... gains?
ok fine oil lamp
Cryptid has a misprint deck what changes shit
I'm going to point specifically to what the problem is
Okay, thanks!
that is linked to that segment
Xmult is set to 1, your joker is fetching the first value in the loc_vars table, and Xmult never changes
the array index starts at 1 in lua btw
xmult changes here???
That's a return table
If you don't want it to trawl through all the SMODS code, you can just specifically include the lsp_def folder, but having it all accessible in the same workspace is nicer imo
That's giving you xmult, not setting it
The return table is purely for giving you chips, mult, xmult, money, and showing messages / playing sound,s it is not for setting values, it literally will not set the value
STAR
I will hop into a call with you to explain to you exactly what your problem is
Because you're not listening
you have it at 1
???
This isn't the problem
That would fix the problem on a surface level
AWJKBDJAKSDAKJWDBAW
But it wouldn't teach Star how to actually use it
loc vars has 2 variables
the hardest part about teaching someone how to code is teaching someone how to code
loc vars returns a table of 2 variables
ive been coding for like 12 years
Your card.ability.extra.xmult variable is set to 1, and you're not setting card.ability.extra.xmult, the return table is for actually applying stats, not for setting variables, so you're not setting the card.ability.extra.xmult to #G.jokers.cards, you're giving the xmult stat equal to #G.jokers.cards, that's what the return table does, and #1# didn't work because the card.ability.extra.xmult variable isn't being set, so it just remains at 1
If you wanted to fix it, you would put card.ability.extra.xmult = #G.jokers.cards into the context.joker_main condition, and then put xmult = card.ability.extra.xmult into your return table, and then your #1# variable will actually reflect your xmult variable
If you want it to be scaling, it would be card.ability.extra.xmult = card.ability.extra.xmult + #G.jokers.cards
personally i don't think this make that much sense but i could be sleep deprived
What's the most effective way to search for only modded booster packs, without an SMODS.Boosters table?
it scales based on the amount of jokers and decreases when you have less, so the base value of G.jokers.cards is fine
i hyperfixated on the mustard stain
my bad
i wonder if SMODS.Boosters has what you want
there isn't an SMODS.Boosters table, as far as I can see
ah
Then the wording would be This joker gives X1 Mult not This joker gains X1 Mult
so abstract joker but Xmult?
I'm definitely sleep deprived
Gains implies scaling
It wouldn't be difficult to add one to SMODS, and put a PR for it, since it just means adding another pool declaration to the SMODS.Booster object
But I don't wanna do that
Also you have a space on both sides of {} so there'd be two space between "X1" and "Mult"
recent oopsie, fixed
why did you remove xmult from config
You replaced xmult with mult in your config
The {X:} tag strips whitespace, it should be fine
😭
Remove from one side not both
i did :)
Did you remove it from the start or the end?
end
Remove it from the start
there are more than one jokers in the slot right
well this is in the collection
Saturday
finally got my new glasses on
which is why that last part in loc variables exists at all
but its not saturday....
You're not referencing #2# anywhere so it won't appear regardless
saturday is the name of the main character in the rhythm game vivid stasis
a couple times
Ive heard alot about vivid.stasis alot
play it :)
i havent bothered to try it though
is free
how do i make it display 0 in the collection
that was the point of that second half so id rather do that then nothing
does the second half work by itself?
No, because you don't reference #2#
i think yeah if you refer to #2#
(if i delete the first half i mean)
i'm trying to make it so that instead of a single lua file, everything is split into multiple files, do the files have to be specific names or something? because they don't load ingame at all here
also you did 1 + to the loc vars
so it defaults to 1
because after + are 0 if you're not in game
You have to manually load them.
sorry for the brain aneurysm
i see
now whats going on here
is it just me or I've been seeing a lot of trans people in here lately not that it's bad just something i noticed again
Each round, play a microgame,
each successful win gains +5 Mult
after 4 losses, joker gets destroyed
(Currently +0 Mult)
(Lives Left: 4)

no stop
stop
stop
i love trans people
I HAVE TO
adofai or project:rusher plsss 🥺
?
do people actually like 4kvsrg
What's the current code 😭😭😭😭
i dont understand that slew of letters 😭
i think you multiplied the thing by itself
def unbiased here totally i swear
just remove the second parts after the * in vars
You're multiplying the xmult by itself.
Modders tends to be programmers, and (young) programmers tends to be trans (at an higher rate than the average)
I remember the survey for the Rust programming language showing something like 2 times the amount of queer people compared to the average
i NEED to make the warioware joker
in my coding class, i met 9 trans people out of the 14 students
i am non binary and reaching the trans pipeline is this a sign
and 2 of the non-trans students were gay lmao
definitely
vro my keyboard is so old 😭
i think its really embarassing that ive been coding for like 12 years and im still just as bad at writing my own damn code
my left shift key just like
hits everything on the bottom row if i hold it for too long
I'm just used to lua because I'm been making Garry's Mod addons for half a decade
i just started coding balatro a couple months ago, took a break because fuck lua, and im back ig





