#💻・modding-dev
1 messages · Page 435 of 1
Huh 😭
I'm guessing the new line symbol makes it so the game doesn't actually know it's a new line?
So it doesn't push everything else down
o
testing this functionality is so annoying because it deletes my directory every time it fails
Maybe disable that? 😭
oh yeah it might be newline
Discord converts indent characters into four spaces each, so your client can send a message thinking it's under the character limit, only to be blocked. That error message you see is a generic response trying to appear more specific than it really is.
the box handling that doesn't actually handle newlines
though of course the actual text displays it properly
:/
Ah
if i wanted a joker to activate only when all cards in a pack have been created, how would i go about doing that?
When I had to do similar for my mod, I just made a way to generate the overlay with dummy data using a keybind
thanks for the help. im in asia and am going to go get some sleep now but I definitely want to keep working on things and learning how to make stuff
I mean I'm also testing if it actually installs the files correctly so it kinda has to delete the directory
how do you add custom sounds?
SMODS.Sound, there's a page on the smods wiki for it
that's good! you should totally keep getting experience
btw how can i know every joker that is currently in the game?
vanillaremade
will it play the entire sound? or can you adjust it?
I'm relatively sure they just mean installed mods.
oh so there's no way to know?
oh
then ill limit it to some mods
Ive got this code, whenever I try to open my deck it gives me this crash
calculate = function(self, card, context)
if context.discard then
full_hand = context.full_hand
for i=1, #context.full_hand do
context.other_card = full_hand[i]
other_card = context.other_card
other_card:set_edition(poll_edition('Jevil', nil, true, true))
other_card:set_seal(SMODS.poll_seal({key = "Jevil", guaranteed = true}))
other_card:set_ability(SMODS.poll_enhancement({key = "Jevil", guaranteed = true}))
SMODS.change_base(other_card, "Spades")
end
end
end,
G.P_CENTERS
uhhh you could just do create_card with set = "Joker" but thats biased for rarities
will that give me every joker?
thats also boosters i think
Yes, you just put all the jokers in a table from there.
so i use G.P_CENTERS on my calculate, and inside it i put every joker i want to use?
No, ```lua
local jokers = {}
for k, v in pairs(G.P_CENTERS) do
if v.set == "Joker" then
table.insert(jokers, v)
end
end
bump
if i have to guess its probably the key part
you might want to change key to type_key 🤔
ill try that
idk man read the wiki page
hm, nope same crash error
mm
do you know which line is causing this error
let me check and see if its what i think
if not can you add some print functions after each one to check which function is causing taht
yeah, i might need to see whatever line that is to make sure which is the error
wait, is set ablity how you set a cards enhacement?
yes
okay, all the passes work, its reaching the end fine
weird, why is card sleeves coming up in the crash log
How would one make a joker gain X Mult when a joker is sold?
let me check something
I would look at campfire's code
okay, card sleeve isnt causing it
wait, i think i know what could be causing it
let me check
got it
it was fucking cartomancer
sob
the Steamodded documentation mentions aSMODS.destroy_cards(cards) utility function, but when i try to call it the game crashes, and that function doesn't seem to exist in src/utils.lua
watch this
so is the documentation wrong?
no, have you thought first that your version might be outdated?
mine keeps pausing to buffer
discarded cards enhacement animations play multible times
I honestly couldn't find the code
let me see if i can make it a gif
oh yeah, that might be because context.discard runs for every card thats discarded
oh.
i think theres context.pre_discard? not sure if thats the right one
N' have you checked my function that checks for function that checks for even numbers 😊
let me try that rq
i wish i didn't

great
crashes when i select a card
wha
😭
context.context
lmao
:3 thats an image
just kidding i guess, it aint moving
thats a freaking image.
how the fuck did i manage that
its literally a png 😭
Cool png
ezgif
>returns a png
i see
it works fine now, thankfully
wow that 9 of spades is cracked
Thats Jevil crossed off the list
red seal AND polychrome
and glass
how do you make a joker that goes eternal after being bought?
context.buying_self exists now
document where
@/eremel
:3 in my defense
now i wonder, what happens if i double jevil
card.ability.eternal afaik
might be card.ability.self.eternal
eh
Code?
can we see line 1801
(also with that many lines you should really separate into multiple files)
sure
-# ik i should, but not yet
vruh
copy paste
do you have everything in one file
where is this
beginning of the code
:3 probably put that in your calculate instead
oh ok
that could be inefficient if it has to do that every calculate
mm true
it could instead hook the main menu function and store the table as a variable of the mod or a unique global name
though im pretty sure just grabbing something from G.P_CENTERS wont make it a Card
but i think i understand it now
so i think thats not the problem here
so?
youd need a card object right
yes
so how do you get that from a P_CENTERS entry
ru asking me?
nah im just generally asking
ok
okay i've updated steamodded so that function does exist now, but the game is still crashing with attempt to call field 'destroy_cards' (a nil value)
any suggestions?
im thinking about using SMODS.create_card (or just create_card), remove its back so that it shouldnt have any sprite, run calculate_joker off that and probably remove it later on? 🤔
not sure if thats a good approach
so then what could be a way to fix my problem?
i want to copy a random joker's ability
For future reference, code formatting is provided by the language extension - gotta install the Lua extension or a formatting extension like Prettier first
Didn't know they don't have it since vscode seemed to have colored code
when does it change which joker it’s copying?
before earning money or after
on main eval
VSCode includes basic syntax highlighting for a bunch of languages, but features like Intellisense, linting and formatting have to be provided by a language server extension
Whatever it's hard to guess with a pic alone, maybe you should give that advice to them
It seemed like their issue was fixed, I was just trying to let you know why the format option was missing for them 🙂
Is that necessary? Like what happens if you create a card object and never add it to deck
bunp
take ownership of the four arcana packs and use SMODS.calculate_context
more ownership. yay
as if i havent made this incompatible enough with other mods already
should i be ashamed
..no?
for a sec I forgot that was an ai tool and thought it was the mouse cursor
oh good
it could be anywhere tho watch out
scary…
How dare you ask questions to something that doesn’t respond with “marked as duplicate” and “closed”
I know of it but I've never used it or seen its code
how do i duplicate every card in the deck once?
is there any way to obtain the score of a single hand?
for what?
like
after cards and jokers are scored
the effect would probably have to go into context.after
ignore how it looks visually terrible I'm still working on that
or don't ignore it because I don't remember how to put the text on separate lines
Ah. Smods uses V, see https://github.com/Steamodded/smods/blob/7d9be20bc4bd0fa9b3141d5c72b70d54c95b81f6/src/ui.lua#L1919 for usage and https://github.com/Steamodded/smods/blob/7d9be20bc4bd0fa9b3141d5c72b70d54c95b81f6/src/utils.lua#L657 for implementation
this dupes the same card a LOT of times
oo
thanks :>
does V still work if the version has a v in front of it
Like if I fetch a version and it says "v1.0.0" instead of "1.0.0"
probably not but try and see what happens
unfortunate it does not
Hello french lady
meoww
Is the Jojo modding going smooth ?
I'm getting tired of asking people to update my mod when I add something so I'm programming a prompt into the game so it updates it for you
I mean those can have random weird names sometimes so kinda scary to assume it'll be a valid version number
Holy
why does card.ability work in literally every other mod I've used but not mine 😭
It works perfect tho
Eh
I'll let other people deal with that if they want to steal my code for it
If they're naming their version names wacky things that's kinda on them at that point
Good kitty
which vanilla file contains the jokers' code?
meoww
is there any way to obtain the score a hand gives?
say like, lvl 1 pair with no jokers and two plain face cards to give 30 chips and 2 mult
i want to know where the "60" is stored
Fair enough. You should get 99.9% of cases anyway by doing a regex like (\d+\.)+ on the github version name
I thought lua didn't support regex
it doesn't
I hate writing lua pattern matches
so I usually just give the equivalent regex when talking about it
lemme ask google to translate it 
you're telling me you need to do a for loop of pattern matches
Could someone tell me why Celestial Packs are still showing up in the shop with this?
G.E_MANAGER:add_event(Event({
func = function()
SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_normal_1}
SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_normal_2}
SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_normal_3}
SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_normal_4}
SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_jumbo_1}
SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_jumbo_2}
SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_mega_1}
SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_mega_2}
SMODS.add_card({set = 'Tarot', area = G.consumeables, key = 'c_high_priestess'})
return true
end
}))
end```
I think (%d+%.)+ will work?
Hey, does anyone happen to know the name of this card area thingy idk
(like, hand, discards, jokers, etc)
it seems to say that would only capture the last match
oh wait my regex doesn't include the last version digit
lol
could do something like (\d+\.)+\d\S*? 🤔
hooooow do i do something like hooking to the calculate of an object 🤔
i think i might be dumb
I have. No fucking clue.
that would make sense if the calculate function was undefined?
Do you happen to know the answer for this one?
🤔
It seems you're trying to hook and make the function at the same time so yea
G.pack_cards
uhhh how do i hook then :3
you can't really pre-emptively hook a function that doesn't exist yet
true
what's the intention of this hook if I may ask?
why are you hooking your own function
uhh its for my relics system, there r some relics that increase +mult, xmult and such, so im thinking about hooking to calculate to increase them
sort of a generalist type system?
e.g. if the relic has the "+mult increase" type it'll automatically increase it without having to do copy-paste it every time?
mhm
oh
Okay I managed to get everything else working finally
so this would give 4.5 mult instead
how do I make the text be multiline
Can't that be done in its induvial calculation functions?
just create multiple G.UIT.T in G.UIT.C, probably
i do have this
o
I really need some sleep
🤔 i feel like reducing the hassle of needing to remember and write extra stuff in your calculate would be nice, since im trying to make yggdrasil an api mod too
hm
I might need to put it in another node
just needing to return {mult = 5} would be nicer than return {mult = 5 * gainsMulti["mult"]} imo
honestly making a custom calculate function might be best? 🤔
this is quite puzzling
G.UIT.C instead of R
You could modify it if you really wanted to
if I have C instead of R it messes up the buttons
which are conveniently just barely out of camerashot
is there a context for using a specific consumable?
I was thinking of
calculate = function(self, card, context)
local result = self:calculate_ygg(card, context)
if result.mult and SMODS.find_card(...) then result.mult = result.mult * x end
return result
end
so it could also be hooked by others
mm
might need to figure out how to make my own calculate then 🥀
hopefully its not that bad
constellation uses context.consumeable.ability.set so itd be something similar to that right
you get the full consumable data right? could just check the parts you need
is this how i do it
then im guessing i will need to patch something in here so that it will run calculate_ygg if its a relic from my mod? 🤔
i dont know what parts im meant to be checking 
check that context.using_consumeable is true first, and then you can do further logic with context.consumeable
omg hi 
bevweb
toneblock
how do quantum enhancements work?
i think im too dumb to figure this out,
a
i wanna make an enhancement that works with other ones
I'm just gonna ask: is there a function for banning specific booster packs in custom decks?
Nah this is just a complex task with limited documentation
You'll get there
no but you can hook start_run and ban things there
actually, wait the fuck on
do i put this in SMODS.Center:extend
i think i found the problem on the copying a random joker :/
it returns the whole thing
so is this correct 
nop
it doesnt crash the game but also just nothing happens when i use the fool so
context.consumeable.config.center.key, im p sure
consumeable because 

