#💻・modding-dev
1 messages · Page 535 of 1
what would be 'is not'?
i just ripped it from vremade
oh
.config.extra
~=
thanks
oh ok thanks
wiki has different colors to account for the balatro shaders and stuff
do you guys personally think there is any value to decimal points in dollars or is it always best to round up/down
i have a case now where i can get decimals and i just hook ease dollars to round, but i was curious if there was any potential application to that decimal
oh, interesting!
Oh, so what im i doing wrong to cause it not to be accessible here?
i have a lot of decimals dollars in my mod because money is too good and my jokers give a lot of it
so do you think to just allow decimals?
i think that's before the set_ability is called, you would need to do it in an event
if it's easy to get more decimals then yes
or you're gonna get stuck with 0.1 dollars you can't use
its specific to my edition
you can get decimals because its increasing the value you earn
so for example you can get 3.33 bucks per discard on delayed grat
but there no other way outside of the edition to get those decimals
i think it's fine
alright sick
context.other_card.enhancement ~= nil or
context.other_card.edition ~= nil then
return {
repetitions = card.ability.extra.repetitions
}
end``` context: first scored special card gets retriggered (like hanging chad) the seal and edition work just fine, the enhancement part doesn't retrigger.
I've also tried `context.other_card.has_enhancement == true`, but it didn't retrigger either
next(SMODS.get_enhancements(context.other_card))
yeee i did that first but i wanted to see if there was a simpler solution
thanks
works now
How can a table with 1 item in it have a length of 0???!!!! 
it's not integer indexed
WHY IS IT WORSE???
So i have to iterate though the table to find the real size?
Can't imagine this is how the vanilla game figures out this value.
any tables that vanilla needs to know the size of use integer indexing
what's your table?
G.PROFILES[G.SETTINGS.profile].challenge_progress.completed
vanilla does indeed iterate over that table, albeit in a slightly strange way
I found another way apparently G.PROFILES[G.SETTINGS.profile].progress.challenges.tally just gives a number 
I had found that earlier but i was missing the progress part
The main logic of my card seems to fully work now 
Hey, I have a question. I created a joker that gives a negative spectral card when a blind is selected, but the card ends up loose and disconnected from the consumables slot and can’t be used or sold.
calculate = function (self,card,context)
if context.setting_blind then
local new_card = SMODS.create_card{
set = 'Spectral',
area = G.consumeables
}
new_card:set_edition("e_negative")
return {
message = "Spectral Created",
colour = G.C.BLUE
}
end
end
}
Its cause ur using create card and not placing it
you know theres a message for creating spectrals in vanilla right
also why are you doing the edition sperately, create_card has an edition parameter
also use add_card instead of create_card i think
that makes it go into the area automatically
this here deducts chips but doesn't return a message. why?
this work same with jokers created by other joker efects right?
I think so?
I would personally use add_card instead so you dont have to manually place it
okay, I´m going to make the changes, thanks :p
also you should always create cards in an event
because that looks much cleaner
also you should use vanillaremade for reference if you dont already https://github.com/nh6574/VanillaRemade/blob/main/VanillaRemade.lua
Is it possible to change a jokers rarity mid game?
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
position = 'after'
pattern = '''G.shop = nil'''
payload = '''
if G.gacha_button then
G.gacha_button:remove()
G.gacha_button = nil
end
if G.gacha_machine then
G.gacha_machine:remove()
G.gacha_machine = nil
end
'''
match_indent = true
why doesn't this remove G.gacha_button and G.gacha_machine?
Is it possible to manipulate mult without the plus message appearing?
Because now my joker say +1 Mult followed by ^1.02 Mult and somehow messaes up the score
show your code
me or bikutoso
bikutoso
damn
I can at least how my code just in case. Basically trying to create a non Talisman equivalent of Emult_mod.
Also checking further is says +2.03 Mult and changes mult then my ^1.02 Mult message
thats because
returning mult is telling the game to apply +mult equal to the returned value
if youre using talisman you should just return emult instead
non talisman equivalent
thats what they said
oh
I already do the Talisman version above, i want my mod to only have a optional Talisman dependency
So in this case i need to both for Talisman and for non talisman
well if you want to do ^mult without talisman you would need to do that outside of the return
and find the value for the current mult but idk what that is
bump
I thought it was just mult because that is that VanillaRemade is telling.
But i can try moving it out of the return function and see if it is different
just put remove_default_message = true
mult = <number> just applies +mult
in the return at least
and the value for current mult definitely isnt going to be just mult its probably in a table somewhere
Chat how do i remove a UIBox
Moving mult outside the return seems to have done it (seems i need to hnadle the effects myself), but it gives the right value at least now
where in vanillaremade are you seeing that?
probably in any joker that gives +mult
literally just keep exactly what you had before but with the thing I said
well then you should be using current_hand_mult and not just mult
no it's just mult
wha
the local is just there to explain it
that's the variable name
how do i remove a UIBox G.[uibox name here]:remove() isnt working
that should do it afaik
i literally removed a uibox that way yesterday
what smods version
last commit, i dont think it should matter
last commit at the time
can you try it on beta-0711a rq
the version shouldnt make any difference at all
i can't find any reason why this wouldnt work
I don't think this is an issue with the SMODS version
what would then
are you sure it enters the if conditions
yup
It doesn't but also other objects also don't and they're removed just fine
are you sure your reference is actually the UIBox
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
position = 'after'
pattern = '''G.shop = nil'''
payload = '''
if G.hpot1 then
G.hpot1:remove()
end
if G.hpot2 then
G.hpot2:remove()
end
'''
match_indent = true
this does nothing but goes inside the if statement
oh this is a hotpot thing ok
(names changed not to spoil)
bump
yeah but is G.hpot1 actually the ui element
yeah
G.hpot1 = UIBox({
definition = G.UIDEF.hpot1(),
config = {type = "cm"}
})
what happens if you do eval G.hpot1:remove()
nothing and it returns nil
I told them to copy UIElement.remove to add prints to it, then apply it to different objects. It seems to print the same in multiple objects but it doesn't remove the new objects
and removes other objects
then G.hpot1 for sure isn't the UIBox
why isn't it though
the definition seems to work just fine
I don't know I can't see the code
but if you do, for example, eval G.HUD:remove() it will remove stuff properly
its only ever been assigned as a uibox
yes as I said other objects are removed fine
try printing the type of the object
how would i get that
idk
is there any way to make the two suits i made not spawn initially in the vanilla decks as i plan to have it spawn naturally and allow you start with a deck of them
I don't think they do that by default
I think you can call type
what does "spawn naturally" mean
appear in booster packs, conversion cards
in the shop if you have the voucher
How do i get the UI mult to jiggle?
I thought it was G.hand_text_area.mult:juice_up() but it does not seem to do any jiggle
Take a look at Bunco
Juicing causes jiggling but I'm not sure how it applies to some objects
is this for your pretend ^Mult?
supposedly it's a table?
Is it possible to change rarity of a joker?
First off it isn't pretend as it is an actual exponent mult (just not throught Talisman)
But i do see Mult jokers jiggle the ui Mult but my emult does not
the table's huge
anything in particular i should look for?
that's because you've started trying to do it outside of the return, right?
there we go 👍
uhhh, do print(inspect(G.hotp1)) instead
@wind steppe what about the other objects you could remove? Are they tables too?
What does inspect do?
I'd usually do tprint
or a custom table printer
The mult manipulation i need to do outside return.
But there must be some way to manually trigger the jiggle
more reasonable
anything i'm looking for?
you don't need to do it outside of the return
can you screenshot it pls
yup
wait no let me get a console screenshot
that should absolutely be able to be removed
okay, how would you do it?
mult = mult ^ card.ability.extra.mult
--G.hand_text_area.mult:juice_up()
return {
message = localize({type = "variable", key = "a_emult", vars = {card.ability.extra.mult}}),
colour = G.C.DARK_EDITION,
}
return {
-- stuff you already have
mult = (mult ^ card.ability.extra.mult) - mult,
remove_default_message = true
}```
have i just been cursed
plague of bugs upon ye
bug spray for programmers when
they call it deodorant
That is one way to do it, but the UI Mult still doesn't jiggle
@wind steppe something else you can try
Wait now it did but i didn't before (didn't even restart game)
copy some code that works
like [REDACTED]
and edit it slowly into your own code
and see when it breaks
aight
im going to work on the deck (and sleeve) in a moment going to take a small break
Okay, figured it out it was because i played a high 2 so 1^1.02 = 0
And since mult didn't change no jiggle
i'm okay with that issue as it's unlikely to happen frequently
Yea, that is understandable.
bump...
bump
try doing an unblockable event with an impossible condition
but i don't really know how bc i've never used the event manager
and it could even not be the solution
but i think it's maybe worth a try

