#💻・modding-dev
1 messages · Page 295 of 1
there's no default dropdown menu option for ui, is there?
_ _
no idea sorry
hmmpf, I guess I have to figure out how I wanna do this then. I guess I could just say fuck it and make people type the string key
I don't feel like going through the effort of making a dropdown ui element, that sounds like it'd be difficult and time consuming
try to find where in the dumps the error comes from
if effect.juice_card then G.E_MANAGER:add_event(Event({trigger = 'immediate', func = function () effect.juice_card:juice_up(0.1); scored_card:juice_up(0.1); return true end})) end
I think that's a SMODS bug
It's trying to juice the deck but there's nothing to juice
ah
@wintry solar being asked to ask you :D
hmmm?
lemme redescribe my bug ^^
- my deck draws some cards face down
- currently, it's drawing a full hand of face-up cards, then crashing
- code is here
- crash log is here
- i think this is the line of code being referenced
is there a way to manipulate pools easily? i'm trying to make a voucher that requires blank and antimatter, and when purchased, brings the blank and antimatter vouchers back into the pool of purchasable vouchers
i don't think you wanna manipulate pools, i think you just want to remove those vouchers from the table that tracks which things aren't allowed to spawn anymore because they've been purchased, no? My understanding is that even non-jokers are stored in used_jokers, but I'm not sure
I am unsure on how context.stay_flipped works, I can take a look in an hour or so for you
that'd be awesome, thanks :D
hmm, that'd make sense
pretty sure it's used_vouchers
i can probably just loop through that and delete values that match once the voucher is redeemed
Hi, I'm trying to mod a single joker into the game to try and get familiar with the process, and I wanted to ask if there's anything special that's necessary to get a legendary joker to spawn from a soul card?
nope! that happens automatically :D
Hmm, then I'm either really unlucky or I messed up somewhere lol
I'm using the brainstorm mod to get a soul card right away and have found every vanilla legendary multiple times already
mm, you should use DebugPlus to spawn it
I managed to get him to show up in the collection, so I must've done parts of it right at least lol
Oop, there it is lol
:D sweet
Yeah that was just unlucky lol
Lady luck is a fickle mistress
Now to figure out how to get the ability working, cause it crashed right away after earning money
Been meaning to actually ping you about atlas and enhancement stuff, kinda forgot whilst figuring the wackiness out.
- Atlas is 71x104, but I want the suit atlas to remain drawn 71x95.
display_size = { w = 71, h = 104 }is defined. Settingpixel_size = { w = 71, h = 95 }does nil.- Whenever cards are drawn to hand, if the card has this enhancement, it is automatically drawn to hand, even if it was not chosen to be during the initial draw.
- Whilst the
if context.hand_drawn and G.deck and #G.deck.cards > 0 and card and context.cardarea == G.deck thencheck works withdraw_card(G.deck, G.hand, nil, "up", true, card)withincalculateof theSMODS.Enhancementdefinition, if you exit to the main menu without doing anything else and re-enter the saved game, the drawn cards by thedraw_cardfunction are back in the deck instead.
can anyone see any errors? my code crashes on use of the consumable
does anyone know how to make the legendary joker do the legendary thing?
like with the hovering texture
soul_pos for the hovering sprite and pos for the back sprite
Ok it seems to work just fine (effect is very simple all things considered, and I based a lot of the code from a joker from the extra credit mod that does a similar thing), but the little pop-up when the XMult scales doesn't show up
I don't really have a clue of what I'm doing, and I also don't know where to look for how to do it right
this adds the blank voucher back into the pool, but then once it's in the pool it isn't removed when purchased again (so it just shows up over and over again) aghh
Forgot an extra end there for the Blank voucher set.
strangly didn't change anything. checking G.GAME.used_vouchers shows that they weren't removed
iirc Betmma's Vouchers has a voucher that "unredeems" vouchers without removing the effects so that they can be purchased again. 🤔
I'VE BEEN MENTIONED
KÃ eda mentioned
would you happen to know what that one is called?
Been a bit since then, not sure.
is there a way to tell how many hands have been played so far in a run?
I think so because there's a Tag that uses it
does anyone know how to get my vscode to autofill function parameters? i tried to add the smods folder to my workspace but it didnt work...
Wow that stunk, two + hour power outage due to these storms
I am working on my last two jokers, trying to think of a fun idea. I have an adorable FF6 moogle and I want to play around with his ability of random chance and also dancing, since he does dance related moves in the game.
I was thinking he would respect the same random hand selected every round that 'To Do List' rewards, and if you play that he would randomly enhance cards played for that hand.
Too powerful?
How do I make the Xmult variable constantly change?
Am I only one who make entry point for mod as index.lua? 
Is it random enhancements or a specific one
<@&1133519078540185692>
Roll the tanks out
Light them up
🔫
mods cut off his balls
Thanks for your service
I thought every round, it would call poll_enhancement
Are all cards being granted or random cards too
Ie, I have jokers that have individual chances per card to roll
? maybe...
Er, not too but
Will it be guaranteed 5 applications for 5 cards, or can it be 1 of the 5
ah, each card has a random chance to be enhnced for the played hand. And the hand is also randomly chosen.
It will do 1 / 3 odds
Gotcha so the played hand entirely gets the enhancement and not indiv rolls per card
Honestly it's probably fine I'd say around a uncommon area or so
Interesting, I did not know that to_do_pokerhand isn't a public var, like G.GAME.AncientJokerSuit (or however that goes)
can anyone help? my game keeps crashing on this line, so basically im trying to generate any joker with the custom rarity 'special', my mod prefix is jjok btw
Hover over the G
Luke show why there is a squiggly
Go to mods/lovely/dump/functions/common_events.lua
And screenshot around the line 2312
The key needs to be of the joker, if os any
this is the way
i thought the key could be of a rarity and it would generate a random joker of that rarity?
I just apply rarity after making a joker, seems to work for me
even with a custom rarity?
turns out i was a stoopy head and this was all i had to do ^^
Oh you made a custom rarity? I haven't done htis, only custom enhancements and editions
tbf the github gives the impression that you need to input an integer value imo
yeah it was pretty easy actually! and i needed a higher rarity for jokers that do this...
I haven't seen the show but that looks sooo slick
frrr its actually a pretty good show! hence why im making the mod on it
otherwise it woulda been elden ring or something 😆
I've created a custom stake that goes before gold stake, how do I get the changes in that stake to retroactively apply to gold stake?
Today I learned lua does not allow PowerShell style Verb-Noun function names 😦
you can still do verb_noun()
how would i go about changing the skins of a few joker cards?
Well that was very easy. I have overwritten To-do list to now always fire, so my moogle card will coalesce with it
anyone know how to retrigger jokers
SMODS.current_mod.optional_features = function()
return {
retrigger_joker = true
}
end
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card then
return {
message = localize('k_again_ex'),
repetitions = 1,
}
end
Again!

