#💻・modding-dev
1 messages · Page 131 of 1
There was a game I played where talking to non-English speaking players about the translated name of a skill would get it censored
im using the latest version of steamodded, what contexts do i need to check for and exclude for just like a regular x_mult giving joker? my joker code has been revealed to be incredibly foolish
I imagine it should just be joker_main
yes I had the same issue, it kept triggering nonstop
Might be due to Joker retriggers
then don't remove profanity
Wait
the word list isn't exactly family friendly but it's also not trying to insult anyone
i curated the list a little bit myself
Nevermind I had a bad idea
not the entire list
that's fine, but a word list doesn't need to be family friendly
it's not trying to be
I don't see how recognizing something as a valid word would be insulting, either
i hope my new joker works on the first try!
the nefarious context.repetition:
Lmao
I think the issue is rewarding it with scoring
Also there are games with word lists
Like Scribblenauts
I imagine even Scrabble and Wordle curated their word lists
At least “Scrabble at home”
fair
how could I intercept the consumable code that forces the consumable to go to the center of the screen and be destroyed? does anyone know what part of the code does that?
i'm looking at the use functions and i dont see that part of it, just the parts for the consumables' effects
if you are making a boss blind how do you test it do you just run until you find it or can you force it in some way?
I think maybe check out G.FUNCS.use_card in button_callbacks.lua?
I believe #1228149931257237664 lets you force it by spawning it in with 3.
counterpoint : when played it debuffs your entire deck and grants no chips so they never play slurs
😭
wasnt there the name of the mod once
hi, is there a way to check what the final mult of the last played hand is?
i probably am just blind, but i can't figure out how to change hands or discards. is there a function or?
tried to search for an answer here, do we know of how to target steamodded with lovely patches? i wanted to change the way editions are applied in standard packs, but steamodded seems to override the normal function
NAE???x?
ease_discard
where can i find that in docs?
idk, but its in the source code
(there's also an ease_dollars func if you wanna change how rich the player is)
oh
i thought we weren't allowed to debug source code
meet my child
you can look through it
how would one go about doing that?
open archive on the balatro .exe using 7zip
thx
wait for lovely 0.7.0
-# it's technically possible to target steamodded files but it currently crashes lovely
i have scaled it down a lot
"word"
it was just too big
yeah
interesting concept
from 100 of a kind to this
oh wow just under 4 of a kind

what did i do wrong here?
SMODS.Blind {
loc_txt = {
name = 'Fracture',
text = { 'All played cards are destroyed' }
},
key = 'Fracture',
name = 'Fracture',
config = {},
boss = { min = 1, max = 10, hardcore = true },
boss_colour = HEX("672A62"),
atlas = "Blinds",
pos = { x = 0, y = 0 },
dollars = 5,
press_play = function (self)
G.E_MANAGER:add_event(Event({
func = function()
-- Loop through the played cards in reverse order
for i = #G.play.cards, 1, -1 do
G.play.cards[i]:start_dissolve()
end
return true
end
}))
return true
end
}
idk i saw that within other people blinds while looking into making blinds
yeah me neither lol
i think it's destroyed before they are scored
its trying to score a card that doesnt exist
😭
Is that the multiverse
how can i fix it to destroy them AFTER they score?
what is multiverse
maybe queue an event for that?
what would i put to do that?
i did this in my own mod
G.E_MANAGER:add_event(Event({
func = function()
context.other_card:start_dissolve({ G.C.BLUE }, nil, 1.6, false)
return true
end,
delay = 0.5,
}), 'base')
is there a way to loc_vars the name of a joker?
i need the names to be different per joker spawned
if there isn't by smods my ass is gonna make my own way idrc lmfao
loc_vars in smods allows you to put a different localization key
that's not what i mean
i want the name to be #1# but it crashed when i tried that
vars don't work in names, I don't think
fuck
might need a custom generate_ui function for that
goddammit
why do i have to do everything myself
😭
mfw what was supposed to be the SIMPLEST part of the hardest item i'm adding to my mod is gonna take the longest likely
you can go off this and just change the name part
istg why is this so hard to read
uh
which part should i change?
i'm assuming i want something like this?
god hates me the most i guess
atp i'm going to make my own smods istg
do you want to join up in programing and dev and work on this together while getting help here from our man mr smods
suuuure
actually lemme see if there's a good way to support name vars baked into that function
amazing art
anyone know why this is crashing? it says "46: attempt to index field 'extra' (a nil value)"
SMODS.Joker
{
key = "Troll",
loc_txt =
{
name = "Troll Joker",
text =
{
"Removes all {C:attention}Cash{} when hand played",
"{C:red}+mult{} = {C:attention}Cash{} * 10"
}
},
rarity = 2,
cost = 6,
unlocked = true,
discovered = true,
atlas = "jokers",
pos =
{
x = 0,
y = 0
},
config = {extra = {mult = 0}},
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra.mult}}
end,
calculate = function(self, card, context)
if context.joker_main then
local cash = G.GAME.dollars
if G.GAME.dollars ~= 0 then
ease_dollars(-G.GAME.dollars, true)
end
card.ability.extra.mult = cash * 10
return
{
card = card,
message = "+" .. card.ability.extra.mult,
mult_mod = card.ability.extra.mult,
colour = G.C.MULT
}
end
end
}
alright
lua spotted
🥺
center.ability.extra.mult should be card.ability.extra.mult.
ok now i can hover over the joker but when i play a hand it gives me the same error
now referring to this line
card.ability.extra.mult = cash * 10
i fixed it
it was because he used save states to test it
bump
I don't actually know how to fix this crash
Is there an easier way to just get the sprite of the current deck and use it for G.UIT.O
Because I honestly kinda have no idea what I'm doing
whats the text color used for stuff like '1/2 chance' in joker descriptions?
(this one)
{C:green}
thanks
card1 and card2 are both nil, why can't I set them to something?
It does go the first the way of the first if branch but says that upvalue card1 is nil
calculate = function(self,card,context)
if context.setting_blind then
if card1 == nil and card2 == nil then
print('this way')
card_eval_status_text(card, 'extra', nil, nil, nil, {message = 'Steal!'})
card1 = G.hand.cards[math.random(1, #G.hand.cards)]
card2 = G.hand.cards[math.random(1, #G.hand.cards)]
card1:remove_from_deck()
card2:remove_from_deck()
else
print('that way')
card1:set_edition(editions[math.random(1, #editions)])
card2:set_edition(editions[math.random(1, #editions)])
card1:draw()
card2:draw()
card_eval_status_text(card, 'extra', nil, nil, nil, {message = 'Return'})
card1 = 0
card2 = 0
end
end
end
where do you get card1 and card2 from?
G.hand.cards is an empty table during context.setting_blind
so when you try to get an element from it you get nil
they are defined in the script at the top
ah
how would I get two random cards from the hand at the start of a round then?
also why are you setting the variables to 0 at the end?
check code for cerulean bell
context.first_hand_drawn
and put the stuff in an 'after' event, thats how I did it
ok
does anyone know how to take_ownership of a booster pack? every time i try i just get this
alright new complex thing i'm asking for help with
i'm making this thing have a texture in two layers
i wanna be able to adjust the tape_move and sleeve_move values to have the two layers move on the x axis
for an animation
the two layers render now but they dont move at all when the value changes
does anyone here know how to help with this?
what are the values
well i saw the same results with them being both 0, or with them being 40 and -40. i thought those values might make a noticable change for testing, im not sure what the right value for them is until i get to test with them properly
right now they're put into this argument
so it should slide it along x if it changes, theoretically
try scaling it proportionally to the width of the card and test it
Idk what the units are
71x95
ok
nothing
maybe the issue isnt with that but rather the setup i have to setup the canvas
what are you trying to draw that you need a canvas?
i tried to have the love.graphics.draw have all the same info as from the previous pic before but it resulted in them not drawing at all
just two different textures
on top of each other
is it for a card?
a consumable
so you should be able to use draw_shader for it I reckon
some of the paramenters offset the texture
does that work with textures?
they used it for letters
RIVETING GAMEPLAY
hmm
there they are
they sent it earlier
HELLO
and in hindsight I had something similar
This is the patch I use. It goes right after Hologram in the code, and looking at draw_shader should give you an idea of how to make it move more or less.
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# Special soul sprites
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''self.hover_tilt = self.hover_tilt/1.5'''
position = "after"
payload = '''
elseif self.config.center.key == 'j_vic_brazilian_miku' then
self.hover_tilt = self.hover_tilt*1.5
self.children.floating_sprite:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 2*scale_mod, 2*rotate_mod)
self.hover_tilt = self.hover_tilt/1.5
elseif self.config.center.key == 'j_vic_champions_belt' then
local champions_belt_scale_mod = -0.065 + 0.015*math.sin(2.0*G.TIMERS.REAL)
self.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center, 2*champions_belt_scale_mod, 2*rotate_mod, nil, 0.3 + 0.1*math.sin(0.8*G.TIMERS.REAL), nil, 0.6)
'''
match_indent = true
Champion's Belt moves further down
function aikoyori_draw_extras(card, layer)
--print("DRAWING EXTRAS")
if G.aikoyori_letters_stickers then
if card.ability.aikoyori_letters_stickers then
local movement_mod = 0.05*math.sin(1.1*(G.TIMERS.REAL + card.aiko_draw_delay)) - 0.07
local rot_mod = 0.02*math.sin(0.72*(G.TIMERS.REAL + card.aiko_draw_delay)) + 0.03
local drag_mod = card.velocity
G.aikoyori_letters_stickers[card.ability.aikoyori_letters_stickers].role.draw_major = card
G.aikoyori_letters_stickers[card.ability.aikoyori_letters_stickers]:draw_shader('dissolve', 0, nil, nil, card.children.center, 0.1, rot_mod - drag_mod.r, drag_mod.x * -3, movement_mod - drag_mod.y * -3)
G.aikoyori_letters_stickers[card.ability.aikoyori_letters_stickers]:draw_shader('dissolve', nil, nil, nil, card.children.center, nil, rot_mod - drag_mod.r, drag_mod.x * -3, -0.02 + movement_mod*0.9 - drag_mod.y * -3, nil)
end
end
end
so these cant be integrated into the draw function these have to be lovely patched?
Idk I never used it but
Steamodded has a Center:draw method
maybe that could help
yeah thats what i'm using
here is my patch
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = """ if self.ability.name == 'The Soul' and (self.config.center.discovered or self.bypass_discovery_center) then"""
position = "before"
payload = """ aikoyori_draw_extras(self, layer)"""
overwrite = true
match_indent = true
I just never used it
I think it might be able to be used
but I never tried
I wanted to to find out
but I haven't yet
this is dps' code
for speen
ok yeah im realizing the issue with you guys approach is that you're using the soul
i cant use the soul cause my top layer needs to be indistinguishable from the normal layer
wouldnt it always have the moving around effect and drop shadow
you can change that
how so 🤔
it's the rest of the arguments
hm ok
The only one that could be tricky is the drop shadow depending on the position
the way im doing this is like, under normal circumstances the top layer completely eclipses the bottom layer
once the moving effect happens both layers move in different directions so the bottom layer is shown halfway peaking out to the right
this video demonstrates the concept
except for the whole activate button thing
i chose to scrap that idea and just intercept the use button instead
ah yeah mistake i made in the video
changed my mind since it normally doesnt do that on usa cases
question, how hard would this be to code?
Not sure
not hard, i think boss disabling is a boolean last i checked
There isn't an enable method
you could turn it off and then back on
nah
there's a method
oh ok
which does whatever it needs to disable the blind
I think set_blind would have side effects
so you either figure out how to avoid them or give up
that's my motivational message of the month
worst-case you just need to do more patching to control how the shadow shader works
but I think the way you described it shouldn't need to
wish dps were active they'd probably figure out the problem here
dps?
i mentioned them before
they made this happen with the same kinda code im attempting to use
only difference here is that only one layer moves, and it uses rotation instead of movement on the x axis
oh shit i think i figured it out
how do you code in a '1 In 2' chance for something?
like how hallucination works
if pseudorandom('insertanysubseedhere') < G.GAME.probabilities.normal / 2 then
yeah
cool
lets fucking gooo
need to adjust the canvas so that it doesnt cut off the layers if i try to offset them more than this
but it works!
I'm a bit curious to see the final code but I think by now I should know how to offset a layer
the issue that i encountered was just uh
i had accidentlaly set the scale factor to 0 when initialzing them lol
gone, reduced to pixel
where would i look to see where to make tarot cards in the SMODS documentation?
sorry, dont mean new tarot cards, if that needed to be clarified
i meant have a joker make a tarot
probably
whats with all the nil variables in create_card anyways
ah fuck
now this soliatare effect thing is happening when i disable the effect
They are different options that some cards may use. Most of them are optional, so nil is put when it is not needed
how the fuck am i supposed to deal with this
mhm
does this just mean tarot or planet in the context of create_card
WHAT IS SUPPOSED TO HAPPEN WHAT
...looks like it
is it supposed to be tilted a bit every time you use it
no its a vhs tape
and its being slid out of its case
i havent implemented it to smoothly do the animation yet
and it also is very limited in how far it can move out
also i fixed the soliataire effect i just had to add a "love.graphics.clear(1,1,1,0)"
lets goooo ive been meaning to try something like that effect myself
ok how do i actually make custom custom info queue
very simple lemme show ya
(the gameplay effect not the visual)
(the text box)
you add a thing to the Other section in localization
and then you do this in loc_vars
(i was clarifying my statement not trying to interject in yours aikoyori sorgy)
my current art is super basic
my current art is either by lyman, myself, or doesnt exist so
but maybe i still should get off my ass and put artist credit anyway
Betmma has implemented activated items
I tried reading the code but I couldn't make sense of it
you should make the letters score based on their scrabble score
that was what i was gonna do
but instead it gains mult
to make up for the loss of suit stuff maybe
strong flat power but falls off later
I have a Credits box but it looks different
whats your approach
also this is really cool
words with less than two vowels will not score
funny how Gappie was on both our examples
I took a long time because I was looking for that screenshot
because I haven't ported that one yet
i think the trick is limiting the blind to not appear when you dont have the letter deck mechanic ?
gappie the goat
-# also hi @random sleet how have you been
you pass the key as one of the arguments
i think the letter effect should be available in the shop as both joker and voucher
hey also
the key of the fool or the key of my joker?
or both
or if you have a joker that interacts with alphabets
Yeah but like Stone Joker it doesn't need to show up if you don't have it
currently got this
the key of the fool
can the ease_value function do the thing i wanna do with the sliding out effect? like if i give that function a number variable and a new value will it gradually transition to that number over a set time
I guess we're doin scrabble now
or do i have to make the code for that myself
true
maybe? but it shouldn't be hard to do it manually
is there anything wrong with this?
how would you do it? cause this is the function i'm using to toggle, its not in the update function so im not sure how to handle timing with this
Is there a general guide for diagnosing crashes? I'm using many mods together, which often causes crashes, and I'd like to be able to figure out which mod (or interaction between multiple mods) is causing the crash, but I can't really make heads or tails of the Steammodded crash logs. The one I'm looking at now, for example, mentions Code Cards from Cryptid and Speen from Cardsauce, even though I did not use either at any point during the run.
ok whats the position
terrible
something like local original_time = G.TIMERS.REAL and then something like local elapsed_time = (G.TIMERS.REAL - original_time)/total_time
help it's 7am i can't sleep no more
Sorry to hear that! Still, I'm glad to see you again :)
and put it in like a loop?
not the original time
i msorry
yeah that makes sense
also not in a loop but just inside the draw
oh yeah
What for? You haven't done anything you need to apologize for
well actually
the toggle here isnt happening in the draw function
its being triggered by the use button
yeah but the movement would be done at draw level
How could I fix the voucher redeem animations?
Here's the code:
calculate = function(self,card,context)
if context.selling_self then
local deletable_cards = {}
card_eval_status_text(card, 'extra', nil, nil, nil, {message = 'Headshot!'})
for k, v in pairs(G.playing_cards) do
if v:is_face() then deletable_cards[#deletable_cards + 1] = v end
end
for i = 1, #deletable_cards do
deletable_cards[i]:remove()
end
local voucherNum = 5
while voucherNum > 0 do
for i = 1, #base_vouchers do
if math.random(0, 1) == 1 then
if voucherNum > 0 and G.GAME.used_vouchers[base_vouchers[i]] == nil then
voucherNum = voucherNum - 1
redeem_voucher(base_vouchers[i])
elseif voucherNum > 0 and G.GAME.used_vouchers[advanced_vouchers[i]] == nil then
voucherNum = voucherNum - 1
redeem_voucher(advanced_vouchers[i])
else
break
end
end
end
end
end
end
function redeem_voucher(pvoucher)
local voucher
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.1,
func = function()
voucher = create_card('Voucher', nil ,false, nil, false, nil, pvoucher, nil)
voucher.cost = 0
voucher:redeem()
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.6,
func = function()
voucher:start_dissolve(nil, false, 10, true)
return true
end
}))
end
Is there a Lua specific editor that would help with UI configuration?
AKA a way to view the layout of Nodes and check for bugs?
Used to SQL code and have been just using Notepad ++ for stuff but having to launch the game to see the layout is a pain.
idk check out Betmma's
what do i need to change for this to make a fool card without crashing the game
@shell tangle did you mention something like that to me or
also maybe DebugPlus could help
please i am desperate
idk my brain is kinda slow with visualizing are there any examples of functions in vanilla or in mods that work like this that you could point me to
think it would help to get a bigger picture of what you're trying to explain to me. sorry im so dumb
this is how the Fool does it
well, when a soul sprite grows or rotates, it's done at draw level
there are some inputs that come from the game
like mouse position or card state
like when you hold a card
Not that I know of, since Balatro creates it's own UI code, the only thing I can recommend is this button mod I threw together for quicker restarts.
thanks
ok
i dont know how to interprete the create_card function
well what card does the Fool create
Not what I asked
The Fool creates a specific card
put 'The Fool' where the last nil is right?
No
Because the Fool is passing the card it wants to create to create_card
G.GAME.last_tarot_planet
so you replace that with the Fool's key
that is what i meant
the last argument is a seed so probably change it to something else
i meant the last nil here
to avoid side-effects
can it be nil?
sure but "The Fool" is a name not a key
idk
fool?
no
'fool'? i mean?
c_fool
got it
Thanks
One more question
I have seen text for menus done 2 ways one in the Lua file and 2 in the localization file
IS localization the preferred route?
what needs to be changed here now?
can i have some context so i can try and help
context.joker_main
im making the fool from a joker
oh so have a joker create a fool
yes
when are you having it happen
i have a joker that does something similar
ive got the context down
Localization will let people easily translate your mod, I personally prefer to just go with text strings first while constructing the UI how I want it, and afterwards, I'd go back and change all the stuff to a localized format. You might be able to use dump_loc for it actually, I don't remember how it works in full, though.
is that what those arguments mean?
i would have loved to have known that an hour ago
thats what makes it
not sure what those mean, but if you dont want to brute force to figure out if it works i could do that part
please
i thought this joker was going to take 30 minutes tops
and it feels like it should have
how do you make vscode know the functions exist
I have Balatro in the project and it still has no idea
are you in the cryptid discord server
no
there are very few times im not in a vc here
and even when im not in a vc i am more than likly not doing anything so im avaliable
should i just copy this up here?
yea thats what i did, the code that creates it was actually sourced from morefluff's joker called "bad legal defense"
mhm
^
but my mod was only a test mod so not on github, and its super buggy
is there any additional context you could provide so i could help better
I'm trying to add a deck page to the run-info and the main thing that's slowing me down is I don't know how to put in the sprite of your deck
cuz i can provide more help there
ok
I've tried to just make an amalgamation of existing code which didn't work 😭
but as for this, from how im understanding this, i just kinda brute forced it, aka made it so it doesnt display problems in the code
I want the deck to go like right here
Yes! (also maybe @random sleet would be interested)
i want Exact and Precise information on how this code should be changed to correctly have a custom joker spawn the fool into my consumables without it crashing or breaking
did you emplace
what. does. that. mean.
So it actually spawns it
example
thank you.
creating already spawns it, but emplace puts it in the correct place
I mean its useless without it
here it is, it's this file and also this lovely patch for intercepting the use button so it doesnt get destroyed
[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = '''
e.config.button = nil
local card = e.config.ref_table
'''
position = "at"
payload = '''
local card = e.config.ref_table
if card.config.center.activation then
G.FUNCS.tape_activate(card)
return
end
e.config.button = nil
'''
match_indent = true
I remember some weird behaviour where I spawned inert, floating Jokers
Its fun to mess arround with
why doesn't draw use draw_shader but instead the love draw function?
beats me 🤷♀️

you need to manually check the consumeble area isn't full
but also
the number of cards in the consumeable area isn't the number of cards in the consumeable area
because effects can try to create cards before other effects that create cards
hence the buffer keeps track of the actual number of cards that're supposed to be there
just tell me what i need to add to the if statement
or
i can probably find that myself
yeah anywhere with consumeable_buffer
it's usually the number of consumeables + (consumeable_buffer or 0)
something like that
i copied pasted this
what do i need to change this to what the actual chance is (for example to account for sixes)
YES YESY EYS EV sorry that took so long to do
(this is the description)
if anyone has an answer, ping me, im getting food
#1# in #2#
is there a way to round down, it offsets the entire screen and gets a lil annoying
and have loc_vars return G.GAME.probabilities.normal or 1, card.ability.extra.odds (or whatever your variable is for odds)
agreed with Halo
Okay how do I make it go away when I select something else 😭
?????
WHOA lmao
im pretty sure that you can use SMODS functionality of keep_on_use in the Consumable
then just set the use function of the consumable to toggle whether it'll apply its effect
also you can just set functions in a table
jimbobread_man = {
config = {
extra = {
hands = 1
}
},
pos = { x = 2, y = 1 },
rarity = 2,
loc_vars = function(_c) return {vars = { _c.config.extra.hands }} end,
keep_on_use = function() return true end,
use = function(_, self, area, copier)...end,
can_use = function(_, self) return G.STATE == G.STATES.SELECTING_HAND end,
},```
yeah good code block
Here's the code btw if someone could help out
I put the name and stuff is there another file i have to register my deck in or sum
what does your localization file look like?
anyone know how I can find a joker through an iterative process and destroy it? i haven't been able to find something exactly like this anywhere and it's hard to translate Ceremonial Dagger and Madness' abilities into finding and matching up to a specific joker
the SMODS.find_card in question:
I did see that but I'm not sure exactly how to use it
anyways you're comparing a card object to a string
for _,v in ipairs(SMODS.find_card('j_sp_thief')) do
v:start_dissolve()
end
for your approach you'd have to check G.jokers.cards[i].config.center_key == 'j_sp_thief'
in terms of NOW it's searching the jokers for their key
instead of comparing the joker itself to a string
yeah
Another quick question, could you explain the syntax of this just real quick? I see this a ton and recognize it's another iterative statement but its exact meaning eludes me
ipairs simply looks for key-value pairs in the consecutive array portion of a table, i.e. numeric keys starting from 1 up to whenever a value is nil. So if you have a table like t = {'a', 'b', 'c' } and iterate over it with for k,v in ipairs(t) do ... end, on the first iteration you have k=1, v='a', then k=2, v='b' and lastly k=3, v='c'
pairs does the same for all key-value pairs in the table and doesn't guarantee any specific ordering
so if you set t.num = 10and iterste with for k,v in pairs(t) do ... end, at some point in the loop you'll get k='num', v=10 as well as the previously mentioned pairs, but not necessarily in that order
Thank you so much for explaining it to me!
ah yes, the metamethod of preventing change from editions
bump
hi, really weird bug, what's causing it? ^^
code:
calculate = function(self, card, context)
if context.setting_blind and not (context.blueprint_card or self).getting_sliced and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
func = function()
local chosen_card = 'c_devil'
local chosen_message = '+1 Devil'
if pseudorandom('goldenfiddle', 1, 2) == 1 then
chosen_card = 'c_chariot'
chosen_message = '+1 Chariot'
end
local new_card = create_card("Tarot", G.consumables, nil, nil, nil, nil, chosen_card, 'goldenfiddle')
new_card:add_to_deck()
G.consumeables:emplace(new_card)
G.GAME.consumeable_buffer = 0
new_card:juice_up(0.3, 0.5)
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = chosen_message, colour = G.C.PURPLE})
return true
end
}))
end```
(the bug is that the +1 Devil text appeared on the top-left)
(also, all of the cards triggered at the same time, which i don't want)
context.blueprint_card or self should be context.blueprint_card or card iirc
trying that now :D
okay, that worked!
though, is it possible for them to trigger at different times?
like, one after the other?
yeah, just add a delay inside your Event
delay = 0.5 should do the trick
above func
did they all activate at the same time?
well, the texts appeared sequentially, but that was the case before the delay was added
i cant help but feel this is going a little slow, anyone have any input on that?
the cards were generated at the same time
(its on game speed 4)
download the more speed mod
compared to Ramen, ya it seems a tad slow
looks normal to me
i'm fine with it though :D
oh my bad lol. didnt realize what channel i was in
oooh
it looks about right for speed 4
oh ramen has delay = 0.2, in its return table
oh so i can decrease that?
so does yorick
okay so, comparing Cartomancer with my joker, multiple Cartomancers create the cards in sequence, but my jokers create them all at the same time
which i don't quite get
so a delay less than 1 will make it go faster? good to know
yeah
thanks yall!
-who knows
cartomancer has an event inside an event
👍
if you want it to animate like its cartomancer then you don't need to change the variables
hm, now it's broken again. code:
calculate = function(self, card, context)
if context.setting_blind and not (context.blueprint_card or self).getting_sliced and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
func = function()
G.E_MANAGER:add_event(Event({
func = function()
local chosen_card = 'c_devil'
local chosen_message = '+1 Devil'
if pseudorandom('goldenfiddle', 1, 2) == 1 then
chosen_card = 'c_chariot'
chosen_message = '+1 Chariot'
end
local new_card = create_card("Tarot", G.consumables, nil, nil, nil, nil, chosen_card, 'goldenfiddle')
new_card:add_to_deck()
G.consumeables:emplace(new_card)
G.GAME.consumeable_buffer = 0
new_card:juice_up(0.3, 0.5)
return true
end}))
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = chosen_message, colour = G.C.PURPLE})
return true
end
}))
end
end```
move local chosen_message = '+1 Devil' to be above the second event
any idea what is causing this
good point!
since its a local variable and its created inside of the second event, its only accessable there
bingo, that worked!! tysm :D
is this your joker or apart of a mod you downloaded
I'm a little confused on why this doesn't work, isn't the function being loaded getting the same variables the calculate function it's part of passed into it, why is it not understanding what context is
more fluff, however on any mod that has an xmult or xchips, it does that
its only visual but i have had a crash from it before
either its not better calc compatable or its not programmed correctly
wdym "not better calc" compatable
its apart of the recent steamodded changes to make joker calculation (and other stuff) more streamlined
only matters for mod developers
ik what better calc is
some of the changes made break mods
just not understanding what you mean by not compatable
and is there no known reason why it happens
from what i can tell that joker is missing some context checks
any idea on what checks would matter on when it triggers based on game state?
checking if a hand was actually played 😭
so in the new calc we need to add a check for that, otherwise it triggers on every gamstate update/change
Hey guys, new here! I just made a mod with my own card skin for High Contrast Cards and I was wondering if I could also change the color of text for each suit in the ui to match. I want the Hearts text on jokers and in menus to be pink rather than red and same for other suits. I'm very unfamiliar with coding but am willing to learn a little but need a bit of a point in the right direction! Using steamodded and lovely. any help is welcome, thanks 😄
how do you add this little side window thing?
for context, like a card mentioning a specific other card, i dont need it for the actual sticker presumably
add to the info_queue table passed to loc_vars
yup! just set G.C.[whatever]
and would i just then put text in that like i normally do with the description?
also, second question, whats the code thing for making description text smaller?
no, pass in the center of the object you want to appear
{s:0.8}
so c_fool
yup
thx!
well actually G.P_CENTERS.c_fool
had a joker idea similar to the Golden Fiddle: Reverie
Create a copy of The Heirophant or Temperance when Blind is selected (Must have room)
these cards chosen because they're the most peaceful
big dolar
this right?
twas part of the intent! heirophant is the power card of the two
Golden Fiddle spawns Tower as its power card, and Devil as its money card
info_queue[#info_queue + 1] = G.P_CENTERS.c_fool
alternatively, table.insert(info_queue, G.P_CENTERS.c_fool)
this then?
not a return
how do i set this up so it actually responds to changes in chance (i.e. from oops all sixes)
did i not tell you earlier
did you not setup loc_vars
i think this should be Uncommon, the Fool is one of the top 3 Tarots
i think its fine tbh
between the 1/2 and having to be at the shop i think its good
also consider hallucination is also 1/2 and gets more opportunities to trigger and is common
yeah
which 99% you sell
sell the world?
really?
at worst thats a 75% chance
(considering youve started building up one of the other suits)
and then theres also blackboard, which helps it
well, sometimes suit fixing can be good, but in my experience i go with Deaths, Strengths and Fools to build my deck
you sometimes want to hang onto a suit fixing tarot if you get in a bind
but, compared to the others, i think they're pretty weak ^^
do i have to assign that to a variable?
(back to discussing the world) to me its more like 'no reason not to use it'
expecially bc youre getting it from a pack theres a non zero chance you can use it right away
so lookin gthrough the steamodded wiki, would i be starting off with the suits section? and then adding that in? im sorry again, a lot of this is confusing coming into it lol
the only thing in my lua currently is what i copied from a template to make your own card textures
im even confused about how im supposed to go about structuring everything tbh lol. ill gladly check out any other resources for learning if there are better options
no
thats for adding new suits, not for reskinning existing suits
Is the "prevented from shattering" doable?
remove "played" since it doesn't really matter if they're played or not
wdym by prevented from shattering
I remember there's a joker that stops glass card from getting destroyed.
I'm asking this in case it's a false memory.
but probably hook the glass shattering code
I... haven't learned the hook part of lua. Or of any language, maybe.
patch would probably be required actually
What I originally planned to do is prevent the shatter unconditionally and run a separate 1 in 4 chance to handle the upgrade.
i mean youd have to patch there anyway to prevent the shatter
also doing a second 1 in 4 would make it technically not seed accurate
So where can I learn/ look up the how-to about making a patch?
you can look at steammodded itself for how to format lovely patches
and search the source code to find where to patch
do you know how to do this^
First part not tried yet so probably no,
second part confidently yes.
smod-main/lovely/ those toml file?
yup
i never got a complete answer, how do i set this up right?
loc_vars should return a numerically indexed table
the numbers correspond to the numbers in the description
Change it to {G.GAME.probability, card.ability.extra.odds}
where the card.ability.extra.odds is the denominator of your desired chance
and set up odds in config right?
yup
config = { extra = { odds = [your number] } }
in case you haven't look it up somewhere else
i'm trying to make a custom blind that applies an effect when a card scores, is there something in steamodded that handles something like this
self probably
Usually I use "loc_vars = function(self, info_queue, card)"
Either card.ability -> center.ability
or ,center) -> ,card)
i fear i may have been wrong
ok that worked
thanks
or
definitely don't do the first one
don't call a card object center
For the readability, I agree on that.
now it crashed upon looking at an in play version of it (that had a sixes tied to it)
im trying changing back to self but
no dice
Here's an odd bug I'm running into. The first joker isn't being "retriggered" per say but I suppose it's technically being triggered multiple times? Any ideas for how I could fix this?
repetition should be card.ability.extra.retriggers, not 0.
I'm not trying to create more retriggers though, hence why it is zero
I'm trying to track them
There are no retriggers in the video, however the card still detects them
That's the issue
is it supposed to
i guess the game considers that effect as a retrigger
So you dont want it to retrigger when repetition is set to 0.
cuz i might know the problem if its supposed to retrigger the playing cards
game crash on viewing the joker while not in the collection
I don't want it to retrigger at all . I'm simply trying to track the quantity of retriggers that happened during scoring, agnostic of source, prior to this Joker being scored
And for whatever reason, the other joker, despite not retriggering, is causing it to detect retriggers
its due to the context.other_card ~= card
as that is saying that the joker is not reading if a playing card is played
It is not. Just removed it and the same stuff it happening
(any help?)
replace "or" with "then"
and then you make the line that has the cardarea into another if statment
when does the crash occur?
when viewing the joker's description
in the start screen or during a run
it was while in a round but it should happen during shop/whatnot too
what does it do
Still nope
im unsure then
also, works while in the collection
what is table.insert meant to do
add that
add the fool description to the side of the main description
but thats for sure not the problem
man 🐌
bc it worked before i added the odds stuff
is cryptid enabled?
no
try enabling or adding it
not touching that beast till i get my collection complete
...why?
some weird crashes get fixed from adding it
Is [patches.pattern] just "Find and Replace" but more delicate?
it doesn't necessarily replace
replace when "at", insert when "before" or "after"?
it finds a piece of code and then allows you to put something before, after or at it(?)
i think so
That makes thing easier.
its fairly simple
well nothing is being retriggered
No kidding???
While we're at it, what is the difference between patch.pattern and patch.regex?
regex will detect very specific parts as opposed to entire lines
well what is t he Xmult set to?
Xmult gets set later on. Lemme send the whole calculate block
not that i can see, why?
cus i believe thats the thing causing it
because the other part of vars works just fine
and card.ability.extra.odds should refer to the card's odds variable in config
Aha I see it. Should be center.ability.extra.odds
yea that would do it
center calls the config set in the cards code
upon viewing the joker's description while it was in my joker slots
note that this doesnt call for center, it calls for card
better pic
well why is it doing that
because someone told me to do that
but ill change it too
crashes here
at the same point
sigh
its because it was a joker from a previous savestate
from before all the patching
Always remember to ctrl + s lmfao
please somebody that knows what they're doing with ui stuff please i've been trying to make this work for so long
I just realize I might have to rewrite the whole card:shatter function...
'cuz I ftlog can't find the 1 in 4 part in card.lua
nevermind it was really dumb
forget it
2 in 2 🔥
i figured it out
card:shatter is to do the shatter animation
and remove the card
Of all the card.lua file there are only four times card.shatter() has appeared.
One in function defining;
one in The Hangman;
one in Immolate;
and one in Familiar/Grim/Incantation.
"if scoring_hand[i].ability.name == 'Glass Card' and
not scoring_hand[i].debuff and
pseudorandom('glass') < G.GAME.probabilities.normal/scoring_hand[i].ability.extra then"
Wow, that's a long one.
How do you create a custom set for Consumables?
So, I'm going to [[patch]] this part...
yup
Gotcha, thanks
What's the prefix for Consumables? Joker has j, Enhancements has m, etc etc
c
pattern = "(?<indent>[\t ]*)if scoring_hand[i].ability.name == \'Glass Card\' and not scoring_hand[i].debuff and pseudorandom\(\'glass\'\) < G.GAME.probabilities.normal/scoring_hand[i].ability.extra then\n([\t ]+.*\n)*end"
Is this correct?
whats the way to check for a certain type of card played or discarded (in this case im looking for face cards)
I hope I'm doing this correctly.
how would i have a joker have a playing card generate money
this method doesnt seem to work
Is this in a calculate or calc_dollar_bonus?
info_queue[#info_queue + 1] = {key = 'c_hermit', set = 'Tarot'}
what do I have to put in this line or any other in a joker to show the 20 dollars in the hermit info queue, it just shows as $nil atm
calculate
do i have to move it?
I just do this.
ease_dollars(card.ability.extra.money)
card_eval_status_text(card, 'extra', nil, nil, nil, {message = '$'..card.ability.extra.money, colour = G.C.GOLD})
calc_dollar_bonus is money given at end of round i.e. Golden Joker or Cloud Nine.
i seeee
makes sense
so i can just replace the code in that else statement and not worry about it?
Comment it out first, then try the two lines I've given for what you are trying to do.
You're using card.ability.extra.dollars.
I've given use with card.ability.extra.money. Replace with card.ability.extra.dollars.
mmmmm
makes sense
works
it works
upon testing of it being debuffed, the message doesnt appear, despite this code presumably working in the vanilla joker that i stole this from
the debuff still takes effect, just doesnt do the message
do you mean context.other_card
does it need the context too
well yeah
i swapped that out a couple times
unless you defined other_card already
and you replaced self with?
other_card
you should be replacing it with card
i tried that too
can you show me your calculate function actually
Is this the correct variable name?
I kinda forget where to look it up.
yeah you should be replacing self with card, not other_card
you havent defined other_card at all
so its just nothing
also
wait
does it still calculate the other_card with its debuffed anyways
example of my problem
the effect gets prevented from the debuff, but no debuff message plays
maybe not, but i was hoping itd at least play the 'debuffed' message to show that it would
nvm it seems that it still works if discarded
are you sure you shouldnt replace context.other_card with card here?
weird
a note, i stole that code block from reserved parking, and i presume it works just fine there
(yeah the message contents is different but surely thats not the problem)
holon gimme a minute
mhm?
basically just add a true yes
very silly question; would anyone happen to know off the top of their heads where the dialogue for jimbo (ie. when you lose / win a run) is stored in the files
All of the dialogue stuff is stored in localization
something with quip in en_us.lua
is it at all possible to get logging functionality from inside vanilla card.lua for the sake of debugging an attempted patch? I have some code which I thought should be pretty straightforward but it's not behaving how I expect
thanks !!!! ^_^
that last part is the story of coding
not an answer, but that straightforward thing is so true
i think that for every one of my ideas but then get blasted in the face with issues
i thought a joker that made a fool card on shop end would be easy to implement
it took me 2.5 hours i think
me spending like 3 days on a single joker 😭:
it ended up being three lines i think
yknow i dont think my mod is gonna grow very fast due to this
lol
i do have a very funs idea (that will probably take me 50 years to code 2 lines of it)
I have a consumable type that I want to be more of a square shape but in game it squishes it to the normal card size. I see that Wee Joker is hard coded to be smaller, but is there a good way I can make every consumable of my type square?
not really, but you should take a look at this pull request i made that could help
something fun about github is that you can just take the pull request version instead of normal if you so happen to want that before its merged
i learned that when i was today old
😭
actually with this you could just add the file to your mod instead!
so this works as a lovely patch?
you gotta do what you gotta do
i mean i've done this so much that i've at one point considered splitting the api parts into their own mod
that doesnt even make sense
does something in SMODS override how spectral cards (specifically grim, incantation, familiar) work?
dude i dont know how to explain it
even if I literally remove all the card-adding code in card.lua for those cards, it still happens normally
Thoughts?
did you ever figure this out? I'm running into the same thing
is this not how i would use your patch?
I knew I've missed something with my parsing, damn it.
What expression should I change \'Glass Card\' into?
no
it's set within the center
in the center's definition you would include pixel_size = { w = 5 },
Oh nah it's just the same idea but for all the normal decks
perfect, thank you...!
my thoughts are yes please gimme this mod
it's been a while since I worked on the regex patch but are you sure you need to escape the single quotes?
I can't remember if that's a regex syntax token off of the top of my head
(also it's 400 where I am and I'm exhausted, so I might've missed somethning)
I already found I don't need to do that.
Apprenthesis, either.
Now it says
I assume it needs something like
i added exodia to balatro
But what if you've already passed ante 8?
nothing
how do i change the turquoise lmao
what's the full error?
deck of invisible cards
deck of justice if we didn't have minecraft programmer art glass
😭
that's double win
the joker of blocks
I had to censor my username
you have a syntax error in the patch's toml
share the patch in question (all of it, not just the pattern)
am having dinner with parents
‘ll send it aprox 2hr later
I want to create a specific custom Consumable but I'm not sure how the syntax should look like
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0```
Does this look good? `raid_elements` is the key of my custom Consumable type, and `c_fm_voltaic_mote` is the custom Consumable I made to spawn
tne joker of blocks and blocks
what have i done
how can I install a modpack
same, the shaders ruin a symboled stone card
i'm trying to make a booster pack but there's green sparkles around the cards that won't go away
are they present in the sprite sheet on any layer
i made a patch that triggers my custom boss blind for every scored card, but the context simply doesn't work. is there any reason for the passed context have all its elements be nil?
valley.calculate_blind_hand_played= function (self, context)
what you're calling context here is just the blind prototype
(also doesn't this fail/crash on literally any other blind that doesn't have this function?)
oh shit it works, thanks john smods
will nil check for it
how to take ownership of high card?
SMODS.PokerHand:take_ownership('High Card', {...})
does it require PREFIX if the card is in another mod?
except that another mod is same author as the mod calling create_card()
SMODS.Rarity{
key = "gerio_unobtainium",
loc_txt = {
name = 'Unobtainium', -- used on rarity badge
},
pools = {}, -- you are not supposed to get this cards anyway
}
i did read the wiki but i cant get it to work
I suggest reading cryptid's code, it adds a few hand types
i tried that also
well, rip
SMODS.Rarity{
key = "gerio_unobtainium",
loc_txt = {
name = 'Unobtainium', -- used on rarity badge
},
pools = {}, -- you are not supposed to get this cards anyway
}
hold on can you put
pools = {}
in any center?
if you are not supposed to get from normal methods, pools are empty
try checking Pokermon
oh yeah
yes I mean I made a seal that cant be found in packs, can I add that?
