#💻・modding-dev
1 messages · Page 302 of 1
If you wanna destroy a random joker, why copy Ceremonial Dagger instead of Mad Joker?
I want to destroy to the right then dupe left
ok
I assume you got the dupe part from Invis Joker, right?
correct
it is a weird mix of invis and a previous joker I made (which is based on ceremonial but gives negative to right rather than mult to itself)
INFINITE JOKER
More like put local sliced_card = ... before the if so you can use it in the if conditioning.
So if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then would become if sliced_card and not card.getting_sliced and not sliced_card.ability.eternal and not sliced_card.getting_sliced then
gotcha, added it (and fixed all the red lines) gonna see if it crashed when i use it
calculate = function(self, card, context)
for i,J in ipairs(G.jokers.cards) do
if J == card then
my_pos = i
else
jokers[#jokers+1] = J
end
end
if context.setting_blind and not card.getting_sliced then
if #jokers > 0 then
---if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then
if sliced_card and not card.getting_sliced and not sliced_card.ability.eternal and not sliced_card.getting_sliced then
if #G.jokers.cards <= G.jokers.config.card_limit then
local sliced_card = G.jokers.cards[my_pos+1]
local left_card = G.jokers.cards[my_pos-1]
sliced_card.getting_sliced = true
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
G.E_MANAGER:add_event(Event({func = function()
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex')})
left_card:add_to_deck()
G.jokers:emplace(card)
end}))
else
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_room_ex')})
end
else
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_other_jokers')})
end
end
end
end
}
got this
Where did your local my_pos and local jokers = {} go?
good question, mustve accidentally deleted it ^^'
I've made a modded version of blueprint that copies the joker to its left, rather to its right, i'm trying to make it so that it can't copy blueprint and blueprint can't copy it, since putting them next to eachother ingame makes it so that left clicking crashes the game without giving a crash log, setting blueprint_compat to false makes it so that blueprint reads as incompatible, but the modded joker still reads compatible when placed on blueprint, giving the crash.
is it possible to add a perma_bonus to a card thats not the scoring card?
if context.setting_blind and not card.getting_sliced then
if #jokers > 0 then
---if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then
if sliced_card and not card.getting_sliced and not sliced_card.ability.eternal and not sliced_card.getting_sliced then
if #G.jokers.cards <= G.jokers.config.card_limit then
local sliced_card = G.jokers.cards[my_pos+1]
local left_card = G.jokers.cards[my_pos-1]
sliced_card.getting_sliced = true
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
G.E_MANAGER:add_event(Event({func = function()
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex')})
left_card:add_to_deck()
G.jokers:emplace(card)
end}))
else
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_room_ex')})
end
else
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_other_jokers')})
end
end
end
end
}
still crashing, just about juice up ; note: it crashed before and after added
card:juice_up(0.8, 0.8)
sliced_card:start_dissolve({HEX("57ecab")}, true, 1.6)
play_sound('slice1', 0.96+math.random()*0.08)
was added under G.jokers:emplace(card) and still crashed
me about to add 12 years old meme to my mod:
weirdly enough setting blueprint_compat to false also makes it incompatible with itself
for i,J in ipairs(G.jokers.cards) do
if J == card then
my_pos = i
else
jokers[#jokers+1] = J
end
end
This is not under a context check, therefor it loops trough G.jokers.cards in every possible context. G.jokers.cards doesn't exist in every context tho
I think it’s actually complaining that the jokers table doesn’t exist, needs a local jokers = {}
anyone know why this crash happens, seems to happen when I have one of my jokers bought from the shop, and then select a blind
but it doesnt have any issues if I had it dudring a round
which meme?
the problem joker
i don't get it 😭
anyone know how do i get the id of the consumable being used by the player?
context.consumeable.config.center.key
i will add a new joker
classic
What context does a joker use for 'on buy' effects?
context.buying_card
anyone knows why my joker is not doing anything? all i want for now is that, everytime u use a tarot card, it creates a random new one
Is that for when any card is bought? I need it to trigger when the joker itself is bought
Use the add_to_deck function
I have one
code was too long for discord lmao
crashing regardless
Is it still the same crash?
this one yes
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex')})
left_card:add_to_deck()
G.jokers:emplace(card)
end}))
else
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_room_ex')})
end
else
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_other_jokers')})
those self should be card instead
is there a simple way to check how many hands have already been used in a round?
G.GAME.current_round.hands_played
thanks
not crashing now but not detecting jokers
says there are no other jokers despite there being jokers
Ellen joe
Can you show your full calculate code again
Teto
metal_pipe.mp3
Your local values should be under the context check imo
No offence but I understand it better outside context and would rather just know things to help fix the code
Maybe that's the reason why your jokers isn't checked
I changed it, it's still having the issue
You should use sendDebugMessage for debugging to see at which point it doesn't get the jokers you want
Hell yeah
I think I may have put the xmult increase in the wrong spot
code btw
Correct me if I'm wrong but shouldn't it be the left_card that should be emplaced?
If this doesnt work you should try using SMODS.add_card({key = left_card.config.center.key})
instead of add to deck?
nope, crashes the game
Yea instead of the two lines
apparently not
I think it's because this is outside that it creates so many
context.individual is for playing card scoring process, which would always be nil when using a consumeable.
well if i dont use context.individual it keeps talking about indexing a nil value :(
and giving an error
Because context.consumeable might not exist instead do
if context.using_consumeable then
if context.consumeable.ability.set == ...
What SDM_0 said, in case you thought the message wasn't for you.
oh that makes sense
looking at the game code i saw that but didnt think it was a big deal
thank u for the ping btw
Always do a nil check, boys'n'girls'n'others
😭
What is your joker supposed to do btw Neon Kitchen?
I need opinions, is this an alright effect to have and how rare should the joker be?
Sounds Rare or Very Rare
Yea it's kinda like a better Carto
I was thinking of this being rare or legendary but idk if the effect is adequate enough for a legendary
Must have space
doing return true but now it is destroying the left then recreating it
Replace left_card by the card you wanna copy
good point, I forgot to add that
it is copying left, i want it to destroy the right and it is just not doing that
its destroying the left
then recreating the one it jsut destroyed
there is no art for now, I am terrible at doing art and I was leaving it for last for that reason
and when I say terrible I mean it lol
Keep trying and you’ll get better
Trust
I was horrible
yeah ik, I was just focusing on the part I at least can do a little bit better which is coding, even if I haven't worked with Lua before
Odd, maybe sliced_card is getting replaced somehow
Same
I’m doing the reverse LOL
the upside is when I do get around to making the art, I only have 7 jokers in this mod, so it won't be that much work hopefully
I’m doing the art and saving ideas to code later
it was. Working now
final code
can I see some of your art?
Does it not crash if it's the first or last joker?
nope. Says there are no jokers
Good
Nvm, crashes without a left joker but i think I can fix it
Fixed, just had to add if #jokers > 0 and not G.jokers.cards[my_pos-1] == nil then
if #jokers > 0 and G.jokers.cards[my_pos-1] then also works but nice 👍
I swear, every single joker i have made has forced me to get help lmao
It is never shameful to ask for help.
Tbh if you're just starting that's quite a complex joker so props for going this far 👍
thank you and i am not ashamed, just find it funny that i dived into the deep end
we all start somewhere, I keep coming back asking for the simplest things because I can't figure everything out on my own
Real, happens when making music and any creative thing (just more obvious in coding cus you can almost always see it)
i am only good at programming
That being said, I'm currently also asking for help. *bump
Sorry for late response
holy shit
Question tho, is there a way to have a joker ignore a full joker hand when you buy it? (I have a joker that adds an extra joker slot and you cant buy it when jokers are full)
ooh that's really nice
After 1 round of modded balatro i have to work in the mines and create another joker
Took me a lot to learn LOL
I never done pixel art before
eugh I will have to find out how to fix this
I know this is out of nowhere but holy crap thank you so much, I didnt realise you could do "_______ == nil " and its fixed an issue I've had for hours
Welcome. I only know this cus i do it alot in unity
I can imagine
Actually it took me like 2 days
I implemented what i learned from normal art to pixel art
Like shading and stuff
Just look up some references and some jokers from the game
They helped me a log
Lot
yeah that makes sense
my only experience with art is music really, but I don't think that's gonna help me with drawing pixel art lmfao
i have been learning art though out my balala modding journey of all things
like im actually kinda proud of these two ngl
they're both nice but ten 10s should probably have the white border the other jokers have
is the Good 'n Evil art a reference to that one album cover by Tally Hall (?)
yes
I have no idea how I remembered that
im too lazy to read allat (good 'n evil)
good sprites tho
Bumping and adding a question: if i see a joker and go "thats cool" can i ask the creator if i can make one with a similar/the same trait as it?
reminds me i need to make some album jokers
this is the one album joker i have though i might change the effect tbh
is that lemon demon?
close enough
i should make the marvin's marvelous mechanical museum joker
I am making ghost pop tapes 100% but idk what it would be
featuring jimbo, jolly joker, blueprint and brainstorm
why not
I fixed it! That means that all my jokers are done codewise (I hope) and I just need to make the art and maybe balance them
it's still free +4 mult
does that mean it copies both the joker to the far left and to it's right. Damn that is gonna be used too much
if my mod has an error does balatro just blackscreen when i strat it?
no, it'll give a crash, or if it's an infinite loop, shutdown everything
well thats very fun
a blackscreen can happen, but shouldn't if you're not doing something really weird in your code
Haha, what's your mod added so far? Is it just a joker and some loading code?
uhhhh
you'll wanna post your code, I reckon 😛
i added a joker that has X2 mult and -0.25 Mult every round
uhh i didnt do that 2nd part yet because i just wanted to see if it would work
Should this
A.) Balance chips and mult for the next hand
B.) Turns all cards in hand into Steel
Or the slightly unbalanced
C.) Draw all steel cards in deck regardless of hand size
that screams baron mime naneinf ngl
otherwise B sounds good
hmmmm so if i remove the steamodded header the black screen goes away probably because my mod didnt load
the hell is going on with my mod??
Alt Ramen 👀
ah, are you using a header in the .lua file?
yeah..?
i had this stupid idea for a joker once where it gives like x20 mult
with a 1 in 10 chance of doing x0 mult
its supposed to look like this right
--- STEAMODDED HEADER
--- MOD_NAME: Stuffz
--- MOD_ID: STUFFZ
--- MOD_AUTHOR: [Mini]
--- MOD_DESCRIPTION: Adds some jokers.
--- PREFIX: stfz
----------------------------------------------
------------MOD CODE -------------------------
you shouldnt use a header
oh?
not your fault for not knowing, no worries, but it's the outdated method for loading mods. You'll wanna use a separate .json file
morefluff only uses a header because i havent been bothered to change it
please don't use lua headers as those are depracrated now
deprecated? depracated?
idk
I HAVE a stupid idea for a joker where it does 11 different things depending on how many of each suit you have scored
And i think i have to go through with it
Also isnt 1 in 10 a bit too low of a chance
Complexity Creep - Rare
Gains a random effect after each Boss Blind
X20 is a biggo xmult
i was thinking about it but the example mod that i'm trying to learn off of was updated like 4 months ago and i figured that not much breaking changes should've happened in that gap
haha, good luck with setting that up. Took me making a whole system to make that work
sorry i will look into it
oof, haha, yeah it's very different now 😛
whats the format for main.json, same as header?
Make it -1X mult so it fucks you iver and gives you negative score
but nothing wrong with making that mistake, the documentation on what's changed isn't great
I'm not sure, I've never used a header! I'd check some recent mods and see what they do, but I think there's a template on the smods wiki you should be using
yes! hover over it in collection and press 3 (or shift-3, depending on your settings)
Congrats 😊
whenever im down i know SMODS.Gradient got me
does debugplus have an option to instantly end the round and go to cash out
yes
Win Blind
ah oke just saw that 😭
@formal parrot the most temporary of temporary art
😭😭😭😭😭😭
do you not just have random art slapped on it
I know but I'd rather have this than vanilla joker art reused
no bc I have no idea what to draw for them yet
only one of these has anything to do with suits 😭
i meant like glutt greedy lusty n wrathful
yeah I know what you mean
Holy shit 😭
how do i get the scoring hand
the characters from the hit netflix anime series the seven deadly sins
don't actually do that
SMODS.Rarity { key = "supercommon", loc_txt = "Super Common", default_weight = 100, badge_colour = HEX('FFA500'), get_weight = function(self, weight, object_type) return weight end, }
I was try to create a super common rarity to test my joker but it doesn't seem to do anything, reading the code on the SteamModded I would think it will make the joker much more common in this case
is there a branching category for all cards (eg, something to detect a specific edition from consumables and jokers) or do i just need to add an "or" between consumables and joker
no idea it existed, still I'm wondering why the rarity doesn't work
You needed to put pools = {["Joker"] = true},
oh I see
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
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
if context.joker_main then
if context.other_joker then
if context.other_joker.config.center.edition == 'e_negative' then
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_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end
end
}
It is meant to detect negatives jokers (idk how i can get it to detect consumables) then give 2x mult for each one but it is doing neither
The edition key is at card.edition.key
context.joker_main and context.other_joker don't happen at the same time
also for consumables it's just context.other_consumeable
are they meant to happen at the same time?
no, what I'm saying is that they are separate contexts
remove the context.joker_main check
gotcha. It should still detect when I play a hand right?
yes
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
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
if context.other_joker then
if context.other_joker.card.edition.key == 'e_negative' then
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_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end
}
Remove .card when checking edition.
You’ll also need to check just the edition exists first too
is that why i got this error?
and would it be this?
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS.e_negative
end,
The line that is context.othwr_card.edition.key should be context.other_card.edition and context.other_card.edition.key == blablabla
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
local other_joker = {}
local other_consumeable = {}
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
end
for j = 1, #G.consumeable.cards do
if G.consumeable.cards[i] == card then other_consumeable = G.jokers.card[i+1] end
end
if context.other_joker or context.other_consumeable then
if context.other_card.edition and context.other_card.edition.key == 'e_negative' or context.other_card.edition and context.other_consumeable.edition.key == 'e_negative' then
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
context.other_consumeable:juice_up(0.5, 0.5)
return true
end
}))
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end
}
new error :3
also happens if
local other_joker = nil
local other_consumeable = nil
G.consumeables
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
local other_joker = {}
local other_consumeable = {}
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
end
for j = 1, #G.consumeables.cards do
if G.consumeables[i] == card then other_consumeable = G.consumeables[i+1] end
end
if context.other_joker or context.other_consumeable then
if context.other_card.edition and context.other_card.edition.key == 'e_negative' or context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative' then
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
context.other_consumeable:juice_up(0.5, 0.5)
return true
end
}))
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end
}
new issue
how do i get all of the cards of the played hand
if someone helps, please ping :3
reverse russian roulette
i havent even finished the 3 jokers im planning to make and i already have 3 more in my backlog of hellish ideas
I'm trying to think of more ideas tbh
some i'm like "i want to make this into a joker" but idk how
i now have 9 jokers this is good pace
Attaching onto this a question: do we ask for joker input here or in modding chat?
I do it in modding chat because there's more people there
mood
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
local other_joker = {}
local other_consumeable = {}
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
end
for j = 1, #G.consumeables.cards do
if G.consumeables[i] == card then other_consumeable = G.consumeables[i+1] end
end
if context.other_joker == 1 or context.other_consumeable == 1 then
if context.other_card.edition and context.other_card.edition.key == 'e_negative' or context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative' then
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
context.other_consumeable:juice_up(0.5, 0.5)
return true
end
}))
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end
}
stopped the crashing but now it just doesnt work again
What this Joker do?
This can't be a joker and a consumeable at the same time.
Wdym? It is a joker
2x mult per negative (joker and consumeable)
Your checking if any consumeables are the same as the joker.
Yea also not sure why you're calling context.other_joker and context.other_consumeable
Ah- can you please point where I am doing this?
Egg on my face, thank you. should consumables be in there?
is it possible to change the pos value of a joker during the calculate function?
i wanna make a joker have different forms but i dont wanna make a different joker for each version, ideally i just want it to be all in one
card.children.center.set_sprite_pos({x = x, y = y}) i think
You should remove everything in your calculate function and try putting ```lua
if context.other_joker or context.other_consumeable then
if (context.other_joker.edition and context.other_joker.edition.key == 'e_negative') or (context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative') then
return {
x_mult = 2,
card = card
}
end
end
I'm not sure if this works because I just wrote it now.
:set_sprite_pos but yes
Even having other_joker and other_consumable being established as local variables?
is there a way to increase the amount of joker slots
Yes.
G.jokers.config.card_limit = G.jokers.config.card_limit + increase
oooooooooooooo oke
card:set_sprite_pos({ x = x, y = y})?
missing .children.center
oh its card.children.center:set_sprite_pos???
ive never seen that before
only card:
I checked and it works as long as you check if context.other_joker or context.other_consumeable exist in the brackets respectively.
is there anyway to stock how much dollars a player earned precisely during a blind?
i dont know of base game or modded jokers that do that, i don't know all mods but in case someone already knows one i could check on?
Idk why but its not working for me cus it says other_consumeable is nil
you could pull from their dollar amount and store it in a variable, then pull again when you wanna use it and look at the difference
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.other_joker or context.other_consumeable then
if (context.other_joker.edition and context.other_joker.edition.key == 'e_negative') or (context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative') then
return {
x_mult = 2,
card = card
}
end
end
end
}
if context.other_joker or context.other_consumeable then
if (context.other_joker and context.other_joker.edition and context.other_joker.edition.key == 'e_negative') or (context.other_consumeable and context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative') then
return {
x_mult = 2,
card = card
}
end
end
but that wouldnt account for things like spending it just sees the difference on before vs after
wanted to do it but i also wondered how i could show continuously the amount the player earned; is there a context that updates itself?
its not about the benefice but just how much has been earned
brilliant, thank you!
mayhaps you could check the price when its added to your deck and then do a check at the end of each round's money screen calculation and keep adding from that
though i feel like theres probably a check for when money is added i feel it in my gut
but it wouldn"t be within a blind then?
i thought there would but for now i havent found it yet
you could reset it each blind completion
theres context for blind completions
see what context campfire uses :V
there's something called "c_dollars_earned" but i dont really understand what it refers to
looks more like for the feedback of earned dollars for ease_dollars
try doing a debug run and check it
if context.end_of_round and G.GAME.blind.boss
lemme provide you my debug function, it does a little action text with whatever you put in the function parenthesis. Its only in the corner cuz i dont know how to move it lmao ive tried everything
function maxx_debug(txt)
attention_text({
text = txt,
scale = 1.3,
hold = 1.4,
major = aura_card,
backdrop_colour = G.C.RARITY[4],
align = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and 'tm' or 'cm',
offset = {x = 0, y = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and -0.2 or 0},
silent = true
})
end```
y'all don't just use print with debugplus enabled
how do i add it in?
use this and during some kinda context put maxx_debug(c_dollars_earned)
wuh
just slap it into your code and then call the function the way i outlined above
i know but i dont know to use it properly either
kinda huge news lmao
i have it installed but i use it like an ape
do you know how to print??
does it have to be within a section?
or can it be just in any context like that?
just put in your code print(c_dollars_earned) whenever you wanna check it, it can go anywhere
sadge
imma try it
Xnil mult and all it does is immediately crash your game when it's triggered
attempt to compare to a nil value
Ngl, need that
if it gives "nil" it means 0 right?
yes and no
No.
yeah no it's alwyas nil
Nil means nothing, 0 means lack of thing
you didnt set up a values table so 'card.ability.extra.xmult' doesnt refer to anything i dont think. Try adding this mayhaps?
config = { extra = {
Xmult = 3
}
},```also in your calculate function you use x_mult and not Xmult which is different im pretty sure
i may be wrong tho i am very stupid
x_mult is correct for other jokers and consumables.
I do have this #💻・modding-dev message
where
Still not working
loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.Xmult } }
end,
i dont see it
under loc_txt
Can I somehow reload Steamodded mod's config page?
but yeah Xmult and x_mult are 2 different things here
It doesn't matter what you call the variable.
oh does smods use both to mean that
strange
though i guess for good code practice you shouldnt switch it up :V
Btw, i mean it is showing nil again, was crashing but that is fixed
OHHHH
its card.ability.extra.Xmult
you need to put center.ability.extra.Xmult
oh i may be stupid
I am close to just putting 2 instead of proper code but i want to know how to do it yk
is there a context like blind_is_selected ?
context.setting_blind
thank you !
im looking at a guide and like i have no clue whats wrong here
show the actual localisation
i dont see a difference
SMODS.Joker{
--identifier
key = 'xRay',
--what it says
loc_txt = {
name = 'X-Ray',
text = {
"{X:mult,C:dark_edition} X#1# {} Mult",
"per {C:dark_edition}negative{}"
}
},
config = {extra = {Xmult = 2}},
rarity = 3,
--sprite location
atlas = 'Jokers',
pos = {x = 1, y = 0},
cost = 10,
loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.other_joker or context.other_consumeable then
if (context.other_joker and context.other_joker.edition and context.other_joker.edition.key == 'e_negative') or (context.other_consumeable and context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative') then
return {
x_mult = 2,
card = card
}
end
end
end
}
loc txt might be doing something funny but i doubt it
full thing
irrelevant change anyway since you can name it whatever you want
wha
but center is just inaccurate
ok sanity check
wait holdon
when youre checking if it works
are you going into an existing save where its already there
yes?
dont do that
oh my god
card abilty values dont get reset when you change them
im shitting the bed
u need to spawn in that joker again
ive had this exact same issue more times than id like to admit cause i always forget
i remember debugging my first joker with bepis and i did the same problem and i was ready to die when i figured it out
usually i just tend to check the collection now cause it bypasses the issue
probably dark_edition
aka the negative color
its a gradient
It is negative colour
i mean the "X2" in the red background
do you like my cards
oh yeah
it is negative
ngl that doesnt look the best its kinda hard to read
i sure love playing to get 5oak ❤️
you cant get Xoak or flush with these
it is entirely a downside for a reverse spectral card
it should be X:mult,C:white btw
I am aware, was experimenting cus its negative based
if you dont wanna make it just white i reccomend setting up a custom text color so that its still negative reminiscent but readable
half a dollar ,,,,
cryptid addon anyway so decimal money is fine
But effort lmao
half a dollar ,,,,
btw if the wording isnt clear this means cleansing a 7 takes 6 chips because it goes from 7 -> 1 so you get 3 dollars
i need to make more jokers tomorrow because i got 2 more new joker ideas
does it synergize with hiker
it doesnt take the bonus chips but i should probably make it do that
and im STILL not making The Nether as a boss blind for some reason
i could've done that earlier
im stupid
would be a fun synergy if it does :3
does this work with stone cards too
for the same reason probably not yet
free 25 dollars
🤑
stone cards finally getting an use, crazy
1 chip stone card would be funny but ill probably just have to make it cleanse the stone enhancement too
change {X:mult, C:dark_edition} into {X:mult, C:negativetxt} or {X:mult, C:negativemult} and then add either of these lines into the code somewhere (i usually put it right above the joker that its relevant for)
G.ARGS.LOC_COLOURS['negativetxt'] = HEX("c6d7ff") G.ARGS.LOC_COLOURS['negativemult'] = HEX("bdd659")
there we go did the effort for you lmao
thank you 🙏
so
new question unrelated to the previous situation
is it possible to get a joker's pos using like their key or wtv
how do i get the cards enhancement so that i can give it back
SMODS.Blind {
loc_txt = {
name = 'The Truth',
text = { 'Ignores all seals, enhancements, and editions for cards' }
},
key = 'Truth',
name = 'The Truth',
config = {},
boss = { min = 1, max = 10, hardcore = true },
boss_colour = HEX("7f7373"),
atlas = "BlindChips",
pos = { x = 0, y = 2 },
dollars = 5,
press_play = function(self)
G.E_MANAGER:add_event(Event({
func = function()
for _, card in ipairs(G.play.cards) do
card._truth_backup = {
seal = card.seal,
edition = card.edition,
ability_key = card.ability and card.ability.key
}
if card.ability then
card:set_ability(G.P_CENTERS.c_base)
card.seal = nil
card.edition = nil
end
end
return true
end
}))
return true
end,
drawn_to_hand = function(self)
for _, pile in ipairs({G.play, G.hand, G.discard}) do
for _, card in ipairs(pile.cards) do
if card._truth_backup then
local ability_key = card._truth_backup.ability_key
if ability_key and G.P_CENTERS[ability_key] then
card:set_ability(G.P_CENTERS[ability_key])
else
card:set_ability(G.P_CENTERS.c_base)
end
card.seal = card._truth_backup.seal
card.edition = card._truth_backup.edition
card._truth_backup = nil
end
end
end
end
}
You mean like position in the joker slots?
no like position on the atlas
card.children.center.sprite_pos iirc
im working on a joker that mocks other jokers but uses a different spritesheet, i wanna pull the pos and then set its pos to that since im using a spritesheet that lines up
SMODS.Joker{
--identifier
key = 'xRay',
--what it says
G.ARGS.LOC_COLOURS['negativetxt'] == HEX("c6d7ff"),
loc_txt = {
name = 'X-Ray',
text = {
"{X:mult,C:negativetxt} X#1# {} Mult",
"per {C:dark_edition}negative{}"
}
},
and
G.ARGS.LOC_COLOURS['negativetxt'] = HEX("c6d7ff")
SMODS.Joker{
--identifier
key = 'xRay',
--what it says
loc_txt = {
name = 'X-Ray',
text = {
"{X:mult,C:negativetxt} X#1# {} Mult",
"per {C:dark_edition}negative{}"
}
},
what
why
wtf
did i do it wrong?
i dont think so??
oh wait
its not == its just = im stupid
change it to one equals
SMODS.Joker{
--identifier
key = 'xRay',
--what it says
G.ARGS.LOC_COLOURS['negativetxt'] = HEX("c6d7ff"),
loc_txt = {
name = 'X-Ray',
text = {
"{X:mult,C:negativetxt} X#1# {} Mult",
"per {C:dark_edition}negative{}"
}
},
i have this but moneyearned increases not only out of game blind, but also when i dont change the game dollar value (for example selecting a playing card increases it by 20), any clue why?
local moneytrack = 0
if context.setting_blind then
moneytrack = G.GAME.dollars
end
if G.GAME.blind and moneytrack ~= G.GAME.dollars then
if moneytrack < G.GAME.dollars then
card.ability.extra.moneyearned = card.ability.extra.moneyearned + (G.GAME.dollars-moneytrack)
moneytrack = G.GAME.dollars
end
if moneytrack > G.GAME.dollars then
moneytrack = G.GAME.dollars
end
end
if context.joker_main then
if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
return{
x_mod = card.ability.extra.xmult
}
end
end
if context.end_of_round then
card.ability.extra.moneyearned = 0
end
why the fuck???
hold on lemme like
Use SMODS.get_enhancements() to get the enhancements.
yeah i dont know does anyone know how to set up custom text colors
cuz afaik this should be working
so i have no fucking idea
what's the effect supposed to be
to count how much dollars the player has earned during the blind (not counting how much he lost, only earned), and if it goes over a number then a mult is applied
so from blind start to the end of round, counting the money earned, and outside ideally would shouw "0$" since not counting
New technology unlocked: rerender settings page on any moment 
hmm i don't know if the logic you're doing is correct or if you can even do that inside calculate but:
- to check if you're in a blind it's
G.GAME.blind.in_blind - to give xmult it's
xmultorx_multnotx_mod context.end_of_roundis going to trigger many times, you should always docontext.end_of_round and context.game_over == false and context.main_evalfor these kinds of effects
.
ok will do it like that and see
thank you!
ok out of blind it works
but within a blind it goes stupid
thank you for the help but ill keep it white until either of us revisit it
when i sell a joker for 2 dollars it shows 1296 or so dollars
and it also adds dollars when i select playing cards for obscure reasons
should i set it global?
it will always be 0
why?
because every time calculate is called you reset it back to 0
you should store it in G.GAME.modprefix_moneytrack
should i make it a loc vars instead?
what is it?
yeah that works too probably
this is how you store globals between reloads
your mod prefix is just so it doesnt conflict
ok i made it a loc vars it seems to start to work
but there's a weird thing, on first blind it shows the total gold i have
and on following blind, it's the total gold i have minus the total gold i had at the end of previous round
Hi! Is there an easy way to perform an action when another Joker is "triggered" (I guess we can define this as them getting "juiced up"). I thought context.other_joker would work, but that just refers to when another Joker is allowed to trigger, not necessarily when it triggers.
context.post_trigger you also have to enable the optional feature.
So after updating smods, using a patch i used in the past now gives me this error. Does anyone know why?
[manifest]
version = "1.0.0"
priority = 0
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "self.seal = cardTable.seal"
position = "after"
match_indent = true
payload = '''
self.isIjiarq = cardTable.isIjiarq
self.visiblyIjiraq = cardTable.visiblyIjiraq
'''
times = 1
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "seal = self.seal,"
position = "after"
match_indent = true
payload = '''
isIjiarq = self.isIjiarq,
visiblyIjiraq = self.visiblyIjiraq,
'''
times = 1```
Couldn't you just hook Card:save and Card:load?
local oldsave = Card.save
function Card:save()
cardTable = oldsave(self)
cardTable.isIjiarq = self.isIjiarq
return cardTable
end
``` for save.
in the main lua file?
Yes.
And ```lua
local oldload = Card.load
function Card:load(cardTable, other_card)
self.isIjiarq = cardTable.isIjiarq
return oldload(self, cardTable, other_card)
end
Yes.
okie doke
Wow, how did I miss that. And what's the optional feature that I need to enable?
SMODS.current_mod.optional_features = function()
return {
post_trigger = true
}
end
it still gives me the same error. Heres my main.lua
Beautiful. Thank you!
Is there a way to categorise jokers? Eg, if i had a bunch of knife jokers and wanted them all to be the same type, could I do that?
Like in different entries in the collection?
Kinda. So that if i had a joker that affected all of them, I wouldnt have to list them all
You would either give them all a certain rarity or put them in a specific pool or give them all a specific unique key like all ending in knife or give them a unique value in their config.
Like Somethingcom said, you can make a pool of objects using SMODS.ObjectType
Paperback and Cryptid got some if you need refs
Is it in the base cryptid code? I might be blind
im bad at pixel art...
Second question: is it possible to make odds like "5/6"?
Sweet. for config, would it be odds = 5/6?
1 in 5/6 or 5 in 6?
5 in 6
do you want it to be affected by oops
how do I access the round number in game?
last bit before i code more: would detecting only numbered cards be
if context.other_card:get_id() == 2-10 then?
yes
then thats a bit hard because the normal probabilities start at 1
you can make it like some stuff in cryptid where it goes down
No, it would be if not context.other_card:is_face()
thank you
if not context.other_card:is_face() and context.other_card:get_id() ~= 14
id 14 refers to Ace, u can remove it if u still want Aces to be counted
G.GAME.round
its just an econ that give 10 dollars after selecting a blind
?
if you meant balancing wise, its not a big deal but if you meant code wise, i dont quite get what you mean
i mean code-wise, G.GAME.probabilities.normal starts at 1
The border needs to be 2 pixel wide honey
If you’re making one
so you can make it 6-G.GAME.probabilities.normal in 6 maybe but it goes down with oops
or make it 4+G.GAME.probabilities.normal in 6 but it doesnt double
...no?
or at least, the template i got has that border
it does seem to be working normally though
wdym doesnt double?
You see every joker in the base game usually has an outline of gray of 1 pixel and another one with 2pixel usually white
huh
Why not 5 * G.GAME.probabilities.normal?
@manic rune
well damn
oh youre right yeah
blame the template, not me :p
I’m not blaming you cutie
would that make it 10 in 6 or 6 in 6 with oops?
10 in 6
Also your corners DONT have to be round
You can make them flat if you want to
It’s a matter of preference
Your art us amazing good luck
gotcha. that works the same as 6 in 6 no?
yeah
the joker combusts if its above 6 in 6
if you want to make it 6 in 6 you can do the 4 + G.GAME.probabilities.normal thing
looks cleaner that way imo
but then it would go to 8 with 2 oops
does the 2px thick border look better than the 1px one
im still very proud of the borders i made for my mod
wat border
look at em
i dont remember there being one
OHHH
that
yeah it looks clean
do u intend to do anything with the arrows of link monsters?
probably not but maybe
config = {extra = { mult = 5, odds = 5/6, repetitions = 1}},
rarity = 2,
--sprite location
atlas = 'Jokers',
pos = {x = 0, y = 0},
cost = 4,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, (4 + G.GAME.probabilities.normal), card.ability.extra.odds } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if not context.other_card:is_face() then
mult_mod = card.ability.extra.mult
if pseudorandom('vinyl') < card.ability.extra.odds then
return {
message = 'Again!',
repetitions = card.ability.extra.repetitions,
-- The card the repetitions are applying to is context.other_card
card = context.other_card
}
not the joker the odds will be put on (tho this one will have odds too) but does this look right?
the problem is that any arrow that is not left/right and maybe the bottom ones dont mean anything
it is adding mult with a chance to retrigger
if not a face
true, true, though it would be interesting if link monsters had smt to do with their arrows, since i think they are currently just like other monsters if im not wrong?
no, it should be something like pseudorandom('vinyl') < (4 + G.GAME.probabilities.normal)/card.ability.extra.odds
4 can also be stored in config maybe
#💻・modding-dev message basing on this
they have some special properties like not being able to be flipped but yeah
cus odds are 5/6 in config
then the odds would be fixed
I see what you mean, changed it to what you said
odds should be 6 in this case btw
what I am getting
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, (G.GAME.probabilities.normal), card.ability.extra.odds } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if not context.other_card:is_face() then
mult_mod = card.ability.extra.mult
if pseudorandom('vinyl') < (4 + G.GAME.probabilities.normal)/card.ability.extra.odds then
return {
message = 'Again!',
repetitions = card.ability.extra.repetitions,
-- The card the repetitions are applying to is context.other_card
card = context.other_card
}
end
end
end
end
}```
Change 4 + to 5 *
they want it to be 6 in 6 when doubled
...no offense, but i would legit have no clue what its supposed to do if i were to read this 😭
cus i didnt finish the description
(G.GAME and G.GAME.probabilities.normal or 1) * 3 could work.
they want the joker to start at 5/6 though
* 5, then.
but that would make it 10 lol
they want it to go to 6/6 when u have oa6 :p
I am a pain :3
but honestly, it would be pretty weird
since oa6 says it doubles all probabilities
why are people doubting my solution : (
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, (4+ G.GAME.probabilities.normal), card.ability.extra.odds } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if not context.other_card:is_face() then
mult_mod = card.ability.extra.mult
if pseudorandom('vinyl') < card.ability.extra.odds then
return {
message = 'Again!',
repetitions = card.ability.extra.repetitions,
-- The card the repetitions are applying to is context.other_card
card = context.other_card
}
end
end
end
end
}
it aint repeating the cards
The Soultion
Creates a Legendary N'
how do i modify the last value of a table value?
table[#table]
it says again but wont again
you need to use context.repetition
pseudorandom("vinyl") < G.GAME.probabilities.normal/card.ability.extra.odds 💀
What would that do?
It accounts for increased probability when doing the calculation.
you did it right here
Also, is it extra retriggers for non-face cards?
one extra yes
Huh, same braincell.
it is gonna be 1 in 10 but another joker im making is 5 in 6 so two bird, one stone debuggin
Just found another classic Thunk moment:
Either that or there's some lua technic/tip/shenanigan I haven't learned yet.
i dont think so lol
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, (4+ G.GAME.probabilities.normal), card.ability.extra.odds } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if not context.other_card:is_face() then
mult_mod = card.ability.extra.mult
if pseudorandom('vinyl') < card.ability.extra.odds then
if context.cardarea == G.play and context.repetition and not context.repetition_only then
return {
message = 'Again!',
repetitions = card.ability.extra.repetitions,
-- The card the repetitions are applying to is context.other_card
card = context.other_card
}
end
end
end
end
end
}
this isnt working nor is if context.repition then
which card is this
all of them
Not quite.
mmmm yes if false or true
Trading Card, Invisible Joker, DNA, any joker that constantly jiggles when timing is met.
-# or if not a or b idk how this shit works
if context.repetition and context.cardarea == G.play then
if not context.other_card:is_face() then
if pseudorandom('vinyl') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
return {
repetitions = card.ability.extra.repetitions,
}
end
end
end
if context.cardarea == G.play and context.repetition and not context.repetition_only then
i love stealing the style of peoples nicknames
yes, that is what i have
is that under my mult function?
no, replace the entire calculate with that
how does the card:set_sprites function work?
hi quick question, i have a message supposed to appear under my joker (like upgrade things) but it gets instead under the blueprint, and when i had the not context.blueprint the effect just doesn't happen
Thank you, it just isnt doing mult now. Is that a different calc?
if context.repetition and context.cardarea == G.play then
if not context.other_card:is_face() then
if pseudorandom('vinyl') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
return {
repetitions = card.ability.extra.repetitions,
}
end
end
end
if context.individual and context.cardarea == G.play then
if not context.other_card:is_face() then
return {
mult = card.ability.extra.mult
}
end
end
What is your code?
local spe = 0
if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
spe = spe + 1
if spe == 1 then
return{
message = 'EFFECT',
colour = G.C.MONEY,
card = card
}
end
end```
Thank you
Is that your entire code?
no, the entire is:
if context.setting_blind then
card.ability.extra.moneytrack = G.GAME.dollars
card.ability.extra.moneyearned = 0
end
if G.GAME.blind.in_blind and card.ability.extra.moneytrack ~= G.GAME.dollars then
if card.ability.extra.moneytrack < G.GAME.dollars then
card.ability.extra.moneyearned = card.ability.extra.moneyearned + (G.GAME.dollars - card.ability.extra.moneytrack)
card.ability.extra.moneytrack = G.GAME.dollars
end
if card.ability.extra.moneytrack > G.GAME.dollars then
card.ability.extra.moneytrack = G.GAME.dollars
end
local spe = 0
if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
spe = spe + 1
if spe == 1 then
return{
message = 'EFFECT',
colour = G.C.MONEY,
card = card
}
end
end
end
if not context.blueprint then
if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
local eval = function(card) return (card.ability.extra.moneyearned >= card.ability.extra.moneycap) end
juice_card_until(card, eval, true)
end
end
if context.joker_main then
if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
return{
xmult = card.ability.extra.xmult
}
end
end
if context.end_of_round and context.game_over == false and context.main_eval then
card.ability.extra.moneyearned = 0
end```
within the calculate
when i put the return in the if with the jiggle effect, the messages shows on the right spot but
repeats on loop and i dont know to stop it
wether i put it before or after the local eval
whats the card supposed to do
x4 when player has earned 10 dollars at least during the blind
the effect itself functions
it's just the message popping that is wrong for now
when there is a blueprint
without blueprint it works just well
add not context.blueprint to the tracking context
already tried
blueprint should only be copying the actual xmult part
the effect doesnt show at all
how does grabbing card sprite positions work? i tried local posx = card.config.center.sprite_pos.x but it said that sprite_pos was a nil value
tried again just now, effect doesnt show
what about .children.center.sprite_pos
card.children.center.sprite_pos.x?
yeah
wrap everything that isn't the xmult part in a if not context.blueprint
oh and now i just noticed my jiggle adds on itself
so like the first line until the joker main
okay
also you don't need to define the card for messages
it should just default to the og card
also also it's message_card for messages
loc_vars = function(self, info_queue, card)
return { vars = {(4+ G.GAME.probabilities.normal), card.ability.extra.odds } }
end,
calc_dollar_bonus = function(self, card)
if context.setting_blind then
if context.repetition and context.cardarea == G.play then
if pseudorandom('cd') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
local bonus = card.ability.extra.money
if bonus > 0 then return bonus end
end
end
end
end
hopefully a quick one
so message_card = 'effect' ?
there is no context in calc dollar bonus
no messag_card = card
instead of card = card?
ya
ok, also an idea on why the jiggle effect would add into itself?
card = card doesn’t do anything at all
i just saw it somewhere and used it..
calc_dollar_bonus = function(self, card, context)
if context.setting_blind then
if context.repetition and context.cardarea == G.play then
if pseudorandom('cd') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
local bonus = card.ability.extra.money
if bonus > 0 then return bonus end
end
end
end
end
``` changed to this and still got the error
you aren't checking if its already juiced up
there still is no context in bonus
ok now works well
oh like in general?
yes
putting it all into the no context blueprint fixed also the juice
so would it be calculate = function?
you just return how much money you wanna give
yes
easy, thank you
how do you hide a card from collection view
ty
ok the juice actually works well but as soon as i select playign card it accelerates
or plays multiple times on itself
is rly weird
make sure you don't apply the juice up more than once
how do i?
add config that turns true when you juice it up
then check if that is true
then set it to false when you reset the money earned
it's done
im not sure i understand ^^;
how do i flip over a card
:flip() iirc
is it card:flip() or self:flip()
i dont rly understand what it is supposed to do
Basically set a variable that won't allow you to juice it up after you juice it up
yes
will try that thanks
Just make sure you reset the var when the juice up condition is false
Is it possible to check whether a joker has a certain edition
and also make sure it's part of the config and not a local var
if card.edition and card.edition.<key>
hmm okey i'll try that
calculate = function(self, card, context)
if context.setting_blind then
if context.repetition and context.cardarea == G.play then
if pseudorandom('cd') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
ease_dollars(card.ability.extra.dollars)
G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
G.E_MANAGER:add_event(Event({func = (function() G.GAME.dollar_buffer = 0; return true end)}))
return {
message = localize('$')..card.ability.extra.dollars,
dollars = card.ability.extra.dollars,
colour = G.C.MONEY
}
end
end
end
end
not giving money (using oops to guarantee it)
you still need to use calc_dollar_whtv to give the money
calc just let's you set how much
context.setting_blind and context.repetition don't occur at the same time
if you want it to give money like golden joker
also you dont need both ease_dollars and return { dollars =
so would that be a calc in a calc
no
How to draw planet cards?
separate funcs
that is stolen from to do list t bh
how would I make them interact?
what are you trying to accomplish
Doing it like this makes the jiggle not happening (on context.end_of_round i set shake back to 0)
if card.ability.extra.moneyearned >= card.ability.extra.moneycap and shake == 0 then
local eval = function(card) return (card.ability.extra.moneyearned >= card.ability.extra.moneycap) end
juice_card_until(card, eval, true)
shake = 1
end```
ability.extra
it doesnt return dollars
just do one or the other
oh in that case
just if setting_blind then
check probability
return {dollars = 4}
calc_dollars is just for giving money during cashout
oh, gotcha
@cursive sentinel
calculate = function(self, card, context)
if context.setting_blind then
if context.repetition and context.cardarea == G.play then
if pseudorandom('cd') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
return {dollars = 10}
end
end
end
end
``` like this?
its in config and not in loc vars
cus that aint working
remove if context.repetition and context.cardarea == G.play then
you don't need context.rep
you are checking a global variable
it's supposed to be card.ability.extra.shake
not just shake :4
ah so i put it in loc vars?
{extra = {shake = false}}
alright!
also you can have bools in config
thank you. wouldnt possibly know how to fix this?
loc_txt = {
name = 'CD',
text = {
"{C:green}#1# in #2#{} chance earn",
"{C:money}$#3#{} at end of round"
}
},
config = {extra = {odds = 6, money = 10}},
rarity = 1,
--sprite location
atlas = 'Jokers',
pos = {x = 0, y = 0},
cost = 4,
loc_vars = function(self, info_queue, card)
return { vars = {(4+ G.GAME.probabilities.normal), card.ability.extra.odds } }
end,
you aren't returning a third number
you ar only returning prob and odds
lol
so would it be {C:money}$#2#{} at end of round?
didn't know, im rly new with lua,,, thanks for all your help! will try what you said to me rn
how the hell do people do this every day
painfully
no that would be the probability
how do I check if a joker is or is not in my lineup? I made a joker that loses or gains value if I have it in the shop and I don't want it to do that
you need to add smth to the return func in loc vars
context.cardarea = G.jokers
next(SMODS.find_card("j_modprefix_key"))
Wait your desc says you give money at the end of round but you give the money when the blind is set?
oh i just understood what u meant nvm
cus prototyping
we really need to pay teachers more im just now realizing
facts
this is almost worse than customer service lmao
loc_txt = {
name = 'CD',
text = {
"{C:green}#1# in #2#{} chance earn",
"{C:money}$#3#{} at end of round"
}
},
config = {extra = {odds = 6, money = 10}},
rarity = 1,
--sprite location
atlas = 'Jokers',
pos = {x = 0, y = 0},
cost = 4,
loc_vars = function(self, info_queue, card)
return { vars = {(4+ G.GAME.probabilities.normal), card.ability.extra.odds, money = 10 } }
end,
close
Teaching is easier than helping this chat
The effect doesnt play as is
if card.ability.extra.moneyearned >= card.ability.extra.moneycap and card.ability.extra.shake == false then
local eval = function(card) return (card.ability.extra.moneyearned >= card.ability.extra.moneycap) end
juice_card_until(card, eval, true)
card.ability.extra.shake = true
end
if context.end_of_round and context.game_over == false and context.main_eval then
card.ability.extra.moneyearned = 0
if card.ability.extra.shake == true then
card.ability.extra.shake = false
end
end```
At least the kids generally listen
I would like to apologize for every time I've asked for help
what kids are you around?
What am i missing?
I teach 10/11 year olds
gotcha, misclock
me when i missed my clock
I will thank but not apologize for asking questions. 🙂 Got 30 / 34 Jokers implemented by RTFM. That said, I don't think that this behavior is possible. Then again, I didn't know that custom sorting was possible. Thoughts?
Thank you, works now
remove the check for shake and add a print for c.a.e.shake
Uhh... I don't think you are able to make that without making a lot of jokers obsolete
How do I make a seal say different things if it's on a playing card or a joker?
technically anything is possible if you hate yourself enough
how tf are you putting a seal on a joker
I would assume its just the ones that arent affected by cards
look at how cryptid does it for its stickers
they have different text depending on if they are on a joker or pack
ok it is set true, but it is set tru 4 times each time i select a card
I don't know if completely modifying the scoring lifecycle is something that is possible without monkeypatching so much of the codebase.
hi how to get started with modding
I meant to reply to this message
I swear i'm older than that 
oh you could probably do that?
hi, dont
but it would be very incompatible
probably not, also it will mess up with any joker that requires the contexts to be run in order
why ?
pain
Let's pretend for a second that the capability was rephrased to say "Jokers placed before this one are triggered before hand is scored". Let's forget the implications for the gameplay. Is this something that is remotely reasonable to do?
thats okay, you have made a balatro mod ?
yes
that'd be even harder to add
also i was joking about the dont
can you send link ?
What does this even mean?
Checking positions is pretty easy.
first of all see how balatro actually does its scoring
and check how it does cards then jokers
For example, if Green Joker was before this, it would add Green Joker's mult before scoring the hand. So, if you have something like Photograph, it would also XMult that base mult instead of adding the base mult at the end.
if your lucky they are two seperate funcs that you could be swapped around
i doubt they are tho
So you just want the joker main of the left jokers to happen before the playing cards are evaluated?
All of the logic seems to be in calculate_joker. I would have to effectively modify the context dynamically. Sounds like chaos.
Yes
isnt it in evaluate_play
i dont understand why it is set true multiple times upon selecting cards where it is at no point a condition in my code, i dont even refer to selecting cards
I mean it’s not going to be easy to do and it will cause countless bugs for other jokers, but I suppose it’s doable
yeah this effect would have to mess with evaluate play to the point where it becomes incompatible with a bunch of other mods
you arent checking for a context so any context triggers it
because youre not checking for contexts so it gets run in every single one
oh right
also you prob dont have to do the shake
design wise?
ya
cuz loyalty card does so i just thought as a conditional mult joker i could
similar things like card sharp or dusk dont
although acrobat doesnt, so you're maybe right
yea it seems very inconsistant
welp i'll stick with the proc effect, you're right
thank you a lot for your help !
I agree. Just trying to go through the remaining Jokers in the modpack I'm working on (ideas are not mine, but I love most of them) and see what is unfeasible / where to start. Here's the next one I'm stuck on. Not sure how I'd begin. I know how to insert a card once, but I'm not sure how I could do this repeatedly.
you could do this by patching the spawn playing card method
if the source is from the shop
As I think this through, perhaps it'd be better, and it's certainly easier, to rewrite as "Each shop contains a copy of a random card from your deck"
By each shop you mean every time you reroll?
Let's bookmark that for a second. I wanted to revisit something else. I'm assuming it's not too hard to make custom jokers include reference to other types of cards like we have here with "Gold Card"?
Each shop, but perhaps I can look into reroll as well
no thats easy
Do you have an example?
Exactly what I needed. Thank you!
card:set_ability('j_prefix_jokerkey')
idk i just destroy and create a new joker
I'm assuming there's a way to create a custom one without creating a new Joker, edition, etc? This gives an error: info_queue[#info_queue+1] = {name='Test'} - additionally, I'm not sure how I can reference "stickers" (Ex. Eternal)
something to do with localization files
also idk how to ref stickers either
question how do i check if played hand has only one suit without it being a flush?
go through each card and see if its suit matches the first one checked
then just if poker hand ~= flush
yea,
how do i do that?
i got the ~= flush part
the other i've been at it for like 5 hours
so
< 5 cards
but is flush
so like
if the same suit appears on 5 cards or more it's a flush
so you want flush but less than 5 cards
idk
i think you just not next(context.poker_hands['Flush'])
if (function ()
local test = G.play.cards[1].suit--[[i dont remember how to access the suits change that to the correct thing]]
for _,card in ipairs(G.play.cards) do
if card.suit ~= test then return false end
end
return true
end)()
why doesn't this work? I want the joker to trigger on buying something when it is in my joker area, but it also triggers when I buy it, and I don't want it to do that, and I thought the ~= self would fix that
~= card should work
also make sure thats the correct index
I'll check, thanks
i just want an effect that relies on every card being of the same suit but not being a flush
i think it should be context.buying_card and context.card ~= card
idk tho i cant look rn

buying card is jank
i think it activates when buying self
only self
@cyan lagoon
idk
nah it works when buying other stuff too
i was gonna say hook to some button click stuff
that fixed it, thanks
i'll try it
ok apparently i am stupid
where do i put it tho
Very close. I added this to the localization file:
, Custom = { c_food = { name = 'Food Joker', text = { 'Test test test' } } }
Then:
info_queue[#info_queue+1] = { key = 'c_food', set = 'Custom' }
Problem: Title loads, but text doesn't
you'll need to patch the code
™️
or put everything in Other
same if as the not flush check
ok i am not being helpful ill leave this chat as it is
This is in my localization file for my mod. Clearly, part of it's loading
Main thing is that you'll wanna avoid c as a prefix, just in case other mods don't check for a set, but for the prefix, at some point
it doesn't show up
because
localthunk
the code doesn't actually show it
always blame localthunk