how'd you do the background for it?
the background?
you mean the badge colour?
No, for the Joker
does anyone know how i'd go about making a joker that always rolls for an edition when spawned and can't have the standard edition? :3
Hi folks, anyone have a sample of how to check for the rpesence of another joker card? I want to program a card to use the value of another card if present
I've got you
guh????? :3
here, add this
-- sendInfoMessage("triggering on pickup logic for this card", self.key)
local edition = poll_edition()
card:set_edition(edition, false)
card.cost = 10
end,```
i still dont get you, do you mean how do you define the rarity and assign it to the joker?
are you luia jeesus :3
i mean the art background for the joker
ahh, just add soul_pos = {x = (x coords), y = (y coords)} on top of having your pos = {}
pos is for the background though and soul_pos is for the floating sprite
no, i mean where'd you get the background (like in the screenshot)
that's just the legendary background recolored
where do you get it without the text or having a sprite on top of it?
I need it for art I'm wokring on for a mod
Ah, it is in the base textures, let me give you the path
so how does this work btw? :3
it's found in resources\textures\1x\jokers.png, it's like half day down
im spawning it in but no edition but that might be a like, debugplus thing
ok, add that to your joker, it will ensure that when the joker is spawned to appear in a list, that it will enforce an edition
i did :3
I use that to ensure one joker always has hologram applied to it
ohhh to appear in a list
oh word, so if i were to get it from the soul card would that work?
trying to make a Joker that makes Uncommons be free, and I've copied over the set_cost function (so I don't break it) and added what I'd assumed would work, but it doesn't, as Madness here would be $0
.extra_value?
... wait do i have to put a specific edition inside the thing you gave me?
i feel like a cavewoman given a smartphone rn

Thx
How can one check if it's specifically (not) a celestial pack in a consumable's can_use function with G.STATES.SMODS_BOOSTER_OPENED consolidating all the packs together?
if in a Joker, context.open_booster and not context.card.ability.name:find('Celestial')
Not in a joker, a consumable, specifically in the can_use function.
welll self.ability.name:find('Celestial') is usable outside of Jokers so it's probably a good idea to fiddle around with that
I'll give it a shot!
there we go
Crashed, no ability field
can_use only supplies self and card as arguments unfortunately
hmm, does anyone know how to reffer to the edition of the joker in a context?
joker.edition?
i thought it'd be like center.self.edition
ur smort ty :3
post the code, that gives needed context
hmm.,,
I'm not sure it does, but here ya go lua can_use = function(self, card) if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT then if G.play and #G.play.cards > 0 then return true end if G.STATE == G.STATES.SMODS_BOOSTER_OPENED or G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK then return true end end return false end,
say whats the difference between two equals signs and one?
== is a comparison, = is assigning
two equals is comparing the variables, one is assigning
AH!
big brain, big learn
im taking a coding class this summer :3
local k = 4
--k is now 4
k == 4
-- returns true or false
tyty!
visual examples do me super good :3
integral bit of code knowledge because the vast majority of languages will scream at you for mixing it up
does that make ~= comparison?
yes
yeah, that's specifically not equal to
oooh :3
~= is Lua (this language) for "Not Equals"
!= is the one I'm used to, which is JavaScript, C#, Python too I believe
Just a warning, copying a whole function rather than overriding it/using a lovely patch can have consequences with other mods
trying to troubleshoot this without overtly asking for the solution :3
Which you'd think not x == y and x ~= y would always return the same, but depending on the variables in question might not be true.
latter should be card.edition
oh if you want the edition of the joker that is calculating it's card.edition
ah, there we go :3
i was like, trying to figure out the right lingo
joker is just a generic name i gave it because i didnt know what context you were talking about
OHHHH
i thought it reffered to the thing but that was stupy because all objects are cards
I have a Joker with an editions gimmick
because they're not the same. not (x == y) is the same as x ~= y
im making mine rn, its myself as a legendary actually!!
I don't think the update bit is necessary, it can be put into calculate, before returning x_mult
it's in update because the tooltip changes in accordance
You can get make your loc_vars modular
yeah it's not a good idea to do things in update unless you really need to
Something like this
loc_vars = function(self, info_queue, card)
local foilMult = 2
-- bla bla edition check
return {vars = {foilMult}}
end,
wait isn't there a place to check all the functions and stuff
like repititions, editions, all that junk :3
I kind of use update as like a persistent context for very specific things, I have a bunch that use it but I know per frame actions can be rough so I try to keep it light
repetitions is a case-by-case variable and not a global thing, edition is like sort of same but different in that edition is actually a global thing that's tracked but nothing starts with it
i can assure you 100% of those can be replaced for in-place calculations
Too Code ; Didn't Get It: repetitions is defined within a Joker, edition is applied to a card, and you may encounter issues if you code stuff that assumes everything has either of them, because neither of them are inherently present.
oh, well how do I add repititions :3
I'd recommend reading this: https://github.com/Steamodded/smods/wiki/calculate_functions
If you do not have Balatro's decompiled code, this is a good resource for most basic Joker ideas
https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
oh, i spelled repetitions wrong . 3.
if you do have Balatro's decompiled code
I'd like to say that's still better because Balatro's code fucking sucks, but it's technically a better resource because then you can actually find the code for basically everything you'd want to do
i do, i was looking at cryptid's chad for reference but i should prob look at base game more . 3.
Or just look into your Mods/lovely/dump folder, it's better since it lets you see applied lovely patches too
i return again to ask for help!!!
calculate = function(self, card, context)
if context.end_of_round and context.main_eval and not context.blueprint then
if G.GAME.blind.boss then
card.ability.extra.ante_count = card.ability.extra.ante_count + 1,
card.ability.extra.chip_gain = card.ability.extra.chip_bonus * card.ability.extra.ante_count,
card.ability.extra.mult_gain = card.ability.extra.mult_bonus * card.ability.extra.ante_count
return {
message = localize("Ante up!"),
colour = G.C.attention,
card = card
}
end
end
if context.joker_main then
return {
chips = card.ability.extra.chip_gain,
mult = card.ability.extra.mult_gain,
}
end
end
}```
for some reason its saying theres an unexpected symbol near line 45 which is the chip gain and the mult gain calculate function
remove the commas
my turn for troubleshooting im at a loss for why this isn't triggering
it certanly only crashed my game when the editions matched beforehand but now its like, yeah i see it but im not gonna do anything

