#💻・modding-dev
1 messages · Page 442 of 1
this helped me a bit
i know how to lovely patch
I think she meant like
i just dont know what to patch
oh interesting
the actual functionality
ohh
probably in here
mybad
Just to be sure, since you said earlier it doesn't work - What is the intention of the effect? Does it do anything right now?
its in cardarea.lua btw
thank you!
does anybody here understand regex who can tell me why this is getting no matches?
You can certainly make your own challenge modifiers, but you'd need to patch the game to actually get them to apply
i'm attempting to patch things like this
lovely regex uses normal regex not lua regex
currently I'm trying to make it so that if there's a 3 card straight in your held hand (so like 3 4 5, 10 J Q, etc) you get 20 mult
it currently does not do anything
agh okay, god regex is annoying
added a message thing where the condition is and it doesnt send out anything so thats where the issue is for sure i think
Wait don't cards get sorted in reverse of what you said
the code is in the correct path
oh AHHHHH
it was this 😭 i tricked myself LMAO
i flipped the cards and got my 20 mult
thank you everybody
huh
Why is my mod not being detected?
awesome lol
whast the funciton to give the player cash
ease_dollars(num)
yeah so uh, my lua file made the game crash???? I couldnt see anything wrong with the code though so any ideas? My first modding session btw.... so im like really new to this. Any ideas?
ease_dollars
@hasty mist actually, on second thoughts,
probably just hook/patch into Card:flip() itself
Atlus
yeah i just accidentally made every card flipped all the time
whoops
alright wheres card:flip()
really? i was watching that "How to make modded joker- Balatro" video and not having atlus didnt crash their game.
Wrong spelling. Use Atlas instead
hm
What card area is this?
oh shit
doesnt look like i can do anything there
okay thx
how can i combine these 2 destroys, and also make it so the random card isnt one of the chosen ones
G.pack_cards
flip the card, set a flag on it
and hook to Card:flip() so that it doesnt run if the card has that flag
self.some_key_flag = true
awesome seems simple enough
its just smt like card.ability.perma_flipped = true, smt to tell the code
yea
I'd add a safety measures for perma-flipped cards tho
something like Card:flip(bypass_perma_flipped)
for debugging purposes Ig
any way to check if a single entry is inside a table
do you mean if table contains one entry, or if table contains the entry you're looking for
local card_to_destroy = pseudorandom_element(G.hand.cards, 'random_destroy')
local hand_highlight = G.hand.highlighted
if card_to_destroy is not inside hand_highlight then
local card_to_destroy = pseudorandom_element(G.hand.cards, 'random_destroy')
local hand_highlight = G.hand.highlighted
for _, card in ipairs(G.hand.highlighted) do
if card == card_to_destroy then
Is there a way to make a challenge that bans every joker except for one including modded jokers without manually listing all of them out? Iterating over G.P_CENTER_POOLS.Joker does not work
everything works good now, except it doesnt work with mime, what would i need to change the context to to fix this and not have it give the mult once for each card?
is there any way to jsut generate a random card to destroy thats NOT highlighted
is there a way to make something like "if joker checks for this"?
local non_highlighted = {}
for _, card in ipairs(G.hand.cards) do
if not card.highlighted then
non_highlighted[#non_highlighted+1] = card
end
end
local card_to_destroy = pseudorandom_element(non_highlighted, pseudoseed('random_destroy'))
local ast_flip = Card.flip
using Card:flip means you're practically calling a function
while Card.flip can be used both in a function call and in assigning
return [blank] to do nothing
that's correct
but return Card:flip() is wrong
calling Card:flip() instead of ast_flip in there will cause a loop lol
so you want to flip a card
maybe i need to relearn how hooks work
and within some condition, assign ability.perma_flipped to it
ive done plenty idk why im having so much trouble with this one
local ast_flip = Card.flip
function Card:flip()
if not self.ability.perma_flipped then
ast_flip(self)
end
end
probably smt like that? 🤔
aewait
there
well
is the self in ast_flip necessary, actually
the name perma_flipped suggested that a card facing down can never be flipped
it does
because Card is a class
i see
this looks cursed...
well, the intended effect is that if it was flipped, specifically using the consumable i made, it can not be flipped faceup by discarding or returning to the deck
meaning every time you draw it itll stay flipped
alright
then take this Ig
when moving from a card area to another?
when they get drawn again
for example, flipping an ace of spades, then going to the next blind, when i draw the ace again its no longer flipped
did you set card.ability.perma_flipped = true in your consumable's code
v is the card in highlighted area
card is the consumable card
lmao
imagine assigning perma_flipped to a used consumable
right yes
trying to get this to not give chips if played hand is the same as the last hand, but it just unconditionally gives chips, can anyone see what i did wrong here teehee
i
that looks like it does the complete opposite of what you want 😭
but also, whats znm_sackboy_hand?
ohhhh my goodness that variable is still there from iteration 1 of this
thats whats going on
mhm
and also, change ~= to ==
else you are making it so it gives chips when played poker hand is not the same as the last poker hand
and you can remove the else block
oh this is the intention sorry there was a double negative in my message
curious, is the card looking around effect done with shaders?
yeah, its fine then, just change znm_sackboy_hand, remove the else block (not that it affects anything, its just unnecessary)
if context.discard and not context.blueprint then
if card.ability.extra.Xmult - card.ability.extra.Xmult_loss <= 1 then
G.E_MANAGER:add_event(Event({
func = function()
play_sound("tarot1")
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.3,
blockable = false,
func = function()
card:remove()
return true
end
}))
return true
end
}))
if SMODS.find_card("j_tboi_binge_eater") then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.center_key == "j_tboi_binge_eater" then
if G.jokers.cards[i].ability.extra.Xmult == nil then
G.jokers.cards[i].ability.extra.Xmult = 2
else
G.jokers.cards[i].ability.extra.Xmult = G.jokers.cards[i].ability.extra.Xmult + 2
end
end
end
end
return {
message = localize("k_eaten_ex"),
colour = G.C.FILTER
}
else
card.ability.extra.Xmult = card.ability.extra.Xmult - card.ability.extra.Xmult_loss
return {
message = localize ({
type = "variable",
key = "a_xmult_minus",
vars = { card.ability.extra.Xmult_loss }
}),
colour = G.C.RED
}
end
end
if context.joker_main then
return {
xmult = card.ability.extra.Xmult
}
end
I copied this code from the Vanilla Remade page except for the "binge eater" stuff obviously, and it has a bug where the food can get "eaten" multiple times. Anyone have an idea on how to prvent this?
this is for "Ramen" btw, I'm taking ownership of it to add some functionality
SMODS.find_card returns a table of the card you're looking for
in case it doesn't find any, it returns an empty table
if SMODS.find_card(...) then is not a valid check since it always gets executed
use if next(SMODS.find_card(...)) then instead
that part is working just fine. basically the context gets triggered multiple times. For example, if I get Ramen to X1.01 and then discard 5 cards, it gets eaten 5 times
oof
yeahh its rough
I tried changing it to == instead of <=, but now it has the opposite problem of where I can overshoot and get Ramen to something like X0.99 mult
what are you trying to achieve here
a joker similar to Ramen
what would be the full effect
I added some functionality to all the food items, and as I was debugging I found this bug for Ramen
wait, this is Ramen code copied from Vanilla Remade
exactly
Vanilla Remade could be wrong somewhere
I think its bugged and idk how to fix it 😭
i'm gonna look at the source code for Ramen
what would be Binge Eater's effect
Binge Eater absorbs the abilities of Food Items that get eaten while you're holding Binge Eater
like I said, that part works fine
in case of the code above, I assume it can only absorb Ramen for now
that's the intention right?
I added a similar chunk of code to all the food items. At first I wanted to make a function inside of Binge Eater that gets called, and I can pass into it the arguments I want, but it never really worked out so this is the solution I have
I got it to work with all the vanilla items except for Ramen, which I'm trying to fix
huh, you're taking Ramen ownership?
yeah
I wouldn't recommend tho
why is that
what's wrong with the Ramen check inside Binge Eater
X1.01 Mult, discard 5 cards, eaten 5 times?
whether or not I have Binge Eater, I get this problem. The Binge Eater effect is entirely separate functionality from the item being eaten
no I mean
you said earlier that you made a Ramen check inside Binge Eater but it didn't work
Previously, instead of having a huge block of code where I manually edit Binge Eater's config, I had a function inside of the Binge Eater joker that would make it edit itself, as long as it was passed arguments. I couldn't get the function to work because the game always thought it was nil, so I opted for having a bunch of code that edits Binge Eater from elsewhere. It's not pretty, but for now its getting the job done
so every food joker works inside Binge Eater's block of code but Ramen
yeah, all of them work because the other food Jokers don't get eaten in the same circumstances as Ramen. Usually its at round end, or in the case of Ice Cream and Seltzer, after you play a hand. All of these actions only trigger once, so the Joker gets eaten once. Ramen gets eaten on discard, but you can discard up to five cards. The if statement
if context.discard and not context.blueprint then
if card.ability.extra.Xmult - card.ability.extra.Xmult_loss <= 1 then
somehow allows the action to be triggered multiple times even after the carrd is destroyed
alr let me check
I found a solution
putting card:remove() right before the return statement guarantees that Ramen gets destroyed
unfortunately, it comes at the cost of butchering the animation
it just vanishes without any animation at all
it's because Card:remove() is called properly in vanilla, but delayed inside event queue
rip, vanilla issue
yeah, is there a fix anyone can think of for this? I'd rather not have to sacrifice the animation when the whole synergy is to intentionally eat the item lol
how would i set up a joker that discards cards remotely? like in the speciifc context im doing, i want discarding one card to discard your whole hand
i can see the hook does things that are kinda close to what im doing but it seems very specific to the hook
look at the code of the boss blind that discards things from your hand maybe? could hopefully give some insight
hook discards when you play a hand
discarding one card discards your whole hand is a different context
is there a list of valid arguments for trigger in an Event?
it seems like i need to get a for loop going and ihave that set up but the actual discarding of the cards remotely i cant find anything for since using what the hook has just crashes
this wiki page
if context.pre_discard and not context.blueprint and not context.hook then
if #G.hand.highlighted == 1 then
for _, v in ipairs(G.hand.cards) do
if not v.highlighted then
v.area.add_to_highlighted(v)
end
end
end
end
if discard has only 1 card, highlight all unhighlighted cards before discarding
what does this bit do? it says it's crashing
it should be a comma, not a dot there
my bad
ohh
just to show the issue
it says it's attempting to get the length of highlighted which is a boolean
also, I copied/pasted the code from VanillaRemade directly with no edits, same problem
it's a vanilla issue 💀
frl? this happens in Vanilla, even with no Mods?
yes I know
they should have no difference from true vanilla
in fact
the Ramen you're using is vanilla, not Vanilla Remade
yep
great lol. That means its not my problem 💀
like I said, Vanilla Remade is a code reference that you can easily copy-paste into your mod
it's not a mod
specifically this line is crashing
it does this
I kind of wrote the code without doing so
thats what i was looking at originally i can change the criteria to that
yeah the crash is still the not v.highlighted bit
How do i do Xchip?
it's 1:41am here, I might get some lunch too lol
x_chips = value in the return, just like you would for x_mult
It worked for me without any extra work, I'm not sure if Vanilla has functionality for it that's unused or if SMODS adds it, but regardless that's all you need
omg it worked thank you!!
smods adds it
I figured. It would be pretty odd for Xchips to exist in Vanilla and be unused
I figured out how to prevent the Ramen issue. I added a boolean flag to its config and set it to false when it's eaten. The conditional statement is modified to check for this flag, which prevents it from running any code after it is supposed to be destroyed
Hello I'm very new on balatro modding and I would like to know is there any docummentation on G module or the only option is to check Balatro source code? I would like to simulate a controller button trigger but I don't now If I would be able to do so with G.CONTROLLER
I checked, #G.hand.highlighted should be a number
like, no problem whatsoever
huh weird
check your code again
this is what im working with currently, changed a few things around to no avail
uh, why are you returning true
uhhh great question it is what the hook did iirc 👍 will try without
when you pasted my code in, did you remove your previous attempt
yeah
now try that again, if it crashes, send me the crash screen
thats probably a Card not a CardArea then
shouldn't that be v.area:add_to_highlighted(v)
or like G.hand:add_to_highlighted(v)
idk
i don't think it's gonna work because of highlight limit
G.E_MANAGER:add_event(Event({ func = function()
local any_selected = false
for _, v in ipairs(G.hand.cards) do
if not v.highlighted then
G.hand.cards.highlighted[#G.hand.cards.highlighted+1] = v
v:highlight(true)
any_selected = true
end
end
if any_selected then
play_sound('cardSlide1')
play_sound('card1', 1)
G.FUNCS.discard_cards_from_highlighted(nil, true)
end
return true end }))
delay(0.7)
return true
who knows
maybe that works
how do i check if a playing card is flipped?
card.facing == 'back'
tyy
same crash as earlier but that doesnt mean it cant work i feel like
since the previous thing did do something at some point
if context.pre_discard and not context.blueprint and not context.hook then
if #G.hand.highlighted == 1 then
local buffer = G.hand.config.highlighted_limit
G.hand.config.highlighted_limit = #G.hand.cards
for _, v in ipairs(G.hand.cards) do
if not v.highlighted then
G.hand.add_to_highlighted(G.hand, v)
end
end
G.hand.config.highlighted_limit = buffer
end
end
here, try this
🫡
oh right you can just do that lol
alternatively is there a way to iterate over all of the joker files in my mod because they aren't being added to G.P_CENTER_POOLS.Joker even if the joker files load before the challenge files
oh thats weird
it selects them all (making a very loud noise) but doesnt discard them or let you do anything to discard them yourself until you deselect enough to have 5
ouch
i mean that one doesn't discard them right?
it's just highlighting
oh wait is this a joker
thought it was a blind
ohhh yeah no trying to set up a joker that lets you discard your whole hand by discarding once
YIPPEE
gg?
it works BEAUTIFULLY
thank you so much everyone 🙏 i have learned from this experience and out of it i am a new man
just needed to add this bit in the middle
so it worked?
oh right
you wanna test some stuff with Burnt Joker behavior
because you're wasting your first discard to discard everything in hand
what would i check for if i want to loop through each played card?
G.play.cards
awesome
if you're doing it through a joker you can also use context.full_hand
im doing it through a function
how do i make a blueprint joker
actually theres a better way to do this i think
hm
im trying to make every facedown card count as every suit and be unable to be debuffed
but idk how to do that passively
calculate = function(self, card, context)
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
other_joker = G.jokers.cards[i + 1]
end
end
return SMODS.blueprint_effect(card, other_joker, context)
end,
thank
blueprint recreation
this is what i have so far but i dont know how to actually apply the attributes
do u know if i can half its effect? like the blueprint copies it but is half as good
i think you'd have to do some hooks and stuff
uh
i dont know anything about codin-
idk what that means
blueprint copies a jokers values right? i want this one to half the values so it copies but is 50% worse
what
oh
I see
@vague crest btw add true to add_to_highlighted
it will remove the sound
calculate = function(self, card, context)
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
other_joker = G.jokers.cards[i + 1]
end
end
local ret = SMODS.blueprint_effect(card, other_joker, context)
if ret then
for k, v in pairs(ret) do
if type(v) == 'number' then
v = v/2
end
end
end
return ret
end,
probably doesn't work
you'd want something recursive
got eror
did you check if other_joker exists
since if it doesn't, SMODS.blueprint_effect does nothing
wait, that's the intention
lmao
is there a tool that helps with creating code for jokers?
for example, one that can find terrible code grammar
pardon, is there any mod that utilizes Xmoney and Xprobabilities?
not sure what Xprobabilities is but ascensio uses Xmoney
visual studio code is a popular choice
i do remember seeing a joker with X3 Probabilities
but i never figured out what mod is it
doesn't dice use xprob
does it help you like tell you what's right or wrong?
+prob is the rare one
not out of the box, you'll need the lua extension for that. you can lookup how to add extensions to vdcode for a guide
what's the lua extension needed for that?
the thing i was looking for
OA6 has it?
yes
whats the variable name for a jokers sell value
card.sell_cost is the amount you get when you sell the card (this is reset when calling card:set_cost()), you shouldn't modify this, but you should read from it
card.cost is the amount the joker costs in the shop (divided by 2 for sell cost)
card.ability.extra_value is usually 0, but is what egg + gift card uses to modify the sell cost, this is added onto sell cost
so i should use the 3rd one
yes
egg does
card.ability.extra_value = card.ability.extra_value + card.ability.extra -- (card.ability.extra == 3)
card:set_cost()
why is it orange
check your ctrl+f
what is the thing that doesnt get documented by the wiki
uhhhh
the font thing
and uhh
G.P_center iirc
calculate = function(self, card, context)
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
other_joker = G.jokers.cards[i + 1]
end
end
local function rec_change(table, factor)
for k, v in pairs(table) do
if type(v) == 'number' then
table[k] = v*factor
elseif type(v) == 'table' then
rec_change(v, factor)
end
end
end
if other_joker then
rec_change(other_joker.ability, 0.5)
local ret = SMODS.blueprint_effect(card, other_joker, context)
rec_change(other_joker.ability, 2)
return ret
end
return
end,
very bad since there's like way too many edgecases but it works generally
how do you create a custom pool for booster packs?
im having a slight problem with the localizations entries , i want it to be more organized but not sure how i can set my set to that organized set aka DementiaJonkler set in my Other set
how do i change the pitch of a sound?
is there a reason why start_dissolve gets called a nil value here? the code is almost 1:1 with madness from vanilla remade except with jokers replaced with consumeables (and the random seed is removed)
(i'm trying to make a joker that destroys all your consumeables on selecting blind in exchange for $)
how can i add 2 hands?
G.GAME.current_round.hands_remaining or G.GAME.current_round.hands_left (I forget which of the two it is) is the current amount of hands, do with that what you will
i want the hands to be for the rest of the ante tho
can i use SMODS.Gradient for my mod badges?
Have fun with that

sorry quick question how can i access the playing cards currently selected by a player
G.hand.highlighted[number]
start_dissolve has parameters??
Np lol
apparently 
is it possible to modify base game textures?
how do i change the pitch of a sound?
I think I see an issue unless I just don't understand how start_dissolve works, consumable_to_destroy = destructable_consumables, meaning you're calling start_dissolve on a table, not a consumable
Iirc there is a way to do it but I don't have access to our code rn so I can't look at how it was done, sry
Why do you want to do that?
Sorry i slept
sick, i replaced it with G.consumeables.cards[1] and that did the trick
though that doesn't help me delete all the consumables 
For loops
Lots of for loops
-# (or you could be basic and just use one)
I was wanting to change the texture for something but I realised it's not actually a texture
@lament agate its okay bro you tried
I love you bro
You’re not that guy bro
I’m not that guy 😭
how can I modify what a base game joker does?
lovely patch probably
how do i do that?
Take ownership of jokers
godspeed
bump
I recommend not patching if you’re new
Its kinda fucked up and i dont understand it lol
try this
spectral_card:set_edition("e_negative", true)
how do you just create a card in the first place
i have no idea where to find it in the documentation 😭
patching is both pretty intuitive once you get the hang of it but you need a bit of finesse to do it right
so yeah, don't use patches yet
can someone show me an example of a tag's code?
maybe one day
wdym
1sec
i want to make a negative death card whenever a joker is triggered. all the example mods and stuff just give examples of random cards and not actually like a specific card
sorry for not stating that earlier, it's like 10:45 pm and i'm kinda tired
what's your goal with this?
how would this work
For the person asking how to create a card
it would be a 1 in 3 chance of creating a negative death card if played hand is a flush five
i can't even get the death to generate in the first place so i can't even try and implement all the other stuff
wait why is it generating in G.jokers
no? unless i did it wrong
is it just whatever the joker/consumable/etc type is
would this need a joker?
yes this is in a joker
is this your first mod
ruh roh
id check out how perkeo works in the vanilla rewritten thingy if you havent
https://raw.githubusercontent.com/nh6574/VanillaRemade/refs/heads/main/src/jokers.lua
yes, actually. uh.
i was planning on making simpler jokers first but i already started working on this one and i'd rather finish it
I HIGHLY reccomend making a different test project to get a grasp on how the stuff works
ah
that's in the tabs next to the lua i'm editing
Change it to G.consumeables
If you want consumeables
i honestly don't know
bump
How exactly?
How to add a tag?
Or how to create your own
@snow vale
func = (function()
add_tag(Tag('tag_double'))
play_sound('generic1', 0.9 + math.random() * 0.1, 0.8)
play_sound('holo1', 1.2 + math.random() * 0.1, 0.4)
return true
end)
}))```
How you add
how do you make joker say something when they're in my slot and entering a shop
How you make
or play a sound if it's possible
Honestly, idfk
Ask ruby
i mean, the code to make it work
He has something similar with entropy maybe he can help you
I sent the link of the github
Read
:>
ive already read
@limber blaze
calm down
i'm chill lol
what then? will you explain to me how?
Are you wanting to add a tag?
yeah
yeah, but i dont understand how aply should be done
you want to add
apply = function(self, tag, context)
-- code here
end
this is what does stuff
:yep is such a good function name though
what?
ok i figured a much simpler solution, doing this destroys every tarot card
however, the game softlocks if i don't add return true. and if i do add return true, it only destroys a single card
you put return true outside the for loop
yea
also, the reason why it softlocks when you dont return true is because func doesnt stop until you return something in there
oh that worked, god bless 
now i need to implement gaining cash for each tarot destroyed
tbh you make more from selling the created negative
hmm yeah
you would make more from duplicating hermit/temperance and use them, honestly
It would actually be pretty bad with Perkeo since you'd need to be constantly be buying new consumables to duplicate. It destroyes all of them, after all.
yeah it's a common so it's not supposed to be too strong
$3 per consumeable destroyed, you can get a full refund on anything unused
or free $3-5(depending on vouchers) if you use emperor/priestess
prob a lot more if you play with another mod that can balloon your consumeable size
that should all be in 1 folder called smods inside of mods
okay!
second guessing myself wait
nevermind i'm right
does anyone else know how to fix my issue? (negative spectral cards not being negative)
Balatro/mods/smods
should work hopefully
same thing for talisman i guess?
okay seems the modding for this game is basic and simple
the guide for smods made it seem more complicated
does downloading mods that change gameplay use another savefile?
the only mods i know of that use separate save folders are cryptid and some of its addons
when i was modding balatro ppl just told me get mod manager and get balatro
i did both
bam
i could download anything
is it possible to replace tarot/planet with something more general (ie, consumeable) or do i have to do it like this?
i tried consumeable/consumable as the set ability but they don't seem to work
yea that's what i'm trying to figure out lmao
how i can make it just one hook
just multiple if statements are good enough
Damn, implement good game restart is kinda problematic 
local remove_ref = Card.remove
function Card:remove()
if self.added_to_deck and not G.CONTROLLER.locks.selling_card then
if self.ability.set == "Tarot" then
SMODS.calculate_context{card = self, sriot = {destroying_tarot = true}}
elseif self.ability.set == "Planet" then
SMODS.calculate_context{card = self, sriot = {destroying_planet = true}}
end
end
return remove_ref(self)
end
something like that, probably
i do wanna figure out if i can make something that specifically targets the consumable area
cause then i fear i won't have retroactive compatibility with mods that add their own stuff
function Card:remove(...)
return remove_ref(self, ...)
end
Better do this for all functions even if the're not taking any arguments
like cryptid and all the random bullshit they add lmao
i will take note of that, thanks
Because right now it's not taking any arguments, but what happened after Balatro 1.1.0 cames out? No one knows. Better be ready
local remove_ref = Card.remove
function Card:remove()
if self.added_to_deck and not G.CONTROLLER.locks.selling_card and self.ability.consumeable then
SMODS.calculate_context{card = self, sriot = {["destroying_"..string.lower(self.ability.set or "") or "what"] = true}}
end
return remove_ref(self)
end
?
this actually checks for all the destroyed cards, and return context.sriot.destroying_[...] accordingly depending on which set it came from 🤔
hm
hooow do you check if a card is a consumable again
oh yeah, self.ability.consumeable
nooo oooo
rip
how would i add context to this? i can't group it into destroying_consumable the way it's formatted rn
Good schmorning chat
That’ll track used cards too right?
fucked up error with hard to find issue
Should they count as destroyed?
this is the way i had it work when i had two hooks
dunno, thats how smtcom suggested adding a "check if destroy" context 🤔
-# this is to eremel's question btw
it will actually still work
if you use a planet card then it will return context.sriot.destroying_planet, if you use a tarot card then it will return context.sriot.destroying_tarot
but if you want to group them all together then
local remove_ref = Card.remove
function Card:remove()
if self.added_to_deck and not G.CONTROLLER.locks.selling_card and self.ability.consumeable then
SMODS.calculate_context{card = self, sriot = {destroying_consumable = true}}
end
return remove_ref(self)
end
How could I change how much debt the player can go in?
I'm going to add an actual destroyed context at some point
but I'm pretty sure that this one will trigger on used cards
which I'm also pretty sure is an unintended effect
you're the goat, it works 
nvm, how could i check if theres a specific joker in hand?
i believe you can just mess with G.GAME.bankrupt_at, i use that for 3 cards which increase the debt
oh you nvm'd
damn
uhhh just for loop through the G.jokers
doesnt smods.find_card exist
next(SMODS.find_card("j_modprefix_key")) yeah
what does next() do?
👋 N
next() gives you the next key, value pair on a table and find_card always returns a table even if empty so next() checks if the table is empty
i want to make a copy of a playing card and replace first card in standard pack
actually maybe it's copy_card
fuc k.
take_ownership() or malverk help
ah gotcha :D i'll do the first thing
does it not work? what does it do?
i'd rather you malverk https://discord.com/channels/1116389027176787968/1300851004186820690
you'd be more ✨ crossmod compatable ✨
yeah that's why i've no clue why it's breaking
it should copy one of
the pool cards and properly replace it but it's crashing
¯_(ツ)_/¯
the pool might be empty
the sticker is guaranteed to be applied on at least 1 card
the pool was not empty when i got the first crash
Just to be safe, does a card being created by a Judgement call for this context?
if context.buying_self then
i don't believe so
fuck
looks empty in the log
oh Bollocks
how do i make sure this triggers when its bought or made by judgement?
add_to_deck?
oh right...
i forgot..
so ive been bruteforcing it this whole time
just to be sure, this is only called when itself is added to the deck
yes
also when undebuffed
you can change that anyway
as long as i also check if from_debuff is false it will only apply when bought/sold right
yeah
how do i check how many hands i have
what value can i check that's unique to only playing cards so i can distinguish playing cards from jokers, consumables, etc.
card.seal?
damn, it really do be obvious
Could someone tell me why this is giving me an error about indexing 'center' [a nil alue]?
SMODS.add_card({set = 'Joker', area = G.jokers, key = 'raven'})
G.GAME.joker_buffer = 0
card.ability.extra.ready = false
return {
true
}```
key is not correct
it should be j_yourmodprefix_jokerkey
Oh
area and set aren't actually necessary here, you can remove them if you want
how do i check the hand count
G.GAME.current_round.hands_left iirc
calculate = function(self, card, context)
if context.before then
for _,v in ipairs(context.scoring_hand) do
if not v.seal then
v:set_seal("s_OAL_CakeSeal", true, true)
end
end
end
end,
Hey day devs
There’s
SMODS.has_enhancement
But no SMODS.has_seal
Lmfao
Wait let me check something
modprefix_key for seals.
Oh so no S
oh
strange
i would have never guessed that
how do i check round score and required score
current score is G.GAME.chips and requirement is G.GAME.blind.chips
nothing on its own, but with the chef it gives +50 chips
Who’s the chef
look at my name and i think youll know who
thank you!
calculate = function(self, card, context)
if context.before then
for _,v in ipairs(context.scoring_hand) do
if not v.seal then
v:set_seal("OAL_CakeSeal", true, true)
end
end
end
if context.cardarea == G.play and context.individual then
if card.seal == "OAL_CakeSeal" then
return {
chips = 50
}
end
end
end,
the cake aint caking and giving the 50 chips
Silly
gordon ramsey will be pissed if this aint workin
If v.seal==
but this is outside the loop, no?
yea
Wait i’ll edit it for you
but doesnt v only exist in the for loop
Make another for loop
1 second
calculate = function(self, card, context)
if context.before then
for _,v in ipairs(context.scoring_hand) do
if not v.seal then
v:set_seal("OAL_CakeSeal", true, true)
end
end
end
if context.cardarea == G.play then
for _,v in ipairs(context.scoring_hand) do
if v.seal ==“your seal”then
Return{chips=50}
end
end
end
end,
ill try this
I typed with phone so check for commas
i will
Hello will i’m heaven
it worked! thank you
Card reference the joker
Not playing cards :D
You were testing if the joker has a seal or not
oops lol
Silly :3
so silly
How do i make it so a joker cant appear in the shop but only spawn in from a soul?
i believe just make it legendary?
card.seal.key, i think?
card.seal is an entire table
no actually
nevermind
im wrong
im dumb
i got it working so dont worry!
what if i want to worry
@formal parrot WHERE THE FUCK DO I PUT
IT
@daring fern we were talking about Xmoney without using Talisman
In return
This isnt doing anything, how could i get it to work? it changes the rank just fine
calculate = function(self, card, context)
if context.after and #context.scoring_hand >= 5 then
for _,v in ipairs(context.scoring_hand) do
G.E_MANAGER:add_event(Event({
func = function()
SMODS.modify_rank(v, _)
message = "Bump!"
Message_card = card
return true
end}))
end
end
end,
}
hi smtcom the goat 👋
ease_dollars(G.GAME.dollars)?
No
Talisman doesn't have xdollars?
Return {dollars=G.GAME.dollars}
was avoiding talisman to avoid some unnecessary conflicts or incompat or crashes
where's the multiplier
Return {dollars=G.GAME.dollars*x}
okay
What is the goal?
bump
it gives you the amount of money equal to G.GAME.dollars
ignore the chances, i can do it:
1 in 2 chance to X3 the cashout, 1 in 4 chances to X4 the cashout
Just multiply by (x-1) and add if card.ability.x~=1
Put the message in SMODS.calculate_effect
It doesn’t work ?
no
You would probably have to patch somewhere.
Thats x4 it
return
{dollars = G.GAME.dollars * card.ability.extra.x-1}
Idk how to change ranks :D
patch in?
Never mind, it seems like you can just hook add_round_eval_row
and how do i do i use it
If (card.ability.extra.x~=1 )then
SMODS.calculate_effect({message = "message"}, card)
@lament agate my method works , just tested it 🤓
I really want to do that card flipping animation but idk how
Ease_dollars don’t let you make it compatible with other jokers
Card:flip()
local oldaddroundevalrow = add_round_eval_row
function add_round_eval_row(config)
config = config or {}
if config.dollars and next(SMODS.find_card("j_modprefix_key") then config.dollars = config.dollars * 3 end
return oldaddroundevalrow(config)
end
how would i do a custom pack that can only pull cards of a certain rarity?
nvm i just figured it out
Yes , i guess
in create_card() you can SMODS.add_card { set = 'Joker', rarity = 'Common', key_append = 'jokerkey' }
okay
so
let me get this straight
im gay tho
but
probably do this in an event
what
Niko hear me out
Config ={extra={x=1}},
If (card.ability.extra.x~=1 )then
return
{dollars = G.GAME.dollars * card.ability.extra.x-1}
And you add your context for changing the X or whatever you can make it a fixed value if you want
config = { extra = {x = 1} }
calculate = function(self, card, context)
if (card.ability.extra.x~=1) then
return
{dollars = G.GAME.dollars * card.ability.extra.x-1}
Add context.joker_main
is there a way to make a joker not compatible with rental?
Yes.
read the docs
it's in Joker
CHAT WHAT THE FUCK IT WORKS JUST FINE FOR ME
😭
nxhoo is this end of round money
then heaven is gaslighting you
WHY DIDNT YOU SAY SO
???????????????
DUMBASS
he did say so
Damn really
are you trying to double the cash out money
I SAID CASH OUT HERE
or all money
cash out
then heaven is gaslighting you squared
heaven.,,,
How could i get it to display the messages while the cards are on screen, they are doing the bumping after they leave the screen
calculate = function(self, card, context)
if context.final_scoring_step and #context.scoring_hand >= 5 then
for _,v in ipairs(context.scoring_hand) do
G.E_MANAGER:add_event(Event({
func = function()
v:flip()
SMODS.modify_rank(v, _)
v:flip()
SMODS.calculate_effect({message = "Bumped!"}, v)
return true
end
}))
end
end
end,
i thought we have something special between us,,,
heaven, do you know how to make it so that every spectral card created is a negative?
so this?
where do i put this
Hook create_card
Outside of your joker.
No matter what ive tried, it leaves the screen before doing the Bumped! message
Put instant = true in the SMODS.calculate_effect
i dont think it is, the docs say perishable eternal and <sticker>_compat for modded stickers, but if i put rental_compat = false it still appears as rental
I'd recommend card_eval_status_text over SMODS.calculate_effect
oh right because rentrals are on everything
actually no I should just take a look at SMODS.calculate_effect
lmao
I'm so used to using card_eval_status_text
how would i do it?
already tried that
I THINK
Probably hook SMODS.Stickers["rental"].should_apply
hmm, how would one add some delay of the cards flipping?
calculate = function(self, card, context)
if context.final_scoring_step and #context.scoring_hand >= 5 then
for _,v in ipairs(context.scoring_hand) do
G.E_MANAGER:add_event(Event({
func = function()
v:flip()
SMODS.modify_rank(v, _)
v:flip()
SMODS.calculate_effect({message = "Bumped!", instant = true }, v )
return true
end
}))
end
end
end,
You would put the flip in a different event.
you can change the delay further with delay = but do the event thing first
So like this?
There’s eternal_compat why’s there no rental_compat
wait, you can change delay mid event?
Yes
oh
Delay =0.2
No.
how do you guys endure coding, what the fuck 😭 im fucking bawling
not mid event
Yes
Vanilla re-implementation probably.
I know for a fact it does not have should_apply to preserve vanilla RNG
specifically in this case the delay doesn't do what she wants it to do
I LOVE DISAGREEING WHEN IM WRONG

ok I took a look at SMODS.calculate_effect
Ralsei falls and dies
i think spreading misinformation is peam
kitty need a fucking break
And vanilla does not have rental_compat by default, so prob means you can't.
is {X:gold} a thing?
Peak you mean
no i said peam
its peam
PEAK
yes
peam
no its peam
thank you
{X:anything} is a thing
{X:money} exists
can i share my code?
Yes.
does the card:flip() have any inputs
uea
i need to ease 2 values at the exact same time
What kind of inputs are you looking for
hopefully a delay one
how would i go about this
can you not just make an event using the event manager and delay it on the event level
im kitty
actually no card:flip() doesn't have any args
how dare you lie to me /j
or at least i don't think it does
i can build this event rq hold on
i was confused with juice_up()
local oldcreatecard = create_card
function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)
local g = oldcreatecard(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)
if _type == "Spectral" then
g:set_edition("e_negative")
end
return g
end
Add delay=0.5 between each card
which line do i put it on?
i was told you cant add a delay mid event
G.E_MANAGER:add_event(Event({
trigger = after,
delay = placeholder, -- CHANGE TO YOUR VALUE
func = function()
card:flip()
return true
end
}))
this probably works
@worthy stirrup You’re stacking events put the for inside the event
you could probably just make held in hand spectrals negative
i need to ease 2 values at once >:b
Skull emoji
Ig that's what they asked for
but the joker code doesn't suggest it
how do i ease 2 values at once
cant do this
what are you trying to do
move the window
move it diagonally for instance
in which 2 values would have to change smoothly
maybe i make a for loop that i delay inside?
hmm
to move it diagonally i need to move both x and y at the same time
oh
and love
if i just move them individually really fast then i could probably get away with it
i prolly should've expected lovely has window movement ability
basil learns how all diagonal movement works
no really this is what every program does ever
my idea is that im making a bunch of 'animations'
that the boss blind is gonna use
for the window movement
how do you check how many jokers are owned?
#G.jokers
#G.jokers.cards
ok here's the problem
wait
okay let me figure this out then
they look like negative spectral cards
oh i'm stupi d.
but they take up space
huh
Did you do card:add_to_deck()?
something something add to deck
let me check
is this what im supposed to do? im kinda new to lua so i dont fully understand everything lua return {set = "Joker", area = G.pack_cards, skip_materialize = true, rarity = "dev",debug.sethook(SMODS.Stickers["rental"].should_apply,"r") }
no.
No.
thats probably at the ```lua part
idk what im doing lol
that's the code block
but they left lua inside the block instead
bad newline placement lmao
SMODS.Stickers["rental"].should_apply = function(self, card, center, area, bypass_roll) return false end
damn, i don't know what to do