oh
ah yeah 
so then how can i fix this?
and yeah this would be correct
context.consumeable is the card, not a string
i
dont know what im doing here at all ima be real
is there any mod that adds their own calculate??
where would i find these myself in the game files? like these contexts have gotta be defined somewhere in vanilla right
yeah but the documentation sucksssssss
😭 buddy you are better off reading this than the game's code, trust me
Baconator
any attempt at reading the documentation for me usually ends up in 10 minutes of being lost and then asking here instead
cooking bacon
actually that's true
Lmao
bro its totally easy once you figure out the basic structure
Check vanilla remade and you’ll find everything if you know how to search properly
i think the issue is more lua's higher skill floor than it is "bad documentation"
gameobject still confuses me 😭
yeah, my programming experience is a decade of scratch and like the bare minimum amount of js
i think i understand now, after reading partner's code
so idfk
that reminds me of myself tbh
holy fuck i need to patch EVERYWHERE to add context 😭
exactly
well i did touch python and gmlcode but idk
i think its just unintuitive, which isnt a bad thing once you understand it enough but it makes understanding it from the outset an issue
i also dont know steammodded which is a whole other thing
im more scared of eventually having to learn whatever gamemaker uses
wtf is this? 😭
you printed something
no way really
bro is printing the card
i meant
💀
genuinely if i ever make my own game its gonna be made in scratch and then exported with one of those html conversion tools
unprint it
i want a joker that copies a random joker in the game, so to do it i need to know what does the normal copying jokers copy to do so
vanilla remade
i went back to scratch and was annoyed at how slow it was
i mean i have the code to copy, i just wanna know what is being copied
🦭 yeah
random joker in collection?
yeah
blueprint compatibility or just copy everything
do you like, set_ability then calculate then set it back or something
surely that doesn't break
this is what i receive from the print of that joker copying a random joker
this is the code
its copying flower pot rn it seems
that's just the center ain't it
blueprint compatibility
yeah
oh good
but it aint the same as what blueprint copies
yeah how do i get the thing i need?
ok this has been the shortest amount of time between putting the joker in the game and having it entirely properly functional im a little taken aback
usually i get stumped on something dumb for like 4 hours
wait really?
i think i used something like that before
in my other mod
wait brb
ok didnt find it 😔
it was smthing abt creating a joker inside that joker
to use it
like idk if blueprint code is entirely usable here
i had that happen to me yesterday
so uh then
what's that solution?
where do cards go after they're played or discarded?
The graveyard
no like seriously
G.discard
🤷
G.biblically_accurate_hell
i want to make a deck that puts played/discarded cards back into the deck
Thats easy i think
I’ve seen people do it before
yeah i know bunco has a boss blind that does something pretty similar
Look in the bunco code then
have you seen what bunco looks like on the inside
i was hoping to just have the deck move all the cards in G.discard back into the deck instead of needing to patch the play and discard function to send the cards back to the deck
which context would i do that in?
not sure if there's a context between after and hand_drawn
the joker is vanilla if it has no prefix
yeah but each mod's
idk
well it's not supposed to do that
but you get the idea
crimson bean if it was different
question
the localisation file doesn't have anything designated section for boosters, should i just put them in the "other" category?
yes
Need advice fixing a text bug issue with malverk
For some reason when switching languages it doesn't properly update the text of some items such as decks to the new selected languages and keeps the text of the previous language
It seems to only occur when I have the texture pack object in my code, so I'm not sure if the issue is with how I set up my texture pack object or my alt textures
https://github.com/TChris2/BalaRTo/blob/main/BalaRTo.lua
actually that's a pretty fun joker idea
gain effect of a random joker every second
gg
oh man
okay i have a joker whose ability is "each scored 7 has a 1 in 2 chance to destroy a random card held in hand". if i just tell it to remove the cards straight up it does it at the start of the hand before anything is scored, but if i wrap the function call in an event (see pic) it destroys them after drawing the cards for the next hand. how do i get it to run this destroy_cards function when the 7 is actually scored?
i assume it's some trigger clause on the event manager but i can't find an option that looks right
If the chance succeeds, just "mark" the card with something. Then, for context.destroy_card, check for the given mark.
what's internally happening is that SMODS.destroy_cards sets up events itself
context.destroy_card will destroy after which is presumably not wanted
ok nvm ts not working
i'm not exactly sure why a non-wrapped call destroys cards early
how should pseudorandom_element work?
returns a random element from the table
how can i make a joker give a seal to a card
like if its the first hand played and theres only 1 card
give it a modded seal
I've been stuck on this for a few days, and I could really use some idea if anyone can help
Trying to make a basic map system, i'd like to use cards as "icons". when I add the button config to the card, it does the clicking animation, but doesn't actually trigger the function. I haven't been able to figure out why. This only happens when states.hover.can = true, but i need it to be true for the tooltip to show up, and I like the little tilting animation that comes with it. if anyone has any ideas at all, please let me know! 🥹
layer the actual button over it for detecting clicks? not really that money smaro to give advice but this might work
I tried doing that, but I don't think the G.UIT.O node can display any child nodes? Not sure. I may be able to create a separate UI element to do that, but keep all that aligned seems tedious. I'll try that if I can't work out anything else
dont cards usually have a "use" thing attached to them
maybe you can get that to function on the card?
and instead of the whole card being a button its adding a use thing which in my eyes seems more intuitive
that's for consumables, this is a joker, technically. I'd probably try the extra UI element first, I think i'd like it to just be one click rather than the "use" ui showing up
jokers still come with a sell button
maybe you can make it read differnt text
only other idea i have is make a custom tooltip overlay?
yeah I may be better off just making it a sprite than a card... may be able to also make my own custom object for it as well
anyone know how to add information about objects as an extra tooltip to a joker
like if i wanted to have the info for a seal be next to the jokers information
how would i do this
i don't know how to do it myself, but I do know there are plenty of mods that do it. you can also look at the source code for the spectral cards that give seals, or the vanilla remade mod would probably help too
https://github.com/nh6574/VanillaRemade
maybe this?
do you have a quick copy-paste example I can throw in my mod to test some stuff?
let me set something up that's a bit easier to copy paste, one sec
info_queue[#info_queue + 1] = G.P_CENTERS.pwn_hammerseal
would this be different for modded items?
dr whatsapp real
yeah it happens to be very similar to dr whatsapp
it's G.P_SEALS for seals specifically I think
bump
how can i fix this??
it was
probably a localization thing (withlocalize and G.localization)?
what are these values related to?
maybe, but presumably the localization code would run just once so afterwards I could just change the output.
yes but that would presumably also change it permanently 🤔
you could try and see what cryptid does for the M/jolly edition?
When I change a blind's size mid-round, the blind becomes smaller, but doesn't show it? Is there a way to change the display?
if context. and G.jokers.cards[1] then
would this be functional?
am looking for the right context for when ante increases
in calculate is it possible to return a function in the return part
Okay this should work. It just uses a random joker for the card
function ave_test_func(e)
print("click")
end
SMODS.Keybind {
key_pressed = "j",
action = function()
local map = map or UIBox{
definition = debugMapUI(),
config = {align='bm', offset = {x=0,y=G.ROOM.T.y-11},major = G.hand, bond = 'Weak', instance_type = 'CARDAREA'}
}
end
}
function debugMapUI()
mapW = 12
cellH = 2
cellW = (mapW / 3) - (0.6 / 3)
anteH = 3
c1_1 = SMODS.create_card({set = "Joker"})
c1_1.states.collide.can = true
c1_1.states.hover.can = true
c1_1.states.drag.can = false
c1_1.states.click.can = false
c1_1.T.r = math.pi/2
mapUI = {n=G.UIT.ROOT, config = {align = 'cm', colour = G.C.CLEAR, maxw = mapW}, nodes={
{n=G.UIT.R, config={align = "bm", colour = G.C.RED, minw = mapW, maxh = cellH, padding = 0.1}, nodes={
{n=G.UIT.C, config={id = '1-1', align = "bm", colour = G.C.CLEAR, minw = cellW, maxh = cellH}, nodes={
{n=G.UIT.R, config={align = "tm", colour = ave_brown, minh = cellH, minw = 3, maxh = cellH, r = 0.1, padding = -0.25}, nodes={
{n=G.UIT.C, config={align = "tm", colour = G.C.CLEAR, maxw = cellW, maxh = cellH, r = 0.1}, nodes={
{n=G.UIT.O, config={object = c1_1, button = 'ave_test'}}
}}
}}
}},
{n=G.UIT.C, config={id = '1-2', align = "bm", colour = G.C.CLEAR, minw = cellW, minh = cellH}, nodes={
{n=G.UIT.R, config={align = "cm", colour = ave_brown, minw = cellW, minh = cellH, r = 0.1, button = 'ave_test'}}
}},
{n=G.UIT.C, config={id = '1-3', align = "bm", colour = G.C.CLEAR, minw = cellW, minh = cellH}, nodes={
{n=G.UIT.R, config={align = "cm", colour = ave_brown, minw = cellW, minh = cellH, r = 0.1}}
}}
}}
}}
return mapUI
end
Paste that into your main .lua file
[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = 'G.FUNCS.hand_text_UI_set = function(e)'
position = "before"
payload = '''
G.FUNCS.ave_test = function (e)
ave_test_func(e)
end
'''
match_indent = true
times = 1
and use this to patch the function into G.FUNCS to make the button work
or just use your own function if you already have one patched
hit j once you're in game, won't work on the main menu
(accidentally pasted wrong patch, fixed now)
it doesn't? I thought it 100% needed to be patched in
no, you can just globally define G.FUNCS.ave_test in one of your mod files
oh. yeah that's good haha
I learn by looking through the source code haha, I patched in the atlas for my jokers manually before realizing SMODS.Atlas was a thing haha
i'm unfamiliar with the function SMODS.get_vanilla_joker_return, is there any documentation for it?
i think not
well whatever it is, it's returning nil. so it doesn't like the key or maybe the function itself. is that line 174?
I was looking, their code is a huge mess it looks like they have a function to override the gui generation
yeah that sounds like cryptid alright
I think what might be happening is there is some code somewhere that isn't refreshing the gui based on the actual card. I'm not sure where that code is though, because other stats do get refreshed.
are you sure that function exists? I actually can't find it anywhere. maybe I need to update my SMODS tho
ah, yeah that's likely your problem then
Hmm, this is a weird one. The card appears to be getting clicked, but none of the :click functions I can find seem to be getting called 🤔
yeah it doesn't make sense, I've been trying to look through the source code but haven't been getting anywhere 😮💨
thanks for your help regardless
I'll try some other stuff
#💻・modding-dev message ok i found where i received that code
the problem is that i dont find the function definition for SMODS.get_vanilla_joker_return
or in this case, SEAL
I can't find it there either, looks like they just forgot to write it. You'll have to add it yourself. my brain is too fried atm to figure out what any of that is supposed to do right now haha
guess ill ping him
been working on my problem for probably 6 hours straight now
@daring fern please help
does Card:click not get called at all
try not attaching a button to the Card and hook to Card:click instead
I wonder if this is a safety measure to prevent clicking on the sell or hover buttons while hovering over a card
from my very short testing: Card:click (or any other :click?) doesn't get called if .config.button is defined
Since the buttons are behind cards
actually instead of the button you can just do card_obj.click = button_func lol
yeah just redefining c1_1.click = G.FUNCS.ave_test should hopefully work
the hooking also works but that's probably worse
i have this joker that makes the reroll button become inactive, but is there a way of hiding it completely?
i havent found any means of making it completely transparent or anything
whats the atlas of jsut like any blind atlas
im making a boss blind and i just want a texture i can use
temp
i recommend against removing the reroll button, very invasive to other mods
but what if they dont plan for compatibility in mind
mm fair
i dont plan for compatibility really since its just a thing for me and my friend group but eh
isnt there jsut straight up a love function you can call that removes the reroll button
Is there a way to make a joker increase negative chances?
i was looking for one but couldnt find anything
if so, the reroll button is defined somewhere in ui_definitions.lua
Oops! All Sixes
do you know what it might be
they said negative chances, not chances
increasing just negative chances would be very invasive and probably not doable with mod compat
Probably not since the UI isn’t love
ah
Increasing chances increases negative chances
wdym the ui isnt love
actually?
No
could also just try to move it offscreen actually
It was coded by thunk
is there a love function for that
love is the game engine that thunk uses
Yes
What exactly do you want to achieve by “increasing negative chances”?
-# Hone, but for negative?
I want to make a joker that quintuples the rate at which negative jokers show up
Oh negative as in the Edition
I thought of it like negative events
Like a Glass Card not breaking
I actually know exactly how to do this haha, one sec
oh w lets go
Or a Lucky Card not triggering
thanks man
Quintuples the negative edition when an edition spawns, or just full stop increase the chance so editions in general are more likely?
Probably the second one
does that mean the reroll button is the joker rthat actally triggers via reroll?
Youd just need to change the get_weight function of the negative edition then, I’d recommend a hook
Ah, alright
the joke is that youre buying the reroll button itself to get a discount on everything
at the cost of not being able to reroll, because, well, you bought the button
Thank you!
of course it just shows up in a shop im not actually buying the button itself
It’s worth noting that a negative edition has a 0.3% spawn chance
whats the balatro default tag atlas
yeah. was also thinking maybe would be crazy if you can make it so that you make the joker as a funtional reroll button.
that would be funny but i dont know if i should try and figure out how active abilities work yet
it would be really funny if instead of rerolling when you click the button it showed "buy" and "use" buttons
this mod is like my first time coding anything outside of school
let me guess, you played lobcorp
you need to identify the UIElement for the reroll button, then call the remove() function on the UI element itself. it looks like the reroll button doesn't have an ID though, so it's a little awkward to get. You could do this by either doing G.shop.children[1].children[1].children[1](etc):remove() to get to the reroll node, or you could patch in an id for the reroll button itself and do something like G.shop:get_UIE_by_id('reroll'):remove()
the lob corp mod or the game? because yes for both
ooh
I made a mod that changes the reroll button UI if you have dunsparce from pokermon in your hand haha
my hunch was correct
np!
it comes back anytime the shop gets reloaded, otherwise you'll have to bring it back yourself yeah
oh ok nice
Corobo just sent me a video of her auto-updater working. Genuinely revolutionary 
real shit?
real shit
I've been begging her to PR it into SMODS lol
But for now I'm just gonna do a stealy stealy for Maximus
smods auto updater hype (i'm still gonna use git
what???
bumop
An auto updater?
attempt to index local 'p_edition' (a nil value)?
would be nice but also 15 mods with "update me!" would be kind of annoying if I have to click through all of them
She said she wants to make it stack so it grabs all of the mods at once instead of doing each individual one
For some reason, balatro crashes and says that the value of the chips is a "nil" value in the line.
How can I fix this?
How does it work?
You'd have to ask her yourself lol
@thorn furnace
Respawn the joker
Meoww
wdym by that?
is math.random(1,10) a thing here
Make a new copy of it and see if it still crashes
Fetches the version tag of the latest release on your github
If it's newer than the installed version, it prompts an update request
Then it just downloads it, unzips it, installs it, and restarts balatro
aight, now it works
How would I go about finding the ui element for a card object?
I still want to add more things to it (it is very very early in concept) but for now it's barely passing for users to use
does anyone here have a Mac? need some help compiling something
Hey chat
So i used draw step to apply the shader to all my cards
And now i wanna remove the shader
How ?
It doesn’t need any authentication or anything right?
delete the drawstep
Nah it should be good
No authentication, no libraries
Can i apply the shader to one joker based on key or enhancement?
What context do i need
it shouldn't
my mod has a similar update script for downloading the dlls for the module i made for it and it doesn't need any auth
(I’m using self..config.center.mod.id==“id”)
look at this
Breaking bad !?😭😭
it's a joker that uses a shader instead of art by using the draw function
*baking bread
Holy shit😭
I just implemented it into Maximus and it literally took changing 3-5 lines to get it working for me. It's a really nice modular design, especially this early in its development
I think i figured it out
Got a link I can look at?
baking badly when
Thanks
np
On this note tho
If someone wants to help with the UI aspect of this, I can get the rest pumped out pretty quick
The UI took like ⅚ of all of it and I had to basically cheat to get out of it
I figured it out but thanks :>
I get really sad when things aren't modular so I try to make my stuff modular
W mindset
modularity >>>>
Its not modular enough tho its like two things
still a good start
my mod currently has literally every item in its own separate file that can be deleted at any time if a user wants a specific item gone for good
👀
An user would need to edit the table that picks which objects to load
I’m not sure deleting the individual files would work
As in
I’m not sure if it would load
me when it already has that
For my mod
:3
I’m talking about my mod
fair enough
Though I have multiple tables
Two per object type
There’s maybe one or another hardcoded block still
btw
Mostly when I start developing a new object type
trying this out, it runs the function once when the UI loads, but then doesn't work after that.. which feels like progress but I don't know why it would do that either 🥲
at the very least I can try having that function print the object table and see what that looks like
make sure you're just passing a reference to the function, not calling it
@tall wharf? Maybe not
ah, that's it. Thanks!
Knowing Eremel he’s gonna pick it apart (in a good way lol)
Nah I don’t know a lot about this stuff
Ill probably get started on making it more modular in a bit but bigger updates (like the multiple mods at a time thing) will probably take a lot longer on my own just bc ui is a nightmare to deal with
Without looking, I’m assuming it’s currently a click each one to update?
How would i check in a consumable if there's a round currently ongoing?
Oh it’s just a pop up
My UI skills aren't good enough to do much better than that
I think in the can_use function you put G.GAME.in_blind
Or something like that
:3
:3
I think it’d be better implemented in the mod list (aiko’s super sleek version when it’s not super laggy) where there are update buttons on the mods with updates, restarting on leaving the menu, and then an update all button somewhere
Granted, that’s not the easiest ui work
Meowww aikoo can u help me with my ui stuffsss
Enable some boolean value when the context is setting_blind and disable it when the context is end_of_round?
i am stupid i can;'t ui
G.GAME.in_blind ain't a thing,.
I told them to check Luchador
G.GAME.blind.in_blind
U can ui at least like 20x better than i can
G.GAME_blind is what VanillaRemade uses when Luchador checks
Me smash head against keyboard for 26 hours and get one popup
it also checks if the blind is a boss blind and if the blind has already been disabled, which aren't necessary for what i'm doing
how do i check if a card has a seal
if card.seal
ah
i copied the code from the vremade gros michel and i wanna modify it so instead of deleting the joker it debuffs it for 3 rounds then enables it again
how do i change whether a card is debuffed or not
bump
doesn't work, ill check G.GAME.blind.in_blind rn
works!
ty all :3
neat
thanks!
what's the easiest way to recreate ceremonial dagger's destroy joker effect?
look at vremade
?
im copying code
vibecodikoyori
"What is coding if not ctrl c + v?"
thx
...actually, on that note, would it be better to convert my enhancement's weight attribute to get_weight functions too?
It depends what you’re trying to achieve
ok thanks
Just to try and be more in-line with vanilla editions having get_weight? Also, for the negative hook, this would be it, ya?
local negweightref = G.P_CENTERS['e_negative'].get_weight
G.P_CENTERS['e_negative'].get_weight = function(self)
-- do stuff
return negweightref(self)
end
get_weight is only used to modify the rate last the default rate of the game, for example in editions there’s a 4% chance for them to spawn, but the function increases that for the three editions when you have the vouchers to 8% and 16%
...fair enough.
-# I've yet to even make a custom edition, shaders are a bit much for me-
trying to add this to my mod but it just does this?
🙏
You can use it for enhancements too, there’s just no vanilla example to use here
But it’s for modifications to the weight past the default
and by card i mean joker card
I dont think i understand what the screenshot is of
bump
it was supposed to unzip the release into just the insolence folder but it made a brand new folder instead
the release zip I'm using has no subfolders
well, it doesn't have a subfolder containing the mod at least
Oh
You commented out the subfolder part at the top i assume?
no i left it blank like it said in the comment
lemme at least try deleting it or setting it to nil
Oki
nope, same thing
someone can help me? i am doing a mod and when i go into the game the text dont apper the number just says "nil"
What do the parameters at the top look like
Just to double check
you have to utilize loc_vars for the numbers to appear as something else
(as in scalable numbers and etc)
How can i make a joker creates another specific one and self destruct?
Hm
What does the new folder look like
Like what's it called
sorry about the picture, discord greyscreens on my laptop when i use my hotspot for some reason
same as before
insolence-balatro-2.0.2
Oh that
@normal dune Heres an example on how to use loc_vars(put it in your joker)
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult} }
end,
then you can put #1# to put it in your loc_txt to make it render there
in this example, it puts the mult of the card into a loc_vars
Deep i need help 😭
i found my error thx to help me
please do not be ui
please do not be an ui error
No no
This
true_subpath should grab the subdirectory to extract from
create_card("Joker", ...(params)) or smth
for self-destruction uhm
SMODS.add_card :
it's the only pattern i could find that matched repo_name-tag_name though
How do i add specific one
Wait let me check the wili
Wili
FUCK
wili
Yea it goes to uhh
if is_windows then
os.execute(('if exist "%s" rmdir /S /Q "%s"'):format(tmp_dir, tmp_dir))
os.execute(('if exist "%s" rmdir /S /Q "%s"'):format(out_dir, out_dir))
ok1 = os.execute(string.format('powershell -NoProfile -Command "Expand-Archive -LiteralPath %q -DestinationPath %q -Force"', zip_path, tmp_dir))
local subfolder = get_subdir(tmp_dir)
if subfolder then
local src_path = subpath and tmp_dir .. "\\" .. subfolder .. "\\" .. subpath or tmp_dir .. "\\" .. subfolder
ok2 = os.execute(string.format('powershell -NoProfile -Command "Move-Item -Path %q -Destination %q -Force"', src_path, out_dir))
else
ok2 = false
end
ok3 = os.execute(string.format('rmdir /S /Q "%s"', tmp_dir))
end
bump
Wait
Come to think of it it's not actually used
Hold on
I shouldn't have stepped away from my computer 
im trying to make a joker that's just jimbo but with chips but im terrible at coding and it's causing a crash
im not sure if i'd be allowed to send the mod just to show the crash or what
so +4 chips?
Wait
What are the contents of that folder
yeah
more just as a test joker and so i can try to figure out how to do this
the actual mod contents
I'm testing out a fix i made rq
I'll open a PR if it works
return { chip_mod = card.ability.extra.chips }
how do i debuff jokers and detect if they are debuffed, and how do i detect when a boss blind is defeated
card.ability.extra.chips is the amount of chisp u want to add
That'd be it
If there's a subfolder you don't have to worry about that so I forgot about it
It took me that long to realize it 
When I get home I'll fix that in a quick patch
O
🙏
and it did not in fact work 💔
if card.debuff
and how do i do the other stuff, like setting the debuff and checking when a boss blind is fedeated
card.debuff = true
Yea ill patch it up dw
Its just one more line of powershell to change the folder name, thats it
and uhh, the last part
if context.end_of_round and (G.GAME.blind:get_type() == 'Boss') then?
if context.end_of_round and G.GAME.blind.boss
apparently this line is causing my joker to crash the game when i enter a blind
if card.debuff then return nil end (i dont know how to format it to be in the funny box, so it's in apostrophies)
use `
nice thanks
also don't return nil
why would u return nil
js dont return it
not my code, took it from a tutorial because i dont know lua
but how would i not return it
Code?
return in the case of jokers is used to send back the information like
message to put onto the card
xmult, mult, chips
card
nil means void, it means nothing, it means the end of existence, do not return nil
and you would want to put that into a table(dictionary)
so would it just be if card.debuff then return end
Yes, so it wouldn't cause a crash.
Can context.destroy_card self destruct a joker ?
just don't return
ah
Not returning and returning nil are the same.
so just then end
why do you need to check if the card is debuffed
^
or return an empty table if you really want
except you are feeding info to joker handler
No, if you want to declare a trigger you would do return nil, true
ah
i mean exactly what i said
nil means null, and null literally just means "nothing"
you can't return nothing and expect it to work
what is context.joker_main is it after all cards are scored?
it's the joker that's currently being scored
i know...?
so after the card chips and allat, it sweeps from left to right for jokers and if they have a joker main context they fire that context event?
Not returning at all wouldn't cause a crash either.
What is the entire code?
why are you telling me this
#💻・modding-dev message
i wasn't the one having a problem with it
bump
ok so i got into the blind but it's not giving the +4 chips
`SMODS.Joker{
key = "evil_jimbo",
config = { extra = { chips = 8, chip_mod = 2 } },
pos = { x = 0, y = 0 },
rarity = 1,
cost = 1,
blueprint_compat=true,
eternal_compat=true,
unlocked = true,
discovered = true,
effect={
extra = {
chips = 4
},
},
soul_pos=nil,
atlas = 'evil_jimbo',
calculate = function(self,context)
if context.joker_main and context.cardarea == G.jokers and context.scoring_name then
return {
chip_mod = card.ability.extra.chips,
colour = G.C.CHIPS
}
end
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.chip_mod }, key = self.key }
end
}`
Can someone tell me what G.ROOM.T is?
what's context.scoring_name?
It's the name of the played hand.
not sure
right but why are they checking it without comparing it to something
It is doing the chips, you're just not seeing it, replace chip_mod with chips
im stupid and not quite sure how to use this so i've kinda just been cobbling together parts from an example mod i found
what is the difference between the two
chips has a message.
they also don't return a message which makes it so that it doesn't actually show the "+10" pop-up
oh
it is still not adding the chips
try returning a message
also don't check scoring_name, it does nothing
at least not if you don't compare it to something
i removed that part already, how would i return a message?
Is it possible to add a CardArea to a CardArea?
SMODS.Joker{
key = "evil_jimbo",
config = { extra = { chips = 8, chip_mod = 2 } },
pos = { x = 0, y = 0 },
rarity = 1,
cost = 1,
blueprint_compat=true,
eternal_compat=true,
unlocked = true,
discovered = true,
effect={
extra = {
chips = 4
},
},
soul_pos=nil,
atlas = 'evil_jimbo',
calculate = function(self,context)
if context.joker_main and context.cardarea == G.jokers then
return {
chip_mod = card.ability.extra.chips,
colour = G.C.CHIPS,
message = "your message"
}
end
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.chip_mod }, key = self.key }
end
}
check the code for the nostalgic deck in cryptid
also is there a way to easily reload the mods without restarting the game?
hold down M
it restarts the game but it takes a lot less steps
bump
sorry, i meant the beta deck
No.
it is, beta deck in cryptid does it
hellooo I am trying to get a joker working that retriggers cards if you play small hands, and I have the retrigger part working perfectly without a criteria BUT if i add the stipulation that exists in half joker it shows up as nil everywhere but in the collection, and playing a hand crashes the game because it attempts to compare a number with nil. does anyone know a fix?
i've made it return a message and it just doesnt
i think i understand what most of the code is doing here its starting to click im starting to get how the contexts and all that work but this bug is eluding me
woah the screenshot was not even close to useful what happened there
weirdest thing is that it does show up fine in the collection just not in game
it is
i've added the message and it never shows up
calculate = function(self,context) if context.joker_main and context.cardarea == G.jokers then return { chips = card.ability.extra.chips, colour = G.C.CHIPS, message = 'GRR i am evil jimbo' } end end,
please for the love of God just ask if you're confused i can't clarify something if i don't know what i need to clarify. a question mark emoji doesn't tell me anything
this better?
it's called the beta deck in the code
how could i add a ui in collections that is like
( ▯ = deck )
▯ ▯ ▯
▯ ▯ ▯
omfg
i tried but its only one column
ykw, I'll just go ask in the cryptid discord server
when i debuff a joker card it auto undebuffs after the blind is over, any way to disable this behavior?
Yes.
so something here is wrong I don't know, I'm trying to get the current joker (Alt) to evolve into another joker (Devotion) once 1/4 of the deck are wild cards, it's evolving but not automatically, how can I make it happen right away?
how
Find where it is in the code that does that, and patch it out.
bruh
card:set_ability("j_para_Devotion")
is there a way to save a bool value on the card
Yes.
can i do it thru extras
bump
SMODS.ObjectType ({
key = 'type_areas',
cards = {
["ave_area_uncommon"] = true,
["area_common"] = true,
["j_area_rare"] = true,
["j_ave_area_legendary"] = true
}
})
c1_1 = SMODS.create_card({set = "type_areas"})
Am I missing something? I figured at least one of them would show up but it's not, just showing a default joker
Are those rarities?
no those are joker keys
they're all different because I'm trying to see what works haha
The first 2 are missing the j_ prefix then.
the bottom 2 aren't showing up either though
I think only the bottom one has the correct key
is there a big database somewhere of all the joker functions? so i dont have to look for like another mod that draws cards face down for example
Yes, the lovely dump.
how would i make this check if it's been played before scoring or something? because when testing it gives the mult for every card because we just played it
omg its me
Check in context.before then give it a flag, then check for that.
how would i do that ? stupidhammer
there's no way you just saw a screenshot of a cryptid mod developer explicitly saying that the deck merges the 2 cardareas and just said "no it's not merging it's replacing"
.
if context.before then
for k, v in pairs(context.scoring_hand) do
if v.ability.played_this_ante then
v.flaggggggggggggggggged = true
end
end
end
ty
Hm... By one definition, merging the two Cardareas would mean referring to the same CardArea by G.jokers and by G.consumeables, while by another definition it's just setting one area to nil and putting relevant cards in the other area. Hrm.
What if you play a booster pack like a playing card 
Merge the shop area and the playing card deck
If it doesn't have basic playing card properties the game with crash.
Awh
ccd deck in cryptid does something like this
Ooh
but with consumable playing cards
instead of booster packs
by making one cardareas card type compatible with those of another and making both of those areas hold each others card type you have, by definition, merged them
Was thinking of, like, buying a booster pack not opening it, but just adding it to deck like a playing card. Then having the properties of every card that would normally be in it, but as a playable card.
Mmh, that's a reasonable definition.
again, ccd deck does just this
How yay
card:set_ability("p_arcana_jumbo")
it lets you play consumables as playing cards as well as letting you use the effects of the consumable half of the card from the deck
bump
does the same thing
Try context.press_play instead of context.before
i think it's time to organise my mod
https://github.com/its-edalo/slay-the-jokers/issues/23
need some help getting proton to properly execute the stj uploader script, see my comment here
feel free to @ me if you figure anything out
this happens
Try G.hand.highlighted instead of context.scoring_hand
is this for a specific mod or just balatro? because if it's base it works fine under GE 10-4




