#💻・modding-dev
1 messages · Page 645 of 1
no. I do x512 on handy and talisman + handy animation skip and it still takes forever. Talisman and handy combined max out at about 300 triggers per second
...x512 is safe max.
but still. I'd need to go at about 50,000x speed for it to even be as fast as I want it to
Plus, the only real way to speed up such calculation is to multithread the calculation, but that is not as easy as it sounds - much like IDE vs SATA, where former had to make sure the "pipes" were in sync, but latter just had a faster pipe throughput.
I'm gonna be honest, I didn't understand a single word of that lmao
I assume you're pretty knowledgable with coding, meanwhile I rely on chatgpt so... XD
Alternatively, think many small pipes splitting and reconverging vs one huge pipe.
i do that for my sourcemod texture generation
i was looking through the vanilla remade script and saw:
SMODS.poll_seal({ mod = 10 })
what does mod mean in this context?
I got my mod to work! The calculation time for any amount of reserved parking, mimes, and hand size is now instant!
i'm primarily askign as i just want to always generate a random seal
SMODS.poll_seal({guaranteed = true})
Using attention_text is there a way to add a limit on text before it starts a new line?
guys I think that perkeo maxes out after a couple hundred negative spectral cards...
so now I have to make a mod for that too
it definitely does not do that
how do i go about looping through G.pack_cards.cards? it seems open_booster doesnt wait for the pack to fully open
G.pack_cards is a separate area for each card, so looping through G.pack_cards.cards wouldn't help you anyhow I think
What exactly are you doing anyway?
im trying to make a food joker which applies seals to unsealed playing cards in booster packs
I guess you would have to somehow get each existing G.pack_cards uh
I think you would have to loop through G for that? Maybe? Not sure?
er-
Make an event that checks if that exists.
how would i make the card still give messages if its through an event?
Just simply call the message causing functions on the wanted cards if the area exists and actually has cards in it.
i mean stuff like Consumed, ive only been sending those quips through the return method oof calculate
SMODS.calculate_effect{ message = 'farts' }, card, where card is the card you want to do it on.
You dont need to, the card variable will still exist
huh- maybe ive overwritten card then
Just to make sure... Your event is inside the Joker's calculate, right?
ofc
Yeah
The ()
-# That's on me, sorry, was writing on mobile.
@grizzled tide forget what I said about multiple cardareas that's bullshit
all good 😭
Does anyone know how make a new line in main_start?
why does shop not save changes made to it with modify_shop_card 😭
ok
so
it doesnt save if you put set_seal in an event
for some reason-
I released my instant reserved parking mod haha. It's not much, and it's incredibly niche, but it's something
anyone have any idea why this closes out balatro
You need a context check.
ah
is there a context for launching the game? whenever i destroy the card in modify_shop_card then leave and reenter the run, it reappears
is there a way i could patch every instance of a piece of code (and is it a good idea to do so)
should I do it anyway
how doyou do info queue again
i thought i learnt this and i keep find out i actually never learnt it
You should save the run after destroying it
info_queue[#1116390750314307698_queue + 1] = G.P_CENTERS["key_of_item"]
inside loc_vars
you can also do G.P_CENTERS.j_splash instead of ["j_splash"] both are the same
yo trying to do smth rn ! the card does do the part where it scales the mult but it doesnt use said mult when it comes to joker.main
fixed it! had to put the context.joker_main before the context.before lol
im pretty sure the joker_main was inside of the before check
which was probably the issue
though its hard to see because the indentation is off
visualized
its probably messed up because it looks like you forgot an end after the jack check
is there a version of Font:getWrap for balatro
trying to use it but says it's a nil value
when trying to use it
You use that on a Font object created by love.graphics.newFont or love.graphics.newImageFont and the like.
You also could get current Font object by love.graphics.getFont().
I just need a word wrap for the text already in-game
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
if not text_to_show or text_to_show == "" then text_to_show = "Hello!" end
-- we still need a better way to scale and wrap text
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
attention_text({
text = text_to_show,
scale = 0.8,
maxw = scale_factor,
hold = holdtime,
align = 'cm',
colour = G.C.WHITE,
major = G.play
})
play_sound('voice1', 0.8, 0.5)
end```
I've got most everything from scaling to time on screen
but need a wordwrap so text doesn't get so small it's unreadable or text so long it bleeds off screen
so would i do font name = love.graphics.getFont(m6x11plus.ttf)
is m6x11plus.ttf the default font already or do i need to set that
Think so.
apparently file 6x11plut.tff doens't exist

oh typo
that's why
even when typo is fix says the file doesn't exists
weird shouldn't it be in balatros files already?
now I got a local node a number value error lol
man I love lua
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
if not text_to_show or text_to_show == "" then text_to_show = "Hello!" end
-- we still need a better way to scale and wrap text
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
attention_text({
text = text_to_show,
scale = 0.8,
maxw = scale_factor,
hold = holdtime,
align = 'cm',
colour = G.C.WHITE,
major = G.play
})
play_sound('voice1', 0.8, 0.5)
end
chat_commands.text2 = function(_, user, text_to_show)
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
if not text_to_show or text_to_show == "" then text_to_show = "Hello!" end
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
Font = love.graphics.newFont ("/resources/fonts/m6x11plus.ttf", 60)
love.graphics.setFont(Font)
attention_text({
text = love.graphics.printf(text_to_show, 12, 12, 60, "center"),
hold = holdtime,
})
play_sound('voice1', 0.8, 0.5)
end```
so both work
but the second version only spits out text
but the first one spits out the text that comes aftter the !text command
not sure what breaks here
text_to_show is supposed to spit out the text generated by chat memeber
¯_(ツ)_/¯

it just breaks
this is weird as fuck
but it out puts test as the text
but there's no mention of test anywhere

I found the closes solution
text = {function()
love.draw()
love.graphics.printf(text_to_show, 0, 0, 200, "center")
end},
hold = holdtime,
align = 'cm',
colour = G.C.WHITE,
major = G.play
})
play_sound('voice1', 0.8, 0.5)
end```
the only problem is the text to show
printtf wasn'ts to read it as a colour table
instead of just the " "
so not sure what to do here
wtf does this do
a pool is a group of objects
it can be pulled from like a rarity group, lets you categorise things
like food jokers could be a pool
that line puts the joker in the specified pool
ii think
where would i list all the pools then
what marie said but you need to make an SMODS.ObjectType for it to work
the pools are in G.P_CENTER_POOLS
no i mean if i had to organize it in its own lua file
what do you mean
like take for example vanillaremade
do i need a separate file to make sure pools exist or do they just exist
when i list them in a joker
you need to declare an SMODS.ObjectType before making the joker
either in that file or in another one that loads first
speaking of vanillaremade while ive got you here N i tried to use the VR random voucher code and the g.hand cardarea showed up when i ran it in the shop which blocked like half the shop buttons
any idea why it would be doing that
is SMODS.Joker a SMODS.ObjectType then?
i think it has to do with the state changing while the voucher is redeemed
does it stay?
no smods.objecttype is its own thing
oh ok
It’s 100% a state issue, what’s the code look like?
the voucher goes away, the g.hand area stays until a round is beaten
weird i remember testing it and the area didn't stay
i dont even see objecttype in jokers.lua 😭😭
this one right? https://github.com/nh6574/VanillaRemade/wiki#voucher
Oh it’s my code lol
what jokers.lua?
exactly the same as the code on vanillaremade except the delay can be chosen (though i am using 0.8) and i changed the seeds
VR
or even mine
my jokers work and i did not declare object type
aiko neither (atleast idk where)
vremade doesnt use pools
It’ll be because of doing it in the shop I think
well I kind of need to do it in the shop
Although actually redeem is normally called in the shop
it might be handy speedup doing it i'll check that
I've tried everything I can't get text to wrap in the center
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
if not text_to_show or text_to_show == love.graphics.printf("", 100, 50, 1, "center") then text_to_show = love.graphics.printf("Hello!", 100, 50, 1, "center") end
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
Font = love.graphics.newFont ("/resources/fonts/m6x11plus.ttf", 60)
love.graphics.setFont(Font)
attention_text({
text = text_to_show,
scale = 0.8,
-- maxw = scale_factor,
hold = holdtime,
align = 'cm',
colour = G.C.WHITE,
major = G.play
})
play_sound('voice1', 0.8, 0.5)
end```
i checked and aiko seems to use their own function to check for pools, not the api, and it's only used for 1 thing
because thats where i got the pool thing from
well you can ignore it if you dont need it
it is not the handy speedup
I was looking at pools yesterday, I think they will be auto created if there isn’t an object type but I can’t check the code very well right now
i set it to 1x and it still happens
i mean i'm gonna make inscryption cards later so i probably would need a pool for the booster to grab from right
is there a way I can get rid of the G.hand area manually then
Is it just the area or does it have cards?
i feel like aiko uses pools as card tags
just the area (grey box and 0/8 handsize text)
no cards
it goes away when exiting the shop
it doesn't
oh yeah the hand does stay
this fixes it
it will still show the hand but i think you need to hook cardarea draw to stop that
im not sure which part of :redeem changes the state but i dont want to investigate
is there anything to use in SMOD for text? That might have the ability to wrap text properly in the center
oh wait i was accidentally checking the vanilla code because it didn't load the lovely patches
thanks
no
is there a setting i can try with the love.graphics. that I probably haven't tried
I've tried setting the value for the width and it never wraps back
mod description definitely have some logic for text wrapping
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
if not text_to_show or text_to_show == "" then text_to_show = "Hello!" end
-- we still need a better way to scale and wrap text
local fuck = text_to_show
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
local count = fuck:gsub("\n", "\n")
attention_text({
text = count,
scale = 0.8,
maxw = scale_factor,
hold = holdtime,
align = 'cm',
colour = G.C.WHITE,
major = G.play
})
play_sound('voice1', 0.8, 0.5)
end
chat_commands.text2 = function(_, user, text_to_show)
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
if not text_to_show or text_to_show == love.graphics.printf("", 100, 50, 1, "center") then text_to_show = love.graphics.printf("Hello!", 100, 50, 1, "center") end
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
Font = love.graphics.newFont ("/resources/fonts/m6x11plus.ttf", 60)
love.graphics.setFont(Font)
attention_text({
text = text_to_show,
scale = 0.8,
-- maxw = scale_factor,
hold = holdtime,
align = 'cm',
colour = G.C.WHITE,
major = G.play
})
play_sound('voice1', 0.8, 0.5)
end
chat_commands.text3 = function(_, user, text_to_show)
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
Font = love.graphics.newFont ("/resources/fonts/m6x11plus.ttf", 1)
love.graphics.setFont(Font)
if not text_to_show or text_to_show == love.graphics.newText( Font, "" ) then text_to_show = love.graphics.newText( Font, "Hello!" ) end
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
Font:getWrap( text_to_show, 64 )
attention_text({
text = text_to_show,
scale = 0.8,
maxw = scale_factor,
hold = holdtime,
align = 'cm',
colour = G.C.WHITE,
major = G.play
})
play_sound('voice1', 0.8, 0.5)
end```
oh true
tried 3 different attempts
all them render the text off screen after a certain amount of characters
local function wrapText(text, maxChars)
local wrappedText = ""
local currentLineLength = 0
for word in text:gmatch("%S+") do
if currentLineLength + #word <= maxChars then
wrappedText = wrappedText .. word .. ' '
currentLineLength = currentLineLength + #word + 1
else
wrappedText = wrappedText .. '\n' .. word .. ' '
currentLineLength = #word + 1
end
end
return wrappedText
end
thats what the mod desc use
i'll slap this in see if it works
yeah thisll have to do for now i spose
hoping it gets fixed for next smods version
doesn't this look for a specific keyword word to create the wrap
no?
i will probably just make the vremade example more robust by changing the state
it will probably look uglier but eh
alternatively i can try to figure out how to make G.FUNCS.use_card work
It still didn't work
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
if not text_to_show or text_to_show == wrapText("", 30) then text_to_show = wrapText(text_to_show, "Hello!") end
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
attention_text({
text = text_to_show,
scale = 0.8,
vert = true,
DynaText = true,
-- maxw = scale_factor,
hold = holdtime,
align = 'cm',
colour = G.C.WHITE,
major = G.play
})
play_sound('voice1', 0.8, 0.5)
end```
Unless I have it in the wrong location
text still works fine
why did you put "Hello!" when it takes a number
text to show wasn't supposed to go there was supposed to be wrapText("Hello!", 30)
its really really ugly having the g.hand area show up sob
that's supposed to be a default if there's no text input after !text command
anyway i dont think attention text supports \n
no i mean the code will look uglier and people will be more confused
i dont think balatro modders know how to read
i think use_card can solve the problem but i just lost power so i cant test : )
its fine its an excuse to not do stuff for work
its a reason not an excuse
calling it an excuse is admitting it is not good enough to stop you
never admit your faults
That's why every time I check SMODS and game code directly and not rely on docs or wiki
even tried changing '\n' to '[s]' see if maybe that would work
what
it didn't :(
Because there's no way all caveats explained on wiki page
gonna be honest the wiki hasn't been much help i've gonna better help from the vanilla link people have posted
and searching on the love2d forums
nvm just talking with myself kinda
for built in stuff to love engine
I think i'm gonna take a break from the text command for now
I wonder if I could rework how the text is handle for describing joker abilities
and just slap together some Frankenstein code to just work
What are you trying to do?
@wintry solar get the text to center itself and wrap around in the center instead of going off screen
A temp solution has been to just scale down the text base on the length but it becomes unreadable at certain lenghts
Don’t you just need to rewrite the function to display multiple nodes rather than a singular one?
the text displayed is pulled directly from twitch chat
so not sure if that would work but maybe
Yeah but you’re plugging it into a system that will only display one line
You need to modify the attention_text function to allow for multiple strings and then just do your splitting beforehand
trying to make a mod again and holy shit im rusty
yeah replacing the redeem line for G.FUNCS.use_card({ config = { ref_table = voucher_card } }) works
yay
it also does the proper animation of lowering the shop
Is there a context that trigger things like final_scoring_step but before the joker_main like it make thing not being able to be retrigger
I look at the wiki and didnt find one
oh thats helping me a lot
ok nice
initial_scoring_step?
is it trigger after all card are score normaly
does context.after work for what you want
wait I'll try I totally forgot about this one
Holy shit you're alive
thats after final scoring
i dont understand if you want something before joker_main or after
like between individual and joker_main
pre_joker maybe idk if jokers get that
what if you just do individual then put a blockable + blocking event so it happens right after individual
events wont let you score
yeah
untrue
if nothing exist I'll need to create the context
wait I'll that
this is for your overcharge thing right? custom context seems reasonable
yeah
also im pretty sure calculations that dont return dont retrigger
you can use joker_main + calculate_effect
but idk the context of the effect here
but idk what to patch or hook to create a new context (probably more a patch). Gonna need to learn about that
making new contexts is easy
the hard part would be finding the spot where you need to call the context for it to work
oh thats nice to hear
yeah ik
i think its just
SMODS.calculate_context("modprefix_contextname" = true)
it has arguments too for like, other stuff the context contains i think? like how context.buying_card has context.card
i never used the arguments though
the modprefix isnt needed its just etiquette
So my context will be context.end_scoring
or context.scoring_end
what is the best name
so conxtext.before_joker_main
yeah i would still add the mod prefix
context.giga_pre_joker?
oh thats better
Sounds familiar 🤔
context.right_between_individual_and_joker_main
i dont get it
same
but where is the function that trigger all calculate ability that calculate everything
what
uhm mb where should I patch my thing I mean which file should I patch
around here
Im back from the dead
Suffering from a lack of practice
I've forgotten like
Everything
As is to be expected from such a hiatus
ace was printed twice but event played once it seems
i saw it debuff twice, but the final one its as if it debuffed once
im trying to level up all hands at once but I have no clue what to do to make it do that 💔
I tried looking at the smods wiki and whatever the black hole spectral did but all it did was just crash my game
you're missing the target file and position, also that line is too early for what you want i think
is the hand = there because you don't know what to put or because that's what you tried
its bc I don't know what to put there
remove it
also card should be a card object not a boolean
oh I see
but is the implementation ok
like the payload? yes
but like where I did it is before joker_main, no ?
yes but you might as well just use initial_scoring_step if you patch it there
like after initial scoring step ?
why is the score resetting inbetween two debuffs?
you want after individual, right?
have you tried using SMODS.upgrade_poker_hands({ instant = true })?
SMODS.Joker {
atlas = 'inscryptionJokers',
pos = { x = 2, y = 3 },
soul_pos = {
x = 2, y = 2, draw = function (card, scale_mod, rotate_mod)
card.children.floating_sprite:draw_shader('dissolve',0, nil, nil, card.children.center,scale_mod, rotate_mod,0,0 - 0.2,nil, 0.2)
card.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod,0,0-0.2)
end
},
pools = {["Inscryption"] = true },
key = "felijo_ins_evgast",
rarity = 3,
cost = 8,
config = { extra = { debuff = 0.01 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.debuff} }
end,
calculate = function(self, card, context)
local event
event = Event{
trigger = "ease",
blocking = true,
ref_table = G.GAME.blind,
ref_value = "chip_text",
ease_to = number_format(G.GAME.blind.chips),
}
local aces = 0
if context.individual and context.cardarea == G.play and context.other_card:get_id() == 14 then
aces = aces + 1
G.GAME.blind.chips = math.floor(G.GAME.blind.chips * ( 1 - (card.ability.extra.debuff * aces) ))
G.E_MANAGER:add_event(event)
return {}
end
end,
blueprint_compat = true,
}
oh you're right i thought they were using that lmao
yeah
then that's wrong
one of these
so ?
yeah
shit it trigger like crazy
ok so found out it trigger at the right time but 2 times and it trigger 2 additional time after the joker_main
How can I change a joker description? Like you know how it changes when a joker is unlocked or not, I want to do something like that where the description completely changes in different scenarios (a joker to imitate another joker before being bought). Any tips?
return a key in loc_vars
you know the description thing is a table right?
mkaes it use a different description key from the localization
yeah but it only leveled up my hands once, and I'm tryna get it to level up multiple times
there's an amount argument lol
I knew but I thought there was some logic that locks things to loc_txt.text
oh even better
how is this even related
actually
bump
ohh ty
I've been trying to find something like that in the wiki forever
its not but you can pull some bullcrap like
''.. card.ability.text.. '...',
"or does it?"
the text isnt in card.ability
wait i forgot
even if it was it would be a table
ANDDD out of the window.
plus using the plain string wouldnt format it correctly
i feel like im too stupid to continue work kn lua
Is it natively possible to prevent a specific Planet or Tarot from spawning? Or will I have to resort to hooking?
if it's yours use in_pool if it's from vanilla/another mod add it to G.GAME.banned_keys
Perfect, thanks!
yo yall, how would i go about a joker that changes a card's rank
assert(SMODS.change_base(card, nil, "Ace")) changes card's rank to Ace
o7
except sometimes it just crashes and you have to remove the assert
ty boss
and then it crashes again and you gotta put it back
but wouldnt it be simpler with just putting the id of the rank lmao
assert wont change if it crashes
it might be able to take the ID, i'm not sure tbh
it did though
if assert crashes but normally it doesnt then the function didnt work anyway
because assert only crashes when the function throws an error
idk why im repeating myself we already talked about this lmao
also how do u make the joker shake without displaying a message lol
card:juice_up()
ty!
i dont think so
yeah and I still dont get it
removing/adding assert fixed crashes on toaster and rainstorm
I remember doing this very clearly because I was pissed about it
youre appeasing the lua gods
the lua gods hate me
i was only a vessel with which they used to make curator
jokebox is an asset of the devil
my game crashed when i tried spawning a second identical custom legendary
no logs
nevermind the legendary spawning caused the crash
Once again I'm resisting the urge to make a cli balatro package manager
it's called git
how would i go about implementing a joker that changes face cards that are held in hand
(i cant remember if theres an og balatro joker i can look at for that lol)
what change do you want to make
change held face cards into queens
Yeah ig but like
that's doable with an is_rank override
wait i misunderstood
still very doable
also another estrogen joker has hit the modding space
loop over G.hand.cards, check if a card is a face and not a queen, and then SMODS.change_base it to a queen if it meets the conditions
Who would've thought
oh wonderful
i just couldnt find how i were to find the cards lol
how does weegee board works?
cause there wasnt a context.scored_hand
that is NOT the name of this joker, nor its reference lmao
it is far more sinister
and probably shouldnt see the light of day outside its community
do you have a suggestion
is it a suggestion
didnt work for some reason lmao (if its me being stupid im sorry)
scored_card, not context.other_card
that one's probably because it's print("something") in lua
you could also consider flipping the card before and after using events
stringcalls are real im afraid
yeah nah it just straight up didnt work
oh yep then it's the context.cardarea check i think
a joker calculating in context.before will never be in the G.hand cardarea
because it's in G.jokers
Anyone able to help with a crash? First time I've had one where I really don't know what the issue could be
I need help linking a UIbox to a variable (or in this case a button)
Okie dokie then
so just remove context.before in general?
no, keep the context.before, remove the context.cardarea check
alr o7
The crash occurs when selecting a blind after using a spectral I created that sets jokers perishable
well you have duplicate talisman so thats probably something you should resolve
and also show the code of the card
yeah i assume we'll need the code itself rather than the crash report
The spectral seems to work fine, setting the proper jokers perishable and such, but then the crash happens when a blind is selected
I know I was just giving full context first
both helps
-# lua crash reports arent the nicest lmao
your talisman is also wildly outdated (and you should be using amulet anyway)
Too many words at once here
true, i might be just dumb and not read them a lot of the time
all work :D
ty mates
now to make it look pretty lmao
This is the relevant code
you should do jokers_to_decay[i]:add_sticker("perishable")
so it properly runs the sticker apply
Figured that what I was doing wasn't the proper method, I was borrowing my own code from one of the first jokers I programmed
Surprised it didn't have an issue with the first one though
well perishable normally sets an extra value on the card
so I haveth this code here, adn I wanna know how to set it to show up when my custom button is pressed
which wont be set if you just set card.ability.perishable manually
rental and eternal work because they dont use any extra values
I have a joker that disables the perishable status of a random joker and this was the code I used to attempt to do that, never seemed to have any issues but is there a more proper way to go about that
Maybe I just haven't tested it fully yet and there's issues waiting to crop up
I'll play around with it some more later and if anything explodes I'll give it more time
I'm pretty sure you should be able to do card:remove_sticker("perishable")
how would one do that?
oh thats a thing
not sure if that works specifically for an already debuffed perishable card but I'm pretty sure that's the function in general
worst case you can directly call the sticker's apply function with card, false as the arguments
look at vanillaremade ouija probably
should I keep the debuff method the same way?
Or is there a cool function for applying/deapplying a debuff
I didn't send the full context for the guy but he also is meant to remove a debuff from a joker even if they aren't perishable
basically just in the circumstances of like, crimson heart
I think it'll be okay like it is but it probably is better with the change to use remove_sticker
Thanks for the help
you need to flip it again
oh lol it just didnt show that in the remade
fym
you probably need at least one more end
or have one too many ends
your indentation is wack so i can't tell what the issue is exactly without seeing more of the calculate code
here's the calculate code
-- Will be called whenever the button is clicked
G.FUNCS.jabong_fishop_click = function(e)
local card = e.config.ref_table
if portopen == false then
portopen = true
print("Port State is currently Open") --for debugging
end
end``` anyone wanna help me link this button to my custom uibox
the middle if statement (context.individual) is missing an end, you're only ending the inner if statement that checks for the card's ID
all you need to do is put button = "jabong_fishop_click" in the config of the outermost node in the UIBox
ohhhhh ok
Any obvious reason the stickers wouldn't be adding? Thought maybe I could've misspelled something or misplaced something but I don't see anything like that
The juice up animation and the tarot sounds are happening so its solely just the sticker adding that's failing
Yes, it would be jokers_to_decay[i]:add_sticker('perishable', true)
Thanks figured it was something like that
very cursed
I was curious if jokers that normally can't spawn perishable would be immune but thankfully they are not
ok well now my ui shows up but only in the intro cutscene, what the hell did I do 😭
that would probably have to do with the UIBox code itself
if you want it to appear during actual gameplay, you should put it in a Game.start_run hook
oh gee whiz taht sounds like fun
do i have to put all the uibox code in or just the call
the uibox definition itself, not the G.FUNCS.jabong_fishop_click function
well it uhhh
it proved my lack of programming ability
this has something to do with the hook
yea show the code
function Game.start_run()
local ret = game_start_run_ref(self)
local fop = UIBox({
definition = Fishingfunction("The Port"),
config = {type = "cm", }
})
local fishingnode = {n=G.UIT.O, config={object = fop, button = "jabong_fishop_click"}}
function Fishingfunction(menu_name)
return {n=G.UIT.ROOT, config={align = "cm", instance_type = MOVEABLE, juice = true,}, nodes={
{n=G.UIT.R, config={align = "cm"}, nodes={
{n=G.UIT.C, config={align = "cm"}, nodes={
{n=G.UIT.T, config={text = menu_name, colour = G.C.UI.TEXT_LIGHT, scale = 0.5}}
}},
{n=G.UIT.C, config={align = "cm"}, nodes={
-- add the port token count
{n=G.UIT.T, config={text = "You have [idk] Port Tokens.", colour = G.C.UI.TEXT_LIGHT, scale = 0.5}, }
}},
{n=G.UIT.C, config={align = "cm"}, nodes={
-- i'on even knoe
}},
-- Etc...
}}
}}
end
print("please.")
return ret
end
It's function Game:start_run(args) not function Game.start_run()
it needs to be like this
function Game:start_run(args)
local ret = game_start_run_ref(self, args)
-- your UIBox code
return ret
end
the colon adds the self argument
and then
local game_start_run_ref = Game:start_run()?
No, that would still be Game.start_run
well now it crashes beacues on that line, a function is expected
ist even got the little squiggly
wait
that would still be
Game.start_run
this is also pointing to the actual function code????
hol up
nevermind i jsut cant read
start_run is a function stored in the Game table. you use a period (.) to access anything stored in a table
you can use a colon (:) specifically when calling a function stored in a table to automatically pass the table itself as the first argument to the function. so Game:start_run(args) is effectively the same as Game.start_run(self, args)
don't worry they've had to deal with me
speaking of which
the mult isn't resetting properly, in this scenario it resets if a 10 or ace is held in hand, which shouldn't be happening, i tried removing context.cardarea but that made it stop working, what context should i use to make it only reset when played?
unless you set local reset = false above this screenshot, reset is a global variable that stays true across calculate calls
ah i see
Should I make a flip card util
the start of a great new font
it fixed thank the lord
why did i immediately think of "he casually says 67 my lord" when i read this lol
what the fu-
its a quote from martyn in the nice life finale
Is this looking ok?
Hmmmmm...
@tidal hemlock You familiar with texture pack creation?
the image file does not exist
Ah, so simply rename shit and all's good
just make the file name in the code be the actual name of the spritesheet?
Yeah, I'm modifying another pack's .lua, but it should be ok?
no why would you say that
i use jokerforge, do you think i have experience with coding
fair
--- STEAMODDED HEADER
--- MOD_NAME: Vanilla Decks+
--- MOD_ID: VanDexPlus
--- PREFIX: VNDXPLS
--- MOD_AUTHOR: [NarratorFox]
--- MOD_DESCRIPTION: Subtle changes to base decks.
--- VERSION: 1.0.0
--- DEPENDENCIES: [malverk]
AltTexture{ -- VNDXPLS
key = 'deck', -- alt_tex key
set = 'Back', -- set to act upon
path = 'VDPlus.png', -- path of sprites
loc_txt = { -- localized name (this isn't used anywhere currently)
name = 'Vanilla Decks+'
},
original_sheet = true
}
TexturePack{ -- VNDXPLS
key = 'VNDXPLS', -- texpack key
textures = { -- keys of AltTextures in this TexturePack
'VNDXPLS_deck'
},
loc_txt = { -- localization entry for the TexturePack
name = "Vanilla Decks+",
text = {
'Card back {C:attention}textures',
'with a few slight tweaksf.'
}
}
}
How's that?
If it helps:
Fuck yeah
how do i detect if a blind has been disabled
blind.disabled
and it would trigger once right
Is that a thing
idk
What is even the goal
create random joker with random edition on blind disable
Hook Blind.disable
Unless its the blind itself doing that then just use the disable function
its a joker
Well I have accepted the fact that I just need to make custom mods for high performance now lol
Reserved parking is done. Next up I'll do my best to fix Yorick mod for stacking jokers. Probably won't work but it's worth a shot.
this has probably been asked a million times but I can't find it in the discord message history how to I get my mod added to the wiki/modloader page?
what is the modloader page
What mod loader has a page
If you mean the mod manager then the answer is brutal torture
And wiki is just make a page for your mod yourself
my bad yeah modmanager
there's a repository linked in the thread you can PR
hey gang, I'm having an issue where I think consumable.config.hand_type isnt really comparable to context.scoring_nameanyone know what I should be using?
for i, consumable in ipairs(G.consumeables.cards) do
if consumable.ability.set == 'Planet' and not consumable.getting_sliced then
if consumable.config.hand_type ~= context.scoring_name then
table.insert(destroyable_planets, consumable)
end
end
end
havnt done this in a while so it might be something obvious
I assume consumable.config.hand_type gives a hand type in a different form than context.scoring_name does but I'm not sure how to swap between them
gimme 1 minute to verify something in-game but I probably have an answer for you
okie dokie, ty
does anyone know the command to have the game save
save_run()
thx
anomaly 38
how busted is this
depends what an anomaly is
also why does this happen
it's separate localization
jokerforge is probably being lame and not doing it correctly
strong card, made it ~1 in 18 chance to appear though
I am having trouble trying to define music for a booster pack. I am getting a thread error with this. Anyone have any clue why this might be?
||SMODS.Sound ({ volume = 1, pitch = 1, key = "music_combo_pack", path = "3_0driverOfTheChillVacation/music_combo_pack.ogg", select_music_track = function(self) return (G.booster_pack and not G.booster_pack.REMOVED and SMODS.OPENED_BOOSTER and SMODS.OPENED_BOOSTER.config.center.kind == "Combo") and 100 end })||
Here you go. Thanks in advance for your help.
how do i grab scroring_hand[1]'s rank?
and youre sure the file is in the correct place?
I'm pretty sure. The rest of the sounds (granted they are sfx) are stored in the same place and load fine.
hmm no idea, doesnt seem to be a problem with the code
It might be the sound file then. Odd. Thanks
Nvm, I accidentally placed it in a duplicated fodler of the mod. My bad.
how do i get a card's suit and rank
You can check the rank with card:get_id()
For the suit, if you know what you are looking for, you can use: card:is_suit(suit)
i'm not looking for a specific suit like ancient joker would, im looking to get a card's suit
as in i'm merging two cards together
awesome
didn't know it had a wiki, i was trying to look for shit in smods wikiù
thanks so much
any idea why reloading the game after the joker gets consumed has it returning?
you save the run before events are ran
you should use center key for that as you are ignoring multiple enhancements anyway
Is it because don't specify what card you're destroying?
Is it actually destroying it and reappearing or just reappearing when it's used ?
it is destroying it, i leave the game, then rejoin, and it reappears with the value decreased
before all events?
yes, anything not in an event runs immediately
destroy cards and calculate effect are events
Okay
the solution is to call save_run in an event too
Oh awesome to know !
like this?
oop
lemme remove delay
otherwise like this right?
Huh
Confused 4am person
ye
i would save after the message tho
i dont know if that affects anything actually
If the events are all of the same priority
Wouldn't affect anything i guess ?
er
Oh yeah i forgot it's lua
events dont have priority they run in a queue
Okiii :0
wait im stupid
Oh now it's doing the thing
func = function()
save_run()
end
o ok
i want to double the base chips of a new card, how can i do that
you don't know what arguments are used in the call so it lends itself to errors or it being hard to read
ah gotcha
so- now i cant select anything after the cheese is destroyed 😭
that's also why it's bad practice lmao
Like
As a modifier (example : hiker gives +10 instead of +5?)
Or just chips ?
I basically merge two cards together
and its the same two ranks
so the new merged card should have double the chips
i thought it would be merged_card.chips = merged_card.chips * 2
(didnt want to interrupt, but it works now, thanks so much :))
Or just add the final values of the chips from both cards ?
I guess ?
how do i do that
How can I change the amount of slots given by the negative edition for a certain type of card?
I Need to read more steammodded'sdocs D:
Also do you already have a base for "merging" cards ?
no im basically creating one card with 50% chance of suit, edition etc
Oh okay :P
Looks fire
it did the merge but it fucked my card area
Check how the certificate and marble works :P
If it causes problems
yeah basically it stays there
blocking the view
it has been deleted but not from the view
Yeah i see alot this bug
It's in vanilla too
-# Also the "Microsoft" way to "fix" this is to redraw the entire graphics to get rid of this x)
-# /j
lol
Wha ?
er- could anyone help with this.
im trying to make all debuffed cards held in hand give x2
If condition hell lol
ok so it left when i clicked the button to go to shop
we LOVE if conditons 🤑 (i copied baron from vanillaremade)
-# Yandere dev:
Jokes aside-
Nice i guess :0
not rly because the cards will still be there on the next merge
what does it do
also you don't need message and colour
Hmmm
Check how the stone joker works on vanilla remade :P
currently it does nothing. the goal is to make debuffed cards held in hand to give x2
stone joker doesnt remove cards?
It adds :P
And trading card removes (one)
Is it possible to add a custom description to Challenges?
Yeah !
can i see the rest of the code
Does it require me to use a localization file?
you need to add a custom rule
yes
Mhmm !
Ok... how do I exactly add one?
dont use math.random pls
that's not the problem but you shouldn't use it
Text always comes from this file
Unless you want to write "error" on every single one :P
o
what should i use to get a random card in hand
There's something else in steammodded iirc
-# Nah
-# I'm wron
-# It's a vanilla variable
thx
still dont know the issue for xmult for in hand
yeah no idea it reads like it should work
how do you make a joker not appear in the shop again
im just gonna shut up and read the wiki
my guess was MAYBE debuffed cards cant do xmult by default right? so i tried sending only the message for testing purposes but that didnt work 😭
return false
end```
or something like that
the fucking cards i deleted aren't disappearing waaaaa
yeah I didn't say that might be the case because the message should have worked anyway
it does for baron unless smods is bugged
Check the vanilla remade source code (GitHub)
And go to the trading card section
can i not do both of these?
what do you mean
You can!
im not deleting the card in the same way
i want it not to appear in shop AND not be able to be created by Judgement
return false stops it from being randomly selected at all.
Check the little line of code in the middle
It's the end-all solution.
first one says by any random means
You can use it in the same sentence :3
Buh
You're not dumb, it's just daily balatro modding stuff.
i think if you don't understand what i wrote then you're dumb /j /j /j
Nuh uh
I was the same when i started modding with C# (reskinned java lol) and bepinex
my fault og
Don't worry :D
ok so testing with this, it does explicitly skip over debuffed cards which is very annoying
from vanillaremade or base game
Check shoot the moon's code :0?
If baron skips i know that shoot doesn't
both would help
It sort of "triggers" but no scoring
i would do it but i need to sleep lol
i dont have vanillaremade currently installed (as im just using it for refrence) but i can check base game real quick
you can also just copy paste the vremade code too
Vanilla remade is better
Has smods thingies
Go on the GitHub
do you know what we're talking about
You can read
Yuh
It has the little variable
also you don't need to tell me what vremade has i made it
Wha ?
-# i'm eepy sorry D:
im telling them to test because it might be a bug with smods in both vremade and/or vanilla
Oooo
Yeah i'm so sorry ;-;
Had a hard time understanding D:
Should eep
in other news, its clean now
tangents 2
never happening
ok so vanilla baron (not vanilla remade) does not explicity say disabled
can i link to your code now without triggering parental controls
yeah sure
uh oh
Hummm,,,
The little folders aren't needed (unless you really want to have 1 entire lua file for every jokers D:)
I guess it helps with debugging lol (doupt)
i mean if it's a bug i would wait
but if you want to make it anyway just loop through G.hand yourself
i dont know if thats a bug or not is the issue
im turning on my pc : )
-# But it's organized i guess so who cares D:
oh trust me, i know what im doing
i dont trust you
Yeah d
it was like this before
D:
jesus take the wheel
There's no need for obfuscation at this point T~T
Now ai crawlers won't touch your codies x)