repetitions
also you dont need the message or the card in the return they're done automatically by smods
word :3
still no repetitions :c
Imagine adding gamepad support when you don't have gamepad to work with 
half of my mods have gamepad support and the other half are unplayable if you use a gamepad (i only made 2 mods)

heck
Is there a way for the +10 extra chips to appear before the gains +10 chips when scored?
The +10 extra chips is just coming from a bonus
@tepid crow ?
someone told me how to make a joker always spawn as eternal regardless of stake but i forgot
how are you adding the "gain +10 chips when scored" line?
just from loc_txt
cuz I'm guessing this is a lovely patch which means you just need the right order of localize calls
oh, it's an enhancement?
is card.edition wrong here? im confuse ._.
what is this indentation ðŸ˜
silly :3
Yeah I don't think smods has anything built-in to shift those around (?), so it'll be in the order of:
- base chips
- enhancement
- perma bonuses
if you really want to change the order, you could start making lovely patches, but it'll be a bit of pain
it's not worth ðŸ˜

You need to check for context.retrigger_joker_check for retriggering jokers and context.repetition for retriggering playing cards
you need to check for the context for..,, the thing im trying to output?
context.individual should be context.repetition and context.other_joker should be context.other_card and you should be checking for retrigger joker

if context.other_card.config.center.key == key
like this?
You need to replace all other_jokers with other_card and you should only be checking retrigger joker for when you are retriggering a joker
i am trying to retrigger both jokers and cards :(
cant get my jerker to retrigger my perkeos
SMODS.Joker{
key = 'just_the_perks',
rarity = "Perkolator_Perkeo_R",
calculate = function (self,card,context)
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card and (context.other_card.config.center.rarity == "Perkolator_Perkeo_R" or context.other_card.config.center.key == 'j_perkeo') then
print("triggered")
return {
message = "Again!",
repetitions = 1,
}
end
end,
}
j_modprefix_key
i did and its still not doing anything :c
new joker what do we think
regardless of if i put the prefix or not it doesnt retigger
very silly very snowbally i like it
even if i take owner and give it the perkeo rarity
im struggling with retriggers too :(
every other joker i give the rarity to retiggers
retriggering what
perkeo
im trying to retrigger cards that match the edition of this joker
but like, its just being like nuh uh
hmmmmm
this is my current code
how would you fetch a card's edition?
well like this no?
the edition is getting fetched, its the repitition that isn't happening
where?
with context.rep
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card
why are you comparing context.other_card with card.edition
Whoa....does lua support breakpoints?!
Wouldn't it be "context.other_joker"?
i literally do not know


wait is this also needed?
im so confused..
comparing edtions directly didnt work for me but comparing keys did
it crashed
and the first half of my code is just jibberish p much?
yes
SMODS.Joker{
key = 'just_the_perks',
rarity = "Perkolator_Perkeo_R",
calculate = function (self,card,context)
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card and (context.other_card.config.center.rarity == "Perkolator_Perkeo_R" or context.other_card.config.center.key == 'j_Perkolator_perkeo') then
print("triggered")
return {
message = "Again!",
repetitions = 1,
}
end
end,
}
shouldt this retrig perkeo
was just looking at it, looks correct to me comparing with cryptid but i literally never worked with retriggers
joker retriggers
i based it off stardust
stupid question but do you have them enabled?
retiggers?
yeah
it retiggers all jokers of the perkeo rarity
but perkeo wont
even if i give it the rarity
well half of it works, thats better than none of it working :3
yeah ig
if you remove the context.other_card check does it work
wait quick whats the joker card area called
still odd
oh i was talking about mine . 3.;
odd
thing is my print staement doesnt even work
Maybe it’s because perkeo doesn’t return anything so it has nothing to retrigger
Trying to spawn a card when the deck starts, getting the attempt to index local 'center' (a nil value)" error
it retriggers my perkolator wich behaves the same way perko does
the key needs to be j_modprefix_key
but also use SMODS.add_card instead
ahhh, thank you
fervent card and the magus
blind
how do i uninstall lovely
blink blonk :3
Delete the version.dll file
whers that
located in your balatro installation (where the executable is)
all i see is love.dll and when i delete that it breaks and i cant open balatro
hey im in the home stretch, where am i going wrong retriggering other jokers?
Steam\steamapps\common\Balatro
I think verifying the game files work too?
it's other_card not other_joker for retriggering
that doesnt work sadly
i just reinstalled balatro to teach my gf
can yall remind me how to install steamodded..?
i just cant remember anything
still not retriggering :(
Get everything you need to know about installing Balatro mods in today's guide. Installing Balatro mods should only take a few minutes & the first thing you will need to do is download and install lovely Injector and then steammodded as shown in the video.
Path for mod directory: %AppData%/Balatro/
Lovely Discussion: https://discord.com/chann...
remove the cardarea check maybe? idk
mayhaps..,
Is .edition.key even defined? Are you checking if the Joker has any edition?
yes, any edition that matches the edition this joker has!
Could anyone help me with initial mod running?
IT WORKS
i think ive set up most of the mod to just try and see if it works if anyone is expirenced lmk in terms of helping
what happened
it triggered the played cards twice as much
which i think i can just.,,,,,,,,
delete that part then?
hmm i dont think thats the problem but try it out
well that just made it stop workin x-x
so back to what i had before, i still need to define the first part to target jokers and NOT the played cards
can you format your code lol
i dont really know how but i can try :3
right click > format document if you have the lua extension
can anyone help me? how would i get cycles to be able to be used in arithmetic in the config = {} section of the code? if any of that makes any sense...
i dont think i have that
is this.,, drag and drop or as complex as installing plugins in FLstudio
You press install
i tried getting rid of space :3
you can't. you need to update the other values in calculate when you update cycles
my problem was indentation mostly
try format document with > lua
it made my file name redd :3
is it still red
yeah that makes sense
i recommend adding the smods folder to your workspace
the space youre working on :3
does the mod run
it do :3
then ur computer is cursed and cant do formatting
guh??
idk either
@high sinew this is the channel where you ask helps for developing a mod
oh ok bet
what do you need help with
dm'd u for simplicity
Guys help
Every time a Joker upgrades itself this Joker gains x0.05 Mult
(Current x1.0 Mult, excludes himself and his copies)
Is this posible to code?
When a Joker upgrades itself
like when square Joker gains 4 chips
like that
Like this
I don't think it can work for modded Jokers but you could maybe hardcode vanilla Jokers and your mod's Jokers to make it work
Can someone help me with a joker Im making? It currently retriggers twice for every played Jack but I want it to also retrigger the next scored card once
I hate Talisman
wait so with the workspace thing why is it doing the underlines again?
some of them are going to be from the vanilla game, you can disable that warning but i dont remember how rn
erm guys... i dont even know whats happening anymore and i wrote the code
ahhh
talisman got me adding a new decimal place to my version number out of pure spite
im still on 0.0.1 :3
so true
this is objectively correct
the other reason I hate talisman, is in addition to turning things into tables and making my life a pain, it feels wrong playing without the card scoring animations
you can toggle that in talisman settings
ah good to know
my versioning scheme is:
MAJORUPDATE.BREAKINGMINORUPDATE.NONBREAKINGMINORUPDATE
why is no animations the default though 😔
breaking updates are generally ones where I've either restructured or added new data
to the G.GAME object
do you have a solution for this not working? i also tried card.loc_vars.vars.stagetxt as well
i dont think you can control loc_vars like that
oh damn, i was looking to change the description of my joker based on which phase out of 3 it was in...
could i just straight up change the entire description of the joker in loc_txt
I was going to say you could use a localization file to add something to the info_queue, but then I don't know if you'd be able to pass variables to it
Written In Stone (Uncommon) $7
Stone cards count as any rank to other Jokers
Is this one posible to code?
as someone who made an enhancement that counts as every rank, I had to manually patch each of the vanilla jokers to be compatible with it
it is doable, but it will have a lot of overhead
damm
you can return a string as a localization variable but I'd recommend using main_end
what is this
actually yeah this is much simpler
hmm would you have an example of how to implement smth like that?
I had an idea for an enhancement and a Joker that I want to add, but I have no Lua knowledge. How difficult would it be for someone with zero Lua knowledge, but has experience in other langs to add an enhancement, and a joker to apply that enhancement?
does anyone have any idea why this is retriggering played cards 13 times when repetitions is set to 3?
you could just do
return { vars = { "gain" .. card.ability.extra.dollars .. "dollars at end of round" } }
@placid star
That one probably does way more than you need because I have some dynamic ones
actually here's a simpler one
it's similar to Invisible Joker
local _generate_main_end = function(card)
if not misc.is_in_your_collection(card) then
local add_node = function(nodes, text, colour)
nodes[#nodes + 1] = {
n = G.UIT.T,
config = {
text = text,
colour = colour,
scale = 0.3
}
}
end
local nodes_ = {}
add_node(nodes_, '(Currently ', G.C.UI.TEXT_INACTIVE)
add_node(nodes_, tostring(card.ability.extra.blinds_defeated), G.C.FILTER)
add_node(nodes_, '/', G.C.UI.TEXT_INACTIVE)
add_node(nodes_, tostring(card.ability.extra.blinds_to_defeat), G.C.FILTER)
add_node(nodes_, ')', G.C.UI.TEXT_INACTIVE)
return {{
n = G.UIT.C,
config = {
align = "bm",
padding = 0.02
},
nodes = {{
n = G.UIT.R,
config = {
align = "cm"
},
nodes = nodes_
}}
}}
end
end
-# At some point this hardcoded text should be localized
@minor furnace an example of what you can do with main_end
ah I see
I use it for a Invisible Joker-like counter so that it doesn't show up in the collection
ive narrowed it down to the line before this, whenever that one isnt working the bottom one does the right amount of retriggers, so somehow the top part is looking at played cards
but.,.,, not giving them retriggers?
so would something like this work?
I would imagine you can do something similar to that
it would have to go in your loc_vars function
although I have no clue what ino_function is
i have no clue what im doing tbh im so tired
even i dont know what my code does atp
that loc_vars should be
loc_vars = function(self, info_queue, card)
oh yeah, i keep forgetting how to actually do loc_vars lmao
Does anyone know how to make it so a joker triggering makes the played card to right of the current one being scored trigger an additional time?
Sounds pretty confusing lmao, but the concept is if played card is a jack retrigger itself twice and the card to its right once
Hey guys, does anyone know how to put discards to an absolute 0? I'm using the base config, which works for white stake (discards = -3, means starting with 0 ), but on blue stakes and higher, it starts with -1 discards, which is not optimal for pretty obvious reasons
I thought $15 would be enough, but it still seems too cheap
What sounds like a good price? Now I am thinking ~$25 maybe
maybe, i'd say 15 is already a decent investment, especially if you can't guarantee the received joker will actually fit your build
20 might be a good middle ground
I think 25 is solid tbh 20 not bad either
I will make the price linked to how many people are in this discord at a given time 😈
also worth noting that getting new negatives (especially random) is less powerful than having one of your existing jokers turned negative
i'd say 20 is pretty good for choosing 1 negative joker out of a completely random 5
why not 1 from 4?
My opinion is that theres so many more jokers that are useful negative than are useful non-negative
okay so could i apply styling to this? e.g. {C:white,X:mult}
something like this should work
key = 'ino',
loc_txt = {
name = 'Takaba Ino',
text = {
"Cycles through effects",
"Currently gives #1#"
}
},
config = {
extra = {
stage = 0,
xmult = 1,
chips = 1,
money = 1
}
},
atlas = "atlas_name",
pos = {x = 0, y = 0},
blueprint_compat = true,
loc_vars = function(self, info_queue, card)
if card.ability.extra.stage == 0 then
return {vars = {"X" ..card.ability.extra.xmult .. " Mult"}}
elseif card.ability.extra.stage == 1 then
return {vars = {"{C:chips}+" ..card.ability.extra.chips .. " Chips"}}
else
return {vars = {"$" ..card.ability.extra.xmult .. " at the end of round"}}
end
end,
calculate = function(self,card,context)
if context.setting_blind then
card.ability.extra.stage = card.ability.extra.stage + 1 % 3
end
end
}```
however, you can't get color formatting this way
I asked my artist to make this little baby and I totally forgot my plans for what it was going to do
Im creating a joker leveling system for my mod right now the idea is that it starts on the pimento pepper (ive attached photo). I also want it to keep track of mult at bottom and to say it gains +3 mult. When the joker destroys itself and adds the next level it crashes my game
hm maybe i could split it into two outputs? for example {C:white,X:mult}#1# {}#2#
adorable
that should work I beleive
but then it'll always be the xmult color
yeah i just thought of that whilst writing the code
can i use variables to declare styling?
kitttttttttyyyyyyyyyyyyyy :3
oh also fox i had an ask, i wrapped up the actual ability i just need help with your little script thingy
GUYS CAN I USE VARIABLES TO DECLARE STYLING??
What is the error you see when this happens?
Hi Kawaii, what's up?
hi! so my joker is occasionally spawning in with an edition and i think thats from your script you gave me! I need make sure it is garunteed to spawn with an edition, but any edition
do you know how i could use this to do that?
oh wonderful! :D
GUYS PLEASE MY JOKER DESCRIPTION LOOKS LIKE ASS
local polledEdiiton = nil
local counter = 0
while(nil == polledEdiiton)
do
polledEdiiton = poll_edition()
counter = counter +1
end
print("It took " .. counter .. " tries, but we will apply edition of " .. polledEdiiton, self.key)
--bonus, do something fun with the counter
card.ability.perma_bonus = counter
oops, a few tyops there
tyops yum :3
wait should i have this WITH what i already have?
removed what you had and put the new sample instead
gotcha :3
silly print command..,,
it.,.,, it didn't apply the edition but it definately rolled for one LMAO
you can do this
wait howd u do that...
{V:x} and inside loc_vars you can return {vars = {colours = {…}]} and the x-th color in vars.colours is used for the respective part of the textbox
yoinky hand.,,
rn setting up the pimento pepper the first evolution and it was not adding joker at first tried chagning up code idk what this error means
how does this.,,, actually set the edition?
That just keeps running poll_edition until it gives you an edition, you do still need to run the :set_edition() code
ohhhhh the set edition thing is whats doing it i thought edition = was setting it :3
oops, I see what happened. Sorry to lead you into the briars!
nono, its a good learning experience! im not very good so like figuring out what does what, even in a nieche, is very helpful :3
Hey, you asked for help. That is more than like 50% of junior devs do!
Shhh don't tell people you're an artist around here!
looks like a problem with the new card you're creating, you
whoops hit enter
looks like you're calling the joker's name where you want the area that the joker should be getting put in.
im so close i can feel it . w.
Oh I was just being silly, lots of us are programmers here and are desperate for art help lol
oh, im the uno reverse of that!
Looking at the code, which variable contains the edition we want to set?
is it polledEdition or edition?
polledEdition, no?
yes! but which one are you using when you call set_edition?
yea ik im trying to see how i can fix this
not sure how you remove a joker to replace with another in a sense
like its leveling up the joker
im calling for the current edition rather then thee one polled for if im interpreting it correctly
For what you've got now, try create_card('Joker', G.jokers, nil, nil, nil, nil, 'mills_anaheim_chile', 'pep')
It works!! thank you so much for the help!!
You're welcome 🙂
this joker is so cool, i love editions and this joker is just me as a 2010 scene core clown girl XP
Though I would think if their functionality is the same and it's simply the card image/name being changed, you could just make all of these one joker and change things about the joker when it upgrades as you want it to.
please use the smods function 😦
im really bad at shaders... how would i make something like cryptid's astral or vanilla's polychrome but just yellow? i'm trying to make it highlight something
you can try card:set_ability("j_modprefix_newkey")
like this?
Just trying to get their current code working with as little issue as possible. Unless there's a reason for it I'm not aware of, I think what they want to do could be done with a single joker changing rather than multiple jokers replacing one-another in the first place, which wouldn't require SMODS.create_card at all.
yeah that's why i recommended set_ability
if context.card_added and context.card.ability.consumeable and not context.blueprint then
print("triggered")
if context.card.edition.type == 'negative' then
print("secnd")
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult,card.ability.extra.Xmult_mod } },
colour = G.C.MULT
}
end
end
so i had this working
it would increase when a negative consumeable was created
but now it wont
idk what i did
Does anyone know of a way I can queue a retrigger for a card that isnt being scored yet, and if its possible to pop that retrigger before the initial scoring of that card? if that makes any sense
Or here, does anyone know if there is a way to make the message that pops up for a retrigger different for each retrigger? Like if I had a joker that makes a card retrigger 3 additional times the first time it says "X" under it when it retriggers the second time "X" also and the third time "Y" for example
I think that was recently added to smods. you can do
return {
repetitions = 1,
message = "X"
extra = {
repetitions = 1,
message = "Y"
}
}
etc
how do i get the player's current hand when they reload a run?
help
.
no idea sorry
istg if smods changed somthing
Preciate the help, right now it just makes two messages appear consecutively instead of waiting for the second retrigger for the second message to appear
Im not sure what I want is possible though due to only being able to return one thing
what version of smods do you have
truly only the best ideas being made here
"1.0.0~BETA-0324b-STEAMODDED"
I think
yeah it was fixed after that one
the newest version should do what you want
I just put in the file, it is going to have a lot of content tbh
Not like a crazy amount but lots of rng markiplier quotes
Cool thanks, how should I go about updating smods or is it as straightforwards as it sounds? I just dont want what ive been working on to get messed up in any way
And associated chips mult etc
hello everyone my name is multiplier and welcome back to two retriggers at chads
unless there's a really big update most of the time it's just fine to replace the old one with a new one
nb
does anyone know how
"if context.other_joker"
works? can I use it to make a joker retrigger the joker to its right or something?
Hey guys, super new to modding on here (and coding as well). I really want to add a few of my custom joker art works into the game and mess around with things. Are there any good resources out there to learn what I'm doing? Saw a couple youtube videos, but each person did things differently and skipped a few key steps
The official smods documentation and example mods are a good way to start, tho it doesn't include everything, it has the basics you might want to know
joker retriggers are not native to balatro iirc so you'd have to allow them to happen
I will definitely check that out
tho if you need more help, you can always check youtube tutorials or just ask here, people are usually quite supportive
I talk from experience lol
I feel like we need more youtubers out there lol]
I am so new to this that anything past naming a joker becomes confusing
ngl I should make a youtube tutorial series for balatro modding
I kind of understand position and what not, but yeah its so confusing
I literally want to make a joker with +2 mult
thats it lol
you would get a ton of views
theres a balatro modding starter pack in the modding threads section
ooo might have to look into that
need to make this guy a reality
https://www.youtube.com/watch?v=Zp-4U5TlbxY&t=8s youtube vid about creating jokers
STEAMODDED 1.0.0
A tutorial on how to make a modded Joker.
https://github.com/art-muncher/Example-Mod -- EXAMPLE MOD
https://github.com/Steamopollys/Steamodded -- STEAMODDED
https://github.com/WilsontheWolf/DebugPlus -- DEBUGPLUS
-----------------------------------------------------...
loc_vars and config is where that video completely lost me lol
tbh i dont fully understand them either but like they work so
kinda just brute forced thru everything
G.GAME.current_round.most_played_poker_hand this is the most played poker hand right???
haha yeah i feel it
And to modify the config, here's the documentation about SMODS.Joker, tho you'll probably also need to see the one for calculation and stuff
Bump
trying to learn balatro modding, does anyone know why this joker isn't doing anything? here's main.lua:
--- STEAMODDED HEADER
--- MOD_NAME: Test Joker
--- MOD_ID: TESTJOKER
--- MOD_AUTHOR: [UnusedParadox]
--- MOD_DESCRIPTION: test joker for testing purposes
--- PREFIX: test
----------------------------------------------
------------MOD CODE -------------------------
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'Jonkler',
loc_txt = {
name = 'xmult joker for sevens',
text = {
'Each played {C:attention}7{} gives',
'{X:mult,C:white}X#1#{} Mult'
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
config = { extra = {
Xmult = 77
}
},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.Xmult}}
end,
calculate = function(self,card,context)
if context.individual == G.play and context.cardarea == G.play then
if context.other_card:get_id() == 7 then
return {
card = context.other_card,
Xmult = card.ability.Xmult
}
end
end
end
}
----------------------------------------------
------------MOD CODE END----------------------
remove the first == G.play check, you just need it for context.cardarea
if G.shop then
if (love.timer.getTime() - 1) > card.ability.shop_update_interval then
if G.shop_jokers and G.shop_booster then
for k, v in pairs(G.shop_jokers.cards) do
v.extra_cost = math.random(0, 49390)
v:set_cost()
end
for k, v in pairs(G.shop_booster.cards) do
v.extra_cost = math.random(0, 49390)
v:set_cost()
end
end
end
end```
Trying to make a joker work by randomly changing prices in shop every second, did I mess something up in this function?
also, the card = context.other_card isn't needed, and turn Xmult to xmult in the return statement
anyone know why my joker may be looking like this ? I thought I had dimensions right, but it looks really rough on the edges
what's the resolution
I basically did an overlay of the in game joker reference sheet that is provided and added a 1x and 2x folder
just exported the 2x at 200% in asepirite
for example I just made the canvas size fit this joker on the left and exported
finally got this working
still isn't working, is it different on older steamodded versions?
base should be 71x95 and 2x should be 142x190, for reference
yeah thats what I exported at
so weird
And you sure it's lined up perfectly? Usually when I try to make a Joker atlas I have it start with just the base image and not use a pre-existing Atlas
you know what
I am an idiot
I updated the PNG files in a separate folder and never dragged into my %appdata% mods folder LMAO
is there a context for Held in Hand stuff?
yeah, things will be a lot different on older steamodded versions
try updating
i believe held in hand effects would just use the contexts that fit what they're doing
i got what i wanted it to do, im gonna try to make a marioparty like deck thingy and right now im making card enhancements for the board spaces
I want each card (good or bad) to have a Played function or Held in hand Function
red space, if played -6 money, if held x0.5 mult
Actually something i dont know how to do is to make a Random integer on Lua
like picks a number from 1-10 and if its 3, it summons blank card such and such
is there a way to prevent a ConsumableType from getting its own collection page?
you might be able to put no_collection = true in the definition of the consumable type
I tried that, no luck though
if context.individual and context.cardarea == G.hand and not context.end_of_round then this should work for your held in hand effects
I thought about rewriting the modsCollectionTally function but idk how Lua works
maybe there's a way to do it by looping through the consumables of that type and setting their no_collection to true? idk how that would be accomplished but i know it's at least possible
there is only one consumable of that type and its no_collection is set to true, it gives me a collection tab with nothing in it
oh i see
pseudorandom_element({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, pseudoseed('random number 1-10'..G.SEED))
this will return a random number from 1 to 10, pseudorandom_element takes a list followed by a random number which in this case is generated by pseudoseed which takes a string and returns a random number between 0 and 1
newest version of steamodded, but the joker still does nothing
--- STEAMODDED HEADER
--- MOD_NAME: Test Joker
--- MOD_ID: TESTJOKER
--- MOD_AUTHOR: [UnusedParadox]
--- MOD_DESCRIPTION: test joker for testing purposes
--- PREFIX: test
----------------------------------------------
------------MOD CODE -------------------------
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'Jonkler',
loc_txt = {
name = 'xmult joker for sevens',
text = {
'Each played {C:attention}7{} gives',
'{X:mult,C:white}X#1#{} Mult'
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
config = { extra = {
Xmult = 77
}
},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.Xmult}}
end,
calculate = function(self,card,context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 7 then
return {
xmult = card.ability.xmult
}
end
end
end
}
----------------------------------------------
------------MOD CODE END----------------------
return Xmult not xmult
your card's variable is card.ability.extra.Xmult, you're returning card.ability.xmult
that too
pretty sure lowercase is the recommended way
both work, i've just seen lowercase more often
ty that fixed it
also, you might want to update your mod header for compatibility (see https://github.com/Steamodded/smods/wiki/Mod-Metadata)
tryna remove the cards, and they just hangout
like they are gone, dissapear and reappear as like ghosts
Is it possible to use SMODS.Atlas to replace the texture Jimbo uses?
you've gotta use the destroy_card context
you've got to use take_ownership to change the atlas and position on that atlas he has
SMODS.Joker:take_ownership('j_joker',
{
atlas = "your atlas key",
pos = { x = 0, y = 0 },
}, true)```
Ahhhh, thank you!
would i have like a variable = psudoseed orrr what?
it would be
variable = pseudorandom_element({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, pseudoseed('random number 1-10'..G.SEED))
the string can be whatever
ooh oki
how do I make a value in a Joker change constantly?
Wouldn't you just be able to do pseudorandom('seed', 1, 10)?
oh
wouldn't this be able to result in things like 3.329048 or whatever?
damn, you're right then lol
guess last part is how tf do i give it my enhancements
You change the center to be G.P_CENTERS.m_fotsocemu_BlueSpace
my joker doesn't trigger when cards get retriggered how do i fix this
also it doesn't function properly with blueprint
Youll need a context.blueprint and not context.blueprint for things with blueprint
Show your code.
context.blueprint means it only works if a blueprint is copying it.
ik about adding context.blueprint and like context.individual but like idk if im doing it correctly
it says that the set_enhancement is Nil
You need to remove set_enhancement
Can someone tell me how to make this xMult instead of +Mult?
I stole some code from the Misprint in the lovely dump
You need to use SMODS.has_enhancement(context.other_card, 'm_stone') instead of checking the key.
and then it'll function with retriggers?
Try changing Xmult_mod to xmult
iirc table keys are case sensitive so it's xmult_mod instead of Xmult_mod
No because when it gets retriggered the variable that was false is now true so it wouldn't work.
i mean.... what???? its like a touchable ghost card it generated lmao
i can drag iot everywhere
doesnt have a function
your card isn't emplaced to a cardarea
Also why not do (context.blueprint_card or card):juice_up()?
cause it crashed me LOL
Both of those caused it to give no mult and only show a value.
So, somehow, I got it to work
Here's the ugly as hell code to pull it off.
it now works with retriggers but it doesn't upgrade, do i have to put the card.ability.extra.Xchips = card.ability.extra.Xchips + 0.5 somewhere else?
hey i know its late but
set_ability = function(self, card, initial)
if card.config.key == "old_joker" then
card:set_eternal(true)
end
return
end,```
does this not like make a joker eternal when found in shop and packs
can someone explain the parameters for Consumable.load?
load(self, card, card_table, other_card
I'm trying to access a value from extra
it works now but its just that blueprint thats like not functioning, how do i use the context.blueprint properly
It's card.config.center.key
oh lol
Also you need to put j_modprefix_ infront.
wdym j_modprefix_ where?
or where in front
its rlly hard to find all the documentation i cant lie...
You need to put j_ and your mod prefix _ infront of the key.
j_Nevernamed_"old_joker"
like this?
You need to put it in the string.
This code worked in earlier versions of smods, but now throws attempt to index field 'other_card'.
Anyone know a fix?
okay im struggling, How can i just make the card destroy itself if its played or held without it becoming a ghost
oh, lol yeah ty
I appreciate it, I hope to one day return back here and be able to give help like yall
You need to move the return {remove = true} outside of the events
And also why do you have those events?
ah yeah
Are the names of the suit changing tarot anywhere in code? I’m trying to find them for a joker I’m making but they’re not defined in card.lua, only the suit change
uhh cause its what my jokers used and such, from the banana dissapearing stuff from somewhere else
probably cause all of the effect stuffs and i just removed all of that as Juice Up always crashes me
idk how to remove cards otherwise
What does your joker/consumable/enhancement/seal do?
Oh this is for the enhanced cards, which i want both a Played effect and Held in Hand effect. The Joker i made for it is to just generate them
So if a card of this enhancement is in hand or play destroy it?
i want it so that the cards get destroyed once your selected effect takes place, so you can never have more than 1 when the joker generares tgem
(wanting to make a deck based around this)
Well it would start with something like this ```lua
if context.destroy_card then
return {
remove = true
}
end
but how do i trigger that context?
context.destroy_card is like context.after but for destroying cards.
Ooh
Okay well my main issue now is discarding
as i would also like the cards to get destroyed whenever anything gets discarded
A card with the enhancement or any card?
the enhancement
(because i want discards to act as rerolls kinda for this (im making a mario party type board thing)
Try something like this ```lua
if context.discard and SMODS.has_enhancement(context.other_card, 'yourenhancement') then
return {
remove = true,
}
end
Is it possible to have a custom deck prevent certain boss blinds from occurring? (the same way certain challenges do)
that would make sense
its destroying all discarded cards
ill try pre_discard
didnt work either
Try the updated code.
Okay its destroying them on discard, but the last thing is i want them destroyed when other cards are also discarded
Also essentially the only thing i want the deck to have is Starts you with an Eternal Board Card (so you always get the Enhanced cards)
well i managed to do something lmao
Which joker/voucher in which mod stops anymore jokers from showing up in shop?
Okay so, you can’t grab the key of one of the suit changing consumables off of something like consumeable.key or ability.key, but it’s clearly there when you print off the table of the whole thing
Is there something simple I’m missing to just grabbing it? Would the location of it in the table change, in theory? So if I were to reference that index of the table I could grab it?
That seems a bit too good to be true
card.config.center.key is where keys are located.
Holy fuck thanks
I’ve been grappling with this problem and changing the scope of my joker all day
what is that Font
wouldn't you like to know weather boy
indeed
it's m6x11.
thanks <3
Same one used in Balatro
You'll need WinRAR or 7Zip to grab it from the game's .EXE.
(it should be in the resource folder.)
ayyy even better.
Is there a way to add perma Emult?
it finally works (i gave up and just let it take suits)
What’s your issue
no need i gave up on that
If you can generate a random suit then you can generate a random rank
hello guys, does anybody know how can i get the first card scored, not played in press_play, i need it for a boss blind. i can't use context to acces the hand played
press_play = function(self)
if not G.GAME.blind.disabled and G.play and G.play.cards then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.5,
--de pus sunet
func = function()
local destroyed_card = nil
play_sound('tarot1')
destroyed_card:juice_up(0.3, 0.4)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.5,
func = function()
G.deck:remove_card(destroyed_card)
destroyed_card:start_dissolve(nil, 1)
return true
end
}))
return true
end
}))
end
end
}
Not 100% sure of the func name but look up 'G.FUNCS.evaluate_play'
imma try this, thank you
im trying to adapt castle's code to generate ranks rather than suits
Hey guys, I'm trying to follow the guide in the starter mod message and having some issues. Code looks fine but lovely isnt detecting it and therefore it isnt showing up in the game. I have assets of the right size in 1x and 2x and i can post my script if needed but it feels like i am missing something more than not having something in my script
as in your mod isn't showing as existing when you're in game?
correct
do you have the smods.json file in your mod folder?
when i first started i forgot to add it and had the same issue
i do not, i have a main.lua only. I do have smods downloaded
Ah, which guide are you following?
you definitely want a json file
look into the mod metadata and follow the steps, it should work
is writing a json file the same as the lua one?
i also have visual studios on my computer and that opens whenever i open a json
nope, a json file is a separate file format. But most code IDEs are set up to open both lua and json files
thank you
how the fuck is it a nil value the lua file for it is right there is this game fucking blind or something
have you loaded the file in on your main at all?
let us know if you run into more problems! The set up can definitely be a bit iffy if it's your first time!
yes its literally just this one joker that's not cooperating
how does the voucher that reduces costs work?
can you show the whole code for this? I have no cue what you're trying to do here, but all I know is that I've never seen someone use filenames to refer to information on their jokers
this currently doesnt account the for discount
Thank you, used to coding in unity so getting used to this
oh i meant the joker id (which is the same as the filename)
side question, can you use visual studios for typing up the lua and json file?
it's a global that gets set and checked by the set_cost var
vsc has a lua and json extension, yes!
joker ids aren't globals
brilliant, thank you
huh
so the error is probably because i have to use a hook
how do i load in the joker ids in main then
no, you don't have to use a hook. The solution'll depend on what it actually is that you're trynna do, haha
what is the effect you're going for, and what does the actual code look like?
what im trying to do is basically castle but it reads ranks like rebate
so like every [rank] gives it +3 mult
and it changes every round
you'd never need to access the joker by id, in that case
ok so i moved the hook to the joker file itself but it still reads it as nil
you can set the global variable by hand the first time. The information on which suit or rank a card like castle is checking for shouldn't be stored on the joker itself
the file the hook is in doesn't matter to its function
yeah
also, even in that file, there's no global named jokermostwanted
im just confused at what im doing wrong since it worked when it was checking suits instead
since i copied it from the example mod castle
I'd check some other mods to see how they've set this up, because this isn't a great way to go about it
I'd check the code for that example again
i know
your implementation is actually not similar to the castle example mod
you're using globals because I think you're missing that the example is first selecting its targets by creating locals. It never uses the joker's key to access anything, for example
function SMODS.current_mod.reset_game_globals(run_start)
-- The suit changes every round, so we use reset_game_globals to choose a suit.
G.GAME.current_round.castle2_card = { suit = 'Spades' }
local valid_castle_cards = {}
for _, v in ipairs(G.playing_cards) do
if not SMODS.has_no_suit(v) then -- Abstracted enhancement check for jokers being able to give cards additional enhancements
valid_castle_cards[#valid_castle_cards + 1] = v
end
end
if valid_castle_cards[1] then
local castle_card = pseudorandom_element(valid_castle_cards, pseudoseed('2cas' .. G.GAME.round_resets.ante))
G.GAME.current_round.castle2_card.suit = castle_card.base.suit
end
end```
As you can see here, the castle_card variable, which is the same usecase as your jokermostwanted variable, isn't a joker id or anything. It's defined locally in the line above it
You're checking if you have valid target cards, but not ever doing anything with that array. You even set the target_card as a local. All you'd need to do is replace the use of jokermostwanted.base.value and jokermostwanted.base.id for target_card.base.value and target_card.base.id
Check the Castle example in the example mods
Also check how Rebate works in vanilla
trur
Sorry to interrupt, I'm seeing in the guide that there is auto complete/suggestions on what the person is typing (the artmuncher guide still). Should I be seeing that?
What program are you using
Normally these programs give autocomplete suggestions automatically
It is giving them when i type up something and type it up again later (eg every time I write "Jo" it suggests "Joker" and "joker2") but it doesnt show up if i havent used it already
that's normal
if it's not recommending the use of standard lua code, like setting up if ... then statements, though, you'll wanna install the lua extension for vsc
gotcha, so stuff specific to balatro probably wont show up but lua stuff will?
yup!
a good thing to remember is that you basically never want to access a joker's information by using the joker's key, unless you specifically know what you're doing. Most functions shouldn't care for it. The key's use is to see if a joker is owned or to create it, but it shouldn't be used to get into its ability or try and set variables
Fixed my list of bugs for Kino, time to make some more config UI 🥲
And more messing around with configs to see what it likes, and what it doesn't
Is there a way to access the last Tarot card played? (not necessarily tarot/planet)
Not sure but there must be because the fool checks for it
G.GAME.last_tarot_planet,
Is the code in the fool
yeah but thats one gets overwritten if a planet is played
at least i think
trying to find a last tarot only but might just have to make it
I think you'll have to make it
Does anyone know if you can check, how many times a non specified card is played per hand
for example a flush house have 3 "10 of hearts" and 2 "king of hearts", or a pair being 2 "4 of spades" rather than just 2 "4's"?
You can just work it out manually
Yeah makes sense
is it possible to add a friends of jimbo pack that reskins the entire suit, not just face cards?
I think paperback does that
SMODS.Deckskin has a ranks input.
oh cool thx
caould you look at somthing for me rq
SMODS.Joker{
key = "Perkeo_Template",
rarity = 1,
config = { extra = { Xmult_mod = 1,Xmult = 2} },
loc_vars = function(self,info_queue,card)
return { vars = {card.ability.extra.Xmult_mod, card.ability.extra.Xmult} }
end,
calculate = function (self,card,context)
if context.card_added then
sendDebugMessage("test", "perkeo")
end
if context.card_added and context.card.ability.consumeable and context.card.edition and not context.blueprint then
sendDebugMessage("test", "perkeo")
if context.card.edition.type == 'negative' then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult,card.ability.extra.Xmult_mod } },
colour = G.C.MULT
}
end
end
if context.joker_main then
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
Xmult_mod = card.ability.extra.Xmult
}
end
end
}```
this is supposed to scale every time a negative consumeable is added, but ot doesnt
Good schmorning chat (part 1 in case I pass out again)
looks like card_added isnt triggering
idk why
it was working before
i didnt change anything
good morning didly
hi :3
Does it send the test debug message?
Hello dilly 👋
no
Hi vic :D
Maybe ask on the SMODS server. Could be a bug
I can’t test it right now or try to diagnose the issue
You mean you can't spend every waking second working on this stuff? Ugh, and to think we spent our time talking to you...
I think I may have spent as much time on Kino as I spent on my actual job the last month, haha
Busy ice man
Also hi ice :)
i downgraded my smods and it worked
I won't lie i didn't do a lick of work yesterday I don't think
I was lazy
Aside of in the early morning anyway but early morning work doesn't count
just so i dont spend the next hour pissing myself tryna figure out whats wrong
this DOES check if the card played is a poly stone right
No
💔
How could the center be two different things?
iontkno
shouldnt you use SMODS.has_enhancement() instead?
i mean, you need to use that in combination of something to check for the card's edition
v.edition and v.edition.key == "e_foil", probably (change e_foil to e_polychrome in your case, i grabbed that from my code :p)
-# v.edition check is important
Wouldn't checking for foil just be v.edition and v.edition.foil?
dunno, i dont think theres any difference and both should work fine
since mine does :p
we can only wish
you could do v['edition?'].key
No, it's not how it works
💔
context?.other_card?.edition?.key is a shorthand for context.other_card and context.other_card.edition and context.other_card.edition.key
Is anyone ever truly awake
But that doesn’t work in Lua, right?
Why are you saying that my syntactically correct code isn’t how it works then
Because it's correct in javascript
turns out my smods was broken
Up-to-date version?
yeah
Okay time to test blindkit
If it works I can finally do some more blinds
Because drawing them pissing me off
turns out you shoul del your whole smods folder and not just blindly trust windows to rplace everthing corecctly
hecc. 💀
?
im guessing that "2" card only triggers the drawing stuff when its drawn, not when its in hand :p
so when the game loads back, nothing is saved but that card is already in hand (past the drawn phase, so it wont trigger whatever effect that is)

you could force the game to save when the card is drawn, dunno
See #💻・modding-dev message for details.
save_run() is also called... in the enhancement calculate function.



