#💻・modding-dev
1 messages · Page 144 of 1
i want it to happen every like 5 seconds, and stoping after 1 min
but it isnt a joker, its a function thats called when gros mitchel/cavendish dies
So, you need an update loop on something else
yes
Well, is there a way to use that one little joker guy who talks during the goal screen?
nothing? that doesn't pause the thread
why don't you just use event manager for this im confused
it seems like it'd work fine for this and it's very well documented
it has to be like accurate
Why wouldn't it be accurate, though?
not sure but you can always just implement the delay yourself
I think they're trying to implement the delay
would this work
"delay = 0.0"
well its immediate so no delay
why are you calling delay
that's not even a luajit function to my knowledge and love.timer.sleep() would be better anyways
...
what is this for then??
also love.timer.sleep() freezes the gsme
but since you didn't supply any events it did nothing
well yeah
that's what sleeping does
i misunderstood the purpose of delay
but again you're using it wrong and you should just implement the delay yourself
delay works but its definitly not 5 seconds
yes because of gamespeed
how would i do that
cough
but i dont have an update
you don't need an update
events are updates
called every frame until they return true
not called if they have a delay
and the delay isn't past
so just make a bland event that'll return true once a certain amount of time has passed, and of course do something after that time as well
Can I get some help with this
do you have an SMODS.Atlas{} for jokersheet?
Yes
can you send it?
I’ll get more code in a second, my laptop decided to update bc it hates me
My apologies
also i did it
how do i make a joker move to the center of the screen like a consumable
key = 'nil',
chips = 150,
mult = 10,
l_chips = 50,
l_mult = 5,
example = {
{ 'S_A', true, 'm_SCB_blank_enhance' },
{ 'S_A', true, 'm_SCB_blank_enhance' },
{ 'S_A', true, 'm_SCB_blank_enhance' },
{ 'S_A', true, 'm_SCB_blank_enhance' },
{ 'S_A', true, 'm_SCB_blank_enhance' },
},
loc_txt = {
name = 'nil',
description = { '5 Blank Cards' },
},
visible = false,
evaluate = function(parts, hand)
local blanks = {}
for i, card in ipairs(hand) do
if card.config.center_key == 'm_SCB_blank_enhance' then
blanks[#blanks+1] = card
end
end
return #blanks >= 5 and {blanks} or {}
end,
}```
It's based on the bulwark code
Sorry for the long wait, it’s still updating and now is stuck at 94%
I changed it to stone like bulwark and regardless of what i do, it crashes with that nil value
--Creates an atlas for cards to use
SMODS.Atlas {
-- Key for code to find it with
key = "JokerSheet",
-- The name of the file, for the code to pull the atlas from
path = "JokerSheet.png",
-- Width of each sprite in 1x size
px = 71,
-- Height of each sprite in 1x size
py = 95
}
Crimson, why is your key 'nil'
on purpose
it doesn't matter what i put the key to btw
That's fair
I tried with my test key word and it still breaks
My joker art seems to become Jimbo after the number 2 in the pos for a joker card
--Creates an atlas for cards to use
SMODS.Atlas {
-- Key for code to find it with
key = "JokerSheet",
-- The name of the file, for the code to pull the atlas from
path = "JokerSheet.png",
-- Width of each sprite in 1x size
px = 71,
-- Height of each sprite in 1x size
py = 95
}
--- SKIP AHEAD TO NON WORKING PART ---
SMODS.Joker {
-- How the code refers to the joker.
key = 'AIJoker',
-- loc_text is the actual name and description that show in-game for the card.
loc_txt = {
name = 'Ai Joker ',
text={
"Test"
},
config = { extra = { worth = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.extra_value } }
end,
rarity = 3,
atlas = 'JokerSheet',
pos = { x = 3, y = 0 },
-- Cost of card in shop.
cost = 10,
calculate = function(self, card, context)
return {
message = "Scammed!"
}
end
}
}
probably because there's no art there
I wish there was a way to just make the text smaller so it doesnt flood chat
0, 0 is the top left
yea
so x = 3, y = 0 is the fourth joker from the left in the top row
make sure u have art there
this is the sheet
I have no idea what is causing this
it happens to every joker above the number 2
note, the first card is marked as 0
so techincally, it doesnt work for 4 or more cards
so, just make another row and move the cards there
...are you making sure that the content of the 1x and 2x atlases match, just differing in resolution?
They match
What would happen if they didn't
gros mitchel jumpscare
Hey, you can do fun stuff with what shows up whether a player uses Pixel Art Smoothing if the atlases in 1x and 2x have different stuff in the respective areas. 😛
I wonder why is that even an option tho, why not just x2
¯_(ツ)_/¯
how would i add line breaks to my mod's description
\n i imagine
that's what i tried but nope
@hardy viper I moved it here so you can see what i mean
try \r\n
also nope
Descriptions via .json or the legacy header are automatically wrapped.
no way to manually do it?
If you want to go custom, though, use a localization entry.
I am already using that route.
A personal timewaster project that is a mod for Balatro. - TheOneGoofAli/TOGAPackBalatro
You can customize the scale and colors via SMODS.current_mod.description_loc_vars... and I did so too.
my mod, of course
is there a voucher template
how would i access the current hand's chips to multiply?
i'd like to do something similar to xmult but i dont think it exists for chips by default
hand_chips and mult are globals that hold values for currently scored chips and mult respectively.
perfect!
and then would i have to create the animation or whatever it's termed as from scratch?
hello! i have a question for balance, is this too many rounds for the effect? for context, once the card "rots", it turns into another joker
would 4 or maybe even 3 rounds still give the player a fair chance to make a good amount of gold cards?
would you happen to know how lucky cards give money
ease_dollars() probably
not in detail, no
i would assume its a pseudorand thing?
looks like it
the pseudorand i got i just couldnt find the function that gives money
i havent been able to look into the balatro source code to find much myself
ah, got it
found it under immolate actually
ohh yeah immolate makes sense
how do i get the number of joker slots i have?
G.jokers.card_limit sounds right to me
But that's out of memory, could be wrong
Maybe G.jokers.config.card_limit
ya it's in config
#1241172556849876993 has xchips
thanks!
would i then do "Xchips_mod"?
for old calc yeah
then it's just xchips
would this be valid then? message = localize { type = "variable", key = "a_xchips", vars = { card.ability.extra.x_chips } },
i know a_xmult, a_mult, and a_chips exist by default
you don't need to use message with bettercalc
then u need to use Xchips_mod
Xchip_mod, actually.
thank you all!
Oh wow I got pinged a lot while I slept lmao
It's War I need to finish off. Some of the Spectral cards I couldn't access destroy methods til now due to SMODS taking ownership and implementing its own that I need to patch into
Interesting, I'll give this a shot Actually I'm not sure how this would translate to what I want since it's going through a pack opening state instead of just an animation
with making an edition, i'd like to fully replace how each card looks. poking at the smods wiki i found this:
draw = function(self, card, layer)
end,```
but i'm not sure how to tell it which image to draw and when. poking at the balatro source was not helpful unfortunately :(
so far i know i have to switch over the suits and ranks of the appropriate card - i know how to do this - but i'm not sure how to tell it what to draw
is there any case in which multiple things are sold at once I'm not thinking of?
holy cannoli pinkmoth
i dont think so?
unless there's a mod that allows selling multiple things at once, maybe
or something that sells all jokers/consumables in inventory
alright, thank you
yea?
nothing, just surprised to see someone i follow
thank you!
what does it do in the game
oh i havent thought of an effect for it yet haha, my friend who made it though said something like
"1.2x Mult per heart played in a non-flush hand"
not sure what he meant by it, but it sounds pretty strong!
Is there a fast reload method for modding?
I think holding 'm' with debugplus installed reloads, only problem is that it'll probably start spamming m's in your vscode when the window closes lol
it's in base steamodded but yes
Oh cool, thanks
bro, its still not working
--Creates an atlas for cards to use
SMODS.Atlas {
-- Key for code to find it with
key = "JokerSheet",
-- The name of the file, for the code to pull the atlas from
path = "JokerSheet.png",
-- Width of each sprite in 1x size
px = 71,
-- Height of each sprite in 1x size
py = 95
}
SMODS.Joker {
-- How the code refers to the joker.
key = 'AIJoker',
-- loc_text is the actual name and description that show in-game for the card.
loc_txt = {
name = 'Ai Joker ',
text={
"Test"
},
config = { extra = { worth = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.extra_value } }
end,
rarity = 3,
atlas = 'JokerSheet',
pos = { x = 0, y = 1 },
-- Cost of card in shop.
cost = 10,
calculate = function(self, card, context)
return {
message = "Scammed!"
}
end
}
}
its still showing up as jimbo
format your code properly and you'd see the issue immediately
config and everything after it is inside loc_txt
omfg, i am an idiot, i do need to format it
thank you so much
Okay, two things, am i able to hide the "Crypto Jokers" tag when you hover over the joker, and how do i change only the sell price but not buy price
i believe the crypto jokers tag is just the name of ur mod
sell but not buy, not sure? it might be a joker property
i know, there is a setting to hide them in game but im sure not everyone plays with that on
yeah so?
let players choose if they want to see it
if they want it for other mods, chances are they want it for yours too
the whole point of this one joker is to look like the vanilla blueprint
its a scammer card
thank you
Ok back to the grindstone. Now that Lovely 0.7 is out, how exactly do I set an SMODs file as a target?
=[SMODS _ "src/utils.lua"]
Sick, thank ya
Huh
I replaced the version.dll last night but idk if there's anything more I need to do
is there something like hiker permanent chips but for mult?
not something i'm particularly excited to implement if it doesn't already exist in smods or something
It does not exist. I also wanted something like that and had to do that myself
okay, ive worked up this, how could I make the little tab that joker has appear
calculate = function(self, card, context)
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1]
end
end
if other_joker and other_joker ~= card and other_joker.config.center.blueprint_compat then
card.ability.blueprint_compat = 'compatible'
else
card.ability.blueprint_compat = 'incompatible'
end
return {
message = "Scammed!"
}
end
}
I'm inclined to say rare.
Have you tested what happens if you have two in your slots and they activate at the same time?
Honestly just a few patches. I created a new variable in the Card object definition and then included that variable in get_chip_mult. The rest of what I did was making it visible in the card description via localization and more patches to playing_card loc_vars
Only the first one is destroyed
But I've nerfed it a bit
i'd keep it rare and without the hand penalty
hm if you have multiple then it could be an issue yeah
oh, that's simpler than i imagined
i was thinking i'd have to mess with card calculation which sounds like a pain since bettercalc exists
speaking of mod badges, is there a way to add extra modded badges to jokers? i want to label the Jimbus Company jokers under "Sinner, Canto I, Canto II, Canto V, etc."
its only -1 while you keep it so its a nice tradeoff
i have some fun joker ideas if anyone wants them
🤔
First time I'm actually asking for balancing help
My plan for this joker is, every 10 rounds, the joker creates a Blueprint or Brainstorm, and then doubles the number of rounds that it takes before generating the next one.
Is this reasonable for a rare, or should I attach a probability? Does the answer change if the generated jokers are negative?
sounds like it stops being worth it after the first one and even then 10 rounds is a really long time
if it's not a negative, I could reason with it being uncommon
how does blueprint do the little tab thing with it being compatitble, i cant find how its done, im looking through the code
That looks good.
maybe make it "Every round, has a 1/20 chance of making a blueprint" and call it the "Designer" or "The architect"
10 rounds is 3 whole antes
could also give it a stupid hard unlock condition
You just need to make sure you either stop the tag from happening during a game state that doesn’t work, or force the game state into one that does work
I'd say uncommon and self-destructs to create a blueprint or brainstorm after 10 rounds
like "have 3 blueprints"
oh sweet jesus
Have two negative blueprints or brainstorms?
It's moreso the aftermath I'm concerned about since I don't want to return to the previous game state
maybe, makes a blue print ever ante, has a 1/3 chance of self destructing each round
ooh, I like that one
I replaced the version.dll last night, but is there anything more I've gotta do? Or am I just straight up doing this wrong lol
could try to blast through with tags, and stuff, but that also has a downside inherent
yeah you didn't put quotes around it
target = '=[SMODS _ "src/game_object.lua"]'
oh lmao
or maybe "Consumes $5 every round, after consuming $25, creates a blueprint"
tie it in to another mechanic
god if you get that as a rental that'd be brutal
I'm making jokers based on characters and this was supposed to be one based on Gadget from Rescue Rangers. Good with tech so builds things
Still worth it.
Yuri Joker: x1 multiplier for each queen played a hand (2 queens -> x2 multiplier)
At least my first attempt at making a joker taught me how to crash the game on a card trigger condition through a joker.
wait. that's really funny
Card = self in the if seems to do it.
"antimatter card." turns the leftmost joker negative at the end of the turn. Has a 1/100 chance of removing all cards from your deck each round
I'd say make it so that each queen gives +1 mult for every queen played.
So if you play two queens, each one gives +2 mult.
If you play three, each one gives +3. etc.
each hand
what is main_end in blueprint
Trying not to bug since I leave and rejoin this server all the time to not clutter stuff up 😭
this is a basic question, how to I refer to my own modded cards when doing create_card
if context.selling_self and card.ability.extra.examplevar > 24 then
local new_card = create_card('ExampleName', SMODS.Joker, nil,nil,nil,nil,'examplekey')
new_card:add_to_deck()
G.jokers:emplace(new_card)
new_card:set_edition({negative = true}, true)
I assumed it'd be this
I am so glad I thought of adding target lines to patch into
everything else in the code works, like if I just spawned a normal joker it would work fine
but I wanna spawn in another custom card
no, you should use SMODS.add_card
okay, i know im doing it wrong, i dont know what im doing wrong, i just need a bit of point in the right direction
calculate = function(self, card, context)
card.ability.blueprint_compat_ui = card.ability.blueprint_compat_ui or ''; card.ability.blueprint_compat_check = nil
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1]
end
end
if other_joker and other_joker ~= card and other_joker.config.center.blueprint_compat then
card.ability.blueprint_compat = 'compatible'
else
card.ability.blueprint_compat = 'incompatible'
end
return {
}
end
}
could you give an example
check the docs
you need to add the ui element in loc_vars
ty
so, just move the code to loc_var or just put card.ability.blueprint_compat_ui?
oh this is helpful actually
check what blueprint does internally
check what blueprint does in loc_vars
means i get to break them, which is extra nice
cna't wait for someone to 'at' patch one
im actually so blind, i honestly cant find it, blueprint just doesnt look like it has one unless if its not under card.lua
810
elseif self.ability.name == 'Blueprint' then
good job you found it
thats the loc_var?
yup
i thought there would be a loc_vars = {} near by
remember to change self to card
i am so sorry for making it so much harder than it needed to be
theres a bunch all around there
oh how fun, a bunch of random patches I made just decided to stop working despite the lines not changing at all. cool. awesome
and you can find these names in dump/ if you want to target something else
sus
This worked just fine before I updated to 0.7 
It's more than just that one too. It's seemingly random which ones broke but they broke 
i wonder how would balatro look like coded with brainfuck
i've created some custom hands but i can't figure out how to flag cards as able to score
if #hand < 5 then return false end
for i = 1, #hand - 4 do
for j = i + 1, #hand - 3 do
for k = j + 1, #hand - 2 do
for l = k + 1, #hand - 1 do
for m - l + 1, #hand do
local rank1 = hand[i]:get_id()
local rank2 = hand[j]:get_id()
local rank3 = hand[k]:get_id()
local rank4 = hand[l]:get_id()
local rank5 = hand[m]:get_id()
local suit1 = hand[i].suit
local suit2 = hand[j].suit
local suit3 = hand[k].suit
local suit4 = hand[l].suit
local suit5 = hand[m].suit
if (((suit1 == suit2) and (suit2 == suit3) and (suit3 == suit4) and (suit4 == suit5)) and (rank1 == 12 and rank2 == 12 and rank3 == 12 and rank4 == 12 and rank5 == 12)) {
return true, hand
}
end
end
end
end
end
return false
end,```
this is what i have for the evaluate (this one is intended to be a flush five, but for queens only). it detects the hand properly but none of the cards show as scoreable
y'know i've thought about making a c compiler to brainfuck
try returning just hand
and i am trying to make my own assembly language lmao
and on the same track, i've added a planet card for it:
set = "Planet",
name = "embertwin"
key = "Ember Twin",
effect = "Hand Upgrade",
pos = { x = 1, y = 1 },
atlas = "cards",
config = { hand_type = "GreaterPolycule" },
cost = 3,
generate_ui = 0,
loc_txt = {
name = "Ember Twin"
}
}```
but when i try to unlock this card to view it in mod additions, the game crashes with
`functions/common_events.lua:2915: attempt to index a nil value`
looking in the game's source reveals that common_events has no such line 2915 so i am pretty lost
you should return {hand}
ooh ok
check the lovely dump
also hand[x].suit doesn't exist, it's hand[x].base.suit
oh noted
so sorry to bother again, but it should look like
loc_vars = function(self, info_queue, card)
return { vars = {card.ability.blueprint_compat_ui}}
also should return an empty table instead of false
also this won't work for wild cards
copy what's there and replace self with card
i assume there is
use SMODS.has_any_suit
you define the main_end i sent earlier (or some variation of it) and add main_end = main_end to the return table
also you should check for rankless cards
lemme verify cards score first then ill set to checking wild n stuff
SMODS.has_no_rank
how would i create a card with random enhancement, and potential for random editions and seals
the hand type needs to have your mod prefix here
check what incantation/familiar/grim does
probably got hit by the patch order changes
currently i got this but i also dont know where to go from here
(copied from certificate)
you'll unfortunately just need to play around with it until you get something that works
use SMODS.poll_enhancement
I just tried changing the priority on better_calc.toml back to -10 and it just worked? no failed patches
What exactly got changed?
ahhhh
i was wondering about that
thank you again!
i presume that gives a random enhancement from all types?
underscore
perfect
would i call this as a function - SMODS.has_any_suit(card) or is it a parameter card.has_any_suit
is this a Seattle based mod perchance?
the greater polycule name was a reference yes
function
ty
Wait, is this a queen-specific Flush Five?
i feel so horrible annoying yall but i honestly am lost, i know i keep saying this but thank yall for yalls help. im gonna send the code in a message so i dont keep flooding chat
Mostly
yea same..
I am probably over looking something small
what's the goal of the joker exactly?
pretends to be blueprint, fakes you into buying it, announces the scam when you try to score
thats really funny
i just need the little compatible tab to show up
you're gonna hate me, Flote, but https://discord.com/channels/1116389027176787968/1288504280239575061 exists and might be something you need to take into account
something like this?
sobbing
card:set_ability(SMODS.poll_enhancement())
mmm
SMODS methods will never be : accessed
got it
which part is the scammed part, i think i removed what ur talking about
alright now how do i have it set an edition and a seal
game crashes when i hover over it
like this for editions?
I'm really confused on how that would even happen, as I hardly use regex search in my lovely.toml and I'm positive I set my priority to go off after Steamodded
prolly cus u only set compatible/incompatible on calculate
oh, how do i make it so it checks when a card is moved
so, just replace calculate with update?
yeah
uh oh
crashed when it was supposed to create a card
except for SMODS:load_mod_config() actually
thats how it is for the normal blueprint
lemme grab the card description real quick if that helps
ig, but that's not exactly what i meant
i meant you'll never do :SMODS
if you want editions and seals to have that chance, you shouldn't pull from the enhanced pool
cus you'll get editions and seals there too
oh wait, wrong pull
when i changed it, it causes a crash
is there not a poll_edition?
there is
ur still calling poll_enhancement tho
its under the edition section
I need to make a SMODS.poll_edition wrapper
why
What's the chance the card can be negative? If it's any higher than one-in-a-million it'd be great for fishing for better Baron builds.
same chance as any negative joker to my knowledge
because filling functions with nil is a pain
how do i fix the UI error
Now just have to survive long enough to get a negative, strength it up to king, steel it, and get red seal on it.
And duplicate it a lot. So, stars still have to align.
First time working on a joker, formatting look good on this one?
check blueprint more
the x at the bottom is lowercase
also descriptions generally don't end with a period
and scaling xmult jokers usually start at X1
X0 implies that it turns your mult to 0 🙂
Looks fine. Looks like it'll scale fast though.
Oh, you start and x0.
i dont like how this is in card.lua
same crash as before, any thoughts?
Lowercase x looks out of place.
Look better?
(what guy is trying to do)
Yeah, there.
It looks fine, but super strong. Probably want it to be a X0.01 or even smaller increase or something.
As for speed, what sounds like it'd be close to vanilla balance? something like 0.01? Maybe like half the speed of constellation?
Hello! I need some help! Working on a mod and I'm a beginner 
I'm trying to figure out how to create a new special color which switch between 2 colors like there is in the vanilla game (in the GIF). I would like to use this color for some Joker text.
I know how to create a simple color - I did like this (pinata is the name of the Joker and surprise the name of the color) :
local hooklc = loc_colour
function loc_colour(_c, _default)
if not G.ARGS.LOC_COLOURS then
hooklc()
end
G.ARGS.LOC_COLOURS.surprise = HEX("f0a8cc")
if not G.ARGS.LOC_COLOURS["pinata_color"] then
G.ARGS.LOC_COLOURS["pinata_color"] = {1, 0, 0}
end
return hooklc(_c, _default)
end
Is there an easy way to create what I want? I'm looking into Balatro code but I can't find more informations. I know I can use {C:dark_edition} text {} (like in the GIF) but I want the colors to switch from red to pink (so I assume I need to create something new).
Thanks for your time, if you can help me! 
yea, they look the same spare the self changed to card
Probably playtest it with .01. Go for a build with a lot of retriggers.
i have the same problem :(
if i'd like to have a spectral card have a chance to trigger an effect, how would i do that in a way that allows the die joker (oops all sixes?) to work?
Does something look better as orange or green? I assumed "attention" cause how sock depicts "face"
looking at the base game src i found this G.GAME.probabilities.normal/self.ability.extra.odds but im not quite sure how this behaves
yea, i have them exactly the same, unless the error isnt the text but is in the loc_var instead
is there something wrong with this line of code?
i am so confused, my code looks exactly the same
idk then
thank you for the help atleast
at the very least, im presuming the problem is this line
the game keeps crashing due to center being a nil value in some function in card.lua
specifically this one
at self:set_sprites
mmmm
ist crashing in set_ability
so its crashing at this line instead
so fucking real
wait ok so how tf do i set up enhancements
cus there's no set_enhancements and set_ability seems to be weird
how do i set_ability right
wrap the poll_enhancement in G.P_CENTERS[--here--]
thank you
Ememel, i need ur magic
like this?
👍
what do you need?
same crash as before
it comes out ERROR UI and I cant figure out why
having to do with set ability being weird
oh I can't read, that's not how you use poll enhancement at all
great
it takes a table of args
ref-table should be card.ability I think
ye
so like this:
that looks better, yeah
yeah it worked
there might be another bug with other parts but it didnt crash in the same spot
any ideas for a ERROR UI
did you try this
it might require a key, I dont remember fully
omg how did i overlook that so many times
not sure where this code is run but if it's a smdos calc self:juice_up() should be card:juice_up()
good point
it looks like it's struggling with your pseudorandom calls
mhm?
whats the problem with them?
I dunno, but that's what on the line in your crash report
try throwing a key in your poll functions
well i set them to all have keys and it still crashed at the same point
is there a way to determine the type of a game object?
or
can you send the full crash screen instead?
Like at all or if it's a specific one?
you don't need type_key
ok
ideally both
I mean you shouldn't need a key
I just don't see where the crash would originate from
You can do Object:is(ObjectType) for a specific one
iirc
e.g.
im trying something and if it doesnt work ill post the full crash log
ok yeah one sec
should i do this or be using pseudorandom
local randomIndex = math.random(1, #G.jokers.cards)
local other_joker = G.jokers.cards[randomIndex]
i believe is psuedorandom is better
pseudorandom with a seed is deterministic
easier to test, validate etc
also means seeded runs are the same
so if i use pseudorandom, what card is picked is based on seed?
based on the seed, how many times the function has been called on the seed
okay, ill use pseudorandom
so if I did 3x psuedorandom, I might get something like 0.1, 0.4,0.7
if a start a new run on the same seed, that order will always be the same
determinism, even though not random, is super valuable
what's that mean?
if i wanted to grab a random joker, how would i use pseudorandom to get it, as it only makes 0 - 1, yes?
it doesn't take a table, it has individual arguments
multiply it by #G.jokers.cards
ohh
thats the amount of jokers you have
wouldn't you just use pseudorandom_element?
calculate = function(self, card, context)
if
-- Something triggers
context.individual and context.cardarea == G.play and
not context.other_card.debuff and
not context.blueprint
then
-- Increase XMULT
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
return {
-- Notify upgrade?
message = localize('k_upgrade_ex'),
colour = G.C.CHIPS,
card = card
}
end
if context.joker_main then
-- Joker Scores
return {
-- Give Score
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xmult } },
colour = G.C.MULT,
Xmult_mod = card.ability.extra.xmult
}
end
end
Why is this not giving me an upgrade popup when it upgrades?
Relevant part being:
then
-- Increase XMULT
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
return {
-- Notify upgrade?
message = localize('k_upgrade_ex'),
colour = G.C.CHIPS,
card = card
}
end
Supposed to be functioning like castle?
But not doing castle's thing for this trigger.
message_card = card
Also, while I'm here, is there a dedicated ref table?
can also reduce your joker_main return to just
return {
xmult = card.ability.extra.xmult
}```
Do that still do the popup?
yes
then
-- Increase XMULT
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
return {
-- Notify upgrade?
message = localize('k_upgrade_ex'),
colour = G.C.MULT,
message_card = card
}
end
So this should work?
should do yeah
card idea: Estrogen Pill, turns all face cards into queens when scored
what would cause the crash attempt to index local 'card' (a number value), in relation to src/utils.lua:829 with adding an enhancement? 829 is if card.config.center.key ~= "c_base" and not extra_only then but im not sure what this is doing
my config is as so:
extra = {
chips = 20,
x_chips = 2,
mult = 10,
x_mult = 1.5,
bigbucks = 10,
count = 2
}
},```
they are intentionally not applied in the base config value
how are you adding the enhancement?
via a tarot card
I mean the code...
oh sorry
set = "Tarot",
name = "Spironolactone",
key = "spironolactone",
effect = "Enhance",
order = 23,
pos = { x = 1, y = 0 },
config = {
mod_conv = "TWT_luckshit",
max_highlighted = 2
},
cost = 3,
atlas = "cards",
loc_txt = {
name = "Spironolactone",
text = { "Enhances {C:attention}2{} selected cards to {C:attention}Luckshit Cards{}" },
},
can_use = function(self, card)
return #G.hand.highlighted < 3 and #G.hand.highlighted > 0
end,
can_bulk_use = true,
use = function(self, card, area, copier)
for i = 1, #G.hand.highlighted do --flips cards
local percent = 1.15 - (i-0.999)/(#G.hand.highlighted-0.998)*0.3
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() G.hand.highlighted[i]:flip();play_sound('card1', percent);G.hand.highlighted[i]:juice_up(0.3, 0.3);return true end }))
end
delay(0.2)
for i = 1, #G.hand.highlighted do --enhances cards
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function() G.hand.highlighted[i]:set_ability(G.P_CENTERS[card.ability.consumeable.mod_conv]);return true end }))
end
for i = 1, #G.hand.highlighted do --unflips cards
local percent = 0.85 + (i-0.999)/(#G.hand.highlighted-0.998)*0.3
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() G.hand.highlighted[i]:flip();play_sound('tarot2', percent, 0.6);G.hand.highlighted[i]:juice_up(0.3, 0.3);return true end }))
end
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2,func = function() G.hand:unhighlight_all(); return true end })) --unselects cards
delay(0.5)
end
}```
this is my tarot card code, mostly ripped from the balatro source
i have similar code set up to convert cards to queens which is working
but this is not and im not quite sure why
Joker idea: Color Coded, adds blue seal to clubs, purple seal to spades, red seal to hearts, and gold seal to diamonds when discarded, disables cards with seals that don't match
This change did not provide me with that crisp upgrade pop up
smods version?
My group plays a bunch of mods on old calc, the intention was to add to the modpack
because it's old and won't be supported
there's a specific calculate functions doc that is entirely better calc
i'm confused then
but if people want to stay on an old build, they can feel free
this is new calc?
this is new calc
yeah that's where i got it
calculate = function(self, card, context, effect)
if on an SMODS.Enhancement, is this old calc or new? i am not sure at this point
that's old calc
new calc uses the calculate functions page on every object
no more jank depending on what you're working on
im so confused
no more having to check which variation of xmult, x_mult, x_mult_mod etc you need
im trying to follow the documentation but apparently its not consistent in itself???
i thought i was done with the scam card, but no, now it crashes on the catalogue
the other pages haven't been updated yet
but if you are calculating on new calc, the above page is all you need
crash log
this is incredibly annoying im gonna be real
it only crashes when you view it in the catalog, i assume because its trying to grab the joker next to it, how do i make it not do that
code if needed ^
what exactly do i define on my enhancement then
this
how can i check if its in a game, because it tries to check next joker while its in the cataloug
check the cardarea i think
do you need to use an update function?
id prefer if i can do it only when a card is moved
this will be called every frame, you can just call it in loc_vars so it runs when you hover
so, is there just a way to do it only when a card is moved
crashes
it's UI, you only need to do it when you hover the card
so just, replace it with what, or just move that part of the code to loc_var
move it to loc_vars, yeah
and also put a check for G.jokers in there
or the area check you already have
you might get a main_end doesn't exist crash there
okay, it works but now instead of red and green, its just grey
and i think its safe to say, its not normally gray
you need to check if is exists
move the main_end = ... after you set the compat_ui maybe?
if context.main_scoring and context.cardarea == G.play then
print(card.ability.extra.x_chips)
print("luckshit")
local randcount = {}
math.randomseed("luckshit")
for i = 1, count do
local rand = math.random(1, 6)
randcount[i] = rand
if #rand == 2 then
while randcount[0] == rand do
rand = math.random(1, 6)
end
end
--this makes sure that the second effect cannot be the same as the first.
--however if the card is glitched by cryptid or something (making count higher), effects can repeat
if rand == 1 then
return {
chips = card.ability.extra.chips,
message = localize { type = "variable", key = "a_chips", vars = { card.ability.extra.chips } },
}
elseif rand == 2 then
return {
Xxhips = card.ability.extra.x_chips,
message = localize { type = "variable", key = "a_xchips", vars = { card.ability.extra.x_chips } },
--animation incorrect probably
}
elseif rand == 3 then
return {
mult = card.ability.extra.mult,
message = localize { type = "variable", key = "a_mult", vars = { card.ability.extra.mult } },
}
elseif rand == 4 then
return {
xmult = card.ability.extra.x_mult,
message = localize { type = "variable", key = "a_xmult", vars = { card.ability.extra.x_mult } },
}
elseif rand == 5 then
return {
dollars = card.ability.extra.bigbucks
message = localize { type = "variable", key = "p_dollars", vars = { card.ability.extra.bigbucks } },
}
elseif rand == 6 then
card.any_suit = true
return {
message = "Wild!"
}
end
end
end
end```
would this then be correct? or no
sry for wall lol
i dont know how to force discord to use message.txt
you don't need any of the message = ... in the scoring returns, but it should work yeah
I can't see anything obviously wrong
does newcalc auto do that?
yup
if you manually return I think it stacks, you can override using a couple of different ways
what im doing should be fine for option 6 since it otherwise does nothing
yes option 6 is fine
thankfully no crash but no color
I think your check to avoid duplicate effects should be while randcount[1] == rand do btw
i dont want it to index out of bounds
wait actually this won't get more than one effect
why not
because you return in the first pass through
you can replace return with SMODS.calculate_effect({table from return}, card)
that works too
or add them to a local table and return at the end
yea that was my idea
||SMODS.eval_this||
what does table from return do?
or what would i substitute
substitute the table you were returning
then
-- Increase XMULT
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
return {
-- Notify upgrade?
message = localize('k_upgrade_ex'),
colour = G.C.MULT,
message_card = card
}
end
So updating changed this to function, but it's currently putting the upgrade on the playing card, but I want it on the joker. What am I missing?
I think the blueprint_compat check is checking your atually blueprint like card rather than the copied one
i am confused sorry do you have an example snippet?
like SMODS.calculate_effect({chips = 10}, card)
to explain it, the table that you normally return get's plugged into this function later on, so you can do it manually too
when this gets called on a center object it doesn't work
I don't belive vanilla centers are objects
I would personally justy only allow one type of data
i have an entry that is the standard pack pool
if i wish to create a boss blind that does things to played cards (convert suit, change rank, etc) what context would i check for?
boss blinds use different functions to apply their effects
ooh ok lemme look at the docs then
https://github.com/Steamodded/smods/wiki/SMODS.Blind they should be covered here
modify_hand(self, cards, poker_hands, text, mult, hand_chips) -> number, number, bool
so i'd want to do this, return the base mult, chips, etc etc but mess with the cards then
thank you again!
That’s pretty funny, but how do I fix this
you can throw the other card in the reftable of it
if you need some examples, take a look at ortalab
I've done ~30 blinds in there
Where on the wiki is the reference to message stuff. All I can find is "If you return message_card" but that doesn't really help me figure out what I can flag as the message target.
can i just access cards as an array of the played cards?
will check out ty!
yes
hey eremel
trying to reference your ortalab code for a deck and its not working for some reason, not sure why
first off,
config = { hand_size = -1 },
this doesnt work
dunno why
G.E_MANAGER:add_event(Event({
func = function()
for k, v in pairs(G.GAME.probabilities) do
G.GAME.probabilities[k] = v * 2
end
return true
end
}))
end```
and this doesnt work either
did something change or am i just doing something wrong? seems liek this is the way to change hand_size and change other values on starting a run
those look correct to me
yeah but for some reason neither result is happening in game
huh
are you definitely editing the correct deck?
yeah
and saved the fikle
oh wait
i had the name value unchanged from a copy patse of a previous deck
but i didnt think that would change it, lemme see if it did
not the id, just this name value
huh. that was it
didnt realize the names were that important damn
sorry bout that
https://github.com/GauntletGames-2086/Ortalab-DEMO
this? or somewhere else
i think voucher calc is about ready

ooooh ok thank you!
unrelated, how would i display probabilty properly? like how cavendish is 1 in 1000 chance, wheel of fortune is 1 in 4
i looked at the examples moddedvanilla which has reimplemented gros michel and cavendish
"{C:mult}+#1#{} Mult",
"{C:green}#2# in #3#{} chance this",
"card is destroyed",
"at end of round"
}
},
config = { extra = { mult = 15, odds = 6 } },```
these do not behave how i expect though, unless im misinterpreting what `#n#` does?
because #1# would be config.extra.mult, but then #2# is config.extra.odds
though for this to function, this has to be #3#
the #1# refers to the values you return in loc_vars
nvm now it's ready. i didn't realize i was eating a patch target by changing observatory to context.other_consumeable
(yes that means you get repeated mult if you somehow find yourself in a situation where you redeemed two observatories)
why? because that means it's compatible with planets that have their own calculation that's independent of observatory
I think that's a logicaly expectation of having multiple observatories
retrigger observatory
it really is, but it's never worked this way 🤪
i'm trying to create a custom pool like cryptid's meme pack but modded cards aren't being added?
SMODS.current_mod.clubs = {
SMODS.Centers.j_pencil_lass,
SMODS.Centers.j_pencil_eclipse,
SMODS.Centers.j_pencil_club,
}
if SMODS.Mods.YART and SMODS.Mods.YART.can_load then
table.insert(SMODS.current_mod.clubs, SMODS.Centers.c_yart_rmoon)
end
SMODS.ObjectType({
key = "clubs_pack",
default = "j_gluttenous_joker",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
-- insert base game meme jokers
self:inject_card(G.P_CENTERS.j_gluttenous_joker)
self:inject_card(G.P_CENTERS.j_blackboard)
self:inject_card(G.P_CENTERS.j_onyx_agate)
self:inject_card(G.P_CENTERS.j_seeing_double)
self:inject_card(G.P_CENTERS.c_moon)
for i, v in ipairs(SMODS.Mods.StrangePencil.clubs) do
self.cards[v] = true
end
end
})
how would i display the colors for planet cards?
looking at cryptid's src it returns an array colours but im not sure how to apply this
like the (lvl.1)
color that applies to lvl.1
or 2, 3, etc etc
you should set pools on the objects you're trying to add instead?
though i think this should work if you've defined the jokers you're trying to add first
can i get a quick review on this?
no i'm saying i want a review on the pr
For doing a lovely patch, do you need code before or after or can you do just the code for the patch?
local levelone = G.GAME.hands["TWT_Polycule"].level or 1
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
if levelone == 1 then
planetcolourone = G.C.UI.TEXT_DARK
end
return {
vars = {
localize("TWT_Polycule"),
G.GAME.hands["TWT_Polycule"].level,
G.GAME.hands["TWT_Polycule"].l_mult,
G.GAME.hands["TWT_Polycule"].l_chips,
colours = { planetcolourone },
},
}
end```
are there any mistakes im making here? game crashes with `attempt to index field 'TWT_Polycule' (a nil value)` at `local levelone = G.GAME.hands["TWT_Polycule"].level or 1`
leveling code is ripped from cryptid so it might not work for my case
but im not quite sure how to do it
can target = "back.lua" pattern = "({localize{type = 'name_text', key = 'v_tarot_merchant', set = 'Voucher'}, localize{type = 'name_text', key = 'v_planet_merchant', set = 'Voucher'}," position = 'at' payload = "{localize{type = 'name_text', key = 'v_tarot_merchant', set = 'Voucher'}, localize{type = 'name_text', key = 'v_planet_merchant', set = 'Voucher'}, localize{type = 'name_text', key = 'v_overstock_norm', set = 'Voucher'}}" be the whole code?
That shouldn’t be saved as overstock norm
I don’t think
Irrelevant for what I need
or do i not need to define custom leveling code at all?
im trying to create a new object type for a mod @proper stratus is making but i dont knwo what im doing wrong can someone help
they get applied kinda like seals
@ me when responding
hey i tried making a modded challenge and it's not showing up in game
Looks good from a look through the code, I'll just do a quick test
it crashes on decks that apply vouchers
just got back to this, instead of ref_table = card, would it be ref_table = other_joker,
mhmm
i thought i accounted for that, guess i didn't test it?
oh I see, the area doesn't fucking exist yet
it tries to emplace before the area exists
curse my one handed typing
hello modders
where would one download mods
and how
im a bit stupid might need a little tutorial
There are example mods in the steamodded files
is there a keybind for a quick restart without having to close the game
hold M
is steamodded an application
steamodded is the modloader
omg, that is so helpful, thank you
i found it on github
--- MOD_NAME: QOL
--- MOD_ID: QOL
--- PREFIX: QOL
--- MOD_AUTHOR: [QOl]
--- MOD_DESCRIPTION: QOL
----------------------------------------------
------------MOD CODE -------------------------
target = "back.lua"
pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'},"
position = 'at'
payload = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'},
localize{type = 'name_text', key = 'v_observatory', set = 'Voucher'}," ``` says unfinished string
normal
read the installation manual, there's everything you need
for both lovely and steamodded
okay random person on discord ive never talked to
(im disabling it)
something ate my return
How do i fix this?
(it's open source)
(i know im joke)
that's fine! I'm not 100% on this, I've not played around with blueprint like effects yet, though it looks like you set main_end twice here, and the second time isn't udpated
so i found lovely but where would one find steamodded
googoo
wow how did i miss that
man i need a youtube video
i do NOT know what this means
i suggest moving to #⚙・modding-general
hor
granted, i am very new to this server but i think this channel is generally mod dev?
🥴 this works now but it does a weird animation when buying vouchers from the shop
ok i dont know at this point
i guess i do the event only when the area doesn't exist yet?
yeah I guess so
im gonna eat dinner and come back to this
local levelone = G.GAME.hands["TWT_Polycule"].level or 1 <----
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
if levelone == 1 then
planetcolourone = G.C.UI.TEXT_DARK
end
return {
vars = {
"Polycule",
--localize("TWT_Polycule"),
G.GAME.hands["TWT_Polycule"].level,
G.GAME.hands["TWT_Polycule"].l_mult,
G.GAME.hands["TWT_Polycule"].l_chips,
colours = { planetcolourone },
},
}
end```
why would this line break saying that it attempted to index a nil value
its a defined hand and ive added the prefix
am i accessing the wrong dict?
are deck jokers/consumables delayed in events?
might be easier to just wrap the voucher application in a similar event
there are also 2 identical blocks in apply_to_run on decsk for vouchers 
oh wai tno I cant read
there's voucher and vouchers
thunk pls
consumeable
I've tried some things and it still isn't working
thats not how a toml file should be structured
pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'},"
is the comma right before the end intentional?
I'm pretty sure they don't use headers anymore
https://github.com/Steamodded/smods/wiki/Mod-Metadata I think this is the replacement for that
how do i dictionary
I’m just throwing shit at the wall and seeing what sticks tbh
I just want easier perkeobservatory
And other stuff
Once I get this working then everything else should be the same and I just copy that
alright, seems to work properly now. anything else you noticed?
yeah that's just not valid lua
im fucking stupid
i have to lowercase it
btw why is this a reverse array
Real
TWT_polycule
printed out the list of all valid hands
and theres
Full House
Flush
TWT_polycule
and my dumbass put TWT_Polyclue
The amount of times I’ve misspelled variables is
assive
that's nothing compared to editing lovely dumps
yeah
Just the jank message placement
"why isnt the mult applying?"
typed "xxult" instead of "xmult"
As I’ve said before, my mod’s first word was timmeh
It seems to spin randomly too, is that some discard card area jank?
How would I code a shortcut-like joker that allows you to play an Ace straight that wraps around? eg JQKA2
I just need to know why my son ```--- STEAMODDED HEADER
--- MOD_NAME: QOL
--- MOD_ID: QOL
--- PREFIX: QOL
--- MOD_AUTHOR: [QOl]
--- MOD_DESCRIPTION: QOL
------------MOD CODE -------------------------
target = "back.lua"
pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, -1}"
position = 'at'
payload = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'},
localize{type = 'name_text', key = 'v_observatory', set = 'Voucher'}, -1}"``` is breaking
That’s technically my son’s genetic code but my point still stands
I guess the discard calculation has the same issue too then? Probably should align the discard area in that case
i dont know the smart way to do it, but i'd just hardcode every possible case lol
{
"id": "qol",
"name": "QOL",
"display_name": "QOL",
"author": ["placeholder"],
"description": "Placeholder",
"prefix": "qol",
"main_file": "back.lua",
"priority": 0,
"badge_colour": "30758D",
"version": "0.0.1",
"dependencies": [],
}
I'd try something like that
how do i apply colors to text? my planet card returns colors in an array colours but im not sure how to apply them with {C:value}
I'll do it later then lol
It says string near line 13 is incomplete so I don’t think it’s that
tbh idk why it's near the blind chip, i'm not sure discard calculation even did that
Any idea
Thunk wtf is this for
discard_pieceofshit is my guess
I just want my son off the zaza
idk
I think we can just set these to be fixed values, right?
My son is tweaking off that “unfinished string near line 13”
You’ve set your main lua file out like a lovely patch file?
Get rid of the comma at the end of the file
JSON parsing doesn't like trailing commas
Hello someone know how can put delay cause i want to give 2 gold wait 1 second the give 1 another gold ect...
how can i create delay for that
That is all I want this mod to do
Ok whatever the patch order changes were made me so confused cuz I have no idea why this isn't working anymore
Is the dark red and underlined the stuff that is wrong?
There are some unintended side effects from it but meth is working on a new version, you can grab it in the smods thread to test
Thanks for the tip. I said it last night and I'll say it again, you're a saint man
pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, -1}"
position = 'at'
payload = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, localize{type = 'name_text', key = 'v_observatory', set = 'Voucher'} -1}"``` isn't crashing but isn't working
okay this doesn't at all work how i thought it would
This seems to be working much better. Once again, thank ya
Nope
ok
first make the giving gold in an event
-- give gold
return true end })) ```
My son [patches.regex] target = "back.lua" pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, -1}" position = 'at' payload = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, localize{type = 'name_text', key = 'v_observatory', set = 'Voucher'} -1}" has had his entire genetic structure redone multiple times
Please doc, can you do anything to help him be able to walk again?
them add a global variable right before the event
PREFIXstart = love.timer.getTime()
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 2.0*G.SETTINGS.GAMESPEED,
func = function()
ease_dollars(math.random(1,3))
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 10.0*G.SETTINGS.GAMESPEED,
func = function()
ease_dollars(math.random(2,3))
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 10.0*G.SETTINGS.GAMESPEED,
func = function()
ease_dollars(math.random(1,2))
return true
end,
})) ````
i made that actually but all gold give at the same time, and i want delay that
then add this function,
local waitTill = PREFIXstart + time
G.E_MANAGER:add_event(Event({trigger = 'after',func = function()
return (love.timer.getTime() > (waitTill))
end }))
return true
end```
and put a wait() inbetween the events, and it should work
the time will be in seconds ?
I am wondering what’s next for my son
yes
keep me updated, im like 70% sure this works
hey guys, any good resources to get into modding Balatro? I'd like to try my hand at it.
i have been stuck for so long only to realize lua indexes start at
fucking 1
not 0
Fuck around and find out is what I’m doing
Thanks i'm gonna say to u :)
thanks that's what I was looking for 🙂
i am confused as to why these are off the screen
Do I have to commit sci-fi crimes to get my son’s dna fixed?
All fine, it's definitely not a problem 
i do still have the trick of just aligning them to something else
them being the messages
I’ve run out of Chevelle references that don’t make me sound too much like a maniac
I'm not fully sure where though
Thoughts on this?
fire
target = "back.lua"
pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, -1}"
position = 'at'
payload = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, localize{type = 'name_text', key = 'v_observatory', set = 'Voucher'} -1}"```
also, Xmult should be in a {X:mult,C:white}{}
Oh hey it’s the jimbo records guy
but its really an aesthetic choice
it doesnt work
How would that work with oa6
its gives gold at the same time
Is it just immune?
Can anyone help?
I'm trying to make a joker where when the first discard is a two pair it upgrades Xmult and destroys the cards but remove = true isn't working for destroying the cards
What do the aces do?
They do the same effect as death on a random card in hand when played
essentially, you get to keep it in your hand
I don't understand what this means or how to apply it.
maybe i move it higher up and/or add some distinction between discard and voucher
Guh
I am genuinely tweaking rn
is it an invalid JSON?
I'm not even trying to access that tho???
but you need it...
Here's my json:
"id": "Balatro++",
"name": "Balatro++",
"author": [
"MrFletch"
],
"description": "A custom version of Balatro with a few extra features.",
"prefix": "btp",
"main_file": "btpmain.lua",
"priority": 0,
"badge_colour": "#378065",
"badge_text_colour": "FFFFFF",
"display_name": "Balatro++",
"version": "0.0.1",
"dependencies": [
"Steamodded (>=1.0.0~ALPHA-1217c)",
"Lovely (>=0.6)"
],
"conflicts": [],
"provides": [],
"dump_loc": false
}```
Or just ```lua
G.E_MANAGER:add_event({
timer = "REAL", -- !!!
trigger = "after",
delay = 5, -- In real seconds
func = function() return true end
})
target = "back.lua"
pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, -1}"
position = 'at'
payload = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, localize{type = 'name_text', key = 'v_observatory', set = 'Voucher'} -1},"``` what the fuck am i doing wrongg
The json it's mad about is not the mod metadata, it's a settings.json file for the VSC environment (which lovely should even need to look at???????????)
it reads every json
This looks good
set your settings.json on the dir above
tried this just now, maybe it's a little too much
Why not just hardcode some jsons or not check nested folders? Why it's checks every json in mod?
I'd like different positionings for discard and voucher though
maybe this for discard and another same distance for voucher?
Yeah I think that’ll do for now, might have a play around with it tomorrow
that puts it about here
I feel myself getting mad about needing help so I’m going to take a break
also yes it juices the deck
does gros mitchel and other related jokers go extinct when you lose?
you should probably use a pattern patch instead of regex
Why not try encapsuling your code in triple quotes ''' then remove the trailing comma at the end?
target = "back.lua"
pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, -1}"
position = 'at'
payload = '''localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, localize{type = 'name_text', key = 'v_observatory', set = 'Voucher'} -1}'''```
the comma will make a difference but the triple quotes will not
is pseudorandom a function i can call in my mod?
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'joker2',
loc_txt = {
name = 'Nice',
text = {
'Retrigger each',
'played {C:attention}6{} and {C:attention}9{}',
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
rarity = 2,
cost = 6,
blueprint_compat = true,
calculate = function(self,card,context)
if context.individul and (
context.other_card:get_id() == 6 or
context.other_card:get_id() == 9) then
return{
message = localize('k_again_ex'),
repetitions = self.ability.extra,
card = card
}
end
end,
config = { extra = { repetitions = 1 } },
}
I still can't get this thing to retrigger. Ali gave me the line
self.ability.extra > card.ability.extra.repetitions
but I really don't know how to apply that.
Honestly, I just use it for speech mark/apostrophe sanity
yes
general rule of thumb, don't use self in calculate code
use card instead i believe?
it refers to the card prototype ("center") and not the card itself
Mmmmmmmm good to know.
anyone that can help?
Still not working
I guess the question I'm trying to ask here is why is a .json that has nothing to do with my mod, but my IDE, preventing this patch?
hm i guess my thing is mergeable now with the messages aligned and all
Describe what you're trying to do?
what's the loc you're trying to patch?
it looks like the thing your patching is just setting values in a local variables array
Add observatory to nebula deck
but whatever is reading those local variables might not be looking at the extra index added
what you did doesn't do that
What is it doing?
and woudl [patches.pattern] target = "back.lua" pattern = "localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, -1}" position = 'after' payload = '''localize{type = 'name_text', key = 'v_observatory', set = 'Voucher'} -1}''' work any better?
you're looking for this line in game.lua
b_nebula= {name = "Nebula Deck", stake = 1, unlocked = false,order = 7, pos = {x=3,y=0}, set = "Back", config = {voucher = 'v_telescope', consumable_slot = -1}, unlock_condition = {type = 'win_deck', deck = 'b_blue'}},
...```
