#💻・modding-dev
1 messages · Page 448 of 1
i did but it didnt give me anything
Show the full code.
of the joker?
Yes.
here you go?
I forgot to record but I'll record later
miniscule bumpage
is there a reason why shop_rate isnt working?
Did i just saw skibidi
do not question it
I have done a consumable type that works fine if you want i can send you the code :P
YES
PLEASE
Sure
Kinda bad namings everything is hpr labeled so good luck lmao ,
alr ill look into it
To clarify i’m using draw step to add shaders
And souls
To consumables but everything else should be fine
how's that supposed to work anyway?
why could this happen?
how do i make it so that when an enhancement scores on a small/big blind it does nothing, but on a boss blind it does x2 mult and x2 chips
alr that fixes it, thanks!
no clue what happened
Shit happens
Obviously not as well versed in this as you so I'm spitballing, but does key every become not nil?
yeah
if i used the continue on the debug save slot it crashed and the moment i started a new run it worked
soo
Are you new ?
Yeah always start a new run when debugging sometimes it gets stuck
in modding?
Balatro yeah
uh not really
been making a mod for like a month really
still suck but ive gotten a bit better at it
Don’t remember seeing you , maybe im just blind
dont talk a lot here
Key is to Never take an L
soo makes sense
alr thanks!
Yes, because I put assert(card and key) and the game didn't say assertion failed!.
why could this happen?
missing resources/sounds/red_seal.ogg
wdym
red_seal isn't a valid sound.
o
It's gold_seal
yeah that
anyone knows what I can do to make this work?
Yes.
there is probably many mistakes here which is why im asking, first time trying to code somehing like this
hey can you hold this for me