true!
in other words, can someone help me with config stuff?
Yuh !
so i have this mod inside of my mod that changes the background into gm_construct but i want it so that its toggleable but i have no idea how 😭
if wankers and dicks.wanked == 1 then
return{
wankers.satisfied = true,
}
end
thanks feli
Anyone have any ideas on this?
Have you checked steammodded's page for
Oh just this page is nice
https://github.com/Steamodded/smods/wiki/The-Mod-Object
And check the hyperlinks :)
But i imagine you want some silly config tab in your mod's option so here it is !
-# When i'm back on my puter i can help ya with that :D
yes it is
it seems like it got introduced a long time ago too
probably shortly after vremade got made
huh 😭
I know that Cryptid has a joker that adds slots regardless if it's negative or not (unless you count the joker's name lol)
well it's not normal people want to score debuffed cards
But that's it
you can probably do something with all the new card slot stuff but idk how any of that works
I copied the same format as SDM_0's Stuff for the challenges, so why is it not working on my end?
Bleh
Would be cool if splash worked with debuffs
Check it's description and you will understand D:
Waaa,,,
id = "..."
x&x&
Ah. Thanks.
Whuh
Cool custom rule
Seems empty
Also this too
-# I always use 'hello' instead of "welcome"
-# For no apparent reason lol
-# It quite literally does the same thing
Hold on, Qualatro has the modifiers table empty on theirs. What's the difference?
Nuh
Ooo
I did not remember you
Nuh nothing
The modifiers table being empty does nothing
-# Just pass
Ok, in that case, then why is it blank? I have the rule text in my localization file under v_text, and I have the correct keys.
Oh it isn't linked to that
You put the text in the wrong section of the loc file
Ah. So what part exactly do I need to throw it under?
Wait a minute
this is what i have
So like mine.
Welp. Where do we go from here?
AAAYYYYYY you were right
Now to find out why the other lines aren't showing...
Doesn't support multiple lines ?
Yeah yeah
i feel like it should
Booooo SMODS
D:
Make a modloader by yourself and see the exact same issue D:
Well, at least I got something good, so still a win.
Aaaa
The little ~~~~ are horrible
Makes it unreadable
-# Notepad++ user that hates Microsoft :3
I guess
\n does this lmao
\r doesnt seem to work
It's html but with less functions iirc
what is
Uuuuuuuuu
Idk
Back to music
Forgor
i can assure you balatro ui is not html lol
OF COURSE NOT D:
The little texties
-# Text based deck building game D:
can confirm
multiline strings work but they do that still
oh wtf lol
GOT IT
yo??
this is cursed
The user interface of "Balatro most closely resembles the CSS flexbox layout, albeit with fewer features."
Got confused with this statement from steammodded's wiki
BAHAHAHAHA
OH EW
yeah thats not html
Got confused with it lol
-# AND I SAID THE TEXT NOT THE UI
Hmm idk my mind is telling me something
the text doesnt take html tags lol
Must be the wi
@glass scaffold
Html tags ?
Forgot about it it's been months
Oh shit, thanks for pinging me.
i was going to give an example but my keyboard doesnt have less than or greater than brackets
>
<
?
Discord...
quote fail
-# Buh why do i know so much about the niche of discord's text formatting lol
So am I doing this right? It's throwing everything on one tiny line.
i mean, i already did this
its just that idk how to actually use them
checking sane person would enable the background
but unchecking it does the same to me so
What ?
yeah im confused too
How do I get a random seal like I did a repeat cause I dont think it check if the seal is in_pool
SMODS.poll_seal({guaranteed = true})
you guys think it's possible for me to semi fix the yorick mod
rn stacked blueprints and brainstorms just dont work lol
What do you mean? It works fine for me.
it wouldnt copy burglar or certificate i think
and it removes eternal stickers if i merge
Those jokers also work, but I am planning to store each of the stacked jokers properties so if they are split the properties will stay.
@ me if/when you do that, it'll be super nice
could make it so that they just stack separately (a stack of eternals and a stack of non eternal)
how do you make it so that you can select multiple things
area.config.highlighted_limit = number
where do i put this
how do you make a card count as any suit from a joker
Hook Card:is_suit and check if the joker is present and return true
What is the goal?
this consumable copies other consumable
You mean you want to be able to select more than one consumable at the same time?
yes
okay pertho
G.consumeables.config.highlighted_limit = 1000 in a Game:start_run hook.
thanks
how would i make a consumable that enhances the card
looking at vremade, its not clear enough for me
mod_conv is the key of the enhancement, max_highlighted is the maximum card it can affect 🤷♂️
That's all you need
I guess the second statement isn't exactly true but you get what I mean
this is nice to know
how would i localize it
The info_queue part
info_queue[#1116390750314307698_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
the text inside of the tooltip i mean
YES
the one describing the effect
????
thats already localized
Are we deadass
it literally is localized in vanilla
which does it in the exact same way
why would it need to be different
custom enhancement..