#đ»ă»modding-dev
1 messages · Page 521 of 1
Yanderedev-styled code?
worse... undertale
-# tf u mean worse
do I have to explain what hooks are
because the simplest way to achieve the effect is to hook ease_ante
i think the way they did it is simpler
oh yeah baby
that's only true for wild cards
what
should it be or then
yes
ok
but also just do not hearts
you're ruining my terrible code
wait do i have to like undebuff them or is that just done automatically
that is done automatically
thank god
well, it's done by calling debuff_card again and doing the opposite at end of round
it still debuffing everything đ
how come blind one works great but everything else just instantly falls apart
im gonna try different contexts just to see if anything changes
Oh, I have a simmilar joker
and it's a rare one, so I don't think it's balanced
-# held together by hopes, dreams and determination! đ
okay chat, jokers file done, do i need anything else?
Main file
Or do you have it?
they are all empty files for now, i'm just creating the files and naming them
so, main.lua and jokers.lua, correct?
Donât forget to assert the files in the main file
how do i do that?
Or they wonât load
Cryptid does items/<rarity>.lua, Morefluff does jokers/<jokername>.lua
this?
assert(SMODS.load_file("yourfilename.lua"))()
does this go on the main file?
Yes
Holy shit Jason Smith
assert(SMODS.load_file("jokers.lua"))()
like so for example?
Yes
if card.is_suit is a string, can't you just use a ~= with "Hearts"?
I mean you don't HAVE to name them that
You can name them anything
But that'll do
context: someone yesterday said i could name it smth.json. so i named it exactly that
how did i not think of that
you're trying to debuff non hearts right? @distant junco
oh my god
how did nopony else think of that?
it's not a string
but that's also what i said..
yeah for the jokers
no
Is_suit() is a function that returns a boolean i believe
i said to use not hearts instead of what you were doing
oh right yeah i did that
so whether or not it has a suit?
same thing
yes
You give a specific suit in the parameters as a string
i'm assuming i can't add the " " or else it fucks up, no?
Card.is_suit(âheartsâ) will return true if the cardâs suit is hearts and false if not
Itsâs a string
For the file path
Yeah I remember
So yeah itâs obligatory
still debuffs everything round 2
what if you change the suit in setting_blind instead of starting_shop
i dont think this is a problem with your debuff_card logic
thats what i was doing before and you said not to
you said it was end_of_round
Are u trying to make the debuffed deck or something
so jam
is this a joker that debuffs all cards except for a single suit and it changes every round?
for my jokers i'd need to do j_"joker prefix"?
yeah
ah okay
I donât know how to define ObjectType đȘŠ
J_modprefix_jokerkey
jokerkey?
hmmm i would have to test it myself later
The key in SMODS.joker
ill leave it as is for now
does it have anything to do with this?
Your modprefix is ljbt
yes
j_ljbt_jokerkey
Jokerkey being the key of your joker that you specified in SMODS.joker
j is lowercase also i think
if this was python id be able help
if this was python
first
I'd probably make a list of all four suits
then id make the code pick from one of them at random and remove it from the list
then id check if the cards' suits are in what's left of the list
instead of making four if statements
and then the list would reset every time
not sure if this is possible in lua since
i dont know lua...
I hav auto uppercase yeah
Sadly this is lua
i don't think i've done this
okay this is way too strong ;-;-;-;-;
either that, or it's flying right over my head
Can you show me a code of your joker
i means thats baiscally whats happening, its just the debuff timing is really awkward
it is, but I think the suit checking code is fine especially because it works at first
i think it has to do with the timing the game checks to debuff cards
ah i see
i would, but i have absolutely nothing. i only have a json file lol
Only on ghost deck
hmmmm I suppose so
Then why are you asking for the prefix lol
yeah it's just busted on ghost deck
id probably go for 0.125 per Spectral card
especially on ghost deck i mean
i honestly do not find the debuff card context reliable because of thid
i just use SMODS.debuff_card like a normal person
thats... a thing????
Reading the wiki explains the wiki
so true
no clue, i'm learning as i'm doing it lol
please bear with međ
Dw you got this
slowly, but we'll get there lol
j_modprefix_jokerkey is mainly used in localization file and spawning joker
WAIT I HAVE A FUCKING FLUSH FIVE ACES BUILD
But if you donât care about translating just use loc_txt
-# sometimes i wish there was a wiki that explained how to read the wiki đ„ș
Basically what localization file is
Is just a file that contains the text for your joker and youâll have to make others and translate the text
I don't think so
As an advice i think the easiest thing to code is jokers so just look at vanilla remade and SMODS.joker documentation and youâll understand how everything works
ah, i was changing this in the texture pack i made. that's called en-us or something no?
might wanna get the debugplus mod
it's already saved a lot of time for me and my mod doesn't even add any jokers...
Thatâs for english language yes
ohh, I have that, but I am testing them in actual runs now
to feel the balance
basically, the runs I need to do to unlock gold stake on all decks, I do with my mod on
then the actual gold stake runs for Completionist+, I do without
I should work on my mod
you should, yes
Hello ethan
what does yours do?
mine adds a deck
im looking at the docs and i dont really get the syntax
Honestly iâm out of original ideas lol
i can too i have so many
let's blueprint
lets jolly joker
lets hang chad
NOOOOOOOOOOOOOOOOOOOO
why are we hanging chad...
what did chad do
SMODS.debuff_card(card, true, "identifierforyourdebuffthingyidk")
only appear in shop while i was testing my mod
what
haha sorry
Please donât make those kind of jokes
very good money ;-;
no one saw anything
SMODS.debuff_card(card, true, "other_card:is_suit:("Hearts")" ?
but honestly, it feels balanced
it's something you expect for this level of deckfixing, it's like having a full deck of one card with rebate, or golden ticket and hanging chad
interesting quotation mark placement...
its basically your thingy so that no other sources can undebuff your card
shush
think of it like a seed for a pseudoseed
im just checking if that would debuff hearts
hmmm
does that work without single and double quotes being differentiated?
um. no
oh
you still have to do the suit checks manually
no lol
im so confused
thats what i just did
look at the quotes around hearts
in terms of quotes, yes
in terms of what they want to do, no
for k, v in pairs(G.playing_cards) do
if v:is_suit("Hearts") then
SMODS.debuff_card(v, true, "unqiuedebuffidentifier")
end
end
"**"**" ~= "**'**"
guys, i'll head out, i'll come back later
ohh ok
gf is having trouble setting up her console
yes the quotation marks are correct but đ
goddamn
Good luck
so it doesnt really matter what i put in the unqiuedebuffidentifier
yes
in the sense that it should be unique
yeah
so what's the upside to this joker?
X3 mult
bloodstone becomes useless
does it debuff wild cards too?
if so, thi-
i hate bloodstone đ
i am married to bloodstone
for now ill probably change it in testing
i also have a joker similar to this but it only debuffs when you draw it
i think its pretty cool
and each debuffed card gives x1.5 mult
i sure do love my score having a range of 8k and 600mil
interesting
so debuff is polychrome?
polychromes cousin that we dont talk about
polycrap
i mean it's better polychrome in the sense that it's easier to get
Polychrome is unjustifiably hard to get
this is for held in hand
like this?
also said debuffed cards can be retriggered by mime for example
waw
basically something like that yeah
alright ill give it a shot
just remember to undebuff them later
sounds fascinating...
sounds like it would have great synergy with jambatros joker
its not redundant
you need it for removing the debuff
Context.end_of_round
so id just do the same but false?
yo jam
what are you gonna call your joker?
yeah
also set up your vsc workspace to include SMODS and the balatro source code dump from Lovely specifically
just use the same third parameter
call it? ive done the art and everything
doesn't look like vsc
probably n++
which doesnt have lsp capabilities by default
hi
yooooooooo
i know a little bit about glsl shaders
ive made some in the past
including ones that completely blocked out a specific color from being displayed
imagine if the joker had a custom edition that changed depending on the current suit
I'd love to help with that!
well it should be âŒïž
ok that does sound pretty cool
Balatro shaders arenât easy
let me get some reference images
I donât think they can be dynamic or can pass variables through but iâm not an expert
I figured...
but im a dark souls player
i like challenging myself
which is like the entire reason i even decided to try making a balatro mod in the first place
does this need to be in a specific context?
four different shaders in a folder
take one down
pass it around
Start_of_round maybe
If it even exists
three different shader in a folder
setting_blind would be that one
Mhm
which it is currently in and it didnt work
shaders can have variables passed in
And remember go undebuff them with context.end_of_round
String variables ?
Ideal Joker Sprite
get dunked
Thanks for the clarification eremel
(pinged the wrong message last time) does this need to be in a specific context?



đI literally answered
@distant junco
here's one...
yeah and its what its already in and it doesnt work
Did you turn this into an nvidia filter or something
Or just applied it into the image
its for hyprshade
which is on something called hyprland
I see
Linux enthusiasts
which is a window manager for ||arch Linux||
a-a-a-a-aaa-ARCH!!!?????
hides the 3 python files jerry rigged to the brightness button so that i have the ability to change the brightness
nervous whistling
I have an unused card area , i should probably add some form of buffs and nerfs there
omg its like uno flip
how could you have a back for double sided cards
a three sided card is perfectly normal
in which the polychrome cards...-
sure
also
can you make the deck look like its a case?
can the stack animation be disabled?
Case ?
Oh yeah i can
like the cardsleeves mod?
the what?
teehee
I should make an api mod like partner
Hhyprland?? I wished it worked for me
What distro do you use
I see
And my main PC has too much filled storage for dual boot
(I'd rather upgrade the PC and not storage)
Maybe in the future
Imo , you need arch for coding
Thereâs so much in windows that draws your attention
what does that mean
The only thing i do in my arch is coding and looking at my custom widgets
i need to have family guy and subway surfers while i code
Alt+tab is pain
Ooh
Having work spaces that you can access with one press is a blessing
what do you use?
xfce4?
i dont use alt tab ever
How do you switch windows
one of my friends didn't realize alt tab was a feature and thought it was added in a recent windows update lol
they didnt even believe me when i told them
why would i want to i have 2 monitors
I have 2 monitors but i use one for spotify
do you just buy a new monitor every time you need to look at a new window?
Because itsâs smaller compared to my main one
I'm not sure because I did it a bit ago but I was setting up i3 and recall xfce so probably
i have 2 eyes why would i need more than 2 windows
i bought a smart tv and use an hdmi cable
thing was practically free and gigantic
disconnected from my wifi ofc
but seriously i just have the browser and vscode i dont need anything else
if i need multiple vscode windows i just split it
Understandable
I use blender/godot/browser/file explorer
At the same time
Because I canât make 3d models
no i just hate 3d
I think itâs âuninstallâ
uses cryptid on your eye
I have no idea
I want to make my own engine, where X is up-down axis
I wish this was easier
like in 2d?
but with dept?
depth*
in 2d y is the up-down one usually
like in Minecraft?
Yup
How can i draw a shader on top of the background or replace it
in balatro?
no blue
clue*
Itâs probably drawstep but how
@lament agate how did you replace the background art
also your balatro flip mod is so cool
how does it work?
does each suit+rank combo have a predetermined suit+rank combo that it can turn into?
Itâs a button that flips cards , i can add it to cards and jokers with just adding
Absolute=true
(Custom Global variable)
Currently they just give x6! Mult when flipped upside down , but i want them to do something more unique
me when just swap the names:
i think i just overrides it
Can you link the code
shoutout to this person btw
trust me, it doesnt make sense on first sight
thats like
the entirety of it
also i think you need to tweak the CRT shaders too
Yeah i think i figured it out
Iâm not gonna add an image Iâm changing the shader
oh
well you can look at joyousspring
This converts shaders from shadertoy to fs , very useful i believe
really
useful
since yknow
its changing THE shaders
not the colors
I would like to preview my shader outside the game
well, you can probably try rebuilding that shader into GLSL
and view it in https://glsl.app
and then port it BACK again to F#
I want to cry
who said this is an easy job
I rather kill myself
a blunt reason why my mod doesnt have Editions
I coded 2 shaders
One turned out to be good
And the other is just bad
Iâm not used to actually coding shaders with hand and not having the ability to preview them as i go ,
I've made a few, for practice to get better at making them.
i tried coding DVD bounce and flashlight shaders, both workn't
like it works but not in game
i gave up and start playing valorant with my e-kittens
cuz im sigma
im so sorry to say that
Worknât
no other words can describe it perfectly
Anyways
Thanks for the help
goodluc
WHAT!?!?
THIS EXISTS?????
IM GOING TO 1 in 6 chance to destroy card at the end of round MYSELF
đ
hehe am bana

somehow
i am struggling to find proper documentation for smods
how would i check if the card that is being sold is of a specific consumable type?
return {
func = function()
card.ability.extra.heldPages = math.max(0, (card.ability.extra.heldPages) - 1)
return true
end,
message = "Lost..."
}
end```
i have this but am struggling to find how to use context.card:
context.card.config.center.set == "Tarot" i think?
i was about to say your return looks wrong but its just the indentation
sob
yeah mb im using joker forge for more basic stuff because i find that easier than going through smods documentation, and their code gen is a bit wack, but otherwise i love that damn site
also yup that worked thank you!
its definitely a good starting place
but its very much worth learning how to code yourself though!
im doing that by kind of using joker forge as documentation
It's wacky but it works.
if i knew where to find all the functions of stuff i would probably do it myself
Smods Documentation has some of the info
Otherwise I took most of my knowledge from N' in this channel
mods/lovely/dump/ contains a dump of all the source code with the modifications made by things like SMODS
hi
You can add that to your VSC workspace
What's up N
im modding
you look beautiful in the sunrise
i see, thank you
you look like dilly
what the hell
what do you mean 3 new gifts

you have to go to the moon
What did you get
i do love going to the moon and women
Nice
i dont know any of these games
i think 2 of them were on sale so i figured why not
OH MY GOD I HAVE TO GIFT N SOMETHING IVE GIFTED ALL OF MY FRIENDS
oh ive scoured it before asking the question
now, N
im scared
you are not allowed to decline this gift or i will just constantly rebuy it until you do
i can just hide things from the library dont worry
No problem with that, this channel is the single reason I am still here
How much does it even cost?
99 cents
Damn
idk why but its always customary i gift my friends this game
this was when it started
I once gifted toilet simulator to my friend when we were at a school trip
It wasn't a happy time for me
Oh damn it's on 51% off
i wish there was an easy way for me to see in total how much ive spent on gifts vs stuff for my own acc
cause ive spent alot on friends too
soon ill hit the 1 million mark
oh my god i have to gift bepis that game too
soon...
HELP
hey there bepis buddy
hi dilly

i dont like being in modding chat myself
-# dont even bother checking
thats why here is my general
Negative?! Like the edition?!
+1 Joker Slot
+1 Discord channel
thanks! :D
everyones art is perfect and i would give it all a nice little smooch
so true
so true đ„
đ„
Hey dilly
hi
im gonna be going to a retro store here pretty soon today
'just gotta get off my lazy rear
the thing is that
my pc is dogshit
so i cant really expect to play any games i want
no point in wishlisting in which case :3
how am i suppose to gift my friends smh
N has just been suffering by being my gift mule
đ
Poor N'
poor guy now has to make 8 of my mods
true...
and then he has to download me a car
oops
i will pirate u a car
correct use of multiboxes
hell yea
im not that picky, any will work
Alright, so I'm currently working on something and just trying to make sure I have this right.
mhm, but also, you want to put self.GAME.iScore = self.GAME.iScore or 0 in the hook, G.GAME doesnt exist by the time your files load i think
are you trying to create and open a booster pack when round ends?
yeah
in what context are you doing it
calculate = function(self, card, context)
if context.end_of_round and context.main_eval and context.game_over == false and context.beat_boss then
G.E_MANAGER:add_event(Event({
func = function()
G.E_MANAGER:add_event(Event({
func = function()
local booster = Card(G.play.T.x + G.play.T.w/2 - G.CARD_W*1.27/2, G.play.T.y + G.play.T.h/2-G.CARD_H*1.27/2, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS.p_gfy_booster_gfy, {bypass_discovery_center = true, bypass_discovery_ui = true})
booster.cost = 0
G.FUNCS.use_card({config = {ref_table = booster}})
booster:start_materialize()
blocking = true;
return true
end
}))
return true
end
}))
return {
}
end
end
}
Alright, anything else I need to do then?
or is that literally just it?
nope, G.GAME.iScore will always be 0 when a new run is started, but its value should retain when you resume the run
oh cool.
i was about to say myst's lcorp does the same but they made it happen here specifically
try doing it in context.starting_shop instead
So the idea is that I'm adding a pseudo imaginary score. it'll have its own tab possibly and it'll just be [iScore Value]+i as the ui
Yup
No crazy talisman shenanigans or anything
Just making a new container and using it in a slightly different way than people would think
thats really nice, WE all hate talisman (yes, you and me)
I really wish there was a fix for it though, I'm gonna have to make a lock for anything that would potentially need it for super high scores unless I just say "it's naneinf"
ive been conditioned to like it after all the effort to make all my shit compatible
interesting, looking forward to how you implement this :3
-# in my school we actually havent learnt imaginary numbers yet so i will pretend i understand this whole thing 3:
i dont
out of spite i literally imported a new num library from roblox into yggdrasil just so i dont need to use talisman
youre the mf who told me to put in talisman compat
dosn't work
do you know how to make an event
So my process of Imaginary numbers is a bit different from the actual case.
see, in actual math i^2 = -1. but with how I'm implementing it, think of the imaginary number as a container that'll hold the imaginary score. That "iScore" as i'll call it, can become real through certain card effects.
yeah
You'll be able to turn Score into iScore and iScore into Score
put the code in an event like the one here, specifically with the if state_complete check
#đ»ă»modding-dev message
mm i did?
I just need to make a check for if iScore <= 0 to make it 0 basically
damn im killing myself in the past then, brb
Yea
So now you can get in there and give me a new library and make it all work
Any way to disable edition sounds when a card is added to deck?
I kinda don't undestand how to code should look
G.E_MANAGER:add_event(Event({
func = function()
if G.STATE_COMPLETE then
-- booster code
return true
end
end
}))
oh boy... what the heck is this in astronomica...
I'm trying to understand how their score calculation works to try and remake it
still not wokring :/
is it not working at all or is it displaying the cards on top of the UI
not working at all
in the extra table of card eval status text, whats the key for changing the sound played
can you post the code
sound, i think
at least it is if you use SMODS.calculate_effect
calculate = function(self, card, context)
if context.starting_shop and context.beat_boss then
G.E_MANAGER:add_event(Event({
func = function()
G.E_MANAGER:add_event(Event({
func = function()
if G.STATE.COMPLETE then
local booster = Card(G.play.T.x + G.play.T.w/2 - G.CARD_W*1.27/2, G.play.T.y + G.play.T.h/2-G.CARD_H*1.27/2, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS.p_gfy_booster_gfy, {bypass_discovery_center = true, bypass_discovery_ui = true})
booster.cost = 0
G.FUNCS.use_card({config = {ref_table = booster}})
booster:start_materialize()
return true
end
end
}))
return true
end
}))
return {
}
end
end
}
alr thanks
beat_boss doesn't exist in starting_shop
you will need to store it beforehand
ughhh
Que
and how would i do that?
try it without that beforehand
you're missing the reference call in the hook
Where's the original function call?
reference call?
you should have iScoreRun(self,args) somewhere
inside the function
oh right
G.STATE_COMPLETE
Okay i added it, still have the same problem
?
you wrote it wrong
I did?
not you
oh ok
No i didin't
remove the G.GAME.IScore at the beginning
oh ok
reread it
you have a . instead of a _
Now to figure out where Round_Score's value is and where I'm gonna put the imaginary score
can i see the code again
N' do you want me to take a ss of their* code so you can read better đ
no i want the new code
i meant like, the formatting and stuff, since im actually worried how you can read code on phone
sob
it's not that long
Like I'm thinking i may have to shrink down the hand to something like this and add Imaginary score like that
calculate = function(self, card, context)
if context.starting_shop then
G.E_MANAGER:add_event(Event({
func = function()
G.E_MANAGER:add_event(Event({
func = function()
if G_STATE_COMPLETE then
local booster = Card(G.play.T.x + G.play.T.w/2 - G.CARD_W*1.27/2, G.play.T.y + G.play.T.h/2-G.CARD_H*1.27/2, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS.p_gfy_booster_gfy, {bypass_discovery_center = true, bypass_discovery_ui = true})
booster.cost = 0
G.FUNCS.use_card({config = {ref_table = booster}})
booster:start_materialize()
return true
end
end
}))
return true
end
}))
return {
}
end
end
}
đ
you dont need to add a return{} there
G.STATE_COMPLETE
ok now it works
now how can i store that the boss was beaten
try it again with the end of round stuff
unrelated but fix your indentation and remove the return{} at the end too, its not necessary
it still renders cards above the ui
damn
well you can do
if context.end_of_round and context.main_eval then
card.ability.extra.beat_boss = context.beat_boss
end
if context.starting_shop and card.ability.extra.beat_boss then
-- your code here
end
it works!
Thx!!!
Excuse me, how do I make the multi text appear as multiplication? like {C:mult}X3{}
Hey! If I've created a new area and want to emplace a card on it. Why doesn't this work? I mean, the count limit increases as it should but the card is not shown. Any ideas?
---Adds card to managers area
---@param card table|Card|true card to add to the manager area
Pokerleven.add_to_managers = function(card)
if card.edition and card.edition.card_limit then
Pokerleven.ina_manager_area.config.card_limit = Pokerleven.ina_manager_area.config.card_limit +
card.edition.card_limit
end
Pokerleven.ina_manager_area:emplace(card)
card:add_to_deck()
end
did you remove it from the previous area
Ah, more Score shenanigans.
Mmm what do you mean by that? I'm testing this by buying it from the shop. I thought nothing else was needed
Am I missing something?
question, why is it requirements? đ€
i dont know what you do to make it go there when you buy it from the shop but you need to remove it from the shop area first
ÂŻ_(ă)_/ÂŻ
# Add joker to managers when buying from the shop
[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "G.jokers:emplace(c1)"
position = 'at'
match_indent = true
payload = '''
if Pokerleven and Pokerleven.is_manager(c1) then
Pokerleven.add_to_managers(c1)
else
G.jokers:emplace(c1)
end
'''
This is what I do
that looks fine
question, anyone knows where the code for adding buttons in the run info menu is
But I do still need to remove it from shop area?
i dont think so, im pretty sure it's already done before that code
Can you show your area definition
local game_start_run_ref = Game.start_run
function Game:start_run(args)
self.ina_manager_area = CardArea(
0,
0,
self.CARD_W * 1.9,
self.CARD_H * 0.95,
{
card_limit = 5,
type = 'managers',
highlight_limit = 1,
}
)
Pokerleven.ina_manager_area = G.ina_manager_area
game_start_run_ref(self, args)
Pokerleven.ina_manager_uibox = UIBox {
definition = Pokerleven.create_UIBox_manager_area(),
config = {
align = 'cmi',
offset = { x = 2.3, y = 3.5 },
major = self.consumeables,
bond = 'Weak'
} }
end
Pokerleven.create_UIBox_manager_area = function()
return {
n = G.UIT.ROOT,
config = { align = 'cm', r = 0.1, colour = G.C.CLEAR, padding = 0.2 },
nodes = {
{
n = G.UIT.O,
config = {
object = Pokerleven.ina_manager_area,
draw_layer = 1
}
},
}
}
end
Change the type to joker iirc
Your made up type wonât have any handling of what to do
So it defaults to acting like the discard area iirc
why isn't the color changing on this pack?
I believe it should be in its own function like this
ease_background_colour = function(self)
ease_colour(G.C.DYN_UI.MAIN, G.C.SET.ortalab_loteria)
ease_background_colour{new_colour = G.C.SET.ortalab_loteria, special_colour = G.C.BLACK, contrast = 2}
end,
thx
If I want to create new buttons for that area or reposition them should I create a new type ? Or how does it work?
I ask mainly because rn my sell button appear like this:
You can control the buttons based on the type of the card, rather than the area
Got it. But maybe I need to create a new type for that area. How can I create a new type?
You just need to add handling for your type to all the cardarea functions that check the type
Does anyone know how to create a random skip tag? was looking at the steam modded and balatro jokers and i dont think there's any documentation on it
There's only really information on how to create specific tags
wym random skip tag?
this doesn't work
says card is a nil value...
im gonna try something else...
maybe a local variable?
wish i knew more lua!
oh. the arguments for calculate are (self, card, context)
not what you have
hmmm
i see
so my reading comprehension being cooked is the problem?
gotcha
ill try that first then
thanks
it says ability is a nil value
i guess ill print these to log and see whats up then
is this for a joker or something else
deck
for decks it was something different let me check
oh thank you
you know, i wouldn't mind using variables if thats what a local is
is there any reason not to?
yes, things you save to a local are not kept between function calls
i see
so that means continuing a run would...
gotcha
thanks
okay
i have no clue what im missing
card.ability is apparently bad so...
card.effect.extra.*?
is that right?
i guess ill try that
why does this not work? i want it to add a blue seal to on random after scoring but it's not doing anything
How do I make these actually readable?
im guessing other_card doesn't work with context.final_scoring_step?
it doesnt
calculate = function(self, back, context)
back.effect.extra.current_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante
if back.effect.extra.current_ante ~= back.effect.extra.last_ante then
G.jokers.config.card_limit = G.jokers.config.card_limit + (back.effect.extra.current_ante - back.effect.extra.last_ante)
back.effect.extra.last_ante = back.effect.extra.current_ante
end
end
any alternatives? cuz with context.individual it adds the seals the moment the cards are played and it looks weird
try adding one more ,true to set_seal
aaaand now it says extra is a nil value
actually what im trying to do might work regardless of this fact
weird
actually
everything outside calculate only happens once right?
depends what you mean by everything
i mean
if i do
local variable = 1 outside calculate
that only happens every time i start playing the run right?
(both starting a new run and loading a save)
that happens everytime you open the game
so it will not reset between runs
but it will reset if you close the game
i can work with this i think
so just to be clear
i only need to type in "local" the first time i use a variable right?
yes
still doing the same, look how the seals pop in when the cards are played. is there a way to change that or do i just have to deal with it?
here's the code in case it could help
oh you might need to do it in an event
local last_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante local current_ante = last_ante calculate = function(self, back, context) current_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante if current_ante ~= last_ante then G.jokers.config.card_limit = G.jokers.config.card_limit + (current_ante - last_ante) last_ante = current_ante end
that should do it...
sigh...
anyway i found the issue
calculate = function(self, back, context)
back.effect.config.extra.current_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante
if back.effect.config.extra.current_ante ~= back.effect.config.extra.last_ante then
G.jokers.config.card_limit = G.jokers.config.card_limit +
(back.effect.config.extra.current_ante - back.effect.config.extra.last_ante)
back.effect.config.extra.last_ante = back.effect.config.extra.current_ante
end
end
decks are weird
hmmm
i tested it and it works properly
bless u
hey, how do i change base hand values in my mod?
G.GAME.hands[handname].s_chips & G.GAME.hands[handname].s_mult
Just don't forget to update the total values at G.GAME.hands[hand].chips & G.GAME.hands[hand].mult respectively.
See how I did with per-level values.
going the main menu at the cash out causes and extra joker slot once loading in...
oh well, ill fix it later
thanks for all the help!
yo, does this code need to be in a specific context? cuz at the minute it uhhh isnt doing anything
somehow despite having a not context.repetition context check, the code for enhancing the card still gets retriggered (doesn't show visually but the lucky card gives X2 mult as if it were a glass card)
how do i make it only trigger once?
why not just do the random enhancement inside a func() in the reptition return table?
also for random enhancement you don't need to do all that, you can just do
context.other_card:set_ability(SMODS.poll_enhancement{ guaranteed = true }, nil, true) and that'll give it a random enhancement
The Card of Man.
yeah idk how to use functions this whole thing was made with joker forge, all i did was add not context.repetition
but if it's unnecessary ill change it then
yeah, the message is superfluous too
from context.repetitionyou can just do lua return { repetitions = card.ability.extra.repetitions, func = function() context.other_card:set_ability(SMODS.poll_enhancement{ guaranteed = true }, nil, true) end } and then nix the top condition. that'll make it do the random enhancement only once, but i'm not sure where it puts it in the order of events
Forgot a , after repetitions = card.ability.extra.repetitions. đ
oop
And you may want to also local context = context for the func outside of return.
true, context does change đ€
i tend to just do local cardRef = context.other_card before the return and then do whatever i need to do to that
you dont need to i dont think because its not in an event
ÂŻ_(ă)_/ÂŻ
? i'm fairly certain that most things you return from a joker end up in the event queue
not func
ah
yah card edits
speaking of somewhat obscure optimisations, @red flower i looked at how vanillaremade does raised fist for a thing and i'm wondering if this constant iterating for every card in hand is performant
i feel like there's a better way to do this
like what if you have a massive hand
you can probably do it in an earlier context yeah
Find card in context.initial_scoring_step, tag it, then untag in context.after.
wow!
i somehow fixed it!!!
good evening my dear friends
yippeee
wouldn't that break repetitions
do i put this outside return, outside func but inside return or inside func?
probably better to untag in hand_drawn and end_of_round
i want to try attempting to code again, but i'm kinda scared to ask and look stupid (part 2) đ
shoutout to the letter n
definitely within the top 26 letters of the alphabet
local context = context
return { ... }
That could work too.
this doesnt do anything
because the table will be the same
like this?
Probably just me being overly cautious. đ
Then fair enough.
if the original context changes the local will change too
it's giving this crash and local context = context doesn't seem to solve anything
try local other_card = context.other_card
and then use that instead of context.other_card in the func
i put this one above return too right?
yes
oooh spooky
i can use the debug mod to +1 ante
but the joker slots doesnt update for some reason
beating a boss blind causes the ante to go up by one again but little joker slot number doesn't update
but when i try to buy a card, it works!
and the number suddenly increase by 2 to match the ante number...
very spooky...
probably a debug mod quirk though
chat, so
i was looking at the code for other mods and what does the "atlas" part mean
SMODS.Atlas({
key = "conjoined_joker",
path = "j_conjoined_joker.png",
px = 71,
py = 95,
})
this is from the multiplayer mod
it loads the sprites
what i'm not understanding is where i add any of this code-
How do i make complex score not a "nil" and instead the number + the letter i at the end
anywhere before you make an object that uses that atlas
wait, can i make a folder and make each separate joker there
to do comments, i do " ---"?
also, is it known that if a modded joker is copied by invisible joker, the copy intially has the wrong atlas?
--
just two, got it
N' why do you hate "n" and "N"
i dont think so
there were a couple of set_ability changes, i would report it
OH because youre N(prime)
i'm working on a card that applies the blueprint effect to the card to its left and the card to its right. how can i return blueprint_effect() 2x? can i also apply a message? here's what my code looks like now
if context.joker_main then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == self then
SMODS.blueprint_effect(self, G.jokers.cards[i-1], context)
SMODS.blueprint_effect(self, G.jokers.cards[i+1], context)
return {
message = "Divine Touch!",
card = self
}
end
end
end```
it's en apostrophe
the â
N' my goat
to add a message you would need to add a third table to merge_effects with the message
how do i make my message appear as code? like you guys are doing
oh awesome thank you
```lua
```
oh
test
?
oh, nice
thank you!
assert(SMODS.load_file("jokers.lua"))()
can i add multiple of these? for like, each joker i mean
on my main.lua i mean
as many as you want
Uhm now i have one more problem with this joker
if i have my consumable slots full
the booster goes into my joker slots
and the game is stuck
add a check for consumable slot
thats funny, i have no idea why
but then it won't give me pack at all if i have full consumables
make the packs spawn in shop for free
is a better approach
well that's kinda what happens
it spawns them in the shop and then uses them automaticlly
well it's just here
oh that's a nice art
loc_vars = function(self, info_queue, card, booster)
end,
calculate = function(self, card, context)
if context.end_of_round and context.main_eval then
card.ability.extra.beat_boss = context.beat_boss
end
if context.starting_shop and card.ability.extra.beat_boss then
G.E_MANAGER:add_event(Event({
func = function()
G.E_MANAGER:add_event(Event({
func = function()
if G.STATE_COMPLETE then
local booster = Card(G.play.T.x + G.play.T.w/2 - G.CARD_W1.27/2, G.play.T.y + G.play.T.h/2-G.CARD_H1.27/2, G.CARD_W1.27, G.CARD_H1.27, G.P_CARDS.empty, G.P_CENTERS.p_gfy_booster_gfy, {bypass_discovery_center = true, bypass_discovery_ui = true})
booster.cost = 0
G.FUNCS.use_card({config = {ref_table = booster}})
booster:start_materialize()
return true
end
end
}))
return true
end
}))
return {
}
end
end
is that mending I?
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/crash_handler.lua"]'
pattern = "Oops! The game crashed"
position = "at"
payload = "Whoops! The game crashed"
match_indent = true
...doesn't appear to be hitting - is the pattern not valid?
-# Just trying to change string of it.
the pattern has to be the whole line
question about this
i have no idea
Ugh
now i have no consumables
but the pack still went to my joker slot
đ what is happening
your joker slot of the joker area in the shop*
i'm using an older version of steammodded. when i try to change the calculate function to take self, card and context, it tells me that context is nil. is that because the version i'm using doesn't support all three arguments? i've been using self and card interchangibly, should i not be?
the game looks like this
yes, old versions take 2 arguments iirc
self and card are different things in recent versions, self is the prototype and card is the actual card object. most of the time you want card
.
also merge_effects is a new addition so you want to update anyway
what exactly happened here? can i get some help?
[[patches]]
[patches.regex]
target = '=[SMODS _ "src/crash_handler.lua"]'
pattern = "Oops! The game crashed"
position = "at"
line_prepend = '$indent'
payload = '''Whoops! The game crashed'''
times = 1
...would this be it instead then?
i think it can't find your main file or another mod's main file
ok now if i have full consumable slot it works
i have no idea what is causing this bug
oh, imma try 1 by 1 and see which one screws up
add_to_deck = function(self, card, from_debuff)
SMODS.Enhancement:take_ownership('mult',
{
config = {
mult = 2
}
}, true)
end,
it seems this applies only to mult cards created after this triggers, how would i do it properly so it applies to all mult cards when its held?
regex needs to also be the whole line iirc
but you can add .* on both sides im pretty sure
not jokerdisplay :3 (i hope)
uh.
you would need to iterate over the deck and change the values
but also this is wrong and it will affect future runs too, don't take ownership during a game
yeah you would need to do (.*) actually and add the matches to the payload
i never use regex patches so im not sure about the syntax
noted, thank you
is that normal?
how to fix memory leaks
how do i change the joker sprite. i know its in the update thing but im not sure how to do it properly
think you can use :set_sprites(_center)
if I use SMODS.has_enhancement(card) it should return true if card has ANY enhancement right? I don't need to specify an enhancement, do I?
it's mine lol
graaahhh
make sure to include the subfolder in the string path if you have one
How can i get a handlist that is in the games current language?
so what's causing the behavior here? it should only apply an enhancement if the card doesn't have one, shouldn't it?
no
oh
would following cryptids mods implementation of exoplanet/stardust but replacing the holo/poly check with a mult echancement check work?
'tis fair... but still no dice and I don't want to outright replace lines, just swap specific part of it.
you want next(SMODS.get_enhancements(card))
i mean if you replace them for the same thing with the string modified it's practically the same
dunno i dont play cryptid nor look at its code
fair enough
like so?
does this have examples of what the main file should look like?
is it possible to have 2 of the same context used in one calculation?
why does this booster pack show error when I use it? it displays all the info normally when it isn't opened
no, it should be a valid lua file
it can be empty even
yes but it depends on what the logic is, if you return in the first context check then it won't check the next
all mine has is this
assert(SMODS.load_file("trans_joker.lua")),
can i see the code
it's the comma
i had a similar problem, add a misc then dictionary in en-us
remove it
it's a separate localization entry
https://github.com/Steamodded/smods/wiki/SMODS.Booster
how can i give a number of stone cards depending on a variable
still crashing. even without the comma was crashing
is that the whole thing
what's the name of the file and the name on the json
main.lua
jason_smith.json
đ
oh ok thanks
i mean what you out in the json as your main file
is it main.lua too
for loop
i think i was like "i'll change this later after i actually make it"
in an event
can you give an example on how will that look
at least you can fix it now
yeah sure 1 sec
func = function()
for i = 1, card.ability.extra.stonecards do
--code here
end
return true
end
}))```
and have a variable in your config be
config={extra={stonecards=3}},
thx!
and what is the id of a stone card?
how do i check if card has seal?
i figured out the crash
card.seal
"m_stone"
deleting this fixed it lol. it might by the file itself
ok thanks
what if i want to check if seal is a specific seal?
lua is homophobic
...or perhaps the code in that file is fucked lol
...I just had to change the target file.
key = "trans_joker",
path = "placeholder.png",
px = 0,
py = 0,
})
SMODS.Joker({
key = "trans_joker",
atlas = 'Trans Joker',
pos = { x = 0, y = 0 },
rarity = 1,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
cost = 4,
})
this is what's in it

