#💻・modding-dev
1 messages · Page 315 of 1
Layered... need to add more layers to be drawn then.
so like x=1, y=1 and x=1, y=2 both layered on top of each other combined in-code
then the combined sprite set as card.children.center
but not by setting multiple sprites
-# Not sure about such being a possibility in the way you imply it, then.
-# a little help here please
Maybe you can change the sprite and draw the card each time you change it?
i know there are ways to do it natively in other languages but not sure about lua or if there's something built in to balatro
that is also not what i was asking
yeah thanks
how do i unlock a joker from inside another?
loc_vars = function()
return {
vars = {
G.GAME.hands["JCJ_fullerhouse"].level,
colours = {
G.C.HAND_LEVELS[math.min(7,
G.GAME.hands["JCJ_fullerhouse"].level
)]
}
G.GAME.hands["JCJ_fullerhouse"].l_mult,
G.GAME.hands["JCJ_fullerhouse"].l_chips
}
}
end,
does this work?
how do I change the rank of a playing card
is there a way to manually trigger the "x1.5" message for the jokers for example, because I'm making a joker kinda like glass joker
put colours after everything else in vars
neither worked
...uh
the code ran but it did nothing
asserting them caused crashes and doing it without asserting only works on jokers
i need to do this during a deck's apply function
i wanna change the starting deck
idk much about decks but maybe the problem is the timing, are you doing it inside an event?
G.GAME.hands["..."].level == 1 and G.C.UI.TEXT_DARK
or G.C.HAND_LEVELS[math.min(7, G.GAME.hands["..."].level)]
try this
which line do i replace
in colours
I might need help with a custom joker
JIPPIE
try upgrading hand
yeah
am i supposed to do that/not supposed to do that
youre supposed to do it
yeah its weird
what are you going to call them?
how can i make an enhancement check if it’s getting taken away
man I don't know modding but i think this will have the answers you need
how would i make a joker that prevents cards from being debuffed? should i just iterate through all cards on context.first_hand_drawn and un-debuff them or does that work?
You could go through G.playing_cards and set card.debuff to false on blind select.
you can also return { prevent_debuff = true } in context.debuff_card i think
this doesn't seem to work, i'm assuming the boss blinds set them constantly to make stuff like wild cards enhanced during the round still be debuffed
how would I do that?
well actually i want the card to be debuffable if you remove the joker and that's permanent no? so i don't think that would work
im pretty sure it only prevents debuffs in the moment from blind/other cards effects, it doesnt set it permanently
okay, how would i actually set that then? like where do i return it
where's the code for challenges
if i could just lift the whole deck from the ride the bus challenge that would be convenient
challenges.lua last i checked
if context.debuff_card then
return { prevent_debuff = true }
end
context.debuff_card is the card as well if you need to do any checks
deck = {
cards = {{s='D',r='4',},{s='D',r='5',},{s='D',r='6',},{s='D',r='7',},{s='D',r='8',},{s='D',r='9',},{s='D',r='T',},{s='D',r='J',},{s='D',r='Q',},{s='D',r='K',},{s='D',r='J',},{s='D',r='Q',},{s='D',r='K',},{s='C',r='4',},{s='C',r='5',},{s='C',r='6',},{s='C',r='7',},{s='C',r='8',},{s='C',r='9',},{s='C',r='T',},{s='C',r='J',},{s='C',r='Q',},{s='C',r='K',},{s='C',r='J',},{s='C',r='Q',},{s='C',r='K',},{s='H',r='4',},{s='H',r='5',},{s='H',r='6',},{s='H',r='7',},{s='H',r='8',},{s='H',r='9',},{s='H',r='T',},{s='H',r='J',},{s='H',r='Q',},{s='H',r='K',},{s='H',r='J',},{s='H',r='Q',},{s='H',r='K',},{s='S',r='4',},{s='S',r='5',},{s='S',r='6',},{s='S',r='7',},{s='S',r='8',},{s='S',r='9',},{s='S',r='T',},{s='S',r='J',},{s='S',r='Q',},{s='S',r='K',},{s='S',r='J',},{s='S',r='Q',},{s='S',r='K',}},
type = 'Challenge Deck'
},
yeah this doesn't help
just in calculate for the joker? or where
s is suit: D for diamonds, S spades, C clubs, H hearts,
r is rank, numbers are numbers, T for ten, and JKQA are self explanatory
but yeah it's not in a helpful format lol
i mean i know what the deck is
but i don't think that helps me when making a custom deck
i just want a deck with a lot of face cards man
destroying the cards and recreating them ended up with random deck layouts and changing the ranks hasn't worked
can you paste the code here i want to test it
so then how would i specify if i wanted it to only affect a certain rank or suit? that doesn't seem to even pull the card
ohh gotcha so if context.debuff_card is just checking that there is a debuffed card at all
sry missed that message
this should replace 2s with jacks, 3s with queens and 4s with kings
currently it does nothing
G.E_MANAGER:add_event(Event({
func = function()
for index, value in pairs(G.playing_cards) do
if not value:is_face() and value:get_id() <= 4 then
if value:get_id() == 2 then
SMODS.change_base(value, nil, "11")
elseif value:get_id() == 3 then
SMODS.change_base(value, nil, "12")
elseif value:get_id() == 4 then
SMODS.change_base(value, nil, "13")
end
end
end
return true
end
}))
How do I destroy certain cards scored after the cards are played?
so like
calculate = function(self, card, context)
if context.debuff_card then
if context.debuff_card.is_suit(SMODS.Suits.Hearts) then
return { prevent_debuff = true }
end
end
end
should make it not debuff just hearts yeah?
:is_suit but yeah
right yeah
how can i make cards highlightable in the collection?
yay
tysm that did work <3
...why not assert() over the changing?
Also, "Jack", "Queen", "King" respectively iirc.
it crashes when i do that
Fuck, I never coded in lua before, damn
also you have to use numbers for face card rank changes don't you
yeah just realized this as well
This function returns nil if it fails, with the second argument being a string with an error message. It is recommended to always wrap calls to it in assert so errors don't go unnoticed.
tested it with queen and worked
Welp, I guess I gotta learn something new for once lol
13 is the id "King" is the key basically
function SMODS.change_base(card, suit, rank)
...
local _rank = SMODS.Ranks[rank or card.base.value]
...
end
That automatically converts to the right internal ID.
change the highlight limits in G.your_collection[index] maybe
If I only want to make the ace of hearts count, how can I do that in Lua?
You want to make only the ace of hearts score?
For X3 mult, yeah
you have a joker that makes each ace of hearts give X3 mult?
I have a prototype of it somewhere
Hold on
config = {extra = { xmult = 1, mult_mod = 0.1, debuffed_cards = {} } },
calculate = function(self, card, context)
if context.setting_blind then
for k, v in ipairs(card.ability.extra.debuffed_cards) do
if v ~= nil then
v:set_debuff(true)
end
end
end
line 26: v:set_debuff(true)
what am i doing wrong here?
There we go
ohh
Yeah
if context.joker_main then
for _, scored_card in ipairs(context.scoring_hand) do
if scored_card:get_id() == 14 and scored_card:is_suit("Hearts") then
return {
xmult = 3
}
end
end
end
something like that
Something like that
bump
what do you want to do?
i want to store some cards every round that im debuffing and at the start of the round i want to re-debuff them (since debuffs are reset after each round)
but those cards could potentially get destroyed
how do i access a suit color again
becoming nil in the debuffed_cards table
Screenshotting that because I’m on mobile atm
add a property to them card.prefix_debuff and search for that
remove that property from all cards that have it if you get rid of it
maybe yeah
2 questions:
How do i make a joker have an unlock requirement
How do i check the sticker a joker has
whats this?
idk how that works on reload tho
a value stored inside a card
ah
right but if another joker sets a debuff, i dont want to interact with those cards
i suppose i could create a card property of my own?
and just loop through all playing cards
thats what she was saying yes
oh i thought prefix_debuff is an existing property
nope
some vanilla cards do this
bump
like ceremonial dagger uses card.getting_sliced and vamprie uses card.vampired iirc
ik the answer to the second one
get_joker_win_sticker(center)
waht if i want to check a different joker's sticker
unless you mean perishable/rental/eternal as in stickers
i mean stake stickers
ok well then yeah this
you put the center of the joker whose sticker you wanna check
if you know the key of the joker you can do it like this
G.P_CENTERS.j_splash
but if you don't know the key you can do
G.P_CENTERS["j_splash"]
which is the same as the first one, but you can use a variable to enter that value
it returns as a string in all lowercase
It would be G.P_CENTERS["j_splash"] without a dot next to the bracket.
mb
makes sense
if get_joker_win_sticker(G.P_CENTERS.j_splash) == "gold" then
that said
some mods add other stakes
most notably cryptid adds a fuck ton of stakes above gold
so if you wanna support that you gotta do some extra stuff since if the sticker is above gold it won't trigger this
It would be in that case if get_joker_win_sticker(G.P_CENTERS.j_splash, true) >= 8 then I think.
no doesn't get_joker_win_sticker return a string
what do you mean you can make it return a number
it can return both iirc
so would this be right
check_for_unlock = function(self, args)
return get_joker_win_sticker(G.P_CENTERS.j_JCJ_jr, true) >= 8
end
gg
how can i use a label when i return a message?
What do you mean?
i what to use a localized mensage
You do localize('label') I think.
im changing its ability, but jippie
thx it worked
can i retun a messege anywhere i want?
Is there a way to check if the blind that is being set is the Boss Blind?
context.setting.blind and G.GAME.blind.boss
is it possible to animate the round score when it increases in the same way chips or mult are animated?
okay, so apparently interrupting the loading screen breaks G.E_MANAGER? anyone else experienced this?
right now it just sorta instantly gets set to the number, while chips and mult bounce slightly when increased
can you share the code for that joker? and/or are there other mods that do this type of general score addition?
you might be able to use juice_up
nvm, that seems to be for cards only - sorry, just learning the game's code as well 
mhm
any advice for finding origins of memory leaks?
apparently we got some in cardsauce but i have no idea where id start looking for that
ease_chips maybe?
see for example this source code in Mistigris: https://github.com/astrapboy/Mistigris/blob/837813b3013936e5977ef7e5dbcf15b4f24eb883/src/content/smods/joker/uncommon/briefcase.lua#L39
Contribute to astrapboy/Mistigris development by creating an account on GitHub.
Is there a way to add cards to the deck during a boss blind but remove them after the boss blind is complete
seems to work, but there's a delay
it only does it after the increase, not during
Try: G.hand_text_area.blind_chips:juice_up?
do decks not have calculate function
They do.
okay uhh
do I need to change the parameters like how sleeves use calculate(self,sleeve,context instead of calculate(self,card,context)
i'm assuming that is the issue
is it as simple as self,deck,context
calculate(self, back, context)
ahh isee
this is working, but it is applying on the "score at least", not the round score
round score is a different variable i have it somewhere here
Try: G.HUD:get_UIE_by_ID('chip_UI_count'):juice_up()
G.GAME.chips or G.GAME.blind.chips i think is the value for current score
one of those is current score, the other is required score
i can't remember
i'm guessing blind.chips is required score
ye.
so maybe this with chips instead of blind_chips
that works, thanks!
Try looking at Wax from Redux Arcanum
Question, are these 2 Jokers posible to make?
ferris wheel has been done twice by vouchers
one in rift raft one in betmma vouchers
o so it is?
yeah but be careful
Does the first one means stones count as all ranks to jokers?
they can cause conflicts with each other
It's possible but you would need to take ownership/patch every joker that needs a specific rank.
why are 3oak jokers not triggering? 4oaks are
Where is this?
bladedancer from morefluff also creates temporary cards
2 steel cards every time blind is selected
perfect!
I probably should've seen if it's ever been done before, I need to come up with more original joker ideas
not sharing the source code here to not break rule 3 or 7 with this, but it seems like Game:main_menu is "breaking" the event manager or at least all events that are set to trigger immediately or before 14 seconds
do decks not get all contexts or something
if context.end_of_round and context.main_eval and G.GAME.blind.boss isn't working in the deck calculate
...per chance, are G.deck calculations enabled in the optional features?
SMODS.current_mod.optional_features = function()
return {
cardareas = { deck = true },
}
end
That's why (G.deck and G.discard optionally enabled) is mentioned.
it didn't work
i put that in the top of my mod's main file and it still doesn't work
Try checking if context.context equals the context as a string instead.
like if context.context == "context.end_of_round" this?
No, end_of_round
oh okay
What about replacing context.main_eval with and not context.individual and not context.repetition?
if context.context == "end_of_round" and context.context == "main_eval" and G.GAME.blind.boss did not work
I'm not sure then.
I've never seen context.context so I don't know how that works exactly but that if statement is never going to be true
but if I do just one then it'll trigger 8 times cause end of round stupid shit
you're checking if context.context is two different values at the same time
-# Did you try my suggestion?
Is this Joker posible to make?
NotJustYet does that I think.
oh, so it is?
Probably.
-# you crossed it out so i thought it was a joke
¯_(ツ)_/¯
hii, is this the right place to ask for a little modding help?
can we force trigger a joker?
what i did for this was i used a flag in the joker's config
so first time it updates flag to true/false however youve set up
I've seen some people do It, so It's probably possible in some ways.
and then doesnt trigger again
you can just add and context.main_eval
for jokers
and it won't do that
that doesn't work for decks though, apparently
yeah it's a bettercalc thing
is it by using v.force_trigger assuming v is joker
a what thing
You would need to set it up manually aswell.
ah
how can i add a generated card to deck?
calculate = function(self, card, context)
if context.cardarea == G.play then
return {
message = "Sacrifices a card to create 4 upgraded cards!",
colour = G.C.BLUE,
card = card,
func = function()
G.E_MANAGER:add_event(Event({
func = function()
local hand_cards = {}
for _, v in ipairs(G.play.cards) do
if v.ability.playable then
table.insert(hand_cards, v)
end
end
if #hand_cards > 0 then
local removed_card = pseudorandom_element(hand_cards, pseudoseed('creadora'))
removed_card:start_dissolve()
for i = 1, 4 do
local new_card = create_card('Playing Card', G.P_CARDS, nil, nil, nil, nil, nil,
'creadora')
new_card:set_ability(pseudorandom_element({'m_glass', 'm_steel', 'm_stone'},
pseudoseed('creadora_seal')))
new_card:set_edition(pseudorandom_element({'holo', 'foil', 'polychrome'},
pseudoseed('creadora_edition')), true)
G.hand:emplace(new_card)
new_card:juice_up(0.5, 0.5)
play_sound('tarot2')
play_sound('glass1')
end
end
return true
end
}))
end
}
end
value:set_seal("purple") is this not how you add a purple seal to a card
Its value:set_seal("Purple")
how would i level up a hand if all cards in the played hand are blue seals
for k, v in pairs(context.full_hand) do
if v.seal ~= "Blue" then
return nil
end
end
level_up_hand(card, "handname", nil, 1)
The joker I'm making here will do something different based off the number the pseudorandom, am I doing it right?
You should be using xmult instead of Xmult_mod and a message
so x_mult = card.ability.extra.Xmult?
It would be xmult
i know you can change the default blind requirement with decks, but how would one only change the requirement of boss blinds?
chat is there a better way to list this? because this takes up way too much space
SMODS.Joker{
key = 'BP',
loc_txt = {
name = 'Battle Pass',
text = {
"Gain {X:mult,C:white}X#1#{} Mult for every {C:attention}different{} hand type played",
"When {C:attention}all hand types{} have been played gain {X:mult,C:white}#2#X{} Mult and {C:attention}reset{}",
"{C:inactive}Currently {X:mult,C:white}X#3#{C:inactive} Mult",
"{C:inactive}Unplayed: {C:attention}#4#"
}
},
rarity = 3,
atlas = "Jokers", pos = {x = 3, y = 0},
cost = 10,
unlocked = true,
discovered = false,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = false,
config = {
extra = {
Xmult_add = 0.2,
Xmult_reset = 3,
Xmult = 1,
played_hands = {} -- tracks unique hands
}
},
loc_vars = function(self, info_queue, card)
local extra = card.ability.extra
local played = extra.played_hands or {}
local all_types = {
"High Card",
"Pair",
"Two Pair",
"Three of a Kind",
"Straight",
"Flush",
"Full House",
"Four of a Kind",
"Straight Flush",
"Flush Five",
"Flush House"
}
local unplayed = {}
for _, hand in ipairs(all_types) do
if not played[hand] then
table.insert(unplayed, hand)
end
end
return {
vars = {
extra.Xmult_add,
extra.Xmult_reset,
extra.Xmult,
table.concat(unplayed, ", ")
}
}
end,
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.before and not context.blueprint and context.scoring_name then
local extra = card.ability.extra
extra.played_hands = extra.played_hands or {}
-- Treat Royal Flush as Straight Flush
local scoring_name = context.scoring_name
if scoring_name == "Royal Flush" then
scoring_name = "Straight Flush"
end
-- Define the full set of required hands
local all_types = {
["High Card"] = true,
["Pair"] = true,
["Two Pair"] = true,
["Three of a Kind"] = true,
["Straight"] = true,
["Flush"] = true,
["Full House"] = true,
["Four of a Kind"] = true,
["Straight Flush"] = true,
["Flush Five"] = true,
["Flush House"] = true
}
-- Track the new hand if it's in the required list
if all_types[scoring_name] and not extra.played_hands[scoring_name] then
extra.played_hands[scoring_name] = true
extra.Xmult = extra.Xmult + extra.Xmult_add
-- Check if all types have been played
local completed = true
for hand in pairs(all_types) do
if not extra.played_hands[hand] then
completed = false
break
end
end
if completed then
extra.Xmult = extra.Xmult + extra.Xmult_reset
extra.played_hands = {} -- Reset progress
return {
message = "Battle Pass Complete!",
colour = G.C.Mult,
card = card
}
end
return {
message = localize('k_upgrade_ex'),
colour = G.C.Mult,
card = card
}
end
end
if context.joker_main then
return {
message = localize{type='variable', key='a_xmult', vars={card.ability.extra.Xmult}},
Xmult_mod = card.ability.extra.Xmult
}
end
end,
}
In an info_queue probably.
was hoping they would tell me how to do that lol
only thing i've used those for are like enhancements and editions
Maybe change G.GAME.blind.chips on blind select?
i have two pieces of code, both trying to have this effect:
"Played cards with Diamond suit give ^1.2 Mult when scored"
they both do the effect but have one of either of these bugs:
-
bg of the ^mult is red, not
dark_edition -
the joker wiggles twice when a diamond is scored
SMODS.Joker {
key = "greedy1",
config = { extra = { e_mult = 1.2 } },
rarity = "cry_exotic",
atlas = 'gbl_jokers',
blueprint_compat = true,
pos = { x = 0, y = 0 },
soul_pos = { x = 1, y = 0, extra = { x = 0, y = 0 } },
cost = 50,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.e_mult } }
end,
calculate = function(self, card, context)
if context.individual then
if context.cardarea == G.play and context.other_card:is_suit('Diamonds') then
return {
e_mult = card.ability.extra.e_mult,
card = card
}
end
end
end
}
SMODS.Joker {
key = "greedy2",
config = { extra = { e_mult = 1.2 } },
rarity = "cry_exotic",
atlas = 'gbl_jokers',
blueprint_compat = true,
pos = { x = 0, y = 0 },
soul_pos = { x = 1, y = 0, extra = { x = 0, y = 0 } },
cost = 50,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.e_mult } }
end,
calculate = function(self, card, context)
if context.individual then
if context.cardarea == G.play and context.other_card:is_suit('Diamonds') then
return {
message = localize({ type = "variable", key = "a_powmult", vars = { card.ability.extra.e_mult } }),
Emult_mod = card.ability.extra.e_mult,
colour = G.C.DARK_EDITION,
}
end
end
end
}
1st one is a talisman problem.
i see; i assume it's not able to be fixed on my end then?
Not that I know of.
fun
anyone know why ghost cards appear in the hand permanently after adding cards during a spectral pack (e.g through grim or cryptid)
thank you chat gpt very cool
how can I add chips when the blind is selected (I'm already checking for if the boss blind is selected)
ease_chips(0.75 * G.GAME.blind.chips + G.GAME.chips)
put whatever you want in the parenthesis
Scored chips or required chips?
if you want to do it while setting a blind then wrap it in an if context.setting_blind
ease_chips(85 + G.GAME.chips)
anyone know what this lil bro is called and why it doesn't move along when i call G.FUNCS.change_tab? is it set_button_pip? because somehow that also doesn't work for me...
Will this work when I run it? Or am I missing something
G.GAME.blind:get_type() == 'Boss' to check for boss
is there a way to make specific jokers appear more often for a back?
G.GAME.blind.boss does work though.
im currently trying to use this to check if a card has the steel enhancement but this is not working what did I do wrong here
oh cool, didnt know that worked
I think it would be
if SMODS.has_enhancement(card, 'm_steel') then
if its being done in a joker then it would be something else instead of card
card would be the joker
It didn't do anything but idk how I would check if something went wrong
is there a way to trigger a joker with DebugPlus
ahhh fair
What do you mean?
it gave me this error (I think it also did that prior)
I want to test my joker but when I selected the boss blind it did nothing
this is the full code for this part
how would one modify the chip numbers present on this screen?
Use G.hand.cards[i] instead of card.
this is what I wrote for something similar,
do you mean the blind requirements?
yeah
what are the contexts for playing a hand and discarding a hand
got this error now
would anyone happen to have consumables knowledge and be able to help me cause mine is giving me a funky error lol
Use G.hand.cards[i]
at which part?
Instead of context.other_card
alr
Your use function should also be use = function (self, card, area, copier)
it worked :D
im just gonna leave it the same cause it worked :P
you could set G.P_BLINDS.bl_small.mult, G.P_BLINDS.bl_big.mult, and so on to something else than the default value - but i don't know if that's recommended
for example i set the small blind's mult to 10 and got this
I think that refers to the multiplication of the blind requirements.
what is wrong here
What is context.hand?
context.before
i see
that's funny, i kinda wanna make a mod that adds context.hand now. when is it called?
...when hand.
actually
@tall wharf
context.hand
probably could do something with it
how do you ensure it can't go below X1
Use math.max(1, value)
yes but you want the max between 1 and the variable
ahhhhhhhhhhhh
for some reason i was thinking it worked like a clamp
i mean, i guess it does
how do i implement that
you can combine min and max to do clamps
i was thinking it worked in the way that i think a clamp works
you can do that? i just make a check that it isnt 0
when you're decreasing the variable that holds that value, you put your calculation in the math.max()
Make it so value = math.max(1, value)
alright thank you
is there a way to change where a card spawns if you don't give it an area
If it's 1 it will return 1.
patch smods.add_card i guess
for what reason
yes, but it needs to decrease if it isn't 1
Why?
read their joker description again. it needs to decrease on discard
gains X1 on hand, decreases on discard
oh actually yeah it just resets
without - 1, it'll just go up
note that x0 won't do anything since calculate functions regard 0 as just not having mult lmao
No, I meant put value = math.max(1, value) after the equation.
true but i'm not working with mult
to have TRUE x0 you have to actually set the mult to 0 manually
X0 does work
i'm working with score
(i have made that mistake many times)
well I've made a joker that can give you stuff when you select a blind, one of those things is vouchers, and right now, it looks like this
ah - that would work, yeah. but there's no reason it can't be part of it
vouchers have different logic for redeeming afaik. you need to do a custom way to handle that
I pretty much copy/pasted the redeem function, everything seems to be working, just can't get the sprite positioned
what's your code?
ok so i definetely did that wrong
@hasty mist pseudo code: if played => joker.score_mult = joker.score_mult + 1; else if discard => joker.score_mult = math.max(1, joker.score_mult - 1)
currently getting this error when I use the consumable as it is supposed to be used
can we see your calculate() code 
myRedeem is a modification of the Redeem function in card.lua
there's no context in use
Use G.hand.cards[i] instead of context.other_card
ah alr
i just dont understand how to implement the math.max thing
idk where to put it
how does one change the hand type of played hand
card.ability.extra.score = math.max(1, card.ability.extra.score-card.ability.extra.score_mod)
hmmm i dont have the games code with me so im not sure how the voucher area is called but you can add area to SMODS.create_card
this works perfectly now, ty!
hm. Is there a list of areas anywhere?
i think the best you can get is looking at the areas defined in Game:start_run
oh its G.vouchers
I have a boss blind that flips over all non-face cards. However, when I press play, the cards get scored face-down. I checked the code for The Mark and it seems exactly the same. Is there something I'm missing here?
stay_flipped = function(self, area, card)
if not card:is_face() then
return true
end
return false
end,
there's not a base one for bosses unfortunately and my attempt at fixing this (i'm hooking basically all of the boss functions) doesn't work for whatever reason
Looks like adding if area == G.hand before worked
No clue where that area actually is lol. I'm playing around with it now. I think you've got me pointed in a direction tho, maybe it's the right one. Thank you
Wait its the card in the deck on the bottom right what the
also, is context.discard for each discard, or each card discarded?
G.play works great. Thanks for getting me in the right direction dude!
Hey odd question
There's a color I wanna use in localization that's in base game, but idk how I'd access it
Since it's in a set
Could I do... C:secondary_set.tarot or something?
eh, why not, i'll post it here
we recently crossed the 100 vanilla joker reskins threshold in the mod i'm working on - and in that same push, now also have reskins for every joker on the first page of collections 

