#💻・modding-dev
1 messages · Page 459 of 1
so i was searching and found this context.consumeable.ability.set == "Tarot"
wanna change it to a specific consumable, not a set
is it .ability.key == "consumable key"??
no
.config.center.key
so context.consumeable.config.center.key == "key"?
yes
ok
Ty i drew it myself
a famous artist in the making
guess i need an early autograph
:set_seal(nil,nil, true) how do i specify a seal to add?
do i add the seal key instead of one of the nils?
First nil
Replace with seal key
what about custome seals, the need the mod prefix?
mod prefix is a must
so its modprefix_sealname_seal
at first I intended to have my color streaks on playing cards be separate from seals, but figured that would be too powerful
so streaks in my mod act as seals
one of the keys is sgt_red_streak_seal
definitely normal for a seal
putting that aside
when declaring seals you just need a color key
how can i add any text to the info queue? i want to add a text that isnt an object description
so im trying to make the joker give a chance to "upgrade" a seal to a double seal
but its crashing at line 116 saying extra value is null
it seems like
hmm ok let me try
you're working on a joker
but the code suggests you're working on a consumable instead
can someone help me with this?
umm
what do u mean info queue?
I keep seeing ERROR when I open the pack. Anyone got any fixes?
in loc_vars, the info queue is to add little boxes of text like descriptions of jokers
for example this adds a box with the description of negative edition
oh i see
its group_name not group_text
and u want to make your info queue show any text
yeah i want it show another text
so? what do i do?
idk, maybe try putting a text between " " ?
add it to Other in the localization file and then reference it as { set = "Other", key = "entry key"}
or take the experts saying
Not working.
still not working
stupid question, if i dont have a localization file i have to make one right
yes
makes sense
dont know why, in my mod i have a pack with group_name and it does work
what part doesn't work? what have you tried? did you print the parts to see if things were as you expected?
im just going to copypaste this from now on
when you want to confirm if a chance-based object works, temporarily remove the probability check
as for print i didnt do that
hmm ok
you should
I'm guessing _S doesn't exist
the crash may suggest that you can't use context.using_consumable to overwrite Red Seal
hook Card:set_seal instead
what's the goal?
the joker has a propability of upgrading a seal when using a spectral card that adds that seal to its double seal version
you should probably take_ownership of it then
of what exactly?
the spectrals
how? like code wise is it just take_ownership?
i dont have much experience with it
https://github.com/Steamodded/smods/wiki/API-Documentation#taking-ownership
Does anyone know how to stop the Booster Pack from saying ERROR when opened?
good enough
gonna read it
the answer is set a group_name
idk why's not working for you
add field group_key = "modprefix_key_to_pack_group" to your booster pack object
then provide a string value for modprefix_key_to_pack_group in loc file
Is there any way to accomplish it without using a loc file?
if you're using loc_txt instead, provide a string value for group_name
Using this, and still no dice
💀
I don't use loc_txt that often
loc files are more consistent
and all loc entries can be found there, so it's a lot easier to manage
what did i do wrong? ```lua
info_queue[#info_queue+1] = G.localization.description.Other.Gleeb_desc
```lua
return {
descriptions = {
Other = {
Gleeb_desc = {
name = "Gleebs",
text = {
"{C:green}Gleebs{} give ten times the",
"base chips than the other suits."}}}}}
you need to put what i said in info_queue
oh now i get it, thanks
oh yea, speaking of which
I can't exactly get the full desc with just {set = "OceanMap", key = "sgt_tropical"}
Anyone know how I can make the keybind thing work?
why doesnt this work?
(im trying to make a seal have a 1 in 2 chance to retrigger and then a 1 in 2 chance to re trigger again over and over until it doesnt retrigger)
is oceanmap a consumabletype?
nah, it's just raw description
then the game wont know to process it
💀
I see 
try context.repetition
also you should use pseudorandom instead of math.random
no just pseudorandom("seed")
oh the return has to be repetitions with an s
do i do pseudorandom like this?
yes
alright and also it works!
thank you mr N
how can i give a card a random enhancement, counting non-vanilla enhancements?
Enhancement_poll
ok
SMODS.poll_enhancement({ guaranteed = true, type_key = 'key' })
ok
hello there, im having trouble make my joker show up it's info... basicly it does nothing (placeholder intent lol) 2nd img is the code for it and 3rd img is the localization part for it... i tried to put a loc_text{} in the joker code however it makes the game crash instantly... can someone please help ? 
set ability
I use it for create card
You have no loc_txt
you did not include your mod prefix and class prefix
should be j_modprefix_JOKER_PlaceHolder
goofy ah loc_txt user who knows nothing about loc file
im just gonna put it here, due to the other chat being rather clogged
asking me to use a version which hasn't released yet??
I actually don’t but since they’re starting that’s the most easier approach
mb, my very first mod lolz also very first time using lua, seems funies
It is funsies
but they chose to start with loc file, why not provide full support
Take small steps
The 1000 miles journey starts with one step
I can link the wiki
If you want
You can find your mod prefix in your json file
replace JOKER_PlaceHolder with j_modprefix_JOKER_PlaceHolder
Localization file is a separate file
oh right
wdym by type_key?
if someone is starting out, it's likely they're using mod header instead of json 💀
no im using the json thingy
Your joker key i assume (i type anything)
either use this version of smods
https://github.com/Steamodded/smods/archive/refs/heads/main.zip
or this version of jokerdisplay
https://github.com/nh6574/JokerDisplay/releases/tag/v1.8.4.2
I need to make a tutorial once i finish my exams
eh
how can i make so the cards i enhance do the flip animation thing?
copy it from the vanilla cards
guessed
vanillaremade has plenty of examples
yeah ok
was the steammodded version
weird
the newer version wasn't on the latest releases
gotta be trolling
it hasn't released yet
that jokerdisplay version also hasn't released but i forgot mod manager takes from the latest commit
so i found a solution and it worked perfectly for 1 seal at first
proceeded to add the other seals
they dont work
only the first one
does every used tarot/spectral/planet juice up when used?
oh well at least it didn't crashed lol, i changed the key of the joker to j_shrimp_JOKER_PlaceHolder (modprefix is shrimp) in the joker file and the localization file but still nothing appears, sadje
did i miss something ?
wdym in the joker file?
No
JOKER_PlaceHolder.lua its called for me
key=“yourJOKERKEY”
In localization you call it with
J_yourModprefix_yourJOKERKEY
oh well
it's lowercase j_
ima try
😭please stop pointing upper and lowercase i’m on phone it automatically does that for me
i mean it is kinda important
I've developed a habit to turn off the auto-shift key at start of sentence when I type on phone