G.special_button:remove()
G.special_button = G.special_button or UIBox({
definition = G.UIDEF.special_button(),
config = {type = "cm"}
})
why wouldnt something like this work to update G.special_button?
just do G.special_button = UIBox blablabla
Is there a way to change localization of a joker by code? For example if certain things happen that the text shown changes
i mean you can do the process loc text function during runtime and usually it works, but
really the best way is to just set up a bunch of different joker desriptions in a localization file and use the key return value from loc_vars to switch between them.
i was going to type it but remembered i had a wiki now
You do have something for everything
idk if its because of card sleeves, my new suits, or something else idk
nh singlehandling carrying the balatro modding community on his backs
If only there was a helldivers x balatro collab mod
it aint card sleeves because i disabled it well quick and same error
cause youre so awesome
i am
ok how would one load an object only if a certain config setting is true?
nvm figured out a solution
i did add the smods.back and sleeve just in case that's why and uh still same error. any clues or answers would be appreciated
okay it has to be the smods.back since even the sleeve works i don't understand why
is it because i added those two suits or something
has tag scoring been done before in balatro modding? if not, how difficult/easy would it be to code it in?
Yes.
what mod please tell me it's an api so i don't have to force more crossmod on myself for the sake of one function
i'm trying to think of how to do temporary buffs by having either a unique consumable akin to Horoscopes in Maximus or taking the stupider option and doing them through tags instead
More Fluffs Clutch Tag
MORE FLUFF?? holy SHIT okay i'm saved
is there a way to grab the text colour of your suit?
another potential issue might be making certain tags unavailable in the pool of available Skip Blind tags but seeing that Entropy does this i hope this is something built into smods rather than entropy
not sure if this could be mistaken for only having those two suits
cause like imagine Clutch Tag but it stays for multiple blinds and basically negatively ramps until it disappears
using a variable in here crashes the game, is there a way to fix it?
solved it
for this, what would be the best way to add them back since it isn't in the initial deck pool
can you modify the perishable timing to make it longer/shorter?
yes
card.ability.perish_tally
what about globally?
going to eat something and then work on some stuff like quick jokers as those would easy to knock down
Hello. does anyone know how I can target the card being sold? card is being used by well, the card that is running the calculate function.
context.other_card ?
checking
context.card
it's always context.whateverisontheleft
makes sense
heyo! I was trying to set up a seal on a card and at first I was using pseudorandom_element but then decided to try and use SMODS.poll_seal instead as it looked easier. However, it now gives me an error when booting up the game. Did I use it right? :0
(Context: The joker is supposed to put a random seal on a card if its the only card played on the first turn. it has limited useage)
you need to put the poll_seal in :set_seal
if you put it in the config it will only run once when you open the game and likely not run correctly
oooh alr. So then I won't need the seal in the config either?
nope
that really shortens my code lol let me try it. Thank you!
Was testing a run with my mod and this suddenly happened
It was working until it didn't
it's other_card
it works! thank you!!
it also said other_card was the same way
but I'll try the same hand with other card
this is the error I got
with other_card it might crash because not all jokers have an ability.extra table
yeah exactly
not sure if envious should be for each suit or +3 mult for any other modded in suit
is there a way to get the colour for a modded suit?
well I was using Wee joker earlier in the run and it didn't crash
looked at the source at paperback as i heard that they added some of their own suits it's basically {C:key_suit}
ok, so I played the same type of hand but with different cards and it didn't crash what in the
j_Galore_Slothful = {
name = {
"Slothful Joker"
},
text = {
"Played cards with",
"{C:Galore_Leaves}#2#{} suit give",
"{C:mult}+#1#{} Mult when scored"
}
},
guess what
it didn't work
wee no!
how could you
even tried with high contrast, maybe i need to initialise the colour value first
maybe it's s_Galore_Leaves
im not good at guessing code im sorry
it has an extra table
here's the loc file, maybe someone could help with the colour code
how's the suit defined
the key? Roses and Leaves
god speed
son of a bitch it was Hack, but that also has an extra
mmm, how should I fix it then
check if extra is a table
I have an edition which destroys the card its applied to based on chance, and I would like for it to work for jokers as well, yet it doesn't. Any way I could get this code to apply to jokers as well as playing cards
Why are you using context.destroy_card but not returning remove = true?
slipped my mind
if I do SMODS.destroy_cards(card) does it refference itself?
yes unless you set card to something else prior
i usually just add card = card a line above to be safe
oh also i got this working, here's the updated code if anyone's interested
No, it would be context.after
where would be context.after
if context.after and not card.playing_card then
if SMODS.pseudorandom_probability(...) then
return {func = function()
SMODS.destroy_cards(card)
end}
end
end
ah right i forgot to mention i only wanted jokers to have a chance to destroy on round end
my mistake
i was trying to get this working and like what
what do i have to change in the cardarea for it to have cards aligning horizontally straight
dw about eval for now, i just want the description to work
It's A not 1
Hello, does anyone know how to make my variable add up with any voucher?
Code?
wtf
same code as above but i replaced D_A with D_K
What SMODS version do you have?
What version does it say in the top right corner of the main menu?
No, thats old.
that is so old man
how am i supposed to know??? 😭
looking at the github every now and again
i mean yeah but it never really mattered before 😭🙏
i mean new features are being added constantly, and bugfixes are important to keep track of
¯_(ツ)_/¯
never really mattered for me until now ig
i downloaded it months ago so
blehg
yeah that makes sense it's the march build
Its bad practice to be using libraries that are out of date
like, in normal computing, packages are updated consistently because there can be security issues or fatal errors
so yk, keep stuff updated
you need to do that in gamedev too???
-# i use steam with my godot
unless its specifically minecraft, where versioning is a suggestion
bro thats kept up to date for you
im aware
i meant my own personal game development
so unless you use github to pull down releases and regularly check, you gotta do that yourself
also im used to most engines just saying "hey we have a new version :)"
smods isnt a game engine
so ¯_(ツ)_/¯
its a library
did
i
say that????????
😭
im just saying im used to that with my workflow
i never called it an engine
i know it's a library
im not stupid
you said you were used to game engines, and smods isnt that
you cant treat it like that
yeah to describe my workflow, im saying im used to working with NOT libraries
im not saying im trying to treat it like that. also it was one god damn update chill 😭
322 has been obsolete for months, you said so yourself
in reality, it was a dozen updates
about 5 updates ago yes, but i never stated that it was obsolete
i just had assumed everyone was using that cause everything worked fine
if it works why does it matter?
sure it's bad practice, but i'm usually ensured that most of the library is going to be consistent for my needs. so i know in future versions it really doesn't matter cause it's future proof
anyways it works now
im also pretty sure steammodded one day updated when i opened up balatro but i think cause one of my runs were on an old version it just reverted back for some reason????????? im unsure. bad memory.
one thing i want to state is that im used to my language typically telling me that my libraries need updating (like python) so that's why i'm not very good at checking :p
but thank you for letting me know
sorry for being a bitch about it. bad day =_=
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
position = 'after'
pattern = '''G.shop = nil'''
payload = '''
if G.hpot1 then
G.hpot1:remove()
G.hpot1 = nil
end
if G.hpot2then
G.hpot2:remove()
G.hpot2 = nil
end
'''
match_indent = true
idk why this does nothing
does it not crash
lmao
it doesnt even seem like its running if it doesnt
if G.hpot2then
-# and i will pretend its not related to hotpot
ask ur freaking team smh
none of my team knows ui
i can't believe this
true.
you are cooked paradox, im sorry
but also, what i said above
fix the line and put a print to see if it runs
both the if statements are entered
it genuinely seems like remove just doesn't work for some reason
is there any other way to remove uiboxes?
i usually use :remove() and = nil and it always works, so idk
do you do this for a whole uibox with no parent
what are you removing then
referring to the entire ui and just, :remove(), = nil idk
does anyone know what color cardareas use 3:
i tried finding it in cardarea.lua but didnt see anything
is anything off in this deck application code? it looks fine to me but crashes game with
apply = function(self, back)
G.GAME.used_vouchers["v_crystal_ball"] = true
G.GAME.used_vouchers["v_omen_globe"] = true
Card.apply_to_run(G.P_CENTERS["v_crystal_ball"])
Card.apply_to_run(G.P_CENTERS["v_omen_globe"])
G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 2
end```
i copied it from the vanilla back.lua which works fine for magic/nebula deck so..
You need to do it in an event.
That did not change anything
Put if not G.vouchers then return false end at the top of the event.
Still didn't change anything!
trigger = 'after',
delay = 0.1,
func = function()
G.GAME.used_vouchers["v_crystal_ball"] = true
G.GAME.used_vouchers["v_omen_globe"] = true
Card.apply_to_run(G.P_CENTERS["v_crystal_ball"])
Card.apply_to_run(G.P_CENTERS["v_omen_globe"])
G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 2
return true
end
}))```
i'm not even referencing G.vouchers
Yes, because you didn’t add the line I told you to add.
I did
It's not in there, because that was old code I copied
It's the same error. Want me to screen record and show you?
ooh wait no this is the other error i was getting before, but managed to change?
functions/common_events.lua:2506 attempt to index field T (a nil value)
which is local new_card = new_card or Card(other.T.x, other.T.y, G.CARD_W*(card_scale or 1), G.CARD_H*(card_scale or 1), G.P_CARDS.empty, G.P_CENTERS.c_base, {playing_card = playing_card, bypass_back = G.GAME.selected_back.pos}) in copy_card
in this case it's being called from apply_to_run
Yes, the center is the second input of the function.
function Card:apply_to_run(center)
No it isn't
Yes it is, the card is the first input.
Card:function(center) is the same as Card.function(self, center) so technically yes center is the second input
weird.
am i targeting it wrong........
i think??
its saying its nil but i think its correct
3: how do people even move down to like the 9th node without messing up wtf
is there a way I can make remove_from_deck trigger only on a card being destroyed and not being sold
if not G.CONTROLLER.locks.selling_card
yes
how would i get the child nodes of a parent uibox?
Yes.
i found the issue it was elsewhere
is there a way to filter out specific sources of destruction
like if i wanted a thing to only happen if a card was destroyed by ceremonial dagger specifically
oh i figured out a way
nevermind
it didn't work
No, you would have to take ownership of it and make it set a flag.
with ceremonial dagger specifically it is possible
because it sets card.getting_sliced on the target
but that was an example and not what i actually wanted to do
No, that is just used to get a card to stop calculating.
no but you could just check if card.getting_sliced in remove_from_deck right
that would make it only trigger if destroyed by c.dagger
a lot of custom content that destroys jokers sets card.getting_sliced, so regardless of if that was the intention it won't work
Game:start_run
local start_run_ref = Game.start_run
function Game:start_run(...)
local ret = start_run_ref(self, ...)
---do thing
return ret
end
would this be the correct hook for that
Yes.
left !! okay
can I end an event by returning something other than true
Any truethy value
is it possible to create a deck that would have a whole different set of cards, possible jokers, and poker hands (disabling the vanilla stuff pretty much)
out of curiosity
Put a ","
this is possible
but idk how to do it
the Modded Deck in SDM_0's disables all vanilla jokers that's probably a good place to start
what the hell is this auto fill
it's grammatically incorrect
ye lmao
it should be a hd not an hd
oh yeah marie have you chcked stacked :3
no why
it adds random effects to jokers
mhm
does it have negative effects
on higher stakes, yeah
can you make the splash effect one of the possible bonus effects
sure lol
hell yeah
the exact wording is Every {C:attention}played card{} counts in scoring
just in case you needed it
all good
this is probably the perfect passive name for this
this reminds me of those absolute cinema memes
when they find a way to say the name of something in a different context and they show up
this FORMAT is pissing me off....
✋😭✋
I just learned modding tonight (last 2 hours of my life for silly Jimbo game 😭) here are the fruits of my labor
L…l…limbo? 🔑
why does this enhancement not give xmult when scored?
Dont you need to return xmult?
not for card.ability.Xmult iirc
yeah this also doesn't work
the reset shouldn't be able to trigger until after scoring
i even put in in an event to make sure
What about using context.post_joker or (context.main_scoring and context.cardarea == G.play) instead of context.after etc etc
Lol, i just pulled it from vremade so if you wanted to try it you could tomorrow
It's x_mult
oh
Ahhh yeah something really silly I learned
Chips apparently need to be put in as
hand_chips
But mult is just
mult
;-;
is there a way to get rid of the extra chips text on the bottom?
I never included it anywhere but it just appears on its own
Show the config of your enhancement
here's the whole thing
It’s because you’ve defined a value of bonus, which is used by the game internally for the chips that hiker gives to cards. You should put all of your config variables inside a table named extra generally
ah ok
could I ask what is the tag for bonus cards in the code cuz im trying to make a joker centered around them
so since this enhancement I made scales, I want to make a joker that increases the rate of scaling (like x2)
how would I go about doing this? would the joker be modifying the card/enhancement or something else?
how do i implement this effect:
1 in 2 chance for played cards to return to hand after scoring
here's the joker (temporary placeholder effect added)
is there a way to create a group of jokers so only those appear in a specific booster pack?
SMODS.ObjectType
what does this mean?
"default: Fallback card when object pool is empty"
For example when you run out of jokers in a rarity you get Jimbo
aha
...sounds like a hook on G.FUNCS.draw_from_play_to_discard(e) that would iterate over the played cards and calculate the chance for each one, then manually draw them to hand if successful, then execute the original function.
Jimbo is the default
rarities also apply in boosters right?
Should do, yeah.
How do I format info queue?
Somehow my game crashes whenever I try to put formatable text into info queue (text with #1# things)
how does your info_queue code look?
[Cooked] ~_~
How does the new global calculate work, exactly?
It works almost exactly like a joker except there is no card.
out of curiosity what set of contexts does the global calculate use, is it using jokers' contexts?
No, it's using individual contexts.
Which means it's like the deck.
but i assume i cant just put calculate anywhere in a file
SMODS.current_mod.calculate= function(self, context)
ty!
quick question, does someone have a DebugPlus command to spawn a card in shop ?
nvm i misread it
when selecting a card with my custom suit, it becomes Diamonds. i've tried several different methods of changing card suits, including SMODS.change_base and self:change_suit(), but they all do this
eval maybe?
here's the code for the suit
Are you doing modprefix_suitkey?
here's the code that changes it
Why are you putting values in card.config?
i need them to restore the suit back to what it was before it was unknown
Yes, but you should be putting them in card.ability not card.config
oh fair
card.config isn't saved.
i'll give that a go
while that was needed, it's still doing the same thing
selecting an Unknown card, or viewing the full deck, changes the suit
eval local card = SMODS.create_card({key = "j_modprefix_key", area = G.shop_jokers}); G.shop_jokers:emplace(card); create_shop_card_ui(card)
Where are you using these functions?
unsure if i've done all of this correctly, with the collection_loc_vars and etc.
this is my first blind ^^;
Firstly, you shouldn't still be using G.GAME.probabilities.normal
what is it instead?
Read this.
okie
mm, slightly irritating that i now have to change all of my code for the new probability stuff
but okay
i guess it's good that my dependency will be up-to-date with the content my mod has ^^;
have i done this correctly?
Yes, but you can remove the identifier because it just uses the seed when none is provided.
ah, perfect :D
how can i have a poker hand change at the end of round? im looking for a way sort of like how To Do List does it
ive been wanting to find a way to make it so that jokers can never appear at all. Not in shop, not spawned by other cards, not spawned by blinds, nothing. I was wondering how that'd be possible and thought since i have nothing else to do rn, id ask how i could do that
Would judgement just do nothing?
not all jokers, specific ones only, for example if a joker is sold then that one joker can't appear again no matter what
You would probably remove it from the pool.
what of jokers that naturally have in_pool set to false?
with the new add_to_pool feature i PR'd :3
you hook this and check for the key
what am I missing in this code
SMODS.Atlas{
key = "caricature",
path = "JokerCaricature",
px = 71,
py = 95,
}
SMODS.Joker{
key = "caricature",
loc_txt = {
name = "Caricature",
text = {
"Retriggers rarest its ability will be halved",
}
},
atlas = "caricature",
pos = {x = 0, y = 0},
}
the path needs to be a path to an image file from assets/1x and assets/2x with the extension
but also whats not working
if context.other_joker and context.other_joker.config.center.rarity == 4 and card ~= context.other_joker then
card.ability.extra.triggered = true;
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
return true
end
}))
return {
message = localize({
type = "variable",
key = "a_powmult",
vars = { number_format(card.ability.extra.legendary_exp) },
}),
Emult_mod = lenient_bignum(card.ability.extra.legendary_exp),
colour = G.C.DARK_EDITION,
card = card,
}```
Any reason this only triggers for the second legendary and not the first one?
it is
The localization text appears but no emult is given
2 questions: was this merged? (please let the answer be yes this'd help a lot) and what's the difference between returning true and false here?
copy the jokerless rules....
i was dealing with something like this with xmult, all i did was change the return value to Xmult_mod and the ability.extra.xmult to ability.extra.Xmult
maybe it has something to do with that?
i dunno
i don't want all jokers gone
^
return {
Xmult_mod = card.ability.extra.Xmult,
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } }
}
add it to G.GAME.banned_keys
I don't know if thats the problem
Ill try anyway
use xmult, not xmult mod (xmult does the message automatically)
ohh
it should just be called emult yeah
nvm im actually stupid
i think
Ill try that
also whats the point of returning card = card actually
Idk wth the first joker don't actually trigegr
yeah that could be removed
Still not working
the first joker doesn't actually give any emult
the second one yep
yes, true means it can spawn false means it cant
but if you want them to be permanent just do the banned keys thing
i want to make a joker that retriggers the rarest joker. how would i do that?
whats rarest joker
depends
if the rarest joker is rare, it retriggers all rares
aka highest rarity value
if there is two legendarys, it retriggers both legendarys
does that need to account for modded rarities
no
if context.other_joker and context.other_joker.config.center.rarity == 4 and card ~= context.other_joker then
card.ability.extra.triggered = true;
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
return true
end
}))
return {
Emult = lenient_bignum(card.ability.extra.legendary_exp),
colour = G.C.DARK_EDITION,
}```
With this no one even gives Emult. Just shows the message
this is how to retrigger jokers
https://github.com/nh6574/VanillaRemade/wiki#retrigger_joker
then you would loop through G.jokers.cards and check joker.config.center.rarity to see if it's a number and what the greatest number is
What’s the index of first hand (leftmost) in hand
context.scoring_hand[1]
or if you say in back hand G.hand.cards[1]
fixed all of my probabilities ^^ i still need to fix the suit not working
i'll repost the code here. this is a Blind that uses my new suit, Unknown
it's essentially a way of hiding what suit a card is, cards with this suit act like they would if their suit was known
oh ya i forgot to mention what the problem is
setting the suit works fine, but once i select a card with the suit, it changes to saying it's a different suit
i.e. its base.suit changes from phanta_unknown to eg. Diamonds
this also happens to all the cards when viewing the full deck
and i have no clue why this is happening
halp -u-
is there a way to have it so a joker doesnt have a "set value" by default? for example, the To Do List remake sets "High Card" as the default value when starting a new run, id like it to be a random visible poker hand for each new run
(what a word salad, i hope what im triyng to say makes sense lol)
(it does that already)
the default is mainly for collections i thought
ya
oh really?
the deafult is there so it doesnt break if something dumb happens
i mustve done something wrong for my joker then lol mb
What does main eval do
yeh makes sense
it's mainly so end_of_round only runs once
Why It doesn’t run once by default
no hay de qué
Morning
At work atm I clock out at the afternoon
On break so I can chat for a moment
how do i check the rarity number?
ok
1 is common 4 is legendary
what the fuck was i doing?????? jesus chirst i was in a completely different workspace 😭
anything thats not a number is modded
:>
And for modded rarities it’s the id I think
So A string
yeah but its not relevant to what they want
nvn i had to also provide vars table
is there an equivalent of "has_enhancement" but for seals? :0
Where can i upload my mod?
no, you check card.seal
thank you!
Thank you
just thought of something. i know theres a context for losing, but is there a context for winning?
i dont think so
whats hooking i keep seeing that advice but ive never actually asked
https://github.com/nh6574/VanillaRemade/wiki#whats-a-hook
basically what you do is store the function as a local variable
then immediately after override it by redefinining it with the exact same name and parameters
then what you can do is within your new function, call the reference to the old function using the local variable
and now you can do stuff immediately before or after the original is called
oo okay
a fun quirk of lua
i think i get it. ill give it a shot
Does all Legendary jokers force the find in Soul card to unlock unlock requirement?
Because i have one with a custom unlock requirement and it just says find in soul card (and it unlocks when i do find it there)
WHAT HAPPENED TO MY TOOLTIPS IN THE NEW SMODS
hey i need some help
WH
i have no fucking clue how to code shaders
all i want is a shader that can make it seem like a card is rotating in 3d
(by scaling the x axis
waxed
is this on latest commit?
yes
and it didnt happen before?
this hasn't happened before, no
i've missed quite a few versions but it's failing in the current version
can i see the code for the info queue
oh its weird that it didnt happen before
Oxidised
that's what should happen
why ;u;
because they all reference each other
okay but that doesn't explain Waxed appearing 3 times on Weathered's
hmm
nor the collection thing
okie
its before a recent info queue change
okay well the collection thing doesn't seem to be true
most of my Jokers work fine with them
okay ya the collection's fine actually
i mistook one joker for another that had tooltips
trying the version
I feel like this recursive thing will have always happened, I don't think the info_queue changes should have affected that
i very much remember it not happening
i'd've noticed that before adding them
the previous version is fine
hmm i think that's actually wrong so maybe the new version fixed it lol
i don't see how that's wrong
all the info_queues add all other info_queues it references
you need to check for card.fake_card to stop that usually
yeah I'm not sure why the old version would stop
if Oxidised references Waxed, then Weathered references Oxidised and Waxed, then Exposed references Weathered, Oxidised and Waxed, and Fresh references Exposed, Weathered, Oxidised and Waxed
oh wait i see
what's the fix, again? -3-
So it is somewhat working, i can unlock the card by doing my specified unlock condition. Though soul cards will also unlock it sadly, and the unlock text is still forced to be the soul card one
wait no i don't get this anymore
i check for card.fake_card
is there some sort of safeguarding that has been deleted?
Weathered references Oxidised and Waxed and Oxidised references Waxed
so Oxidised will be added once and Waxed twice
from what it looks like, card.fake_card is not nil when it is a tooltip
Weathered doesn't reference Waxed
but it references things that reference waxed
i don't see how that's an issue
ah i think i see that now
wait
hold on i'm a bit thick, gimme a mo
Tooltips are added recursively
also that is what you said lol
what does waxed reference?
so it's like
nothing
ya so
Weathered is like "i need you to add Oxidised to the queue"
wait no i don't get this again
because then Oxidised is like "we need Waxed too"
so it ends up as Oxidised and Waxed
yes thats what it should be with just weathered
and it's not ^^;
what is it
3 Waxed, 1 Oxidised
can you screenshot it
getting there, hold on
can you screenshot the waxed code too
because something seems mega fucked here actually
yo is there a way to get a tooltip to show when you hover over a checkbox
yo persona 5!!
:D
anyway, here's the code
i think handy has that
yeah add detailed_tooltip = something iirc
alr ill check out handy then
ok yeah thats wrong
can you put print(#info_queue) in them all and screenshot the numbers that appear when you hover?
oh its adding 2 more info_queues per recursive call?
seems like it
idk why its adding 2 each time but its definitely because of not doing first_pass related stuff
each of the info queues is also adding its own info queue to the total queue
huh
those are not the numbers I was expecting 🤣
it's just, generating a load of extra queues?
why
ya i. didn't anticipate that
is there a way I can use card.seal while referencing the entire deck?
i'm trying to use "for _, playing_card in ipairs" to check the deck then using an if statement right after but I think i'm missing something because ti never triggers lol-
oh well ¯_(ツ)_/¯
this is so confusing
you should probably still do the fake_card thing because you would still end up with 3 waxed anyway if the code works correctly
hey guys, did u know! Waxed gives X1.1 Mult :D
or like 6 im bad at counting
loc_vars should probably let you detect if its the first pass or not tbh
i don't quite get why, as Oxidised is the only one that references Waxed -3-
it does
oh wait im thinking of generate_ui
but it does let you detect if its a card for an info queue
because each other thing that references oxidised will add another reference to waxed too
I'm pretty sure it should only get called once anyway
I don't know why it's going multiple times
i mean either way just having a fourth first_pass parameter would probably make it more intuitive idk though
it is technically not needed ig
not when it's supposed to only have one pass anyway
How do i check if a joker is unlocked?
i mean for things like info queues it would make it easier to stop waxed showing up 3 times
a way for info_queue to not add the same info twice would be useful
from all the other referencees
I’ll try figure it out but I am mobile browsing rn
working on the last release ^u^ lesson learned, don't pull from dev!
i mean its good to pull from dev because we find out :3
fair :3
Oh I think I see it where it is but I can’t test rn
Pulling from dev as a dev is also fine if you are confident in what you are doing
I do it while not being confident
@red flower can you try setting the info_queue on line 118 of center.toml to an empty table?
i cant sadly
Also good schmorning chat
I think that’s where it’s coming from
im at work
heyo dilly
where in the smods/balatro is the call to the calculate functions of (for example) jokers?
i have a really dumb idea for a simple mod
Hello! Does anyone can show me how "Oops! All Sixes" works in code?
Out of my own curiosity
you can check VanillaRemade for the recreation in SMODS
Thank You
local ret, err = pcall(...)
if err and err:match("attempt to compare table with number") then
error("Talisman's Fault")
end
does vanillaremade have remade achievements yet
You know, i was looking for something like that for so long, thank you so much
it does not
VanillaRemade also has a wiki which can be very helpful
recalc_debuff on blinds only apply when setting the blind?
Card:calculate_joker
tbh i dont know how achievements work
its a lot of manually inserting check_for_unlock tbh
ok another UI question
so i want the green background to change colors based on config values
So far it only does so when I reload the game
How would I do it dynamically so that pressing the toggle affects the color in real time?
Add a func to the node
so add a func to the node whose color i want to change?
oh nvm just took another look at the UI docs i think i got it lmao
🔥
does this by any chance work with localization files and text styling?
how do i check consumable slots btw
like if its full
wait
ill just check vremade
card.config.center.key
card.ability.name also works but it's another format so it's discouraged
did anyone ever figure this out
tried searching and that was the closest result i could find
i think using an empty set_card_type_badge should delete them
maybe not the mod one tho
Can’t you turn them off in config?
yes but i want one specific card's mod badge off
also i kinda want everyone playing the mod to not see the badge
https://www.love2d.org/wiki/Shader learn how to write opengsl shaders
then apply the love2d changes
GLSL LÖVE shader language
float number
sampler2D Image
uniform extern
texture2D(tex, uv) Texel(tex, uv)
Take your hands, place them on each side of your monitor, move your arms side to side (in sync with each other) at varying speed
Can I make it automatic by having a machine do it for me?
probably not sorry
😔
Why can’t i replace the shaders ingame with custom ones
Like replacing the negative shader
Really good tip
G.UIDEF.special_button = function()
local t = UIBox{definition = {n = G.UIT.ROOT, config = { align = 'cm', colour = G.C.CLEAR, minw = G.deck.T.w, minh = 1.2 }, nodes = {{n=G.UIT.O, config={object = G.UIDEF.special_button_inside()}}}},
config = {major = G.deck, align = 'tm', offset = { x = 0.15, y = -0.35 }, bond = 'Weak', colour = G.C.CLEAR}}
return t
end
G.UIDEF.special_button_inside = function()
return UIBox{definition = {n = G.UIT.ROOT, config = { align = 'cm', colour = G.C.CLEAR, minw = G.deck.T.w, minh = 1.2 }, nodes = {
{ n = G.UIT.R, nodes = {{n = G.UIT.C, config = {align = "tm", minw = 2, minh = 1.2, padding = 0.1, r = 0.1, hover = true, colour = G.C.UI.BACKGROUND_DARK, shadow = true, button = "hpot_special_button", func = "hpot_can_special"}, nodes = {
{n = G.UIT.R, config = { align = "bm", padding = 0, colour = G.C.CLEAR}, nodes = {
{n = G.UIT.T, config = { text = "Line 1\nLine 2", scale = 0.5, colour = G.C.UI.TEXT_LIGHT}
}
}},
}}}}}}, config = {major = G.deck, align = 'tm', offset = { x = 0, y = 0 }, bond = 'Weak', colour = G.C.CLEAR}}
end
How would I access G.UIDEF.special_button_inside's UIBox from G.UIDEF.special_button?
how do you set a card's rank? i found SMODS.modify_rank, is there SMODS.set_rank?
SMODS.change_base
args?
it's in the docs
ok
couldn't find this function in the docs, what are the other two parameters? if i had to guess: edition and juice animation
Silent and delay sprites iirc
hey @red flower why is this not rendering?
jd_def['j_charcuterie_blue_java'] = {
text = {
border_nodes = {
{text = "X", colour = G.C.WHITE},
{ref_table = 'card.ability.extra', ref_value = 'xmult',retrigger_type = 'exp'}
}
},
extra = {
{text = '('},
{ref_table = 'card.joker_display_values',ref_value = "odds"},
{text = ')'},
},
extra_config = {
colour = G.C.GREEN
},
calc_function = function(card)
local num,denom = SMODS.get_probability_vars(card, 1, card.ability.extra.odds,'blue_javajd')
card.joker_display_values.odds = localize { type = 'variable', key = 'jdis_odds', vars = {num,denom}}
end
}
ive ensured that the name is right and everything
figured it would be worth pinging you seeing as you made the mod
is nothing rendering?
everything else is
thats interesting because i dont think ive had trouble with it before? unless theres something critical im missing
maybe i made it work both ways but it should be like this
well this is strange, brainstorm doesn't work