#💻・modding-dev
1 messages · Page 333 of 1
how do i make end_of_round context only trigger when the boss blind is defeated?
and i think it currently works perfectly fine too
if G.GAME.blind.boss and context.end_of_round and context.main_eval
think it'd be better long term to make your own center
so if you want some kind of custom functionality that jokers cant give then you can jsut do that
🤔 i dont think theres any a dummy joker cant do, or at least, i havent thought of one for now
the whole reason we got into this convo was because of something it couldnt do
how im planning to do the hand_size thing through update is that it compares two number variables
if they are different, change hand_size
i dont think that should affect performance too much
im gonna make a skill tree mod just to spite you
oh its not a per run thing?
nope
ill have to do that too
im using both G.GAME and G.PROFILES to ensure that theres no cheating inbetween
its a pain in the ass when you have to accout for all possibilities 😭
seems overly complicated for something even vanilla balatro doesnt do
why is my long if statement not working?
im sure there are people out there who can do this with much less effort lol
yes like me and mogan
bcus we are going to make rougelite balatro now
just to spite you
😭
like this
(#G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit)
da
dawg is gonna steal my job 🥀
anyways, at least i have jokers that wear equipments, stats and buffs :3
Sorry for barging in, but I might need some tips on basic stuff
why does steam keep closing 😭
Is now a good time to ask?
do you have decks tho
fair point
too many of them to be specific
for using debug helper for lua in VS how do i use it?
dont ask to ask - ask right away, there are always people here available to help u :3
chat is this a dont ask to ask moment
You guys looked busy at the moment
im trying to see how code runs im not sure how to do
whats that??
LuaHelper for VSCode
use these
only these
i used it once but i dont remember exactly how it works i think you need run and debug and make a config file
if this is for balatro modding you probably dont need it tho
I have these installed
ok ok
im kilign youruse
why is if not G.GAME.used_vouchers[v_bvjokers_gamblingdisorder] then not working
It needs to be a string between the square brackets.
im stupid
my dumbass was looking for the error in the key itself 😭
last thing for the Lua understandingim pretty sure it is reading my joker needed to be made here
Here is the loop where it loops at joker combo
it is pulling barry and other one pretty sure but doesnt make flayfluff
question, if i were to use this to check for whenever a card is destroyed, what context do i need to use? i noticed the warning but its not clear enough for me 😭
if not scoring_hand i think
something like this then, right?
guh
no it should
hm, maybe i remembered it wrong
check other mods code?????
actually maybe just remove playing card
try doing that and printing smth
it is remove playing card
couldve swore there was a bug about destroying cards or something in the vanilla code 😭
i think this one is never used
bluh
if context.remove_playing_card then
print("Hi!")
end
yeah im gonna try printing
oh hey, its correct
if context.remove_playing_cards and not context.scoring_hand then
hi aiko
what is it
ok
hi
when joker dies
lovely
seals guy i am going to revoke your reaction permissions
hey, leave them and their reaction privilege alone
nah :4
aaalright i think this should work perfectly now
how do i make a joker wiggle like dna or invis?
juice_until
so uh... how do i use it?
how are you using it
close enough eh?
turns out updating soul_pos every frame is not enough
It's juice_card_until
Also you have to mention when you want it to stop.
the context?
no
you need to use G.STATE
(or add some logic to update a value in the joker on ending_shop)
As a noob, I have been trying to figure this out for an embarrassingly long time
When the hand is played, check the cards held in hand if there are face cards. If there are, then add +15 Chips to itself, If there are not, then do not add Chips. At the end of the hand, add all accumulated Chips to score.
Here is what my code looks like, currently it upgrades regardless of if there are face cards held in hand, so I need to fix the face card held in hand checker
your code only stops upgrading once it finds a face card
so if the hand order is like 32KA, the first two cards will still be upgraded
also, for clarity, do you mean "held in hand" or "in played hand"? the joker description says the former but your code is attempting to implement the latter
in played hand would be G.play
oh right i'm dum
Yes, context.other_card:is_face() should work during G.hand, right?
Yes.
That's good
context.other_card also exists in G.discard if you enable that optional feature.
yea my bad
the issue is that it will be checking, and upgrading, for every card in your hand, instead of checking over every card in your hand before performing a single upgrade
You should be checking in just context.before and iterate through the cards in hand and if there are no face cards then upgrade.
time to retrigger consumables
(I Know How To Do This, Trust)
Does steamodded's support for Xchips have the cryptid sound effect?
man wtf
Yes that's exactly what I meant
i have a joker that literally does that
Thanks for confirmation
Thats what SMODS uses.
Oh? How do you resolve the issue in your code?
https://github.com/miniscoped/stuffz <- modules/joker.lua just search "sad_face" and look at the calculate function
A Balatro mod that adds jokers with horrible art. Contribute to miniscoped/stuffz development by creating an account on GitHub.
oh btw
how do you enable the optional features of smods
SMODS.current_mod.optional_features = function()
return {
retrigger_joker = true,
post_trigger = true,
cardareas = {
discard = true,
deck = true,
}
--- ^ for example
}
end
If you want to target other CardAreas (say, context.individual and context.cardarea = G.deck), cardareas = {} should be returned, where the {} contains said names of areas.
No.
how do you save stuff to the profile
Put it in G.PROFILES[G.SETTINGS.profile].variable
Help I was dreaming about coding my mod and Tobuscus started invading my return tables
🤔
It’s on the private docs 🙃
-# He is the modem to the doc-network.
I see
this must be why you are the Wizard
do you have an orb that you ponder
and if so, is it the jimball
oh
I've found some shenanigans
does calculate_retriggers() have documentation '-'
No it’s not an outward facing function
ah
did i break something, why is pseudorandom('mySeedHere') < 0.25 always true
yes
What are you trying to do
on game start, title screen card has a 1 in 4 chance of being polychrome
except it's obviously being 4 in 4 for whatever reason
it's not been not polychrome once since i implemented this.
oh
the value's not going to change on the menu
Could it be that the seed stays the same?
Yeah there’s no seed there
🫠 wonderful
Could there be a pseudorandom function that takes from any other source?
math.random
Is there a way to grab the current time maybe or smth?
self.SEED = os.time() from globals.lua.
I'd imagine that's how the wheel works on the multiplayer mod title screen
this has no gameplay effect you can just get away with using math.random
yes
wheel up
use math.random for non-gameplay things
juice_up is a peak function name is that vanilla
good to know
There’s also juice_card
Thank you very much for providing your code for reference
It is a good learning resource
juice_up: good, takes you out to dinner first, best coworker
juice_card_until: evil, most annoying neighbor, guilty of 10 counts of murder
You should also download it and play it for more knowledge :trol:
I've come up with an alternative solution for my retriggering
unfortunately it may end in an infinite loop
juice_card: locked away in the basement forgotten about for all eternity?
yes
it did lmao
technically not infinite, but it only worked on one card instead of all five
What’s the retriggering problem you’re trying to do?
Does it have a calculate function
yes
And you’ve added the custom area to the calculation pipeline right?
yup
So you just want some other object (joker?) to retrigger this custom card?
yes
SMODS.Joker({
key = "friends_movie",
atlas = "card_backs",
pos = { x = 6, y = 7},
config = {
extra = {
repetitions = 1
}
},
loc_vars = function (self, info_queue, card)
return { vars = {card.ability.extra.repetitions}}
end,
rarity = 3,
cost = 8,
blueprint_compat = false,
calculate = function (self, card, context)
if context.weapon_hit or context.weapon_missed then
-- loops until there's no ammo, which is expected
SMODS.calculate_context({friends_movie = true, other_card = context.other_card})
end
end
})
here's the jank code, for reference
What’s this code supposed to do?
retrigger all held weapon cards once
which technically works with the jank™️
(the retriggering part, at least)
Have you tried this?
if context.retrigger_joker and context.cardarea = CARDAREANAME then
return { repetitions = 1 }
end```
I think I did? if I didn't I might feel silly here in a few seconds
I don’t remember how the retrigger context is structured fully because I don’t use it
Let me double check
Did you ever figure this out?
Maybe this is better
if context.retrigger_joker_check and context.other_context.cardarea == CARDAREANAME then
return { repetitions = 1 }
end```
ahhhh i'm so close ://///
Pikmin Cards are like custom suits that can be created and stored at any time, as long as you have the correct onions
You need to have Pellet consumables to create them.
I have no idea 😭
-# Which method you are using for changing frames?
Damn. I have a custom seal and want to make a challenge deck that is JUST that seal (like what you were trying to do) so that's unfortunate.
It shows up with the seals in the deck preview, too
neither of those worked 😭
basically a very simplified version of the Aura mod
Changing .children.floating_sprite at any point?
nope, but just discovered that in the source code, currently trying it out
i changed children.front instead
...reminds me, wanted to make this silly guy as a floating animated sprite.
Can you throw this in the joker calc function and send me the output?
local output = “”
for k,v in pairs(context) do
output = output .. k .. “/“
end
print(output)
unicode " 😭
Oh rip do those ones not work either
omg i did it
Mobile coding 😭
Speeeeeeeeeeeen
congrats thats really cool
too bad my code is typescript transpiled to lua 😂
I mean hey if it works
there is so much output 😭
do you even want all of it
Yes
okay
-# More logs, more details.
Screenshot preferable
'boutta snort those logs like coke
prepare for a lot of screenshots
Or a text file would be fine
oh okay
Just not inline code, it’s a pain in the arse to read on mobile
god damn I have to stop doxxing myself 😭
You want to retrigger the weapon hit?
yes
or miss; the weapon needs just needs to fire twice
This one looks to have fired four times?
updated version; without doxxing myself
five; once per card
Okay let me adapt the print somewhat
@maiden river
if context.retrigger_joker_check then
local output = “”
for k,v in pairs(context.other_context) do
output = output .. k .. “/“
end
print(output)
end
played hands arent going in the hand table properly
okay 😭
this one used to work but got broken
Indent your code properly and you will see the problem
is it the end?
What’s the new card area called?
indented better, still dont see it
G.weapons
What did you put as the retrigger context code?
This one
if context.retrigger_joker_check and context.other_context.cardarea == G.weapons then
return {
repetitions = 1
}
end
please get the lua extension and auto-format the code lol
the problem is that context.after is inside joker_main
i have the lua extension
?
coded this before i got it
how do i make a joker have a different effect and retrigger cards?
rn im trying to make a joker that retriggers all foils and gives xchips if a condition is met
And this didn’t work?
nope
Huh
then shift+alt+f or right-click > format document
...this is not an extension, more of for syntax highlighting & folding. @lethal stratus
Can you put a print inside it?
yes
Did it retrigger?
anyone know how to fix this?
this is the code:
--- STEAMODDED HEADER
--- MOD_NAME: Test Mod
--- MOD_ID: TEST
--- MOD_AUTHOR: [CebeeDrawz]
--- MOD_DESCRIPTION: Test Test
--- PREFIX: xmpl
----- MOD CODE-----
SMODS.Atlas{
key = 'JokersTest',
path = 'JokersTest.png',
px = 71
py = 95
}
SMODS.Joker{
key = 'jokertest'
loc_txt = {
name = 'Test'
text = {
'test test',
}
}
}
----- MOD CODE END -----
i'm trying to follow a tutorial and it looks like i did about everything right but it crashes
it seems like you're using an old tutorial
you forgot the comma after px
and after the name of the joker
help ^^^
i'm kinda looking for a video perhaps
I don't think there's a more up-to-date video
There is a video there.
someone is working on one, I think
oh nice
anyway yeah it worked and i'm amazed
i didnt even think i could come this far
thanks guys
didnt use the right image though..
Been thinking about making one in passing ngl lol
You’re not specifying the atlas and position in your Joker
where should i do that?
it does actually retrigger the loading part, which is weird
Guys is this posible to code ingame?
gains chips?
yes, i dont know if there's an easy way to do it tho
yeah
that did.. something
it should be (0, 0) not (1, 1)
i made this but i had to do some custom calculate_joker logic and it only works with my cards
btw is there an easier way to reload the game instead of closing it and opening it back up
alt+f5 i think
Hold m or press ALT + F5
alt f5 is faster
true
Is this similar to the one i gave?
similar in that it gives chips to a joker yes
I mean
if you're a coder dev, wouldn't the answer be yes anyway
yeah
I mean, some are not CURRENTLY working on a mod
I mean, I guess
or just doing some test things
Finishing description for this atm.
Never tried this but I wonder if giving a Joker a perma bonus would work?
sets your game speed to 1 
I'm trying to make a Joker like that on a mod but the codder said that he didn't knew how
if it works just like that it would be funny
"Predicts the boss blind for the previous ante"
Agreed lol
Is the code on GitHub? I might need to have a proper play
yeah
get the source code 
and prepare for a wild ride
(it's now revealed that it was all an elaborate trick, to get eremel to play fvb. raevyn cackles in delight)
both
Like have a Joker give Xchips on scoring or just add Xchips to the Joker?
Pfffft I don’t play this game I just test stuff
Me playtesting my mod with 0 Jokers from my mod: 
In my case my mod made the game somehow harder XD
astra have you played fvb 
xchips = value works
XMult has the same effect tho
I’m like Eremel, I don’t play the game I just code 
true
i like xchips it has a nice sound
maybe you should take a break
[spoken akin to the green goblin mask]
also my mod has a million cards so sometimes i want to make chips/mult counterparts
Coding is fun, there are other games I’d choose over balatro to have fun
that's fair
although I keep accidentally getting into the comp scene of every game I play often
but it got me a college scholarship so I'm still unpunished 
You should check Replicube if you like coding
Looks interesting
how do i make a joker see the presence of other joker?
why is there so little documentation on how to make custom card areas 😭
there's next(SMODS.find_card([key]))
a lot of people just don't do it
thanks
but i want toooo 😭
what do you need to know
just yk... how to do it...
for what
for a new type of reusable consumable i want to make
replicube is basically just fucking around with desmos:the game
Still a nice game
also it's 10 dubloons. I feel like I can get the same experience for cheaper on a website or smthn
Ok
you want it to show up on the side like the consumable area or in another way entirely?
I mean, sure
but you're also supporting a solo dev
just below the consumable tray
the field spell area for my mod is like that but I also have a bunch of extra logic for it so you might need to check out another mod lol
but here's the code if it helps https://github.com/nh6574/JoyousSpring/blob/58749c3f350bbf101e0167e19bf072008c6119ea/src/extra_deck.lua#L255
And I'm all for supporting indie devs... but I can get nuclear throne, REPO, terraria, GMod, or Undertale for the same price
type = 'extra_deck' can be type = 'joker' (or 'jokers'?) in your case
isnt balatro 15
i feel like this is the wrong discord for this convo lol
😭
or, for the price of a single aaa game, you can get all of those games and balatro
but can you lose a baron mime build to the plant on ante 7 in terraria?
balatro should be 80 dollars
yes, but I'm also getting hundreds of hours of enjoyment out of balatro
you could get hundreds of hours out of that game
my point wasn't about the price, it was that all those other games are monumentally more enjoyable
I really doubt it
unless you replay levels
how can i give money during a retrigger?
i mean if your point is that its not good enough for the price then yeah maybe but i dont agree with the time/price argument
does the 0, 0 dictate the position of said card area
yes
i dont set it there because im setting it after the consumable area is aligned
(i love magic numbers)
omg now i see why people stay away from card areas
like theres like 3 mods that does it
wait so you're just saying you're not buying it because you don't like it 😭
and fvb 
woah does that mean you can help 👉 👈
for sure, but tbh most of the reason im coding is for a challenge and to learn
you can look at the fvb code 😭
tbh I did most of it months ago and I'm lost in the sauce
...redefine Joker and Consumable cardareas to be more compact. 😂
the fact that i love balatro only helps
doesnt work if 5 mods want a cardarea on the right side lol
yes lmao
I actually have two card areas in fvb, and three if you have another mod that has a cardarea in it (maximus)
i have 2 visible ones and like 10 invisible ones
I didn't speak of other mods, just the two areas by themselves. 🍞
oh i get it now
would be funny to make all jokers wee sized
and cram them there
Wee^2.
wee debuff
yoo
they shrink down when you pick them up
had to hook emplace but it was all worth it
just found this in the shop
I gotta rework this 😭
card_limit = self.GAME.starting_params.weapon_slots,
type = "joker", -- set this to joker to properly handle use/sell buttons
highlight_limit = 1,
view_deck = true```
so for clarification, in your mod is this what actually creates and displays the area?
yeah that's what creates the area itself
and do you define the position of the area later?
I think so
I’ll take a break when the mod is done 
10 more jokers to go and then I’m basically just waiting on art
ten more?? you're insane
I've gotten one joker "done" and it doesn't even work
over the span of this entire weekend lol
10 more is light work for me atp lol
I made 45 consumables
I can tell 😭
And like 20 jokers
I respect the hell out of y'all's commitment to the modding scene of this game
@maiden river @red flower urm guys...
The goal is 150 total jokers to match the base game count lol
And that doesn’t even take into account the other features lol
Uh 💀
persists between runs
roguelite balatro
hm..
that's a crazy goal
idek dawg 😭
my goal is also 150 (i have 329 rn so i have to cut down)
You forgot a comma after loc_txt
Comma after your loc_txt table
tbf i dont do art so that helps
wait, where?
Question for all coding devs. Are you working on a mod as the codder rn?
9
9
1
Yes
1185774262519337042
blueprint
was this legit confusion or just a funny screenshot btw
that needs a comma?
100% lol
i can imagine it helps if you have a decicated artist @sturdy compass ...
genuine confusion i have NO idea what im doing
where are you initializing the area
the only code i have so far 😝😝
@deft bane my main mans 💪
Oh
There are two others who have done art too but it’s mainly him
You didn't call the reference
what reference dawg 😭
start_run_ref
ah
YAYYY
how would one find the location of the consumeable tray and set the card areas pos to that - how ever many pixels?
like this?
5
yeah like that...
idk
LMAOO
OH GOD
how do i stop info_queue of other jokers appearing in info_queue?
like here. i dont want there being 'token joker'
@red flower one last question. why isnt my card area moving like how the others do with parallax when you move your mouse and it doesnt look like its under fisheyes
instead of an info queue directly referencing a center just set it to a key and set table
info_queue[#info_queue+1] = {key = "j_whatever", set = "Joker"}
what do i write in the set?
depends exactly on what you're looking for
if it's a joker its Joker if its a tarot its Tarot
idk what you mean
here how when i move my mouse, the card areas all kinda move around apart from mine
ohhh i dont play with any of that on idk
Why do you have screen shake 100?
its more dramatic ...
how do i make a simple x1.5 mult card that activates each scored card?
context.individual
...sure
well, not the entire code
just a tutorial on how to add mult
this is my first joker
oh gimme a sec
Did you watch the video in the thread?
not yet
i pretty much just want what the default joker does but x1.5 mult
but i'll do that tomorrow
it's getting late
thanks for the help guys
never coulve done this without yall
here
might be really simple and stupid but I can't for the life of me figure out how to just change a joker's name with take_ownership. I got atlases and custom sprites working, but not names.
The 2 ways at the end both just crash the game, and the one at the top just makes all the text disappear. I tried including a description there as well, but then I got a crash because of a variable and I don't want to remake the entire description setting for every joker that might get more complicated.
i think it's because they get overwritten by the localization files
you can do that instead
just change the names in my own local files?
you can have a localization file in your mod and add a descriptions.Joker.j_joker field
im pretty sure ive never done it myself
bump
how come this crashes? i copied what the steammodded wiki said just changed the colour
Remove the octothorpe.
the what
i dont know those fancy symbol names
too classy to say hashtag
No.
did some more googling based on the localisation tip and got it to work by just putting this at the end of my file
now how am i supposed to use this if i wanna make my bg 13FOEC and my text FFFFFF
why arent you just using HEX()
Use HEX()
`colours = {HEX('000000'), HEX('FFFFFF')}
that does make sense thank you
same but dw, it gets easier!
@red flower so with my cardarea code, when i open the collection the sprites just go onto the screen and become draggable and when i start a run my game immediately dies
weird what's the code
text aint white :c
hmm i dont know if that emplace hook works how you want, i think emplace does more things
or maybe not idk
ill try it without
nah was thinking of another function
taht did fix it...
amazing
but like, how do i emplace my cards now...
i personally do a couple of lovely patches for that
Just bumping this now that it's a more reasonable time of day
send the code
anyone knows how to use retrigger_joker feature?
are specific boss blinds only identifiable with G.GAME.blind.name?
chat how do we feel about this joker name = 'We Do Some Trolling', text = { '{C:red}+69{} Mult, {X:mult,C:white}X10{} Mult', '{C:red}1 in 10 chance every blind{}', '{C:red}selected that the game ends{}' }
.config.blind.key also works i think
feeling like yandev
😭
btw if you use three grave keys simultaneously,
like this
you can make code blocks that span multiple lines
There is definitely a better way of going about this via indexing SMODS.Ranks
ah thank you, thats what i was looking for
ah ill have to look into that
if name == rank then
letter = 'a'
else
local joined_key = tostring(rank)..":"..name
local values = { "8:8" = "an", "14:Ace" = "an" }
letter = values[joined_key] or "a"
end

does anybody have any context code for creating and destroying playing cards with jokers? i just dont know how to go about it right now
i wanna check for the leftmost joker and destroy it but i dont know how to check for it
lua is 1-indexed
i dont have any code but for creating use the function create_playing_card and for destroying return { remove = true } in context.destroy_card (more info in the docs)
card ~= G.jokers.cards[1] for not equals
(my t key is broken i type double t sometimes sorry)
sorry im new to this, which docs? and i got it to destroy all the cards, so im working with that for now
thank you!!!
it works! you a smart man
is there a context for new ante?
also is there a way to not destroy a consumable on use?
keep_on_use.
tyyyy
how would I add a new tab to this menu
I'd start by taking the headset off the screen but maybe that's just me
aiko's mod does it iirc
for the hardcore challenges
blehhh why does it crash when trying to check for a rank
@tall wharf is this true
take the brackets out of ipairs
oh lmao
is it
bump...
idk that's why I'm asking you
the patch is not exactly compatible lol
dam 😔
so like
I need it for rougelite balatro
😭
aka hiker
unless yall have any better ideas as to where I should put an upgrade selection menu 🙏
Having a minor issue with event timing. I want to add a visual trigger in addition to card activations, but I can't seem to find a way to play an event exactly parallel with another
i mean
Here's an example:
I can get this aura flare to play when the card is first triggered, but I can't seem to line it up with when the card actually applies its specific mult effect:
what does seed mean in pseudorandom?
random on computers aren't actually random
it basically takes an input and changes it to somethin else
You need a seed value in a pseudorandom number generator. You use the pseudoseed() function, which accepts a string, and that gives you a numerical seed for the prng to use
ya i know but i was asking on what to put there
does anyone know when G.hand.config.temp_limit resets to G.hand.config.card_limit
and that string should be the runs' seed?
No, it's just whatever you want that's a unique string for the pseudorandom call
Each joker in vanilla usually passes in an abbreviated form of that joker's name
how does the seed affect the random chance then?
Wdym?
how does the seed affect the output of a probability since its not the same with every seed
The purpose of unique seeds is so that the pseudorandom calculations of individual rolls don't affect each other
The way a psuedorandom number generator works is taking a starting numerical seed, performing some mathematical calculation on it that appears random, and then spitting out a new number. That new number "advances" the seed one place
And the game tracks a table of the current seed value for each unique seed used
If two rolls use the same seed, it means that one roll advances the seed position of the other, which the game avoids doing to make it harder to scum random rolls
(You can't get a different judgement result by opening a booster pack, for example)
(With an asterisk, most modern computer systems do actually have access to "true" random calculations. It usually involves getting information about things like atmospheric noise or the value of electric currents, which might be deterministic at some level beyond what quantum physics can predict, but for computing purposes are random)
according to steammodded docs, LocalThunk likes putting the joker's name as a string as the seed
seeds in vanilla are usually the name of what's triggering the effect + the ante number
yeah
anyway, this is the function I use to create the aura effect. These values are just set to tell the shader to do something
--- @param stand Card Balatro card table representing a stand
--- @param delay_time number length of flare in seconds
G.FUNCS.csau_flare_stand_aura = function(stand, delay_time)
if not stand.children.stand_aura then
return
end
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
blocking = false,
func = function()
stand.ability.aura_flare_queued = true
stand.ability.aura_flare_target = (delay_time or 1) / 2
return true
end
}))
end```
but I still haven't figured out how to correctly delay this event to wait until exactly the individual card effect I want to play it on
Have you tried putting the effect in func
usually, random number generators pick a long string of numbers for their seed, and usually it's tied to something that can't be repeated (a really simple example is your computer's unix timestamp)
putting in a seed basically tells the random code "I want you to use this string of numbers instead of whatever you were going to pick".
And forcing a seed means it will always pick the exact same thing every single time in the same order, regardless of any factors. That being said, any seeded randomness inside of a joker will still be affected by the randomness of the run's seed. So there's kinda two layers to this "seeded randomness"
Yeah. For whatever reason, it plays it as a separate "juice" after the stand effect goes off
What if you put the mult inside extra
Hmm... haven't tried that
That's the effect of the func argument
Still testing putting the mult later
AYYY that works
thanks Victin!!
I have no idea why the opposite doesn't work, I guess the events typically used for the card text are probably unblockable
Yeah
Wait
No
The other way around
Events are usually blocking and blockable
Otherwise they’d all happen at the same time
Oh, hm
Yours isn’t blocking
So putting it first makes it happen simultaneously with the next one
And nesting with extra ensures the mult is triggered after
I have some messy talking Jokers because idk how to make the text not interrupt or not be interrupted by scoring but also not get on top of each other
So it’s just somewhat awkward right now
does anyone know if consumables can have an update funcyion?
-# why do people keep using update
WELL ITS REUSABLE AND IT BECOMES USABLE AGAIN ON START OF A NEW BLIND
But why use update for that 😭
can't you use can_use for that
How do you increase the weight of a joker in shop?
You could set a "used" flag in use and use calculate for the applicable context to set the "used" flag back to false.
yeah i have card.ability.extra.used_this_ante but i didnt know consumables could have calculate functions...
give it a custom rarity
else there's no way other than implementing your own rarity system (like i do in my mod :3)
the self promo is crazyyyyy
Hmmm, i wanted to edit other jokers weights...
a hacky way is to give them in_pool functions that have a pseudorandom chance but i feel like that might have problems
buh
you could take ownership of jokers and give them a custom rarity, or take ownership of a rarity and change its default_weight
Is there a way to get a jokers rate? if there is i could have x chance to replace cards in shop with those jokers
I want it to change the rates in a different way
well common has a rate of 0.70, uncommon is 0.25 and rare is 0.95
Initialize the roid_card first.
local ret = igo(self)
ret.current_round.roid_card = {}
ret.current_round.roid_card.rank = 7
...
You can try to capture the function that creates a card to replace the card it’s creating
I did that for Cow
im working on a rougelite mod and i need help figuring out what the hell i should do at this point
what needs to be done is a menu for configuring your upgrades (ill figure that one out on my own)
and saving what upgrades you have unlocked and selected
that second one is what i need help with
what is the code to delay a line of code for like half a second?
delay = time in seconds inside an event
ah okay
Is this too strong? It's basically like card sharp but it applies for every card in the played hand
I am wondering if it should be rare instead
"Scoring cards give X2 Mult" would be the better wording.
words is hard, thank you!
I made it so it will read the state of To Do list, if you have one and respect that hand, otherwise it will handle duty of settin the todo variable
i heard abt a program that turns all text in a file into localization files, does any1 have that on hand?
is there one for outside of an event?
no
Question - my booster packs appear and have the right cards, but they all say 'error'. What's the fix for this?
@red flower it’s GorgeousPing
Localization didn't find the right entry.
where's yusei fudo
Gorgeous Ping? Sorry I don't get it!
I'm watching the shwo and playing the game with the kids, we've only seen part way through the first series so far. Yusei was cool in the movie though!
i think it's a pun on joyousspring
gorjus
I have a Yugi jonkler and an Eldlich, but otherwise its all animals in my mod. Had to add Yugi and Eldlich for the kids
Now I get the joke 🙂
Furry Yugi when
i liked the moogle guy
No! I changed the name from Pawlatro, everyone thought it was going to be furry. Mine are all cute animals
Would Yugi have a Kuribohsona
i need to go back to the final fantasies
Play Mario Hoops 3 on 3
Thanks! he picks a random hand, and if you play that hand he has a random chance to enhant the cards in the hand. A play on his little dances in ff6
i did actually
Thanks for the shout @old cairn
how can i make my consumable draw your full hand to deck then change your hand size back to the original, this is what i have
My Yugi swaps back and forth between kid and adult yugi. You have to play the right hand to show you believe in the heart of the cards! It was cool to get the different joker sprites working
You could just "force-draw" instead of increasing hand size.
is there doc on how to forcedraw?
G.FUNCS.draw_from_deck_to_hand(amount) is responsible for the drawing.
@red flower I love the booster packs, I didn't notice them before!
@hushed field drew them
Ice stays winning
look in the source, at state_events.lua line : 363. You will see how card drawing is handled there and I think it will inspire you
ah okay ty!!
wait insire??
I read an article with localThunk, talking about his ideas for long term official modding support. It would be so cool if my mobile only friends could play some of these awesome mods.
official lovely patches when
I had to do some patching to get the public to_do_list var added, like the ancient joker var
Drop the code screenshot first.
-# Then wait for if someone picks up.
its too much for a screenshot
Welcome to the club
whats the error?
is there any way to easily change the names of spades hearts clubs and diamonds in game for when making custom cards and you want to change what the suits are?
refactor maybe?
what is that?
basically cntrl+f
ctrl+f in what? the games code?
ig so that might work
Show the code around line 13 in the mod.lua?
should be SMODS.load_file
do you guys know the default weight for existing booster packs?
assert(SMODS.load_file("effects.lua", "scribbled_edition"))() ?
Using my consumeable in my booster pack is taken as selecting a card in the booster pack (this is not intended behavior)
This is my code for using, and for my booster pack, I don't know why this is happening
how use SMODS.signed_dollar()? :clueless:
does anyone know why my booster doesnt work?
set isnt the key, set is what it is (Joker, Tarot etc)
ahh
replace set with key
how in the world did this happen
this is somehow causing issues, code works fine without it, am i missing something here?
this didnt work either...
spectral should be capitalised
i wasn't aware it was case sensitive, ty
all of lua is code sens <3
why is this animated atlas not working properly, ingame it only shows the first frame
are you my long lost twin
I am also making a mod with anomalies 😭
thats insane
burmp...
this anomaly is simply part of an incredibly complicated pathway to obtaining certain jokers
how do you destroy a card? because I don't want to find the code for it.
mine is a custom rarity
womp womp
but yeah, this for some reason just doesn't work
card:start_dissolve()
and yet the exact same setup works for my blind
joker?
consumable
huh
how do i make it work for that then
why was I on tht message
manually 😁
"replace set with key"
this is one HUNDRED frames
yea I said replace, not create another set with the right value
you gotta make a custom draw step and stuff
remove set
damn you localthunk
card:remove()
seeing 2 people with ena pics here sounds like they're talking to themselves
LOL
what are you making an animated sprite
animation atlases don't work well with cards
a consumable
they dont at all, the center needs to use AnimatedSprite() but it uses Sprite()
I mean we are different sides of her so
true
You have 2 choices, make the center use a different class for the sprite (alot of effort), or change the .pos.x or .pos.y values in the Update function
no need for custom draw steps like squid said
also, there is a mod that makes alot of things animated
maybe it has code you can look at
i was gonna try looking at jimball code in cryptid
Jimball metho is how I do my animations
i'm not sure where it's actually handling the animation in the code
line 924.....
search for cry_jimball_dt
or cry_pointer_dt
which lua file is it actually in
github and vscode search will tell you
discord doesnt add line numbers, which joker is that
SMODS.Joker{
key = 'yankee',
loc_txt = {
name = 'Y',
text = {
"{C:attention}destroys all played 2's{} gains {C:mult}+#2#{} mult for {C:attention}each destroyed 2{}.",
"{C:inactive}(Currently {C:mult}+#1#{C:inactive} mult)"
}
},
atlas = "Jokers",
pos = {x = 0, y = 3},
config = { extra = {
mult = 2,
mult_gain = 3
}
},
unlocked = true,
discovered = true,
rarity = 2,
cost = 7,
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.mult,
card.ability.extra.mult_gain,
}
}
end,
calculate = function(self,card,context)
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() == 2 then
card:remove()
ard.ability.extra.mult = card.ability.extra.mult + 3
message = 'Upgrade!'
end
if context.joker_main and context.cardarea == G.jokers then
return {
mult = card.ability.extra.mult,
card = card
}
end
end
end
}```
for i = 1, #context.scoring_hand do
scoring_hand is not always defined
for i = 1, #context.scoring_hand do
this line
oh it isn't?
No. Only a handfull of values are passed each time. look at the link i sent to see them
how am I going to fix it?
this is really complicated
make the sure the value is actually a thing with an if statement, and read the link i sent
im pretty sure this is where its handled but i dont know how to read this code
or how to translate it to my own usecase
so I have to make an if statement before the for loop?
dt is time since last change, pos is the location on the atlas that the texture is
if its been 0.1 since last change, run the code in the 2nd if statement
the reason for the if elseif elseif, is because jimball uses several lines for its animation
That... is a lot of frames.
yeah i wasnt even sure if id be able to load it in
but its for quite the special card in my mod so
do I?
i was really hoping id be able to make this work
you can use modulo to increase the y value
Do you mind if I dm you riley?
i wish there was just a lib i could use to automate this or something this is way beyond my skill level
go ahead!
...what about all frames spaced out horizontally instead?
wdym
One line, 100 frames.
that could work
https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/ef3fe636a7330c2782668c80aec0a7464873c50e/items/joker.lua#L1518-L1521 This is what I use for my "Joker Update" joker to mimic how the pre-2000 Windows Update logo was animated.
Before the Joker definition, Line 1489 also has the "frames" by the x position.
I played 5 2's and Y disappeared.
I want it to remove the 2's not remove the joker.
how do I fix that?
card:remove()
I have to change this.
Does anyone know how to setup a path in load_file?
One of my lua files is in a folder, and I want to load it from the main file
Here's my setup
hm
context.other_card?
?
Replace card with context.other_card
just started making my fist mod what is s_mult and s_chips it it the mult of that hand at lvl1?
card.ability.extra.mult = card.ability.extra.mult + 3
do I have to change this too?
I'm gonna bump this because it's a big issue for my consumeables
No because the variable is connected to your joker not the card you're removing
ok
context.other_card:remove()
line 927
SMODS.Joker{
key = 'yankee',
loc_txt = {
name = 'Y',
text = {
"{C:attention}Destroys all played 2's{} gains {C:mult}+#2#{} mult for {C:attention}each destroyed 2{}.",
"{C:inactive}(Currently {C:mult}+#1#{C:inactive} mult)"
}
},
atlas = "Jokers",
pos = {x = 0, y = 3},
config = { extra = {
mult = 2,
mult_gain = 3
}
},
unlocked = true,
discovered = true,
rarity = 2,
cost = 7,
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.mult,
card.ability.extra.mult_gain,
}
}
end,
calculate = function(self,card,context)
if context.before then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() == 2 then
context.other_card:remove()
card.ability.extra.mult = card.ability.extra.mult + 3
message = 'Upgrade!'
end
end
if context.joker_main and context.cardarea == G.jokers then
return {
mult = card.ability.extra.mult,
card = card
}
end
end
end
}```
code for Y fyi.
can anyone help me no know why my booster doesnt work... crashes on open
what's domain?
a custom consumable type
ok?
mf u asked
I don't think that's how create_card works
I'm wondering how to fix this.
SMODS.create_card, maybe?
what is the card area for consumables called
G.domain
We assumed you were using context.individual, not context.before, that's why you should show all of your code, use context.scoring_hand[i] like you are for the get_id, and message = 'Upgrade!' doesn't work outside of a return, use card_eval_status_text instead, which is structured like this:
card_eval_status_text(context.scoring_hand[i], 'extra', nil, nil, nil, {message = 'Upgrade!'})
key = 'small_myth_2',
atlas = 'prismboosters',
kind = "Myth",
pos = { x = 1, y = 0 },
config = {choose = 1, extra = 3},
loc_vars = function(self, info_queue, card)
return {vars = {(card and card.ability.choose or self.config.choose), card and card.ability.extra or self.config.extra}}
end,
create_card = function(self, card)
return create_card("Myth", G.pack_cards, nil, nil, true, true, nil, "mythpack")
end,
ease_background_colour = function(self)
ease_colour(G.C.DYN_UI.MAIN, G.PRISM.C.myth_1)
ease_background_colour{new_colour = G.PRISM.C.myth_1, special_colour = G.C.BLACK, contrast = 2}
end,
group_key = 'k_prism_myth_pack',
draw_hand = true,
cost = 4,
weight = 1,
particles = function(self)
G.booster_pack_sparkles = Particles(1, 1, 0,0, {
timer = 0.015,
scale = 0.2,
initialize = true,
lifespan = 1,
speed = 1.1,
padding = -1,
attach = G.ROOM_ATTACH,
colours = {G.PRISM.C.myth_1, lighten(G.PRISM.C.myth_1, 0.4), lighten(G.PRISM.C.myth_1, 0.2), darken(G.PRISM.C.myth_1, 0.2)},
fill = true
})
G.booster_pack_sparkles.fade_alpha = 1
G.booster_pack_sparkles:fade(1, 0)
end,
Here's a booster pack from Prism
ah i got it working ty
You can see how it works
i was missing SMODS.create_card
-# (first time asking for help here, so apologies if i say something dumb lol)
so basically i have a joker that debuffs the joker to it's right (don't ask questions it makes sense trust me) and it does debuff the joker, just doesn't show the "X" icon usually on debuffed cards and i can't figure out why
i'm pretty sure i used the right contexts but tbh i have no clue
Another one that hates their own retinas I see
why isn't the use button being highlighted here?
i didnt know notepad ++ had a dark mode ☹️
now Y doesn't give you mult.
Code
SMODS.Joker{
key = 'yankee',
loc_txt = {
name = 'Y',
text = {
"{C:attention}Destroys all played 2's{} gains {C:mult}+#2#{} mult for {C:attention}each destroyed 2{}.",
"{C:inactive}(Currently {C:mult}+#1#{C:inactive} mult)"
}
},
atlas = "Jokers",
pos = {x = 0, y = 3},
config = { extra = {
mult = 2,
mult_gain = 3
}
},
unlocked = true,
discovered = true,
rarity = 2,
cost = 7,
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.mult,
card.ability.extra.mult_gain,
}
}
end,
calculate = function(self,card,context)
if context.before then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() == 2 then
context.scoring_hand[i]:remove()
card.ability.extra.mult = card.ability.extra.mult + 3
card_eval_status_text(context.scoring_hand[i], 'extra', nil, nil, nil, {message = 'Upgrade!'})
end
end
if context.joker_main and context.cardarea == G.jokers then
return {
mult = card.ability.extra.mult,
card = card
}
end
end
end
}```
code!
You don't need context.cardarea == G.jokers, it only runs in G.jokers
bump, the intended effect here is to apply an edition to a selected consumable
ok.
Try removing the if part of the condition and pull the else stuff out of the condition to see what that does
huh
i mean if i have most of it like this, were everything says "hand.highlighted" instead of "domain.highlighted" it works, but it only applies the edition if i have a playing card selected
i assumed i could just replace all instances of hand with domain but that didnt work
does SMODS have built in exponential mult?
i think talisman does
it is still uploading.
ah fuck it ill code it myself
it's just emult/emult_mod, instead of xmult/xmult_mod
...if that's true, I may have an idea to buff a Joker I made a while ago.
does this not work
this is a joker file, the functions are contained in a center file
how do you have the balatro font...
bump
can a consumable return +mult with a calculate function?
Probably? At least you can make it do an equivalent thing, I've seen it
hmm cause this doesnt like to work, but when i had the same code in a joker it worked fine
You probably have to do smth hacky
Use SMODS.debuff_card rather than card.debuff, that handles the effects and the function
It's SMODS.debuff_card(card, true/false or 'reset', string identifier (can be anything))
bruh.
Check if card.ability.extra.activated is true in a print or something, just to make sure
Oh, "mult" isn't a defined variable
when i use it elsewhere or eval it in game it returns what the mult currently is...
Hmmm
and even if that didnt work, it should return a message
Did you check if it was true inside the final_scoring_step context?
oh shit what could i even use instead of final_scoring_step since it isnt a joker and there is only a hand.chips value during final scoring step
If you want it to run similarly to an Observatory planet card you could make it joker_main, it'll run after jokers
so it turns out that all of the calculation is done before anything even actually scores (visually) so it's probably applying the debuff effect and then immediately taking it away
idk how i'd go about fixing this though
oh shit does that really work?

