#💻・modding-dev
1 messages · Page 659 of 1
anyone know what i did wrong? the context individual seemed to have caused it to apply to each individual card, but idk how to make it trigger only once for the hand
wait do i put it here?
you're doing it in context.individual
https://github.com/nh6574/VanillaRemade/wiki#how-do-i-get-if-the-player-has-a-certain-card
how many mistakes am i making?
peak\
This part crashes the game with the error "attempt to index local 'center' [a nil value]"
My assumption is I am doing the SMODS.add_card function incorrectly
I'm having some issues with pools, I'm trying to make a tarot that only spawns jokers from a pool of modded jokers but it isn't working and I'm not sure why SMODS.Consumable { set = "Tarot", key = "hamburger", loc_txt = { name = "Hamburger", text = { "Create a random {C:attention}Hamburger Joker{}", "{C:inactive}(Must have room){}", }, }, pos = { x = 0, y = 0 }, atlas = 'hamburger_1', use = function(self, card, area, copier) G.E_MANAGER:add_event(Event({ trigger = 'after', delay = 0.4, func = function() play_sound('timpani') SMODS.add_card{ set = "food_Hamburger", area = G.jokers } card:juice_up(0.3, 0.5) return true end })) delay(0.6) end, can_use = function(self, card) return G.jokers and #G.jokers.cards < G.jokers.config.card_limit end, }
key = "food_Hamburger",
default = "j_hamburger",
cards = {
j_hamburger = true,
},
})```
Shouldn't this work?
I think the area isn't needed because set = Joker auto puts it in jokers but if not I think it may be that it should be 'G.jokers'?
Neither worked sadly
damn sorry
All good
I figured it out
The key it is asking for is the full key in the localization file and I was only using what I stored when creating the object
ah gotcha
Unironically you helped because your 2nd code snippet
oh, happy to help
Sadly I cannot help with you issue in return
no worries
should be j_[mod prefix]_hamburger
I feel, slightly moronic for such a simple solution but thank you a bunch
it worked perfectly, I just feel a bit dumb
How is the negative edition's effect calculated if not in the edition object
In vanilla remade it has no on_apply or calculate
My edition crashes when I enter the collection screen for editions so I am just wondering
can you pause a animated atlas and set its frame?
I do not know much but if the atlas has the whole sprite sheet then you should be able to pick out specific ones. Not sure if I fully understand the question or am qualified to help at all though
yeah it does
how do i do that though is the question
Oh
It uses the config.
I am not qualified, I apologize
Is there a section in the SMODS wiki or vanilla remade that I could look at to understand
If you could count which frame the object is on then a solution (probably not the best one) could be to make a duplicate object that only uses the atlas at the location of that frame
And if the animation will only pause on a certain frame then you don't need to count the frame its on cause you know exactly where it will be
im trying to make a photosensitvity mode for my mod
i just cant get two atlases to work
so i thought pausing might
So instead of being animated, its paused?
I was thinking you wanted it to pause based on some condition
Not exactly sure how to implement it, but the frames variable could be based on some global variable
Like maybe ```lua
photosens = true -- Based on the player's settings
SMODS.Atlas{
...
atlas_table = function()
if photosens then
return "ASSET_ATLAS"
else
return "ANIMATION_ATLAS"
end
end,
}
I am not very experienced with lua so that could be entirely improper
ill figure something out
Indubitably
any reason this doesn't work when {V:1} is used?
loc_vars = function(self, info_queue, card)
return { vars = { colours = { HEX("2ecc71") } } }
end,
Changing the card limit in the way negative does it handled by the smods api automatically if you set certain properties in your objects config (you can do it on any game object). There’s some information about it here
I'm trying to make this joker to only retrigger other jokers in a specific pool but I can't get it to work, how do I detect the set of a joker?
key = "hamburge",
loc_txt = {
name = "hamburge",
text = {
"Retriggers all {C:attention}Hamburger{} jokers",
}
},
blueprint_compat = true,
rarity = 3,
cost = 8,
pos = { x = 0, y = 0 },
atlas = 'jokers_27',
loc_vars = function(self, info_queue, card)
return { vars = { } }
end,
calculate = function(self, card, context)
if context.retrigger_joker_check and context.other_card.ability.set == "food_Hamburger" then
return { repetitions = 1 }
end
end
}```
Thanks
context.other_card.ability.set is not checking the pool of the card
its checking its set
ah. what would be to check the pool?
local is_part_of_object_type = (card.config.center.pools or {}).modprefix_Food -- See "How do I create a `pool`/`set`?""
Based on that I think
if context.retrigger_joker_check and context.other_card.config.center.pools.food_Hamburger then
Assuming food is the prefix of your mod
I'm not sure but it seems to crash claiming 'pools' [a nil value]
trying to create a masochistic mod for myself where every blind is replaced with violet vessel. what would be the easiest way to go about this?
for clarity, i mean "every blind is violet vessel", not "every boss blind is violet vessel"
if context.other_card.config.center.pools and context.other_card.config.center.pools.food_Hamburger
Yeah that makes sense
Thanks a bunch, was getting myself in loops looking at the VanillaRemade but now I know going forward
local oldresetblinds = reset_blinds
function reset_blinds()
local g = oldresetblinds()
for k, v in pairs(G.GAME.round_resets.blind_choices) do
G.GAME.round_resets.blind_choices[k] = 'bl_final_vessel'
end
return g
end
While youre at it make it so you can't skip for judgment and joker packs
Just to make it even harder if not impossible
I dont think without jokers you can even score high enough to win in the first few rounds so scratch my idea
Is there naming conventions for spectrals or is it just kinda misc compared to planets and tarots
is there a reason why the config doesn't change after a relaunch after changing config.lua? running eval print(SMODS.Mods.mod_id.config) doesn't show any change
Because config.lua returns the default config values, and config values are saved in a file in Balatro/config
ah @_@ that makes enough sense
ty
do i just make that my main.lua?
Yes.
Alright, thank you! Maybe im wrong, but i doubt that a native rust implementation exists for this particular algorithm they use, so either i write it myself (idk if im all to capable of that) or i just use lua for only the random number generation, which is definitly a lot easier, but requires a huge dependency. Unless you know of a smarter way of doing this i think ill go with the second option first and maybe implement it myself once everything else is done. And again, thank you and @red flower for the help!
(that was in reference to this)
gonna see if i can tweak it myself to make it so that you have to play every blind
Needs a soul_keys
What do you mean?
To add a soul sprite you need to tell Malverk which cards should have one
When I'm calling :take_owership on a card, does this mean I'm blocking it for using on a same card for other mods?
I'm using it to setup custom atlas & pos for cards and dont want break other mods
No, it doesn't.
Okay cool
Is there a way to check the current scoring hand's final score (after every card is triggered and plasma deck has equalized it)?
I need to check if it's over a threshold of chips and I've already setup some code to run on context.after but I'm not sure where I could find the current hand's score at.
too much?
couldn't figure out how to deal with the jimbo infestation so I set default to copycat
copycat joker lets chat vote on what joker it turns into
You can just reimplement it. The source code is there.
Oh sorry you mentioned that
Still waking up.
@wintry solar latest Malverk, I guess something is wrong?
Example of AltTexture definition
very late responce, so I am sorry
would It be like this?
oh
Ive looked at other mods and I know how
nvm
oh
It is fucked up
Im just gonna jumble up my spritesheet for this to work
It works now!
i got 2 questions, 1 is why this isnt showing its actual image or joker image, and 2 how would i make it so that niko who spawns a god can let niko who is a god spawn in shop?
heres niko who is a god
Is there some simple way to check when a card is added to the shop? Like via buying Overstock for example
both of the atlasses have the same key
alr ill change that first, also the level up hand dosent work for some reason
basically scalling ^4
I dont know if that is how that works
when a card is scored increase the ^ by one
it might be
I know that bit
yes its made to be broken
and overpowered as hell
but im trying to make it really hard to get
I mean to say why is it
not what is
oh bc its stupid overpowered
thats why hes a god
(ima change name to niko who is a god and transcends all of time and space)
okay so
-# im not the best at this
it dosent lvl up high card
ah makes sense
neither am i
i messed up like 20 times jsut trying to figure out how to do the thing where if you have another joker THEN this joker can spawn
so i may have messed up and now the game crashes on loading
how do i get what card you're hovering over?
how do i change the atlas without breaking the entire thing?
lets change the atlas on this:
change:
SMODS.Atlas {
key = "niko",
path = "heisgod.png",
px = 71,
py = 95
}
into:
SMODS.Atlas {
key = "nikogod",
path = "heisgod.png",
px = 71,
py = 95
}
and then in the joker code
alr got that
then change the atlas = "niko", into atlas = "nikogod",
and is niko the person in this discord server?
ah ok
i luv niko the seal
k
do i have to add a atlas to this?
you should
would i add a loc_vars or smth else?
you dont need to
would it be like this?
that should work
trying to add a custom card to the title, much like how cryptid does? Something in this breaks, what can fix it
i would recommend waiting for the next smods version
it has this feature
it just looks like the key is wrong there however
thats actually sick
anyone know the correct way to format this? atleast the atlas part
or what im doing wrong?
crashes on loading
what's the crash
this is the other joker if this is breaking it
😭 i somehow always miss something
alr now that we have that how do i make it so that if you have niko who spawns a god lets niko who is a god and transcends all of time and space apear in shop
you need to abbreviate these names lmao
OKAY
i think they already posted the in_pool function you should use before?
dyslexia final boss
i already said before, use an in_pool function in niko (WIAG)
hmmm yes
oh wait but then thats what happen i couldnt figure out were to place it
this the correct placement?
that looks like it's inside calculate it needs to be outside
thius better?
yeah
now you're missing a comma before in_pool
do you have the lua extension installed
what extension?
that one
you should install it and right click > format
now im installing it
how would i check if someone's scoring is 2x the blind requirement? i know its possible but i dont know how to go about it
format selection?
if G.GAME.chips >= G.GAME.blind.chips * 2 then
how did it just get so much shorter what the heck
thank you ^^
in one hand?
like after you win
ah then it's that
if the final score is 2x the required amount
G.CONTROLLER.hovering.target
okay so i messed something up
are you using an event to add the cards?
because if you are,
you forgot a return true in the func = function()
oh
ty
is there a reason why you're doing 2 nested events?
to change sell value per round would i do like card.ablitiy.extra.sellvalue = card.ability.extra.sellvalue * card.ability.extra.change and then set a "sell value" thing in the table to card.ability.extra.sellvalue?
wait per hand not per round
i looked at the code for Cartomancer in vanilla remade and thats how it was done there
No, you would add to card.ability.extra_value
hmm alr
if context.before and next(context.poker_hands['High Card']) then
card.ability.extra.hypermult = card.ability.extra.hypermult + card.ability.extra.change
card.ability.extra.hyperchips = card.ability.extra.hyperchips + card.ability.extra.change
return {
message = 'Upgraded!',
colour = G.C.RED,
would smth like this work? but instead of chips and mult extra value?
yes
wqould i have to add a calculate = function(self, card, context)
well that codes for another one but yes it is alr in the calculate
would smth like this work? or would i have i have to define extra_value early up
you missed an end after the calculate function
no comma right?
no
wait so yes comma or no comma?
you should probably try to learn some lua fundamentals
yeah
welp new problem
when i play a card with niko who can summon a god this shows up
you forgot to add a config table
wait whats that
oh
like this?
wait
i need to change the variables
oh peak
i changed it to this and it still crashes :(
^
oh
so it says upgraded sell value but it stays at 2
show code
how do i make a challenge have the base blind size be larger than normal?
this?
are you playing a high card
wait you said it gives the msg
unselect and reselect the card
idk
you said you wanted sell value
mistpye mb
ah
yeah sell value not mult
Watch Untitled by Watsontheseal and millions of other Balatro videos on Medal. #balatro
well your code should make your sell value increase
hover over the card rq and type value get into the debugplus console
i don't see extra_value
wait do i put that also in the config?
idek what i did
how
add card:set_cost() on the line after you set extra_value
like this?
yeah still is just sell value 2
and still dosent have extra_value
extra_value doesn't exist beforehand iirc ?
u sure?
i might be wrong
only did it 7 times now but its only supposed to trigger once?
in that case
?
just replace ur config table with this config = { extra = { change = 1 }, extra_value = 0 }
and don't forget the comma after
alr
oh yeah i forgot this 😔
You need to check for context.main_eval
ohhh okay
wait are you multiplying it
that makes sense
you're setting it to 0
card.ability.extra_value is not the sell cost, rather its the value to add on the sell cost
so its always 0
if nothing has been done to change that
thank you!
so you're doing card.ability.extra_value = 0 * 1
hmmm
im trying to think
but im not able to think of a solution
what are you trying to do?
multiply sell value
like double it or something?
and give the sell value of this card at the end of the ante
i mean you can make the extra_value 1 before doing anything but like
its suppose to be broken
and overpowered
bc for some reason it is REALLY hard to find niko who is a god
no the sell value would only incrase by 1 and then never again
if you do that
you are till multiplying by 1 so idk
how can i draw a wiper in run info?
i have it so
when you play a highcard change increases
i hope
this is code for it @dreamy thunder
oh so the change increases then multiplies the sell cost by the increased change
how would i do that
card.ability.extra.change = card.ability.extra.change + 1
card.ability.extra_value = card.ability.extra_value * card.ability.extra.change
probably
and change the extra_value = 0 in config to 1
nice
thank you
np
how would i make it give 1/2 of its sell value (or extra value) when beating the boss blind?
if context.end_of_round and context.main_eval and context.beat_boss then
return{
dollars = card.sell_cost/2
}
end
ah okay ty
im guessing i misplaceced it
you placed it outside of calculate
should be before the underlined end
idek how i mess up so bad so many times 😭
dw i sucked when i first started
probably worse than you
What’s going on here?
ah okay
ty tho :)
no worries
is there any way that i can "sacrifice" jokers to let one joker actually work?
wdym?
like
lets say for niko who is a god
you need to sacrifice 2 jokers to let him actually do anything
like before you sacrifice 2 jokers, hyperoperator dosent increase
and he dosent addmult or chip
but once u do sacrifice he does all that
i might be making this a little more complicated then i should
do you need to use the joker to sacrifice other jokers or can any destruction increase it
use niko who is god to sacrifice other joker, when sacrificing it give 0 sell value
you could add a button to it if you want it to destroy cards anytime
then increase a value like "change" you used for extra_value to keep track of how many were destroyed
hmmm okay
and add an idk if card.ability.extra.value >= 2 before the joker's effects
hmmm okay
ill make it so you can either sacrifice like 15 rare, or reroll of hell to get it
, and 2 legendary
thisis very confusing
how would I change the types of playing cards that can appear in the shop and standard packs? I've been trying to make a Joker that makes it so only Aces can appear, but I've been unable to so far
It's confusing because a lot of words
Promise you it's not as confusing as u think
very many words and numbers and letters and stuff i do not understand
i dont even know how the site i made works 😭😭
THERES CHILDREN????
dawg this is too confusing
if my dumbass can do it so can you
still trying figure out how to remove the damn sell button
hey, how can i make a wipe in run info
local oldcardinit = Card.init
function Card:init(X, Y, W, H, card, center, params)
local g = oldcardinit(self, X, Y, W, H, card, center, params)
if next(SMODS.find_card('j_modprefix_key')) and card then
SMODS.change_base(self, nil, 'Ace')
end
return g
end
oh awesome, I'll try this out
how do i make a card debuff itself permanently
when i use just set_debuff it only lasts until the end of round
seems to work well, thanks
card.ability.perma_debuff
thats convenient
you need to remove the already existing buttons by
if self.children.use_button then
self.children.use_button:remove()
self.children.use_button = nil
end
iirc
before making any new ones
I tried didn't work
Plus the defuse button has basically been added to the keypad
so seems redundant to keep both
i see
plus we agreed on a joke the first bomb to spawn can be sold
then the rest are eternal
as a small troll
Update, I kinda went back to the code and tried doing step by step until I encountered a crash that seems to be related to the re_value of the slider in the config, I don't now what it's causing it
i thought that dynatext wasn't supposed to scale 🤔
(translation: dynatext if it was good)
ignore the fact it's like that
how do i upgrade a hand before its scored
in context.before you can do
SMODS.smart_level_up_hand(card, "High Card", nil, amount)
amount being the amount you want to level it by
since G.GAME.last_tarot_planet only works for vanilla consumables how would i make something similar for my added consumables?
use SMODS.current_mod.calculate and context.using_consumeable
and save it to G.GAME.modprefix_something
how is the sort_id of card determined, or specifically in what way is G.P_CARDS sorted in pseudorandom_element(G.P_CARDS, pseudoseed('erratic'))?
how do i change the blind requirements?
It's global counter which starts at 0 on game start and increases by 1 when new card instance is created.
oh, and in what order are the cards created at the start of the game? i just assumed that it would be something like the combination of all suits x all ranks, (like 2 of Spades, 3 of Spades, ..., Ace of Diamonds or something like that) but that doesnt seem to be the case as just that gives me a deck of all Aces of Diamonds instead of all 10s of Spades on the bugged eratic deck seeds
bump
cards are created in order determined by content of G.P_CARDS. Since it's dictionary and not an array, order may wary depends on how lua feels today, but probably it does: from 2 to ace, hearts -> clubs -> diamonds -> spades
i.e. it creates all hearts, then all clubs, etc
oh right, i shouldve just looked it up before asking, sorry 😅
After that, they're sorted
function used for sorting is kinda meh
But, in case of erratic deck, it works differently
do you mean this?
Instead of processing cards in order, erratic polls random card, and repeats for every card
So basically order is random
I mean just check Game:start_run function and scroll down a bit
You'll find how they're sorted, and how erratic deck works
and how exactly is G.P_CARDS sorted inside of pseudorandom_element(...)? it doesnt have a v.sort_id, right? (sorry if im being an idiot 😭)
pair of { k = k, v = v } is created, and sorted by a.k < b.k
After that, seeded math.random(#entries) is called which returns index we rolled
you did that in your code above
Or rather literally copy-pasted it
im rewriting it in a different language, that is just the games source
and the indexing is trivial, rn im just trying to figure out how to sort the list in an intelligent way because the way the game does it seems kind of... odd, but i still want it to return exactly the same thing as the games function would
yeah its more about the whole sort_id thing and such
anyways
you helped very much, thanks a lot!
sort_id used only for cards specifically
I.e. if it's card in already existed deck or in hand, in joker slots
It's used to make sure hits like wheel is based on joker itself rather than joker's position
So it always hit same card regardless of position
You're not dealing with cards, only with regular tables of data
ohhh yeah that makes sense
currently trying to make my card spawn a single tarot card when most played hand is scored
but right now it spawns for every played hand and, if the hand isnt the most played, it spawns two
i followed the instructions in the vanilla remade wiki, but it's still messing up
You're creating a tarot in loop; instead you should make it after the loop, after you calculate most played hand
Then do check is hand played is most played and if yes, create card
but i cant use hand.played outside the for loop, that just crashes instantly
unless you mean smth else?
how do i get a list of all jokers in a certain pool?
G.P_CENTER_POOLS.poolkey
actual joker objects iirc
ok neat
You need context.scoring_name to check the name of the hand currently being played.
Move the event that creates the Tarots outside of your for loop, and instead, place it in an if check afterwards, that checks if context.scoring_name == most_played then, and thus only creates the tarot in that one case.
Yup, that did it! Thank youuuuu!!!
👍
do jokers not unlock & discover properly when you create them via set_ability?
because i've had two jokers now in my collection fail to properly unlock & discover when obtained this way
use malverk
oh wait
do you mean playing cards or other cards
if you mean the actual cards themselves, https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin
yeah that's it thanks
might add some deck skins based on streamers
just for extra fluff
I need help, I'm trying to make a config where if it is disabled, the mult of a certain card is overrided with a custom value by the player, but it keeps crashing when I simply open the game. I got as fair in the coding having issues and attempt reworking it to try to see if it works at any way
right now I already have a toggle button and a funtion that uses it but it keeps saying its a nill value despite having it
if FNAF.config.freddyimport then
Freddy_Mult = 63
end
Config file
return {
voices = true,
volumes = 100,
freddyimport = false,
}
UI file
local freddy_toggle = create_toggle({
label = localize('fnaf_save_freddy'),
ref_table = FNAF.config,
juice = true,
ref_value = 'freddyimport', -- what var does this button match
callback = function()
FNAF:save_config()
end
})
return {
n = G.UIT.ROOT, config = { r = 0.15, minw = 15, minh = 7, align = "cm", padding = 0.01, colour = G.C.BLACK },
nodes = {
{ n = G.UIT.R, config = { align = "tm" },
nodes = {
voice_toggle, -- the option itself
voice_slider,
}
},
{ n = G.UIT.R, config = { align = "cm" }, nodes = {
{ n = G.UIT.B, config = { w = 0.5 , h = 0.5 , align = "cm", }}}
},
{ n = G.UIT.R, config = { align = "cm", padding = 0.1 }, nodes = {
{n=G.UIT.T, config={text = localize('fnaf_save'), colour = G.C.UI.TEXT_LIGHT, scale = 0.5}},
}
},
{ n = G.UIT.R, config = { align = "cm" },nodes = {
{ n = G.UIT.C, config = { align = "cl" },
nodes = {
freddy_toggle,
}
},
}
}
}
}
where is FNAF defined
in the config?
you need to define the variable somewhere as FNAF = SMODS.current_mod
I have
FNAF = SMODS.current_mod
FNAF.save_config = function(self)
SMODS.save_mod_config(self)
end
local config = SMODS.current_mod.config
SMODS.current_mod.config_tab = function()
is that before or after you load the files
it's one the same file along the ui and stuff
let me switch the load order
make sure it exists before you load this top file
how would you properly make an editioned playing card remove itself at end of round
i tried context.end_of_round, didn't trigger
same with context.playing_card_end_of_round
wait oh i realize is it possibly because its in the discard pile
ok it loaded but it didn't seem to change anything
I gonna check if the code that I did works or if I messed something up
ya ok that was the issue lmao
how do I get the effect of the back button UI where it is disabled and then has a fill effect until it's enabled?
Is there an easy way to add permanent chips to a Joker in a similar way that the Hiker does to a playing card?
I imagine that smods doesn't support that functionality but I thought I'd ask
bump
is there a global function which i can run based on time? i have an ability i want to activate every second
If the ability belongs to a Joker, you can give it the function update(self, card, dt), where dt is the time since the last update call, in seconds.
mm, it is for a joker, but i do need all copies of the joker to sync up an ability (which is why i asked for a global update function)
It is possible to hook Game:update(dt), but that'll run extra every frame, all the time. Even when you have none of that joker, some extra code would need to be ran to check if the jokers exist or not.
Alternatively, can track the passage of time using using os.time() instead of the provided dt within the Joker's update function. os.time() will always be the same number each time it's called at the exact time.
How could I increase the amount of mult individual glass cards give?
o, the second option works for me, thanks so much
I tried changing card.ability.Xmult, but that only seems to change the display
do you happen to know how to get milliseconds?
Looked it up, forgot os.clock() existed, that one has milliseconds (as decimals, so 1 full unit still equals 1 second)
sick, once again thank you
I forgor is this channel mainly for coding questions or can practical things be asked here too
Like if a joker effect is good or not
I think that'd be better fit for modding general yeah
Would still say general but I guess I didn't make the channel and I dont think it's that important either way
dev is mostly coding oriented though
Looking to reevalute cards in hand from a get_straight hook override, but at the moment, only the hand type changes and it still plays a single card. Anyone got an idea of what's missing with the way I return the hand here? Do I actually need to change another hook to for scoring effects?
is there a way to force a UIbox to close? calling G.FUNCS.exit_overlay_menu() this way doesn't work
if initialized_frame and not has_voted then
video_file:play()
has_voted = true
end
end
local old_update = love.update
function love.update(dt)
if old_update then old_update(dt) end
if not initialized_frame and video_file:tell() >= pausetime then
video_file:pause()
initialized_frame = true
end
if has_voted and not video_file then
G.FUNCS.exit_overlay_menu()
end
end```
or is there a way to disable a button on a boolean instead of a timer
Ok it worked, however now I tried to implement sliders so that the player can choose the value amount for those cards to use, and it seems to be causing a different crash
local freddy_slider = create_slider({
min = 0,
max = 63,
step = 1,
w = 5,
ref_table = FNAF.config,
ref_value = 'completion',
})
return {
n = G.UIT.ROOT, config = { r = 0.15, minw = 15, minh = 7, align = "cm", padding = 0.01, colour = G.C.BLACK },
nodes = {
{ n = G.UIT.R, config = { align = "tm" },
nodes = {
voice_toggle, -- the option itself
voice_slider,
}
},
{ n = G.UIT.R, config = { align = "cm" }, nodes = {
{ n = G.UIT.B, config = { w = 0.5 , h = 0.5 , align = "cm", }}}
},
{ n = G.UIT.R, config = { align = "cm", padding = 0.1 }, nodes = {
{n=G.UIT.T, config={text = localize('fnaf_save'), colour = G.C.UI.TEXT_LIGHT, scale = 0.5}},
}
},
{ n = G.UIT.R, config = { align = "cm" },nodes = {
{ n = G.UIT.C, config = { align = "cl" },
nodes = {
freddy_toggle,
freddy_slider
}
},
{ n = G.UIT.C, config = { align = "cr" },
nodes = {
golden_toggle,
}
},
}
}
}
}
config file
return {
voices = true,
volumes = 100,
freddyimport = false,
completion = 63,
goldenimport = false,
ucnscore = 10600
}
Is there a way to make things lose sell value without affecting their prices in the shops
For bizarro to the moon (called Market Crash)
I originally came up with the effect before I learned that shop prices and sell values are connected
hey , what is the id of Run Info?
bump
you need to set completion value initially
how do I center align text in custom UI?
how do i make a joker that multiplies the value of the card to the left of it by ^2
like gemini but better
Nope, it's possible
But idk how
My blind has a "halo-like" effect around it. In the atlas file it looks normal
So you can reduce a cost value and have the sell value stay the same
And you can reduce a sell value and keep the cost value the same
anyone know how to make a joker that multiplies the value of the joker to the left by ^2?
Yeah, Balatro has 2 functions that each calculate cost and sell cost on their own
Oh
Probably just hook them ig
Just check how cryptid does it
what do i look for
Gemini's code
do i just copy paste?
Not really, Cryptid is sometimes pretty weird but just so you can see how they manipulate Joker values
alr
can u help me with it or atleast understanding it? cause from what i have tried it just crashes
Cryptid has a function called "Cryptid.Manipulate" that well, manipulates joker values. So have you found yet how that function works
all i know is that it changes values of a joker but idk how it decides that joker
but yes i have found it
This
yes ive found that
So it first takes the left most joker (position 1 of the table), then checks if that joker has "immutable" as true (immutable meaning unchanging). Then it just does the manipulation
ah okay, how would i change it to ^2?
Don't think calling Cryptid.manipulate would be the way. So probably just whatever it calls
so call it joker.manipulate?
wait what do you mean by that\
Gimme a sec
alr
heh?
wdym by that
Holdob
create_slider crashes my game with no crash log
I swear I know Smods also has a manipulate function
bombler scare jump
it might
AHH BIG BOMB
i may have found it
Yay
wait
wrong thing
@elder rune is this it?
Uhhh
or u got any ideas on how to do it?
Seems like its correct
I've done it before
oo nice i have like 0 knowledge of modding or atleast some knowledge
Scroll down to the joker with the "dadproud" key
This function changes the values, the green highlighted is what actually changes them
happy dad
do i copy and paste that into my code?
or how do i implement it
You can copy paste it idc
thank you this helped lots
wait quick question how do i set a thing in the table (like in the config = {extra = { ... ) to the title / display?
like the text
?
so for this i alr have the #1# setup but i want to change the 4 to whatever hyperside value is
but i kinda forgot how to set display
Loc_vars
You literally have that function in there so just make it also return hyperside
Then do #2#
in loc_vars:
return { vars = { card.ability.extra.hypermult, card.ability.extra.hyperside } }
Also pretty sure the notation for hyper operations is {n} and not [n]
it’s a “replacement” considering “{}” is used for formatting
is there a glitch or bug or smth that affects the rarity of something apearing in shop? niko who is a god is only a rare, yet it hasnt apeared once
Unlucky
i mean idk if its just unlucky, cause ussually on average i dont even find a niko who can summon a god within about the first 300-400 rerolls
Why don't you just spawn it in
i do
but im just testing it and messing around
also im seeing chances and wether it even works cause its so hard to get niko that i cant even test it properly
Watch Untitled by Watsontheseal and millions of other Balatro videos on Medal. #balatro
is there a way to stop sliders from hitting non-integers
id = "slider",
colour = HEX("f5a92c"),
min = (math.abs(G.GAME.dollars)/2),
max = math.abs(G.GAME.dollars),
step = 1,
w = 5
minw = 6,
minh = 1,
scale = 0.25,
ref_table = wager,
ref_value = 'dollars'
})```
I thought I selected 3 when I had $4 but it paid out 3.44
I'll just run the final ease_dollars through math_floor ig
how do I check how long a joker instance has existed for?
I’m trying to do joker combining shenanigans, and I want the oldest joker to always be the one to create the new card so the two jokers don’t both create a copy
Pinging a message from last year is... bold...
I found that when tryna find a different answer
this one
But yeah that's smth I tend to do >:3
Now it's my turn
I understand that, but please do not do that to us again.
Fair, will do
Finally feeling like I'm near a solution here: I'm sending my G.Play cards to my get_straights hook, which calculates which played cards will be played under new rules and count them as a straight. I'm then trying to score each of the cards I'm getting sent back manually, which should, in theory, only count my custom straight cards. However, I'm getting a crash on play. Anybody know what's wrong with my call to score_card?
We have not even been here since... December?
Scared us to get a ping here
Can you make cards larger through enhancements?
Or at least if the rank/suit is not shown?
Cos I'm tryna make an enhancement where the card has no rank or suit and the enhancement sprite is larger than normal bounds.
o wait nvm u just use display_size in smods.enhancement
no that aint workin
Whats the best way to achieve the effect that the plasma deck has on its art
Assuming it is not just meticulus detail ofc
Hey guys. do you know how to make a joker not trigger itself while triggering others?
I've been able to make it trigger others but it's also triggering itself, with the same ability.
if context.retrigger_joker_check and not context.retrigger_joker then
Code?
Anyone know how to make this card larger to fit? It's an enhancement btw
The size of the card sprite has a greater height than 95 but fsr the game squishes the sprite and display_size does not work
Try adding pixel_size if you didn't
Here you go. Thanks for replying.
It's a Joker from a mod I wanted to tinker with, usually I just play around with values and lines of code, but this time I wanted to do more and turns out I'm not there yet, haha.
uum. That didn't seem to work, but it's quite possible I'm messing it up.
Thanks for answering. 
how to start with a particular jocker so i can test it?
do i need to make a custom deck?
Follow the setup on the SMODS wiki and then download DebugPlus to spawn the joker on any deck
ty
np
hey , how to draw wipe in Run Info?
i downloaded debug plus but i dont get which command to run to spawn my joker? or do i have to write my own command
i figured out you can spawn jokers by hovering over them in the collection and pressing 3
why doesnt this work
im trying to make a deck that adds chips
it adds the chips then gets instantly reverted
You can’t do any mult or chip changes in context before
i figured out how to spawn through the collection using the [3] htokey
bruh
you want initial_scoring_step probably
That didn’t work
Unfortunately to make UI things work properly I need just copy SMODS patches for them.
I guess I really should consider license
```lua
calculate = function(self, card, context)
local my_pos = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
my_pos = i
break
end
end
if (context.end_of_round or context.ending_shop) and (G.jokers.cards[my_pos - 1] == "j_mii_DSTcactus") or (G.jokers.cards[my_pos + 1] == "j_mii_DSTcactus") then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.0,
func = function()
SMODS.destroy_cards({card}, nil, nil, true)
anhilated = true
message = "FUUC-"
return true
end
}))
return true
end
end,
```
trying to make my joker detect a specific joker if it's either on its left or right but doesn't work, any help please ?
you're comparing a card object directly to a key
that won't work
you can get the key out of the card object for a proper comparison, it's in card.config.center.key (and also card.config.center_key for some reason)
one less table index, yay
I'm pretty new to modding so I hope that this isn't a stupid question, but how can I change the x/y position of a joker?
which x/y position? the location on screen, the atlas?
so basically i should do something like
```lua
local right_card = {}
local left_card = {}
if (context.end_of_round or context.ending_shop) then
right_card = card.config.center.key[my_pos + 1]
left_card = card.config.center.key[my_pos - 1]
if right_card == "j_mii_DSTcactus" or left_card == "j_mii_DSTcactus" then
```
probably the code on itself is wrong but the rough idea is this right ?
that's super unnecessary
G.jokers.cards[my_pos ± 1] is already a card, you can just get the key out of there
(after first confirming that it's not nil, of course)
lua if (context.end_of_round or context.ending_shop) and (G.jokers.cards[my_pos - 1].config.center.key == "j_mii_DSTcactus") or (G.jokers.cards[my_pos + 1].config.center.key == "j_mii_DSTcactus") then
so like this then ?
almost
G.jokers.cards[my_pos - 1] will be nil and crash if my_pos is 1
so put in a check for that
lua if (context.end_of_round or context.ending_shop) and (my_pos ~= 1 and G.jokers.cards[my_pos - 1].config.center.key == "j_mii_DSTcactus") or (G.jokers.cards[my_pos + 1].config.center.key == "j_mii_DSTcactus") then
i think this should do it
set a check so my_pos has to verify it isn't 1 first
hey devs, how possible would be to program this:
Joker X isnt able to spawn if you have Joker Y, and vice versa, all except if you have Showman
make x and y's in_pool functions return false if the other exists and showman doesn't
use SMODS.showman if you want that to be compatible with any modded showman-alike effects
ok what if one of them is vanilla
or does that not matter, sorry not very experienced (meaning having 0 experience at all)
if one of them is vanilla, take ownership of it and give it an in_pool
(no vanilla jokers have that function already, so don't worry about accidentally stomping it)
(but if you want to be absolutely sure you're not stomping an in_pool added by some other mod, check whether SMODS.Joker[key].in_pool is a function and if so incorporate its return value however you like)
actually strike that i don't think that works the way i thought it did
No, it's G.P_CENTERS['j_key'].in_pool
i don't think it'll have been injected yet at this point in the code
okay, after some digging, SMODS.Centers is the correct table
No, G.P_CENTERS still works for vanilla jokers.
would taking ownership have been reflected by this point in the loading process?
Yes, if the other mod loaded before the current one.
after testing it looks like both of them work as i expected them to, for vanilla jokers at least (modded jokers not tested yet)
i don't know if there's any meaningful difference between looking in one table or the other in that case
lua if (context.end_of_round or context.ending_shop) and (my_pos ~= 1 and G.jokers.cards[my_pos - 1].config.center.key == "j_mii_DSTcactus") or (G.jokers.cards[my_pos + 1].config.center.key == "j_mii_DSTcactus") then
well i'm not sure what i did wrong
unlless
oh
shouldn't have just use "my_pos" right ?
nvm fixed it
oh, it'll also crash if it's the rightmost joker. silly oversight
my_pos ~= #G.jokers.cards
yeah i just made so a check if the there's a joker left or right to itself, that way it won't crash
yeah
```lua
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.0,
func = function()
card.children.center:set_sprite_pos({ x = 0, y = 1 })
SMODS.destroy_cards({card}, nil, nil, true)
anhilated = true
message = "FUUC-"
return true
end
}))
return true
end
```
one thing tho, i tried to make my joker have a message like how gros michel goes extinct but it does nothing, the rest yet does work
use SMODS.calculate_effect() to use return table values like message outside of a return table
How so exactly ? Just SMODS.calculate_effect(message = "FUUC-") ?
No, it would be: ```lua
return {func = function()
G.E_MANAGER:add_event(Event({
func = function()
card.children.center:set_sprite_pos({ x = 0, y = 1 })
SMODS.destroy_cards({card}, nil, nil, true)
anhilated = true
SMODS.calculate_effect({message = 'message', instant = true}, card)
return true
end
}))
delay(0.9375)
end}
alrighty then, but what about the delay ?
That's so it doesn't instantly go to the next event.
so like this, it should go all at once no?
is SMODS.calculate_message something from the recent Smods ?
actually i'll update my smods and see
The suggestestion was calculate_effect, not calculate_message, so I think they just mistyped it. If updating doesn't work, try calculate_effect instead
well i didn't saw any calculate_message in the smods release, so i'll probably try calculate_effect instead
well i used calculate effect but now
```lua
calculate = function(self, card, context)
local my_pos = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
my_pos = i
break
end
end
if (context.end_of_round or context.ending_shop) and ((G.jokers.cards[my_pos - 1] and G.jokers.cards[my_pos - 1].config.center.key == "j_mii_DSTcactus") or
(G.jokers.cards[my_pos + 1] and G.jokers.cards[my_pos + 1].config.center.key == "j_mii_DSTcactus")) then
return {func = function()
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.0,
func = function()
card.children.center:set_sprite_pos({ x = 0, y = 1 })
SMODS.destroy_cards({card}, nil, nil, true)
anhilated = true
SMODS.calculate_effect({message = 'message', instant = true})
return true
end
}))
delay(0.9375)
end}
end
end,
```
Oh I see. Looked up calculate_effect usage and it should be SMODS.calculate_effect({message = 'message', instant = true}, card)
Basically it just needs to know which card is making the message.
Noted, thanks
so i have done something it somehow makes it so if it isnt a specific joker it does nothing and just says upgraded
just specify a joker smh
is baron considered "immutatable"?
oh that, just that Balatro handles Joker values differently compared to mods
ohhh
idk fix
ah okay
cause uh
anything with xmult
dosent work
but anything without xmult (lust joker lets say) does work
cause its + mult
idk either
or anything iwth money idk this is confusing
well now it works but for some reason it'll retrigger a few times before stopping
A mod that puts seals on everything. Contribute to Somethingcom515/SealsOnJokers development by creating an account on GitHub.
?
Yes, you need to check context.main_eval
whats this for?
You should use this function instead.
alr
now it just crashes
wait
yeah when i get the joker that ncan manipulate values and another joker it just crashes and gives me this message
@daring fern :)
Yes, remove the SEALS.
ah okay
uh it does nothing
Code?
dont mind the ` at the start and end
thats just in that msg not in the code
@daring fern theres the code
Move the functions out of the joker definition, also your not using the function.
Hi, I'm pretty new to modding - I'm trying to record the last joker sold for a specific consumable that would create a copy of that joker (kinda similar to fool creating a consumable for G.GAME.last_tarot_planet). I hooked Game.start_run to initialize a variable to house that joker key, but I don't know to get it to update when a joker gets sold
i am using the function tho?
also wdym joker definition
Where?
No, you're defining it, not using it.
?????? im so confused
how would i use it then
@daring fern how would i use it?????
modify_joker_values(card, {['^'] = 2})
in the return section?
i did this for it but when i beat the blind then modify the joker but it just crashes with this error
@daring fern
or if anyone can help me with it
how would i re-enable ui on a menu_cards card
could be wrong but probably just set card.no_ui to false
i'm doing this and it isn't working
ellejokers.mod_data.menu_cards = function()
return {
key = "j_elle_elle",
no_edition = true,
no_ui = false
}
end```
oh idk if create_card takes it as a parameter
why isn't my achievement unlocking? i don't see what the problem is at all
EDIT: unlock_achievement() doesn't do the thing if you're in a challenge, so I had to patch it
anyone know why this crashes my game when the blind ends?
you might need to manually set no_ui on the card to false somehow
func = function()
for k, v in pairs(G.title_top.cards) do
if v.config.center.key == 'j_elle_elle' then
v.no_ui = false
end
end
end
if anyone knows how to fix this?????
w
what's the crash say
so like im literally completely new to this, but i want to make a custom language pack, so.. how could i even do that?
Log? Also move the function definitions out of the SMODS.Joker definition.
?
what does line 96 in your main file show
It's context.main_eval not context.main.eval
^
i found it
The functions are being defined in the calculate function of the SMODS.Joker definition, move them out of both of those.
\ohh okay
If i want to use a custom color for the message of my joker, i know i gotta use loc_colour but should do something like
loc_colour()
G.ARGS.LOC_COLOURS.mii_JJ = HEX('50a96')
outside of my joker and then
SMODS.calculate_effect({message = 'message', colour = G.ARGS.LOC_COLOURS.mii_JJ}, card)
or do i need i need to do differently ?
wait before or after the calculate function? cause now it just crashes with this
No, you don't, just do colour = HEX('50a96')
ah alright thanks
@wild patrol do u know how to fix this??
or @daring fern
No, outside of the SMODS.Joker definition.
outside of the joker completely????
wdym out of the smods.joker definition???????
@daring fern wdym like outside of the entire joker or like where????
now how do i fix this,,?
i dont understand 😭
yes, outside of the joker
before or after
before, so the code that comes after your functions can use the functions
ohhh
that makes more sense
small note
for lsp recognizing your code it should go before
but for the purposes of just using the function it can go anywhere
since by the time the joker's functions are called, it's already long ago ran through the rest of the file and defined those functions
anyone know,,?
not me sorry
ik dw
is this just a demo card that is only used for the main mennu
card.no_ui or smth
hmmm okay, also do you know why this dosent level up highcard?
i meant the locked description, i want the desc
if so add discovered = true, unlocked = true to its definition
bypass_discovery_ui
ty
then do the other thing
now it just crashes on loading :(
ive never touched anything level up hand related from cards sorry
it's still doing it
alr
how you create a card
menu_cards
ellejokers.mod_data.menu_cards = function()
return {
-- Elle on title card
{key = "j_elle_elle",
no_edition = true},
-- Let it have a description
-- ty @somethingcom515 for this lol
func = function()
for k, v in pairs(G.title_top.cards) do
if v.config.center.key == 'j_elle_elle' then
v.no_ui = false
v.bypass_discovery_ui = true
end
end
end
}
end```
Im not sure can you define it like this
You probably should move bypass_discovery_ui to definition object rather than function
ok
okay so this code i have, yet neither of the jokers which multiply values actually multiply the values
still doing it
If there are multiple pattern matches for a lovely patch, does it patch all of them? Or does it not work at all?
@umbral zodiac do u know wh this isnt working or no?
without a crashlog i would have no clue
it dosent crash thats the thing
It also needs level_up = true
By default patch all, but you can specify amount of matches to process
Alongside the ahnd
Oh lovely lovely
I thought it would crash lol
where would i put that?
Also in the return
it's ✨still not working✨
like this?
Yes
also can u help me with the multiplying values issue where it dosent actually change the values of anything?
Cant check rn, if you can wait a bit I'll take a look
No i have never actually done anything like that
ah okay
It's because your modifying the values of card, instead of the joker you want to modify the values of.
how would i change that
or how would i fix that???
huh
wait do i just change card to joker?
I dont understan
you need to
understand
like
local other_joker = {}
for k, v in pairs(G.jokers.cards) do
if v == card then other_joker = G.jokers.cards[k-1] end
end
return {func = function() modify_joker_values(other_joker, {['^'] = 2}) end}
Actually get another card object as a variable
It isnt going to magically do every joker you want
im guessing i put that in the calculate function?
makes sense
Yes, it would replace the: ```lua
return {
modify_joker_values(card, { ['^'] = 2 })
}
ah oaky
ty
is this the correct format to say at end of round then multiply values?
cause it dosent actually multiply anything when i beat the blind
@daring fern
or if anyone knows how it works
what would i do to fix it if it still dosent multiply the values of other jokers ? herres the code
@daring fern if u can help
bypass_lock
anyone know how to make this actually work
how do i set unlocked to false on every joker and consumable (and booster packs if thats possible) of a mod (specifically cryptid) without doing it manually
do i have to write a program to generate the code?
The first return should be:
return {
message = 'Upgraded sell value!',
colour = G.C.YELLOW,
func = function() modify_joker_values(other_joker, {['^'] = 2}) end
}
ohh okay
also keep the other one with the local other_joker...
or remove everything from cryptid from the game except when i want to
I need some help with challenge decks
I want to make Jokerless but youu have eternal versions of all legendary jokers
Balatro crahes whenever I add the jokers to jokerless
{ name = "Jokerless", id = 'c_jokerless_1', rules = { custom = { {id = 'no_shop_jokers'}, }, modifiers = { } }, jokers = { {id = 'j_canio'}, {id = 'j_triboulet'}, {id = 'j_yorick'}, {id = 'j_chicot'}, {id = 'j_perkeo'}, }, consumeables = { }, vouchers = { }, deck = { type = 'Challenge Deck' }, restrictions = { banned_cards = { }, }, banned_tags = { }, banned_other = { } } }
(sorry i dont know how to use code snippets)
what code do you have above this bit?
start with "```lua"
then the code
then "```"
name = "Cruelty",
id = 'c_cruelty_1',
rules = {
custom = {
{id = 'no_reward_specific', value = 'Small'},
{id = 'no_reward_specific', value = 'Big'},
},
modifiers = {
{id = 'joker_slots', value = 3},
}
},
jokers = {
},
consumeables = {
},
vouchers = {
},
deck = {
type = 'Challenge Deck'
},
restrictions = {
banned_cards = {
},
banned_tags = {
},
banned_other = {
}
}
}, ```
not quite, but close enough
oops thats cruelty
the key for canio is wrong, it should be j_caino
I hate that
oh
yeah... the key was spelt wrong so now everyone has to make that typo
that is dumb
ok let me try that
ok thanks that worked
is there a way to make the whole deck debuffed?
(for a different challenge)
@rough furnace I seen you Preflight PR which was merged and you know what? As you mentioned, game cannot restart if threads are opened
It just closes
Fyk I have 2 mods which have threads active all the time
How do I make the soul on this pulse like the soul crystal?
Steal the draw function from vanillaremade soul
Or cryptid gateway or smth
I think vanillaremade's one might be a bit wierd due to different atlas
have to seperate them
name = "Jokerless",
id = 'c_jokerless_1',
rules = {
custom = {
{id = 'no_shop_jokers'},
},
modifiers = {
}
},
jokers = {
{id = 'j_caino'},
{id = 'j_chicot'},
{id = 'j_yorick'},
{id = 'j_pekeo'},
{id = 'j_triboulet'},
},
consumeables = {
},
vouchers = {
},
deck = {
type = 'Challenge Deck'
},
restrictions = {
banned_cards = {
{id = 'c_judgement'},
{id = 'c_wraith'},
{id = 'c_soul'},
{id = 'v_antimatter'},
{id = 'p_buffoon_normal_1', ids = {
'p_buffoon_normal_1','p_buffoon_normal_2','p_buffoon_jumbo_1','p_buffoon_mega_1',
}},
},
banned_tags = {
{id = 'tag_rare'},
{id = 'tag_uncommon'},
{id = 'tag_holo'},
{id = 'tag_polychrome'},
{id = 'tag_negative'},
{id = 'tag_foil'},
{id = 'tag_buffoon'},
{id = 'tag_top_up'},
},
banned_other = {
}
}
} ```
I somehow broke it again by adding back jokerless banned items
and then use soul_pos = {
x = 4,
y = 0
},
x, y being where every the sould is located on ur sprite sheet
I did that
Ive given the base a shader so you can see they are different shaders
soulker
ↄoker
the j juust looks more like ↄ than J
Its kinda hard to draw something nicely in a small space
there are fonts you can copy
oh
This is displaying the actual soul
the soul on my joker looks different to this
see if there is a way to modify the draw fuunction to the key for your sprite
oh i don't either today is my fiirst day modding this game
I found out you can mod the appstore version of balatro
pc modding only
modding rule 4
it's on computer
app store on pc?
yeah mac os
ah right
It shouldn't break the rules in my opinion
yeah I just forgot apple did computers

