#đ»ă»modding-dev
1 messages · Page 314 of 1
Can anyone help me in turning Toml lovely patches into Smods
it's basically balance changes, the issue is that the game.toml and card.toml are not working with Steammods so I thought if there is way to create a steammodded mod that just changes the in game values
yeah that's probably the easiest way
really off edge case anyhow
đ
i swear to god
flush five is better in this case
what poker hand has 5 words in it
These are very pretty aiko
oh none
nah i can't animate fire for SHIT
not even 'The Entire Fucking Deck' has five words
Do you have a version without the shine?
i have shine as a layer
I think the fire looks okay but either way the shine swipe it gets too messy to properly track
fair
bro that looks better than anything i could make
buy me aseprite bro
đ đ
2,661 hours bro
i have most things as layers
got the edge case fixed, thanks for bringing that up! funny I had to also add absolute value since math.floor doesn't work with negatives for whatever reason
you know i always say my mod isn't blinds mod
never
âčïž
xxl deck:
đđđđ
here's the twist
you start with only half the card
104 halves
to be precise
calculate = function(self, card, context)
if context.setting_blind then
G.GAME.blind.chips = G.GAME.blind.chips * 0.9
end
end
doesn't seem to do anything?
There's a blind text update function, if that's what the issue is
i mean, the score doesn't change
yeah the requirement
Buff({
key = "small_head",
atlas = "othercards",
pos = {x = 1, y = 0},
use = function(self, card, area, copier)
G.GAME.blind.chips = math.floor(G.GAME.blind.chips * 0.5)
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
local chips_UI = G.hand_text_area.blind_chips
G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)
G.HUD_blind:recalculate()
chips_UI:juice_up()
play_sound("chips2")
end,
can_use = function(self, card) return G.GAME.blind.chips > 0 end
})
Take a look at the code I sent
that's what i meant
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
'is a multiple of 5' works best, I'd say
whats the function to shuffle a table
yeah that sounds a little better maybe
still unsure about capitalization of money, or if money should be c:attention instead
or if I need the word total
Usually I use the dollar symbol
well there's precedent with ox and wraith so I'm unsure
Eh I think it's fine imo
I think this is good but I know base game is really specific with how it words things
True
There are still discrepancies tho
Like how square joker doesn't have the + in front of how many chips it gives
some mods don't give the attention color to the word Joker
some don't capitalize the word Joker
Itâs inconsistent
I mean, there's still general rule it follows closely
really does not like the word the
"at end of round"
I donât like âat end of roundâ so I word it differently
Although that might be a quirk of English syntax making it sound more natural than âWhen round endsâ
Which is what I use
at round ending 
A goal of mine is to try and blend in with vanilla pretty seemlessly, but like yeah wording is a little dumb sometimes
raised fist description straight up lying
How so?
In Cosmos we had to change a Jokerâs wording from the vanilla template because no one understood it
Even though it was 1-to-1 the same effect in vanilla
it doesn't add it to mult, the card itself gives the mult
with how its worded the joker should give the mult
For reference, it was âfinal poker hand of roundâ
Hello, I'm trying to make a enhanced card that changes sprites each hand played, is there a way to dynamically change the sprite position in the atlas and update the sprite in game ?
which no one understood
Try seeing how Bunco did tape
Or how Aura does animated sprites
Dusk and Acrobat are talking about a different thing :)
âfinal hand of roundâ is different from âfinal poker hand of roundâ
I think the wording means the last poker hand played in a round
As opposed to playing a hand with 0 hands remaining
Where is it used in vanilla?
well that effect isn't something in vanilla so yeah you have privelege to word it better
Oh no I was trying to explain the difference
Incorrect
Burnt joker uses it tho I think, although it's on first discarded poker hand
oh blue seal?
It is used in vanilla
Ding ding
But no one understood it
So we changed it to âwinning poker handâ
Balatro players are very against the idea of reading
No synergy with Mr Bones đ
To be fair most people read Blue Seal once then memorize it
Also
Thunk chose a terrible confusing template for it
wait so vanilla blue seal is different to modded blue seal? because wording is not final hand of round
What do you mean
Ah maybe I missed a âplayedâ in there
But the difference is between âfinal hand of roundâ and âfinal poker hand of roundâ I think
The word played provides an awful lot of clarity to that phrase
Missing it out makes it more ambiguous
is there a chance the wording has been changed since when you were doing your mod
i'm honestly not sure what the difference between these two would be, based on just that wording
I donât think so, I think I just misquoted it
ah, well it happens
Iâd need to review the code to see how we had written it in
Either way I think âwinning poker handâ is clearer
also, I'd argue that the structure in blue seal is made of the units [final played] [poker [hand]] [of round], in which poker isn't actually interacting with 'final played X of round', but just with hand
for planets probably nothing
I agree, but itâs still a cumbersome expression to read
there are probably a few very niche instances where hand and poker hand need to be seperate but they are usually used interchangeably
Iâm not sure they are
I think the usage is deliberate
Even if the difference doesnât come up with only vanilla mechanics
Joker that gives+1 hand but it actually adds a new poker hand
its deliberate but its a stylistic choice it will basically never actually be different
The elusive Straight Pair
Hand generally refers to all the cards played whilst poker hand generally is just the scored cards
It is stylistic in the final product, but not necessarily during development
well good thing the final product is here already
what do you see as the difference, Victin? Because to me the use of poker hand there is just to refer to a named handtype
But maybe that's not consistently how it's used
Poker hand is an attribute that a set of cards can have
A played hand can be or contain a poker hand
flower pot contains "poker hand"
a played hand always contains a poker hand not can, secret hands count as just new poker hands
The scoring hand is the highest tier poker hand contained in the played hand
Well, âa highest tierâ
poker hand is for the most part a subset of hand since all hands are poker hands its just that there are a few instances where you might need to refer to the hand outside of poker hand stuff
unscoring related stuff is a good example where it makes no sense in the context of poker hands
but is perfectly fine with hands
since hands are a balatro thing and poker hands are a poker thing and unscoring means nothing outside of balatro
I do agree the wording is inconsistent which is part of my issue with it
I do prioritize clarity over accuracy though
you should just stick with whatever makes it easiest for players to understand in the case of it being inconsistent
the issue is also that 'hand' refers to so many things in balatro if you don't clarify
you play a hand, which costs you a hand, using cards held in hand, but the played hand and the held hand are not the same hand.
me when mods use the phrase in hand without clarifying
this could mean literally 2 opposite things
I think some amount of consistency is necessary for clarity
i think extreme inconsistency is the best approach
Thereâs a trap many trading card games fall into
if i was thunk's publisher, i'd have forced him to have each word of a joker randomly change language every once in a while
Where they word âforce a player to discardâ as âmust discardâ
you should just do what tboi does and make players consult the wiki by having item descriptions be not what the item actually does at all
But they donât use âmustâ anywhere else
Well, maybe itâs less specific and they just emphasize the forcefulness of it
But it seems to imply other effects arenât forceful
i still have some jokers with straight up wrong descriptions that I'm gonna fix right now before I forget again â€ïž
So you can just tell your opponent ânoâ
"X2 Mult if played hand and [cards held in] hand don't contain any face cards"
how do i improve the wording of that
Good game design /serious
i mean tbf the isaac system isnt that bad outside of the fact that items have secret interactions that are really hard to discover
Iâm not saying I necessarily like it, but I do think itâs âgood designâ
but making you discover and learn everything without just being told is pretty alright for new players
its just that it starts to becoming annoying when youre not new anymore
A little aside but I have the dumb idea for a meme joker that's like "X4 Mult if your language is set to (language). Language changes every round"
you dont really have anything to learn but if you forget a specific interaction its time to consult the wiki
Introduce a âbeholdâ keyword and use that
thats why a lot of people use external item descriptions though
"if there are no face cards on screen" is obviously the best wording
Yeah I think itâs only trying to remember some niche knowledge that the lack of clear description becomes an issue
uhhhhhhhhhhhhhhhhhhhhhh
thats not horrible wording
More games should do this
MTG just did it
LoR had it first
'x4 mult if this joker's language matches your language settings (language changes every run)' is a fun one, I think. Doesn't make you go into settings every round, at least, and doesn't just tell you what language to put the game in right there on the card đ
LoR đ
Taking a moment to mourn how good the translation couldâve been if it was fan-made:
/half-
I've not played the game in a language that wasn't English so I'm not up to date, haha
i just lovely patched jokerdisplay
also why is perkeo's wording kinda weird
nah I think i'd be funny if it's like you're doing meta labor for the sake of the run, lmfao
like why does it use the word possession
I think thunk originally was going to open for it to be fan translated and some people opposed it. I didnât see a good argument from that side, and the existing translations Iâve only seen described as really bad
I havenât seen a single official translation be well-regarded
fan translation has a lot of issues too, but as someone that's currently working in translation, the entire field is kinda fucked
Card games being weird about wording go
Oh definitely
just write the cards in sign language
A good friend of mine recently worked on a game translation (he does not know which one) and he learned that there were 7 middle men companies between him and the developer, meaning all communication about intent was functionally impossible
There was a popular meme translation of Chainsaw Man in Brazil that had some people harassing the official Brazilian VA because the official translation didnât follow the meme translation
I don't know which game it was, but there's a famous example of a shooter using the word for seashells constantly in Spanish, because the translators were never briefed on the genre of the game, and their assigned text never conveyed that the game was a shooter
Recently I took a look at the Portuguese translation of Balatro and it had gross errors like writing stuff like âCurrent Roundâ as âRound Currentâ
Manga/anime translation is a whole 'nother nightmare of a field, haha. Periods of really bad translation have poisoned a lot of the audiences to basically see 'translators' as people poisoning the original intent, not realizing how complex translation of creative works is
I think manga/anime fans also hate localization with a passion at times
I don't know how translation was set up for balatro, but it wouldn't surprise me if the publisher reached out to a translation agency and the agency outsourced to a bunch of different people without setting up a consistency briefing, or language intent document. That's how most bad translations for game/media stuff happen
Personally I prefer sticking to the original when possible, but there are awesome jobs at localization to adapt a work to local culture
Have you watched Surfâs Up?
Whatever the surfing penguin movie was called
translation is a very scummy industry that needs highly specialed skill but pays minimum wage if you're lucky, so translators often don't have space to permit themselves room to double check things.
as a kid, at least
Also expensive (if you want to translate a document)
But thatâs because it needs to be officially authenticated too
Did you watch it in English or what?
localization and translation are different, of course, but you can't translate without necesitating some localization, after all. (social structures are a good example. You straight up can't translate the American school system to Dutch without creating major confusion, and that's the case for most languages)
no clue, hahaha
how do i get the amount of money the player has
and the translators most likely barely get any of the money â€ïž
The Brazilian localization is well-regarded. Recently I watched a video of a VA and translator talking about how they flew people from all over the world to a meeting on how to adapt the movie. The protagonistâs hometown was âShiverpoolâ in English, and they brought it up as an example of a hard pun to localize
G.GAME.dollars, and depending on when you do want to check the buffer as well
They came up with a suggestion on the spot that the other translators in the room loved
So I heard it was used in multiple adaptations
oh my god no way
i was thinking that it was that
but i thought it wasn't since i thought it would be called money and not dollars
The suggestion was âFrio de Janeiroâ (like Rio de Janeiro but replacing ârioâ with âfrioâ, âcoldâ)
What is money buffer even for?
puns are nightmares in translation. I follow the current manga translator for One Piece, and it's super interesting to see him discuss the difficulties and liberties of translating a lot of those concepts. The translation notes on Hunter X Hunter are also fascinating, because Hisoka often has just untranslatable dialogue due to the character's word play that's tied to the art
Knowing the true amount of money before animations change it
money is added in events, but events happen after previous events. That means you need to set a buffer so you can see what happens before the animation is triggered and the money is actually set
Because Balatro doesnât separate the data from the UI much
Wait a minute so I guess I completely misunderstood what like joker buffers and Consumable buffers were
On an entirely different note than translation: I'm trying to see how far I can push boss blind design. I'm wondering whether boss blinds being able to apply 'lasting' effects is an interesting design space, or whether those are gonna be mostly frustrating
Those do the same thing but to the number of those cards in their respective areas
how do i use create_card()?
I want to add more of those Boss Blinds myself
I think they are fun
Search the wiki for SMODS.create_card
Or rather
SMODS.add_card
yes! It'll probably be on the utility page
I'm fixing up the art for my Wicked Witch of the West boss blind, who changes cards into a negative enchantment for X turns, and I'm thinking whether I want there to be other persistent debuffs a boss blind can give you. Only thing I'm thinking is that no debuff should be given to you if you can't avoid it by playing right. So no 'for the rest of the run, planets are x2 as expensive', but yes to 'if you play a hand with less than 1 unscored card, increase the price of all future planets by $1', or something. Though i'm still playing around with the exact details.
Your mod adds negative enhancements, right, Victin?
Planned to
i wish i was better at making UI lol
I'm poking around in that design space, but I'm considering that maybe I should make negative enhancements somewhat of a separate layer. Because a temporary debuff that kills a good enhancement's not fun
I disagree with separating it
Making it the same layer allows Enhancements to clear the downside Enhancement
I can see an argument for keeping them as one entity, I think it's really dependant on what kind of debuffs or punishments you're going for
Keep in mind thereâs another easy solution to your problem
uhhh i dont think i used create_card right
I'm considering something that 'poisons' a card, meaning you lose 1% of your scored chips or something, when it scores, or when it remains in hand, which i think is better as a separate sticker-esque implementation
don't forget to emplace!
Use add_card instead
add_card and specify area
Did you read add_card?
SMODS.add_card({'Spectral', G.consumeables}) or SMODS.add_card('Spectral', G.consumeables)?
Neither
wha
neither
It takes a table of keys with values
so {set="Spectral", area=G.consumeables}?
yeah area not needed
what's the point of create_card đ
i mean it's fine
circling back to this â€ïž don't keep easy solutions from me pls
Just donât select Enhanced cards as a valid target
Like Wheel of Fortune
that's true, just depends on how mean the effect is supposed to be, i guess đ€
hypothetically what if i wanted to completely rework how the probability system works
how would i do that
depends on what you wanna change
so like
instead of it just being a number
i want it to instead be a list of modifiers that lead to the current value
Could you give an example?
so likw
I think I get you, but I'm not sure
instead of just 2 it would be
card a would increase the prob by one, then oops would double that
so you want additive bonuses to the probablity variable to be calculated before the multiplicative ones like oops?
That's already doable, no? But I see what you mean, wanting to have a system that doesn't make you check every source consistently, to properly reset
yea
not with the current system i thought
how do i make a value change immediately based off a config setting change?
Ah no I see. Technically you could, but yeah that's just due to math and not due to the code allowing it, haha. I think the main issue is going to be mod compatibility, for such a rewrite
This should happen automatically already
i don't mean the config variable itself
i mean for example a joker's sprite atlas position
ah yea true
Based on a value change? Either you want to add that to update, or you want to change the atlas pos as the value is set. It depends on how you're approaching it
ok
only issue i have with the current system is that things like oops wouldnt like what i want to do \
prob when it's set but idk how i'd do that
What's the end result you're aiming for?
to toggle some jokers between alternate sprites when a config setting is enabled/disabled
On such thought, you'd probably want to add a function for such in something that executes every frame.
Only issue will be that it won't change when you change the setting mid run
...could you toggles and such actually execute a function when interacted?
-# I know nil about UI.
There's a func for when a node is drawn.
They could
idea
what if i have a variable that will set itself to the config variable whenever it doesn't match
so that i can have things happen when the variable changes
idk
i think i'll just put the stuff in the calculate function instead to save me some effort
what would be th G.P_Centers for double tag?
G.P_TAGS.tag_double
yo how does one change the sprite of a card dynamically????
Try checking Buncoâs tape or Aura
already did
didn't quite help
(imma be honest a friend asked like a few hours ago but we're still stuck on that)
set_sprites(self, card, front)
so it is that
thx for telling us for parametters to input
ur the best, we should have looked harder
thx
wait-
i've been trying to do a similar thing, but with a config setting. my struggle has been trying to figure out where to put it
i'm just gonna ss the thing I sent in steamodded chat because I don't wanna flood the chat with a bunch of messages and I don't feel like typing it again
I believe telescope code is in the booster definitions in game_object.lua
In smods?
OH I SEE IT
Because you've overriden it already, me modifying the original does nothing
So to change that would I just call that take_ownership again in my own mod?
THAT WORKED
THANK YOU
how do i make this properly place the 3 elements vertically?
return {n = G.UIT.ROOT, config = {align = "cm", padding = 0.1, r = .1, emboss = 0.05, no_fill = true}, nodes = {
{n = G.UIT.C, config = { no_fill = true }, nodes = {
{n = G.UIT.T, config = { text = "hi chat", colour = G.C.UI.TEXT_LIGHT, scale = .5 }},
create_toggle({
ref_table = elle_config,
ref_value = "silly_mode",
label = "what."
}),
{n = G.UIT.T, config = { text = "hi again chat", colour = G.C.UI.TEXT_LIGHT, scale = .25 }}
}}
}}```
Surround each element inside the column node in a row node
separately
Silly mode?
changes some sprites and stuff :p
Ah
how do i change the cost of an item in the shop?
like i wanna iterate over all items in the shop and modify its cost
there is a set_cost function, which recalculates an item's cost
is there a function called once when the card is loaded in ?
bump
not in base game, i think, but you could definitely set this up. I know N has individual joker rarity working in his mod
i just broke 100 hours on this wretched game đ
i'm still at 56 hours
I wanna add cryptid, can you instruct me, its my first time modding balatro
Yes i have a pc
#âă»modding-general Would be a better place to ask
does table.unpack() not exist for balatro???
because this crashed saying it tried to call a nil value "unpack"
local startRunVanilla = Game.start_run
function Game:start_run(...)
startRunVanilla(self, table.unpack(arg))
if G.P_BLINDS.bl_af_final_sword then
G.P_BLINDS.bl_af_final_sword.mult = 0
end
end
yep doesn't exist
that is. very annoying
I MADE A PYTHON SCRIPT TO AUTOMATICALLY EXPORT MY SPRITESHEETS AND POPULATE THEM IN THE CORRECT FOLDERS
trying to add weights to planet cards lmao
hand_chips and mult are globals.
CURSE OF MERCURY
how do i center text in ui?
is it possible to add save data? i need to make sure a blind's mult value is stored in the player's save data else the blind's gimmick can be cheesed by restarting the game
this is the code for what i'm doing btw
---=== in overrides.lua ===---
-- Also resets Sapphire Sword mult
local resetBlindsVanilla = reset_blinds
function reset_blinds()
print("reset blinds")
if G.GAME.round_resets.blind_states.Boss == "Defeated" then
if G.P_BLINDS.bl_af_final_sword then
G.P_BLINDS.bl_af_final_sword.mult = 2
end
end
resetBlindsVanilla()
end
-- Updates Sapphire Sword's mult
local blindPressPlay = Blind.press_play
function Blind:press_play(...)
print("Updated hand")
if G.P_BLINDS.bl_af_final_sword and ((not G.GAME.blind.boss) or G.GAME.blind.boss ~= {}) then
G.P_BLINDS.bl_af_final_sword.mult = G.P_BLINDS.bl_af_final_sword.mult + 0.5
end
blindPressPlay(self, ...)
end
---=== final_sword.lua ===---
return {
name = "af_final_sword",
key = "final_sword",
atlas = "chips_atlas",
pos = {x = 0, y = 0},
dollars = 8,
boss = {
min = 8,
max = 10, -- does nothing
showdown = true
},
boss_colour = HEX("CC7722"),
discovered = true,
mult = 2,
defeat = function(self)
self.mult = 2
end,
-- this is just stolen from cryptid
disable = function(self, silent)
G.GAME.blind.chips = get_blind_amount(G.GAME.round_resets.ante) * G.GAME.starting_params.ante_scaling * 2
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
end
}
Does it also fix the Aseprite-induced grey aura?
yeah
why does this crash? it says there's an unexpected symbol on the last line
SMODS.Joker{ -- Orange Card implementation
key = 'Orange Card',
loc_txt = {
name = 'Orange Card',
text = {
'This Joker gains {X:mult,C:white}+X#1#{} Mult',
'when any {C:attention}Booster Pack{} is skipped.',
'{C:red}Works once per shop{}',
'{C:inactive}(Currently {}{X:mult,C:white}+X#2#{} {C:inactive}Mult and #3#){}'
}
},
atlas = 'Jokers',
pos = {x = 1, y = 0},
config = { extra = {
xmult_gain = 0.1,
xmult = 1,
is_active = true,
active_msg = "Active"
}
},
rarity = 1,
blueprint_compat = true,
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.xmult_gain, card.ability.extra.xmult, card.ability.extra.active_msg}}
end,
calculate = function(self,card,context)
if context.skipping_booster and not context.blueprint and card.ability.extra.is_active then -- Booster Pack is skipped, deactivate the Joker and increase the XMult
card.ability.extra.is_active = false
card.ability.extra.active_msg = "Inactive"
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
return {
message = 'Upgrade!',
colour = G.C.ATTENTION
}
elseif context.ending_shop then -- Reactivate the Joker
if not card.ability.extra.is_active then
card.ability.extra.is_active = true
card.ability.extra.active_msg = "Active"
return {
message = 'Reactivated!',
colour = G.C.ATTENTION
}
elseif context.joker_main then
return {
xmult = card.ability.extra.xmult
}
end
end
because the cli lets you set scale
for spritesheets
which the gui, conversely, does not let you do
usually means you forgot to close some statement
seems like you forgot the joker closing bracket
i donât see a gray aura ever though
Itâs only noticeable sometimes
there is a closing bracket i just forgot to copy it
I think if the sprite doesnât have a grey border itâs more apparent
Itâs because Love uses color info of transparent pixels
But Aseprite automatically sets them to black I believe
Firch had a script to fix it
hm
Python script
i just made my script because i was getting tired of manually exporting and moving everything
so iâm just gonna make a script that triggers on git commit
quickly looked at it, you forgot the end for the calculate function
so that way every time i make and commit a change it moves it around
Maybe you can attach Firchâs to it
perhaps
or fork it in somehow
my script isnât very repo agnostic though
itâs built to work with my file setup
and mine only
and i intend to keep it that way
how do you destroy a card đ
but when we made the cards have no suit and no rank, it didn't quite work...
the rank is still visible when using the tarot...
And when you hover it still has a rank etc
I'm wondering how do u properly make them have no rank and suit?
maybe look at vanilla code and see how stone cards work?
And probably replace_base_card = true too
thx, we'll take a look at that
Thank you so much
<3 <3 <3
we spend like 3 hours tryinh to find work arounds X)
that worked but for some reason it doesn't score, do you know why?
i don't
ohhhhh wait
i missed where the end should go
if not card.ability.extra.is_active then
card.ability.extra.is_active = true
card.ability.extra.active_msg = "Active"
return {
message = 'Reactivated!',
colour = G.C.ATTENTION
}
this part was missing it, not the calculate function
my bad
ty that worked
Randomly dropping my latest creation in this channel:
thats kinda op
Technically weaker than Hanging chad but I'll took that as a compliment.
would retriggering a random played card twice be balanced
or should i do thrice so theres incentive to use it over chad
np
It has to be the third card of five, or the meme won't work.
no i mean
i wanna make something
eh
that isnt really that good
unless ur playing high card or something
also found out how to save stuff
so this works now
how would i balance it to make it good?
retrigger 2 random cards twice?
Hi, is there a function that I can use whenever a card is displayed in the full deck ? Because I'm making a dynamically changing sprite and it doesn't update in in there
how do I do cross-mod compat stuff? like if x mod is active then do y
Idk but try checking out how Paperback does it for Bunco
Some mods might have their own API like Card Sleeves. For example, card sleeves has CardSleeves that can be called:
if CardSleeves then
-- Code to run
end
always_scores doesn't seem to work, at all?
Is there something else to activate?
or are we just BAD at the game
Show the code
If you want it from context, then there should be a context with it. Check the wiki
my pc was shut down by my 3ds falling on the power switch
SMODS.Enhancement
{
name = "ice",
key = "ice",
config = {
h_c_mult = 1.25,
extra={
mult = 1.25,
maxRounds = 3,
currentRounds = 0
}
},
no_rank = true,
no_suit = true,
replace_base_card = true,
always_score = true,
pos = {x = 0, y = 0},
loc_vars = function(self, info_queue, card)
local card_ability = card and card.ability or self.config
return {
vars = { card_ability.extra.mult, card_ability.extra.maxRounds, card_ability.extra.currentRounds}
}
end,
update = function(self, card, dt)
local card_ability = card and card.ability or self.config
card.children.center:set_sprite_pos({x = 0, y = card_ability.extra.currentRounds})
end,
calculate = function(self, card, context)
local card_ability = card and card.ability or self.config
if context.final_scoring_step then
return {x_chips = 1.25}
end
if context.main_scoring and context.cardarea == G.play then
return{chips = 50}
end
if context.destroy_card then
juice_card(card)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.5,
func = function()
card_ability.extra.currentRounds = card_ability.extra.currentRounds + 1
card.children.center:set_sprite_pos({x = 0, y = card_ability.extra.currentRounds})
if card_ability.extra.currentRounds == card_ability.extra.maxRounds then
card:shatter()
end
return true end }))
return
end
end,
discovered = true,
atlas = "enhancements"
}
sorry if the code doesn't look great
first time with my friend and I
not a bother nor is it a trivial issue. noticing typos is shockingly hard
<3
yea context.poker_hands has all the poker hands a hand contains
strike: Curse your hand, earn $50
but there's a context just for the name
scoring_hand maybe? scoring_name?
scoring name is correct
bump after one hour
ah
thank
i forgot that was a thing and i kept searching for poker hands
is the scoring name a key
look at how e.g. hanged man does it
I think it's just a name for the vanilla ones
with spaces and all that
How do I get the current score and blind's required score?
well this broke every joker rather than triggering matador
-- Solely responsible for making Sapphire Sword trigger Matador.
local calcJokerVanilla = Card.calculate_joker
function Card:calculate_joker(...)
-- get context arg
local args = {...}
local context = args[1]
if context.cardarea == G.play
and context.after
and self.ability.name == 'Matador'
and G.GAME.round_resets.blind_choices.Boss.name == "Sapphire Sword"
then
ease_dollars(self.ability.extra)
G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + self.ability.extra
G.E_MANAGER:add_event(Event({func = (function() G.GAME.dollar_buffer = 0; return true end)}))
return {
message = localize('$')..self.ability.extra,
dollars = self.ability.extra,
colour = G.C.MONEY
}
end
calcJokerVanilla(self, ...)
end
no joker effect is triggered with very few exceptions
like burnt joker still triggers
you didnt return original function result
if context.cardarea == G.play and context.individual and context.other_card:is_face() and SMODS.in_scoring(context.other_card, context.scoring_hand) then
context.other_card:start_dissolve({G.C.ORANGE}, true)
end
this doesn't individually destroy the cards, it destroys them all at once D: how do i fix this
put it into an Event
i'm getting this error: msg = string: "engine/node.lua:270: attempt to index field 'h_popup_config' (a boolean value)"
and it's coming from this
blind_sprite.config.h_popup_config = {
align = 'cl',
offset = { x = -0.1, y = 0 },
parent = blind_sprite
} -- blind sprite is an AnimatedSprite
what does this mean
@gusty peak like this?
if context.cardarea == G.play and context.individual and context.other_card:is_face() and SMODS.in_scoring(context.other_card, context.scoring_hand) then
G.E_MANAGER:add_event({
trigger='after',
delay=0.1,
func = function()
context.other_card:start_dissolve({G.C.ORANGE}, true)
return true
end,
blocking=true
})
end
i think blocking should do it, try it
why is this not working
do you set it anywhere to be a boolean value accidentally?
try just ease_dollars(-y.mult)
huhhh
its `Event({}) not just {}
still looking, i'm guessing a reassignment is the only way this could be a bool?
oh yeah i forgot đ
im not sure
đ???
wha?
i think returning dollars is better solution for calculations
are the stuff inside the brackets in the example just to fill space or do they mean something
this is from the wiki for contexts
example of the context object for that context
soo the G.jokers and G.play.cards?
does dollars do anything for blinds tho?
or context dot the stuff on the left
api doesnt even say there calculate for blinds
it's new it's still not documented
This
if context.cardarea == G.play and context.individual and context.other_card:is_face() and SMODS.in_scoring(context.other_card, context.scoring_hand) then
print("I should be destroyed")
m = context.other_card
G.E_MANAGER:add_event(Event({
trigger='after',
delay=0.1,
func = function()
m:start_dissolve({G.C.ORANGE}, true)
return true
end,
blocking=true
}))
end
it only destroys 1 card ruefjdhgfbg
oh ic
is m a local variable?
if its not you should put local before it
if i do it won't be recognized in the event func
ok thank you it finally works ahrfbejfhnsb
what are the keys to generate planet cards?
bump
c_<planet_card_name>
Quantum enhancements allow a joker to have the effect of 'three random cards held in hand count as gold cards', or 'steel cards also count as wild cards'. You do this by passing the desired enhancement's key during the specific context that's set up for it, iirc (I'm not sure on the details but I can check in a few minutes).
gotcha, yeah i wanted to implement that but i didnt see a way to apply it in code unless im just stupid
Buuut, I'm not sure what the current state of 'm is. They're finicky because the vanilla Balatro implementation of enhancements basically makes it impossible to check for suit or rank during quantum enhancement checks. I haven't tried to set it up since last month, but it gave me a lot of very hard to trace bugs. I think Cryptid's got a branch set up for their own implementation because of similar reasons
But I'm not sure if that's a valid warning still
i just need any unenhanced card to give a random enhancement
so i dont need to check for suit or ranks
so if i want to creata planet hand basedd on played hand whould this work as a dict?
local hand_type_map = {
['High Card'] = 'c_pluto',
['Pair'] = 'c_mercury',
['Two Pair'] = 'c_uranus',
['Three of a Kind'] = 'c_venus',
['Straight'] = 'c_saturn',
['Flush'] = 'c_jupiter',
['Full House'] = 'c_earth',
['Four of a Kind'] = 'c_mars',
['Straight Flush'] = 'c_neptune',
['Flush House'] = 'c_ceres',
['Five of a Kind'] = 'c_planet_x'
}
check how blue seal does it
well, ye but not for modded hands
I need the chipsAdd and multAdd variables to be updated before the return statement. Currently, they are getting updated, but the return statuement is using the old values (before calculation). How do I fix that?
if context.joker_main and not context.blueprint then
G.E_MANAGER:add_event(Event({
func = function ()
-- Calculate chips
local remainingScore = G.GAME.blind.chips - G.GAME.chips
-- Ensure score is not negative
if remainingScore < 0 then remainingScore = 0 end
card.ability.extra.chipsAdd = card.ability.extra.chipsAdd + remainingScore * (card.ability.extra.chipPerc / 100)
-- Calculate mult
card.ability.extra.multAdd = card.ability.extra.multAdd +
((G.GAME.current_round.hands_played + G.GAME.current_round.discards_used) / card.ability.extra.multDiv)
return true
end
}))
return {
card = card,
chips = card.ability.extra.chipsAdd,
mult = card.ability.extra.multAdd
}
end
and how whould i create card based on the most played hand?
Check how Telescope does it in celestial packs
how/where can i see it?
it's in card.lua of balatro itself
It's in the source code, or your lovely dump, depending on whether you want patched or non-patched code to look at
it sets _planet to the planet card corresponding to your most played hand then creates it with card = create_card("Planet", G.pack_cards, nil, nil, true, true, _planet, 'pl1')
if you want to get it directly you'd have to use emplace_card
is it because enhancement checks are done before suit/rank checks?
for the purposes of a stone card im assuming?
local planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == hand then
planet = v.key
end
end
_card = {set = "Planet", area = G.pack_cards, skip_materialize = true, soulable = true, key = _planet, key_append = "pl1"}
found this in SMODS code
The quantum enhancement is set then, yeah, it creates infinite loops in which ranks and suits are continuously turned off and on, so it's just disabled as an option, iirc
i have an issue of my own i need some help with, trying to make these enchanced cards have a chance to destroy themselves and as you can see from the video the code for the message "Extinguished!" does trigger but not the destroy function
ah i see
cause you didnt detroy card, youre asking if youre in destroying card context, and youre not, cause you didnt destroy it, you should do card:start_dissolve(dissolve_colours, silent, dissolve_time_fac, no_juice)
when chance procked
Just make tag or use info_queue 
During a blind, it's generally a bad idea for anything to call start_dissolve on a playing card
which context would i put this in
There is a destroy context specifically for destroying cards that'll make sure cards are properly destroyed. Using start_dissolve will create ghost entries in G.playing_cards
yeah i'm looking in the game code, specifically Sixth Sense, and it looks like it just calls context.destroying_card
is there a way to detect if the player got $ other than checking every frame? 
trying to make something that activates each time you get $$$
Hook ease_dollars
you can do that đ?
how do i make my joker's probability in the description change based on if it's rigged, without making the mod require cryptid??
life saver
Yup! Though this happens after scoring, so you need to do all scoring related stuff before this context triggers
we love u
Yes, that's the beauty of Lua
yeah i do the problem is the destroy isn't destroying đ
code up here
I'll give it a look!

I think all you're doing wrong is not returning 'remove = true'
@hushed field have you used quantum enhancements in any of your jokers
I'd also personally recommend swapping the order of the random check and the context check if statements
No, I couldn't get it to work without breaking is_face in all circumstances, but I don't know if that's still an issue
oh yeah that fixed it
gotcha
for playing cards at least i have to see if that happens with jokers now
I'm not sure jokers are checked in that context
yeah that's the thing
testing it now
ok the jokers just don't retrigger at all so gotta fix that
Did you make that shader yourself, btw?
stole it from steamodded and flipped some values around
ideally it'd actually look like the card was on fire but idk anything about shaders lol
what are the blind sprite dimensions
Very few people here do, haha
34x34
can i get away with any multiple of this
No clue! Sorry
here's all the blinds if you want
you should be able to get away with any resolution so long as it follows something like this atlas
(and has a 1x & 2x ofc)
i wish i'd been smart and just opted for symbols for blinds like vanilla, damn
Our idea was that a voucher would add +$1 to EVERY source of income. So, could we technically "replace" the function ease_dollars with an exact copy but a constant +1 to the amount? I'm basically asking if that's a good idea or if we should pivot to another option.
you don't want to replace it. Are you familiar with how hooking works, btw? Before I start explaining stuff you're already using, haha
but basically, I'd just set up a hook that checks for the voucher, if it's present and the mod is positive, increase it by 1, then just call the base func
I see your idea
Much better than ours X)
Thx a lot
Only issue this will create is that I don't think the additional money will be accounted for in any buffers đ€
i made a script that automatically exports my .aseprite files
does anyone want it
to kind of modify to work with their thing
Oh, I'm definitely interested
we are beginners in this domain, how does one hook a function ?
I still need to set aseprite up to deal with this alpha/colour issue
tutorials weren't very, tutorial-ly
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
<3 <3
How do I make a context such that a calculate function can manipulate the context that is passed onwards?
until it's exported each one in 1x and 2x
I'm thinking of a context to manipulate pools
very useful, thanks! You might wanna post this in #1349064230825103441 as well, just as a place to gather resources
its very particular, ill have to make a tutorial on the file setup
it has to be in a very certain way to work right
what do you mean? As in a context that intercepts and changes other contexts?
A context that intercepts a table, lets effects change it, then passes that table forward
additionally, this script only works for unix based operating systems
Script that only works for universe-based universes
So if you're in another universe it doesn't work
does smods.calculate not allow you to pass along a table that it can edit?
I think SMODS.calculate_context allows passing a return table, but it's not exactly what I want
I think
showdown blind idea: curses every card played
from what i have, no mods are using quantum enhancements đ
what does a curse do
if you play the card 3 times, it debuffs itself
that seems like a bad Showdown Boss Blind idea
ykw
was thinking that
since it's when th game ends
how do i change the center sprite of a base game enhancement? through mods not just replacing the sprite sheet
and i can't use a texture pack or anything, i have a function for it to dynamically change
ill make it a regular boss blind
its a fucking evil boss blind
but itll be fun to work with
debuffs highest played hand
what about a boss blind that debuffs enhanced cards
i call it evil because i would dread it's existence
because it pretty much seals the fate of cards you play
and goes over any enhancements
it's only bad if you heavily rely on a few cards in particular
the worst part is they don't remove themselves from the deck when debuffed
thats the point
its supposed to make dead weight
when The Rock
think imma call the blind 'The Eye'
ill make the ID like 'eye_astropulvis' so it doesnt intersect with any other 'The Eye's
because i feel like there would be multiple
the eye exists in base game
it's no repeat hand types
oh right
SMODS already adds your prefixes
what would work instead
Except for Consumable Types
a seer is a person who is believed to see into the future
and cursed cards dont activate, until the future
it works
hook = ease_dollars,
ease_dollars = function(mod, instant)
local card_ability = card and card.ability or self.config
if(card_ability.extra.isRedeemed) then
local out = ease_dollars(mod, instant)
print("hook called")
return out
end
end,
why is the hook not hooking 
right this is also
well iâm still doing it
Change the ease_dollars within the function to hook(mod, instant)
i should make the blind say nope when it's trying to be debuffed
Ok so, anyone knows how the draw(self, card, layer) function of SMODS.Joker works? I have a very silly Joker idea that would need to be aligned to the bottom and not centered
(Or if anyone knows of a mod using it so I can look at the code)
well cursed cards have some value to be kept because certain things can âpurifyâ them, giving them amazing new stats
is there anyway to dynamically change a joker's sprite?
basically steel, mult, and bonus all at once
card.center:set_sprite_pos({ x ,y }) I believe, with x and y being spots on your atlas (same params as pos)
oh okay
Wait hold up it might be for the soul x)
sob emoji
card.center:set_sprite_pos should be it
card.children.center:set_sprite_pos({x = <xpos>, y = <ypos>}) for changing the base appearance of the Joker.
yay
Gah so close, my bad
sorry it still doesn't seem to work, maybe the problem is where we placed the hook? Does that matter????
hook location really shouldn't matter
...where are you getting card or self from?
fnnuy
/shrug
Does the order I patch things in matter? I noticed sometimes I can't patch in simple things like a colour change for a UI element like the reroll button or the play hand button and I can't figure out why.
The log doesn't mention the pattern not being found and if I remove it, the total patches done to the file decreases, so I know it's been patched correctly
Like for instance, this one:
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''local play_button = {n=G.UIT.C, config={id = 'play_button', align = "tm", minw = 2.5, padding = 0.3, r = 0.1, hover = true, colour = G.C.BLUE, button = "play_cards_from_highlighted", one_press = true, shadow = true, func = 'can_play'}, nodes={'''
position = "at"
payload = '''local play_button = {n=G.UIT.C, config={id = 'play_button', align = "tm", minw = 2.5, padding = 0.3, r = 0.1, hover = true, colour = G.C.RED, button = "play_cards_from_highlighted", one_press = true, shadow = true, func = 'can_play'}, nodes={'''
match_indent = true```
whats the context for held in hand
yeah
alright, cool
im making something that can do things if it's held in hand and if it's played
uncommon or common?
Disables the boss blind and gives X10 Mult on finishers but is otherwise very weak
Disabling boss blinds is already done as Legendary by Chicot... the X10 Mult makes more sense for Boss Blinds.
I mean this is specifically for the ante 8 boss blind tho
this triggers whenever i select a card too
-# Bizarre.
made it work
it needs to be
if context.main_scoring and context.cardarea == G.hand
does anybody know why i keep getting this crash?
using card.ability.extra.pinata just doesn't work for me, and neither does card.ability.extra
i'm confused what i'm doing wrong as i've cross referenced a lot of different code from ppl with similar issues
ik i shouldn't rlly assign card.ability.extra.pinata at 27 but if i don't the code at 36 says i'm trying to compare zero to a 'nil' value, despite the fact that pinata is set to 1
did u start a new run
are you using the same joker in the same run
values are yeah
I don't like it for the same reason I don't like Chicot
I'd do Uncommon or Rare because I think this particular effect is boring enough it should be rarer, even if it's not that strong
uhh uhm what if my finisher blinds can't be disabled
gains 0.1x mult for every cursed card in the deck
name?
that looks cursed as hell
hmm no idea
i figured i would make a joker that could benefit from cursed cards
defo rare
can you purposefully get a cursed card
If I curse someone do I give out 0.1x mult?
no
thereâs ritual cards that curse cards in exchange for other things
cursed cards are very rarely good things, but i figured it would be interesting to give it a shot
because, mult or not, they still disable themselves after a bit
lol i could make a voucher that curses a random card at the end of the round but it's level 2 version purifies every cursed card in your hand after you play a hand
or a random card at the end of the hand
what are the voucher dimensions
Same as most "cards", really - 71x95... but the actual voucher occupies 59x93.
Hi
I need some help here
i don't know if this is already done tbh
i wonder how hard it would be to mod in joker upgrades
like you can upgrade four fingers to three fingers
that one in particular doesn't sound easy
Is anyone gonna help me here or what
i mean, it's my first time prototyping something
like turn one joker into a different one
if a condition is fulfilled
but have the different joker be inaccessible otherwise
ez stuff but we can't seem to figure it out, how to set the mod icon?
SMODS.Atlas{key = "modicon", path = "modicon.png", px = 32, py = 32} should be enough.
What's the file name of the actual image you'd want to assign as the icon and is it at the root of assets/1x and assets/2x respectively?
and that piece of code is in main.lua
Try different names for said file.
i don't know why i'm doing a joker based on cynthoni/sewerslvt's stuff
how do i check if a given joker's unlocked?
<card>.config.center.unlocked iirc.
ty
my planet cards are so fire đ„
what is the variable to check for how many times a poker hand has been played
nvm got it
G.GAME.hands[context.scoring_name].played
what does the odds value mean? is a higher odd harder to obtain?
Yes.
can someone tell me whats wrong with this code?
SMODS.Consumable{
key = "c_quaoar",
set = "Planet",
loc_txt = "Quaoar",
atlas = "Planets",
pos = {x = 0, y = 0},
cost = 3,
pools = {
["Default"] = true,
["Planet"] = true
},
discovered = false,
unlocked = true,
config = {},
use = function(self, card, area)
-- Define behavior of the card here
end,
can_use = function(self, card)
return true
end,
set_badges = function(self, card, badges)
badges[#badges+1] = create_badge("Three Pair", G.C.BLUE, G.C.WHITE, 1.2)
end
}
it says its trying to index "center"
how do you test ur mods?
put them in the mod folder
i mean if you have a joker how do you force it to apear?
Theres DebugPlus mod
You could make a custom deck or something no?
Thats overkill lmao
could i also get help with this?
nevermind i fixed it
my loc_text was off
how would i make a planet card level up a hand?
function level_up_hand(card, hand, instant, amount)
do i put that inside of the use() function?
what does instant do
Wont play animation if true i think
ye.
my planet cards are so peak
Damn
so like
would the use function look like this
use = function(self, card, area)
level_up_hand(card, "Three Pair", false, 1)
end,
or do i need to put the key
Ye.
how would i potentially apply an enhancement to an entire hand
it crashed my game đ
You loop over all cards in hand and apply emhancement to each
Logs.
and how perhaps would i do that
i dont need a whole code block btw just some pointers could be helpfuk
i really only need to know how to grab the number of cards in hand
for i=1,#G.hand.cards do
G.hand.cards[i]:...
end
many thanks
and then when a hand isnt in play will #G.hand.cards return 0 or nil
wait
dumb question
if its asking for the number of
itll return 0
What's the exact line in your lovely/dump/functions/common_events.lua?
how do i access that
id be safe and check if G.STATE == G.STATES.SELECTING_HAND
nvm
G.GAME.hands[hand].level = math.max(0, G.GAME.hands[hand].level + amount)
What's your mod prefix?
alr
You need to pass the key of the hand with the modprefix_ before it, as it is a modded one.
so "JSJ_threepair"
Ye.
okay how do i add money
ease_dollars(amount)
okay peak
alr
lets see if this workd
for k, v in ipairs(G.GAME.hands) do
print(v)
end
``` why is this not printing anything
pairs?
let me try
pairs instead of ipairs
ah
small issue
(whats the difference)
ipairs is for an indexed table (array)
oh hang on
@red flower will you be adding Ravedactyl Elemental Hero Air Neos to Joyous Spring
ah
also is Dwarf Planets a set or a pool
adding what? I don't know a card with that name
It's just a custom label, all the planet cards are part of the same set iirc
Big Ravedactyl got to Nâ first v_v
how do i add it to my planet cards
Do you want to replace the regular "Planet" text?
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
handname = localize("JCJ_threepair", "poker_hands"),
chips = G.GAME.hands["JCJ_threepair"].chips,
mult = G.GAME.hands["JCJ_threepair"].mult,
level = G.GAME.hands["JCJ_threepair"].level,
})
level_up_hand(card, "JCJ_threepair", false, 1)
delay(0.1)
update_hand_text(
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
{ mult = 0, chips = 0, handname = "", level = "" }
)
put that inside of the use function?
ye
aight
set_badges = function(self, card, badges)
badges[1] = create_badge(localize('k_your_string'), G.C.SECONDARY_SET.Planet, G.C.WHITE, 1.2 )
end
its weird that smods still doesnt just have a util function for that
function level_up_poker_hand(hand, amount)
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
handname = localize(hand, "poker_hands"),
chips = G.GAME.hands[hand].chips,
mult = G.GAME.hands[hand].mult,
level = G.GAME.hands[hand].level,
})
level_up_hand(card, hand, false, amount)
delay(0.1)
update_hand_text(
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
{ mult = 0, chips = 0, handname = "", level = "" }
end
something like that
whos andrew
the joker that lets you play 6 cards
ye i just figured
Just keep in mind that other mods could influence the card selection limit, if Andrew Required is to go off by.
i removed it, as i was playing around with badges to see how they worked
i was thinking about that, and maybe you should first check if another mod before you set the button function to "play_from_highlighted", like call the original functio first, and if not tehn do your check for andrew
so no compatibiity issues
I wouldn't worry about compatibility too much because smods is adding a way to change played hand size natively soon
Jr what is the "Fuller house"?
4 + 2
ok
what about, separately amount of cards you can discard and amount of cards you can play?
more explimation, it doesnt show until the adding is done
is that handled
heres my entire use function:
use = function(self, card, area)
level_up_hand(card, "JCJ_threepair", false, 1)
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
handname = "Three Pair",
chips = G.GAME.hands["JCJ_threepair"].chips,
mult = G.GAME.hands["JCJ_threepair"].mult,
level = G.GAME.hands["JCJ_threepair"].level,
})
delay(0.1)
update_hand_text(
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
{ mult = 0, chips = 0, handname = "", level = "" }
)
end,
oh sick
you should put level up hand after the update_hand_text
how do you check if a joker is negative?
if card.edition.negative then
-- do stuff
end
fair
Is it OK to use SMODS.has_enhancement(v, 'c_base') to check unenhanced card or do I need to do the whole v.config.center == G.P_CENTERS.c_base thing?
-- Find consumable non-eternal and non-negative jokers (can consume legendaries)
for _, j in ipairs(G.jokers.cards) do
if j ~= card and not j.ability.eternal and not ( j.edition and j.edition.negative ) then
table.insert(valid_jokers, j)
end
end
is this ok?
the util function is for convinience so ye
bump
also making sure, the atlas pixel padding is 1 right
theres no padding
also what do you mean
liek the uh
Check if they have a global for their mod somewhere.
I mean PB_UTIL seems to be a global
(lvl. X) Level up
[HAND]
+X Mult
+X Chips
SMODS.Mods["paperback"].config?
what would the base code be for that
thats what the update_hand_text does
your mod should have later priority than paperback
oooohh its prolly that then
can i have an enhancement do something if it's enhancement gets changed
for the planet card desc
because i want cursed cards to refuse to be enhanced in any way other than being purified
if you try to enhance it in a different way it just debuffs itself
oh, heres example from vanilla
you define them in the config, and expose in loc_vars
those
actually
and #2, would be localize("JCJ_threepair", "poker_hands")
sure
how do i unlock a joker from another joker's actions?
Passing G.GAME.hands["JCJ_threepair"].level, G.GAME.hands["JCJ_threepair"].l_chips G.GAME.hands["JCJ_threepair"].l_mult through, though?
SMODS.Consumable{
key = "c_orcus",
set = "Planet",
loc_txt = {name = "Orcus", text = {"Yeah"}},
atlas = "Planets",
pos = {x = 0, y = 0},
cost = 3,
pools = {
["Default"] = true,
["Dwarf Planet"] = true
},
discovered = false,
unlocked = true,
config = {},
loc_vars = {
G.GAME.hands["JCJ_fullerhouse"].level,
G.GAME.hands["JCJ_fullerhouse"].l_mult,
G.GAME.hands["JCJ_fullerhouse"].l_chips
},
use = function(self, card, area)
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
handname = "Two Three",
chips = G.GAME.hands["JCJ_twothree"].chips,
mult = G.GAME.hands["JCJ_twothree"].mult,
level = G.GAME.hands["JCJ_twothree"].level,
})
level_up_hand(card, "JCJ_twothree", false, 1)
delay(0.1)
update_hand_text(
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
{ mult = 0, chips = 0, handname = "", level = "" }
)
end,
can_use = function(self, card)
return true
end,
set_badges = function(self, card, badges)
badges[1] = create_badge("Dwarf Planet", G.C.BLUE, G.C.WHITE, 1.2)
end
}
oh wait lemme fix my desc rq
just realized i put that in the wrong planet
imagine i put that in the fuller house planet okay
loc_vars = function(self, info_queue, card)
return { vars = { G.GAME.hands["JCJ_fullerhouse"].level, G.GAME.hands["JCJ_fullerhouse"].l_mult, G.GAME.hands["JCJ_fullerhouse"].l_chips} }
end
Don't forget that the 2nd arg is the "name" of the poker hand.
to use a variable inside of config extra is card.ability.extra.variable?
i just predefined it in the description
JIPPIE
now i just need the uh
{V:1} table
is there any way to combine multiple images into one sprite in-code? not setting separate sprites but specifically only rendering one sprite that's composed of multiple things
read the atlas config
you just set up the card size and the a grid of x and y is used to navigate it
that is not what i asked
If your "frames" are aligned on the atlas, you can change the currently shown "frame" on the fly by
card.children.center:set_sprite_pos({x = 0, y = 0}) -- for base card, change x and y accordingly.
card.children.floating_sprite:set_sprite_pos({x = 0, y = 0}) -- for floating sprite (or soul_pos) instead
that is also not what i asked