#💻・modding-dev
1 messages · Page 184 of 1
okay
Scholar... Yeah that one isn't loaded. You're right. I chipped it up but it still won't load.
Anyone have any ideas?
Don't make the game angry by forgetting to add the 1x
How do I specifically call for the planets btw?
Just change it to Planet. Instead of joker or tarot
Your scholar image is too large.
I'm struggling to find the correct size. I would start over and use the template but don't move the frame
I'm not entirely sure that the game can add one joker but not the other. That part doesn't make sense. But deleting the scholar alters every other joker out of bounds
I think the description should be assigned to loc_txt.description, not loc_txt.text
It's handled by
SMODS.process_loc_text(G.localization.misc.achievement_descriptions, self.key, self.loc_txt, "description") in SMODS game_object.lua
any seal experts
my seal is triggering 5 times under if not context.repetition_only and context.cardarea == G.play then
how do I make it not do that
when the card is played
it gives chips and it's supposed to give xchips but i'm having trouble with that it just crashed on me
it wasn't giving anything before
and then i fixed it and now it's crashing instead
says attempt to perform arithmetic on hand_chips (a nil value)
so i'm guessing it's trying to trigger before the card is actually scored?
i followed the seals example mod and everything
How do you add something like maddness? Like each round you get a such and such mult added
also what did you guys do with the example mods
it's not in the directory it used to be
black doom's favorite!
you go through the ante 1 blind skips like fwshhhh
and then the madness comes in and it drops joker destruction like boom boom boom boom
but you eternal them
and then you go in the boss blind with the face cards and it's all like Debuffed Debuffed Debuffed Debuffed
oh my god it's so cool
my tired brain took way too long to recognize that this was from the jehtt video LMAOOO
How do you add a mult for when blind is selected ? and is there a way to have it run a python script when it activities?
Does anyone have a mac (perferably without xcode and brew [or other package managers]) who's willing to test smth for me?
why is card.ability.extra.money not incrementing?
I can't see any issues with unlock_condition, but if the achievement has already been earned, then unlock_condition won't be run. You could try resetting the earned state and trying again.
I've reset the profile I'm playing on multiple times with achievements enabled and nothing has changed :/
Hrm. Not sure where achievement states are stored. Try changing the achievement key to a different name just to check?
are mod prefixes limited to only 4 characters
nope, but that's standard practice
great well then i have no idea what's going on
how do I get a seal to show up in info_queue
Trying to make a consumable that gives a random spectral card, but having two issues:
- For whatever reason, the summoned Tarot card just. Does not operate. It doesn't get added to the inventory, it doesn't respond to anything, it just. Appears.
- Less concerning, but no less annoying, the check for if you have space is broken and doesn't account for if the space you need is the tarot card itself.
Not even standard practice just an arbitrary default
Your not actually doing anything with the card. You need to emplace it (or just use SMODS.add_card)
Yeah
for some reason the custom challenge i'm making seems to REALLY hate custom keys, whenever i try to use one in its definition there's an eventual crash with it complaining about "attempt to index local 'center'"
i've checked this channel and this seems to happen when the wrong key is used but i don't think i'm doing that
when else could that show up
(also less problematically the text for my custom rule doesn't show up even though i have it defined in a localization file)
use SMODS.add_card for your first problem
create_card just, creates it
add_card actually puts it into the respective area
How did you get your card?
i'm not modifying create_card in any way if that's what you're asking
i was but the way i was attempting it didn't work so i commented it out but that didn't fix anything
it's a challenge i'm not sure what you mean by i'm trying to get it from a card
Like can I see the code
code i have is this
SMODS.Challenge {
key = 'grg_chal_grunglest',
loc_txt = {
name = 'The Grunglest'
},
rules = {
custom = {
-- {id = 'ch_c_grg_grunglest'},
}
},
jokers = {},
consumeables = {
{id = 'c_grg_grungler'},
},
vouchers = {},
restrictions = {
banned_cards = {
{id = 'j_grg_ringoker'},
}
},
deck = {
type = 'Challenge Deck'
}
}
c_grg_grungler and j_grg_ringoker are all defined
SMODS.Consumable({
key = 'c_grg_grungler',
set = 'Tarot',
atlas = 'grungler_card',
pos = {x=0, y=0},
loc_txt = {
name = 'The Grungler',
text = {
'{C:attention}Shuffles{} all cards',
'currently in hand'
}
},
can_use = function()
return G.STATE == G.STATES.SELECTING_HAND or G.STATE == G.STATES.TAROT_PACK
end,
config = {
extra = {
grungler = "Grungler"
}
},
use = (there's a whole function here but it's long and i don't want to clog up the channel)
})
You should not being putting the c_ or your prefix in the id
Smods does that for you
ah that makes a lot more sense
i think i still need to define a prefix somewhere though
nvm i have one already
In your header/json definition
Yeah
Also if you do want to see what the game set the I'd of something as you can use DebugPlus and run eval do.hovered.config.center.key on it
thanks
is this related to why my localization code doesn't seem to be working
return {
descriptions = {
misc = {
v_text = {
ch_c_grg_grunglest = {"All {C:attention}Tarot{} cards are {C:attention}The Grungler{}"}
}
}
}
}
Oops! The game crashed:
main.lua:1347: bad argument #1 to 'load' (function expected, got nil)
Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1418a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows
Stack Traceback
(3) global C function 'load'
(4) main chunk of file 'main.lua' at line 1347
(5) global C function 'require'
(6) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x33479538 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x33479588 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(7) global C function 'xpcall'
(8) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(9) global C function 'xpcall'
(10) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
I don't know whats the issue
new different problem
trying to use the event manager to get this to work but i have no idea how the event manager actually works
the joker effect triggers during context.after but I want it to wait until after the scoring animation has played before it does its thing, which I assume would be the purpose of the event manager
is there a way to get the event to wait until after the scoring animation is done?
wait I figuted it out
blockable = true
was able to fix the "spectral cards don't actually do anything" issue, and for the most part the "must have room" works, but there's a weird edge case where you can still "buy and use" even if you don't actually have space. what am i missing here?
if #G.consumeables.cards <= G.consumeables.config.card_limit or self.area == G.consumeables then
return true
end
end,```
I have now created a joker that makes flirty comments whenever you buy women jokers
so let me get this straight. your bloodline goes across many generations, dozens of people who have fought in wars and endured hardship so you can get to this point right here right now. your parents had you when you were a child, and then you grew up, and they tried to give you the most loving home they could. so tell me how all of those people would feel about you deciding to do this
there are women jokers in balala?
It's primarily for my mod, which has a bunch of jokers depicting various characters (collaborative mod for the JoJo Fanworks discord server). But for vanilla jokers, I added Lusty (b/c lust?), Hack (who vaguely looks like a butch lesbian), Blueprint and Brainstorm (due to the yuri art), Shoot the Moon (since it's a queen-specific joker), and Driver's License (since she's a trans woman via patch notes). Also egg so I could make a trans egg joke
Annoying obv that it inherently isn't compatible with other mods because it requires manually keying in that a joker is a "woman", but it doesn't break or anything, which is the best I can ask for
noted
Nods nods
does it serve any practical purpose besides just being flirty though?
new smods joker key: is_women
-# devious snake_case change
The character it represents is a very flirtatious lesbian, so it scales chips based on how many qualifying jokers you also have
TRUE
balatrwoke
what about objects (business card, 8 ball, gros michel)? do i just write "it"?
for objects the pronouns would be "u", "s", "a"
/j
anyway, back from the joker gender discussion what no updates does to a mf, i have been considering making a program similar to curseforge that lets you easily download, publish, enable and disable mods, along with support for dependencies and statistics. should i make this or will nobody here really use it?
a similar project is being made at #1339375696254074942
it'd probably be preferable to contribute to that rather than make your own
is it oss?
i was almost worried it wasnt written in rust
phew
it's on a very early alpha release and to my knowledge it doesn't support linux
whats the thing that makes text wavy?
DynaText I think
i will take a look at that, thanks!
just go to functions/UI_definitions.lua and ctrl f DynaText
still need help with this if anyone has any pointers :o
For DynaText objects, there's a few different kinds of movement.
Try out bump_rate = <number> and bump_amount = <number>,
float = <boolean>,
speed = <number>,
amount = <number>,
silent = <boolean>
}
speed = <number>,
width = <number>,
amount = <number>,
silent = <boolean>
}
damn, thats very detailed, thanks :D
you're checking if the number of consumables in your slots is less than or equal to the card limit
the "or equal" part of that happens when your slots are full
float = true is very upsetting for my brain to read, so I'm happy to share the pain
thanks I just noticed that
that was my attempt to fix the initial problem--that it was impossible to use the card if you had another consumable because you "wouldn't have enough room", despite logically speaking, using the consumable would free that room.
unless it was a negative consumable
That typically should be the reason for the consumable buffer? I think
for reference, this is the current code
key = 'acePentacles',
set = 'Tarot',
loc_txt = {
name = 'Ace of Pentacles',
text = {
"Creates a random {c:blue}Spectral{} card",
"{C:inactive}(must have room)"
}
},
atlas = 'Tarot',
pos = { x = 0, y = 1},
cost = 3,
can_use = function(self,card) --check for if there's space! KNOWN BUG: will not care if there's no space for buy & use.
if #G.consumeables.cards <= G.consumeables.config.card_limit or self.area == G.consumeables then
return true
end
end,
use = function(self, card, area, copier)
G.E_MANAGER:add_event(Event({ --make a spectral card!
trigger = "after",
delay = 0.4,
func = function()
play_sound("timpani")
SMODS.add_card{
set = "Spectral"
}
-- card:juice_up(0.3, 0.5)
return true
end,
}))
delay(0.6)
end,
}```
what is the key of a modded consumable, is it c_(prefix)_name oooor?
The <= allows you to use the consumable if it's in the shop and your slots are full for example
You had the right idea with the area check, but should use card instead of self, and account for your consumable being negative
But yeah specifically, when you create consumables, you have to do this:
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
and then once you're finished creating the card, do
G.GAME.consumeable_buffer = 0
The game creates a buffer space when it knows it needs to create a card and then removes it once the card has been added
Yes
epic, thanks once again
silly question, where do we put this ^^:
Put expanding the buffer before you send the event, and then reduce the buffer after the juice_up() function in the event
good news: it doesn't have the "buy and use" when inventory is full anymore!
bad news: ...the original bug is back.
What does your can use func look like now
if #G.jokers.cards < G.jokers.config.card_limit or self.area == G.jokers then
return true
end
end,
use = function(self, card, area, copier) --code from cryptid's gateway, will almost inevitably need to adjust
G.E_MANAGER:add_event(Event({ --here
trigger = "after",
delay = 0.4,
func = function()
play_sound("stla_stellatedGet")
SMODS.add_card{
set = "Joker",
rarity = "stla_Stellated"
}
card:juice_up(0.3, 0.5)
return true
end,
}))
delay(0.6)
end,
}```
how can I recalculate a hand if a joker changes the cards in context.before?
Did you send the wrong one
Ah
yes i did ;P
if #G.consumeables.cards < G.consumeables.config.card_limit or self.area == G.consumeables then
return true
end
end,
use = function(self, card, area, copier)
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({ --make a spectral card!
trigger = "after",
delay = 0.4,
func = function()
play_sound("timpani")
SMODS.add_card{
set = "Spectral"
}
-- card:juice_up(0.3, 0.5)
G.GAME.consumeable_buffer = 0
return true
end,
}))
delay(0.6)
end,```
there we go
Yeah all you need is use card instead of self in can_use
What I said here
so like, just function(card)?
alrighty, that worked! :o
...we uh, have no idea how to check for "is negative" in this equation (haven't ever needed to check edition before now), and it's almost 4am, you're gonna have to spell this one out, apologies ^^:
to check if any card is negative you can do if card.edition and card.edition.negative
the first check is necessary because edition could be nil
will look into this tomorrow, uh, it's a tad late for me to be futzing with if statements beyond what we've already done
||what if theres a mod that allows jokers to have sexual intercourse with each other for a new joker, just sayin||
Sounds like a lot of work to implement
I wonder how easy it would be to create a mod updater that uses git
no clue why and how i randomly came up with that idea 😭
Throw the jokers in the daycare and walk in the grass back and forth for a few thousand steps
We've completed like 30 ish jokers for my mod so far which is fun!!!
I'm actually kinda enjoying the pixel art
@manic rune what side of the bed did you wake up on? You would have to write that code entirely exclusively from the game since the game is not designed to have that type of functionality at all. Actually lol you would be better off making Balatro 2.0
i slid downwards ❤️
Well hopefully you found what you were looking for when you did that xD
I don't think it'd be as hard to implement as you make it sound
actually, yeah, ive seen mods more complicated than that ngl
its a bit similar to fusion jokers if i have to make a comparison
It depends on what you're looking for. Most of the game uses one type of animation style
The game uses images and particals There aren't any sprites and vectors that I can think of. This game would probably run on a potato
You know, I don't think you need an animation for it
I think it's fine to leave it up to imagination
I think it's too much work when you can have a random AI create whatever fan art you want
Btw... My git updater for Balatro. Took 5 minutes to make
Doodle Joker
1 in 4 chance to copy the ability of the joker to the right. (Must be blueprint compatible)
This is so inconvenient and probably chatgptd
Inconvenient? I have like 8 mods
but why would you use git?
It's not really something I plan on doing all the time. I just don't want to go looking for everything when I reset my PC again.
why would you not use git
already exists, no?
dimserene did that right
idk but what does it changes?
I uploaded my custom collection because I lost the last one I made. I spent about 12 hours today polishing it this time
honestly I probably should connect my smods install to git considering how often I update it
I consolidated 5 different mods for no other reason than to say I could
if you git clone a mod repo you can easily update it by doing git pull
I did find out the answer to that question I asked hours ago. Playing card is not a defined key in malverks theme engine
doing it manually is still a bit of a chore, but you can easily write scripts that automate the process
If I try and use the defined key in the game code I get a nil error. Which is fun. Honestly I should just write it myself
Nil is a new thing for me. I'm used to IRQ errors in regards to memory.
If we're sharing git updaters, here's mine (in batch (derogatory)). needs the weird windows version of git but very nice otherwise
you guys use git updaters?
the only script-related thing I knew Balatro modders used was an upscale script for 1x -> 2x
no, I manually look through the mods' commits and write the code myself in my local copy
i am very new to balala modding, can someone explain why this crashes
what's the crash first
oh well, you're missing a comma in your json file
make sure you have Viridis.png under Mods/your mod/assets/1x and /2x
cringe upscaling script
here's my cringe upscaling script using imagemagick: for /F %%x in ('dir /B/D 1x') do magick 1x\%%x -scale 200%% 2x\%%x
although this does change the metadata on unchanged atlases making commits rather annoying
does aseprite also do that?
i dont have ballatro on steam so can someone test this rq
i dont think so
"me and my friend made a game, it is 2-5 minute adventure game and we would like you to play to give feedback"
its not the whole thing i need to make sure the code works lol
i dont need feedback lmao
by test i literally just mean load it and see if it crashes
what astrapboy said refers to a common way to distribute malware
random people dm you on discord asking if you want to test their game
ohhhhh
at least this is easily vettable (looks safe to me but check for yourself if you choose to download it)
yall i dont know shit abt malware just lettin you know
sounds like something a malware-doer would say /nsrs
also ive been here for like a year so
and you havent had Balatro on PC?!
nope, my parents dont want me to buy balala on pc since they think its pointless (i have it on switch)
doesn't crash when injecting
im opening this shit in triage
like I respect the effort and all, but
you can't really mod a game that you don't have access to the files of
why not
a Large portion of modding this game is ctrl-shift-f'ing its code
you can only get so far
that attitude is honestly so refreshing compared to a hundred "how do I do X thing in Y mod" "go look at its code" exchanges
tbh I do look at other code whenever I need to make Jokers that function somewhat similarly
like half of my general dependencies file is taken from JenLib lol
dawg wdym i can literally get anywhere with this
name one thing in balatro that i cant get through mods
personally I should do more research but only because I'm too comfortable reimplementing things myself
my util.lua is Terrifying
yup
although I have still made my own code (like this)
surely those aren't global
they are but they're part of a file that's dedicated to global functions used across multiple Jokers
all in one convenient place
i'd not recommend making global functions like that
it's code like this that makes me yearn for a functional map/reduce
conflicts with other mods
my globals all end up in Bakery_API which Will Not Have Collisions
if any other mod decides they need a utility function and happen to put the same name as yours
it will cause issues
wait Lua is good I can just make that
@normal crest would this be a simple solution?
yeah
honestly for upscaling the atlas i just pixel scaler
alright here I go
you don't have to use my terrible naming conventon though
good luck, it'll be a bit of refactoring
but it's pretty much necessary
does anyone have sample joker code or simply the one for blueprint
these can probably be left alone since they're meant for another mod in the first place lol
look at vanilla's blueprint
how?
https://github.com/MathIsFun0/Cryptid/blob/e37e3c0d8681004e758b6d961ff9714250e450b9/Items/MiscJokers.lua#L5432 copy cryptids code for the old blueprint
Can I have a joker's base sell value be less than half at default?
you could modify it in add_to_deck (or whatever it's called)
i think I've done it
wasnt really that much of an endeavor lol
I suppose that's a cheeky solution
me when there are random bugs three weeks from now:
me when i spend three weeks looking for a missing - sign
okay I have thoroughly checked and I have fixed all of the functions
(that's a :pain: reaction)
if self.ability.set == "Joker" and not self.debuff then if self.ability.name == "Blueprint" then local other_joker = nil for i = 1, #G.jokers.cards do if G.jokers.cards[i] == self then other_joker = G.jokers.cards[i+1] end end if other_joker and other_joker ~= self then context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1 context.blueprint_card = context.blueprint_card or self if context.blueprint > #G.jokers.cards + 1 then return end local other_joker_ret = other_joker:calculate_joker(context) if other_joker_ret then other_joker_ret.card = context.blueprint_card or self other_joker_ret.colour = G.C.BLUE return other_joker_ret end end end
ima pull request a bug to your git repo when you release mistigris
wait, wouldn't this have some unintuitive interactions when duplicated?
someone explain im so lost
it just copies and returns what the other joker returns when it gets calculated
nuh uh
if you actually are gonna make this please send it to me
sure. most of the functions are quite easy to implement procedurally but i'll make a general pretty good version
screenshot of a spritesheet of every single frame in bad apple, which i plan on using for a joker (5325x8360 pixels, 6MB)
please tell me this is the 2X sprite sheet
1x
you are fucking deranged
images are loaded in powers of two, so your 5325x8360 atlas will be loaded as... 8192x16384 i believe?
i was able to fix it by rerunning my mp4-to-spritesheet program with 5 fps
i'm still here, you did not need to ping me
yeah i forgor sry
i used @silent?
silent only removes the push notifications, which i already have all disabled
the ping icon and stuff are still present
anyway, why does this crash and how do i fix it?
SMODS.Atlas({
key = "badapple",
px = 71,
py = 95,
path = "badapple.png",
atlas_table = 'ANIMATION_ATLAS',
frames = 50
})
SMODS.Joker({
key = "bad_apple",
loc_txt = {name = "Bad Apple", text = {"Does nothing (yet!)"}},
atlas = "badapple",
config = { extra = {}},
loc_vars = function(self, info_queue, card)
return {
vars = {
}
}
end,
calculate = function(self, card, context)
end
})
jokers dont pull from animation atlases
what can i do to fix it?
have you checked how Jimball works in Cryptid or 4D Joker in Maximus?
i don't understand how it works? from the code im reading jimball should be static
update: i was able to get it working by stealing borrowing maximus' code
-# which is also stolen from cryptid
there's a Game.update hook that changes the position
There also that animated sprite mod someone was working on that I can’t find
might have scope creeped a little bit but oh well I'm having fun
I'm sure this has probably alr been done before, but how do I get the held cards in hand and the possible playable poker hands?
I've been trying to do it for a long time and im a bit stuck
enjoy: https://github.com/BakersDozenBagels/LuaFunctional
let me know if there are any issues or missing functions. it's licensed under gpl rn, but i'm considering CC-BY-NC instead
anyhow, sleep time
sup mod wizards
what's the context word/s for "activate after boss blind defeat"?
I'm a bit lost
So Ive managed to make my Joker not go negative in money reward but I wonder how to make it work like other food jokers so it could just debuff itself
UPD: nvm I figured it out! :D
whats the command
or function
key = 'rhanged',
loc_txt = {
name = 'TBD',
text = {
"Adds {C:attention}2{} cards",
"of random {C:attention}rank and suit{}",
"to your hand"
}
},
set = 'Tarot',
atlas = 'ReverseTarots',
pos = { x = 1, y = 0 },
cost = 3,
config = {extra = {generate_limit = 2}},
loc_vars = function(self, info_queue, card)
return {vars = {self.config.extra.generate_limit}}
end,
can_use = function(self, card, area, copier)
if G.STATE == G.STATES.SELECTING_HAND or G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.PLANET_PACK then
return true
end
return false
end,
use = function(self, card)
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
play_sound('tarot1')
used_tarot:juice_up(0.3, 0.5)
return true end }))
for i=1, self.config.extra.generate_limit do
local used_tarot = card or self
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
local _card = create_playing_card({front = pseudorandom_element(G.P_CARDS, pseudoseed('cert_fr')), center = G.P_CENTERS.c_base}, G.hand, nil, i ~= 1, {G.C.SECONDARY_SET.Spectral})
G.GAME.blind:debuff_card(_card)
G.hand:sort()
return true end}))
playing_card_joker_effects({true})
end
end
}```
Made this reverse Hanged Man to randomly generate two normal cards into your hand. Works perfectly fine, but the cards generate from the bottom left of the screen and then fly into the hand. Looks a little odd, any pointers? Thanks
i know context.end_of_round, but how do i make it proc specifically on bosses?
Add ``and G.GAME.blind.boss` iirc
ty in advance, omw to test it
btw, where can i familiarize myself with all the "G.(something)" bits? what is it exactly and how does it work?
how to use "G.GAME[key:lower() .. '_rate']" ?
Bump!
So i want to make an effect that retriggers all stone cards but the game gives me an error at line 19
Im not sure what's wrong
what's the error
here^^
it might be order of operations on the condition, try putting the cardarea checks in parenthesis
How can i fix it so my custom consumable with a custom consumable type spawning "Joker" in the shop when removed from the pool?
It works now! :D
Thanks
key = "aroace",
config = { extra = { repetitions = 0 } },
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 2,
--Using Neato's Hatsune Joku as a placeholder
atlas = "NeatoJokers",
pos = { x = 5, y = 0 },
cost = 6,
calculate = function(self, card, context)
if context.cardarea == G.play and context.repetition and not context.repetition_only then
if context.other_card:get_id() == 14 and context.other_card ~= context.scoring_hand[table.getn(context.scoring_hand)-1] then
card.ability.extra.repetitions = card.ability.extra.repetitions + 1
end
if context.other_card == context.scoring_hand[table.getn(context.scoring_hand)-1] then
return {
message = localize('k_again_ex'),
repetitions = card.ability.extra.repetitions,
card = self,
}
end
end
end
Hello, im trying to make a joker that retriggers the rightmost scored card for each ace previously scored this hand, but i keep getting errors related to values of nil being returned, can anyone help me with this?
i want to make a left side blueprint with rng, what do i need to change?
at least i know im not the only one
its syntax errors
always
if its error 141
if it were syntax id be getting errors for unexpected symbols, this is a logic error because the code gets run just fine until it explodes
nah im telling you i spent two hours because of a comma
what explodes?
the game, i jokingly say explode instead of crash
syntax errors get flagged immediately when launching the game
say if i removed one of the first commas for example
what does the log say?
id get something like this which reports an unexpected symbol, which means there is a syntax error prior to it
awooooooooooooo
but my error only happens when the game attempts to score the last card in the played hand
so its definitely not syntax
bump
blueprint is actually annoying to code
thats what learning is all about
anyone has an idea on how to "get" all cards of a certain suit and loop over them to modify them?
i can kinda guess the modify part
played cards?
but i have no idea how to reference the cards
nope, just all cards with, for example, Hearts that you have in your deck
played, unplayed, in hand, debuffed
etc
well i cant help you there
time to wait for the big guys and gals to help 🥲
exactly what im waiting for
god knows i've had a few aneurysms reading the smods documentation
Can't you iterate over the card areas?
G.hand, G.discard, G.deck are all global variables
oooh
G.hand.cards gets a table with the cards in hand
yea no, i definitely missed the most important part somewhere
I don't think that is listed anywhere in the docs
I've been dwelling in Balatro's code to learn how to do things (a la open the .exe with 7zip or whatever you're using)
gahdamn
Not sure if there's a table that has every card in the player's possession at once but I know about the ones I listed, there's probably one for cards that have been played as well
i guess i can just loop over all places cards can be?
i think there is a playing cards table
remove the message and card properties of your return
inefficient but at least it'll maybe work
If that is the case then you could iterate over that instead
it's called playing_cards
you can access it through context i think
G.playing_cards is what you're looking for
anyone here can enlighten me???
that worked! thank you very much!
Still trying to figure out a solution to this... :)
btw, digging through the main game's card.lua in parallel rn, what's the difference between suit/face and suit/face_nominal?
i shouldve chosen an easier idea
guys i need ideas for the joker "K" in my mod. what should it do?
are you doing the alphabet????
Does this code also has an order issue? Its supposed to give played stone cards random edition
yes
i think everyone can relate 😭
it also has an error at that line
14
aka config.center
def something with kings
ok but again, what should it do exactly?
you can view examples from jokers ive already made at https://github.com/Runtem/alphabet-jokers
A mod that adds all 26 letters from the alphabet as jokers (WIP) - Runtem/alphabet-jokers
sorry to bother again but does returning in a function prematurely end its execution like in c++?
yes
ok, even before looking at the code i have a silly idea
add a consumable like soul that unlocks a letter of extended latin
thats an issue, im trying to make the repetition increase only affect the current hand
like thorn/eth, or o umlaut
but it seems to continuously stack, and adding a statement to put it back to 0 before the return makes it not do anything
hmmm
i am not planning to extend the scope of the project past the base 26 jokers which are letters
why are you changing the edition of your consumable?
(Þ, ð, ö accordingly)
damn 😔
i mean no scope creep am i right guys?
anyways what should the "K" joker in my mod do?
nobody answered properly yet
i hate attempting to reach a nil value
Something with kings, since K is usually a shortening for kings?
I KNOW, just gimme the entire idea
OH
wat rarity is the joker
Give +N mult per King played?
uncommon
each king in hand has a certain chance to either give cash or chips, probably
so basically baron
but slightly more complex
i have a stupid idea
Kings held in hand have a
1 in 2 chance to give 1.25X mult and
1 in 5 chance to give 3$
1/11 chance of upgrading played hand per each played King
hm
for an uncommon? jesus
3x mult? 😭
with oops, all 6s, that is more cracked than even baron lol
Baron+
legendary
you overthrew reserved parking and baron in one fell swoop
i debuffed the stats
would baron's biggest lover stab him in the back like this
fr tho, i think i cooked with this no?
i have another idea which is increasing the rank of all played cards if they are less than king, idk
(1 of 11 because K is the 11th letter, yadda yadda)
HRT
Turn all playing cards into polychrome red seal spade steel kings
whats hrt 😭
fair enough
the kevin hart stock
...
uh wait, i think i got the code for this
Kingtosterone
Hormone Replacement Therapy, when people take things like Estrogen or Testosterone to transition and look more feminine or masculine
I want the joker to mean "oKay..." instead of "King"
wait really??
||very un-baron of you but aight|| disables boss blinds that debuff cards (i'll explain)
If you clear a blind in a single hand with no discards, gives money. "k, next"
people often use "k" instead of "okay" when they're nonchalantly ignoring something/someone
the joker lets cards ignore debuffs
local cardPos = 0
local other_card = nil
for i,v in ipairs(G.jokers.cards)
if v == card then
cardPos = i
end
end
if cardPos <= 1 then
return
else
other_card = G.jokers.cards[cardPos - 1]
end
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
context.blueprint_card = context.blueprint_card or card
if (context.blueprint > #G.jokers.cards + 1) or not other_card then
return
end
local other_joker_ret, trig = other_joker:calculate_joker(context)
context.blueprint = nil
if other_joker_ret or trig then
if not other_joker_ret then
other_joker_ret = {}
end
other_joker_ret.card = context.blueprint_card or card
context.blueprint_card = nil
other_joker_ret.colour = G.C.GREEN
other_joker_ret.no_callback = true
return other_joker_ret
end
context.blueprint_card = nil
put this inside your calculation
and i think it should be good
you cooked
TTTTHHHHAAANNKKSSSS
Maybe something like this:
Gives (+30 chips, +10 mult, 5$, +1 discard) for the round
Ability changes every round
yaaaay
its scrap code from my mod, it might not even work so tell me if it bugs out lol
bro imma be real, why do you ask for suggestions if you didn't take even one into consideration 😭
I needed a starting point
i dont see a starting point here but aight 😭
you r running on a whole another track rn
could you send a file with the text only becaus e discord destroys spacing
damn, wait
it puts everything on the same column when i copy
calculate = function(self, card, context)
local cardPos = 0
local other_card = nil
for i,v in ipairs(G.jokers.cards) do
if v == card then
cardPos = i
end
end
if cardPos <= 1 then
return
else
other_card = G.jokers.cards[cardPos - 1]
end
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
context.blueprint_card = context.blueprint_card or card
if (context.blueprint > #G.jokers.cards + 1) or not other_card then
return
end
local other_joker_ret, trig = other_joker:calculate_joker(context)
context.blueprint = nil
if other_joker_ret or trig then
if not other_joker_ret then
other_joker_ret = {}
end
other_joker_ret.card = context.blueprint_card or card
context.blueprint_card = nil
other_joker_ret.colour = G.C.GREEN
other_joker_ret.no_callback = true
return other_joker_ret
end
context.blueprint_card = nil
end,
I need y'all to start my creative part of the brain up so I ditch you later
💔
cant thank you enough
doctor Gregory House, the hospital administration would like you to relogin using your main account /j
ughhh what's the function to set an enhancement again? my brain is refusing to let me remember it
is this a basic blueprint or a custom one
got the code for this one
uhh
v:set_ability(G.P_CENTERS.m_wild,nil,true)
what
just change the "v" to the card you want to change
it's a House M.D. reference
its supposed to be blueprint but targeting the left card
Sorry i dont watch that 🤷♂️
House has a similar approach to his work generally (not dissing you just in case)
oof
he asks his team for possible diagnoses, discards them all most of the time, and assigns his own (he's right most of the time)
anyway, we've gone way off-topic
BONE CARD
banana suit?? 😭
SANS???
/j
how does graveyard work?
ooooooooooooooooooooooooohhhhh
after each ante or something
that's so genius actually
no its just dead stuff
cool
graveyard is out NOW update your autumn mood modding mods
is there a way to revive cards from graveyard ❤️
(bone cards arent)
it exists in the code
i havent made anything that does it yet tho
epic
it is a thing that cards know how to do
blitz idea: spectral (or spectral-like) consumable: RAVEYARD
do you accept suggestions
you are welcome to yap in my thread i'll forget them less there
https://discord.com/channels/1116389027176787968/1331462654732144721
on use, takes all cards in the graveyard and plays them once as one giant hand
there should def be a consumable which gives you more $ per card in graveyard ngl
lowkey i want to add smt like a new zone too, but im afraid if i do so then my mod will potentially become incompatible with some mods
bruh
graveyard keeper called they want their game back
well the graveyard is not visible on-screen
you have to look in the deck and then in a tab
arrrgh the urge to make add-on mods after i kinda get to know my way around the code
you are welcome to make mods that depend on AMM
just know i'm a weird freak and keep adding shit to it
it should be relatively easy once you remember the basic stuffs that balatro uses for their code
and i dont document shit because im lazy
like Tainted magic for Thaumcraft in minecraft, if that rings any bells for yall
(but my code is generally pretty readable
)
i legit dont play that many mods in minecraft because my laptop is barely running balatro 💀
Looking to make a tarot that when used gives a certain tag. Anyone know how that method would be called?
feel that
like, i doubt anyone here ever experienced not having enough ram to even run balatro
lol
and thats a game less than 100 freaking megabytes 😭
arghhh cryptid does something similar, gimme a sec
doesnt vanilla game already have cards like that
time to add monster reborn
(alt+tab code card)
if i had the foggiest idea how to implement a selection interface for the graveyard, yeah
gives you a double tag
Guys i can give ideas for your jokers or consumables or seals or anything, just ask me and provide me with the basic context
A graveyard might be cool for a frankenstein joker that just grabs random features from cards in the graveyard, then gives you that card 🤔
I'll check there first and then come back if I still can't figure it out
no nightmare worse than having to design UIs 😛
nah but hear me out, what if you add a challenge which switches between the graveyard and your deck every round
i was VERY hesitant to speak initially
tainted lazarus ahh
and your deck is split in half, so that graveyard has 26 cards while your deck has 26 cards
t.Laz
aslkfajlsdhjklsfhj
whats that 😭
it's a character from the latest The binding of Isaac DLC
basically it's exactly that, it has two inventories and changes between them for every cleared room
ye sure
(or when using its built-in item)
ohhh
6?
6️⃣
misclick lol
2 builds 1 character
lmao its fine
can be quite annoying when one inventory is packed as hell while the other is basically nothing lol
or maybe its not, idk
yeaaaa
yea no, you can time the flips to put items where you want, but the issue is that there's now kinda twice less items per floor
oh
playing two characters with one character's total amount of items
guess which binding of isaac character i'm talking about
issac
oh
❤️
the twins?
a joke so funny they did it twice
i forgor their names ahh
jacob&esau
they do have a sort of Karmic feel to them, eh
Okay that worked 💀. Can't believe I spent an hour looking through the source code and other mods to try and figure that out, forgetting that Diet Cola existed.
the struggle of a programmer
nah dw, i sat through my code for 3 hours tryna fix smt until the wizard himself told me to add 2 freaking lines to fix it
😭
i stumble in my OWN code, it's a whole other can of worms looking through others' (mostly unannotated!) code
uhh context for this one: you gotta set context.blueprint and context.blueprint_card to nil for some reason, while the source code doesnt do that
else my version of blueprint completely ignores some jokers, which is a bit annoying
it seems like that wasnt the only issue
oh damn, anything else?
btw, i'm (once again) diggin through source code here, and i can't find one thing
wat is it
does one refer to a card's suit with the suit name or some number?
rarity threw me for a loop with this
its a string
TYYYY
:get_suit() will return one of that
it should be context.other_card:set_edition btw
else ur changing the edition of ur jker
finally got it working (the joker sprite is Hatsune Joku from Neato's Jokers mod, im using it as a placeholder)
mmm
alright, so
line 13 should probably be if context.cardarea == "G.play and context.individual then
line 14 should be if context.other_card and context.other_card.config.center == G.P_CENTERS.m_stone then
is this like reverse hanging chad?
the way it works is that it retriggers the last scoring card for each scored ace
ohhhhhhh
id have said thats pretty broken but i realized Aces got barely any support jokers for them lol
Lmao why this joker as placeholder
because its hatsune miku
hatsune miku
bruv
thats not an ace...
thats a TWO...
uhh
i think thats how its meant to work
like, each played A will make the joker retrigger the last card once
it says it retriggers every ace two additional times
thats old text from the old version
oh
i forgot to update the localization files
darn
hmmm
do I need to define other_card somehow?
like local other_card
(i dont really understand)
thats odd, it should work
thas weird
im not tripping right 😭
it got past the if statement in line 14 so context.other_card should be a playing card
I can send a full crash log
[SMODS HandsomeDevils "jokers/stone_mask.lua"]:19: attempt to index global 'other_card' (a nil value)
Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1404b-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows
Steamodded Mods:
1: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.3.1, Uses Lovely]
2: Item Remover by elial1 [ID: ItemRemover, Priority: -1]
3: HD by Kars [ID: HandsomeDevils, Version: 1.0.0, Uses Lovely]
Lovely Mods:
Stack Traceback
===============
(3) LÖVE metamethod at file 'boot.lua:352'
Local variables:
errhand = Lua function '(LÖVE Function)' (defined at line 553 of chunk [lovely debugplus.console "console.lua"])
handler = Lua function '(LÖVE Function)' (defined at line 553 of chunk [lovely debugplus.console "console.lua"])
(4) Lua field 'func' at file 'jokers/stone_mask.lua:19' (from mod with id HandsomeDevils)
Local variables:
(*temporary) = nil
(*temporary) = nil
(*temporary) = table: 0x2bd76880 {REAL:17.922341812657, REAL_SHADER:17.922341812657, TOTAL:21.93537863624 (more...)}
(*temporary) = number: -2.62423
(*temporary) = string: "attempt to index global 'other_card' (a nil value)"
(5) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
self = table: 0x2bc88388 {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x2c55c498 (more...)}
_results = table: 0x2c657e00 {blocking:true, pause_skip:false, time_done:false, completed:false}
(6) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
self = table: 0x2bf86788 {queue_last_processed:6.3333333333333, queues:table: 0x2bf867b0, queue_dt:0.016666666666667 (more...)}
dt = number: 0.00605875
forced = nil
(for generator) = C function: next
(for state) = table: 0x2bf867b0 {unlock:table: 0x2bf867d8, other:table: 0x2bd6e258, tutorial:table: 0x2bf86828 (more...)}
(for control) = number: nan
k = string: "base"
v = table: 0x2bf86800 {1:table: 0x2c466718, 2:table: 0x2bc88388, 3:table: 0x2c37b058, 4:table: 0x2c2cf230 (more...)}
blocked = boolean: false
i = number: 2
results = table: 0x2c657e00 {blocking:true, pause_skip:false, time_done:false, completed:false}
(7) Lua upvalue 'gameUpdateRef' at file 'game.lua:2524'
Local variables:
self = table: 0x2bd76240 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x2c79fc68 (more...)}
dt = number: 0.00605875
http_resp = nil
(8) Lua method 'update' at Steamodded file 'src/ui.lua:84'
Local variables:
self = table: 0x2bd76240 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x2c79fc68 (more...)}
dt = number: 0.00605875
(9) Lua field 'update' at file 'main.lua:996'
Local variables:
dt = number: 0.00605875
(10) Lua function '?' at file 'main.lua:935' (best guess)
(11) global C function 'xpcall'
(12) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 906 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
nah its fine 😭
how do i get the tips to show up for additional elements like with glass joker
I swear thats gonna make me schizophrenic one day
how the fuck is other_card returning as nil, what
surely I didnt forget to add some random comma somewhere
idk :(
save a reference to other_card before the event
context will have changed by the time your event runs
whats that?
hey rq is it a bad sign when we're sketching the code we want to write out in pseudocode, before we even write any actual code,
its local othercard = context.other_card
local whatwver = context.other_card

i didnt know that was necessary, damn
looks like a conversation between yourself from another timeline to me ngl
but hey, if it works then it works
It did! also I somehow accidentally removed it in the process
my bad, sorry
oh lel
its fine
shouldnt have taken that long to fix this tbh, im too inexperienced, sorry for having to stick around with me 💀
Thanks everyone for help! I'll credit ya in the mod if you dont mind @manic rune @normal crest

if you want then sure ❤️
I don't need to be credited
how does one save the stats of a joker when continuing a round (after closing the game for instance)
guys where can I download Jens almanac
okay so, i'm trying to make a joker that turns every Heart card the player has in the deck into a Gold card, then delete itself
i'll figure out the delete itself part later
am i doing the turn every heart gold part right?
x:get_suit(), not x.get_suit()
or did i get hit with godotbrain again
oh, ty--
also
that for loop is wrong
it should be:
for index,x in ipairs(G.playing_cards) do
(insert code here)
end
oooooh
aight, ty once again
mhm, np
merci
Holy Jojo's Bizarre adventure
uhhh
they should already do that if we are talking about the ability.extra table
(i'm making like, obvious syntax errors here, but every lua tutorial i looked at was either explaining nothing or speaking elvish, so i'm kinda trying to figure it out on the fly 🥲 )
lel, its fine, i actually learnt lua from roblox studio
ok, let's test it out
Oh hey, fellow JoJo modder
:,>
hmm, I'm using config.extra
nope, for some reason they don't
thats odd
like for example an infinite stacking x_mult in self.config.extra.x_mult doesn't save
can you show me your code?
yeah I'll show you one example
What's the benefit of gold cards if they destroy themselves?
even if you use card.ability.extra.x_mult ?
Other than potential vampire
nono, the joker deletes
OHHHHHH
it's like a convoluted consumable
oh, that works ? I might try it
if it doesn't I'll send the code
Makes sense. It's going to be a cheap joker, right?
...it's a rare :,>>>
if you're in the calculate function, you don't wanna use self.config, but card.ability, as that is the unique info that gets copied and changed as you play!
Oh well then just have it debuff itself instead of destroying itself.
Debuff until next round or ante so that it doesn't feel like a useless one-off, unless that's the entire point of it or you have synergies for it
nvm, i don't think that was correct, haha
Seems to make sense to me
Do feel free to hit me with the "no, no I don't think I will"
nah but like, there's nothing left for it to do when it's used, or at least it becomes almost useless
thing is, ability is considered a null field
so card.config maybe.. ?
Given that I know... ONE thing about what you're doing and not even the full scope of that
it makes every card of a certain suit in your deck on proc
well for one, you can make the suit change lol
So what procs it?
(it was hearts but i changed it to diamonds since it makes more sense)
hmm, that's very strange. Let's see the code, then, haha
Boss blind win
Ah. Okay so that makes sense then.
that seems more like an uncommon joker ability if anything honestly, unless you are providing jokers which support gold cards
ok i'll explain the whole mod idea
So it's not "turns all diamonds in deck to gold cards and self destructs"
It's "upon beating a boss blind, turns all diamonds in deck to gold cards and self destructs"
it's a mishmash of jokers based on random characters from various media
Because what I was seeing was an effect with no trigger.
You gotta pair an effect with a trigger.
and this one joker is Sisyphus prime from Ultrakill
so the whole boss and gold thing makes sense
ohhh i see
in a sec
My initial impression was that this thing takes all scored heart cards in one hand, turns them gold, then destroys them
Then you clarified it destroys itself
Then I was like well that's lackluster
Then you clarified it turns ALL heart cards gold.
(Or diamonds, whatever 😂)
(triggers on boss blind because it's a boss, gold cards and diamond suit because he's connected to Hell's Greed circle)
its diamonds actually
got an irl problem I'll be back in a few and I'll send it !!
That developed in course of conversation
The ability table of a joker is automatically saved
which makes it even more of an econ option considering that one uncommon diamonds joker gives $1 per scored diamond card
Diamonds are money themed
mhm
yes yes yes
Diamonds are money themed, hearts are xmult themed, clubs are +mult themed, and spades are chips themed.
also i think if i make Minos prime, i can make him do something similar with Hearts (king of the Lust circle)
sadly clubs and spades are really lackluster because of how scoring in balatro works
xmult is always better than both
We should get xchips for clubs
chips is even worse than mult because you get a lot from planet cards already 😭
it would be a bit too broken, i think
REAL ❗
since a hand can have 2000 chips while only having like, idk, 100-200 mult
laughs in Plasma
i assume ezram is a bit cryptidbrained like me
Slightly
cant relate with having to wait 5 hours for the game to calculate ❤️
Cryptid is too broken to take seriously, which is why it's called "intentionally unbalanced"
genuinely, balatro is too unforgiving in some aspects and "ends" too soon
1 in 8 for x1e100 mult 😭
Me when my steam deck takes 10 hours to play through the scoring animations at 2SPF (yes, seconds per frame) because I didn't skip scoring animations
thats true, it really boils down to rng in all forms possible to see whether you can reach far
either that or you play someone else's seed
Pause
because honestly, i cant see myself reaching ante 30+
😂
Welp, time to go abuse myself and my car for hours on end being an errand boy for people who tip $1 for 10 miles of delivery.
Hav gud dei
oof, good luck and have a good day too
yk what, now that i think about it
maybe my mod can be worse than cryptid
like deadass, is anyone gonna read this
💀
NO PAUSES HERE 🔥🔥🔥🔥
what in the War and Peace
ye
can you color text with colors other than the default "chips/attention/mult/etc"?
like, with rgb hex codes for example
slaaaaaayyyy
oooooh
ty!
istg you're writing this code for me 😭
np
nah i just have a lot of mods to look at 😭
Bros actually recommending people to play honkai in the mod description
okay well you were right, card.ability does work wonders, but how to use it in loc_vars ? Do I just make self.config.extra etc etc copy the value of card.ability.extra ?
no reason not to try it out ❤️
i guess it'd be easier to play the game to get the jokers than to read the desc?
😭
Lol
My gf plays it way too much already 😭
@wintry solar tried implementing something with unscored card calculation, unless i'm missing something it just crashes?
without the custom joker it also seems to audibly lower the unscored cards
What are you trying to do?
ok so, you don't need the weird words like "attention" to reference colors, you can just write "red" too
stoopid me
hey i tested your program with the blueprint but it when changing rounds, it crashes
here is the file
There’s no reason this would crash 🤔
Oh it’s probably because your lovely is old
just installed v0.7.1, same thing unfortunately
i could've p-ranked P2 twice now if i was doing that instead of programming this, and i kinda suck at ultrakill :,>
it crashes btw (bump)
calculate = function(self, card, context)
local cardPos = 0
local other_joker = nil
for i,v in ipairs(G.jokers.cards) do
if v == card then
cardPos = i
end
end
if cardPos <= 1 then
return
else
other_joker = G.jokers.cards[cardPos - 1]
end
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
context.blueprint_card = context.blueprint_card or card
if (context.blueprint > #G.jokers.cards + 1) or not other_joker then
return
end
local other_joker_ret, trig = other_joker:calculate_joker(context)
context.blueprint = nil
if other_joker_ret or trig then
if not other_joker_ret then
other_joker_ret = {}
end
other_joker_ret.card = context.blueprint_card or card
context.blueprint_card = nil
other_joker_ret.colour = G.C.GREEN
other_joker_ret.no_callback = true
return other_joker_ret
end
context.blueprint_card = nil
end
i fucked up the naming a bit
😭
SHOULD work now
in this line with what do I replace m_stone to make it check for face cards instead?
Strange, is the crash log still referencing chunks rather than files?
i think theres something like :is_face_card()?
wait let me check
:is_face()
its :is_face(), which should return true if its a face card
can u show me the code rq
sure 1 sec
how do i make this display the correct values (not display everything as nil) without adding ALL tarot vars to specific_vars?
still chunks
ok so i might be dumb for asking this, but can cards actually be eternal?
thats new
le entire code
legacy code from another mod ig
like this?
with that out of the way, hm
no, i believe it is G.hand.cards[i]:is_face()
HOL UP, THE SAME MISTAKE?
oh im dumb for this
im so fucking dumb
you are supposed to do this, im sorry 😭
i keep mistaking is_suit with get_suit for some reason
bruh
(get_suit doesnt even exist, i think)
we're all kinda mindfogged here
bumping bc this is already buried
so basically, x:is_suit("Diamonds"), and change the set ability thingy and it should be good
dk about you but i bought it immediately because that's how you reference stuff in godot (gdscript is my brain's programming autopilot)
I’ll do some testing in my end shortly, what set up do you have to cause the crash?
theres get_id() which is for knowing the rank of a card, so my mind autofills that with the suit
💀
Bump again lol
Do you guys have any tips for getting started with modding our beautiful Balala
i dont know about how the fool info_queue functions so im passing it to other modders, sorry :(
Reading the SMODS docs and studying the source code
https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
https://github.com/Steamodded/smods/wiki/calculate_functions
extract balatro.exe and read the source code, and feel free to research mods to know how to make things work ❤️
Thanks 🫡
HOLY MOTHER OF PEARL IT WORKS
if you store the key, you can basically request info from the P_CENTERS, right?
@manic rune COME HERE I WILL KISS YOU /j /plat
Doesnt look like it since only 1 card flips and the rest of the code doesnt work (its wierd)
But can you run a calculate off of a reference of a G.P_CENTERS reference?
ok now to the card suicide...
I would assume no
dont return inside the loop, only inside the event
im going insane does anyone know how this works using the base game method does not work
Its inside the event right?
fix your indentations but yes this should work
not sure, and this is definitely above my confidence level when it comes to lua, but you can basically copy the config variables, and the calculate function, as it's a variable because of lua, and call it later, right?
i think you can store stuff in G.GAME
ive never used lua before, is there a reason its saying bracket at line 13 isnt closed?
like
Since calculate is a function of a Card object I’m not sure that you can
G.GAME.randomstuffidk = 5
i can actually call this anywhere, and it seems it resets only when you start a new run
im slow
You can see my problem here lmao
so for instance, if you want to store cards, you can make a table:
G.GAME.StoredCards = {}
then just add stuff in there for use
well thats my method, theres probably a bunch of better ways than that
Everything works now, thanks!
functions are also able to be changed and passed around in variables in lua, iirc, but it's probably going to be a way bigger headache if you'd follow my suggestion. But wait, just checking your card again, it's the last bought card that gets copied? and the joker being copied needs to be present still to be copied, right?
No, ideally the effect can still be copied, even if the card is not longer present since it still would have been “the most recently purchased joker”
Hmm, I suspect that'd create bigger issues with the fact that some jokers check for positions on the joker area
dont look at medusa
she'll turn you to stonee
like sacrificial blade and blueprint itself
Also, I don't know how much of an object remains stored when it's sold, and whether for example, you'd be able to still give score for the scaling jokers 🤔
last bump before i give up and explode the moon
i managed to reproduce it with only my mod and smods loaded, have a joker that checks for context.individual and context.cardarea == 'unscored' and play some hand that contains unscored cards; notably, it doesn't crash if the joker calculation doesn't return anything or if all cards score
I do like this idea of passing around the function as a variable though. I think I’ll try experimenting with that
I'd check and see how it works with destroyed jokers, because I think the object's removed, so there's a bunch of variables like cardarea and such that can't get checked
I see your point
You could maybe solve that by creating a new card area that's an off-screen graveyard esque buffers that jokers can be stored in, so that they can be copied still, but it'd create some issues for sure.
Copying the most recently bought joker that's still owned should be a lot easier, if you just store the key and then find it again with next(findjoker('key')). Or if you wanna showman-proof it, just create a global variable that the most recent purchased joker is stored in

❓




