#💻・modding-dev
1 messages · Page 586 of 1
Joker #2
You are missing an end
how would I save some values for a specific run
I need to save those between runs, and rn I only found the way to reset them when doing a new run
(I need to do it manually cuz they have to be outside of any configs to work)
if you dont need them to save to the profile, just store them in a global table for your mod
otherwise, save the values in G.PROFILES[G.SETTINGS.profile] iirc
why does the Xmult work but Xchips dont, does anyone know?
:3 it's working now
It's xchips
instead of X_chips?
No, instead of Xchips
Also it's card.ability.seal not self.config
self.config works tho?
whats the difference between the two
card.ability.seal can be changed and is saved and is better,
wdym by saved?
It will save the values.
stuff in config are prototypes for card construction
while stuff in ability can be changed during a run
<@&1133519078540185692>
i've added 3 lines before my stake, changing what eternal, perishable and rental look like on consumables
wait
okay actually lemme try something before i ask for help
okay nevermind, that won't work — i've patched card.lua to add functionality to these
however, the game crashes as atlas is nil
i'm positive this isn't the stakes
SMODS overrides Card:draw
You have to hook SMODS.DrawSteps.stickers.func
How can I display dinamically a number that goes down in the description of a joker? I'm losing my head here quq. Something like Popcorn or Ice Cream, f.ex
have you looked at their code
put this somewhere in your main script:
SMODS.Atlas {
key = "modicon",
path = "pathtoyouricon.png",
px = 34,
py = 34
}```
the rest is automatic
thank you
npnp ^U^
is that the json or lua file?
the lua file
the json file is just for your mod metadata
np :D
@daring fern i'm getting the same error with this code
wait omg i might know the issue ;u;
hold on a mo
yeah i forgot to export my stickers 😭 sorry to bother
Wait this is gaining 0.25 every hand
it's not checking if it's the first hand
you need to add the G.GAME.blahblahblah check to the second if statement too
the rest seems good i think
except maybe consider using ability values, instead of hardcoded ones
and also consider returning a message when it upgrades
context.setting_blind
dont ask how I got those mixed up
did that yeah
and you don't need the juice animation for that
thx mods
is it possible to tell if a card is being rendered in the collection
you can check if it's in the G.your_collection cardarea i think
where do i put the icon?
sorry for how much i'm bothering you
assets/1x for the 1:1 scale, and assets/2x for the double scale version
no allg ^u^!
i enjoy helping
if card.area.config.collection
how big is the x1?
and the x2?
double that, so 68x68px
does it need a specific name?
How can I make an enhancement appear on top? Currently the rank and the symbols on the card are above the enhancement layer:
You have to use SMODS.DrawStep
am i doing this correctly?
ohhh
How do I ensure that the game saves my custom G.GAME variables? Is there a function for it?
No, it should by default.
What about with savestates? I use DebugPlus and whenever I load a savestate it doesn't retain some of the custom values
How do I get a consumable to add cards to your deck and not to your hand?
area = G.deck
is this function checked several times or only once at the beginning of the run?
it's checked repeatedly, whenever a pool that the object could be pulled from generates on object
1 in 9 chance to gain xmult from scored 9s, how do i check for scored 9s?
if context.individual and context.cardarea == G.play and context.other_card:get_id() == 9

how do i check what suit a card is? i dont mean compare it to a suit and return true i just want to output the suit of the card
did u make a lovely patch or did you install a bunch of mods that override eachother
no I did not
is it the fact that in the same script I got 2 G.update hooks?
ima just
merge them rq and see
nvm theyre not the same
I am supposing these are the issues but I got no clue
cycle in table is when you put a table into itself
or smth
-- my code
calculate = function(self, card, context)
if context.cardarea == G.play then
if context.repetition then
if context.other_card:is_face() then
return {
repetitions = #context.scoring_hand
}
end
if context.individual and context.other_card:get_id() == 13 then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmultmod
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xmult } },
colour = G.C.MULT,
message_card = card
}
end
end
end
end
so they are not the issue
-- What it is
loc_txt = {
name = "Duke of Faces",
text = {
"Retriggers {C:attention}scored face cards{} based on",
"{C:attention}how many cards{} are in {C:attention}played hand{}",
"Gain {X:mult,C:white}X#1#{} Mult anytime a {C:attention}King{} is scored",
"{C:inactive}(Currently: {X:mult,C:white}X#2# {C:inactive} Mult)"
}```
local ExampleTable = {}
table.insert(ExampleTable,ExampleTable)
thats an example of a cycle table(atleast in roblxo studio, im too dumb for balatre)
help
try commenting out second cardflip
maybe that is the issue
whats the error
it doesn't gain xmult when a king is scored
so xmult of text dosent updfate?
oh no, it does, what it doesn't do is gain xmult
does the card.ability.extra table exist?
this function used to work completely fine till I added the basedata table
to save my stuff
what is self in this context
the card itself?
yeah
going through all cards, if one is part of the table it is flipped back
config = {
extra = {
xmultmod = 0.5,
xmult = 1
}
},
alr so i think heres what happened
Is there a context for highlighting/selecting a card?
card == card and you overridden the cards flip func to be a self cycle
eh well
working on a DeckSkin mod, but am lost on all the stuff that is needed as stated on the github page
still detecting a cycle
my main issue is that it was working completely fine before
just started happening since I added baseData
i dont think this is correct
cardflip is the original not the new one
ah
did you insert anything into those tables
I only modify them really
or add stuff to sub tables
either corresponds to highlighted cards for one consumable
or to random cards held in hand for the other
how would i retrigger cards that have a specific card type
i mean like
edition or enhancement
the one that's on playing cards
which part are you stuck on, the retriggering or the checking?
but do the logic inside a joker
retriggering and checking
oh?
for retriggering logic look at hack for example: https://github.com/nh6574/VanillaRemade/blob/24ee6098f692a58a34d573dec5a86a347c5fd13a/src/jokers.lua#L878
for checking editions and enhancements: https://github.com/nh6574/VanillaRemade/wiki#how-do-i-get-if-a-card-has-a-specific-editionenhancementsealsticker
ah
how would I save the specific cards that need to always be debuffed/flipped
id save their rank and suit ngl
that would kill an entire deck
like
an entire idol-based deck
I will check out this strategy instead
yeah N' approach will work for u
card.ability always saves no matter what right?
peak 
am finding myself lost with how things need to be for the DeckSkin stuff
here is what I have for code
why did u declare atlasses as locals...?
I was so lost and trying stuff
couldnt you js access them by their key
does it error
le bump
yeah, give me a sec and I can get yo uwhat it says
get_suit()?
YOOO KAI CENAT IS GIVING AWAY MONEY!!! TOTALLY NOT A SCAM!!!!!
the error is that: [SMODS _ "src/game_object.lua"]:2422: Error Loading DeckSkin bolcustomcards_Akasha! Please define your palettes or use the old formatting
card.base.suit
sweet! thanks!
Can you make a card unselectable? I tried with G.hand:remove_from_highlighted(card), but the card is selected for a frame, and if I use a mod that allows for drag selecting, it doesn't work on that one
alr brb
Hook CardArea:can_highlight
try setting atlas as Akasha_1 for lc version and Akasha_2 for hc version
aight thx xChips and N' it works perfectly fine now
and remove local from both declarations of the atlasses
like this?
ye i think that might work
same error, at this point the only thought I have is due to my image files only having the stuff for the Jack Queen and King and no other cards
Thank you!
i found your issue
its palettes
not paletts
alr what is it
crashed with this: engine/sprite.lua:11: attempt to index field 'atlas" [a nul value]
is the path correct
looks like the file name in the path is correct
obvious question, dose it contain 1x and 2x?
when i run this i get this error anyone know why?
yep
i doesn't exist.
oh ur right
How do I add tooltip for my enhancement? E.g.: how the Tower tarot explains what a Stone card is despite it not being a Stone card
wait do you have any other atlasses
info_queue[#info_queue+1] = G.P_CENTERS.m_modprefix_key in loc_vars
what do you mean?
Ohhhh so that's what that line is doing, I saw that a few hours ago, but had no clue what it would do, thank you!
besides akasha atlasses
are there any other atlasses?
those are the only ones right now in the code, am wanting to get the first one working before trying to do the others
maybe theres a mod prefix?
thats missinmg in the palettes atlas
oh yeah, forgot about that
okay so currently i have this and when i play one discord seal nothing happens
You need a context check.
can you do that in seals?
in a calculate function yes
so like this?
well this time I didn't crash, but got an interesting situation
No, the context check should be first.
Also an event is not a return
https://github.com/Gud-username/Card-skin-template
It took so long I made myself a template so I dont have to remember how I did it
for context.retrigger_joker_check, is there a context I can use to check if all retrigger effects are done? im currently using context.after but that only works for scoring whereas i want to know if there is something for after all retriggers have occurred in general
i'm having two issues with my sticker:
- when blind is selected, the Joker stops being debuffed (assuming i need to hook or patch :set_debuff)
- at the end of its first round, a Sleepy Joker will wake up, even though it should still be asleep
also my code's a bit messy
help? ;u;
how do i do this
Firstly, why aren't you using card_eval_status_text instead of returning? Secondly, you're checking if the tally is greater than 0 for it to wake up, Thirdly, jokers don't calculate at all when debuffed.
-# oh whoops
okay i've fixed 1 and 2
what does 3 apply to?
is this for the sticker's calculate?
Yes, you're debuffing it when it's added so it won't calculate.
right
but this function is running
wait no i
okay yeah i see what u mean ;u;
where should i put it?
What is the goal of the sticker?
Debuffed until after 2 rounds
so it's debuffed when obtained, and stops being debuffed after 2 rounds
I'd probably iterate over all the jokers in the global mod calculate, check if they have the sticker, and if they do, tick down the counter/undebufd them
that sounds expensive ;u;
but, okie
ah i don't have a global calculate yet, what is it called?
is it just SMODS.current_mod:calculate?
you can also check the blockbuster counters API, it has a very similar mechanic with one of its counters and I think it hooks/patches some calculate stuff to let it calculate even when the card is debuffed
. instead of :, and it gets (self, context) as arguments. it's documented in the 0827 changelog
grand :D thanks
why does this happen?
No, : works.
You need your mod prefix.
I suppose so
if you have a question you need to ask it
how do i do what the comments are saying :/
vanillaremade is a wonderful resource
in particular, the tarot cards demonstrate that you don't need a special can_use function, you can just do config = { max_highlighted = 2, min_highlighted = 2 } like death does. and the spectral cards demonstrate how to apply an edition to a card (see aura)
https://github.com/nh6574/VanillaRemade/blob/main/src/tarots.lua
https://github.com/nh6574/VanillaRemade/blob/main/src/spectrals.lua
it's working perfectly now :D thanks u guys!
my game is crashing when i open the consumable stuff in the colletion, or the additions menu for my mod, i think that one of these are causing it
<@&1133519078540185692>
when i play a hand with 2 discord seals i want it to trigger the sound twice but currently it only plays on the first seal
Is that the entire code?
it doesnt even fit with the current size of VS_code lol
it has alot more issues but im tackling them one at a time
Why not just do discordcounter..' message'..(discordcounter == 1 and '' or 's')?
my game is crashing when i open the consumable stuff in the colletion, or the additions menu for my mod, i think that one of these are causing it, can anybody help me?
Also: #💻・modding-dev message
it didnt really cross my mind tbh
when i was writing this i was thinking i first want this to be functional lol
and it almost is aside from a couple things
i think 2 issues i have are related tho,
bcs if i play 5 cards it says 5 messages on every card instead of ramping up, and another is that it doesnt work with retrigger ( ex if ii have hanging chad on a flush with all discord seals it stays at 5 instead of going to 7)
but i feel like these two issues are linked
help
Yes, because you're checking the amount of seals in the full hand.
how do i instead change it to when a seal is triggerd?
@nova orchid I gave you an answer already
Also why aren't you returning?
when i did return the sound i have for it was sounded weird
Yes, because the pitch is based on how long the scoring has been going for.
how do i make the pitch consistent?
pitch = 1?
alr ill tst it in like 10 minutes i gotta do smht
is there a context for either cashing out or for entering the shop?
context.starting_shop, also I already told you this 14 days ago.
cheers ^u^
they help them, but not me, great
hey don't get impatient
wait true 😭
i have a terrible long-term memory ;u;
waa
help me please
i don't see the issue so i can't
your set is oliveoil, do you already have that consumabletype created
it only errors when i use it
show the code for your red enhancement
and are you sure that your mod's prefix is "otm"?
How does one add badges to an info_queue?
ok, then are you sure that the enhancement code is actually being loaded? (check in the collection)
you can probably append a badge from create_badge to what info_tip_from_rows returns
hi N
hii dilly
ive missed you
🫂
ok then i dunno
:(
i still think its the set no?
i didnt see them post a consumabletype
I mean they said it spawns fine, it only crashes when they use it
yea
oh i didnt see that in the messages they sent
just saw when they open the consumable in collections
Does
return false
end```
work for enchantments too to prevent them from showing up in Standard Packs?
Yes.
Thank you!
how do i do this check correctly?
LOL
cant get much more specific than that
No, get_seal works.
so then what am i doing wrong?
how do include variables in messages?
What is the full code?
Use .. to concatenate strings and variables.
this is the code
You need a context check.
(ik u told me the solution with the discord counter in the message but thats beyond my current scope ill learn that later)
pls help I don't know how to code, and I'm trying to import custom deck skins😭 
okay first of why not just use something like VS_code?
where tho?
oh my god why is it on the right
technically that prevents the crash but it's still bad
you need a proper context check there
and get_seal isn't how you're supposed to check the seal of a card
it's just card.seal == 'key'
what is VS code?
visual studio code
Why?
It's the same but better.
and what am I supposed to do there? thanks
look at the source code for Card:get_seal and tell me what you see
The only thing different is it checks for debuff.
default language side of where I live
i thought it would be that
what context check do i use for this tho?
fair enough
if that is true, all the function should look like is return not self.debuff and self.seal
is that what it's doing?
Is there something like a default all-inclusive VIP code I can drop in there and not have to do any editing?
No, it has a bypass_debuff input.
A string.
🧵
welp maybe just the calculate function and when anything is a joker and is created I apply pinned with a 30% chance
k nevermind I think I got confused with get_edition
change the should_apply function on the pinned sticker I suppose
you already have context checks for what you need
you just need to check for those first
like maybe a pre-written code?
wdym?
oh yeah I can just set its rate
yes
you need to save the value of that somewhere in the card, not in a local variable
otherwise it just gets overwritten on each calculation
then you just increment and do whatever else in your main_scoring context with your ability value
you think?
bcs what i want to do is
when it plays card 1 i want it to say message 1
when i play card 2 i want it to say message 2
etc
yeah so how can i edit out this piece of code from the lovely dump
or i should say play i plya a new seal bcs i do want it to work with retriggers
because i need to do something with the boss blinds and how they behave
a lovely patch
you still need it saved somewhere that isn't a local variable
do you perchance know what the problem is?🐆
the next card being scored is a new call of the function
so the old value will be out of scope
so ill just have to copy the code and override the function?
not what i said lmao
you still save it on the card, just reset it after the hand has been played
no, sorry. ive not done a mod like that and youre also using an (as far as im aware) old and depricated smods formatting version :/
i must admit im completely clueless on how to do what ur suggesting
aww man
ive only been modding balala for a couple days and this is the first time im checking for something like this
have some key in your joker config just set to 0
actually wait thats not true i have something like this but for kings
then for each main scoring step you process, increment card.ability.whatever by 1
then in context.after or something, set it back to 0
do you know how to import custom cards and can help?
joker config?
this is a seal
one thimg in confused on
i have this joker that works with a king count instead of a seal count
how is it so different for a seal?
I think the confusion comes from the other_card
the seal calculates on itself when you do main_scoring
not on other cards
sorry for the bother
you don't need to check if the card has the seal, the seal it calculating solely because it does
then to get the trigger count, you'd want to save a variable in G.GAME instead of on the card
that makes sense
if context.main_scoring and context.cardarea == G.play then
G.GAME.YA_discordnotif = (G.GAME.YA_discordnotif or 0) + 1
-- do whatever you need to with that counter
end
if context.after then
G.GAME.YA_discordnotif = 0
end
sorry if I appear to be ignoring you, I just can't help everyone at once
I do have to go for now, but if no one else has helped you by then I can have a look later
im very very new to balatro and lua in general but what do you mean by cards?
joker cards?
im trying to make several hooks to prevent that boss blinds that are placed anywhere else than their regular position reset the current blinds
what do i need to patch to be able to prevent that
from the context I've seen, deck skins
i havent been paying too much attention to their messages trying to solve my own
the wording seems a little confusing tho bcs i can name like 5 different types of things in balatro that are named cards
anyway first i recommend getting Visual studio code its free and will make your life easier
thanks everyone! you all are so kind!
yea, deck skins, I gathered a bunch of fan art that I want to make playable
have you added other things or are you starting with the deck skins?
starting and ending with deck skins. i dont really want/can add anything else
yea its just skins with no effect
i dont have the skill set for it
how do i get the number of rerolls done in a shop?
(G.GAME.round_scores.times_rerolled.amt is different)
i didnt know anything about lua or balatro modding before firday of last week
no its really not an issue
and now i added 11 jokers with unique effect 2 seals and 1 tarot
if there's no pre-existing thing for that, that's okay, i'll add my own
im trying to make a patch that prevents blinds set as not boss to not increase antes and reroll blinds, but it is rerolling blinds for whatever reason
but for deck skins you gotta ask someone else bcs ive only been focussing on gameplay things
-# context https://files.catbox.moe/pci3g6.mp4
alrighty then. thank you for your time nonetheless!
if you want to learn how to add jokers or other gameplay things in the future i can help you
sure! will do. What mod are you working on currently?
just something for my irl friends
i plan on porting it later for everyone after removing my friends faces from the jokers haha
i can do some for u
so like a gift of sorts?
i geuss you can see it that way
i just really like this game
and some of them do too
really? I have the deck art and just need it to be programmed in!
so its more of a something i just want to do for all of us to enjoy
oh
but yeah i can do some
im bored asf
good luck with the deck things
Should I send the deck art here?
dms
thanks!
Anyone aware of a 'rank wildcard' effect in any mods? ie, have a card that counts as all ranks?
I'm trying to do it, but the only way I see is by using a psychotic amount of regex patches
on card:get_id()
Yes, you should wait for the quantum ranks pull request to be merged into SMODS
bump
I learned the Hard way that SMODS.is_eternal also checks the eternal_compat in card.config.center...
So when I forced a Joker Eternal for a Challenge, it just got destroyed by another joker immediately..... Why the heck does the config matter for the SMODS-Eternal-Check!? 
Hook reset_blinds()
No, you're overriding it.
i think it's for the context
right
so it doesn't add eternal in the context to things that are not compatible
but the logic can probably be different
like this, right?
Yes.
fair, ty
what do i tweak
i think i got the issue
i tweaked this in the end round code
its a override
whatd i do wrong
ok nvm i got it working now
i didnt add key to the round_resets.blind
hey so how do I make the normal quips not appear
SMODS.JimboQuip({
key = 'evil_quip1',
type = 'loss',
filter = function(self, type)
if next(SMODS.find_card('j_xmpl_evil_joker')) then
return true, {weight = 10}
end
end,
extra = {center = "j_xmpl_evil_joker"}
})
SMODS.JimboQuip({
key = 'evil_quip2',
type = 'loss',
filter = function(self, type)
if next(SMODS.find_card('j_xmpl_evil_joker')) then
return true, {weight = 10}
end
end,
extra = {center = "j_xmpl_evil_joker"}
})
SMODS.JimboQuip({
key = 'evil_quip3',
type = 'loss',
filter = function(self, type)
if next(SMODS.find_card('j_xmpl_evil_joker')) then
return true, {weight = 10}
end
end,
extra = {center = "j_xmpl_evil_joker"}
})
return {vars = {colours = {HEX("#DCDCDC")}}}
why does this crash?
remove the #
ok thx
i can never remember whether hex takes the hash or not
i should just hook it to check if there's a hash and delete it
is there a context for when the chips are calculated and added to the score and before you can play the next hand? wanna make a boss blind that subtracts a certain amount from your score everytime
not precisely, but context.final_scoring_step should serve this purpose
How do I duplicate cards?
More accurately, how do I make a joker that duplicates cards like DNA?
Thank you.
Hey everyone, figured this would be a good place to ask this question. I have an Emperor > Fool > Judgement loop using Perkeo, and I'm wondering if there's a way to automate the process of collecting all 150 Jokers as negatives because I'm not doing that manually
I doubt it could be done easily with a mod but a record/run tool (similar to selenium IDE) might work, just wondering if anyone has experience with something like this and can point me in the right direction? Or an otherwise easier method to do it.
I'm assuming some function has to know which card you're hovering over to display the relevant description, so if there's a way to export that data and use it in a record/run tool then I could check what tarot card is selected, whether or not the joker created is negative, and whether that joker is Showman to almost create a flowchart the macro could follow
Im using jokerforge how would ij code a joker to make it everytime a joker that gives mult is triggered it gains +0.05x
is there any documentation for SMODS.Font?
i recommend checking the jokerforge thread in #1209506514763522108 or discord
what's the crash
??
remove the fonts/
game.lua:3716: attempt to index local 'extra' (a nil value)
Stack Traceback
===============
(1) Lua local 'handler' at file 'main.lua:612'
Local variables:
msg = string: "game.lua:3716: attempt to index local 'extra' (a nil value)"
(*temporary) = Lua function '?' (defined at line 31 of chunk [SMODS _ "src/logging.lua"])
(*temporary) = string: "A problem has been detected and Balatro has been stopped\
"
(2) LÖVE metamethod at file 'boot.lua:352'
Local variables:
errhand = Lua function '?' (defined at line 598 of chunk main.lua)
handler = Lua function '?' (defined at line 598 of chunk main.lua)
(3) Lua field 'func' at file 'game.lua:3716'
Local variables:
quip = nil
extra = nil
(*temporary) = number: 0
(*temporary) = number: 0
(*temporary) = number: 0.887666
(*temporary) = number: 0
(*temporary) = C function: builtin#6
(*temporary) = table: 0x24c61e30 {}
(*temporary) = number: 0
(*temporary) = string: "attempt to index local 'extra' (a nil value)"
My guess is that, somehow, no quips are passed through?
that worked, ty
hmm no idea
help?
should work yea
All I wanted to do is restrict the deck to have just the specific quips if a config option is enabled.
filter = function(self, type)
if type == 'win' and togabalatro.config.SpecialDeckMusic then
return true, { weight = 69420 }
end
end
fwiw on the quip definition itself.
how can i reduce blind payout through a deck
im following the artmuncher consumable tutorial and im getting this error
win works, but not loss or lose as types.
how do I add the values of 1 card into another card?
-# doing my own take of reverse tarot cards for my mod, and reverse death will merge the left and right card together
search death
oh wait
i got it wrong
i think you can just get their ids
and merge them
No they want to add the value to one card kinda like hitch hiker and destroy the other
yea basically
so
Search hitch hiker in that link and make the amount it adds a var that = the cards rank
how do i add behaviour to another mod's joker without overriding existing behaviour
for the rank
get the id of both the cards
and do a math.max check to cap it at the highest value (ace)
which is 14
And use the code from hangman to destroy the other
take ownership and copy the existing behavior when you redefine the calculate function
then do a for loop in SMODS.Ranks to check the respective ids of each rank
i'd rather not have to copy all the old behaviour
that's why i said without overriding old behaviour
Bump
show the code
my idea was also to carry the values like chips, seal, edition, stuff like that, over to the thing as well
mmmmaybe you could patch the mod lol
i forget the exact format but you can indeed do lovely patches into any mod
Card:set_seal()
yea I know that part
mainly stuff like leftover values (like extra chips gained from hiker upgrades for example)
if card.ability and card.ability.perma_bonus then
ahh ok
card.ability.perma_bonus is the added chips
bump!
theres card:get_chip_bonus() for getting the chips amount
same for like every perma bonus
bump
is it possible to change this
what's the code
did you make a junk set
heres an example
SMODS.ObjectType({
key = "junk",
default = "j_gros_michel",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
end,
})
no i named it junk because they will be consumable that are themed around junk items
this but use ConsumableType instead
bump, again
it is the set is 'junk'
just edit the text
to what
a consumable type, as N' said?
to something else i want
that is the type i made a new one
oh i understand this now
is there someone online who knows how to program custom deck skins?
yes
if im asking is because i need you to not be vague lmao
you dont need to tell me the exact text but is it dynamic? is it fixed? does an object add it or just your mod?
dynamic
because its supposed to change the text to an updated dollar payout
oh thanks i forgot case matters when you have a string
ok that answer actually makes things a lot easier, you can just change G.GAME.current_round.dollars_to_be_earned
you need the reward text too?
just the one on the blind selection
?
how to i get a card's ability? (like if its a bonus card or a lucky card, etc)
why is the take_ownership not setting the atlas correctly? (rooms are blinds, this is small blind)
its specifically for the take_ownerships, the atlas works fine for new custom blinds
search ph_blind_reward
so I got this error: [SMODS _ "src/overrides.lua"]:1834: Tried to apply more than one edition.
func = function()
if G.hand.highlighted[i] ~= rightmost then
rightmost.ability.perma_bonus = (rightmost.ability.perma_bonus or 0) +
G.hand.highlighted[i]:get_chip_bonus()
-- applying edition
if G.hand.highlighted[i]:get_edition() and not rightmost:get_edition() then
rightmost:set_edition(G.hand.highlighted[i]:get_edition(), true)
end
-- applying the seal
if G.hand.highlighted[i]:get_seal() and not rightmost:get_seal() then
rightmost:set_seal(G.hand.highlighted[i]:get_seal(), true, true)
end
-- applying the bonus stuff
if G.hand.highlighted[i].config.center_key and not rightmost.config.center_key then
rightmost.config.center_key = G.hand.highlighted[i].config.center_key
end
-- destroying the card
SMODS.destroy_cards(G.hand.highlighted[i])
end
return true
end
what did I do wrong?
i know this is super simple but how do i get the spectral text colour in text?
legendary iirc
what?
it crashes whenever I try to merge two cards together, and the left card has an edition
thought it was more difficult judging by the text styling github
anyone know how i can change the atlas and pos of an object if this isnt working?
i do it like this for one of my cards idk if it helps
https://github.com/nh6574/JoyousSpring/blob/e0cdbd2da1daeb698eb2ebe14693811e8ab59e65/src/jokers/99_99Token.lua#L35
got it to stop crashing, but now it won't carry over the enhancement
func = function()
if G.hand.highlighted[i] ~= rightmost then
-- applying the chips
rightmost.ability.perma_bonus = (rightmost.ability.perma_bonus or 0) +
G.hand.highlighted[i]:get_chip_bonus()
-- applying edition
if G.hand.highlighted[i].edition and not rightmost.edition then
rightmost:set_edition(G.hand.highlighted[i].edition)
end
-- applying seal
if G.hand.highlighted[i]:get_seal() and not rightmost:get_seal() then
rightmost:set_seal(G.hand.highlighted[i]:get_seal(), true, true)
end
-- applying enhancement
if G.hand.highlighted[i].enhancement and not rightmost.enhancement then
rightmost:set_ability(G.P_CENTERS[G.hand.highlighted[i].enhancement])
end
-- destroying the card
SMODS.destroy_cards(G.hand.highlighted[i])
end
return true
end
You need the .key of the enhancement.
like this: rightmost:set_ability(G.hand.highlighted[i].enhancement.key)
for i = 1, #G.raindropout.x do
if voices_of_the_deck.raindrop == nil then voices_of_the_deck.raindrop = loadThatFuckingImage("raindrop.png") end
love.graphics.setColor(255, 255, 255, 1)
love.graphics.draw(voices_of_the_deck.raindrop, G.raindropout.x[i], G.raindropout.y[i], 0, 1, _xscale, _yscale, 30*_xscale, 180*_yscale)
G.raindropout.x[i] = G.raindropout.x[i] - G.raindropout.xvel
G.raindropout.y[i] = G.raindropout.y[i] + G.raindropout.yvel
if G.raindropout.y[i] >= love.graphics.getHeight() then
G.raindropout.y[i] = 500
G.raindropout.x[i] = math.random(1, love.graphics.getWidth())
end
end
end```
ik this is more of a love question than a balatro question, but im trying to draw a graphic on screen normally and for some reason it seems to clone itself horizontally and is also showing only like a thin 1 layer pixel slice of the image???? can anyone point me in the right direction to fixing this?
Actually, it'd be G.hand.highlighted[i].config.center.key.
hm, this doesnt seem to be working
it didn't give the enhancement
rightmost:set_ability(G.hand.highlighted[i].config.center.key)
maybe it's hardcoded somewhere
if it is that's a recent change
and if thats the case then. thats stupid
this used to work
ok so setting the atlas while the game is running with debug plus works, which means its just about the timing of when im setting it
so now how do i. do that
im getting this error when i use debug plus to unlock the consumable i made even though i already gave it a sprite
is there an easy way to create a file using lovely+steammodded
like using the mod to create a file
how do i make a joker destroy all cards used in the first hand of a round?
that option wasnt on jokerforge 😔
not sure but you could check out the code of the cryptid mod i know it creates a new save folder with the m1 m2 and m3 saves
alr thx i mean cryptid has a reference for everything lol
lol
yes
evil joker
its similar to arsonist in function (https://balatromods.miraheze.org/wiki/Cryptid/Arsonist)
Arsonist is an effect Joker added by Cryptid. If the played hand is a Full House, Flush House, or Fifty Two, Arsonist destroys all played cards after they are scored...
i only realised this like rn
https://github.com/nh6574/VanillaRemade/blob/main/src/tarots.lua look at the one on trading card that could help you just change it from 1 card thats discarded to all played cards
oke
destory
bump
can u send the code so i can run a smoke test
I'm an ordinary joker burning down the house! /ref
sure
does anyone know how one would save a card in G.GAME without it being replaced
so it does work but for some reason it applies x3 to EACH CARD LMAOOOO 😭
ill fix it tmrw im too eepy
how can you check what the ante number is?
why is the PNG not decoding right (the files are fine, i checked)
wait are the numbers backward
no they're fine
why is it not decoding??
{
"id": "276327632763",
"name": "Balatro_My_Way",
"author": "Jimbo Joshua Jokkeman",
"description": "The kind of Balatro I wanted to make for... a couple of months but never did",
"prefix": "xiferp",
"main_file": "Challengecode.lua",
"priority": 0,
"badge_colour": "666666",
"badge_text_colour": "FFFFFF",
"display_name": "Balatro_My_Way",
"version": "1.0.0",
"dependencies": [
"Steamodded (>=1.*)",
"Lovely (>=0.6)",
"Balatro (==1.0.1m)"
],
"conflicts": [
],
"provides": [
]
}
My current json file for my mod, what am I doing wrong?
i think dependencies might be spelled wrong
How do I spell it right?
here's one of mine that works
{
"id": "oliverteaganmod",
"name": "Oliver Teagan Mod",
"author": ["Oliver", "Teagan (kinda)"],
"description": "OLIVER TEAGAN MOD!!",
"prefix": "otm",
"main_file": "main.lua",
"priority": -25,
"badge_colour": "6BFFB5",
"badge_text_colour": "000000",
"display_name": "Oliver Teagan Mod",
"version": "1.0.0",
"dependancies": [
"Steamodded (>=1.*)",
"Lovely (>=0.6)"
]
}
-# ...why are you targeting an older Balatro version?
...OHHHH
I wasn't intentionally
dependencies is also spelled right.
I actually copied it directly
is this right? local ok, mod = pcall(function() return assert(SMODS.load_file("modules/e/blon.lua")) end)
Just do assert(SMODS.load_file("modules/e/blon.lua"))().
Where?
-# I specifically replied to someone else's message for their issue.
how would i save a card in G.GAME without it being replaced by "MANUAL_REPLACE" upon reloading?
But for you, just
"dependencies": ["Steamodded (>=1.*)"],
should be enough... though you should target stable releases.
"dependencies": ["Steamodded (>=1.0.0~BETA-0827c)"],
for me?
Ye.
Could also be I'm trying to add in just one challenge that could be improper....
does anyone know why my booster is wide. is it a problem with the atlas lua SMODS.Atlas{ key = 'Junk1', path = 'JunkPack.png', px = 57, py = 93 }
yes
shouldnt be px = 57
boosters are the same size as jokers they just have a lot of empty space
STILL NOT WORKING
I think I have something off...
What is the width again
What does the main script look like?
Nvm
key = 'laundry_day_1',
rules = {
custom = {
{ id = 'laundry_day' },
}
},
jokers = {
{ id = 'j_DNA' },
},
restrictions = {
banned_cards = {
{...27 jokers...},
{ id = 'c_star' },
{ id = 'c_moon' },
{ id = 'c_sun' },
{ id = 'c_world' },
{ id = 'c_sigil' },
{ id = 'c_incantation' },
{ id = 'c_grim' },
{ id = 'c_familiar' },
{ id = 'v_magic_trick' },
{ id = 'v_illusion' },
{ id = 'p_standard_normal_1', ids = {
'p_standard_normal_1', 'p_standard_normal_2',
'p_standard_normal_3', 'p_standard_normal_4',
'p_standard_jumbo_1', 'p_standard_jumbo_2',
'p_standard_mega_1', 'p_standard_mega_2' } },
banned_other = {
{ id = 'bl_club', type = 'blind' },
{ id = 'bl_goad', type = 'blind' },
{ id = 'bl_window', type = 'blind' },
{ id = 'bl_head', type = 'blind' },
deck = {
type = 'Challenge Deck',
cards = {
{ s = 'H', r = 'A' },
{ s = 'H', r = 'K' },
{ s = 'H', r = 'Q' },
{ s = 'H', r = 'J' },
{ s = 'H', r = 'T' },
{ s = 'H', r = '9' },
{ s = 'H', r = '8' },
{ s = 'H', r = '7' },
{ s = 'H', r = '6' },
{ s = 'H', r = '5' },
{ s = 'H', r = '4' },
{ s = 'H', r = '3' },
{ s = 'H', r = '2' },
}
},
}```
if you do 3 of these ` before and after your code it will go in its own box
like so
ye
i fixed the px and py values and low its not wide just misprint
how would i save a card in G.GAME without it being replaced by "MANUAL_REPLACE" upon reloading?
😭
What'd I do wrong?
Wait, I'm not seeing any badges for anything show up at all...
bump
Bump
I don't think anyone's here atm, @crimson tapir
do my blinds need to be in a different spritesheet from my jokers and such?
Yeah I think so
I just use separate images for each sprite
Yeah
how do I find a joker's rarity?
Like an already existing one or add one to a joker you made
an already existing one
you look in the collection
as I am making a thing that rerolls a joker into one of the same or higher rarity
(not legendary, unless the joker before being rerolled was legendary to begin with)
oh lol
like destroys a selected or random joker and replaces it with a new one of the same rarity
yea
no idea
u know how to fix this
or this
what are you trying to do here 😭
it crashes because of there not being an atlas or something, i'm trying to fix that
ah
blinds need to have an animated atlas
???
also the px and py should be the size of one sprite
blinds have to use
atlas_table = 'ANIMATION_ATLAS'
i have no idea how to make animated atlases
and px and py is the size of one sprite, it's just really big :P
why would you want a 456x456 blind sprite
try adding this to the atlas
im pretty sure it'll only show the corner of it
or just nothing due to the sheer size
i'll test it
also it needs a frames field too iirc
where do i put atlas_table = "ANIMATION_ATLAS"?
h.
here's an example
and are the frames going in X or Y
x axis
it works properly
bump
whats the issue
Is something wrong? I try to load it, but it won't work. (Context: this mod is just this challenge to test)
is it not appearing in the game or is it crashing or
not appearing
is the mod appearing
I load up the game, go over to the challenge tab, and nothing. No bonus 21st challenge named "Laundry Day". nothing
no
Should I post the json?
please
"id": "276327632763",
"name": "Balatro_My_Way",
"author": "Jimbo Joshua Jokkeman",
"description": "The kind of Balatro I wanted to make for... a couple of months but never did",
"prefix": "xiferp",
"main_file": "Challengecode.lua",
"priority": 0,
"badge_colour": "666666",
"badge_text_colour": "FFFFFF",
"display_name": "Balatro_My_Way",
"version": "1.0.0",
"dependencies": [
"Steamodded (>=1.0.0~BETA-0827c)"
],
"conflicts": [
],
"provides": [
]
}```
Anything I'm missing?
author is an array im pretty sure
[so, like this?]
yes
it says that's an error
forgot the quote marks
Okay, gonna test it
Still don't see it...
is the mod in the mod menu at all
Where's the mod menu?
in the main menu theres a button that says mods
I don't see it
😭
I swore I did
does a console open with the game
Yeah
then you probably installed smods wrong
all of that should be inside a folder
except your mod
which should be at the same level as smods
uhh i have to go i would recommend reading this (or again if you have) https://github.com/Steamodded/smods/wiki/Installing-Steamodded-windows
I am missing something REAL bad...
Do you have lovely installed?
It looks like that's a no, even though I know I downloaded it earlier...
Now it kinda works...
Give me a minute, I might have broke something
You need version.dll in your balatro, not modded folder but with your balatro
@red flower Does the Gros Michel/Cavendish extinction in VanillaRemade play the same animation as their vanilla counterparts?
Try talisman? Prob won't work tho
...where do I get Talisman?
just making sure, are you putting the challenge in a main.lua file or a seperate file
main.lua file, with a .json file
you have everything needed in the json also right
I am confused
Yeah, join the club
Try adding a made mod like cryptid and see if mods appear
To see if its your mod or something else
"id": "276327632763",
"name": "Balatro_My_Way",
"author": "Jimbo Joshua Jokkeman",
"description": "The kind of Balatro I wanted to make for... a couple of months but never did",
"prefix": "xiferp",
"main_file": "Challengecode.lua",
"priority": 0,
"badge_colour": "666666",
"badge_text_colour": "FFFFFF",
"display_name": "Balatro_My_Way",
"version": "1.0.0",
"dependencies": [
"Steamodded (>=1.0.0~BETA-0827c)"
],
"conflicts": [
],
"provides": [
]
}```
Talisman's not showing up either
is the main.lua file named Challengecod
oh
yes
There's not even a mod menu
Mmmmmmmm
version.dll is in the BALATRO folder right?
yes
I asked they saiid yeah
hm
I honestly have 0 idea what your missing
Want me to restart this whole thing?
oh wait they sent that already
oops
Yes, and I've done all that. Where is the mod button supposed to be anyway?
next to collections
also does command prompt open when booting up the game
it should have lovely 0.8.0 on it
if it doesn’t, you probably goofed up the lovely installation
yes, and it's 0.8.0
wtf
Try the installing cryptid video if you install crytpid correctly then try putting in your mod
Then what do?
is your %appdata% really just in a onedrive folder
Yeah, as a backup in case my laptop goes down
urrgh im lost here
might be the fact that you’re putting your mods into a backup folder and not one balatro can reach
unless that’s the only appdata folder
BUT IT CANNNNNNN
well i can’t help you now
It can reach it, the little bonus page is showing up
I'm going to put myself into a partical accelerator
Okay, I'm gonna restart after the Lovely thing
aaaaaand nothing.
That's it. Imma figure out how to turn out onedrive and starting it all again.
is there now a lovely folder in your mods folder?
In the smods folder in the mods folder.
no
Mods/lovely
okay, lovely isn't working
lovely puts logs and dumps in that folder every time it runs; if it doesn't exist it hasn't been doing things
Was I sopposed to make a folder there beforehand?
no, lovely does it on its own
is the version.dll you got from lovely in your balatro folder, next to balatro.exe?
yes
Also, Lovely is looking for the file in a place it isn't, and I don't know how to fix that barring drastic measures
Lovely was set up strangely
In any case, I think I'm not getting mods
how do i make a joker destroy itself
what do you mean "lovely is looking for the file in a place it isn't"?
YO
I changed it to the new smods function that seems to have some difference rn
i see, thank you
can the max size of booster packs be adjusted
still can't figure out how G.GAME.pack_size works
from the release notes for smods 0827:
https://github.com/Steamodded/smods/discussions/919
(to be clear, both of the modifiers start at 0, and setting them to a different number adds them to the relevant number on all booster packs)
ty!
is there a way to get the screen coordinates of a joker from its transform easily
card.T.x and card.T.y?
those are not screen coordinates
oh wait i made this realization 2 weeks ago its just screen coordinates but divided for some reason nvm that's on me 😭
im fairly sure the true in the fourth parameter makes it do the food destruction animation
How do I adjust the sticker position on my jokers?
You mean you want stickers to be placed differently on your jokers?
Figured it out myself
Add pixel_size, in this case = { h = 69 }, and put the joker sprite at the top of the sprite slot where it belongs
how can I make it so that a joker's effect only triggers when buying specific jokers?
I have the context.card_added part but I don't have the rest
context.buying_card and context.card.config.center.key == 'j_modprefix_key'
is there a way I can make a list of jokers instead of just using 'j_modprefix_key'? bc there's like 4 different jokers that I want to be able to trigger the effect when bought
context.buying_card and (context.card.config.center.key == 'j_modprefix_key' or context.card.config.center.key == 'j_modprefix_key' or context.card.config.center.key == 'j_modprefix_key' or context.card.config.center.key == 'j_modprefix_key')
ah ok
also is there a way I can get the key of a joker that I buy?
context.card.config.center.key
hey y'all, i'm trying to make a card sleeve that gives jokers and vouchers, but for some reason they're not given when they're put in self.config {}? what might be causing this? ```lua
loc_vars = function(self)
local key, vars
if self.get_current_deck_key() == "b_picubed_covetousdeck" then
key = self.key .. "_alt"
self.config = {
voucher = {'v_money_tree'},
}
vars = {
localize { type = 'name_text', set = 'Joker', key = 'j_picubed_shoppingtrolley' },
localize { type = 'name_text', set = 'Joker', key = 'j_picubed_preorderbonus' },
localize { type = 'name_text', set = 'Voucher', key = 'v_seed_money' },
localize { type = 'name_text', set = 'Voucher', key = 'v_money_tree' },
}
else
key = self.key
self.config = {
jokers = {'j_picubed_shoppingtrolley', 'j_picubed_preorderbonus'},
voucher = {'v_seed_money'},
}
vars = {
localize { type = 'name_text', set = 'Joker', key = 'j_picubed_shoppingtrolley' },
localize { type = 'name_text', set = 'Joker', key = 'j_picubed_preorderbonus' },
localize { type = 'name_text', set = 'Voucher', key = 'v_seed_money' },
}
end
return { key = key, vars = vars }
end,
voucher should be a string.
This piece of code works (when a Queen is added, adds another copy of that Queen), however it doesn't seem to feed Hologram. Does anyone know why that is, and how I can make the extra copies add extra xmult to Hologram?
for _, copied_card in ipairs(context.cards or {}) do
if copied_card.get_id and copied_card:get_id() == 12 then
local _card = copy_card(copied_card, nil, nil, G.playing_card)
_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, _card)
G.hand:emplace(_card)
_card.states.visible = nil
G.E_MANAGER:add_event(Event({
func = function()
_card:start_materialize()
return true
end
}))
end
end
end```
that was technically a problem but didn't solve my problem sadly. i found another way (i'm just gonna not bother with config), thanks for your help though!
playing_card_joker_effects({_card})
But also that would cause an infinite loop.
So you would have to set a temporary flag.
I'll look into that, thank you!
is there a tutorial for adding new blinds
No but vanilla remade has all blinds in the game recoded
i see
You can Use them as a reference
Hey guys does anyone know how you make it so that a sound effect plays when ever a joker's ability scores on a card? Like Scary Face for example
if context.post_trigger and context.other_context.individual
Wow that was fast. Thx man!