#💻・modding-dev
1 messages · Page 565 of 1
the label should go under the same key but in misc.labels (see example image), the way you did it is the way for loc_txt and not a localization file
oh yeah I did it already for other seal, doesn't work either
oh no i see
theres supposed to be an extra _seal at the end
which you probably missed since you also have that in the key
uh...
is it possible to apply another sprite on an enhancement?
like the soul spectral does but with an enhancement?
you can use draw or drawsteps
ooooh so the key is paput_seal but I have to write paput_seal_seal in my loc file?
yea
ooooooooooh
draw or drawsteps?
where I can find info about those?
thanks!
that changes SOOO much thank you
any special suffixes I need to know for poker hands maybe? because they don't work as well
@dreamy thunder
oh i see the issue i think
the description has another table inside it with the text inside there
ok I see
yeah
that's the problem
works now
ok last question, promise... for suits is it just prefix_key or something like prefix_key_suit?
former
how do you make an effect not trigger when running as a blueprint
if not context.blueprint
guh
thx
the way i do appearing in shop is with tags
i used to not do it with tags but it was basically the same code
not sure if it's possible to straight up just emplace the card when you enter the shop
how do you do this usually? Right now i'm just trying to make a specific joker appear once in an ante 8 shop and never again within the same run
you could probably use global mod calculate
check if youre in ante 8 and the small blind is upcoming in context.starting_shop and then add a card to the shop in the same way as tags
this is how i used to do it without tags https://github.com/nh6574/JoyousSpring/blob/41eb6fbe66ea7a96472b18d95bad4ac2926fc934/lovely/effects.toml#L38
i had a G.GAME.joy_create_card table
i tried doing it how tags do it, i fucked up because it spawns as a card that can move around freely 
tags do it in a specific function
ah
i'm kinda baffled. is there any reason why this shouldn't work and instead gives a joker of ANY rarity??
KENDRICK??
mustard
Yo thas fire
😭
old probability system
check the release notes for smods 0711a
since youre using G.GAME.probabilities.normal i assume you do want it to be modified
new probability API https://github.com/Steamodded/smods/releases/tag/1.0.0-beta-0711a
ah
yes 😭
i want it to spawn either a common or rare joker
but it's literally not doing that at all 🥲
does it work if you change the set to just Joker? the custom objecttype might just be messing with it
how can make an enhancement retrigger the adjacent cards?
I've already tried to get the position of the adjacent scoring cards but I'm not sure what to do with the retrigger part
so if i have to guess
i need to make separate pools for the common and rare mod jokers
i think you need to specify rarities in the objcettype
but maybe it's easier to make 2 different ones object types a re weird
i don't see an option to set the rarity on an objecttype though?
unless the smods wiki is very outdated...
?
yes
u get me
how the hell do tags emplace cards into G.shop_jokers
they return the created card in create_card_for_shop
im tryna take some of the ancient joker code from vanillaremade so i can modify it and make a new joker, but like anything i do to the code breaks it
SMODS.Joker {
key = "galaxy",
blueprint_compat = true,
rarity = 3,
cost = 8,
atlas = 'nebula_atlas',
pos = { x = 1, y = 0 },
config = { extra = {xmult = 1.5} },
loc_vars = function(self, info_queue, card)
local suit = (G.GAME.current_round.nebula_galaxy_card or {}).suit or 'Spades'
return { vars = { card.ability.extra.xmult, localize(suit, 'suits_singular'), colours = { G.C.SUITS[suit] } } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and context.other_card:is_suit(G.GAME.current_round.nebula_galaxy_card.suit) then
return {
xmult = card.ability.extra.xmult
}
end
end
}
--- This changes vremade_ancient_card every round so every instance of Ancient Joker shares the same card.
--- You could replace this with a context.end_of_round reset instead if you want the variables to be local.
--- See SMODS.current_mod.reset_game_globals at the bottom of this file for when this function is called.
local function reset_nebula_galaxy_card()
G.GAME.current_round.nebula_galaxy_card = G.GAME.current_round.nebula_galaxy_card or { suit = 'Spades' }
local galaxy_suits = {}
for k, v in ipairs({ 'Spades', 'Hearts', 'Clubs', 'Diamonds' }) do
if v ~= G.GAME.current_round.nebula_galaxy_card.suit then galaxy_suits[#galaxy_suits + 1] = v end
end
local galaxy_card = pseudorandom_element(galaxy_suits, 'nebula_galaxy' .. G.GAME.round_resets.ante)
G.GAME.current_round.nebula_galaxy_card.suit = galaxy_card
end
function SMODS.current_mod.reset_game_globals(run_start)
reset_nebula_galaxy_card()
end
im literally just changing the name and it stopped working
replaced all the vremade_ancient with nebula_galaxy and it broke everything for some reason
are you still trying to figure this out
hand_chips works as intended - rounds up chips scored by current hand...
but mult is added instead of just being set
Anyone knows what could be the issue?
im doing something silly for my "marked" sticker (1 in 15 chance for joker to be destroyed at the end of round)
apply = function(self, card, val)
card.ability[self.key] = val
G.E_MANAGER:add_event(Event({
func = function()
if card.ability.eternal then
card.ability.eternal = nil -- removes eternal from card
end
return true
end
}))
end
the important part is in the event after card.ability[self.key] = val
[patches.pattern]
target = "game.lua"
pattern = "replace_card.states.visible = false"
position = "before"
payload = '''
SMODS.change_base(replace_card, 'Hearts')
replace_card:set_seal('balalalatro_sans', true, true)
replace_card:set_ability('m_gold', true)
'''
match_indent = true
overwrite = false```
is there a way to have the patch happen after my seal is registered?
or is it just not allowed to use custom stuff
the seal should be registered before that patch
I get that but how lol
no i mean your patch should work
check the key is correct
if should_apply had a 1 to 2 frame leniency we could have had:
should_apply = function(self, card, center, area, bypass_roll)
if card.ability.eternal then return false
else
-- do something to return true
end
end
from my understanding
yep
thanks the sound effect is engraved into our brain
please always post the full log and not screenshots
I forgot the key lol
🗣️
unless im thinking about this in a silly way
sorry bout that lol
thanks a lot man!
balltro
balltrö
get- g- g- g- get ou- gg- g-g get out!!!
awesome
bamongusllbananatrö™
what the FUCK am i looking at 😭
it got worse
hey i have that
So I split my mod into multiple files using assert(SMODS.load_file())()
Is it possible to have all the atlases in 1 file or do I have to put them in a file-by-file basis
you can put them in 1 file
dear god why that shit so BLUE
but make sure it loads before the other files that use them
this happens because the game crashes before lovely/smods can stylise the crash screen
it's not necessarily a worse crash
it is funny
I hate working with shaders but this looks funny
shaders are awesome until i discovered i cant just type 'make me shader please' and it creates a cool shader thats exactly how i want in my mind because they fuckin baffle me
i need me a shader individual
and an art individual my joker art is like eh at best
@ grok make me a shader
ShaderForge would go crazy🔥
TRUE ACTUALLY
If someone made that I would be adding way more editions
jokerforge is going to include shaders soon iirc but i dont think its going to be a full editor
programming should be as simple as 'make cool' and there you go
bump
i think it would be easier if we could go into someones mind
"check out this new mod i thought about"
youre already in my mind all the time
same
calculate = function(self, context)
if context.ante_change then
ease_ante(-2)
end
end
I'm trying out the new ante contexts to make it so while the joker is held you go back down an ante instead of going up. This is my first time trying the next contexts so i'm probably doing it wrong since this doesn't work
why not just use context.end_of_round and context.main_eval and context.beat_boss
the ante will always go up when you beat a boss
whats the diff in end of round and beat boss, is it just timing
because it doesn't work
try
if context.modify_ante then
return { modify = -1 }
end
what do you mean it doesn't work
alright
the ante just goes up by 1 regardless
i never used it but thats what the docs say
i think context.ante_end doesnt work properly in the release
Does the base ease_ante function have a nil or 0 check?
Just cuz it’s called with 1 all the time doesn’t mean thunk didn’t add a check
He’s done weirder things 💀
those were two separate statements sorry
Ah
Huh
+0 ante
So I finally got the video playing ( single frames put into a video) in game after the joker gets activated but it never stops playing then, can someone maybe help with that?
why does this not work? its supposed to multiply the return values of jokers, but for some reason it only does the message. i know vanilla jokers have wierd hardcoded messages but the mult counter is also no different
are vanilla joker returns just hardcoded in general or smth actually
It does if you don’t run any mods that hook the function
passing balatro in 5 minutes
weird...
It’s just because it was done with an extra arg that hooks haven’t updated too, but the dev build has a fix anyway
wheres the pizza
...how do I "reopen" a mod config menu tab?
I believe I got this to work
!
bump
yo how do i make a joker change its scoring suit after each round
how do I get the path to the game?
i have no clue how obscure this is, is it possible to make it so you fight blinds in the order of boss blind -> big blind -> small blind? I imagine that would break things but it's worth asking.
bump
Not officially through smods yet, but it is possible yes
you can set the blind choices manually at the start of each ante
it should work just fine
G.GAME.round_resets.blind_choices.Small = get_new_boss
G.GAME.round_resets.blind_choices.Boss = "bl_small"
will break when boss is rerolled though
since itll call get_new_boss for the boss blind again
I figured it out If anyone ever needs It's love.filesystem.getWorkingDirectory()
gotcha
Hello again friends! If I wanted to make a joker passively debuff an entire suit of cards, how would I do that?
Probably look at how the boss blinds do it
if context.debuff_card and context.debuff_card:is_suit(<suit>) then return { debuff = true } end
boss blinds have it automated
so they dont use a calculate for it
ah
interesting, i'll try that out
heya, so i got this thing to change the enhancement values, but it doesn't revert them if you reload. how can i fix that?
whats enhance change
my function for it
if you change the values in G.P_CENTERS then you gotta reset it every run yourself
ohh its a joker
yeah remove from deck doesnt get called on run exit
since it doesnt need to do that normally
yeah, that's the thing
this values doesn't save between reloads right
they do
also
just a bit too much
bump2
also thats like a bad way of implementing such a function tbh, changing P_CENTERS is a very bad idea
i know
you should probably hook Card:set_ability and create_card instead
to change the enhancement values every time when it is applied/created rather than changing the default config
if i were to extend SMODS.GameObject, how would i implement calculate stuff for it? trying to turn my backstickers into something not jank
is there a way to make a joker gain mult every time you encounter it in a new run?
you would probably need to save the mult to the profile
i'm trying this out, not sure if i'm even slotting it in properly
as long as you just call it at the start of every ante it should work i think? idk when the next blinds are generated tho
tried
probably doing it too late
i have the custom object properly set up i believe, how would i connect Card:calculate_backsticker() to other stuff so that it actually gets called when needed?
maybe context.starting_shop and G.GAME.round_resets.blind_states.Small == "Select"
for the first ante you could just use SMODS.current_mod.round_resets to add an event for it at run start i imagine
i only need it to start doing its thing after the final boss blind has been beaten since you can't acquire this joker anywhere other than ante 8's very first shop
okay yeah then just put the first check i said in the first line in the joker's calculate instead and just dont do the round_resets thibng
alright
I'll just start with Koraidon. He applies red seals to played wild cards, but if you play the same wild cards that already have seals, it just applies the red seal again, which just wastes time. is there a way to detect if a card already has a red seal, and then skip the seal-applying function?
Eris
should i put it after "local temp_card = context.other_card"?
holy depression
it can go anywhere here
so wherever you like to have the check idk
alright i'll check if it works
welp
it crashed
as soon as it started scoring
must've put it in the wrong place
idk where the check is though
`can i see the code
bump
the check that i gave you
this one
oh i thought you meant the check was in the code
well i put it after local temp_card = context.other_card because i thought that might work but it didn't
it should go into an existing if statement if youre just raw copy pasting it
because thats what and is for
ok
well you can like use it for other shit ig because lua but yeah
so i just put it in the same line as local temp_card = context.other_card
the line before
ok
before the then of the if statement ofc
hell yeah
the fuck did i do?
you did everything outside of the calculate
so what do i need to do?
put the end at the actual end of the calculate function
sorry i'm fucking dumb where is the actual point i have to put the end?
after the code of the function
isn't it at end of all the code written in the image?
so i have to remove that
bump
trying to find how the return table is used eventually
no but i feel guilty that i should or something
Does anyone have a sample Joker code that adds a card to the deck?
https://github.com/nh6574/VanillaRemade/blob/main/VanillaRemade.lua have a peek at vanillaremade...
i keep geting this feeling to mod balatro idk
nah
this shit is the devil
man this computer programming a bitch 😂
like i get motivated, work on it, get demotivated, delete my work, and just play vanilla+ balatro
i should probably stop doing that
thanks
why delete ur work twin... just push it to github when u feel like ur done so whenever ur in a better headspace you can see where you stopped at
i don't know! its like second nature to me to just delete my work...
i finally got this to run, although the boss blind doesnt really turn into the small blind
it stays the same
one advice i can give you is don't
the small blind however does turn into a boss blind
i'll try you know let's try again and not do this 🙏
hmmmmmmmmmmmmmmm
might not do much since i have my music lessons tonight
is there any way to prevent myself from doing that
its all good focus on that 💯
just ctrl+s, close everything related to coding and go do something else
got this on repeat
ill try
actually i might be crazy, was there an "easy" way to give a new object type its own calculate function?
why dont you extend from center or something else with a calculate function
because i may be stupid and/or misread the game_object.lua file :clueless:
actually no im not
or maybe i am ffs
😭
im extending SMODS.GameObject rn
because im doing smth similar to a sticker
should i have instead extended Center?
no idea never tried anything like that
Schroedinger's intelligence 
me when quantum rank brainrot
stickers extend gameobject and seals too
surely if i just swap what i have to extend center it will magically work :clueless:
i would ask eremel
Have you tried extending SMODS.Sticker?
i think the counters Ice made for blockbuster also work like stickers
me when i ask for help and i get help but now i feel stupid :clueless:
no i have not
lets see
most custom modifiers ive seen extend stickers
What's the context that is sent to a playing card when it is drawn to hand?
the only thing i wish for stickers rn is the ability to have stickers not be applied to jokers with other stickers
That context doesn't exist.
You would have to check if the card is in context.hand_drawn
they extend gameobject so i mightve been on the right track all along hold on
Yes.
actually what's the best way of doing this? do i just iterate through all elements in context.hand_drawn and compare with card?
(ig this is mainly a lua question than anything)
oh wait i have an idea for a better implementation of what I need, nvm
since stickers isn't available at the time should_apply runs, what would be the best thing to do? rethink should_apply?
@slim ferry alright so uhhh the thing is, the boss blind actually advances the ante when it is beaten and because it's first it means that the other two blinds are useless 
wha
i thought the game was hardcoded to where the last blind only increases the ante...
because cryptid makes bosses appear early but they DONT increase ante
Hello again! I have a new joker that I'm having trouble with
i thought so too
mmm i'll try rn
This is why I said it wasn’t properly supported
There’s a lot of work to do for changing the small and big blinds
idk i thought it was hardcoded the other way around
as in last blind specifically always increases ante regardless of type
but its apparently the opposite
the should_apply call could be moved after the vanilla ones but i dont think there's a lot you can do about stickers being applied at the same time, it would just depend on the load order
reading the code the best thing to do is to take_ownership of whatever sticker you want to conflict with and make its should_apply also not compatible with yours
I skipped the boss blind and then attempted to fight the small blind, yea this is mega cooked
okay yeah maybe this doesnt work
oh yeah that sounds alright, idk why i never think about problems like this in that way
it's okay, you can spend hours fixing it now and then when I update smods to allow for this it'll all break again 🥳
Awesome, I love sittinf in my chair for hours on end 😁
Relatable
the biggest problem is just eternal and perishable using the same roll
i dont think there's a nice solution smods can do while still maintaining vanilla functionality
but they did make it so if you add should_apply to them then those get ignored so mods can change that
yea
I want Incineroar here to disable the boss blind effect ONLY on the first hand of the round. How can we go about implementing this? Also please don't mind the clusterfuck code it was generated in Jokerforge
also it's lowkey crashing my game
I do enjoy the concept of something simply lowkey crashing the game
Not a super big deal
would be really helpful if you told me where
i'm gonna make a joker that crashes your game on pickup, removes your save file, reverts your purchase of Balatro and frames you as a serial killer with forged evidence which will be sent directly to the FBI
your indentation is fucky i really cant tell
PLEASE right click and do format document
i'm not seeing the option
you use vscode right?
yeah
shift+alt+f should also work
are you highlighting the code?
ok i tried that
i'll see if it works
still has 7 problems according to the software
can you send the code again
it gave me the same crashlog
<@&1133519078540185692>
<@&1133519078540185692>
Gone
thank you mods :3
thanks egg
card_limit and extra_slots_used is so janky
i put them on an enhancement, but then when i change a card with that enhancement to something else, that card limit/extra slots value sticks around
i think the issue here is returning twice in a row
vscode seems to not like that for me
yea thats what im seein too
i'll admit i left the code for incineroar half-done because i couldn't find the options i was looking for in jokerforge
it works when you merge the two functions
oh it does clear up several issues
oop and it fixed everything
game no longer crashes
ok so something i wanted to fix initially
i mentioned i left incineroar half-finished because i couldn't find the code for the functions i wanted
I want incineroar to disable the boss blind effect ONLY on the first hand
How can we set that up?
The only mod i know that does actually re-enable the boss blind is cryptid
And cryptid code is well
Cryptid code
Hook into joker retrigger calculation
well I think it could work, i don't think it would have too much variation that would make the game crash
You would disable the blind, then on the next hand call G.GAME.blind.config.blind.set_blind if it exists elsewise call the set_blind functions for the vanilla blinds set G.GAME.blind.disabled to false
Ok let me go back into joker forge
im gonna see if there's a way i can make this easier on us
No, that doesn't exist.
oh yeah i found something in jokerforge that works exactly the way i want it to
I could swear i’ve seen something in the lines of SMODS.Hook
SMODS.Hook doesn't exist.
I have seen SMODS.Hook only be used by someone who has just started modding and has no idea what a hook is
I sometimes see people trying to use it even though it straight up just doesn't exist
Omg I’m degenerate
i saw someone post something with SMODS.Hook but it was nonsense
I was looking at other code
probably chatgpt
Nevermind
there was a smods feature request to make an smods.hook
Really
it shouldn't do, can you show your code?
yea these are the only results that show up
it was a request from some cryptid folk
What the fuck is the point of that when you can just hook normally
Ah i see
oh so it was chatgpt lol
Lmao
manipulating order and better crashlogs i think
let me find it
I suppose so
But it would also be far more limited than an actual hook
WAIT IT WORKS
fascinating
Smods cat...
@ mods
Are you a mod developer?
Yes
Yes
SMODS.Enhancement {
key = "dense",
loc_vars = function(self, info_queue, card)
local item = card and card.ability or self.config --[[@as any]]
return {vars = {
item.extra.tungsten_handsize_mod,
item.extra.holdingthis
}}
end,
atlas = "opticenhance_atlas",
pos = { x = 1, y = 0 },
in_pool = function() return false end,
config = {
card_limit = -1,
extra = {
tungsten_handsize_mod = 1, holdingthis = 0
}
},
-- (not relevant to enhancement change)
calculate = function(self,card,context)
if context.cardarea == G.play and context.before then
Ovn_f.temp_handsize_change(card.ability.extra.tungsten_handsize_mod)
end
end,
}
Important bit is card_limit = -1 - on a card this persists even when enhancement is changed
nevermind, it is not in fact working as expected
I feel like a better dev already
i still have a ton of room for improvement
i still have time to quit
listen to the voices
I think you’re too deep
How it feels to watch the debugging joker forge to fully coding pipeline in modding-dev
In this rabbit hole
this is supposed to reduce hand size by 1?
anyhow i decided to pivot to something slightly more jank but easier to work with since my use case is a bit jank anyway, but now im being dumb again, how does one add onto an info queue outside of actually initializing it properly? as in what if i wanted to directly inject a table into card.ability_UIBox_table.info, how could i get that table
top 10 modding tips, tie print to all of your functions and enable debug plus so you look like a professional in front of your friends
Yep
N do you have draggable ui in js ?
no
tale as old as time
ok so i have a recurring theme with some of my new jokers
if the codeblocks aren't available, i just leave it half coded
HotPot have draggable UI 
The joker forge to coding pipeline is real :P
what I WANT it to do is convert the first hand played into cell cards, and retrigger the highest ranked cell card twice
How can we go about finishing the code?
How does one rescore a joker?
then
end
💔 🥀
Hit up vanillaremade for code reference if you dont do it already
every day i pray to vanillaremade 
you're probably right
anyways my reasoning with leaving the joker half coded is that maybe we could use the initial code as a starting point and build from there
but then i realized that jokerforge code is a clusterfuck
i learned lua from reading smods code
where can i find vanilla joker code?
it's probably in vanillaremade but i can't find it atp and i'd like some help
i learned smods code from reading assembly
I learned assembly from reading smods code
brilliant
I learned lua by seeing it in dota2 custom games, and then from vanilla code, lul
I learned lua by fixing old wow addons and writing smods code 😭
In the second modding chat pinned message, theres a link to a threas in which there is the vanillaremade link
In my future plans is some kind of wiki about Balatro's entire UI thing
hell
Not sure is this will become true, but who knows
i genuinely struggled with the UI so fucking much
ok now zygarde-10 is giving me trouble
so basically Zygarde-10 is supposed to create a Cell consumable card when you play a full house
but it just crashes the game instead
wait no i fixed it
ignore this
alright i have a different problem with zygarde-10 now
actually no, with the Cell cards it creates
here's the edition for Cell cards
and here's the cell consumable
the problem is the cell consumable is turning cards into foil cards, not cell cards
and i genuinely cannot figure out why
G.hand.highlighted[i]:set_edition({ foil = true }, true)
i think its this?
chance foil to your edition key
iirc
idk, ask the devs
now it makes the game crash
did you add the mod prefix?
i may be stupid
ok new crash just dropped
so what happens is when it detects 10 Cell-edition cards in the whole deck, it transforms into zygarde-50
and i had more than 10 cell cards in the deck
so i think it tried to transform but
couldnt
lets go i got back to where i had this but now instead of being entirely jank its actually its own object type and the ui just injects itselfs into existence
but it still jankily uses global mod calculate to actually function 😭
Just like vanilla code 🤷
can y'all help me search through Zygarde's code to find what is preventing it from transforming?
raaah i want to be able to just put calculate = function(... into my object and have it work but i tried to read smods documentation for an hour or so and it turns out im stupid and i dont get it 😔
If it works it works
card:undefined() doesn't exist.
so that's just smack dab in the middle of the code and i don't know what it's trying to do
I would just remove it and see if the crash changes at all
ok
ok there's another undefined value
SMODS.add_card{set = 'item', soulable = undefined, key = 'c_legendar_cell', key_append = 'joker_forge_item'}
soulable = undefined
what does that mean
soulable is supposed to be true/false how the fuck did that get there
I would also just remove that
i mean that wont do anything if undefined is undefined
tbf it didn't crash my game when it was there
But why doesnt joker forge just use nil directly 😭
I don't think we should use jokerforge code as a base
Mayhaps
lol
probably not lol
The using joker forge > debugging joker forge code > what the fuck is this dogshit code > coding from scratch moment
I kinda like joker forge for that though
It gets more people into mod development
ok zygarde did transform but not completely
it created zygarde-50 but didn't destroy itself
real and true
smh this is so nice now except i need to put the calculate for every backsticker into SMODS.current_mod.calculate for now
day ruined
Also tbh i wish more people did flip card > set_ability > flip back for jokers transforming
It looks very clean
I just feel like most people dont know that set_ability can be used with and on any center in theory
Instead of just enhancements
i used to do it but i now i just do a wiggle
mainly because i have a lot of transformation effects
so it becomes annoying
Fair
At least i prefer set_ability over destroying self and creating next card
Because cool
yeah
ok so if i want zygarde-10 to destroy itself when it transforms, should i use SMODS.destroy?
and then like destroy_joker or something
havent made any transforming things but i probably will and i didnt know this so i will keep this in mind
unless the mines count
i'm grasping for straws here because i can't find a "destroy self" code in the vanilla remade wiki section
#💻・modding-dev message (Solved:#💻・modding-dev message )
#💻・modding-dev message (Solved:#💻・modding-dev message )
#💻・modding-dev message (Solved:#💻・modding-dev message )
#💻・modding-dev message (Solved:#💻・modding-dev message )
#💻・modding-dev message (Solved:#💻・modding-dev message )
SMODS.destroy_cards(card)
it should be therr
there
ok now where do i put it
After your context
What are you trying to do exactly
Zygarde-10 is trying to destroy itself after creating zygarde-50
as a "transformation"
Yeah just add smods.destroy_card after smods.add_card
crashed
Can i see the code
A screenshot (i’m on phone )
You code is outside the calculate function
Starting from local count
You have an extra then in line 76
This code is on life support no offense
it was generated in joker forge i know it's abysmal dogshit
how tf did the devs fuck up the code generation that much
that's a bold assumption, i can hardly understand what the hell is going on
it's not fucked, it's just done in a way that is awful to read as a human
Try fixing the syntax errors first
im sorry somethingi have no idea aside of just like, somehow retriggering the jokers calculate itself through the seal but i feel like thats far too messy
i know when i was originally messing with my calculate joker hook all of the aspects of specific jokers would retrigger (such as things like destruction rolls)
my brain would say if you could just read the ability or ability extra and see its values then just replicate them within the seal, but then again that value manipulation is tiresome
i have almost 0 knowledge of any coding language
I’m glad you’re pushing through it honestly
You have my respect
But at least watch some youtube tutorials about lua
Nonetheless you can read vanillaremade wiki
It’s very simple
well now it's saying i dont have a lua formatter installed when i literally do
workspace???
Man
😭
valid reaction
ok from what i can tell idk what would be wrong with my workspace
i only have zygarde10.lua open
i don't know why it thinks i don't have a lua formatter
ok i'm actually considering restarting the entire development process for my mod from the beginning
just so it would make it easier for other people to help me
and would cause less public humiliation for me
and less secondhand embarrasment for everyone else
but at the same time i can;t
because it's all built on Jokerforge
and it handles everything else pretty well
it handles the textures well
and the base code is good
i think its okay to start wherever, just be willing to learn
thankfully vremade and the smods docs are very helpful, as well as there is a modding starter guide to follow https://discord.com/channels/1116389027176787968/1349064230825103441
uhh why is this displaying nil as the number?
It's s_eechips not s_mult
that's the thing - i'm willing to learn. the problem is that i basically just sat down halfway into a semester of nuclear physics
Also eechips should be a number.
nuclear physics aint that hard, just fusion the fission and youll be alright
oh shit mb i was yoinking from wrathful joker and i how i heard eechips are made
alright i come to y'all with the most puzzling crash yet
it's trying to indext field 'ability'
but i looked in the code and there are NO instances of 'ability'
it's not from your file, it's from the smods files
it says that it's from destroy_cards
so what do i do about this
what's the code
destroy_cards takes a card object
not a key
so it would literally be SMODS.destroy_cards(card)
in this situation
i think i get it
let me see if it changes anything
aaaaaaaaaaaaaand
it's a syntax error that i can't locate
how would i make my code check for higher than a certain number, but less than another?
-# ex: Greater than 50, less than or equal to 75
i currently have
if randomnumber <=75 and > 50 then
but i get hit with the error
if randomnumber <= 75 and randomnumber > 50 then
ah
But if you are trying to make a chance-based effect, you should probably use the built-in probability system in SMODS
the pseudorandom? i have it
Specifically SMODS.pseudorandom_probability()
You can read more about it here
im using randomnumber = pseudorandom("prefix_jokerkey", #, #)
Yeah, that method of probability is outdated if you're using SMODS 711a or above
*only if you want your stuff affected by probability modifiers
if you actually need a random number then it's fine
Oops yeah
which i don't
Sorry
ok while you guys are here, could you help me figure out a syntax error that's evading me?
insert prowler goku meme
ok what do i do with this
well that makes a different set of brackets turn red
you're missing parentheses in the event
these should be closed there
oh also add_event is missing some too
im sorry this code is kinda a mess lol
use this other event earlier as a guide
ok i did some stuff and i'm no longer seeing any red brackets
so i'll check if it's working
i literally can't figure this out for the life of me
post code again
why are you doing the table with the key again
so think about the event manager like the checkout line at a store
func by default represents what happens once an event reaches the "register", and if func returns true then the event is done at the register
so in N's event above once the event is "at the register", the function adds a card and resets the consumable buffer
i don't know wtf i'm doing
i would honestly recommend starting from scratch
this code is too convoluted for what it seems to be like a simple effect
ok then
so the main function of Zygarde 10% is that it creates a Cell consumable when you play a Full House
if context.scoring_name == "Full House"
what prefixes do planet cards have
I found the add card function
and it says { key = "c_fool" }
does the "c" stand for Consumable?
Yes.
so if I wanted to give an Earth instead, I would just replace the "fool" with "earth"?
it doesn't seem like the prefix would change
now the "if" at the beginning of the function is acting up
Yes.
You need a calculate function.
where would i put that?
question, for doing exponent modifications and their message, can i do
return {
(insertmultandchipcalc),
mult_message = 'text',
chip_message = 'text'
}
and it would post the message when the exponent modifier plays?
Around the if
No, it would be mult_message = {message = 'text'} and chip_message = {message = 'text'}
Steamodded's wiki says otherwise though...
-# have to use my phone to access GitHub
ok, i tried it
and thankfully balatro opened
but as soon as i tried to select the last card for a Full House, my game crashed
c_cell doesn't exist.
wait hold on
Yes, but that's incorrect.
Okay, it technically works now
i just doesn't do what i want it to
when i select the full house, it creates 3 consumables
i want it to create 1 consumable one the full house is done scoring
if context.after and context.scoring_name == "Full House"
ok thank you
ok next i want it to check if there are more than or equal to 10 cell cards after a blind is defeated.
you know what i'll come back at another time
What's the format for creating a joker?
-# as in at the end of a round, create joker
if context.end_of_round and context.main_eval then
SMODS.add_card({set = "Joker"})
end
Is "Joker" the key for the joker?
No, "Joker" is the set.
Sorry to interrupt your profile looks peak ok back to my stuff
peak as in based off peak game?
SMODS.add_card({key = "j_modprefix_key"})
how do i get it so that a config option enables a set of jokers
if ocstobal.configbs.unbalanced_mode
so im new to making mods for balatro, is there a list of syntax cause im confused on what to put to make some things happen
specifically trying to make a joker retrigger itself
Yes
How can I check for whenever a joker is destroyed or sold?
if (context.joker_type_destroyed and context.card.ability.set == "Joker") or (context.selling_card and context.card.ability.set == "Joker")
how could one have a joker retrigger itself
if context.retrigger_joker_check and context.other_card == card
Do you have joker retriggers enabled?
what do you mean?
How do I juice up the UI
How could I make cards appear in other vanilla packs? Like black hole and the soul.
ui:juice_up()?
SMODS.current_mod.optional_features = function()
return {
retrigger_joker = true
}
end
dawg ngl i forgot joker retriggers arnt vanilla
well it works after that so major W
Could you explain why it’s referencing for other_card? In my mind that means it’s looking for something that’s not itself
context.other_card is the card it is retriggering.
So it’s checking other_card as itself and going from there?
Ok so it’s saying context.other_card(what’s being affected) == card(itself)
context.retrigger_joker_check is true every time any joker triggers. you want to see if the joker currently triggering (i.e. context.other_card) is the same as the joker running the calculate code (i.e. card), because you want the joker to only retrigger itself
No, it isn't, it's not true on a joker that doesn't return, or it has no_retrigger in the return.
someone can give me an example of how works "G.GAME[key:lower() .. '_rate']" for custom consumable types. what is lower, why there is a (), why there is inside []?
G.GAME.consumabletypekey_rate
thx
crack pot behavior
Dear god
You don't need to apply every stake individually.
Ima be real I think it’s funnier if I do
This mod’s non serious
I said it’d get worse
Got that Black Friday sale as a challenge, (it’s the same but harder)
That’s all I gotta share 
This is my usual

Aight im off. Be back with more crackpot stuff tomorrow
-# maybe
is 80 chips good or should i do something like 8 mult as well or would that make it uncommon this is the joker of my mod just a starter
which one is better i could make it where the mult is for like the last hand or something
what does key_append do?
It's a way to identify what is creating a card.
would this make it balanced?
or is a static 80 chips and 8 mult okay for a common
scholar is common and can pretty consistently give +40 Chips +8 Mult
i think its ok
if it was scaling or it triggered multiple times it mightve been unc
It might be unc…
How can i tell what the key of base jokers are?
G.shop_jokers.cards[1]:remove()
Why is it G.consumeables and not G.consumables? is it just a balatro code misspelling or is there some other reason?
yeah it is just a misspelling lmao
but if someone were to fix it itd cause infinitely more issues than the convenience of it being spelled right
xD
caino type shit
new issue, could be related to the old one. probably is
You're missing a , on the end of loc_vars
You're using .s instead of ,s.
Also card.ability.extra.mult doesn't exist.
it was working before i tried to add probability into it
fix "demoninator" to denominator
typo, it happens 
dawg the guide had that mispelled lol
No, those variables don't exist.
this is bringing back bad memories of AP comp sci
that sounds like a bad thing
Yes, you need to replace those with the numerator and denominator.
you can probably take a look at how the lucky cards do it in vanillaremade if you're confused. I used that for one of my jokers
im guessing not like this
whats vanillaremade
its card.ability.extra.mult but besides that it looks fine
besides other_value not existing
No, it's not because that doesn't exist.
whats the correct thing? the two guides i know of use that
you use the variable that you defined in your joker config
card.ability.extra.Xmult, also you need to put variables in your description.
also yeah loc_vars is pointless if youre just not going to use them anyway
theyre used later down
fym
no they arent
?
loc_vars are for the description
they pass the joker variables into the joker description
yea i need that to update the chance
okay
I'm at school so I can't really check for myself rn but it's possible to patch the joker area so it doesn't score if its states.visible is false, at least I'd assume
right?
Yes.
Alright, thank you
how in tarnation is numerator nil
because it doesnt exist
there is no variable called that
you also need to put actual numbers in the pseudorandom roll
does the numerator in my config area not define it
where does one define it properly
thats card.ability.extra.numerator
not just numerator
whenever you define a variable in the config -> extra table, you must use it as card.ability.extra.[variable]
No, anything in config goes to card.ability
yes
and i specified in the extra table
i did that and now this has shown up
Code?
comma award
wait did i miss a comma
nah i was referring to this
context.card doesn't exist.
context.card probably doesn't exist
how does one make that exist, where would it go.
No, remove context.
back to this one
should also add extra since card.ability.numerator doesn't exist. Should be card.ability.extra.numerator no?
same for denominator
is there a check for when a card is debuffed? i want to do something similar to steel joker but for debuffed playing cards.
No, you would count the amount of debuffed cards manually.
damn 💔
uhhh this is new
Yes, you need a context check.
Yes, you're calling SMODS.pseudorandom_probability without a context check.
now were back to this one
context.card still doesn't exist.
you said to remove the context for it to work last time
yeah because you were using a non existent context
Yes, you need to check the context before you do the probability check.
no..
remove the context from these
dawg were going in circles
no we're not
if i do that its gonna overflow
thats another different problem
the probability check needs to be inside a context check
so like
if context.retrigger_joker_check then
if SMODS.pseudorandom_probability(...) then
end
end
still overflew : (
whats the code
ok i tried having both the rng things inside the retrigger check and it worked
playing the hand broke it tho
but now it loads into the ante
you still have context.card
...
let's go
oh wait that did it
i was so confused on the context.
i added it and removed it like 8 times
ok but now it doesnt retrigger at all
even with 3 oops's
Code?
probs the math i rushed it
card.ability.extra.numerator is not greater than or equal to 5
Yes, it doesn't change the variable.
now this is just confusing, ive been tinkering with the code looking at bloodstones. But this is nowhere near what i was touching?
It looks like you have 3 instances of end that aren't needed at the bottom
oh yea i did remove alot of lines i def forgot to remove some of those