Install the lua extension.
It will tell you where the error is.
hi again everyone :D
-# long time no see
does some1 know how i can see if the played hand is superior to the last one or inferior (like ik with the config etc, but i wanna know how i can check the rank or smtn like that of the hand, so it even works in modded
Do you see any red lines?
You mean if the hand is higher or lower than the previous?
what do I do?
this watchu mean
it seems like you may or may not be missing a bracket? hover over the red line
oop didnt see that
just hover over the line and see what it says
no
you are missing some brackets
unexpected symbol
The end is in the event when it should be outside of it.
now it looks like this is it good
yep
it dosent work (i added and G.GAME.blind.boss the game still loads)
but it dosent work on ONLY the boss blind
what''s your goal
if (#G.playing_cards - G.GAME.starting_deck_size) > 0 then
local effects = {}
for i=1, (#G.playing_cards - G.GAME.starting_deck_size) do
local joker = pseudorandom_element(G.jokers.cards, "seed")
table.insert(effects, SMODS.blueprint_effect(card, joker, context)
end
return SMODS.merge_effects(effects)
end
```?
x2 chips and mult only on boss blind
Is this an enhancement?
why are you adding an event then?
idk
You would put everything in the config in extra and remove the event.
you would need to check if its the boss bliind and return xmult (and does xchips exist? @daring fern )
Yes.
it does
Then do ```lua
if context.main_scoring and context.cardarea == G.play and G.GAME.blind.boss then
return {xchips = card.ability.extra.x_chips, xmult = card.ability.extra.x_mult}
end
Realized it's better to ask as a new question. How do I make this effect-copying with merge_effects work? The joker
is supposed to copy the effects of jokers, based on the keys of the jokers added to a table
I'll try that thank you!
not wkr
work
(also if you want to make your code look nicer and more readeable press shift + alt + f)
Have you tried printing the get_joker_return?
I’ll do that when I get home and send it here
thank yiou
i want to make an effect that prevents jokers from being debuffed, but i want to interpose any debuff attempts with a 'not allowed' attention text - so since i imagine that the entirety of vanilla debuff sources are not convertd to use SMODS.debuff_card, is there some universal debuffing event i can look into? 
No, you would probably just use SMODS.current_mod.set_debuff
it's an optional feature? 
No.
It just triggers on Card:set_debuff and you return 'prevent_debuff' to prevent debuffs.
does it take any args?
like the debuff target in question
Yes, it has the card.
Try putting some prints in the function.
oki doke
No, I was referring to the function not literally the value of get_joker_return
how's this btw
That last print is mostly useless.
removing
how do i print the function properly again
cause obv just putting the function in the print would just crash the game
Just do local ret = function(...) print(ret)
where does this go? the places im putting it keeps giving errors fixed it
How would I apply the soul's animation with a custom image?
What is G.shared_soul? I'm assuming it's that's the image?
It's a Sprite.
how would I insert my own image there?
You would change the atlas and pos.
new crash :(
You're not inputting a card into the function.
can you explain what you mean? i'm foreign to this function, remember
How are you calling it?
something to do with this maybe?
(this one uses self it's fine)
maybe even cause of how the table is formatted?
I must be doing something wrong here, because I get an error, attempt to perform arithmetic on field x, a nil value.
local image = Sprite(0, 0, self.CARD_W, self.CARD_H, "WillatroOrgans", {x = 1, y = 0})
image.role.draw_major = card
image:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
image:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
It needs to be G.ASSET_ATLAS["modprefix_key"]
How do I edit the "score at least" text at the end of a round?
My joker saves you like mr bones but idk how to make it say "saved by ___"
You return the key of a localization.
Not sure what that means
Tbh
My joker is intended to save you multiple times
It works fine as is I just don't know where to put the return to edit the end of round
Now it's attempt to perform arithmetic on W, a nil value.
Code?
local image = Sprite(0, 0, self.CARD_W, self.CARD_H, G.ASSET_ATLAS["willatro_WillatroOrgans"], {x = 1, y = 0})
You put the key of an entry in Localization > misc > dictionary
Still new to modding how would this look in code
The localization?
I'm brain farting rn
why doesnt this work
G.hand.cards not G.hand
Would this be how you write a action with a chance of happening
if pseudorandom('dishsoap') < G.GAME.probabilities.normal / card.ability.extra.odds then
SMODS.add_card({key = "j_loljk_bubbles", edition = 'e_negative'})
end
odds are set to 2 in config
oop
What's the variable for the current money the player has
I want to subtract money per activation of a joker
oop
G.GAME.dollars
woahhh
You need to add_to_deck and emplace
how
Is G.GAME just like, to get the current value of anything like money, chips, probability
card:add_to_deck() and G.hand:emplace(card)
Anyway
How do I change this so the money subtraction has an animation
Or at least is prominent
use ease_money i think
ease_dollars()
that or return dollars
ease_dollars(how much to give, negative if you want it to go down)
if i wanted to turn the entire hand into 1 selected card would i still use this or would i do something different
i the mini try
You would still use copy_card, yes.
Yes.
so how would i make it flip all the cards in hand, turn them into the card, and flip em back?
for k, v in pairs(G.hand.cards) do
if v ~= G.hand.highlighted[1] then
copy_card(G.hand.highlighted[1], v)
end
end
isn't that what i was doing up above
No, because G.hand.cards[card] doesn't exist.
Whenver my code says eaten, I die
Whenever my code says saved, the game doesn't progress to the results screen and permanently softlocks
Even though in both instances death should be prevented?
Shouldn't the "saved = j_cheese_wheel" prevent death by itself
can i see the full code
Card function
Btw the first saved bit works every time
I've had no issues with the first if statement
neither return works?
The first return works
How do you define a mega arcana pack
The second return fails differently depending on the message I add
p_arcana_mega?
have you tried removing the message
if context.joker_main and not card.ability.extra.triggered then
SMODS.add_booster_to_shop({
key = "p_arcana_mega",
cost = 0,
weight = 1,
})
like this?
when i play a card with pink enhancement on a boss blind
extra doesn't seem to be in config
oh
is this how you do the add booster thing?
No, it's SMODS.add_booster_to_shop("p_arcana_mega")
oh
like this?
can i make it free?
Yes.
yeah
cost = 0
how do i make a consumable increase hand size for 1 blind?
like on a comma?
it works now
No.
heres the last bit of code for mine
No.
They're trying to create a free mega arcana pack in the shop, I think.
oh
Also setting cost = 0 still wouldn't work.
wait clarification
the joker creates a free mega arcana
ah
and gives xmult per skip
you would probably need something to keep track of that globally and then hook SMODS.calculate_context or the round reset thing to change it back
so it creates a mega arcana pack and gains xmult per skip or gives
can i do this
would this work
would it give naneinf mult
No.
aw
Do math.huge
lol
can i share my joker code
Yes.
It's SMODS.add_booster_to_shop("p_arcana_mega") not SMODS.add_booster_to_shop({ "p_arcana_mega", cost = 0, weight = 1 })
is it free by default?
Also you can't add a booster to the shop in joker_main
i got the print working, but i dont know what i should be looking for, especially since the print log is absolutely massive
just curious, why do we leave an extra set of parentheses after SMODS.load_file() (when wrapped in assert())?
Because it returns a function.
oh, that makes sense! i didn't realize lol
my framerate hit 0 😭
Ok maybe during shop?
What is the goal?
Free mega arcana in the shop
You would probably do it on context.starting_shop then.
Then double xmult every booster skip
did my computer crash

does the print log help at least
this is after triggering a fake Fibonacci
Perhaps, it would be better to give the other method a try?
come again
"invalid booster key: p_arcana_mega"
but that’ll change the actual joker,,,,,
and I can’t change to two jokers at the same time
No, it wont.
wdym invalid booster key: p_arcana_mega
It's p_arcana_mega_1
ok but can I change it to 2 jokers at once
the multiple effects is kind of a key element to this
ok now how do you change the cost?
No, but you can change it in to 2 jokers after changing the first time.
so if I wanted it to blueprint and brainstorm at the same time is it possible
for example
Yes.
The problem is, it doesn't work with events.
im listening 👁️ 👁️
My extra blind system came quite in handy for this one hehehe
I NEED THOSE MAN
now how do i make it do the flip effect
how could you do this
It only crashes if the joker it's copying refers to it's properties in an event.
evil
how do you change the cost?
ok but my transformations are events
cost of what
of the added booster
Yes, but do they happen during the time the joker would be checking for calculations.
No.
booster.cost = 0
uhhhhhhh
the transformations only trigger after the joker’s triggered, so I don’t think so?
Then it wont crash because of that.
Why wouldn't cost = 4 work?
Because they want to make it free?
jsut do cost = 0
Oh sorry I mean why booster.cost instead of just cost
Because this is not a custom booster?
This is a booster added to the shop?
And then I also have an event for it to do this
but I think that’s also post calculation?
hello dev chgat
is there a simple way to just flip a card, with noises and everything
card:flip()
The only times it would have the possibility to crash is if the joker it's copying is triggering an event while referring to it's joker specific properties.
thatll make the noises too?
Oh awesome
Actually no it doesn't
is there a reason vremade uses so much G.E_MANAGER:add_event
Yes
does it concern me?
No.
is it booster_cost or booster.cost?
It depends on what you called the variable of the created booster.
Anyways
Piggy Bank but angry
so how would I do that 😁 (while I undo the other stuff)
only time ive ever had to use an event is for a single card
i'll just send the lua again
how do i make it play the noise
play_sound('card1')
where do i put it?
the whole lua file is crazy
of course it is
Something like this:
oh thank god it’s a pa—oh my god

“Something like?”
So I can still use the key table stuff with all that right
Yes, just replace card.ability.soe_jokers
Some of it is just for saving values and fixing events.
Ohhhh ok ok cool
It's this with all of that removed: ```lua
if card.ability.soe_jokers and next(card.ability.soe_jokers) then
local old_ability, old_center, old_center_key, extra_jokers_list, jokers_table = copy_table(card.ability), card.config.center, card.config.center_key, SEALS.get_quantum_jokers(card), {}
table.sort(extra_jokers_list, function(a, b) return (G.P_CENTERS[a].order or 0) < (G.P_CENTERS[b].order or 0) end)
table.insert(extra_jokers_list, 1, card.config.center.key)
for _, k in ipairs(extra_jokers_list) do
SEALS.safe_set_ability(card, G.P_CENTERS[k])
local joker = card:calculate_joker(context)
if joker then
table.insert(jokers_table, joker)
end
end
card.ability, card.config.center, card.config.center_key, jokers = old_ability, old_center, old_center_key, SMODS.merge_effects(jokers_table)
else
local jokers, triggered = card:calculate_joker(context)
end
oh that's
actually not that bad
Yes, I said it depends on the variable.
i have to give it a key?
what does juice_up do
the little shake animation
replacing it with the table, right?
what is this doing
Yes, the table of keys.
playing the sound
i think it does a different volume for each card? something like that
so what about these function here?
You mean safe_set_ability?
and the get_quantum_jokers
can i just remove those or do i have to set them up
I think you would just replace that with the key list.
the exceptions table?
or literally the table list of keys again
Yes.
👍
oh my god
G.GAME.round_resets.free_rerolls = G.GAME.round_resets.free_rerolls + mod
G.GAME.current_round.free_rerolls = math.max(G.GAME.current_round.free_rerolls + mod, 0)
calculate_reroll_cost(true)
end```
So I'm not 100% certain why there's both `round_resets.free_rerolls` and `current_round.free_rerolls`
current_round likely refers to the amount of free rerolls left
and round_resets to the amount you start with each shop, if I had to guess
Mmm, thanks
Yes.
oh right, because edition badges are dark_edition
does this go in my main file or the joker file?
does set_card_type_badge() also bypass creation the mod badge, or no?
i'm assuming no because the mod badge is always created afterward
It doesn't really matter, as long as it is loaded.
ill put in the main for organization sake
SMODS.add_voucher_to_shop(key)/SMODS.add_booster_to_shop(key)
Adds a Voucher or a Booster to the current shop.
key - the key of the object to be added. If no key is provided, the next seeded object will be used
oh... p_arcana_mega_1.cost = 0
no i'm just stupid
i swear i'm a dumbass
So I got a question
Im so stumped
What is missing from this or wrong for my joker to say xnil, the add joker bit im working on after but the xmult shows as nil instead of giving rhe defined x2
If anyone can figure it out thank you, and no I dont have discord on that laptop so that's why before anyone asks
what do you mean it depends on the variable? what variable?
center.ability.extra.Xmult
Where do i put that ? Im like rather new to this
Wait
No nvm the part where it is just center.extra.xmult I need to add ability yeah m
?**
yes
boosters are cards and cards have a cost attribute
i'm trying to make the mega arcana free
SMODS.add_booster_to_shop("p_arcana_mega_1")
someone suggested i use
booster.cost = 0
and they also said it depends on the variable
i don't know what variable they're talking about
it's kind of cryptic
ok FINALLY got it all down
what's next
local booster = SMODS.add_booster_to_shop("p_arcana_mega_1")
booster.cost = 0
Does it work?
oh thats the whole thing
i didnt know that was the whole thing so i havent tested yet
testing now
how long does it take to finish reading the entire lua documentation?
is there a way to detect when a sound stopped playing
bro is trying to become the other 2%
i think reading the lua docs is good but they're kinda crappy
i'm not, i'm just terrible at what i do.
i have self-esteem problems.
like play the sound and dont continue events until the sound is done
try adding a delay(seconds)
like an hour
i did but sounds dont change from game speed, delay does
man what in the hell
no idea then
Oh? Is someone else working on an Inscryption mod too?
it's literally just the ijiraq for now
but it's literally just my hyperfixations (hence mod name)
So far I've added all the avian cards and took a break to figure out how to modify booster pack pools (what a mistake that was)
that sounds so painful
Very
No
(tested with gros michel) (it does not gros michel)
Can someone help, I'm new to this n I'm trying to get my joker to give an Xmult but nothing is working
I should send code actually
send code
I have to take a picture dont have discord on the laptop
what am I looking at 
what are the params for juice_up
Idek myself icl
where is your calculate
Non of the things I saw had it... 😅 how does one even do that
tested it, first param seems to be scale and second is rotation
Thank you, I feel like a lost child in a Tesco rn 🥲
Well erm idk where to put it or anything it didn't rlly help but I did it, dont have any errors popping up and it didn't change the fact its still xnil
Is code autocompletion possible for balatro modding? I'm used to terraria modding where you can just type and have a list of variable names come up.
Yes.
Nice, how do I set it up?
Does loc_vars for Backs not support info_queue?
You put SMODS and the lovely dump in your workspace.
Okay so even that is pretty much the same as my code and still it dont work
The more I do this the more my brain hurts
AFAIK no, you need to use {T:}
Hmm...
I guess that's a decent compromise, but it's primarily for putting an artist credit on the backs
did you restart the run before testing
Yes saved and restart
It does
no it doesn't
Lovely dump?
center.ability.extra does
I have center.extra too
where and why
function Hyperglobal.safe_set_ability(self, center)
if not self or not center then return nil end
local oldcenter = self.config.center
G.GAME.hpfx_ijiraq_savedvalues = G.GAME.hpfx_ijiraq_savedvalues or {}
G.GAME.hpfx_ijiraq_savedvalues[self.sort_id] = G.GAME.hpfx_ijiraq_savedvalues[self.sort_id] or {}
G.GAME.hpfx_ijiraq_savedvalues[self.sort_id][oldcenter.key] = copy_table(self.ability)
for k, v in pairs(G.GAME.hpfx_ijiraq_savedvalues[self.sort_id][center.key] or center.config) do
if type(v) == 'table' then self.ability[k] = copy_table(v) else self.ability[k] = v
if k == "Xmult" then self.ability.x_mult = v end
end
end
self.ability.x_mult = center.config.Xmult or center.config.x_mult or 1
self.ability.name = center.name
self.ability.set = center.set
self.ability.effect = center.effect
self.config.center = center
for k, v in pairs(G.P_CENTERS) do
if center == v then self.config.center.key = k end
end
if self.ability.name == "Invisible Joker" then
self.ability.invis_rounds = 0
end
if self.ability.name == 'To Do List' then
local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do
if v.visible then _poker_hands[#_poker_hands+1] = k end
end
local old_hand = self.ability.to_do_poker_hand
self.ability.to_do_poker_hand = nil
while not self.ability.to_do_poker_hand do
self.ability.to_do_poker_hand = pseudorandom_element(_poker_hands, pseudoseed((self.area and self.area.config.type == 'title') and 'false_to_do' or 'to_do'))
if self.ability.to_do_poker_hand == old_hand then self.ability.to_do_poker_hand = nil end
end
end
if self.ability.name == 'Caino' then
self.ability.caino_xmult = 1
end
if self.ability.name == 'Yorick' then
self.ability.yorick_discards = self.ability.extra.discards
end
if self.ability.name == 'Loyalty Card' then
self.ability.burnt_hand = 0
self.ability.loyalty_remaining = self.ability.extra.every
end
end
Can't remember why I put it there but it just kinda worked idk
Is there a context to detect when cards are drawn
I'm making a Joker that has a 1 in 8 chance of debuffing a card when each one is drawn
well that's why it says nil so it's not working
Oh where do i need to put it
you don't just return { vars = center.ability.extra.Xmult }
Mods/lovely
also you might want to change center for card, it's not a center
context.hand_drawn does that but you might want to use context.debuff_card instead to debuff a card
Gotcha
How do you pull a joker description from the game state in lua?
Have you tried putting a print in that function?
what's the end goal?
is there a way to make it so pressing next round sends you into the next blind under a bool condition
and also change the text
Ok HOW do I print here? So I don’t crash my computer again
Found it, thanks. And for steammodded, I should use this directory, correct?
I am making a bot to play the game and want my bot to know what joker it's going to purchase. I am pulling the name but want the description so I can scan for text like chips or do NLP to determine if that's an effective purchase.
print "test"
oh ok
Does it matter where?
Outside of the ifs probably.
G.localization.descriptions.Joker.card_key.text
Ok so after I removed the center.extra it says I have ability a nil value ....
is there a way to tell if something has been ignored in the shop?
specifically im looking into making a joker that scales when a rare joker is skipped
I would probably just take those values from the card itself if you are already interfacing with lua
qwherre would i find information on this
You would check if G.shop_jokers.cards has any rare jokers on context.ending_shop
context.ending_shop, iterate through all cards in G.shop_jokers
I was hoping to get it from the card directly yeah
waitttt thats smart ok
Doesn’t print
Still not getting autocompletion. I added the folders to my workspace.
and the same could be checked on reroll no issues?
can i see the code again
it's better to just provide the answer here instead of just saying Yes and waiting for the other person to ask again
Try just opening the mods folder.
change Card back to center
that's not what i meant lol
Oh
Did the patch work?
I’ll look
Can't figure out how to make the drawn cards debuffed, this is what I got so far
if context.hand_drawn then
if context.debuff_card and pseudorandom('splinter_of_dread') < (G.GAME.probabilities.normal / (card.ability.extra.denom or 8)) then
return{
debuff = true
}
end
end
anyone?
both context don't happen at the same time, that's why I said "instead"
you want only debuff_card
Oh alright
So with that change what else do I do
it is in fact
Not patching
does it work now
What does the place it is supposed to patch look like?
Doesn't crash now but still nil
you're also using Xmult and xmult, use only one
That was me forgetting to hit shift when typing my bad
Got a weird dev question: how do I remove the whole "Modded Orders go after the vanilla order"
...At least changing it for a specific mod
What am I supposed to download from this? It's been merged and it's not really clear what I should download from the way its written.
nothing, follow the how to set up part but using the smods folder
Now it says 2x mult but doesn't actually do anything
Is this the lovely dump?
yes
- you're returning mult in calculate when you want xmult
- card.ability.extra.mult doesn't exist
It did debuff playing cards as they are drawn, but it also occasionally debuffs cards where I don't want them to like Jokers, how do I limit it to playing cards? context.cardarea == G.hand didn't work for me
if context.cardarea == G.hand and context.debuff_card and pseudorandom('splinter_of_dread') < (G.GAME.probabilities.normal / (card.ability.extra.denom or 8)) then
return{
debuff = true
}
end
let me try something
Been trying to look around Smods' files to no avail
Am I supposed to get these errors at first or have I misinterpreted the directions?
context.debuff_card.area == G.hand iirc
remove the comments
Oh damn you can stack contexts like that?
So I changed the things and no errors hasn't crashed and then when I play a card it crashes
Trailing comma too?
wdym
the comma is fine, but you do need to change the paths to actual paths
oh my god I put function instead of functions
what's the code
Ok, are these paths relative?
return { Xmult = card.ability.extra.Xmult }
Still didn't really work, gave me an error attempt to index field 'debuff_card' (a nil value)
if context.debuff_card.area == G.hand and pseudorandom('splinter_of_dread') < (G.GAME.probabilities.normal / (card.ability.extra.denom or 8)) then
return{
debuff = true
}
end
uhh no idea :3
So I was just being blind n missed one 😅
you need context.debuff_card and before
Ohhhhh
i do recommend copying the structure from vanillaremade if you can
Now it's getting very fucky
- Drawing cards didn't make them debuffed, even with the help of OA6
- However, cloning OA6 with the debug tool will preemptively debuff the cards already in hand, removing/selling those OA6 jokers will just remove the debuffs on some of them
Yeah just gotta fix my image problem now coz the card art isn't working
@red flower Where do I find the love2d annotation folder? And do I need the balatro directory in AppData or steamapps\local?
you need to get love2d separately i think, i would ignore that
I don't need it?
nah, 99% of the time you don't use anything native
the balatro directory should be the lovely/dump something mentioned
ok i can definitely say it’s patched
you will need to grab me at a time when im more awake honestly lol
Maybe I'll forgo context.debuff_card and just use SMODS.debuff_card
I need the lovely dump even though it asks for balatro source?
is there a method for giving random consumables to the player I can use?
yes, it's the balatro source but with all the patches applied
SMODS.add_card{key = "c_modprefix_key"}
lets say I want so that its the default game's consumable
how should I do it
like any consumable?
local random_set = pseudorandom_element({"Tarot", "Planet", "Spectral"}, "seed")
SMODS.add_card{ set = random_set }
?
yeah
didnt work
you need to update the text too
unless it didnt update visually
ah, how
thank you
I appreciate
the line after that in the link
This is my .luarc.json, but I don't think I'm getting any real suggestions. It's just those "abc" suggestions with random words.
yes
basically how the chips and mult display shake
How do you make a Joker not available in shops and booster packs
yeah i think so
@red flower
something with in_pool
it needs to be in your main workspace directory iirc
It’s still going.
oh my god it’s over
taking out the print so I can test properly
how would i do this?
Which directory is that? Cause I tried putting it with my workspace file in my mod's own folder, and it didn't change.
read the source code until you find it :3
gulp
I'm not sure, I would show you mine but I'm not on my pc rn
ok on one hand
It worksish! On the other hand
It’s so incredibly laggy
the frame drop is painful whenever it triggers
actually yeah no just in general
as long as this guy’s on the screen it initiates superlag
I’ll bring that up tmr though I need sleeeeeep
(Ok the game crashed yeah Im going gn all)
Figured it out. I had the directory right, I just needed to install the Lua extension.
I assumed vscode came with it, but it doesn't
i checked blind.lua and surprisingly it doesnt look like its there
it looks like G.GAME.blind.chip_text SHOULD be the object
no that's the text
thats just how i see it
like the string text
yeah ik
where would i find the text object
any pointers?
i found blind:wiggle()
it's in create_UIBox_HUD
in UI_definitions?
it doesn't have an id so it's going to be hard to manipulate
yes
what's the method to like execute function when the hand only get played and not for every card already?
maybe i can just blind:wiggle
oh wait no it does
what is it!?
try G.HUD:get_UIE_by_ID('chip_UI_count'):juice_up()
did I even say that correctly
lmao
no movement
does this mean its incapable of movement?
elaborate?
so like
I use a function that triggers
every card
lets say I only want it to trigger once the hand is played
and not for every card
How do you add custom badges to tags?
in calculate?
context.before
thanks
what's the end goal? it could be a lot of different contexts
only just trigger when the hand starts
its a passive card
the one that gives
consumables
lol
yeah before is fine then
is there any way to add SOME form of animation to show the player the blinds value just changed
alr thanks
also is there a method to force loose the game?
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
How do you access a pool created via SMODS.ObjectType?
no
okay
I would've thought it was in G.P_CENTER_POOLS but i'm getting that the pool is nil
ty
it should be there
Do pools not add prefixes by default?
G.P_CENTER_POOLS['fnwk_women']
another weird question how can I make a multiplied mult
i dont think so
for some reason I didnt find any methods for that too
return { xmult = value }? I don't entirely understand the question
ohhhhhhhh
xmult
any formatting i missed here?
or terminology that can be shortened
blind's*
also in my mod I use Blind's requirement but I think your text is clear as well
i dont recall balatro using puncuation
trying to keep my text as vanilla as possible
I've got a text question too that I probably should have asked here
or commas, but i dont recall balatro using '
How can I make this description shorter? "+2 Mult per rank difference between highest and lowest scored card"
it doesn't remove it, it just doesn't have any words that require 's
except Driver's License i guess
but it makes the description harder to read
it does use commas tho
i guess the rules for formatting are off and on
no, it just doesn't use periods
impretty sure theres like 5 jokers that use commas
scrolling through the wiki I count several more
Hmm, I'm trying to get my tag to create cards in the shop, but for whatever reason, if you have multiple, it creates both of them in the second slot and overwrites the other? hm
check if theres room
There should inherently be room. For example, if you use two or more rare tags, it spends rare tags up to your number of shop slots
that's weird, what's the code
i have one like that in my mod and it works fine
Basically trying to do the same as the rarity tags but using a custom pool
local women_in_possession = {}
local women_count = 0
for _, v in ipairs(G.jokers.cards) do
local results = FnwkFindWomen(new_item.key)
if (results.girl or results.trans or results.woman) and not women_in_possession[v.config.center.key] then
women_count = women_count + 1
women_in_possession[v.config.center.key] = true
end
end
if #G.P_CENTER_POOLS['fnwk_women'] > women_count then
new_woman = create_card('fnwk_women', context.area, nil, nil, nil, nil, nil, 'fnwk_biased_tag')
create_shop_card_ui(new_woman, 'Joker', context.area)
new_woman.states.visible = false
tag:yep('+', G.C.RED, function()
new_woman:start_materialize()
new_woman.ability.couponed = true
new_woman:set_cost()
return true
end)
tag.triggered = true
return new_woman
else
tag:nope()
tag.triggered = true
return nil
end
end```
Config type is correct
women_in_possession is crazy 😭
hmm i dont see it
this is mine btw
https://github.com/nh6574/JoyousSpring/blob/bfe4f9bfc4d38135c652aeed94b0942ad0a1f736/src/others/Tags.lua#L30
The rare tag uses "Rares in Possession" so I decided to keep it because I thought it'd be funny
it is only with this post i realize you made vremade
i used it once oen sec
thanks
card:is_suit("Hearts")
etc
local v = context.other_card
if v:is_suit("Hearts") or v:is_suit("Diamonds") then
thanks
only works in context.individual
OOP wait
since im scoring per card
how can i add custom badges
Women are now available for purchase
CRAZY 😭
local new woman available
in my area????
Objectively this shouldn't be a good tag but since you can get both Blueprint and Brainstorm from it..........
shrug
in your cardarea
How do I access the scored cards in hand?
this item isnt op right
context.scoring_hand
Death but better
how does one change hand size again
G.hand:change_size(mod)
Me when I ask N how to find happiness in life and he tells me 'self.ability.happiness = true'
How do I change a Joker's pos in the calculate function
not op enough, its honestly one of the worse cards
Thanks for fixing my code N 👍
card.children.center:set_sprite_pos{ x = 0, y = 0 }
Ayy cheers
"srite" 💔
biggest lie ive ever been told
I'm too used to C#
the only language i know is lua so im thankfully exempt from programming ptsd
hey whats the variable for your current hand size
indesicive cards
wait until you find out about using multiple files
has someone figured this out yet? :3
My mod is roughly 90-95% done programming wise. Probably more like 85% on the art side
Very exciting!!!
i found out about it a while ago but i was already too deep
I don't think any of the mods i'm working on is over 50%
I mean one is art wise
I'm primarily be a programmer so art is not my main contribution to my mod because art sucks and I hate it
i don't have any plans for my mod so idk how close i am to finishing lol
real
my art sucks so i mostly just import images into cards
Same, but i want to get better at art so i suppose it's a good thing i still have a lot left in some of my solo mods
I'm a decent ish artist but I hate drawing so I don't do it
I also consider my self a decent artist
i'm only good at art for very few things
like ui
dunno how to program it but i'm good at making it
I can do pretty good 2D illustrations, pixel art is new for me but I've made some solid attempts
I'd say i'm good at 3d design, and decent at 2d all together
Probably my favorite one I've done of the few I've contributed
But just design i can barely make a 3d asset T_T
that's really good actually
this is my best art, really bad but decent
I'm going in from C# with very little lua knowledge. Is this code right or is it complete nonsense?
The one that's my favorite and the best i think I've done i did a while a go for sdm_0's mod
One note is that you don't need parenthesis for outermost conditions in Lua
This one
Otherwise it looks pretty good? Though capitalizing local variables or parameters isn't typically the style for Lua (as with Card)
man yall good artists
It conflicts with the greater object type, Card
My creative practice is powered by lesbianism, mental illness, diet coke, and a seething hatred for late stage capitalism.
Is what I did the right way for a joker to get information about a scored card?
I just see what other art does and try to do similar stuff, it rarely turns out as i wanted though.
For rank, you need to do card.base.value for the key of the rank, or you can use card:get_id() to return an id for the rank that can be modified by hooking the function
The keys are 2-10, Jack, Queen, King, Ace, and the IDs are 2-14 (for vanilla)
How can I get the numerical value of the rank, like the base chip value?
That would be SMODS.Ranks[card.base.value]. nominal I think
I think the nominal is also scored on the card itself but idr
it was not G.hand_size
Card.base.nominal?
got this error while doing a rebate/idol-style rank check
local function reset_kls_magenta_rank() -- line 451
G.GAME.current_round.kls_mg_card = { rank = 'Ace' }
local valid_mg_cards = {}
for _, playing_card in ipairs(G.playing_cards) do
if not SMODS.has_no_rank(playing_card) then
valid_mg_cards[#valid_mg_cards + 1] = playing_card
end
end
local mg_card = pseudorandom_element(valid_mg_cards, 'magenta')
if mg_card then
G.GAME.current_round.kls_mg_card.rank = mg_card.base.value
G.GAME.current_round.kls_mg_card.id = mg_card.base.id
end
end -- line 464
Might be?
G.hand.card_limit
Also I was mistyping, it's card.base.value, not card.base.rank
are you sure bc when I try to print it returns nil
Oh i forgot the config, it's G.hand.config.card_limit
How do I use the debug mod? Trying to spawn my joker to test
peak ty
is it possible to have a joker blueprint multiple jokers at once? or is it limited to only 1
Yes
what's the weight to make my booster pack as rare as a spectral pack
Well here's my first crash. "Attempted to index field 'base' (a nil value)"
find it in the collection and hold down ctrl and press 3
thanks
how would i replace a child node of something in the node's config.func
would i just index 2 jokers instead of 1 and have a second return
currently i have
function(e)
if not e.children[1].config.is_thing then
e.children[1]:remove()
e.children[1] = nil
e.children[1] = Node{n=G.UIT.T, config={is_thing = true, text = "meow", colour = G.C.RED, shadow = true}}
end
end
but that doesn't seem to be actually doing anything question mark?
i think the first param G.FUNCs is e which is the node itself
oh
weird question but how would i check in a joker if a specific voucher is redeemed?
trying to fix an edge case
try removing Node and just having the table
engine/ui.lua:541: attempt to call method 'draw' (a nil value)
The 2nd would be an extra to the first so something like this joker1 = SMODS.blueprint_effect(card, target_joker1, context) joker2 = SMODS.blueprint_effect(card, target_joker2, context) joker1.extra = joker2 return joker1
@crisp coral this is why i did Node in the first place
guh?
when i'm doing Node, it doesn't crash, but also just. doesn't draw at all
How do I get the rank of a card like Raised Fist does?
I tried card.base.nominal and it did this
i fear this will be a lot more complicated
check you're indexing the right thing
try e.UIBox:add_child(table, e) after killing the child
but i just set it to nil
e.children[1]:remove()
e.children[1].UIBox:add_child{...}
like this?
Well that part works now. I just had to change Card to card. My effect gives +0 mult but it doesn't crash so that's good.
seems e.UIBox is nil
??? what's the main object
What could be causing this to give +0 mult?
i'm adding func = "my_thing" to the config of a G.UIT.C containing the child i wanna replace
nevermind it's not e.UIBox?
I'm defining both highest and lowest as nil initially, but it's supposed to set them to a number
huhhh i thought e would be the uibox of the column node
define them as -math.huge adn math.huge
it is
uibox does exist i was wrong
something else is fucky
What's the fastest way to reload after code changes?
hold m, which is the same as closing and reopening balala
mmmm
you know, i don't think that's right
making a joker which stops planets and planet packs from appearing, but the booster pack specific code is crashing when i pick the joker up, what would the best way be to go about this?
uhm... hooray???
Changed but it's still +0 mult
no, swap those
any synergies yall can think of if you could put jokers in your consumable slots
only one i can think of is brainstorm
not taking up a joker slot to trigger
Still +0
i'm trying to replace the operator node (the X for multiplying mult and chips)
{n=G.UIT.C, config={align = "cm", func = "operator_node_shit"}, nodes={
{n=G.UIT.T, config={text = "X", lang = G.LANGUAGES['en-us'], scale = scale*2, colour = G.C.UI_MULT, shadow = true}},
}},
operator_node_shit is what's being called here
<@&1133519078540185692>
I take out the nil check and it gives me "attempt to compare nil with number"
hm
Even though it's never nil
As soon as the card is selected btw
Where else?
context.scoring_hand is too wide of a calculation check, it exists in many calculation contexts
My entire mod is this one joker
Try adding and context.joker_main
This won’t work
Card reference to the joker
Oh that too
Not playing catds
What will that do? I'm trying to get the ranks of the cards while they're being scored, then use them when the joker is scored to output the mult
What are you trying to do
^
context.joker_main is generally when jokers give their values like chip and mult
So you want the sum of ranks as mult
?
The math is different but that would probably be the same approach
That sounds easy enough
1 second
You’ll use context.before to calculate and context .joker_main to give mult
So before is before scoring but after hitting play hand?
So do you want scored cards ? Or just played card
Scored
Yes
Okay
For _,v in impairs(context.scoring_hand) do
Card.ability.extra.mult= Card.ability.extra.mult+v.base.nominal,```
Use this to calculate the mult bonus
Have a variable in config called mult
Inpairs typo
Return {mult=card.ability.extra.mult,
}
Card.ability.extra.mult=0,
— for reset mult each hand :)```
This bug is happening that wasn't happening before and I can't figure out why. The joker is supposed to prevent death like mr bones but it softlocks
Any ideas would be appreciated
is there any way to draw a selected card from the deck first before any other card
Once you return something it won't execute what's afterward
Yes
is it easy?
praying it is then
The top card is always known so you probably just change that variable
oh awesome
can i change it mid draw
Hmm
This is how aiko does it
If you look in some mod like cryptid with a billion jokers I bet it'll be in there somewhere lol
But it cycles through different cards
You need to find the draw function and edit it
Should be easy
my end goal is to have a card enhancement that makes sure it's always drawn first
function(e)
if e.children[1] and not e.children[1].config.is_thing then
e.children[1]:remove()
e.children[1] = nil
e.UIBox:add_child({n=G.UIT.T, config={is_thing = true, text = "meow", scale = 0.8, colour = G.C.RED, shadow = true}}, e)
end
end
@tranquil gull fuckin hell
Cards dont have unique ids so you can’t draw your specific card
You can do
Draw enhanced cards first
the pillar
That's helpful but the main thing I'm trying to deal with is this. I get a "attempt to compare nil with number" before scoring starts. I think I need a different context
yeah i think im gonna just scan the full deck and if any cards have the enhancement draw them to hand, and after ive looped through every card ill resume the games normal events and draw the real cards to hand
Not the playing cards
.
And highest is nil aswell
you forgot to return true in your event
might have to make a hook for this
(Might )😭
hook onto what though is the question
context?
is there a context for drawing cards to hand?
🤷
Oh
Still getting nil with number
Lol yeah that makes it work
I know practically nothing under the hood with this game I'm going purely off of how vanilla jokers work
Idk what that return true even actually does
I should've noticed that though because it's in every other joker that expires
I rather just use a for instead of individual like i showed you

