#💻・modding-dev
1 messages · Page 604 of 1
Perhaps an alternate name for the challenge could be Elton John lol
so rocket man
Yes
i think ground control fits isnce theres the obelisk and still a music reference
Fair, but I wanted to be funny
but yeah outside of that
if someone is able to show me how to make sure blue seals don't appear i can revert the ban on card packs and certificate
Thank you, it actually worked, with some finagling of course
why not ecto
So, I have an old Joker that is now causing me issues, its scoring its mult twice even though only prompted once, any pointers on why that could be?
loc_vars = function(self, info_queue, card)
local probabilities_normal, odds = SMODS.get_probability_vars(card, 1, card.ability.odds, "RocketLauncher")
return { vars = { probabilities_normal, odds, card.ability.mult } }
end,
calculate = function(self, card, context)
if context.joker_main then
if SMODS.pseudorandom_probability(card, "RocketLuncher_mult", 1, card.ability.odds, "RocketLauncher_mult") then
return {
mult = card.ability.mult,
extra = {
func = function()
SMODS.calculate_effect({ mult = card.ability.mult }, card)
SMODS.destroy_cards(card, nil, nil)
G.GAME.pool_flags.RocketLauncher_extinct = true
end,
extra = {
message = 'BOOM!',
colour = G.C.RED,
sound = 'DRY_EXPLODE'
}
}
}
else
if not context.blueprint then
return {
message = 'No Ammo!',
}
end
end
end
end
what do you think of this challange idea? if the deck needs to work with straights i can add sixes or aces
remove the SMODS.calculate_effect call from the first extra table, that's where the second mult is coming from
Thank you :)
Hi ive made a joker and all has gone well but im not sure how to show (Currently X__ Mult) like other scaling jokers such as hologram, would love some help thanks 🙂
otter gang
🔥
loc_vars and return the xmult and then make a line in your loc table in the joker file or a separate loc file
{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)
Forgot the X with #1#.
ohh okay, ive been using vanillaremade, just never found that specific section of it thanks!!
was stumped on what to draw and decided "fuck it lets be silly" :3
where are Loyalty Card's loyalty_active and loyalty_inactive functions defined? i can't seem to figure out where they're pulled from in the localisation
asking because i want to make a card that does something every n hands played but i'm not sure what allows other cards like that to do such a thing
@long sun IMPORTANT 🗣️
Check this out
good stuff
oh!. huh. what file is this?
en-us.lua
Yes, it only exists in the game files.
cool, thanks !
i fw it
anywhere to learn more about context.whatever and what possibilities there are?
This could also be a good starting point
There's a Smods file with all possible contexts but I do not recall where that is located
Or what it is called
it's in the lsp_defs but it's hard to read and i would discourage pointing beginners to it since it lists things that are not main contexts at the same level as them
how do i iadd music to a booster?
is there a way to use
SMODS.destroy_cards(SMODS.find_card('j_jam_gaming'))
(have a blind destroy a certain joker) but accounting for eternals (which should not be deleted)
it should account for eternals
cool thx
i'm having a problem where SMODS.add_card seems to not be reading my card ability correctly and always makes rare jokers (rarity 3) instead of the specified rarity
calculate = function(self,card,context)
if context.setting_blind and card.area == G.jokers then
local right_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
if G.jokers.cards[i + 1] ~= nil then -- Ensure right Joker exists
right_joker = G.jokers.cards[i + 1]
end
end
end
if right_joker ~= nil and not right_joker.ability.eternal then -- Get right joker rarity and slice it
right_joker.getting_sliced = true
card.ability.extra.doodle_rarity = right_joker.config.center.rarity
print(card.ability.extra.doodle_rarity)
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
G.E_MANAGER:add_event(Event({
func = function()
G.GAME.joker_buffer = 0
-- See note about SMODS Scaling Manipulation on the wiki
card:juice_up(0.8, 0.8)
right_joker:start_dissolve({ HEX("57ecab") }, nil, 1.6)
return true
end
}))
G.E_MANAGER:add_event(Event({ -- Create new Joker
func = function()
SMODS.add_card {
set = 'Joker',
rarity = card.ability.extra.doodle_rarity,
key_append = 'chak_doodle_joker',
allow_duplicates = false
}
return true
end
}))
return {
message = "Doodled!",
colour = G.C.CHAK_TOKEN
}
end
end
end
basically it's a joker that destroys the joker to the right, and replaces it with a random joker of its rarity
and card.ability.extra.doodle_rarity does get set properly as is confirmed by the print, it's just that SMODS.add_card seems to be reading it incorrectly
add_card's rarity takes a number that represents the roll for the rarity between 0 and 1, so it doesn't use the normal 1, 2, 3 values for rarity
(this is in the wiki)
you want something like { "Common", "Uncommon", "Rare", "Legendary" }[other_rarity]
so i have to translate it into a string if it's a number
yes
gotcha
i was confused because i've used it to specifiy rarity in the past, but i did use strings that time so makes sense
Can blinds display infoqueues aside from the normal description
same as jokers and tarots do
Within context.individual, how do I know what the current card is for, say, card_eval_status_text()?
it's context.other_card
wondering how much hell it would be to program the player replaying a specific blind, like the same blind in that ante, if a requirement isn't met
You could probably just take a peek in G.GAME.defeated_blinds.
if you want to seamlessly retry the current blind idk but if you just want it to immediately play a blind again you can look at how i do extra blinds for hotpot
for the former you can maybe look at multi-phase blinds in blindexpander
"blindexpander"? What's that?
immediately playing again should be fine, the idea is that the shop will be skipped between the blind and its "retry"
yeah that's kinda what i do for the hotpot events but in a different order
it's actually not that much code
loc_vars = function(self, info_queue, card)
local glass_numerator, glass_denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.glass_odds, 'DRY_oddity_break')
local luck_mult_numerator, luck_mult_denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.luck_mult_odds, 'DRY_oddity_luck_mult')
local luck_dollars_numerator, luck_dollars_denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.luck_dollars_odds, 'DRY_oddity_luck_money')
return {
vars = { card.ability.glass_Xmult, glass_numerator, glass_denominator },
vars = { card.ability.bonus, card.ability.mult },
vars = { card.ability.steel_x_mult },
vars = { card.ability.gold_dollars },
vars = { luck_mult_numerator, luck_dollars_numerator, card.ability.extra.mult, luck_mult_denominator, card.ability.extra.dollars, luck_dollars_denominator }
}
end,
calculate = function(self, card, context)
if context.main_scoring and context.cardarea == G.play then
local ret = {}
if SMODS.pseudorandom_probability(card, 'DRY_oddity_luck_mult', 1, card.ability.extra.luck_mult_odds) then
card.lucky_trigger = true
ret.mult = card.ability.extra.luck_mult
end
if SMODS.pseudorandom_probability(card, 'DRY_oddity_luck_money', 1, card.ability.extra.luck_dollars_odds) then
card.lucky_trigger = true
ret.dollars = card.ability.extra.luck_dollars
end
return ret
end
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and
SMODS.pseudorandom_probability(card, 'DRY_oddity_break', 1, card.ability.extra.glass_odds) then
card.glass_trigger = true
return { remove = true }
end
end,
Trying to combine all vanilla card enchantments into 1. Feel I'm missing a lot though...
Know I need to combine all my vars in loc_vars, but feels like I need more
Is there such thing as a quantum seal and if so how do you check if a card has a seal (quantum or not)
No, but yes, if card:get_seal()
this is kinda out there but how would i make a joker cause you to draw your cards from your deck unshuffled, like in the order they appear in your full deck
Thanks
Hook CardArea:shuffle
how to check if a card has a specific seal
if card:get_seal() == 'modprefix_key'
thanks, i got caught up because you can use strings as bools in lua
tried hooking, but i keep getting this crash :/
here's the code
local shuffle_ref = CardArea.shuffle
function CardArea:shuffle(_seed)
local ret = shuffle_ref(_seed)
if G.GAME.modifiers.omicron = true then
table.sort(self.cards, function (a, b) return a:get_nominal('suit') > b:get_nominal('suit') end )
self:set_ranks()
end
return ret
end
the logic behind the hook was that i have to re-sort the table if it's already pre-shuffled when a new pseudoshuffle is called
shuffle_ref(self, _seed)
Also you should only do it if self == G.deck
yeah i was going to considering how i saw immolate also uses it but i just wanted to make sure the hook worked first
speaking of which
Code?
same code just with self, seed
local shuffle_ref = CardArea.shuffle
function CardArea:shuffle(_seed)
local ret = shuffle_ref(self, _seed)
if G.GAME.modifiers.omicron = true then
table.sort(self.cards, function (a, b) return a:get_nominal('suit') > b:get_nominal('suit') end )
self:set_ranks()
end
return ret
end
Yes, it's == not = when comparing.
this is the code
the reason it's calling for main.lua nil val at line 9 is cuz i have a separate hooks file, and line 9 is where it gets loaded
see?
oh fuck.
yo i'm stupid and tired i forgot to add a second = to the if statement 😭
works now thank you
Install the Lua extension.
i have but it doesn't recognise all the custom funcs etc so it just puts errors everywhere
i have a tag that makes you refight a boss, i patched in a tag calculate check right before the code that ends the round and then the tag sets score to 0 and goes 
so if you wanted a complete refight, you would presumably also reset hands and reshuffle the deck
this joker feels too complicated for a common but not strong enough to be anything above that
not sure
would there be somewhere I can find all the code for the vanilla enchantments? Not every calculate function is in the vanilla remake, only what the card would basically do
Yes, because it's in the config
so some things would only need the config then and no calculate?
ah
so like bonus and mult for example, they have no calculate but they still need their numbers calculated. Would a return only be needed?
I guess so cause I have that and it works...weird
No, you put bonus and mult in the config
Code?
if G.playing_cards then
for _, playing_card in ipairs(G.playing_cards) do
if playing_card.get_seal() == "mymod_Orange" then
tally = tally + 1
end
end
end```
No, it's playing_card:get_seal()
😔 thanks
yup, just figured it out. My bad 😅
also, would there be a way to make a playing card enchantment that cannot be debuffed?
when you return an effect table in a mods global calculate function, what card is considered to be the one scoring
G.deck.cards[1]
how do you check for a jokers rarity that was added to the deck
if context.debuff_card and context.debuff_card == card then
return {prevent_debuff = true}
end
card.config.center.rarity
Thank you :)
is there a way tro detect cards that are played but arent scored? i am trying to find it but cant
context.cardarea == 'unscored'
How do you make a joker detect if you’ve bought something and how much the bought item costed?
how do I incorporate that here....
context.buying_card, context.card.cost
context.card.config.center.rarity
one time a card in G.playing_cards wasnt detected, any ideas why, like it being in final scoring hand or something
I have a better idea actually
is there a way to remove the hands/discards UI?
i think this work but the effect i want isnt exactly working, i am trying to detect, unscored lucky cards
Code?
Hook create_UIBox_HUD
is there a wiki I can look at for UI stuff like that?
I might haev found one in the smods wiki hgold on
I believe I would have to anchor the new UI to the hands/discards
and then remove the original UI?
ugh, this one doesnt tell me how to anchor it
whats the table for cards still in deck?
G.deck.cards
aah thanks
what's the variable for the current hands remaining in the round?
G.GAME.current_round.hands_left
thanku
So I have all this code (bottom is the only real important one, supposed to make it so the special cards are not debuffed, yet they are)
calculate = function(self, card, context)
if context.main_scoring and context.cardarea == G.play then
local ret = {}
if SMODS.pseudorandom_probability(card, 'DRY_oddity_luck_mult', 1, card.ability.extra.luck_mult_odds) then
card.lucky_trigger = true
ret.mult = card.ability.extra.luck_mult
end
if SMODS.pseudorandom_probability(card, 'DRY_oddity_luck_money', 1, card.ability.extra.luck_dollars_odds) then
card.lucky_trigger = true
ret.dollars = card.ability.extra.luck_dollars
end
return ret
end
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and
SMODS.pseudorandom_probability(card, 'DRY_oddity', 1, card.ability.extra.glass_odds) then
card.glass_trigger = true
return { remove = true }
end
if context.debuff_card and context.debuff_card == card then
return {prevent_debuff = true}
end
end,
If the cards are made in the boss blind, they're fine. If outside of them, they get debuffed
How do you make it so the game refers to anything in the misc part when making popups?
Like G.P_MISC.g_handfire
how do you stop a blind from appearing in the run?
AWHHHHHH GHOST OMGOMGOMG :D
is it ease_discard or ease_discards?
its ease_discard alright
this isnt working for some reason
G.GAME.banned_keys['bl_modprefix_key'] = true
context.main_scoringbefore doesn't exist.
wait i misspasted something
THIS doesnt work
trying to make it give back a discard on discard
No, it's context.pre_discard
ohhh got it
yeah that works
thank you
does apply NEED to have an add_event inside?
just curious
actually doesnt seem like it+
SMODS.destroy_cards(G.playing_cards)
No, it's Red
huh
seals dont have a prefix
not really
theyre fine code wise
(and also i didnt know card.ability.seal existed but shh)
its crashing my game
Log?
You need to do it in an event.
i got no clue what I did wrong
ohhh
OOPS
I forgot to return true
ok so
its not adding the card to the deck
and its keeping it on the screen
and im tryna figure out why
It's SMODS.add_card
so I suspected
thank you yet again
ive already added you to my mod's credits because you have helped so much lmao
Do custom global variables (like G.deck.my_mod_var) get saved when you quit to main menu and stuff?
No, only ones in G.GAME
Ah okay thanks!
i suppose youd have to savwe them manually
are operations such as square root, cosine, etc. possible?
where can i find them ?
https://www.tutorialspoint.com/lua/lua_math_library.htm i think this has most of them
thanks
How can I add Legendary Jokers to the normal Joker pool?
is there a way to specify a key with context.using_consumeable?
if context.consumeable.config.center.key == 'c_modprefix_key'
No, it's context.consumeable also you need to check for context.using_consumeable
also crashing
No, you need to check context.using_consumeable first.
I don't know why that happens ? I've never worked with blinds yet, maybe some1 else will know.
Hello! I'm trying to make a Poker hand that contains an Ace and two 5s, but the game doesn't seem to recognize it when I select the cards. It does appear in the "run info" ui but nothing else, would anyone be able to give a hand here?
pun intended? 😭
-# also idk mb
also why dont you use VsCode?
I believe I improved the code a little since i completely forgot a section, now it checks for the Ace, and a pair of 5s. However, selecting said cards crashes the game
what's that?
oh thats neat imma get that
or is that Visual Studio light mode?
nah thats notepad++
gng 🥀
use vscodium so you don't get microsoft's telemetry and other junk
Free/Libre Open Source Software Binaries of VSCode
helo
what's with the "other junk"? 🥀
branding
does it have extensions?
it should yea
i don't actually use vscodium because i'm not a big enjoyer of IDEs
but vscodium is literally vscode source code with a different json used for the build process
i dont see an extensions tab ;-;
🤷♂️
then what do you use?
installation process is different but extensions do work
https://github.com/VSCodium/vscodium/blob/master/docs/extensions.md
neovim
o
never heard of it
Well, things look much more pleasing now!
But it's still crashing when trying to select the 3 cards (ace + pair of 5s)
to be more specific, the game crash mentions that Line 28 attempts to index a nil value
if set[1]:get_id() == 14 and _has14 == false then
(line 28 for reference)
How do you update a jokers description while still hovering over it
uh i dont think thats possible
misprint does that
Oh true
oh y'know what
that first for loop gets you individual cards, not subtables
so you should change line 27 to be for i, card in ipairs(hand) do and then change line 28 to just be if card:get_id() == ...
okay it seems simple-ish to do now that I checked how Cryptid did it
what's a subtable?
oh
A table that is in another table.
Makes sense!
Code wise that explains a lot but that sounds like a funny description outside of coding lmao
Nonetheless, it doesn't crash anymore! But it doesn't register either, it still counts as a Pair
This is basically the same problem i've had for the longest time, still puzzles me
try setting above_hand?
above_hand? is that like a subtable or smth? I'm not too well versed in this type of stuff so im not too sure what that means
OH above_hand is the priority of the hand, right
Doesn't seem to change anything. Hand order is dependant on the product of chips and mult anyways, and the chips and mult I gave it are higher than the ones of a pair so it would already have priority over them
I dont think the issue is the priority, rather that it cant detect the cards for the hand type
Did that! It stopped the crashing but it doesnt detect the cards
I read that first as "ass hair"
BAHADVGHJFGHJSG
oh wait
you don't need the other_hands check at all, and that's causing a problem rn
oh i think this is fucking it up
yea
you don't need the other_hands check at all because a flush can still contain a pair, and it'll score above an ass so it'll give you a flush not an ass
oh bother 🤦♂️
and a straight can't contain an ass in the first place
unless you give an above_hands, hand order is auto-determined by the hand's base score at level 1
Well that sounds like a simple fix! Problem is... still the same issue
Cards aren't being detected
I'm super grateful for you people's help though, i don't doubt that this is an improvement and I thank yall so much!
If anything I'll put this here in the meanwhile if anyone wants to give it a go, i gotta do other stuff related to the mod
whats pkr_ass the variable
did you want to return the string
I copied it straight from yahimod's jerma poker hand so i'm not entirely sure what it does, all i saw was that it modified the display text and i thought it was necessary for it to... well, display the text
If thats what it needs to display text then yeah i want it to return, otherwise i dont know what this would be for
how do yall test boosters?
cant you just spawn it with debugplus
You can go to the collection and spawn them in by pressing 3 while hovering over it
i think you can
ik you can press 3, i just forgot that boosters were in there lol
Can someone tell me why this crashes?
Pretty sure the ". . ." needs a coma at the end
oh true
Should be
why does this crash?
SMODS.Atlas{
key = 'boosters',
path = 'boosters.png',
px = 71,
py = 96,
}
SMODS.Booster{
key = 'booster_jarz',
group_key = 'jj_jarz_booster_group',
atlas = 'boosters',
pos = { x = 0, y = 0 },
discovered = true,
loc_txt = {
name = "Jarz Pack",
text = {
"Pick {C:attention}#1#{} card out of",
"{C:attention}#2#{} {C:attention}Jarz{} jokers!"
},
group_name = {''}, -- idk what this is for
},
draw_hand = false,
config = {
extra = 3, -- number of cards offered
choose = 1, -- number player picks
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.choose, card.ability.extra } }
end,
weight = 1,
cost = 5,
kind = "JarzPack",
select_card = 'jokers',
create_card = function(self, card, i)
ease_background_colour(HEX("b48aff"))
return SMODS.create_card({
set = "Jokers",
area = G.pack_cards,
skip_materialize = true,
soulable = true,
filter = function(center)
return center.mod and center.mod.id == "JarzMod"
end
})
end,
in_pool = function(self)
return true
end
}
send the crash log urggghhg
okay first
the set is "Joker"
without the s
2nd
i dont think you return an actual card
create_card = function(self, card, i)
ease_background_colour(HEX("b48aff"))
return { set = "Joker", area = G.pack_cards, skip_materialize = true, soulable = true}
end,
just this?
whats the bool 'soulable' for?
in a localization file, where do i put this key 😭
its something about the soul consumable afaik
so cards with soul_set can appear
depends what it is
consumabletype
Can u tell me what the issue is? My code is: SMODS.Consumable({
set = "Celestial",
key = "the_moon",
pos = {
x = 0,
y = 0
},
loc_txt = {
name = "The Moon",
text = {
"..."
}
},
atlas = "Tarots",
cost = 3,
discovered = true
})
ok lemme look
misc.dictionary.k_trinket
you havent initiated the consumable type
so in dictionary
hm
ye
How can i do that?
wait im stupid i think its another typo
ah cool I didn't know that
set = "Planet"
oh ty
also u need to add the mod prefix
also, b_trinket_cards is important cause that is what appears in collection
it did this?
so it works
technically
um (its in misc)
idk why it says 'ERROR' tho
never forget the prefix
this is how it looks for my consumable set in localization
99% of these issues can be resolved by checking vremade
true
do i do the filter for my mods' cards?
probably
b_trinket_cards is also needed
it is what displays in the collection
i dont think it filtered correctly
oh my god bruh
idk what else to say that is what works for me
Yes, filter doesn't exist.
vro what

by the way you should put ease background color as its own arguement in smods booster
ive been
ed
wdym?

ease_background_colour = function(self)
ease_background_colour{new_colour = your color, special_colour = your color 2}
end,
oh
why would you think it does? 🤔
okay i was wrong you can return a card
🤷♂️
vro
It'd be a good function tho
we're just throwing random functions at the screen and hoping it works? 😭
indeed
well then, how do i make it filter?
like this or?
real
?
why isn't my code working
so you create a card with a background color?
end
function get_your_mod_card(seed)
local cards = {}
for i, v in pairs(G.P_CENTERS) do
if v.set == "Joker" and G.P_CENTERS[v.key].original_mod.id == "your mod id" then
cards[#cards+1] = v
end
end
return pseudorandom_element(cards, pseudoseed(seed))
end
-- and then a shit bunch of code
-- in the booster pack func
create_card = function(self, card, i)
local c = get_your_mod_card("your seed")
if c then
local newCard = SMODS.create_card{
key = c.key,
skip_materialize = true
}
return newCard
end
return {key = "j_joker"}
end,
ok i fixed it
will how yahimod does it work?
SMODS.Booster{
key = 'booster_yahiworld',
group_key = "k_yahimod_booster_group",
atlas = 'boosteratlas',
pos = { x = 0, y = 0 },
discovered = true,
loc_txt= {
name = 'YAHIMOD BOOSTER PACK',
text = { "Pick {C:attention}#1#{} card out",
"{C:attention}#2#{} YAHIMOD jokers!", },
group_name = {"Pick somethin', will ya?"},
},
draw_hand = false,
config = {
extra = 3,
choose = 1,
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.choose, card.ability.extra } }
end,
weight = 1,
cost = 5,
kind = "YahiworldPack",
create_card = function(self, card, i)
ease_background_colour(HEX("ffac00"))
return SMODS.create_card({
set = "Yahimodaddition",
area = G.pack_cards,
skip_materialize = true,
soulable = true,
})
end,
select_card = 'jokers',
in_pool = function() return true end
}
good
remove the underscores too evil
they create a custom set of jokers with every Yahimod joker
o
80% sure this works
its mega jank thoughj
what do i put for the 'seed'arg
came here to ask how to make a custom booster pack with jokers from my mod, and someone is already asking that🙏
anything
my boss blind icon works in every other context except when I'm in the battle itself, any ideas to why it could be?
Code?
should be a ConsumableType
can you add mario ascii art
It's 34 not 32
ah
is it possible to add a floating sprite layer to a tag
what
thx
legendary tag
how is that a shit bunch o' code 🥀 ?
just put the function def anywhere before the booster call
so like:
SMODS.Atlas{
key = 'boosters',
path = 'boosters.png',
px = 71,
py = 96,
}
function getCard(seed)
local cards = {}
for i, v in pairs(G.P_CENTERS) do
if v.set == "Joker" and allowed_sets[v.set] and G.P_CENTERS[v.key].original_mod.id == "JarzMod" then
cards[#cards+1] = v
end
end
return pseudorandom_element(cards, pseudoseed(seed))
end
SMODS.Booster{
key = 'booster_jarz',
group_key = 'jj_jarz_booster_group',
atlas = 'boosters',
pos = { x = 0, y = 0 },
discovered = true,
loc_txt = {
name = "Jarz Pack",
text = {
"Pick {C:attention}#1#{} card out of",
"{C:attention}#2#{} {C:attention}Jarz{} jokers!"
},
group_name = {''}, -- idk what this is for
},
draw_hand = false,
config = {
extra = 3, -- number of cards offered
choose = 1, -- number player picks
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.choose, card.ability.extra } }
end,
weight = 1,
cost = 5,
kind = "JarzPack",
select_card = 'jokers',
create_card = function(self, card, i)
local c = getCard("jarz_mod")
if c then
local newCard = SMODS.create_card{
key = c.key,
skip_materialize = true
}
return newCard
end
return {key = "j_joker"}
end,
in_pool = function(self)
return true
end
}
should work
Yes.
does the icon fill the whole canvas space or is there a 1px gap
it isn't working (im also doing the same thing so i just borrowed the code😭 🙏 )
oh yeah i fucked up
remove allowed sets
function get_your_mod_card(seed)
local cards = {}
for i, v in pairs(G.P_CENTERS) do
if v.set == "Joker" and and G.P_CENTERS[v.key].original_mod and G.P_CENTERS[v.key].original_mod.id == "your mod id" then
cards[#cards+1] = v
end
end
return pseudorandom_element(cards, pseudoseed(seed))
end
isthat
now this is crashing
add an original mod check
read up
how?
Why are you doing G.P_CENTERS[v.key] instead of just v?
i presume consumable loc goes in other = {}, or is it also misc
isnt v just the card
No, v is the center.
@elder rune you're knowledgable
Because it's iterating over G.P_CENTERS
my point is v is a table right
other iirc
oh wait
nope wait
im stupid
wait i figured it out just do this
if v.set == "Joker" and v.mod and v.mod.id == "omegatro" then
anyways both should work so im lazy
whuh
i copied the code elsewhere
if its a consumable from a modded consumable set then its under [name of set]
No, use v.original_mod
so i have to make another category
ye
why? it's working
this gonna work?
for what??
still says "Error"
'
you screenshotted a single line cro
that's the group name in loc_txt
oh thats what that is for
its in the docs guys
original_mod is the mod that added the item, mod is the last mod that took ownership of the item
check the docs
if the consumable set is called that then ye
ah i see
ew
???
just use dowhatiwant()
oh that'll work
cmon as a greek letter myself as well i find it good to check the docs
with all due respect, checking the docs is an integral skill for modding or software development, and refusing to do it just means you aren't going to get the answers you're looking for
ok is it possible to have two object nodes stack on top of each other
not a true greek letter 🥀
-# you dont have the pfp
because no one is interested in repeating what's already been documented in an easy to read centralized place
bro i was joking
😭
😭🙏
i presume its the b
-# or is it the k this time
hard to tell
definitely k, just figure out from these one ig im tryna fix my own thing
ok
indeed
but do i still use mod id? because if so it's not working it's only spawning jimbos
🥀
original_mod.id
?
i want the soul crystal to render over the tag here
also want to make the soul crystal move but unsure how to do that
like?
it worked before
v.original_mod.id
mine is like this if v.set == "Joker" and v.mod and v.original_mod.id == "omegatro" then
be consistent
o
maybe do v.original_mod aswell, instead of 'v.mod'
true
code
local tgui = Tag.generate_UI
function Tag:generate_UI(_size, ...)
if self.key ~= "tag_lem_legendary" then
return tgui(self, _size, ...)
else
_size = _size or 0.8
local tag_sprite_tab = nil
local tag_sprite = Sprite(0,0,_size*1,_size*1,G.ASSET_ATLAS[(not self.hide_ability) and G.P_TAGS[self.key].atlas or "tags"], (self.hide_ability) and G.tag_undiscovered.pos or self.pos)
tag_sprite.T.scale = 1
local soul_sprite
if not self.hide_ability then
soul_sprite = Sprite(0,0,_size*1,_size*1,G.ASSET_ATLAS[G.P_TAGS[self.key].atlas], {x=1, y=0})
soul_sprite.T.scale = 1
print("B")
end
tag_sprite_tab = {n= G.UIT.C, config={align = "cm", ref_table = self, group = self.tally}, nodes={
{n=G.UIT.O, config={w=_size*1,h=_size*1, colour = G.C.BLUE, object = tag_sprite, focus_with_object = true, no_fill = true}},
soul_sprite and {n=G.UIT.O, config={w=_size*1,h=_size*1, colour = G.C.BLUE, object = soul_sprite, focus_with_object = true, hover = true, shadow = true}} or nil,
}}
for _, sprite in ipairs{tag_sprite, soul_sprite} do
sprite:define_draw_steps({
{shader = 'dissolve', shadow_height = 0.05},
{shader = 'dissolve'},
})
sprite.float = true
sprite.states.hover.can = true
sprite.states.drag.can = false
sprite.states.collide.can = true
sprite.config = {tag = self, force_focus = true}
sprite.hover = function(_self)
if not G.CONTROLLER.dragging.target or G.CONTROLLER.using_touch then
if not _self.hovering and _self.states.visible then
_self.hovering = true
if _self == tag_sprite then
_self.hover_tilt = 3
_self:juice_up(0.05, 0.02)
play_sound('paper1', math.random()*0.1 + 0.55, 0.42)
play_sound('tarot2', math.random()*0.1 + 0.55, 0.09)
end
self:get_uibox_table(tag_sprite)
_self.config.h_popup = G.UIDEF.card_h_popup(_self)
_self.config.h_popup_config = (_self.T.x > G.ROOM.T.w*0.4) and
{align = 'cl', offset = {x=-0.1,y=0},parent = _self} or
{align = 'cr', offset = {x=0.1,y=0},parent = _self}
Node.hover(_self)
if _self.children.alert then
_self.children.alert:remove()
_self.children.alert = nil
if self.key and G.P_TAGS[self.key] then G.P_TAGS[self.key].alerted = true end
G:save_progress()
end
end
end
end
sprite.stop_hover = function(_self) _self.hovering = false; Node.stop_hover(_self); _self.hover_tilt = 0 end
sprite:juice_up()
end
self.tag_sprite = tag_sprite
self.soul_sprite = soul_sprite
return tag_sprite_tab, tag_sprite
end
end
btw i still don't get how this works
sob
are you sure its under Candy
under api methods
in the localization
yes
i know brah but it only says this
and what about k_candy?
yeah you run the ease background color function inside the arguement function
but what does "new color", "your color" "special_color" mean?
ease_background_colour is a built in balatro function
okay I checked mine, the consumables are supposed to be under the name of the key of the set
newcolor and special color are the indexes
its just what balatro takes in
ohhhhhhh
your color can be HEX("hex code") or something in G.C
uhhh
candy
and where do i put that snipet of code?
i dont get it 😭
the key to your consumable type
can i do this?
ok so in short; move Candy = {} to below dictionary?
no then youd have to set G.C.maybeBLUE
then thats part of misc
is candy under descriptions
okay yayy it worked thanks yous
brb gotta C O N S U M E
boosters are 71x95 right?
99.99% of cards are 71 95
Yes.
not really a card, but alr
No, all cards are.
i was off by 0.01%
how do i make this where it desn't choose legendaries, or does it already not choose legendaries?
function getCard(seed)
local cards = {}
for i, v in pairs(G.P_CENTERS) do
if v.set == "Joker" and v.original_mod and v.original_mod.id == "JarzMod" then
cards[#cards+1] = v
end
end
return pseudorandom_element(cards, pseudoseed(seed))
end
and v.rarity ~= 4
yes
to create the animation for the boss tags, do I need a specific setup apart from specifying frames?
try changing Candy = {} to candy = {}
well that's done
these boosters dont show up crrectly in collection?
how about not spawning custom rarities?
if type(v.rarity) == 'number'
just v.rarity ~= "omega_simp" worked, but what about making the jokers not repeat?
i openned a pack with 3 of the same joker🙏
also will the boosters atuomatically spawn in-shop?
ye i think so
as in, the art either shows nothing or the wrong art, i did the positioning right, i think.
oh i forgot 2x, im so stupid
py = 96?
^
🙏
95 works fine
yeah but you have py = 96
small question: how can you add a custom joker into a vanilla-made pool?
I mean that I made a food joker but I'm not sure how to insert it in the pool of food jokers.
there is no food pool in vanilla
oh, I thought there was
nope, it's a conceptual set but there's nothing for it code-wise
oh aight then lol
,
again vro🙏 how to make the jokers not repeat themselves?
holy shit aro ace arrow ace
is there a way to download the entire wiki
yes💪
wowie that art is good
-# also idk
thank you fellow greek letter
but omega is the superior greek letter
look at my lazy ah art
sigma is just more sigma
😭🙏, could be worse tho
-# iykyk
here's some of my other joker (don't ask questions)
yes
peak
ig not
also this is one of my favorites
yea i don't think so
oh lets go
my bad my mouse is very big because i am legally blind (also i use a custom mouse skin)
which part of game code is responsible for context.from_area and context.to_area? for patching purposes
what does "legally blind" really mean?
idk
😭
nah it alr
Blind:stay_flipped
is it? i don't see any context calculations (black clover stuff is another unrelated patch)
No, it's in src/overrides.lua in SMODS
Sigma ???
oh
i see now, thanks!
I need help animating the boss blind chip, I added the glimmering and that's working properly, but it also scrolls from one frame to the other like a powerpoint transition (all frames are contained within the same file)
bottom one is the file with the frames
Is there a way to copy a card without it visually appearing?
local copied_card = copy_card(card)
copied_card.states.visible = false
apply = function(self, card, val) card.ability.card_limit = (card.ability.card_limit or 0) + (val and 1 or -1) end
Fire
im asking
Ok so I should be more specific too, because basically what I’m gonna do is
- copy the card
- destroy the card
- put the card in a list (table)
- randomly choose a card in the list
- call context.joker_main on it
Is this possible?
What is the goal?
kirby
You mean it destroys jokers and takes their effects?
It's offset by a little bit. The game looks at each 34*34 frame as having the two separate edges within.
yes
Also, how'd you determine the colors for the gleam effect?
how do i make a joker lose money at the end of the round
I was wondering where mostly cause idk how stickers work in comparison to editions
if context.end_of_round and context.main_eval then return {dollars = -number} end
thank you
I see the use of the phrase old_ability. Does it only copy one ability and replaces it when it eats another joker?
Because that's not what I want
No.
cool beans
well I just added differnt frames
and that works
but it also scrolls
so how do I do it
Move the little circle-things around such that each 34*34 space contains just one of those circles, without being cut off. Use the Fill tool to specify the space if that helps.
does it go in the calculate function?
because it's giving me an error whether or not I put it in the calculate function
Well, I mean make it so it looks like ()()()() instead of )()()()(.
btw it doesn't show coz I uploaded a screenshot but it's scrolling through them smoothly, if that changes anything
how do you change the background colors of balatro
i'll try to fix
for example instead of blue and red i want greend and orange
how would one go about this?
https://discord.com/channels/1116389027176787968/1217704157574860810 managed to do the same with a wine-colored background; perhaps they know. I don't.
You're missing context
ok it wasn't working, so I decided to just my own code
thanks a lot, now it works properly apart from a certain artefact I'll try to fix
also I generally like writing my own code for the sake of learning
since I barely understand lua
why do i wanna replace the balatro menu theme so much 😭
is this done correctly? Also, do I need a second return in this joker_main, or will it work with just the return inside the joker I'm calculating on
No, also you can't put cards in other cards.
can you tell me what the shallow_copy method does and how to use it properly?
It takes a table and puts all the contents of the table in a new table.
ok i wanna go through with this i just cant pass this up
-# how tho
wait, I just noticed this is using a global variable
will that work for multiple types of this card in the same hand?
so apparently jokers can't see debuffed cards when context.to_area and context.from_area happen, but deck backs can do that(???)
i'm trying to implement this jimbo but it doesn't properly trigger on debuffed cards
patching in custom context for drawing debuffed cards doesn't work either for some reason
No, context.hand_drawn
i tried that but it doesn't achieve best results
i.e. it doesn't trigger when cards are drawn after hand size increase
besides, doing it with a context.to_area hook looks more... eye-pleasing, when it works
when hand size increases mid-turn, it adds cards to your hand
it (usually) triggers context.to_area and context.from_area but not context.hand_drawn
wait
what exactly does this code do?
it's not doing what I was expecting
and I think it's doing something cooler
but it's not what I'm looking for
What are you looking for?
It chooses a random common joker when the blind is selected, then it creates a fake card of that joker, then it calculates that joker as if it existed.
- it should consume the joker to the right (like ceremonial dagger)
- then preserve the joker it ate in whatever capacity
- then pick a joker it ate at random and proc it during
context.joker_main
and then the 1 in 2 chance is just a while loop, so I know how to do that part
You mean you want to forcetrigger the fake joker at context.joker_main?
yeah
if it's possible, I would want Kirby to act as the eaten joker (including if it can scale or give end-of-round benefits) but for now, I just want to get the proof of concept working
The code would still work for that, you would just change the calculate_joker part.
ok
oh, neat
side note: how do you multiplicatively change hand size? Trying to use G.hand here crashed my game
G.hand.config.card_limit
If I want to change the pool of jokers Kirby looks at, I would change this rarity_pool variable?
also, are you sure about this?
is it something with SMODS/Balatro that specifically stops cards within cards? Because I've been able to make tables within a joker table, and a card is just a table with some extra logic
No, I think you just need a platform role.
ah ok
Yes.
hell yeah
ok cool
Yes. No, it's tables with metatables that can't be saved.
ahh
Cards have the Card metatable, because they are Cards.
Yes, SMODS.merge_effects
oh, interesting
Can someone explain why I cant run Balatro shaders (editions) via GLSL Canvas?
I keep getting errors
so does shallow_copy also copy metatables?
Yes.
so will this work?
Trying to make it so that I have a deck that replaces all Planet/Tarot cards in the shop with the Fool; am I doing this right?
local ccfs = create_card_for_shop
function create_card_for_shop(area)
local card = ccfs(area)
if G.GAME.selected_back == "b_j8mod_graph" then
if card.ability.set == "Tarot" or card.ability.set == "Planet" then
card:set_ability("c_fool")
end
end
return card
end
(for context, other planets/tarots can show up, I think after rerolling as well. Would I have to hook anything else?)
that's amazing haha
good luck
i made a similar deck that does a similar thing so I think I'll hook create-card instead
Hook CardArea:emplace
No, you need to do more than just doing SMODS.shallow_copy
Also you still can't put cards in other cards.
oh wait, I misunderstood this 😔
is table.copy() going to work?
No, you cannot put a card in another card.
:(
Can i make a joker display a message when it's deleted
Yes, use the remove_from_deck function.
thanks
how do i make this turn the discarded cards into wrapped cards?
(wrapped cards are a custom enhancement)
card:set_ability('m_modprefix_key')
new card I made for a Lazy Joker
I don't know how I could make it look more like he is asleep
its not workin
hold on this channel for modded card art as well? or solely lua shenanigans
its for devs
both i suppose
so its just modding in general
well I do intend on making this for a mod
u can use #⚙・modding-general if unsure
looks cool
intending to make it give you +3 or 4 Mult for every empty played card slot when playing a hand
so basically early game High Card encouragement
would I put it in the joker's code?
i'm unsure on how to use it properly
Yes.
splash anti-synergy
me when Pareidolia and Ride the Bus
SMODS.Joker {
key = 'festive_joker',
loc_txt = {
name = 'Festive Joker',
text = {'{{C:green}#1# in #2#{} chance to turn discarded cards into wrapped cards}'
}
},
rarity = 3,
pos = {
x = 0,
y = 0
},
config = {extra = {odds = 3,}},
loc_vars = function(self, info_queue, card)
local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'festive_joker')
return {vars = {numerator,denominator}}
end,
cost = 5,
discovered = true,
calculate = function (self,card,context)
if context.discard and context.other_card == card then
if SMODS.pseudorandom_probability(card, 'festive_joker', 1, card.ability.extra.odds) then
card:set_ability('m_othe_wrapped')
end
end
end,
atlas = "festive_joker"
}
SMODS.Atlas {
key = "festive_joker",
path = "JokerQ.png",
px = 71,
py = 95
}
this is not turning cards into wrapped cards
So how do you use the SMODS.psuedorandom_probability?
Im trying to roll a number between 1 and 8
SMODS.pseudorandom_probability is only for binary probability rolls
use pseudorandom("seed", 1, 8)
Oh, okay.
Also, how do you debuff a card until something happens, like the end of an ante?
you would have to set a flag on it and then use mod calculate to debuff it and remove the flag after
you can also use SMODS.current_mod.set_debuffs or whatever its called for the debuff
is there a guide on how to use remove_from_deck for different purposes?
its just code that runs when removing the card
idk how there would be tutorials for that
hmm idk i'm having issues
I want the joker to display a message
but I guess that can't happen if the joker is gone
return values arent evaluated for remove_from_deck if thats what youre doing
you have to use attention_text i think, see how vanillaremade wheel of fortune uses it
SMODS.calculate_effect({message = "text"}, card)
Meh, fuck it, I would just rather Thanos snap the card then debuff it lol, because my ass is lazy
where do I implement that
remove_from_deck
Is there something that lists all the colors that you can output through G.C?, like G.C.UPGRADE?
text styling uses different names and doesnt have access to every colour
Looking through the Balatro source code seems to have answered my questions somewhat
also theres G.C.SET and G.C.SECONDARY_SET
which both contain the primary and secondary colours for every set respectively
except that editions dont have a primary colour for some reason
I'm not wanting this enchantment to be debuffed ever, but for some reason if the enchantment isnt made in the boss blind then it gets debuffed anyways. If it is, then its fine though
calculate = function(self, card, context)
if context.debuff_card and context.debuff_card == card then
return {prevent_debuff = true}
end
Doesnt Entropy have a thing that makes sure a card can never get debuffed?
Maybe?? I have no clue what that mod is 😅
This enchantment does more than that, but its the only problem I have rn
So how do you check what cards are bought or sold?
yeah debuffing cards behaves a bit weirdly as it stands
prevent_debuff from calculation isn't strong enough for what you need
That is what I get for being lazy lol
something along the lines of SMODS.debuff_card(card, 'prevent_debuff', 'source') where source is something unique
i think doing that in add_to_deck should work fine, though you'll also want to make sure it doesn't apply after the enhancement is changed
SMODS.debuff_card(card, nil, 'source') in remove_from_deck should do for that
Anything could be filled in for that the 'source' I'm assuming?
anything except nil
doesn't even need to be a string
got it, so could just be a random word and it would work?
(though it would be converted to one)
yeah. best case it's related to your mod name in some way. you just don't want it overlapping with a different mod
and would these need to be the same source?
yeah, that removes specifically the debuff effect set from that exact source
if you wanted to remove all such effects, there's also SMODS.debuff_card(card, 'reset')
tbf this stuff is poorly document and probably needs to be changed at some point
it's not even like one of the two systems is vanilla-imposed, they're both just added by smods
So like this?
if context.add_to_deck then
SMODS.debuff_card(card, 'prevent_debuff', 'DRY_oddity_debuffing')
end
if context.remove_from_deck then
SMODS.debuff_card(card, nil, 'DRY_oddity_debuffing')
end
They are sadly still debuffed
So I know I need a new function now, what would be the best thing to put at the front (like calculate has calculate = function(stuff_here)
ahhhh, okay
still return debuffed
add_to_deck = function(self, card, from_debuff)
SMODS.debuff_card(card, 'prevent_debuff', 'DRY_oddity_debuffing')
end,
remove_from_deck = function(self, card, from_debuff)
SMODS.debuff_card(card, nil, 'DRY_oddity_debuffing')
end,
How do you make a joker check for sold jokers?
is it possible to display variables inside a localization file without it being inserted via loc_vars or similar methods
i have a slight jank custom object type and i cant be bothered to figure out why loc_vars refuse to work rn
my deck isnt appearing in the collection, is there anything i obviously goofed up?
how are you loading the Baller.lua file?
Hello any idea why this is crashing when calling the function? Am I overriding wrong?
local start_run = Game.start_run
function Game:start_run(args)
start_run(args)
G.GAME.mtgg_best_hand = nil
end
holy shit i forgot the entire block that loads the folder
sorry for bugging ty
You forgot to pass self. If you haven't yet, I suggest reading https://forums.kleientertainment.com/forums/topic/129557-tutorial-function-hooking-and-you/
it should be start_run(self, args)
also setting a variable to nil doesnt really do anything fyi
also this could also be done with SMODS.current_mod.reset_game_globals
it doesn't reset it?
its stored in G.GAME
its already tied to the run save
so it wont exist outside the run where you set it
ah that is great actually. Thanks
I feel like I need some if statements or something like that instead of the flat check for debuff but I dont know what I need
@daring fern a while back i asked how realistic it would be for a card to give mult based on the amount of hours someone has on a steam game
i remember you asking me if their steam profile was public and stuff and it is
thats actually such a cool idea, damn
so how do you convert the time they have on a game to local value
haha thank you
im making this as a surprise for my friends
and one friend LOVES silksong
so i wanna represent his love for silksong inthe form of a joker
awww :)
i kinda put it off until now because i thought this would be horrendously difficult
you just gotta think of what you really need for your idea
well i know exactly what i want
its just hard to pull off considering i didnt know a single thing about balatro modding/lua until last month XD
break it up then
well step 1.
get his hours from steamdb
onto a local variable
hiiiiiii Eris
idk if you need steamdb, i know some steam info is directly accessible in the game
also hi
I dont think playtime would be saved in the game though
well yeah its not saved in the game
as in with your save file
but its definitely accessible
Hello is there any way to draw a specific card from the deck?
I created basically a copy of the smods.draw() with a different argument but that seems not amazing
function draw_specific_card(card)
if not (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.SMODS_BOOSTER_OPENED) and
G.hand.config.card_limit <= 0 and #G.hand.cards == 0 then
G.STATE = G.STATES.GAME_OVER; G.STATE_COMPLETE = false
return true
end
local hand_space = 1
local flags = SMODS.calculate_context({drawing_cards = true, amount = hand_space})
hand_space = math.min(#G.deck.cards, flags.cards_to_draw or hand_space)
delay(0.3)
SMODS.drawn_cards = {}
for i=1, hand_space do --draw cards from deckL
if G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK then
draw_card(G.deck,G.hand, i*100/hand_space,'up', true,card)
else
draw_card(G.deck,G.hand, i*100/hand_space,'up', true,card)
end
end
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.4,
func = function()
if #SMODS.drawn_cards > 0 then
SMODS.calculate_context({first_hand_drawn = not G.GAME.current_round.any_hand_drawn and G.GAME.facing_blind,
hand_drawn = G.GAME.facing_blind and SMODS.drawn_cards,
other_drawn = not G.GAME.facing_blind and SMODS.drawn_cards})
SMODS.drawn_cards = {}
if G.GAME.facing_blind then G.GAME.current_round.any_hand_drawn = true end
end
return true
end
}))
end
even from a different game?
if you can access the steam profile then presumably
I can I have him added
I mean from the code
wdym?
Jumpscare
accessing the steam profile from some code instead
card:set_eternal(true)
how would you do that tho?
well idk
okay i thought G.STEAM had info
but thats like
wierd other shit
so idk
not sure
probably some api needs to be used
yeah but I doubt anyone else has done this before
to ask for help
I guess you could check how vanilla does it
does vanilla use steam hours for anything?
dont think so
nope, but its at least a step in the right direction imo
i mean if anything you can always use SMODS.https
true
because im pretty sure theres at LEAST a way to find what steam profile it is
whats that?
hey guys im trying to to draw a specific card from the deck. i created this method but it doesnt really seem ideal.
steamdb 🗣️
function draw_specific_card(card)
if not (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.SMODS_BOOSTER_OPENED) and
G.hand.config.card_limit <= 0 and #G.hand.cards == 0 then
G.STATE = G.STATES.GAME_OVER; G.STATE_COMPLETE = false
return true
end
local hand_space = 1
local flags = SMODS.calculate_context({drawing_cards = true, amount = hand_space})
hand_space = math.min(#G.deck.cards, flags.cards_to_draw or hand_space)
delay(0.3)
SMODS.drawn_cards = {}
for i=1, hand_space do --draw cards from deckL
if G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK then
draw_card(G.deck,G.hand, i*100/hand_space,'up', true,card)
else
draw_card(G.deck,G.hand, i*100/hand_space,'up', true,card)
end
end
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.4,
func = function()
if #SMODS.drawn_cards > 0 then
SMODS.calculate_context({first_hand_drawn = not G.GAME.current_round.any_hand_drawn and G.GAME.facing_blind,
hand_drawn = G.GAME.facing_blind and SMODS.drawn_cards,
other_drawn = not G.GAME.facing_blind and SMODS.drawn_cards})
SMODS.drawn_cards = {}
if G.GAME.facing_blind then G.GAME.current_round.any_hand_drawn = true end
end
return true
end
}))
end````
thanks btw :3
xD
just use draw_card
also do NOT store things in the SMODS table
why not
because that has important stuff
also the number of drawn cards doesnt need to be global
but for drawing a specific card from deck do draw_card(G.deck, G.hand, nil, "up", true, card)
you dont need to do all of that
hello modding dev i need help
hi
key = 'orange_deck',
pos = { x = 0, y = 0 },
config = {
hand_size = -3,
discards = 3,
},
loc_txt = {
name = 'Orange Deck',
text = {
[1] = '{C:attention}-3{} hand size',
[2] = '{C:attention}+1{} hand size per Ante',
[3] = '{C:red}+3{} discards'
},
},
unlocked = true,
discovered = true,
no_collection = false,
atlas = 'CustomDecks',
calculate = function(self, card, context)
if context.end_of_round and context.main_eval and context.beat_boss then
return G.hand:change_size(G.GAME.selected_back.effect.hand_size_value)
end
end,
}```
this *mostly* works but its not adding +1 hand size per ante
this is just a small nitpick (wont the solve the problem) but if context.end_of_round and context.main_eval and context.beat_boss then and just be if context.ante_end then
good point
will edit that rn
most of this was done in jokerforge and its weird when it comes to its code
thats why it obviously doesnt work duhh
lemme try it
oh actually just do G.hand:change_size(1)
since you arent using a config value for it
oke
also remove the return
what does return do?
i always assumed return was like the "then" part to if statements
return a value to whatever called the function
oh so its similar to then except it ends it after it finishes transferring the info? interesting :o
return is more of its own thing
since in lua there is never a point where you arent in a function
Say, would {display_size.h = h*0.7} work as I think it would? (supposed to be for a random card/joker)
yeah, old photograph over there has a 1 in 2 retrigger chance
yeah for some reason context.retrigger_joker_check gets run for decks