i dont have it, i hate uppercase
that way, no one can easily recognize I'm on phone
I'm just too used at having my message be informal
Have some pepsi
posting this again in case someone wants an example of the new probability stuff
https://github.com/nh6574/VanillaRemade/pull/20
I actually regret upgrading to W11
the cost of not having a dedicated GPU
things were way smoother back in W10
Mobile like dragging
yep
well hello again (lolz) how am i supposed to code the wiggly thingy happening to the "probabilities" in the localization ? i can't find anything
{C:green,E:1}probabilities{} -> E:1 makes it wavy, E:2 makes it bumpy
oh very nice
is there a way to change the amount of jokers currently owned? (the 1 in 1/5)
not through changing the currently owned jokers though, purely by changing the variable
that could work yeah
idk how that would interact with moving jokers around tho
hiya! how does SMODS.create_card work? (what arguments does it accept?)
awesome, thanks :D
how does oops all sixes works ? 🦐
it changes G.GAME.probabilities.normal and doubles it
(it normally starts at 1, doubles for each oops all sixes currently active)
i see 👌
is there a way to make a joker unsellable? (not eternal, i want it gone at some point)
You still need help w this?
yes, hook into Card:can_sell_card
alright thanks 🙏
How can i force trigger gold/ steel cards
Is there some way to make balatro close, with a joker or tarot card? I need it for a joke
Check cryptid code for “crash”
I looked through it, I don't want it to crash I want it to close, but if there is no other option I'll just crash the game
love.event.quit()
thanks!
any clue why the text doesnt scale accordingly with the loc_txt?
afaik it worked with s:2 but it just won't do it with values below 1
How to check if a consumeable has negative edition or not?
(I'm sure the one in the pic is not it.)
Does os.execute() work for Balatro modding? and if yes how could I make a path like folder1\folder2\blabla.exe
The codes are still essentially Lua, so everything Lua is capable of should be doable here, I hope.
oh okay! thanks!

hey yall ive been trying to get dynatext to work since im trying to work with a timer based joker and i have no idea how to get these to work together since as it is its not really updating live like misprint does which is kinda what i want but with the timer so you dont have to hover over it over and over again to recheck the time and can see the timer increase in real time
this is my first time really working with dynatext so i may have just forgotten something
Did you check how missprint does it
checked the vanilla remade version of misprint
this cuts off but this is the code for vanilla remade which i dont really see if i missed anything
you don't need dynatext, you need to save the value to a global table and use ref_table and ref_value either in a dynatext or a normal text node
i'll try to figure that out then
thanks
im satisfied enough with that i think
can you write something that checks if an atlas missing, it quits the game
How do I check what deck the player is currently playing?
I'm fairly sure the game would just crash if any atlas is missing.
G.GAME.selected_back iirc
hii dilly
do you like my little shader
oh goodies
it's cool
we should go out to dinner
My fucking eyes
you fucking hate me
i was thinkin about crts cause i have to buy one soon so i wanted to make something that reminded me of it
I fucking love elseif statements!!!
heya im kinda new to making mods in balatro and im trying make a mod but it always does "[SMODS _ "src/game_object.lua"]:408: Failed to collect file data for Atlas MoreXMultiplers_MoreXMultiplers"
does anyone know how often G.STATE gets updated
is the file in assets
every time the state of the game changes, there's no set time
ahh so it doesnt get updated every frame?
the lua thing no and json but the rest yea
can i see how the assets folder is structured
So idk what's causing this crash, or why there's a lot of nul joker objects being created, can anyone help me with these problems?
nvm i found the issue through the way the example jokers assets folder was structed mb nvm it still happens
you are loading 4 mods as if they were 1 mod that might cause issues
unless you have a main file and a json you didnt post
well, i did have all the 4 mods into 1 main file, but i tried to break them into smaller files so i can manage it easier then use the main file to load them all
try removing all the headers
heres all the stuff i can send to make it easier to see what's the problem as the cant file data of Atlas thing still happens
1x and 2x
oh
so um, The issue is still happening where the nul jokers are still spawning, and the game still crashes after trying to select a deck
sorry for the flood
brother you cannot be dumping 5 files with a total size of 60+ kb in chat and expect anyone to go through the trouble to help you
get a minimum reproducible example first
by the time you have that, there's also a 50% chance you found the issue yourself
(https://stackoverflow.com/help/minimal-reproducible-example if you have no idea wtf I'm talking about)
Why is your deck atlas position 3.01
3.01 😭
some sprites, i had an issue getting to display properly
In every deck that starts with a joker you didn't properly do the config
That's just not how position is meant to wotk
oh
{
"id": "busterb",
"name": "Busted Buffoons",
"display_name": "The Busted Buffoon Bundle Mod",
"author": [
"FirstTry"
],
"description": "A small content mod containing jokers i made in my free time, feel free to throw tomatoes.",
"prefix": "busterb",
"main_file": "bustedbuffoons.lua",
"version": "1.0.0",
"dependencies": [
"Lovely (>=0.7)",
"Balatro (>=1.0.1o)",
"Talisman (>=1.0.0)"
]
}
is this how i'm supposed to write the json?
how do i make a joker that replaces the boss blind music and also has mult
No.
no?
like is it the same code as the mult with a replace music thing.
You're missing a , also it is display_name
because i wanted to make a joke card in my mod pack that replaces the boss blind music with kevin macleod
ok now what?
what i mean by this is like a joker card with a 2.5x mult that replaces the boss blind music and i dont know how to code the music to be replaced with another audio file
why doesnt this work? it doesnt even print 'true', i made sure i had 6 or more dollars in testing and i also tried changing it so that being in deck doesnt ppause the game
where are you patching
card.lua
where exactly
it would be more useful to screenshot the dump
Oh, yes please, this is the closest I got
um, how would I make it so a joker scales with using a certain type of consumable? like constellation and fortune teller, but with spectral cards. I've figured out how to make it scale with all consumable uses but not specific types (I'm very new to all of this..)
trying to hook level_up_hand but it throws "attempt to call field "upgrade_hand" (a nil value) ghg
Replace the if key by if context.card.config.center.key
Put the hook outside of calculate and the object itself
context.consumeable.ability.set == "Spectral" in the using consumable context
thank you so much!!
Well it doesn't crash now but whenever I try to add ("Straight") or any arguments it crashes with the same error, do I just put hand = "Straight" in the calculate_context?
contexts aren't function
Try
SMODS.calculate_context({upgrade_hand = {amount >=1}, hand = hand})
...
if context.upgrade_hand and context.hand == "Straight" then
thanks, this works perfectly!
alright this is actually way better
how do you use SMODS.blueprint_effect more than once with SMODS.merge_effects??
thanks john smods
Store the return values to put into merge effects
Can you show the code?
calculate = function(self, card, context)
if true then
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
end
local merge = {}
for i=0, card.ability.extra.retriggers do
merge[i] = SMODS.blueprint_effect(card, other_joker, context)
end
return SMODS.merge_lists(merge)
end
end
card.ability.extra.retriggers is equal to 2 right now
why does my card draw to hand flipped? _true is a card btw
if you emplace directly from the deck it will be face down if thats what youre doing
you need to use one of the draw card functions
ahh
still a problem, can't figure out why
What card is it copying
i mean it is returning something since returning it instead of SMODS.merge_lists does copy the effect
how do we check the edition of card held in hand ?
No you need to check that it exists before sending it to merge effects
Otherwise you end up trying to return a table that’s like {extra ={}} in any context it doesn’t trigger
So the repetition error will shout at you
card.edition ?
why does my draw_card create ghost cards bruh 😭
yeah I have this :
if card and card.edition then
if card.edition.holo == true then
but it doesnt work
Yeah pretty much, just store the return and do if next(ret)
show code, but also id do if ...edition.type == 'holo' then
put a print('true') below if card and card.edition then and a second print under if card.edition.holo == true then check in game
kk I'll try that
Card here is the joker btw
didnt even notice that until i thought abt a solution away from my rig lol
🥺
You should also just change the return to mult = card.ability….
I don't know what happend in the code now but it give mult normaly and mult at the end_of the round, kinda weird
normaly means like how how want the card to work
Add and context.main_scoring
kk
context.main_eval
but I found that it only work when my joker is holo
Oh shit yeah it’s a joker my bad
so i have this joker and when blueprint/brainstorm try to copy it the message shows below the joker instead of below the blueprint/brainstorm
calculate = function(self, card, context)
if context.setting_blind then
return {
func = function()
SMODS.calculate_effect(
{ message = "+"..tostring(card.ability.extra.discards).." Discards" },
context.blueprint_card or card)
G.GAME.current_round.discards_left = G.GAME.current_round.discards_left + card.ability.extra.discards
return true
end,
extra = {
func = function()
G.GAME.current_round.hands_left = card.ability.extra.hands
return true
end,
colour = G.C.GREEN
}
}
end
end
can i get some help on this?
card is the joker
you want context.other_card probably
wouldn't that be the needle if anything
It’s because you’re using calc effect instead of normal messages
The blueprint card from the context isn’t stored for the event
that is indeed what happens but now i'm just unsure on how to fix it
gyeheheh, its works now, thamnk :))
config = { extra = { max = 23, min = 0 } },
loc_vars = function(self, info_queue, card)
local r_mults = {}
for i = card.ability.extra.min, card.ability.extra.max do
r_mults[#r_mults + 1] = tostring(i)
end
local loc_mult = ' ' .. (localize('k_mult')) .. ' '
main_start = {
{ n = G.UIT.T, config = { text = ' +', colour = G.C.MULT, scale = 0.32 } },
{ n = G.UIT.O, config = { object = DynaText({ string = r_mults, colours = { G.C.RED }, pop_in_rate = 9999999, silent = true, random_element = true, pop_delay = 0.5, scale = 0.32, min_cycle_time = 0 }) } },
{
n = G.UIT.O,
config = {
object = DynaText({
string = {
{ string = 'rand()', colour = G.C.JOKER_GREY }, { string = "#@" .. (G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.id or 11) .. (G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.suit:sub(1, 1) or 'D'), colour = G.C.RED },
loc_mult, loc_mult, loc_mult, loc_mult, loc_mult, loc_mult, loc_mult, loc_mult, loc_mult,
loc_mult, loc_mult, loc_mult, loc_mult },
colours = { G.C.UI.TEXT_DARK },
pop_in_rate = 9999999,
silent = true,
random_element = true,
pop_delay = 0.2011,
scale = 0.32,
min_cycle_time = 0
})
}
},
}
return { main_start = main_start }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult = pseudorandom('vremade_misprint', card.ability.extra.min, card.ability.extra.max)
}
end
end
}```
how do i make it Xmult and not +Mult ?
local ret = blueprint_effect
if next(ret) then
merge[i] = ret
end```
xmult_mod I think
yeah right mb
tried it and crashed, unsure why since next(ret) should work as per the next() documentation
ok, now I need help with this code, I need it to select one joker from a specific set and replace it with a joker of the same set
edit: had the wrong return, but still does the same "retrigger" error in game.
I was told to specify that it should be a joker, but i have no idea how I would do that
maybe by riffraf
wait no nvm
local loc_mult = ' ' .. (localize('k_mult')) .. ' '
main_start = {
{ n = G.UIT.T, config = { text = ' X', colour = G.C.MULT, scale = 0.32 } },
{ n = G.UIT.O, config = { object = DynaText({ string = r_mults, colours = { G.C.RED }, pop_in_rate = 9999999, silent = true, random_element = true, pop_delay = 0.5, scale = 0.32, min_cycle_time = 0 }) } },
{ n = G.UIT.T, config = { text = ' Dimensions shift, reality itself trembling under a weight unseen.', colour = G.C.DARK_EDITION, scale = 0.32 } },
{
n = G.UIT.O,
config = {
object = DynaText({
string = {
{ string = 'rand()', colour = G.C.JOKER_GREY }, { string = "#@" .. (G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.id or 11) .. (G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.suit:sub(1, 1) or 'D'), colour = G.C.RED },
loc_mult, loc_mult, loc_mult, loc_mult, loc_mult, loc_mult, loc_mult, loc_mult, loc_mult,
loc_mult, loc_mult, loc_mult, loc_mult },
colours = { G.C.UI.TEXT_DARK },
pop_in_rate = 9999999,
silent = true,
random_element = true,
pop_delay = 0.2011,
scale = 0.32,
min_cycle_time = 0```
how can i get the grey text under the x?? [buggy text]
edit: i'm slowly figuring out how it works
needs a if next(merge) then return SMODS.merge_lists(merge) end too
right
shouldnt it be merge effects
would it be possible to make an SMODS.DrawStep that constantly does the juice animation on the floating sprite the same way the soul does?
still not working
update smods
...wait a minute, why don't i just patch the relevant line in card.lua to have another way to enter the draw condition
My game crashes, when trying to go the Lucky deck, is something wrong with my config?
so closed like this?
yes
ty
why is there an extra blank line between each line
it helps me read the lines of code better
alrighty
bump :)
how do i get the amount of remaining cards in the deck? cant find the answer
bump
try G.deck.config.card_limit
update (once again); this doesnt crash (yippee) but it doesn't do anything either (the table is apparently empty, as per the print i had placed?)
- i think blueprint_effect shouldn't be in a table
- you're returning as soon as
mergeis not empty because the if condition is inside the loop
so more like something as such?
yes but now you need to change next(ret) to ret and next(ret)
oh and it should be merge[#merge+1] instead of merge[i]
🔥
this gives me the maximum size of the deck, not the amount of remaining cards
perfect, thank you
this didn't work, however i've just been trying to straight up use the code from card.lua and it's drawing a second floating sprite, regardless of whether i do it in the object's draw or in a drawstep 
how can i make it draw only the one floating sprite that does the juice animation
how can i tell if i'm currently viewing an item in collection
did you click on collection
card.area and card.area.config.type == 'title'
this is how to do list does it
why does to do list need that
oh wait
never mind I know exactly why to do list needs that
to have the seed not affect the run
yeah
is it card.discovered or card.config.discovered? 
card.config.center.discovered
how would you choose which cards to create in a booster pack (with a forced key)?
i've tried a bucnh of things, i have no idea how to get rid of the extra sprite
What is the goal?
same thing the soul does, juicing sprite. but doing this drawstep creates an additional floating sprite that juices, when i want it instead of the normal floating sprite
the sprite is doubled
it does give a pretty cool effect though
hmmmm
not saying dont remove it ofc it's just neat
What I did was I put the soul in a sprite then drew that on it, and that worked.
fair
how would i create more than one card? (with different forced keys)
You can't create multiple cards in one slot of a booster pack.
oh would i need to use an index then?
create_card has a third argument which is the index
how would i utilise it for multiple cards though cause i tried this and it crashed
that but without the for loop
and also the return should not be a table inside a table
right thanks
remind me how i get to the joker's name from G.jokers.highlighted[1]? 
G.jokers.highlighted[1].config.center.name
the name or the key?
edit: still doesn't work but for a different reason
wait no, that's not going to work because i want to take into account the name malverk can change it to
you need the localized name?
oh can i just localize the key and that will do it?
You put j.reserved_parking
i think you need to delete all the local except the first
that works
localize{type = "name_text", set = "Joker", key = G.jokers.highlighted[1].config.center.key}
thanks!!
Hey can someone pls explain how do i use this function ? Like with an example : replace: Replace the specified sound with this one whenever it is played.
give money method?
replace = "modprefix_soundkey"
ease_dollars(value)
where do i put the sound who is being replaced ?
thanks
I have been trying to replace the 5 base sound of balatro with this command with another song in my sound file
how can i do that
?
replace = "key"
quick question is this correct usage of the method? (assuming is first card is already declared)
ease_dollars(5)
end```
and where do i put this command ? i can't seem to understand
In the sound.
Yes.
let me explain what i am trying to do :
What is that line in the lovely dump?
Huh, weird, the probability changes kinda affect the pitches of some events...
txt file or console?
I think there is a dumb txt
or like a log thing
No, Mods/lovely/dump/functions/misc_functions.lua
i am trying to replace the 5 balatro base songs with my own song only when a joker is obtained like with the add_to_deck function
is this what ur asking for?
mb then
wait I think I found the correct thing
is it?
No, that is not the lovely dump.
oh wait
yeah thats for round end I think
though
P_Dollars seems the one Im searching for
I'm working on a joker that has a chance to add a purple seal to a random played card.
I was testing it with OA6's and it doesn't seem to be affecting the probability for some reason and idk why
(if my code looks stupid it's because I'm stupid and have never used Lua before)
What SMODS version do you have?
I believe the most recent
Release or commit?
1.0.0~BETA-0615a-STEAMODDED taken from the version.lua file
(pls forgive me if I sound like I don't know what I'm doing, I'm still very new to modding)
Why is modding killing me my sleep has reversed. Its now 9pm and I just woke up i fell asleep at 8am
How am I supposed to fix ts, I have plans to go to lightwater valley with my family this weekend
Im cooked
does anyone know why my draw_card() creates ghost cards?
you're emplacing the card in hand and also drawing it
Somehow even i managed to see that, I think I'm finally understanding lua properly
shit i forgor to remove that ty
does anyone know if playing cards have unique ids?
What do you mean
Yes.
hello there, im currently having trouble making a new tab in my mod's infos, weirdly the 'credit' tab works perfectly fine but the links tab makes the game crash instantly tho they both have the exact same way of working, am i doing smth wrong ?(problematic code on img)
🤔
you want something like this
https://github.com/nh6574/JoyousSpring/blob/a2630a0a7873651ec8280a97ac8652988c2e3cc6/src/mod_info.lua#L65
not the whole thing, is it ?
?
im not supposed to shove the whole thing into my code, right?
no, just replace the B node for the UIBox_button
and you have to define functions separately for the links
N
do u know where theyre stored?
card.playing_card
was testing something, moused over my deck and my game crashed 🥴
...retriggering OA6s is... wild.
i dont think ive ever seen smt use that react and it threw me off for a sec lmao
hi smt
works perfectly, thanks, it just shows up ERROR for some reason but besides that all goods 👌
i was going to suggest adding a parameter to get probability vars so it doesn't trigger messages and stuff when looking at tooltips
...tbh, I don't think probability modifying items should be retriggerable.
nvm i found
dum localization
Hey I've been working on mod ideas but I have a couple questions
What modding software is the easiest to use with little coding background knowledge
there's no easy fully featured modding software yet sadly, you will have to code
vscode with the lua extension and the steamodded auto complete is your best option
i recommend checking the pinne thread in #⚙・modding-general
do you guys have any clue of how the smeared joker works ? or even better, you guys have any clue of where its straight up code is located in the files ?
yippe
its me again
can anyone help me w that? even when i have 4 jokers and evaling G.jokers with db+ this code says that the lenght of G.jokers is 0
print(#G.jokers)
for i, joker in ipairs(G.jokers) do
print(i, joker)
joker:set_ability('j_joker')
end
Simpler: check SMODS.smeared_check(card, suit).
Vanilla: check is_suit(suit, bypass_debuff, flush_calc)
#G.jokers.cards
thats insane
thanks
i forgot that it has .cards, but even printing #G returns 0
like
its only 20 lines
Yes, because G is key indexed, not number indexed.
true
hi
how would i make negatives more likely to appear in a deck?
local oldenegativegetweight = G.P_CENTERS.e_negative.get_weight
SMODS.Edition:take_ownership('e_negative', {
get_weight = function(self)
local weight = oldenegativegetweight(self)
if G.GAME.selected_back.effect.center.key == "b_modprefix_key" then
-- change weight
end
return weight
end
}, true)
well obviously you need more then the key and the loc text
no but the joker should appear
whats the issue
itll just do jackshit with no texture
hmmm, I think there's actually a lot of calculation effects that affect the pitch when they shouldn't now, I wonder what the best way around it is
isn't it gonna default to the base joker atlas?
i don't know
yeah so itll be jimbo
think it's a memory thing
i'm new modding balatro i don't know anything
i trying to create a joker like the basic joker but for chips but how i write the part of "mult_mod" to chips?
Is the file in 1x and 2x?
Yes.
i'm stupid
does anyone have an example of a card area in a joker description?
change those file names, Check if you have the same joker art in both files, 2x being twice as big and you should be good to go 👍
here is
That's not supposed to look like that isn't it?
how i write "mult_mod" but to chips, isn't "chips_mod" or is?
just do chips = X
appearing?
atlas = 'Jokers'
you create an atlas, then add the key to the jokers you want it to appear on
learning some more ins and outs of music modding. I assume the select_music_track function specifies the conditions with which the music track plays, right? then what is with the and 99 in the select_music_track function? what does that do?
go back a page then come back
Does anyone know if VanillaRemade is going to add the tags?
Stuff like Uncommon Tag, Rare Tag and etc
i have no plans but i might do it at some point if i feel like it
or someone else can pr it
wrong link sorry lol
mmm so the number is a priority?
yes
gotcha. last question, how do the ANDs and ORs work in correlation exactly here?
like does any OR condition automatically make the whole condition true?
return condition and value1 or value2
is the same as
if condition and value1 then
return value1
else
return value2
end
do i need to download lua to fully mod? im on windows
I have a booster pack that draws jokers from a pool. However, if I already have some of the jokers from that pool in hand, it defaults to giving me the base joker. Is there a way to make it only draw jokers I don't already have, instead of drawing them along with defaults?
no, you run lua in-game
thank god.
what's talisman's localization message for ^^chips? trying to make a scaling ^^chips joker
i dont think so (easily), you can define a different default joker depending on how you set up the pool
^^#1# Chips?
cant even do anything for jokers?
The key of what?
the message
wdym
In the localization?
yknow what i just realized that message isnt actually the right one
A joker that creates a joker from a pool, already having all the jokers so it draws Jimbo instead
return {
message = localize({type = "variable", key = "para_powpowchips", vars = {number_format(to_big(card.ability.extra.eechips))}}),
colour = G.C.DARK_EDITION,
message_card = card
}
why does this return error when para_powpowchips exists in the localization
Is it in v_dictionary?
not easily, you would have to define the behavior yourself i think
Is this idea possible, a legendary joker in which it retriggers every joker once but that number increases every round, however it like seltzer only lasts so many rounds till its gone
It needs to be {"^^#1# Chips"}
Idea inspired by cyberpunk, the loss of uses each round being more chrome applied which i turn gives more retriggers but it goes when it turns cyberpunk psycho
why is the message error
Remove your mod prefix.
still says error
Log?
wdym log
it doesn't crash
just shows ERROR instead of ^^1.5 chips or whatever
why does the message show as ERROR
Add the _
I was gunna say yeah the key and the dictionary dont line up,
Idk if thats what u were on abt but thats what I saw
Wdym
Now i get what ur trying to do but that is beyond my capability try ask @red flower
id rather not get tagged to answer stuff please
Sorry
What is the joker in cryptid that retriggers other jokers i tried looking for it but cryptids code is a mess I cant find anything 🤣
Chad
It's in misc_joker.lua
Thank you
Does anyone know why the debuff isn't removed at the end of the round?
running some testing, why doesn't this code grant random enhancements / editions to scored cards?
where does the get_highest() come from and what does it do?
i've searched through the lovely git repo and the smods git repo, to no avail
It gets the highest card, for High Card
It's in the source code.
how would i change this to retrigger all jokers ive made edits to the cryptid chad code, what else would i need to do coz im ,lost
so theoretically i could use it to get the highest ranked card in a non high card hand?
Yes.
is math.sqrt a thing
Yes.
thanks
is there a way to detect when any card's rank or suit is changed?
How do you do it?
Hook Card:set_base
is it possible to set a tooltip to show the description of a Sticker?
Yes.
yknow generally when people ask if somethings possible they also want to know how to do it
as in the same way you'd put a tooltip in for a joker in the description of another joker
he is technically giving me the answer i asked for, i guess
,,,can I get some more explanation??
I have this for checking if the suit has changed, ```lua
local oldcardsetbase = Card.set_base
function Card:set_base(card, initial)
if self and self.base and self.ability and card and self.playing_card and card.suit ~= self.base.suit and ((not table.contains(self.ability.soe_suits or {}, card.suit)) or (not table.contains(self.ability.soe_suits or {}, self.base.suit))) then
self.ability.soe_suits = self.ability.soe_suits or {}
if not table.contains(self.ability.soe_suits, self.base.suit) then table.insert(self.ability.soe_suits, self.base.suit) end
table.insert(self.ability.soe_suits, card.suit)
end
return oldcardsetbase(self, card, initial)
end
Well this just isn't doing anything what have I done wrong ?
Change G.GAME.blind.chips
thanks
Remove the if context.other_card == G.jokers.cards[1] then if
you need to update the text too
https://github.com/nh6574/JoyousSpring/blob/a2630a0a7873651ec8280a97ac8652988c2e3cc6/src/jokers/11BurningAbyss.lua#L65
finally using joyousspring
but thanks
i never use it because it has a bunch of util functions that get people confused 😭
The Game crashes on start up.
when i try to get the Orbital tag working, via a utils.
It still does nothing
Code?
Remove the else return nil, true end
Also change repetitions to just be card.ability.extra.retriggers
I did all that and I'm still getting diddly squat....
Code?
Oh what did I do wrong
Did u mean replace the whole thing g
And not just make it that in the math.min
Yes.
G.playing_cards doesn't always exist.
If your saying it would read repetitions = {card.ability.extra.retriggers} then that didn't work
doesnt always?
huh
what should i do then
Remove the {}
G.playing_cards and #G.playing_cards or 52
in both the loc vars and calculate?
Only in loc_vars
arlgith thanks
Yes i have tried JoyousSpring, but I get nothing but crashes
hi
is that your whole utils file
does some1 know how i can run a function every frame or every second? not for a joker but in the main mod lua file
hook Game:update
no
yep
that code only runs once when the mod loads and almost nothing in the game exists, that's why the crash happens
you need to do the things in that file inside a function
and then call the function in your joker
Alright, i'll see what i can do
i would recommend literally copying the example i showed you lol
so the entire code of this?
hmm. do you know how i can make dt be passed onto it? it crashes 4 some reason
local update_old = Game.update
Game.update = function(dt)
-- pre hook
local ret = update_old(dt)
-- post hook
yes and replace JoyousSpring.add_random_tag for function modprefix_add_random_tag
ja
Alright
mult = 5?
Local var1=5x4x3x2x1 ,
Essentially in a for
Then return xmult=var1
With different message
And color
you're missing a reference to self
local game_update_ref = Game.update
function Game:update(dt)
local ret = game_update_ref(self, dt)
end
don't you just want a loop of like
mult = 5
(loop start)
mult_minus = mult - 1
total = total + (mult * mult_minus)
mult = mult - 1
repeat
the : is important
oooh i forgot that
what in the fuck
You can just use the loop counter
Do you know how factorial works
Yeaj
xmult = 1
for i= 1, 5 do
xmult = xmult * i
end
Thanks N
yea
so in theory, thats ^5 Mult right
Replace 5 with your config
5 being the value of the factorial
Variable
no
no 5!
oh okay
that's 5!
do i need talisman for that
aka 5 * 4 * 3 * 2 * 1
No.
Bro said he knows what factorial is
good
you just need the ability to multiply in order to create factorials lol
first google result for factorial
Same as power
you dont need talisman but the numbers get big fast so you might want it
this isn't taught in high school math
55! Is bigger than ^55
well from my experience
as a rising junior
By e20
idk how old you are
Final Exam, what's 0!
0
1
nxkoo dies
what the FUCK
is it actually 1 lol
You’re definitely failing math niko
HOW DID I GRADUATE
por que
taking that diploma back
NO,,,
Un uh
you're old damn
since when is a factorial a way to represent arrangements of things wtf
i've only ever learned about factorials from the internet i am a fool
gn
don't tell them about the Gamma function
where the hell am i
i start pre calc next year i'm scared
why am i getting this it didnt happen before
If cos(current time) is positive gain ^current time/60
else current mult/60
Is this good
some jokers have a number in extra
i have no jokers it can effect in hand yet it crashes when i select the consumable
you would need v.ability.extra and type(v.ability.extra) == "table" and v.ability.extra.coffee
but you have other jokers?
Yeah
yes then if any of them has a number in extra it will crash
Why was it not an usse before this and only just started happening
because you never tested owning a joker with a number in extra?
purple
since exponential mult is dark edition
yes
thanks
info_queue[#info_queue + 1] = { key = "c_eris", set = "Planet" }
why no work 😭
try G.P_CENTERS.c_eris instead
config = {
extra = {
xmult_per_card = 0.05
}
},
loc_vars = function(self, info_queue, card)
local extra_cards = math.max(0, G.playing_cards and #G.playing_cards or 52)
local total_xmult = 1 + (extra_cards * card.ability.extra.xmult_per_card)
return {
vars = {
card.ability.extra.xmult_per_card,
extra_cards,
total_xmult,
G.GAME.starting_deck_size
}
}
end,
calculate = function(self, card, context)
if context.joker_main then
local extra_cards = math.max(0, #G.playing_cards - G.GAME.starting_deck_size)
return {
x_mult = 1 + (extra_cards * card.ability.extra.xmult_per_card),
card = card
}
end
end
}
theres something wrong in here
instead of being X0 in the collections tab
it show 3.4
replace that or 52 for or 0
thanks
I have a joker which retriggers rhe last card of played hand twice but it only does so when there are 5 cards played how do I fix that, I will send code in a second
Oh wait no ik why but how do I make it always last card and not the fifth card
evening alll!
this is allowed right
context.scoring_hand[#context.scoring_hand]
no
i put this in the calculate dunction but how will it know for it to be the last car played as thats where i had defined it as card 5
yeah but you need to check that G.jokers exists
so literally just
if G.jokers
#context.scoring_hand is the size of the array so it will always be the last card
oh thank you
Its doing every card
can i see the code
i already know i misinterpreted it
yeah you're missing the comparison
The last bit I wasn't meant to remove then
you just needed to change the 5 for #context.scoring_hand
is there an easy way i can prevent specific jokers from being able to get an edition?
it would be able to go on any other playing cards or jokers but i want to be able to exclude specific ones
Yes.
how would i go about that?
i assume i can find card but how am i preventing it from getting that edition
Hook Card:set_edition
How would I reverse a banner and for every discard less you have you gain instead
Trying to fix a config file with the same crash. Does it matter where in the config file I put this?
Nevermind
wdym by config file
overrides.lua
like that's a file in your mod?
Yes, it's a store crash from steammodded by the looks of the log
what's the crash
seems to be something to do with pokermon
whats the relevant card variable for context.repetition, if any
context.other_card
in your return, you're returning chips
uh I followed the modding tutorial that was in the main tutorial in the discord, the one by artmuncher and the joker i made isnt showing up
post code
SMODS.Joker{
key = 'grassjoker',
loc_txt = {
name = 'Grass Joker',
text = {
'Win the Game',
'after inputting Secret Password'
},
},
}
ignore the ability im workshopping it
well since its done i can share, since N' helped so much when you use discards he helps the player too !!
does the file have a header or do you have .json
return {
message = localize({
type = "variable",
key = "a_minus_chips",
vars = { #context.scoring_hand * card.ability.special.subtract }
}),
colour = G.C.BLUE
}
Do I have this formatted wrong? the message the Joker makes is always just ERROR
--- STEAMMODDED HEADER
--- MOD_NAME: Grass Deck
--- MOD_ID: GRASSDECK
--- MOD_AUTHOR: [Wolfie and Staple]
--- MOD_DESCRIPTION: Adds the Grass Deck, Grass Joker and the coveted 2 and 7 Joker.
--- PREFIX: GRASS
------------MOD CODE -------------------------
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}
This is what the tutorial said
a_chips_minus
does the mod not appear at all or just the joker?
The mod doesnt appear at all
is it that my file is called main.lua.text, i cant figure out ow to make it not a text file
how do i do that
steamodded has an extra m
also yes
it has to be main.lua
(or any other name but .lua)
i have no clue how to make it .lua
thanks
are you on windows
yes
If you're on Windows, open File Explorer and click on the three dots. Select options, and there should be a setting somewhere that lets you view all files with extensions. I would always recommend keeping this on, especially for programmers
the name of the setting is "Hide extensions for unknown file types", and I think it is enabled by default
YES IT WORKED THANK YOU
i have been trying to figure this out for three days, i have so many tabs open. thanks so much
do u not use vscode
why not? it auto formats the tabs which helps me a lot
for everything you write, if you at some point use multiple files for your mod, you HAVE to have every file you have content in as a .lua file. Any exceptions to this rule are pretty unlikely to be used for your first mod
thanks 😄 😄 😄
i was askig if you did, u said u dk how but that always shows thw extensions doesnt it
it does he just didn't know how to change it manually
ohhhh ok
im kinda new to programming in general
when i took the ap class for it i got a 2 on the exam
same here im on my 5th day of doing this from scratch self learning
for the record, you CAN also change the file extensions inside of VSC, but its better to know how to use File Explorer since that is gonna be your bread and butter
thanks a lot jedi : D
Np : D
I always like helping ppl with programming stuff since I self-taught before going to uni and I got myself into some pretty bad habits
I'm much better now tho lol
wait so how many people here are fully self taught
probably most people. Programming is fun and useful to know, but I'd guess that the amount of people getting an education for it or that use it in their work life is pretty small
im not, i got java classes as a teen
I've only been in the discord for like a month so I can't promise that tho
I taught myself, then took and excelled in several classes
coding is one of those things that you can teach yourself with relative ease if you're willing to learn. The most important part is having patience and staying motivated tbh
i have nothing but motivation as i just finished college like 2 weeks ago so after being bored so long i turned to modding my favourite game
congrats on finishing college 🙂 I'm about to start my 5th semester this fall
A lot of languages are the same the main difference is the syntax.
whats a semester
I taught myself by writing scripts for a different game a bunch of years ago. Learned Lua playing the ComputerCraft mod in Minecraft 🤣
im from the uk so its a bit different for me
Its half a school year
ohhh
Fall Semester is August-December, Spring is January-May
