#💻・modding-dev
1 messages · Page 523 of 1
yes it is
ok thx
key = "trans_joker1",
atlas = 'trans_joker',
pos = { x = 0, y = 0 },
rarity = 2,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
cost = 4,
config = { extra = { mult = 20 }, },
}
)
calculate = function(self, card, context)
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
no crashes, but it didn't trigger. i'm assuming i forgot something?
no blueprint, you can't have this 20 mult
girl
uh oh... yes?
calculate should be inside the joker code
lol
here ,
key = "trans_joker1",
atlas = 'trans_joker',
pos = { x = 0, y = 0 },
rarity = 2,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
cost = 4,
config = { extra = { mult = 20 }, },
calculate = function(self, card, context)
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
}```
you're missing a loc_vars and a loc_txt btw
but this should work without them
@agile path
you had exta () aswell
can you send the code in text?
and then do what
retrigger the selected joker
you need to calculate the random joker position in the config , you can do that with a for loop and psurodanrom , 1 and #G.jokers and in calculate retrigger said joker
good start , now make it scale and add text
i added text! it works hehe
whats the key for the sound played when a tag activates?
as a challenge from me i want you to make it scale when you play a pair
check game code
amab joker, nice
i'll slowly try to do that lol
it's simple trust , just check vanilla remake
yessir!
which mods has the most consumables
how would i make a loop that goes every turn
cryptid or mayhem
not sure about mayhem since it has other mods integrated
function and call it in config , check idol code in vanilla remade for more context
no i dont have it with me, it's in the game's code
I didnt find it soim copying it
what part of vanilla remade?
oh mb
lol
here's your reference if you couldn't figure it out https://github.com/nh6574/VanillaRemade/blob/3d719c5647c3e053c994ca8999dc19dfa3181925/src/jokers.lua#L2854
thank you :3
the ^1.1 mult calculation is making another message, how do I fix this
so change the message line to xmult_message = {}?
= { message = "message", colour = color }
ah
yes
i have this for choosing a random joker then retriggering it
and loading the deck that does this
Oh yeah that works
It doesn’t load?
the deck dosent appear in the galdur select screen
this better
how do I do the funny misprint description glitch
put an extra tab before the retrigger effect and at the end of the if containing said retrigger
The end also and the inside of the if should be in more
Vanilla remade
it doesn't have the loc_txt for any of the jokers
which infuriates me
Localization file
i wanted to check if this is used in other files
Send the code
misprint's text is empty
Nxkoo give him the misprint text
like in text
Yes
it uses DynaText
oh i saw that in the jokers.lua
idk how to apply it tho
SMODS.Back {
key = "construction_deck",
unlocked = true,
discovered = true,
atlas = 'construction_deck_atlas',
pos = { x = 0, y = 0 },
local chosen_joker = pseudorandom_element(G.jokers.cards, 'blu_choice')
-- Retrigger
if chosen_joker.ability and chosen_joker.ability.retrigger then
chosen_joker.ability:retrigger(chosen_joker)
end
}
thats the deck code
1 sec
heres the master script thing
for the misprint stuff im making a time bomb joker that has "Detonates in {misprint effect} Rounds"
SMODS.Back {
key = "construction_deck",
unlocked = true,
discovered = true,
atlas = 'construction_deck_atlas',
pos = { x = 0, y = 0 },
local chosen_joker = pseudorandom_element(G.jokers.cards, 'blu_choice')
-- Retrigger
if chosen_joker.ability and chosen_joker.ability.retrigger then
chosen_joker.ability:retrigger(chosen_joker)
end
}```
Lebron James caught not using
dangit it wont type
i mean '''lua
Vanilla remade has that covered, but I still think it's too advanced
i also get a crash when i try to load balatro with my mod
apparently the field at line 2 of main.lua is nil
send crash log
just copy it 5head
some critical thinking is needed tho
I'm just not sure if they understand what DynaText is in the first place
shit's hard
forgive me for my incompetence but i taught myself lua a week or so ago so i could make a balatro mod but idk how to make a random whole number within a min/max range so how do i do that
just do what huy send
this shall send you straight to what you need
no i need an internal number for the amount of rounds the bomb has until it explodes
they work well, imma implement the scalling now
brainstorm makes blahaj look like a submarine lol
its complicated honestly
pseudorandom('seed', min, max)
i have the main file as "main.lua" in the json but it says its not there
ye i used it before
the File not found: main.lua thingy refers to the game's main.lua, not your mod's
oh
well the game loads if i make the name anything but main.lua in the json
the mod dosent load
check line 2 in your mod's main.lua
huh
what
why are you using NFS
you're trying to make a Steamodded mod
it should handle everything for you
so if i delete that
what are you trying to achieve here
loading the deck script
my vscode is seeing an if as an undefined global
the deck code is in a seperate file
how would i load it in main
SMODS.load_file('relative/path/starting/from/your/Mod/folder')
also put SMODS.Back in construction.lua
ok
how to i make it check what hand types i play? i saw vanilla remake, but there's something i'm not quite getting
context.scoring_name == "Three of a Kind" for example
next(context.poker_hands["Three of a Kind"]) for contains
like that path
if context.before then
would this come into play?
if context.before and context.scoring_name == "Three of a Kind" then would do something before the hand is scored if you played a 3oak
or if context.scoring_name == "Pair" then
can i level the mult up like this?
I'm expecting a crash tho, if it does tell me
it did
it needs to be alongside a timing context
also what do you mean by level the mult
do SMODS.Atlas first
yes?
what do i hook to mess with Joker trigger order
no idea
fuck
card starts at 5 mult, gets +2 for each pair you play
ok
wrong choice of words oops
yeah you can do that in context.before
like card.ability.extra.mult = card.ability.extra.mult + 2
@faint yacht what function do you hook for your randomized order trigger deck (ping me when you reply btw)
could anyone help me figure out why this is crashing the game?
whats the crash
i got another crash after doing that
attempt to index field GAME (nil)
the timing context would be there to ensure this if triggers before scoring, but after playing the hand?
how do i do that only once
yes
do it in set_ability
so set_ability = function(self, card)?
add this field to your joker object:
set_ability = function(self, card, initial, delay_sprites)
card.ability.bomb_rounds = pseudorandom('bomb', 2, 24)
end
how do I add a (SELL NOW) to the description of the card when its about to blow
use main_end
in what way
see Luchador
also
another good way to learn how to mod is to look at other mods
look at Cryptid :clueless
how to delete all of the jokers
you might want to experience modded Balatro first with popular mods before making your own
i think it failed to get the file data for my atlas?
i'm trying to find the timing context on the wiki, i cn't find it
i'm looking here
https://github.com/Steamodded/smods/wiki/Calculate-Functions
like destroy yeah
how's your file now
oops wrong word
said atlas
SMODS.destroy_cards(G.jokers.cards)
swag
ok your Atlas object is wrong
sorry, by that i meant any of the contexts in Main Scoring Loop, like context.before
path takes a relative path starting from YourModFolder/assets/1x and YourModFolder/assets/2x
make sure there exists the same file name in both places
in both 1x and 2x?
is this added in the same if? if ..... and ...... then?
do i include the mod file name in the path
nope
just 
yes, you always one to have one of the ones listed in the page first and then the ones like below are the extra information you have during that context
i'll send you what i wrote, tell me what mistakes i made
if context.before and context.scoring_name == ("Pair") then
card.ability.extra.mult = card.ability.extra.mult + 2
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
remove the parentheses wrapping "Pair"
add an end after the mult increase
you need all of if then end per condition statement
yup yup, i forgot the end
thankies
if i were to run this, it shouldn't crash, correct? D:
crashes help you find the problem
mhm
like this
id rather have crashes than bugs with no crashes lmao
im going to crash out
reminds me of this abomination
where one SMODS commit broke all modded languages
see that white strip over there? it gets worse when you scroll down
this keeps breaking even though i copied the luchador stuff
i dont think you need to use to_big on that honestly?
so...
it works
however, if my math stands correctly,
mult be going
5, 7, 9, 11
not
5, 7, 13, 19, 25...
the game loads but in the deck select it dosent appear and all the other decks are moved around
whats the crash, btw?
UI is a nil value
seems like its related to main_end then
i think i know what's going on
calculate = function(self, card, context)
if context.before and context.scoring_name == "Pair" then
card.ability.extra.mult = card.ability.extra.mult + 2
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
is it adding +4 mult instead? cause on config it says mult_gain = 2?
these are my two scripts
have you tried if context.before and context.main_eval and context.scoring_name == "Pair" then 🤔 i dont really remember if you need context.main_eval on that one
💀
what would be wrong with main_end
your localize doesnt work
is there some obvious problem im missing
remove it
what are you trying to achieve with your modded deck
i must say, when i tried the joker, i had blueprint and brainstorm affecting it
would that affect?
yes
then how do I change the text
remove localize
i did that but that was changing text from 'youre fine :)' to 'SELL NOW'
is there any context.before blueprint and brainstorm
text = ' '..(detonating and 'Sell Now') or 'youre fine :)'..' '
the deck selects a random joker and retriggers it every turn
💀
do that inside calculate field
if you dont want it to be affected by blueprints, add and not context.blueprint
also
G.UI.WHITE isnt a thing
do what
card.ability.extra.mult = card.ability.extra.mult + 2
end
like so?
mhm
use either G.C.WHITE or G.C.UI.TEXT_LIGHT
im also trying to get the deck to ACTUALLY BE SELECT-ABLE AND THE CARD BACKS TO WORK
detonating is a boolean
seems like construction.lua didnt even load
because if it did then it would crash
yes
(detonating and 'Sell Now') means that if detonating is true, it will use 'Sell Now'
else it will use 'youre fine :)' instead
is this not loading the file
would i also be able to put text saying something like "upgraded"?
yes
For influencing order of cards, I simply take the original set of cards, add them to a table, shuffle and return said table back to the scoring - for that, I had to use a Lovely patch. Otherwise, the actual scoring involves the SMODS.calculate_main_scoring hook.
the game is crashing because the line you gave me attempts to concatenate a boolean
thats odd
neato
thanks Ali
can you show me your code again, im pretty sure thats how it works 🤔
return message = "...", or SMODS.calculate_effect({message = "..."}, card)
And said Lovely patches...
text = ' '..(detonating and 'Sell Now' or 'youre fine :)')..' '
your closing bracket was at the wrong place
oops
🤔 i see
^ this too btw
this goes here?
card.ability.extra.mult = card.ability.extra.mult + 2
end
how do i finish an unfinished table
the return
mhm
tyyyyy ❤️
you can either return or use SMODS.calculate_effect there
id highly advise using a localization file btw :3
this is in nodes = {}
i have a localization file
it only has the jokers info for now
- maybe its
text = ' '..((detonating and 'Sell Now') or 'youre fine :)')..' ' - change
colour = G.UI.WHITEtocolour = G.C.UI.TEXT_LIGHT
mhm, if you were to use localize("upgraded_message") for example, then you want to go to your loc file and add upgraded_message = "Upgraded!" to misc -> dictionary
your joker object is a table
a table goes like this:
local table = {
"value_1_as_array",
"value_2_as_array",
key1 = "value3_as_key-value_pair",
key2 = "value4_as_key-value_pair",
}
you can't just do
local table = {
key1 = "stuff",
local var = 2 -- wrong, tables cannot be like this
}
well now it's trying to index field UI again cuz ui is nil
did you change colour
ye
wait is it a joker object even if its not a joker
can you help me implement this please?
I may have used the wrong word oops
every object you declare through SMODS is a table
i have no clue what the "same line" in question is, i will assume thats the line with colour
take a ss of your code again pls, also make sure you saved it
ok, so how do i make it a table
descriptions={
Joker={
j_jgbt_trans_joker1={
name={"Trans Joker"},
text={
"Both",
"{C:attention} Kings{} and {C:attention} Queens ",
"count as their counterpart",
},
},
j_jgbt_blahaj_joker1={
name={"Blahaj"},
text={
"He's a good boy"},
},
}
}
}
my localization en-us so far
saved it
return{
descriptions={
Joker={
j_jgbt_trans_joker1={
name={"Trans Joker"},
text={
"Both",
"{C:attention} Kings{} and {C:attention} Queens ",
"count as their counterpart",
},
},
j_jgbt_blahaj_joker1={
name={"Blahaj"},
text={
"He's a good boy"},
},
}
}
},
misc = {
dictionary = {
your_mod_upgrade_message = "Upgraded!"
}
}
}
it would look something like that
oh, i added an ExtraEffects{}
oops
Is there a way for me to add new calculations btw?
ah, i see
like, new contexts?
I suggest taking a look at other mods' code
you should familiarize yourself with lua code first
Like +score
otherwise you're stuck with syntax errors
ooh you got it working i see
in the case of the above, your_mod_upgrade_message can be blahaj_upgrade?
what in the sweet and sour hell is complex score
imaginary numbers
also read my name
inside the if, correct?
Trust me, i can be scarier if you keep pinging me
soooo do you want to like, add stuff that you can return in calculate to add to complex score?
lol
I wanna make it so I can calculate and add to score and complex score depending on the card
Like here's my test joker
I plan to make another one that's +iScore as I'll call it
is this not a table?
the soul rate of a card is its percentage to spawn right
apparently this is crashing the game even though I defined total_rounds and bomb_rounds
ah, you want to hook to SMODS.calculate_individual_effect then
its percentage to replace a card in a booster pack, yes
which should allow you to do stuff like
if context.joker_main then
return{
iscore = 1000
}
end
only if: A: its a consumable
B: it's hidden (i think)
bump
this is what the function does btw
I don't need to do anything with card_eval_status_text or anything?
@manic rune
card.ability.extra.mult = card.ability.extra.mult + 2
localize("blahaj_upgrade")
end
like so?
oh you still do, you can refer from how the function is doing stuff
close,
if context.before and context.scoring_name == "Pair" and not context.blueprint then
card.ability.extra.mult = card.ability.extra.mult + 2
return{
message = localize("blahaj_upgrade")
}
end
does the message appear like spare trousers, wee, etc?
make a new run and try again
no, thats not how a table works
oh i did notice astronimica has a calculate score
if anything id recommend relearning how lua tables work
The only problem is that it's in talisman format stuff
dang
it works!
it says ERROR! tho
show me your localizization file again
calculate = function(self, card, context)
still crashed, here's the joker code
config = {extra = {bomb_rounds = 999, total_rounds = 0}},
loc_vars = function(self, info_queue, card)
local main_end = nil
if card.area and (card.area == G.jokers) then
local detonating = card.ability.extra.total_rounds == card.ability.extra.bomb_rounds
main_end = {
{
n = G.UIT.C,
config = {align = 'bm', minh = 0.4},
nodes = {
{
n = G.UIT.T,
config = {ref_table = card, align = "m", colour = detonating and G.C.INACTIVE or G.C.WHITE, r = 0.05, padding = 0.06},
nodes = {
{ n = G.UIT.T, config = {text = ' '..((detonating and 'SELL NOW') or 'youre fine :)')..' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.32 * 0.9} }
}
}
}
}
}
end
return { main_end = main_end, vars = {
card.ability.extra.total_rounds,
card.ability.extra.bomb_rounds
} }
end,
set_ability = function(self, card, initial, delay_sprites)
card.ability.extra.bomb_rounds = pseudorandom('bomb', 2, 10)
card.ability.extra.total_rounds = 0
end,
calculate = function(card, self, context)
if context.setting_blind then
if card.ability.extra.total_rounds > card.ability.extra.bomb_rounds then
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
else
if card.ability.extra.total_rounds < card.ability.extra.bomb_rounds then
card.ability.extra.total_rounds = card.ability.extra.total_rounds + 1
else
card.ability.extra.total_rounds = card.ability.extra.total_rounds + 1
card:juice_up()
nvm
nvm
i see
skull emoji moment
skull

if you want talisman support then you can pretty much just does what they did there, i think
id swap this out though, seems like thats a custom function
is this part loading the other file
you got the order of calculate wrong
its calculate = function(self, card, context)
no, it still says error :(
show again sob
here lol
if you didnt change the order then misc is in the wrong place
it should be outside of descriptions
3: show again
Swap this out for what just the regular one?
card_eval_status_text, yes
it's still inside descriptions
yeah, what huy said
I honestly don't want the talisman support so I'll figure something with stuff like tobig and all that
ah, ic
in which case just remove to_big
and use G.GAME.chips = G.GAME.chips + ...
and remove the if not Talisman... check
local complexscore = SMODS.calculate_individual_effect
function SMODS.calculate_individual_effect(effect, scored_scard, key, amount, from_edition)
local ret = complexscore(effect, scored_scard, key, amount, from_edition)
if ret then
return ret
end
if (key == 'score' or key == 'score_mod') then
local e = card_eval_status_text
card_eval_status_text = function() end
G.E_MANAGER:add_event(Event({func = function()
G.GAME.chips = G.GAME.chips + amount
G.HUD:get_UIE_by_ID('chip_UI_count'):juice_up(0.3, 0.3)
return true end}))
card_eval_status_text = e
card_eval_status_text(scored_card or effect.card or effect.focus, 'voice8', amount, percent)
return true
end
end
for _, v in ipairs({
'score', 'score_mod',
}) do
table.insert(SMODS.calculation_keys, v)
end
end```
like that?
god your indentation sucks
me or kimi?
mine
oh
mm i think so?
though i gotta be honest, i have no clue wtf this is for
if it doesnt work then remove it later
Good schmorning chat
hi dilly
Hi bepis
is it not outside? cause i'm clicking on the description brackets and it's telling me that it's not inside lol
this isnt loading the other file because the other file says to print "Deck Script Loaded" and it isnt
construction.lua isnt running
double checking
if SMODS and SMODS.calculate_individual_effect then
local complexscore = SMODS.calculate_individual_effect
function SMODS.calculate_individual_effect(effect, scored_scard, key, amount, from_edition)
local ret = complexscore(effect, scored_scard, key, amount, from_edition)
if ret then
return ret
end
if (key == 'score' or key == 'score_mod') then
G.E_MANAGER:add_event(Event({func = function()
G.GAME.chips = G.GAME.chips + amount
G.HUD:get_UIE_by_ID('chip_UI_count'):juice_up(0.3, 0.3)
return true end}))
card_eval_status_text(scored_card or effect.card or effect.focus, 'voice8', amount, percent)
return true
end
end
for _, v in ipairs({
'score', 'score_mod',
}) do
table.insert(SMODS.calculation_keys, v)
end
end
can u try this 🤔

im trying to make the outline color red when detonating is true but it's not working
aight, one sec
same thing
weird, what line is it pointing to
bump
what colour is it showing
white
hm, i wonder why its not detecting scored_card
remove the brackets
it should be colour = detonating and G.C.RED or G.C.WHITE
fixed, it didnt work
rq, might sound dumb but can you add card = card in return too, i gotta check smt
card_eval_status_text(scored_card or effect.card or effect.focus, 'voice8', amount, percent)
return card = card?
oops, wrong video
oh no, in your joker's calculate
send full ss
add card = card in its return too
like that?
mhm
@cursive gazelle
forgot a comma lol
i cant find SMODS.load_file or a function in the wiki to load another script
oh wtf
.
i was wondering why it didnt detect it lol
note to self, have caffeine ~~(not caffeyne) ~~ while i code at midnight
:p
lmao
Now to see if i can do it for complex score in a moment
I love my scards being scored
anyways you can remove card = card after fixing that
-# i hope
is it still white all the time
true...
also dilly have you seen stacked v1.0.4 :3
ye
i added some cool description changes to the mod
WHAT IS THE FUNCTION TO LOAD ANOTHER FILE
Nope!
What happened does it print a car
i wish
Also I realized I can do XScore and XiScore possibly later on
oh geez. xScore would go nuts
make sure you're passing rounds correctly
ye the whole detonating mechanic works just fine
if you're not using debug tools, I'm quitting
assert(SMODS.load_file("path/to/your/file.lua"))()
least thats what i do
my oh my
wait wtf just happened
yep, SMODS.load_file("path/to/your/file.lua")() <- this
ive also added some pretty neat effects too
-# like the one you are seeing in the image,second one
is the assert neccessary
i've been using debugplus and stuff
I told it to give in joker_main and the score vanishes
I meant the bracket after
yeah you cant add to G.GAME.chips directly in context.joker_main
SMODS.loadfile(stuff)()
what does it do if the joker gives multiple effects
oh
ie i have my boss which gives chipos, +mult, and xmult and money
will it only convert the +mult of orverwrite everything it gives
it will convert the +mult
nice
nice, gj shinku :3
and imaginary score works in Context_main
mhm, thats because nothing is affecting your imaginary score in other contexts i think
for G.GAME.chips specifically its affected by stuff
i got it to load and it added another deck like i wanted but the deck is this
although, i guess at this point i dont think the +mult conversion matters much....
lmao wtf
which means the card back isnt working properly either
It just needs sfx when it activates
@gilded blaze do you have a fix for the color bug or is it hopeless
- your deck doesnt have atlas
- your loc_txt doesnt exist/theres no localization entry for it to check from
He's so cute
because rn it doesn't show anything and doesn't have any sound
why he like pair so much
mhm you gotta do that yourself
:3
also whats the complex score for vs the normal score, custom blinds?
anyways i will be going to sleep early today, got a bus tomorrow to catch
cause he likes to be cuddled. and for a cuddle to happen, it requires two people
peace everyone
rest well bepis, i will watch you sleep
peace out! and thank you for helping me
naww
ngl... i might keep the blueprint "bug" a feature...
what blueprint bug?
so, earlier, the scaling joker was scaling 2 extra times cause bp and bs were copying it
oh right so an if not context.blueprint in the if statement for the scaling would fix it
i might actually keep that lol
What's the problem with my 3rd line here ?
I can't seem to find anything wrong there 😭
so what is the joker trying to do?
is_suit*
would this be a valid loc_txt
-# im on phone now so i wont be able to help with complicated stuff :3
should be
go to sleep
grrr
Count the number of diamonds cards played. I had a first version who was working, but now I'm trying to make it work with the Smeared Joker
change has_suit to is_suit (in case u didnt see my message)
iirc you dont need to do anything else once u get :is_suit() fixed
itll handle the smeared joker logic
(I didn't see it yes ;; thx)
crash says assert isnt a valid function
imma try to work on a different joker
👁️ 👄 👁️
is there any context to after a round ends?
context.end_of_round and context.main_eval
shrug, u r meant to use it with context.end_of_round though else it will trigger a lot
yea i learned that the hard way
basically the place where all jokers that have an effect at end of round are intended to trigger
yeah if you dont have context.main_eval then some other contexts with context.end_of_round are called
hence context.main_eval prevents duplicate triggers
i think thats what it says it has a problem with "Assert" in main.lua
if context.end_of_round and context.main_eval then
?
remove the not
oh
whats the code
yep thats correct
then return whatever, yes?
can you show me your mod's files in vsc
yep
if u want to do cash at end of round then you'll need a different function tho
i want to start as 3x mult, lose 0.25x mult each round
?
you couldve just took a ss of the files on the left of your code but sure
whats inside data
probably should be ./data/decks/construction.lua no?
mhm
does anyone knows why ?
not how you use SMODS.add_card
oh ok so at end of round you'd do something like this:
if context.end_of_round and context.main_eval then
card.ability.extra.x_mult = card.ability.extra.x_mult - card.ability.extra.decrement
-- replace these with the appropriate config variables
if card.ability.extra.x_mult <= 0 then
SMODS.destroy_cards(card)
return {message = "Destroyed"}
end
whats weird?
capping at 1.25x or something, haven't decided
i guess try adding the ./ like i said since it isnt present
wdym ?
yeah what dilly said
you use SMODS.add_card exactly like how you would use SMODS.create_card
by passing a table of arguments in there
what you are doing with SMODS.add_card is inserting an entire card in there, which doesnt work
WHATS WEIRD??
i beg of you to read what we are saying
obviously he was saying weird because he didnt know why it wasnt working, i then said the following which you did not see here
and then said this
i believe you are supposed to load in the other files from the main file
he posted his main file above which shows that
oh
replace your code with this
SMODS.add_card { set = "Base", enhancement = "m_stone", area = G.deck }
it has a problem with "assert" i think
it does not, because i use it
and that works for you?
why else would i have told you to use it
just add a ./ in your SMODS.load_file
ive said that like 3 times so far lmfao
3:
really? show code again
nothing hes shown shows that he put it in yet, thats what ive been waiting for an update on
i put it in
and it still doesnt work?
you also saved it?
yes
3: u can just send the crash log
can i make it cap at a specific mult? say 1.5 or 1.25x
you didnt close a loc_txt
ctrl + C at the crash screen and ctrl + V over here
[SMODS construction-deck-mod "main.lua"]:8: Error processing file './data/decks/construction.lua' for mod with ID 'construction-deck-mod': [SMODS construction-deck-mod "./data/decks/construction.lua:9: '}' expected (to close '{' at line 2) near 'loc_txt'
Stack Traceback
Surely the error checking in vsc should've picked this up 😭
youd think
i will guess they dont have lua extension installed
id this not closed
Is the actual file here
show the entire thing
yea just post the file
done
it should tell you whenever you are missing a comma in a table
so more like dis
you are missing pos = {x = 0, y = 0}
but other than that, yeah it should be fine
though calculate wont work
?
why not
is it supposed to be function calculate?
im guessing youve set it up wrong, not sure how cos i dont do anything deck or retrigger related
it wont retrigger
is the command wrong
yes
i used the red seal code
but also, red seals arent even meant to be used for jokers so thats probably why
i just need it to do its action twice
this is a deck though so
i wonder if you can still use if context.retrigger_joker_check then here
one day i should make the deck of only face cards since theres the deck without face cards
make a deck start with pareidolia /j
lmao
can i just make the chosen_joker loop its action
sry for not getting back to you sooner, my mom just told me to help with some chores for a bit
assuming this code is in your end of round context, then this should be it
if card.ability.extra.x_mult > 1.5 then
card.ability.extra.x_mult = card.ability.extra.x_mult - card.ability.extra.decrement
end
so basically if the joker's xmult is greater than 1.5, then subtract
what kinda chores did u do
organizing the fridge and taking in the groceries
i'll smush the codes together, do fixing and then you can let me know if anything is wrong
hi dilly
N ♥
if u have it cap then u dont need the self destruct code
Hello!!!
Winterrrrr
Winter i need your goddess powers
got it!
is it possible to do the other way around? start at 1x, go up by .25 and cap at any number?
just swap numbers i assume
yep
Okay take the blue pills
you need to make 1 of 2 things to happen today
do i need a (global) in front of pseudorandom_element
speaking of pills, i'm making a hormone tablet joker lmfao
Macrodosing
either 1. my amazon package arrives today like it claims when it isnt even out for delivery
2. the facebook marketplace guy with the crt actually comes today and answers me
vsc says i do
(I use injections anyway so this is aside me)
what if i eated all of your injections
if card.ability.extra.xmult < card.ability.extra.cap then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.increment
end
again assuming this is in the end of round context u set up
what would happen
It'd probably just do nothing?
I mean you met get raised estrogen levels for a little while but I think injection oil suspensions don't get absorbed the same way in the stomach
hmmm
would it inconvenience you slightly
"./data/decks/construction.lua:7: attempt to call global 'pos' (a nil value)
pos is nil apparently

this correct for triggering x_mult?
isnt pos used for where it is on like the deck select
xmult = card.ability.extra.x_mult
for now, it should only be 2x
also can i see your config variables just to make sure everything exists?
so like config = {extra = {...}}
as far as i know its for the atlas position
config = { extra = { x_mult = 2 }, },
ok neat then your joker should work
the deck has properly loaded its just smol
that is definitely small
i'm slowly getting the grasp of this
youre doing fantastic, keep it up!
also kinda organized this a bit
my life was saved when i was told about localization dumping because i was doing it manually for ages
localization dumping?
you don't need to load the localization
do i need to make the px and py bigger
oh! i didn't know
"dump_loc": false // !! Not for use in distributions. Writes all localization changes made on startup to a file, for conversion from a legacy system.
can use this in your json
https://github.com/Steamodded/smods/wiki/Mod-Metadata
how do i make it not smol
That's a thing?!
yep!
I'm thinking that it could be a consumeable item instead with "random joker gains ["Estrogen"](2X mult)"
whats the res of the decks
it's not finished yet
i'm only making sure the xmult works
oh sowwy
starts as a 1.5x, each round gets 0.25
caps at 3x or 3.5 something
do you guys use any mods to add jokers to the joker lineup? it's really fun to code these, not fun rerolling the shop 145 times
x2 works
Add more cards
no like the cards are small
this
how can i do disallow a hand ala the psychic, as a joker effect? - i want to disallow a specific type of poker hand
context.debuff_hand
it should be in vanillaremade
no, i want the joker to prevent the hand
yes
i looked at vanillaremade's psychic, but it didn't help
why
i have this joker that does it
https://github.com/nh6574/JoyousSpring/blob/346c6f0df94fc3b0a05569ad459cc6bc89ba9307/src/jokers/99_01Effect.lua#L52
...wait, debuff_hand isn't when the hand is debuffed, it's to debuff the hand?
yes
huh, ok
that's debuffed_hand i think? kinda confusing
makes sense 
im just gonna give up trying to figure out the joker trigger order hook 🥀
how do i make him bigger
changing px and py scales it but how do i find the right numbers
How could I count the number of different suits in played hand ?
actually smods wiki should say the correct atlas sizes for normal things, interesting it doesnt in smods.atlas or back
where is that in the smods wiki
you woudlnt find it there, i just said it isnt in there when it should be, im looking to see what the sizes are now
every other mod with decks says 71x95 but thats the size it was when it was smol
maybe you used 71x95 in the 2x asset ?
both the assets in 1x and 2x are 69x93 because thats the size of 1 card with a pixel between it and the edge
but making that the px and py makes it small
The 2x should be 138*186 (2 pixel gap), you should just be able to scale it up
chat, am i cooking?
how?
What are you using to make the sprite?
aseprite
Sprite > Sprite Size > change both Width and Height to 200%, Method: Nearest Neighbor > OK
I believe that will work, but i havent used aseprite
<@&1133519078540185692> kill him
shoot him so dead
obliterate his family line
thank u
done
now to just do the function of the joker
export > export as, then do whatever as long as the file name is the same and the size is 200%
so, i just turned off pixel art smoothing and it crashed
opened the game agin, turned off and on a bunch of times and it didn't crash???????
the year is 2050
balatro spaghetti code
might be something with SMODS as well idk
config = { extra = { x_mult = 1 }, },
calculate = function(self, card, context)
if context.end_of_round and context.main_eval and card.ability.extra.x_mult <= 3.5 then
card.ability.extra.x_mult = card.ability.extra.x_mult + 0.25
return {message="Upgrade"}
end
if context.end_of_round and context.main_eval and card.ability.extra.x_mult == 3.5 then
return{
message="Fully Upgraded"
}
end
if context.joker_main then
return {
xmult = card.ability.extra.x_mult
}
end
end
}
oop, this
the code as it stands rn will cap at 3.75x, i dont think thats intended
needs to be < 3.5
no, 3.5
i just tested
yeah
so <3.5
but everthing else works well
hopefully ur enjoying modding balatro
its really fun once you understand stuff
fuck, i definitely am
i only am doing well cause you lot helped
in the contexts, can i add an "or"?
like, context.scoring_name == "Pair" or context.scoring_name == "Two Pair"
yes but it needs to be in parenthesis
both of them?
the whole expression
(context.scoring_name == "Pair" or context.scoring_name == "Two Pair")
yup
like so?
like this context.before and (context.scoring_name == "Pair" or context.scoring_name == "Two Pair")
so now it'll check if it's one or the other
or and
fixed, yeah
yeah, and has higher precedence over or (like order of operations)
Can I change the price of vouchers with a tag without needing to go into the source code and hook/patch something?
vanilla remade is not helpful because it does G.GAME.shop_free = true for coupon tag
you would need to do the part after that but for the voucher shop area
is there a way for me to add text to let people know how much mult and xmult they're getting?
this
kinda like how for example madness does
when u hover over it or when the value updates?
"{C:inactive}(Currently {X:mult,C:white} X#2# {C:inactive} Mult)",
here, yes
make sure u have a loc_vars function and return {vars = {your value here,
..}}
So i'm trying to figure out to get this to score properly
loc_vars = function(self, info_queue, card)
return { vars = {card.ability.mult} }
end,
okay so, i did that
do i need to add anything to my localization file?
#1# is the mult now
for the one i just made?
ah, i think i forgot something
mult_gain?
yes, #1# would be card.ability.mult
is adding shit to hud the new another card area
also it should be card.ability.extra.mult i just noticed
im adding yugioh life points next
that's #2#?
or is xmult #2#
vars = {card.ability.extra.mult} means there's only one variable which is mult at #1#
if you want a #2# you need to add a second value to the return table
yeah, makes sense
thank you
currently reworking my mod, any reason why the localisation isn't appearing? i'll attach the lua files in a second
en-us
mods beem this guy
<@&1133519078540185692>
<@&1133519078540185692> ban this fool
i got this error which probably means its something about my loc file likely so progress
ty mods
why are the messages so long I have to scroll so long
mister beast requires a lot of steps
mr breast give me money
for the mod youre missing the id
Mod = {
modid = {
name = "Galore",
text = {
""
}
},
}
thanks but i don't think that's the problem as i got the same error
here's the metadata file just in case i forgot something
can i see the loc file again
sure thing!
thats not what i said
i mean you corrected it wrong
did you create a meta file
and how do i switch to metadata?
How do I make this code blueprint compatible? (If you're wondering, this code makes a spectral card for every 5 cards destroyed)
just follow the guide
its all there
in the SMODS wiki
ok thanks
if i can remember correctly (you can look at the vanillaremade for jokers that retrigger like burgler, dna, and such) but returning a different value and making sure for the code you want to use to not have not context.blueprint
this is a mildly ambiguous question
is the problem that you dont want it to do certain things if its a blueprint copying it?
side note i think you will love this #1217466648135733328 message
Right now, I don't want the blueprint to display the "X/5" text, but I want it to create a spectral when the limit is reached
Oh that's cool, thanks :)
Right now, it's not making spectrals
am i getting context.post_trigger wrong? shouldn't the chips and mult values be printed after each joker scores? it seems to behave the same as context.other_joker
havent read the code fully but make sure the spectral part isnt inside smth that has not context.blueprint
Did you enable the post_trigger optional feature?
post trigger happens before they score, but the messages and other events happen after
yes
The only parts inside not context.blueprint are the incrementing of the value and the display of the value, but the part that might be causing issues is the part where the card checks if the amount of cards destroyed is at the limit
oo i get it
iirc you can use it to modify the return so it makes sense
The VMU is one of the more distinctive memory cards in existence so I think that's my preferred
I have my own VMU and PS1/2 cards but they are not the originals so I'll likely use it as a physical reference, and the one on Wikipedia as a coloured reference.
Wait a minute, I figured out what's going on
OEM PS1 memory cards were by default gray to match the console, although they came in multiple colors
When blueprint triggers, the check passes as having not hit the limit yet because the original joker hasn't modified the values yet
Same with PS2 and black. Also helped define PS1 vs PS2 memory cards
they do, but i figured the classic gray would be the most recognisable since it came with the original console bundle
Because for some reason you can't save PS1 games to PS2 memory cards when played on PS2
the reason i didn't think on doing ps2 since the original is black
That's why it works for brainstorm but not blueprint
dreamcast is the one i would like to recreate, but psx would be easier and more recognisable
do both :3
maybe... i don't want to overwork myself for this and i have a job now
congrats
The question becomes which one then
Are you a screen enjoyer or a screen hater
Ignore my wii in the background I just extended my setup
screen enjoyer 💯 i love having a little squid icon upside down when in the main menu
i got my own wii too (i got a lot of game consoles lol)
Screen absolutely. The buttons are like the main part of the VMU look
i'm assuming the other one was a budget one as it doesn't have any the bells and whistles
I also do, ive got all these
(Pardon the mess)
And many games for em
Im trying to figure out a good way to separate displays when I dont want them mirrored though my av switches but thats being a nuisance to theory craft
i will steal all of them
hold on let me show you mine
Ive spent so much pls
ok i can leave u the gamecube
Hell yea
I see you're running the esds switch too
Love them things
Wish they had a 16 port instead of 8 as the max
But ive got 2 8s put together as of today
So how do I fix this then?
this video gives me the urge to clean
I'd be a video game collector if only I wasn't spending all my money on model kits
sorry if my table is a mess 💔
i'd be a videogame collector if money was real and in my pockets
I wish I still had me Wii. I genuinely have no clue where it went lmfao
Im also getting shenmue and jet set radio soon for the dreamcast
What have you got so far for that menace?
part of the reason my room isn't fully clean is because i have the smallest room in the house
not if you have the collector austim i am starting to run out of space and i can't throw the boxes away as we plan to move in the future
areowings and my brother has night of the living dead 2
i did have shenmue but the first disk doesn't work even after a resurface and testing on another dreamcast at a mom and pop store
at least i do better than my siblings as i put away my clothes and sweep the floors and such
Where should I start in making a Joker which turns all Blinds into The Plant?