how an i related 😭😭😭😭
are you looping over G.P_BLINDS and that doesn't work?
i managed to figure it out, actually! i had to go with a bit of a different route through lovely patches
i feel like context.hand would be something you'd do or want to do
idk
The random clippy is awesome lmao
on a related note, is there a way to fix blinds having incorrect backgrounds when set by a mod? i'm really not sure why this is happening but it is
i made clippy the base joker primarily because the game over screen uses the base joker graphic and it would be funny to have clippy show up and say stuff to you when you die. but i also made it like that for half joker, so half joker literally just says "looks like" and is cut off 
we have a lot of fun here
LMAO
what does it even do
easy. it's a context that triggers when hand
you could then have a joker or smth that's like "when hand, X" and people will just look at it and go... "wdym 'when hand?' like... when i play a hand? when i have a hand?"
how is that not an aiko vibe
i should really make one off jokers rather than complicated ones since ive only made like 4.5 full jokers after like 1 month
When he locks in:
Put a blueprint next to them
See who wins the staring contest
If only I could grab the actual blinking frames... then I'd make him blink here and there, actually. 😂
can't you just draw with the eyes closed
and then make an animation atlas out of that
why is my deck's apply function not actually... applying? this variable isn't being changed (default false)
ah whatever, i'll just make a new global
Those atlases are bugged with jokers.
I already have a Joker that changes the floating sprite - and that's Rover.
oh, you can't animationatlas jokers. gotta manually do it then with an event
What joker is the problem?
hold on.
yeah that should work
F does.
lemme try with the same caps, because it didn't work all lowercase like all other colors
oh I forgot an and
huh...
You'll want to check https://github.com/Steamodded/smods/wiki/Text-Styling#named-colours-dictionary-gargsloc_colours
The argument to follow {C: needs to be a key in the LOC_COLOURS table
ok so. I have two logic errors. one in G and one in I.
In your case it's just {C:tarot}
purple and tarot are slightly different, tarot is lighter
I can wait.
Okay yeah i think it matches now
Your missing an and
I just said that.
end_of_round doesn't have context.cardarea
that wasn't the logic error.
What do you mean by logic error?
anyone knows how can i check to see if a player has spend money ?
like everytime he spends money something happens
you could hook into ease_dollars maybe
The logic error for G is that gains $3 when you complete any blind but it should be the boss blind.
what does it do?
ease_dollars is the function that gets called whenever your money changes
Check for G.GAME.blind.boss
ohhhh i see
if context.end_of_round and G.GAME.blind and G.GAME.blind.boss then to figure out if its the end of a boss blind
G.GAME.blind always exists I think.
I wanna make a Joker that gives 1.5x mult for every specific joker (example: like 1.5x for every DNA)
I'm not really sure how to do though-
damn it, now it upgrades for each card you hold.
I might see if I could make the specific card randomize each round or run
What is your code?
and it also triggers when you complete it too
you could probably do something similar to my joker fashion show
SMODS.Joker({
key = 'Fashion',
loc_txt = {
name = 'Fashion Show',
text = {
"Jokers with Editions each give {X:mult,C:white}X#1#{} Mult",
"Idea: BoiRowan",
}
},
rarity = 2,
atlas = "Jokers",
pos = {x = 0, y = 25},
cost = 9,
unlocked = true,
discovered = false,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = false,
config = {
extra = {
Xmult = 1.75, -- Multiplier for editions
},
},
loc_vars = function(self, info_queue, card)
return {
vars = {card.ability.extra.Xmult} -- Correctly reference the multiplier
}
end,
calculate = function(self, card, context)
-- Ensure the card has an edition and check if it matches the specified conditions
if context.other_joker and context.other_joker ~= card and context.other_joker.edition and context.other_joker.edition.type then
return {
x_mult = card.ability.extra.Xmult, -- Apply multiplier to the current card
card = card
}
end
return nil -- No multiplier if the card isn't linked with another joker having an edition
end,
})
and instead of checking for editions you would check for a specific joker id
You need and context.main_eval
YOOOOOO
alr i'll try to do that!!
tysm!
ok that fixed G. Now for I's logic error.
anyone knows a good way to implement a joker that gives an upgraded voucher everytime you buy a voucher?
yw
I's logic error is that when you play a straight, all the cards you play triggers I.
this should trigger I once.
That's because your checking on every card, you need to check on context.before
great card skins lol
my card skins?
yeah
reminds me of when i was testing soul animation lol
Hold
Try removing the -mains
Lovely is fine there.
Code?
I fear the samer problem occurs
Ohhhh
anyone knows how i can randomly add a voucher to the run?
Next time you upload the file instead of copying the whole file and pasting it could you just upload the lua file?
ok
You need to remove the context.individual and context.cardarea == G.play checks.
ok did that. it works now.
For some reason, my joker isn't giving me chips
elseif gamba == 2 then
return {
chips_mod = card.ability.extra.chips,
message = '+' .. card.ability.extra.chips,
colour = G.C.CHIPS
}
config = {
extra = {
chips = 40,
mult = 4,
Xmult = 4,
money = 4,
}
},
loc_vars = function(self,info_queue,center)
return { vars = { --#1# is replaced with card.ability.extra.Xmult
center.ability.extra.chips,
center.ability.extra.mult,
center.ability.extra.Xmult,
center.ability.extra.money,
G.GAME and G.GAME.probabilities.normal or 1}
}
end,
Mult, Xmult, and money work just fine
It's chip_mod but you should be using chips instead without the message, because chips does the message automatically
so I don't need "message = " ?
Yes and you should be using chips instead of chip_mod
Yes.
What mods do you have?
From what I can tell, it works :D
literally only talisman (and smods of course)
What versions?
Lovely 0.7.1
smods 1.0.0~BETA-0416b-STEAMODDED
Talisman 2.2.0a
So when you select a card, it hard crashes?
yup, i can do a screen recording if it helps
but i'll try with a new profile, one sec
nope, also happens on a newly created profile
That would help.
Did you verify the game files?
the log only displays this while/after it crashes: SteamInternal_SetMinidumpSteamID: Caching Steam ID: [redacted in case this doxxes me] [API loaded no]
i'll try
i'll try a complete cleanup of the folder where the mods folder is in
nope, nothing helps
the complete log in case it helps
i have to add here: i already found out the talisman commit 0d60d48447d34b4599896d62b74e90e760377bfa (merge commit) broke things, going back further "fixes" this issue for me
I checked and there was no crash.
can anyone see why this will not return to the local variable last_spectral
function set_last_spectral(card)
if card.config.center_key and card.ability.consumeable then
if card.config.center.set == 'Spectral' then
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
last_spectral = card.config.center_key
return true
end
}))
return true
end
}))
end
end
G:save_settings()
--funct end
end```
When are you calling this?
crazy...are you on macos or windows?
Windows 🥲 .
this is called outside the main block of code, its independent, its not in any SMODS function, but it is in an independent .lua calling from the main .lua
hard to describe
So your calling it when your mod loads?
yep its a hook in the consumable its working with
because it is inside an event
when eval it pulls up
which option do you have selected? bignumber or omeganum?
it is inside an event.
let me take out the events and try it
Changed it to omeganum and it still worked.
also last spectral is not a local
yeah i'm on bignumber
with the crash
I was on bignum before and it worked.
i defined it as a local
local last_spectral = nil
anyone knows a way to give a random voucer everytime a voucher is bought?
hm, okay, so omeganum doesn't crash for me at least - i guess i'll stay on that for now...do you know of any consequences from that? do most mods only support one or the other or something?
removing the events has not helped, the function set_last_spectral is being called but it is not returning last_spectral
Nevermind it seems like a skip animations problem I turned it off while on bignum and it crashed.
this is based on how last_tarot_planet functions in set_consumable_usage and it will work if i do that but i can't as it will break the normal fool card, i could do a simple fix of take_control and add it as a personal patch but i would rather do so as a last resort
i find it interesting how this diff can cause such a crash:
https://github.com/SpectralPack/Talisman/commit/0d60d48447d34b4599896d62b74e90e760377bfa?w=0
anyone knows a way to give a random voucer everytime a voucher is bought?
not specifically, but this might help:
the mod "More Fluff" has these two jokers:
- "Coupon Catalogue" that gives +15 mult for each voucher purchased during the run
- "Junk Mail" that adds vouchers to the shop
Do you want to put a voucher in the shop or redeem a voucher?
redeem it
Try looking at Cryptid's Trade
is that a deck or a joker?
It's a spectral.
oh
will look into it!
does someone know how would i update the xmult of a joker everytime a card is destroyed
Try looking at Caino
@crisp coral I love your lob corp mod but I wanted to ask you a quick question cause I'm playing a run with lob corp as the only content mod and it crashes my game every time I go into the shop on my current run (and it's very early so I know it's not just a gazillion jokers killing the game)
Putting this in dev chat cause it is a crash log
The question being, which abno would do this
damn i need to fix ff
I've got fairy festival and pbird, opening the shop crashed my game
I had a run with mosb and I grabbed plague doctor
mosb ate all the cards as plague doctor blessed them
is it intentional for destroying blessed cards before the whitenight fight to not count towards lowering his req as they haven't become apostles yet?
Cause plague doctor turning into whitenight when I only had 1 blessed card in my deck really screwed me
I tried selling all my jokers and it still crashed so is just having FF gonna cause these crashes
please stop pinging me
forgot I had reply ping on, my bad
myst how do i do my IELTS test
IELTS
download this version https://github.com/Mysthaps/LobotomyCorp/archive/refs/heads/main.zip
myst mysting everymyst
current doing a very bad idea but I'll relaunch rq with the new version
Do I delete the old version and rename this one to the name of the old? Got the older version off of the mod manager
Hello Bepis how are you
hi victin
im fine, waiting to do the speaking section of my ielts test
-# and since im an introvert, this will absolutely go SO wrong
Good luck
good luck
:3 thanks guys
i used to do IELTS
i hope i get at least 8, since thats my aim rn
oo, how much did u get
I did an official English language test once which has already expired
icic
I’m lucky I haven’t needed one
that was like 4 years ago tho
I think I did TOEIC
im guessing i got 9 on both reading and listening, they are really easy
but not sure about writing and speaking :3
are you doing the academic one
mhm
oh, i haven't done research on toeic tests yet
are they hard
i got 8.5 in reading
I only had reading and listening I think
And I aced it
So that’s about what I can say about it
I'm trying to use take_ownership on a joker from another mod and I can't figure it out, I'm trying to change the art
This sticker was applied normally but neither of these print functions ran when testing (nor did they give +mult), where/what did I do wrong?
the reading questions got 5 answers, and most of them are really ambiguous
Yeah
like - what does the author mean by saying this?
😭
im not them, why tf u asking me dawg
I tend to have that opinion over tests in general
nice :3
And instructions for how to get a visa
I think I remember the listening questions being tough since they only play the audio twice, so you need to really focus
And I think they played it all at once, then all at once again?
my English final exam with audio that plays once:
yeah, im familiar with that
Luckily I have barely needed to certificate that I can speak English
same goes for my national test too
The Brazilian national exam didn’t have listening questions
But it also only has like
its your average TED video audio thats like, x1.5 the speed + purposely bad quality
5 foreign language questions
Is this on a joker?
tf, hows that related to Brazilian 🥀
Hm?
First pic on sticker, second pic on joker.
isnt it supposed to be all in brazilian?
since english national contest over here all has english questions at least
i cant imagine having to learn another language for freakin english national test
Portuguese; and the language part of the exam is mostly Portuguese, with 5 foreign language questions, that can be in English or Spanish
damn.
It’s like 9 hours of exam over two days
Actually it’s 10h30 hours total
this was so annoying to make fml
Did you use the Boss Blind contexts?
Blind.get_loc_debuff_text right'
No
d ang
Stuff like context.debuff_hand
@native zinc SMODS added many Blind functions as contexts
ewwww
Why
feels very tacky lmao
yes
Also uhhh, if price of silence kills pbird, do I instantly lose?
pbird specifys sold, not destroyed
I wanna use price of silence to kill QoH before she breaches
no
price of silence ate pbird and QoH breached. it's so over
@crisp coral guess what I did.........
fixed
like, just now? or on one of the previous version/version you sent me when FF crashed my game? cause I'm still on the version you sent me
just now
downloading latest
Nevermind I didn't know skin proph could only be used in shop
Is it not G.P_CENTERS['m_gold'].config.weight to get the weight?
G.P_CENTERS['m_gold'].weight, oop.
I don’t believe vanilla editions have a weight
Do you mean Enhancements?
I don’t think they have weights either
Editions have weights but they might be hardcoded
If you want the odds of a card having an Enhancement at all, that might also be hardcoded
As the default weight for SMODS.Enhancement is 5, I'll just add that as the failsafe.
-# Or am I overthinking it for having a pool of specific enhancements being reconstructed as a weighted random table?
What are you trying to do
For a consumable to have a pool of specific enhancements to choose from, but with the weight in mind.
This sounds like it’s a very complicated solution to this problem
SMODS provides an utility function to compute/select the available Enhancements, with weights
how do i disable blue stake as in it doesnt give -1 discard anymore
...or you patch the if self.GAME.stake >= 5 then self.GAME.starting_params.discards = self.GAME.starting_params.discards - 1 end line. 🍞
thanks dude
that's a lot of work
me when srb2 lua (i am in hell)
Or, actually, as SMODS redefines it, take_ownership of it and change the modifiers function of it.
yeah.
Yeah SMODS.poll_enhancement will do this for you
What about changing Blue Stake to:
-1 Hand
+1 Discard
Just need to touch up the actual main table to include the { key = key, weight = weight } structure.
-# And probably do the actual table init after the GameObjects have been initialized.
"Permanently lose -$1 in hand profit every round and other stuff"
harsher than you'd think
solid.
Minecraft copper situation
...yeah, that was an adventure getting set up.
is it possible to check what position a joker is in relative to its duplicates
just asking
Iterate over the Jokers, find the duplicates and store their position, then return the distance calc.
-# Hum... maybe this is a tad much.
this mod looks so cool
guys check out my new speedrun, cryptid crash%, I literally crashed on the large blind of ante 1 on modest with nothing unlocked or any other content mods without the crash card 😭
is there an exhaustive list of every context in smods? (or at least a majority of them)
not just a few examples
The source code.
The wiki has the vast majority of them, I still need to get round to finishing updating it but motivation for writing docs is at an all time low
hard to tell what the source of the crash is, but it's due to talisman. I think it might be JokerDisplay? But I'm not sure
It crashed instantly when I used the code card in cryptid that returns your last played hand to your hand
but it could be joker display
ah, yeah, than it's just a cryptid crash
I'm picking up the run after I wake up cause it's like 5 AM so I should go to bed
I thought it might be JokerDisplay based on the create function, but that's creating cards, not a display object, I'm realizing now
i wrote this message for the modded wiki discord
These should be all the other ones not on the wiki aside from starting_shop AFAIK
- context.ending_booster
{
booster = booster_obj
}
- context.modify_scoring_hand
{
other_card = G.play.cards[i],
full_hand = G.play.cards,
scoring_hand = scoring_hand
}
return {
add_to_hand = true,
remove_from_hand = true
}
Blind calc
-
context.blind_disabled
-
context.blind_defeated
-
context.press_play
-
context.debuff_card
{
ignore_debuff = true
}
- context.debuff_hand
{
full_hand = cards,
scoring_hand = final_scoring_hand,
poker_hands = hand,
scoring_name = handname,
check = check
}
- context.stay_flipped
{
to_area = to_area,
from_area = from_area,
other_card = card
}
- context.modify_hand
{
poker_hands = poker_hands,
scoring_name = text,
scoring_hand = scoring_hand,
full_hand = cards
}
u can do it eremel, but prioritize rest first :3
would a for loop inside a joker calc be able to tell the difference between itself and its duplicates
thats kinda what i need
Can, yeah.
hmm
As card usually refers to the Joker itself that calls the calc, if a given entry of G.jokers.cards == card then you found itself.
wait wait
isnt G.jokers.cards the table containing all jokers you have?
you would need a for loop to go through that
They mentioned the for loop already, so.
oh, true
Bepiisss
Ooo icic
i did pretty well for listening, reading and writing
but the examiner for speaking was an indian
so uh, no offense, but i could barely understand them
i was worried that its duplicates would have the same stats so G.jokers.cards == card goes off for all of them
in like, the same position as the first one
cards, even of the same type, are different from each other
hey guys do u know hwo to make a joker compatible with blueprint?
welp, found it
<3
Jokers are by default compatible, you have to build the incompat in
wait- really? cuz we just found a toggle to check if it's blueprint_compat
cuz it was, by default, incompatible
The flag just controls the ui
Ah i see
Even if you set it to false your calculate function will still be copied
thx for the clarification
wait how do i check if two jokers are dupes, dang i thought i alr figured this out
Check if the <card>.config.center.key match.
To do that would you use context.blueprint or whatever the blueprint context is?
how do i G.GAME.chips/G.GAME.blind.chips >= 10 without it complaining about me comparing a table to a number?
uninstall talisman
10, but there's no harm in doing both just to be sure
ok
in add_to_deck
G.GAME.round_resets.discards = G.GAME.round_resets.discards - 1
ease_discard(-1)
then do the opposite in remove_from_deck
Can someone explain how I could make the joker active it's second function when it checks that there is another joker, example is I want my joker to activate it's second function if it sees specific 4 jokers active
how do i overwrite the Find this Joker from the Soul card unlock text for legendary jokers?
How can I change the cost of an item in the shop?
take ownership
Is it a specific item?
sorry, i should've been more clear, i want to change the cost of every item in the shop or modify it
You could probably use G.GAME.discount_percent for that.
hmm
is it possible to iterate over every item in the shop
What are you trying to do specifically?
i want to have a 1 in 2 chance to double the cost of the item and have it do that for each item
Question about lovely
Is it possible to replace all instances of a string of code (not necessarily a line) with another?
You could probably hook set_cost
Card.set_cost?
Yes.
anyone knows the way to know the most played hand of the round?
You would probably count it manually.
like this?
if context.end_of_round then
local hand_counts = {}
for _, hand in ipairs(G.play.cards) do
local hand_key = hand:get_hand_key()
hand_counts[hand_key] = (hand_counts[hand_key] or 0) + 1
end
local most_played_hand = nil
local max_count = 0
for hand_key, count in ipairs(hand_counts) do
if count > max_count then
most_played_hand = hand_key
max_count = count
end
end
if most_played_hand then
local planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == most_played_hand then
planet = v.key
end
end
local card = {
set = "Planet",
area = G.pack_cards,
skip_materialize = false,
soulable = true,
key = _planet,
key_append = "pl1"
}
end
end
That should work.
well it doesnt
changed to this
calculate = function(self, card, context)
if context.cardarea == G.play then -- replace G.play with G.jokers/G.hand as appropriate
card.ability.extra.hand_counts[scoring_name ] = (card.ability.extra.hand_counts[scoring_name ] or 0) + 1
end
if context.end_of_round then
local hand_counts = {}
for _, hand in ipairs(G.play.cards) do
local hand_key = hand:get_hand_key()
hand_counts[hand_key] = (hand_counts[hand_key] or 0) + 1
end
local most_played_hand = nil
local max_count = 0
for hand_key, count in ipairs(hand_counts) do
if count > max_count then
most_played_hand = hand_key
max_count = count
end
end
if most_played_hand then
local planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == most_played_hand then
planet = v.key
end
end
local card = {
set = "Planet",
area = G.pack_cards,
skip_materialize = false,
soulable = true,
key = _planet,
key_append = "pl1"
}
end
end
it chrashes
SMODS.Joker {
key = 'rebeca',
discovered = true,
unlocked = true,
rarity = 4,
atlas = 'joker_sonas',
config = {
extra = {
hand_counts = {}
}
},
cost = 25,
pos = {
x = 0,
y = 1
},
soul_pos = {
x = 1,
y = 1
},
loc_vars = function(self, info_queue, card)
local extra = (card and card.ability and card.ability.extra) or {
hand_counts = {}
}
return {
vars = {extra.hand_counts}
}
end,
calculate = function(self, card, context)
if context.cardarea == G.play then
card.ability.extra.hand_counts[scoring_name] = (card.ability.extra.hand_counts[scoring_name] or 0) + 1
end
if context.end_of_round then
local hand_counts = {}
for _, hand in ipairs(G.play.cards) do
local hand_key = hand:get_hand_key()
hand_counts[hand_key] = (hand_counts[hand_key] or 0) + 1
end
local most_played_hand = nil
local max_count = 0
for hand_key, count in ipairs(hand_counts) do
if count > max_count then
most_played_hand = hand_key
max_count = count
end
end
if most_played_hand then
local planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == most_played_hand then
planet = v.key
end
end
local card = {
set = "Planet",
area = G.pack_cards,
skip_materialize = false,
soulable = true,
key = _planet,
key_append = "pl1"
}
end
end
end
}
i don't know why
bump
i think you just start dissolve it
This is how The Ox get the most played hand.
card is already the input of the function, you need a different variable name for this
There are currently four kind of context where context.cardarea == G.play is true, all of which evaluate one playing card at a time.
There are currently three kind of context where context.end_of_round is true, two of which evaluate one playing card at a time.
Hey guys, there’s a card concept that I have that I really want to work out the logic for. Essentially it measures triggers per second at the end of a hand and adds that to the mult. Do y’all think it’s possible? (I know there has to be some sort of formula for it since it’s exponential)
Unfortunately, all the eval_play happens before the evaluate animation starts.
I believe the better approach would be counting play_sound('multhit2') per second.
Even so, the number wouldn't be able to affect the hand it measured, it will be more like an upgrade condition.
Talisman skip animation:
Gotcha :(
Perhaps maybe I can calculate the total triggers during the hand and add 0.5+ mult for each of them
At least all the triggers until the said card is triggered and the triggers that happen afterward don’t effect it
That reminds me, how does your Observer works?
it just observes the change in mult and chips
⬆️ This could be helpful for your quest.
is there a context for when a booster pack is bought?
Like this?
there should be, idk what it is but it’s gotta be ingame
because if stuff like hallucination
i think so
There is context.open_booster that Hallucination uses.
ah okay, thanks
should i code in the concepts for all the art ive done or should I make more art
ive got a blind, 2 vouchers, some jokers,
i think i code in everything
to catch up
heres my voucher btw :333
Does anyone know if there’s a return argument which actually just makes you lose?
if not could you theoretically just make hands 0 while the hand plays and then shoot mult and chips in the foot
so its just a doomed hand
True, I’m trying to make it as instant as possible tho
there should be a way tho
To quote the joker “Playing a pair actually just fucking kills you” LMAO
if i have a planet key how whould i generate a planete card with that key
Just going to ask again
yes, use a Regex patch
How do I make one
# Inject one or more lines of code before, after, at, or interwoven into one or more
# Regex capture groups.
# - I recommend you to use a Regex playground like https://regexr.com to build
# your patterns.
# - Regex is NOT EFFICIENT. Please use the pattern patch unless absolutely necessary.
# - This patch has capture group support.
# - This patch does NOT trim whitespace from each line. Take that into account when
# designing your pattern.
#
# USEFUL: For when the pattern patch is not expressive enough to describe how the
# payload should be injected.
[patches.regex]
target = "tag.lua"
pattern = "(?<indent>[\t ]*)if (?<cond>_context.type == 'eval' then)"
position = 'at'
line_prepend = '$indent'
payload = '''
local obj = SMODS.Tags[self.key]
local res
if obj and obj.apply and type(obj.apply) == 'function' then
res = obj.apply(self, _context)
end
if res then
return res
elseif $cond
'''
times = 1
``` is an example
Yeah I'm going to need some more context as to what that pattern is
It's Regex
if context.cardarea == G.play then
for _, hand in ipairs(G.play.cards) do
local hand_key = context.scoring_name
sendInfoMessage(hand_key, "info")
card.ability.extra.hand_counts[hand_key] = (card.ability.extra.hand_counts[hand_key] or 0) + 1
end
end
how can i make this triger after all cards have been scored?
bcs it trigers a bunch anf the contex.afte and before dont work
What’s it supposed to do?
how can i replicate the glitched description in misprint
save the played hand to later calculate what hand yopu playedd the most
that is covered but it miscacaculates bcs of the context
is there a way for an enhancement to check if it's about to be changed
and to deny the changing if it happens
You shouldn’t need to do anything like that to work out the most played hand
and how can i get the most played hand?
look at how vanilla does it for telescope
Like you were shown earlier
in what context is this?
Well it depends entirely on what you’re trying to do
?
The context makes no difference for calculating the most played hand
at the end of the round i generate a negative planet card based on the most played card
Then you want context.end_of_round and context.main_eval
hey whats a quantum enhancement
im looking through contexts and i think i found what i needed but whats a quantum enhancement
this is most played onn round or on all the game?
All time I think
i only need the most played of the round
ok nvm i think G.GAME.current_round.most_played_hand is what i needed thx @wintry solar
ok it says the value is nil
calculate = function(self, card, context)
if context.end_of_round and context.main_eval then
local _handname, _played, _order = 'High card', -1, 100
local hand_counts = {}
for k, v in pairs(G.GAME.hands) do
if v.played > _played or (v.played == _player and _order > v.order) then
_played = v.key
_handname = k
end
end
G.GAME.current_round.most_played_hand = _handname
local most_played_hand = G.GAME.current_round.most_played_hand
sendInfoMessage(most_played_hand, "info")
if G.GAME.current_round.most_played_hand then
local planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == most_played_hand then
local _planet = v.key
end
end
sendInfoMessage(planet, "info")
local planet_card = create_card("Planet", G.pack_cards, nil, nil, true, true, _planet, 'pl1')
planet_card:set_edition('e_negative', true)
planet_card:add_to_deck()
G.consumeables:emplace(planet_card)
card.ability.extra.hand_counts = {}
end
end
end
nvm i fixed it
what's the crash log
😭
:3
i think i’m gonna add 9 more boss blinds
actually i’m gonna add more content until i think it’s done
i’m not gonna limit myself
I'm trying to create a joker that when you reach 50% of the blind's score, it increases the blind size by 20% but decreases it by 10% for every subsequent hand, but for some reason it's triggering at 100% of the blind's score?
modify_blind() is a function I created that just changes a blind's size lol
calculate = function(self, card, context)
if context.after and G.GAME.chips >= math.floor(G.GAME.blind.chips / 2) and card.ability.extra.reached_requirement == false then
modify_blind(card.ability.extra.blind_increase)
card.ability.extra.reached_requirement = true
card_eval_status_text(card, "extra", nil, nil, nil, {message = "Active!"})
end
if context.before and card.ability.extra.reached_requirement then
modify_blind(card.ability.extra.blind_decrease)
card_eval_status_text(card, "extra", nil, nil, nil, {message = "Bleed!"})
end
end```
card.ability.extra.blind_increase and card.ability.extra.blind_decrease are 1.2 and 0.9 respectively
Is there a context for entering a shop? I see one for ending a shop.
There's a context for ending the round, context.end_of_round but you need to do context.end_of_round and not context.game_over and not context.individual and not context.repetition and not context.retrigger_joker to make it only trigger once
and also not trigger if you lose the run
context.end_of_round and not context.game_over and context.main_eval works
yes, starting_shop
Weird it's not on the wiki
it's a new one, hasn't been documented yet
you seem to be knowledgeable, you got any ideas on this?
i dont get what the problem is
the effect is triggering at 100% of the blind's score instead of at 50% of the blind's score
How would I check if a joker was bought and is in the joker slot? Is there a var for it? I know about add_to_deck, but Im looking for a var for an if-statement.
hmm no idea
i keep getting a "unexpected symbol near" message aaaaaaaaaaaaa
if you have the joker then you can check joker.area and joker.area == G.jokers
if you just want to know if you own it then you can use next(SMODS.find_card("j_modprefix_key"))
get a better code editor lol

i'm using notepad++
thanks autocomplete, definitely what i was going for
is there any good tutorial on how to make mods? i want to make a mod but i dont know how.
where do i put stuff that resets every ante
thnks
Try using a reset_game_globals function from SMODS
i tihnk
<@&1133519078540185692>

yeet
skeet
delete
which one of you did ti
vonnegut, I think
I saw the message disappear before I clicked Ban
Those are becoming way more frequent tbh
yeah but a code editor highlights them in the code before running the game
vro is fast
Is there a way to set the sell price of a joker in its calculate or update functions?
