#💻・modding-dev
1 messages · Page 357 of 1
looking at the code, self.children.alert is set to a box. If you're doing dynamic stuff, you just need to find the right node
alright ignore that completely!
don't just stick the box in; it seems like alerts are actually special cased, as I said, self.children.alert is set in the game's code
yeah uh I may appear to know things but I am also lost. sorry
yeah yeah i looked at that whole children.alert thing already, but can't really grasp it...does that mean i can attach children={alert=SOMETHING} to my run info button
all good, thanks anyway
it's never quite as easy as it seems
jesus christ good luck with that
you're in luck, I'm the only one who can really help. I will help
i lost an afternoon to self building lovely
Heres my comprimise
how should I change this to make this sense if a planet card is used
I assume you already did the usual git submodule update? or git submodule update --recursive
@gaunt thistle I know it's hardly a standard setup, but any clue why this is going wrong?
have you already done the above (and checked if the directory named in the error actually has stuff in it)
ih fuck
I need to have done git clone --recursive
doi
I didn't check for submodules
oh... that's the only submodule
lol
after a git submodule update --recursive --init i get a bit further
could you post the entire error?
lots of people have been having issues. especially on linux
yeah, was just copying the whole build log
ok im almost finished with burninated cards. i just need to figure out how to call the last played hand specifically- as in, the most recent one you played
i know level up is just level_up_hand but i dunno how to call it to specifically be the hand you most recently played without it being a hand that is actively being played in the scoring step
ah ha, there was an issue where gcc needed to be version 14 or higher
uh oh, I've had to update gcc to a version newer than in software repos before.... it's not fun at all, no siree
tbh... i should just try to get a newer ubuntu wsl, instead of whatever this shit was on the microsoft store
this thing kinds sucks
huh... why would 24.04, which is only a year old be giving me this shit, lol
waaahhhhh i did it
is that run info button in the base game? the scaling math is clearly wrong
yeah that's vanilla except for the skill tree button
yeah it's scaled inconsistently. ui in balatro not only is eye-wateringly verbose, it's also bugged
yeah lol
the solution was surprisingly simple, i just looked at the wrong places for inspiration
if G.HUD then
if not G.run_info_alert then
G.run_info_alert = UIBox{definition = create_UIBox_card_alert(), config = {align="tri", offset = {x = 0.05, y = -0.05}, major = G.HUD:get_UIE_by_ID('run_info_button')}}
G.run_info_alert.states.collide.can = false
end
end
this in the main game update loop
which is a simplified variant of how the collection button does it
makes sense
in balatro universe yes
in my world it doesn't make sense AT ALL to add a small info icon to a button through a global event instead of right there in the component lmao
but then again, UI_definitions.lua is 7k lines long 💀
mod profiles' is 1k lines
well UI_definitions has a lot of math and recursive logic. wrong math and logic, but it has a purpose
example?
i think thunk uses a bundler tho...i can't imagine he actually uses these files as is
I think its mainly because UI nodes tank up a bunch of space
yeah it's just so fucking verbose
wait sorry I was thinking of ui.lua
More than likely not
which is a whole different thing
theres comments
n=G.UIT.<letter> a million times instead of just the letter
and all variables have the same names as they did
yea 1-X lmao
err well
G.UIT is so its not polluting the global variables that much
but it should just be a number
UI verbosity is because it's in pure Lua... all the tables are manually defined. as if you wrote html defining the dimensions of every box
yeah but it could still just be the letter as a string, the UIBox class could convert it after the fact
hmm... it seems to be fozen (trying to upgrade ubuntu in wsl to 25.04)
yea. i personally like it.
what could help is some higher level functions. like components in html
trying to make this work, was working on it yesterday with some help but i dont understand much
see this for what i mean with verbose: #💻・modding-dev message
balatro
all this shit in ui_definitions could be abstracted away in to uibox or node or whatever
but whatever, rule 3 i guess...
and there's the error
took a bit, lol
this is aiming to allow boosters to be rerolled
but ive done it wrong somehow
oh 24.10 only, still beats nothing
3, Do not debug source code.
?
odd rule but doesnt fit here
I mean i don't think that's what rule 3 means
lol
yeah idk i felt like my ramblings border on debugging source code but whatever
what does rule 3 even mean? we can't fix bugs in vanilla?
unless they mean fully unaltered no code of our own running
Rule 3 means like... don't use a ram viewer? but like... that's done all the time too
so yeah it's not a big thing
using a ram viewer wouldn't be source code debugging tho, right?
oh yeah
I meant like... the source code quivilant
state viewer
or smth
which people use debugplus as all the time
which it is needed for
the rules are actually outdated, modding on non pc is alive now
but not allowed to talk about here still
which is the rule
the reason is thunk doesn't want tim apple to kill him
or smth
searched all of thunks (30) messages here and in #⚙・modding-general
rule 3 is blatantly disregarded by thunk
lmao
I think that just links to the thread
channel rather
it doesn't jump for me
Disabled lua compilation, so that we can get the source and promotes the debug features
oh yeah, the whole thing that debug plus is based on
lol
debug plus is based off of the og debug mod
I did wonder why the exe is a bit of an exen't
i'd like to ping a mod to clarify that rule but discord people always cry about pings :(
whatever that is
which is based on just enabling debug mode
and adding to it
truly. i had to add it to the pronouns section and people still wont ping me
debugplus still uses canillia balatro's debigmode
yea
i always like pings
out of everything, you fixed mods > mode
you could do @/mods but i prefer you don't
there's only one other typo?
canillia :P
this discord needs a meta channel
i'd ask questions every day
especially about gifs
canillia, debig
thank you for the sacrifice lol
lol debig is what i wanna do to talisman
i missed that one
I feel like its truly impossible to not "debug" vanilla code, but Im pretty sure we're just either misinterpreting it, or thunk described it too vaguely
i always thought it meant you werent allowed to fix vanilla bugs which makes no sense
I thought it was generically about security
SMODs would be shut down no?
i mean i get the rule is about not actively sharing loads and loads of source code
as in, the intent of the entire rule list. mostly about not encouraging piracy?
yeah
yeag that's just piracy
though i don't feel bad sending logs
Axy sees it more like ... If someone wrote some code, then an army of people showed up to say the code could be done better if it was done in X or Y way. It'd be a bit draining.
dumps i mean
just not all of them at once
lol
because you can run that shit with love i'm p sure
i mean yea thats completely fair
but draining to whom? thunk actively avoids looking at modding chats
not really 'debugging' though
theres people who move out of the chats
Mmh, but some people might see it that way
fair
like how I did in #🍌・thunk-chat but thats a rule clarification
basically i wanna know to what extent i can shit on thunk's code in here 🤡
tbh what I think he really means is mot to run the game with an attached deugger in an ide or smth like that
even though it's functionallky the same
as what you can do with other tools
A debugger to step through the code would be convenient, especially something that could list out each table in like, a variable inspector
Axy has been stuck trying to work with the shop for a couple days now, and the cardarea code keeps complaining. ><;
whats the problem
Not at PC atm, so can't pull up the code
i do that all the time? i run the game from source, otherwise i'd go insane - obviously won't share that repo, but for example can i share how i did it here? i think not
go ahead and run game from source, that's ok I think
Yeah i think that might be what the rule means
But its stupid
yeah obviously, how can that even be a discord rule lmao
thunk will enter my house and stop my terminal process?
do any jokers or enhancements or anything out there do anything with last played hand? still trying to get my burninated enhancement up and running
I think it's like the moddding in other platforms rule. It's about discussing
Its to disuade conversations about it. Just like what this is kinda technically even though its only the rule
haven't seen you here before, feel free to post your problem once you are at the PC again, i'm sure people will help
i think technically it's already illegal (like by law, not discord channel rules) unzipping the game lol
but who cares
How?
im assuming that blue seal does "last played" hand since it's in hand, but idk how i'd get the variables and such for blue seal
To give a description of the problem, the client wants a joker to turn all cards in the shop to either negative jokers or polychrome 2s, when a condition happens. Axy has the condition done, but when Axy tries to load a cardarea containing polychrome 2s with a random suit into the G.shop_joker cardarea, then add shop_ui using the associated function, the game complains about various values being missing either from Cardarea's config or the card's config. The create_card_for_shop function might help, since Axy was looking at it in the context of rerolls, but Axy hasn't fully understood it yet.
some else might be able to help, its 1 am and ive been looking at code for 12 hours
having a hard time reading that
Nod nod
bump
yeah for me its like midnight and i really just wanna get burninated enhancement finished. leveling up stuff in smods documentation is only documented for currently played hands
G.GAME.last_hand_played
according to the Source
i think last_played_hand gets updated with the current hand anyway?
but see the problem is that would be calling the "current" hand. you wouldn't be playing a hand if you were discarding
i dont even know where i'd slot G.GAME.last_hand_played into level_up_hand
apologies if this is all really obvious stuff im missing i am NOT usually a codewriting person
obviously depends on where you live, look up Sega v. Accolade for example...it's a grey area at least, and i guess good enough lawyers could always argue for how the intended distribution of the game already doesn't allow for someone to even disassemble it, not even just to "look at it"
not that this will happen here, just wanted to mention it as a fun fact
look at burnt joker in the source code/lovely dump?
try a straight return {level_up = true, level_up_hand = xxx}
also, could you say what you're trying to do?
Thunk explicitly stated he disabled compilation so that we can get the source code
make an enhancement that levels up your most recently played poker hand when it's discarded
here's the code as i have it now
calculate = function(self, card, context, effect)
if context.discard then
return {
{level_up = true, level_up_hand = G.GAME.last_hand_played},
remove = true
}
end
end```
oh right, context.discard might behave a bit weird
why did i inadvertently choose the most difficult thing to try and do here
uhh @cunning barn idk if itll work but
i think context.discard activates per card discarded
try pre_discard i think
context.pre_discard, you mean?
im just going ahead with the code i posted with pre_discard instead of discard i will post any crash logs
context.pre_discard is a thing
putting in pre_discard makes the card literally do nothing at all
like, it used to remove itself with discard but now it doesn't even do that
it is going to be a celebration when i get this to work
context.discard destroys every discarded card and it still doesn't level anything up. not even a crash, just absolutely nothing
probably for jokers then
I mean it depends on the eula whether it'd thecnially be a contract violation, but I'd say no due to the copyright owner knowing all about it and likely intentionally enabling it
but that's not the same as being a legal law violation
im genuinely not sure what i'm doing wrong here. i'd expect at LEAST a crash, SOMETHING on the end of the attempted level up but it literally doesn't change even a single value
i wish I could help, coding is hard
local text,disp_text = G.FUNCS.get_poker_hand_info(G.GAME.last_hand_played)
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
level_up_hand(context.blueprint_card or card, text, nil, 1)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
no offense meant but i can't make heads or tails of what this is even supposed to represent
i think i'm in too deep
it should be the whole thing
whole thing for what?
like if you put that in your context.discard check it should just upgrade the last played hand
were there meant to be commas in there?
goddamn that looks complicated
no, that's not a return
also im getting a bunch of errors about keywords not being able to be used as names and missing symbols
they're warnings, and it's because you haven't added the lovely/dump to your vscode workspace (which you should do)
lovely/dump in your Mods folder contains the patched versions of all files
mmm hand on
all of these are the proper red x errors, not the yellow ! ones
/appdata/balatro/mods/lovely/dump
show code?
I don't recommend trying to manually level up unless you want to suffer
all of this just to be told it's not recommended
i might just give up on the enhancement dream im genuinely getting a migarine
calculate = function(self, card, context, effect)
if context.discard then
return {
local text,disp_text = G.FUNCS.get_poker_hand_info(G.GAME.last_hand_played)
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
level_up_hand(context.blueprint_card or self, text, nil, 1)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''}),
remove = true
}
end
end
}```
i just pasted this in the return directly as you said i should
I do think if you just copy Burnt Joker mostly, it'll work. I just have an interest in making sure smods isn't broken
no I said don't put it in return
just in the context check
also i have to figure out how to make it Not destroy every single discarded card
which cards is it supposed to remove?
just the enhanced ones
@willow plinth I wanna continue what i was saying. Software EULA's are not even nessaracarily considered legally binding contracts, but even if they are, contract law isn't criminal law. You can be sued for breach of contract if there's standing, but that involved actual damages of some sort. The worst you can get besides that is revcation of service
crash
i might just not add any enhancements this is just genuinely not fun to troubleshoot
speaking of, similar problem: this seems to crash for me if a hand wasn't played previously
funny enough I just got the exact same crash but for a different thing
seems to be this
i think im interupting here, but when i have enough oops all 6s to guarantee a duplication in the first if statement, the game crashes because I assume the cards being spawned also spawn copies of themselves in an infinite loop.
I think it's something to do with an incorrect set up of a file or something
well ipairs tables are just {thing, thing2, thing4}
pairs tables are
{
thing 1 = x,
thing 2 = y,
thing 3 = z
}
so do i have to go through ALL my files
because if i do im just quitting here
well it wasn't crashing before was it
it was not crashing before
ok so something you added recently is causing the crash
oh I see, sorry. It probably was a bug I introduced
the only thing i added between my last test and now is the code you suggested i add
see I was suspicious. sorry
you probably accidentally used the index instead of the value somewhere in a loop
i'll just post the full code
that's what i got that for
smods is probably just bugged, I can try to push literally right now
SMODS.Enhancement {
key = 'burninated',
atlas = 'enh',
loc_txt = {
name = 'Burninated',
text = {
'Levels up last played poker hand by 1,',
'then self destructs'
}
},
calculate = function(self, card, context, effect)
if context.discard then
local text,disp_text = G.FUNCS.get_poker_hand_info(G.GAME.last_hand_played)
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
level_up_hand(context.blueprint_card or self, text, nil, 1)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
return {
remove = true
}
end
end
}```
its ok, in my case this is just for the example mod im making
that's me trying to recreate burnt joker
the issue is with the equality check accidentally returning true if nil == nil
probably
I think it has to do with your poker_handa localization and the yses of text that follow
well none of that is mine, i just pasted in what chaseoqueso put in
that's code I yoinked from vanilla
so for one thing I forgot to replace "self" with "card"
in the code I sent
context.blueprint_card or card?
yep, in both places
they're using a table "text" to index a table
which is exaclty what the error says
I mean the code comes straight from vanilla, untested
ok honestly im genuinely starting to weigh if adding this is worth it
I think it's being used differently
i mgith be mistaken
idk
I'm too invested
well im the opposite i am just totally checked out. it is almost 1AM, im thinking the effect isnt even that good to begin with, and trying to read through the crash logs is like hieroglyphics to me
actually no, not quite this either
well it could be this
if the table uses the name and not the key
you can always come back later refreshed
you have like 200 ideas you dont need to rush lol
whcih knowing thunk it does
@brisk rose can you share the copy pasta again?
yeah but i want to get this in because i have a TON of cards that rely on burninated edition
and like i already did the art
the one full of emojis?
yes
the error is happening on launch, not on the effect, which leads me to believe it's not an error with the calculate effect
i would do hole-riddled but that's +1 mult every two retriggers alongside the retriggers and DEAR GOD i do not want to imagine how hard that would be to try and check for if it's this much of a headache just to level up a hand on discard
look- I am very sorry. smods desires to make it as easy as just returning a value. SMODS might be bugged.
a headache for me, to be clear. not insulting the mod
because i am not tech savvy at all
i give up im just gonna change the effect
thanks for the help everyone sorry it didnt go anywhere
uh, the problem is smods, confirmed. your first code should have worked
I just need time to fix the issue
I think everyone has drowned me out. I literally am working on smods
...
could you state the whole problem again or at least point me to a message where you did? just for reference
i need to go lie down.
oh okay sorry
nothin to be sorry about :3
ugh im gonna try hole riddled
it's probably easy to get a retrigger going on a scored card but is there a way to do something every 2 retriggers specifically
triggering stuff on retriggers is not a very supported thing
why is every single thing i want to try so hard
never mind im just not doing enhancements at all
honestly might not even do the mod anymore. coding seemed fun at first but it's clear i know nothing about the innards of this kind of thing and it deeply aggravates me to try and do it
don't give up, everyone needs a break once in a while!
is just "retrigger card 2 times" too weak of an enhancement
because i can just shorten it down to that
and for a goooood break i recommend playing a bunch of balatro
wait.... localize('k_upgrade_ex' looks wrong
I see a lot of brakets being closes that never got opened
I think the ship has sailed on this. just ignore chaseoqueso's original code
yeah ive just given up on adding burninated entirely until ej pushes the update (hopefully soon)
sorry. let's calm down
er... 1
i am calm
I think they mean all us trying to help
honestly yeah im just gonna dip out of modding probably. like. it was fun when the effects were super simple but i am VERY easily aggravated when something doesn't work quickly, and this process has made me want to throw something the whole way through, i am not cut out to code
not a knock against anyone here for trying to help, but this whole thing is just. really stressful for me
I mean by that logic no one is, but fair
yeah, take care of yourself first ofc
maybe you can get a programmer to help
multiple people who know programming, including yourself, have been helping, and it has not changed my aggravation
i am just like a very easily-provoked person who's going into something that requires lots of patience and trial and error. which are not my favorite things
makes sense
SMODS.Enhancement{
key = "burninated",
atlas = "Jokers",
loc_txt = {
name = "Burninated",
text = {
'Levels up last played poker hand by 1,',
'then self destructs'
}
},
calculate = function(self, card, context)
if G.GAME.last_hand_played and context.discard and SMODS.has_enhancement(card, "m_pow_burninated") then
local text = G.GAME.last_hand_played
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
level_up_hand(context.blueprint_card or card, text, nil, 1)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
return {
remove = true
}
end
end,
}
(change the key in SMODS.has_enhancement to your mod's key)
oh hey thanks much
today I got to learn how discards and enhancements work
and help someone on the verge of giving up on modding, which would be very sad indeed
well the problem is still "if i discard more than one card, ALL of the cards get destroyed
but this level up solution works
i just need to try and get something working for the latter
testing it on my end, identical code to yours, just doesn't do anything
did you replace m_pow_burninated with m_yourmodprefix_burninated
i just replaced it with only "burninated" because thats the key name for mine
did that work lol
you have to put the prefixes
the prefixes tend to be necessary iirc
SMODS adds them automatically when it goes through all your files and load them
to try to prevent mods from having duplicate keys for things
ok so like i get the prefix but what does the m do
ok, i did all that, and FINALLY, it properly works. thank you so much for your help i would never have been able to figure any of this out
happy to help, and glad you're happy with the effect :)
YIPPEE
I tend to lurk so I will be around if you need help with your other plans
another taski pfp made happy, the world is in balance :P
now granted, i am suddenly not sure if this represents the burnination thing very well
but i can't back out now because we spent all this time getting it to work
LOL it's called playtesting, sometimes it be like that
I like that it blends the Trogdor theme with the precedent of levelling up set by Burnt Joker
personally
oh no wait the burnt joker levelling that works thematically
and burning being like the only thing you do as trogdor besides stomp around it makes sense that the burnt effect would target hand
oooo :D
(Sorry to interrupt)
What's the correct scoring context to use if I want to upgrade a joker based on the final hand score? Neither context.final_scoring_step and context.cardarea == G.play or context.after and context.cardarea == G.play seem to be triggering. I'm also not entirely clear where to access the hand score (is it on G.play?). This is what I have:
calculate = function(self, card, context)
if context.final_scoring_step and context.cardarea == G.play then
if G.play.chips > G.GAME.round_scores['hand'].amt then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
end
end
if context.joker_main then
return {
Xmult = card.ability.extra.Xmult
}
end
end
can u ping me in it i cant find it
just did
gonna try and rework the hole-riddled effect (synergizes with gun-related jokers like nunchuck gun, gunhaver, later on i wanna have bubs with the shotgun from the sbemail virus)
it was initially
"Hole-Riddled Card
Retriggers twice. Gains +1 mult for every two retriggers."
but i have been told that doing stuff based on retrigger amount isnt well-supported in smods and i'm wondering what i could do to make the effect still feel like it's being shot repeatedly and getting a benefit from it
to be fair though two guaranteed retriggers is already pretty powerful
retriggers 4 times and then is removed? lol
number of retriggers is flexible but I like the idea that it just goes absolutely wild and then dies
well my problem is i have jokers that synergize with having a bunch of hole-riddleds. and i don't want to have another card that destroys itself
valid
so a card retriggering itself twice and then getting a benefit seems like it would not be hard to code because those both use the same condition
it's not like you're trying to count all of the retriggers that happen to it, right?
uhhhhhhhhhhhhh i. i kinda wanted it to get +1 mult from ANY two retriggers...
i'll just scale it down to 2 retriggers then gains +1 mult
meh I could help you make it the way you want but starting this way is easier for now
itd prolly be super difficult to get it the way i wanted at first yeah
hm. doing things on retrigger might be much more feasible than trying to count retriggers/"triggering off retriggers"
as you can just do something each time the card is calculated
i mean like. +1 mult per retrigger scales at double the rate at what i wanted im worried thatd be too much
eh. probably fine
I mean you can definitely just increase a variable on the card every time the card is scored and once that variable reaches the desired value (2 in this case) set it back to 0 and trigger your effect
that method would include the initial scoring of the card, not just the retriggers
but I figured it would be best to start with a simplified version of the effect
yeah ive already had enough grief with burninated
that was my intuition lol
so like. could i just copy code from something like seltzer to make sure it retriggers. i tried to check to see how echo crads from cryptid do it but annoyingly they have everything in the files BUT how they actually coded that specific effect
according to the docs on context.repetition you should be able to return { repetitions = 2 }
https://github.com/Steamodded/smods/wiki/Calculate-Functions
...and now i have to sprite bullet holes
yeah I have decided that art is objectively the worst part of modding
Does anyone know if it's possible to send a blind name/description in the info_queue?
i dont think this looks too bad actually
context.cardarea == G.play happens during neither of those.
at 2x for comparison
Also G.play.chips doesn't exist.
I dig, could be a bit more erratic though I think
well then it'll be overlapped by the suit/rank icons and they'd just float over it
fair
this'll prolly do
i feel like theres definitely a mod that uses +1 mult per time triggered for a card but idk which
I'm at the point rn where I need to write a shader for an edition I created
and I Fear
good luck
Shaders suck
I have a nonzero amount of exposure to shaders
Wouldnt it be card.loc_txt.name
hey yall im getting uhhh this. is there a reasonable explanation? the effect works fine, it just breaks after scoring ends
wuh
theres no context.full_hand anymore after scoring
what are you doing to context.full_hand?
since theres no hand to read from
yeah but im not reading it anymore
show us the code
but the game is
Clearly you are
alright
No, it would be G.localization.descriptions[card.ability.set][card.config.center.key].name
Loc file user detected
Laugh at them
i think i might have to check for a different context
That is still where it is located if you don't use localization?
The joke was funny
😦
Solingen
im pretty sure that runs after scoring too
Nolonger*
what's line 115
and not context.end_of_round?
yeah, that
oh ok thanks
ill probably do both. i dont wanna run nil checks when unnecessary
i did return {repetitions = 2} on hole-riddled card but it didn't do anything. i'm assuming i have to have some extra code in there
how do i make it so consumables dont spawn outside their packs
complete shot in the dark but in_pool?
try putting card = card in the return
this is what I'm referencing btw
oh you probably need context.repetition if you didn't do that part
i did not, in fact, do that part
it worked btw
is sit context.cardarea instead of context.main_scoring?
i dont think theres any instance of in-hand effects checking the size of the played hand in vanilla so it never comes up
seems like they use if context.repetition and context.cardarea == G.play
the cardarea check is to make the effect happen when played rather than when held in hand
I want to learn Lua to make a mod. The mod? Play balatro with Only The WASD and surrounding keys. Would this be possible? Like, are the built in tools for selecting cards and buying them there?
(I'm somewhat disabled in my right hand, so I'd Like to be less dependent on my mouse)
alright so that makes sense
but my question is, im really tired so this is prolly a really obvious thing but is there a variable to display an "again" message that's custom? i want it to say "BANG" or "BLAM" or something instead
its definitely possible, knowing Handy
Great!
i would suggest learning Lua first to understand how the language works (its really straightforward, dont worry)
then you can check out #1349064230825103441 :p
Will do! It's just a programming language, how hard could it be ?
-# famous last words until one has to do shaders and uis
you can add a localization entry to your localization file if you have one. Otherwise, just replace message = localize('asdkljh') with message = 'BANG'
Well yeah
But the objective Is to learn Lua. I can do that rather easily without shaders or UI
ok retriggers and text work. now to figure out how to add the +1 mult after the retriggers.
did someone mention something about being able to live update shaders?
especially given shader files are glsl and not lua, lol
watch command from DebugPlus?
This seems like it'll be a... Well not straightforward considering I'm not straight And programming never Is. But it'll definitely be doable
I think I ran the command correctly (according to help watch) but I'm not seeing it changing
in fact it's just pure white rn
also it's worth noting that like... standard lua functions aren't used all that much in coding mods. It;s a lot of using the smods stuff or the game functions directly
Fine with that, as long as The game's functions are clearly documented
they aren't, lol
you have to find out where shit is by looking at the code yourself or word of mouth
the smods documentation is okay
but base game? not so much
but I haven't checked out the mod starter pack thread
i could be dead wrong
oh gods
wizard time i suppose
about to start roleplaying a mage's aprentice, pouring over arcane tomes and asking my peers for help :3
ok i think im almsot there but how do i make the +mult trigger AFTER the retriggers? no matter where i put it i'm getting syntax errors in visual
the piece of code i'm trying to use is
" card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain"
i've defined "mult_gain" as 1 idk what the problem is that it consistently gives seemingly completely random syntax errors
so besides standard apu specifc stuff that I already knew existed, that thread i linked does have a nice list of where certain crucial tables and functions live
as you might know about lua, tables are everything
i know bvery liytle about lua, sasdly
tbh I'm just now learning
ok im just gonna make the +mult trigger before the retriggers now
aaaaaaaaaaand crash, for the 11th time tonight
mult is nil, apparently
SMODS.Enhancement{
key = "holeriddled",
atlas = "enh",
pos = { x = 1, y = 0 },
loc_txt = {
name = "Hole-Riddled",
text = {
'Retriggers 2 times.',
'Gains +1 mult for every 2 retriggers.'
}
},
config = { extra = { mult_gain = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.repetition and context.cardarea == G.play then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
return {
message = 'Blam!',
repetitions = 2,
card = card,
}
end
end,
}```
so, i imagine i'll need whichever data structure holds the hand, whichever tools let me select a card, and probably other styuff
ok i did literally exactly that.
...and now the mult doesn't trigger
how do you get mult to show up on a playing card
im doing the exact same thing that they did for chips on hiker and that was just fine and peachy but as soon as mult is in the equation the game throws a tantrum
what do you wanna do exactly?
let someoen use QWEASDR and maybe otehr keys to play the game
i was thinking i'd ideally just hijack controoller cointrols
there's already a keyboard mod
like do playing cards not have mult defined?
yeah, that's the one i was thinking
they do, you have to do card.ability.perma_mult apparently.
context.other_card.ability.perma_mult = context.other_card.ability.perma_mult or 0
context.other_card.ability.perma_mult = context.other_card.ability.perma_mult + card.ability.extra.mult
but don't use context.other_card I think since this isn't a joker effect
actually hang on
looks like a great start! i might still only have one hand availale, so this mifght still be too two-handed, but its a good start!
someone forgot to ctrl+c
did i mess where you told us the prob;emy ou're solving?
or is it private/secret/just irrelevent?
you did, yes
I think you need to separate your calculate into two different context checks, one for applying the repetitions and the other for scoring mult
why does everything have to be so hard man
ah very fair, accessibility is always a good thing
you're implementing an effect that does two very different things to one card
gotta have two very different checks to apply them
absolutelly. Great thing about learning code is the ability to make my own accesibility features
@daring fern why all the reacts? I saw what you did, you posted the handy thing again because you forgot to copy the new thing
then deleted it
not handy
typist
are you telling me I imagined it?
I meant typist, yeah. There is a different mod called handy but i think it's a general ux tweaks one
form what i saw, thats teh case, eyah
I think you're gaslighting me @daring fern especailly with how many reacts you're doing
naughty naughty
you don't do that many when you're actually confused
if only i had access to the sever logs, lol
im gonna jst add the mult stuff tomorrow because the retriggers are fine and i have been staying up till 6 am and really want to stop
okay, i gotta make the mod first, and then start ampping keybinds
I'd help but i don't know anything about contexts yet
hi, my Balatro's suddenly not booting
i've updated SMODS, but that didn't help
it's stuck on the black screen before the progress bar
Did you try verifying the game files?
it's stuck here
lemme give that a go
successfully validated
yeah no dice
i've added a lovely ignore to my mod, lemme try doing that to the others
nope
will try updating lovely
hhhhhhhhhhwhyyyyyyyyyyyy
nothing's working ;n;
including booting from the executable
Does it work with only lovely and steamodded in the mods folder?
testing
that's a weird way to phrase it
saying that lovely isn't in the mods folder
I spent today on this and oughhghghg this is such a cool effect
It kind of is.
but you can always delete that lovely folder
it does nothing
am I doing it right
perfect edition, lol
also polychrome always looks so sickly in still life
I actually just created the missingno of shaders
Does it work with only lovely?
ah, yep
@long sun neated smods
make sure mods/steamodded is the contents not another folder called steamodded
and it's fine if it's smods or smods-main or anything
just has to not be nested
no that's the thing, it was like that, but just stopped working today
but... that never should work?
ah i see
Are you getting this version of SMODS: https://github.com/Steamodded/smods/archive/refs/heads/main.zip ?
ya i pulled from main
It updated 3 minutes ago so, try again.
oh you're right, there was an update :) trying again
thats really cool, but i wonder if its even worth always suffering through a boss blind's effect just for x4 mult
unless its the needle
I wanted to argue it should be a little higher yeah
Regular play would probably involve someone only getting two or three before selling Sweet Bod so as not to wrack up every debuff known to mankind
now it's prolly nested
the folder comes like that
the zip
So the question is, really, what exponential benefit does that warrant
no pulling from the repo doesn't do that
is this used to upgrade tusk or d4c, by the way? 🤔
oh you use git like a smart person
No
nvm
dang
:>
your av deleted lovely i bet
that can happen
check your balatro exe folder for version.dll
that's why the directions tell you to add an exception for the balatro exe folder
because lovely is technically a trojan injector
lol
Also for the record I fucking laughed at this response
😭
Collect my debuffs
mm, i already have that as an exception
real time protection acting up i guess
weird
Get a Corpse Part Needle if you thought the Golden Needle challenge wasn't annoying enough
did one last joker before going to bed but it's not working. this is genuinely just the vanilla remade code for steel joker except steel is replaced with hole-riddled so maybe i forgot to put something somewhere but it doesn't gain or use any xmult at all when a hole-riddled card is added (although that was debug plus so maybe it just didn't get that use case)
SMODS.Joker {
key = "crackstuntman",
loc_txt = {
name = 'Crack Stuntman',
text = {
"Gives {X:mult,C:white} X#1# {} Mult",
"for each {C:attention}Hole-Riddled Card",
"in your {C:attention}full deck",
"{C:inactive}(Currently {X:mult,C:white} X#2# {C:inactive} Mult)",
}
},
rarity = 3,
cost = 7,
atlas = 'hsr',
pos = { x = 4, y = 0 },
config = { extra = { xmult = 0.3 } },
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS.m_holeriddled
local holeriddled_tally = 0
if G.playing_cards then
for _, playing_card in ipairs(G.playing_cards) do
if SMODS.has_enhancement(playing_card, 'm_holeriddled') then holeriddled_tally = holeriddled_tally + 1 end
end
end
return { vars = { card.ability.extra.xmult, 1 + card.ability.extra.xmult * holeriddled_tally } }
end,
calculate = function(self, card, context)
if context.joker_main then
local holeriddled_tally = 0
for _, playing_card in ipairs(G.playing_cards) do
if SMODS.has_enhancement(playing_card, 'm_holeriddled') then holeriddled_tally = holeriddled_tally + 1 end
end
return {
Xmult = 1 + card.ability.extra.xmult * holeriddled_tally,
}
end
end,
in_pool = function(self, args) --equivalent to `enhancement_gate = 'm_steel'`
for _, playing_card in ipairs(G.playing_cards or {}) do
if SMODS.has_enhancement(playing_card, 'm_holeriddled') then
return true
end
end
return false
end
}```
You need your mod prefix.
right the prefix
I do also realize that, since that bug with the Manacle was never patched, you could copy the Manacle and do the multi-Chicot thing every single blind
Since they do still accept being disabled like normal blinds (for the duration of a round)
Yep, basically
Who woulda thunk?
SMODS.Joker {
key = 'kot',
loc_txt = {
name = 'King of Town',
text = {
"+1 hand size for every King scored",
"Gains X#2# mult per hand size above #3#",
"{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"
}
},
config = { extra = { xmult_per = 0.1, thresh = 8, } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh } }
end,
rarity = 4,
atlas = 'hsr',
pos = { x = 6, y = 0 },
soul_pos = { x = 7, y = 0 },
cost = 20,
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit < card.ability.extra.thresh then
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh - G.hand.config.card_limit)}},
mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit)
}
end
if context.joker_main then
return {
Xmult = card.ability.extra.Xmult
}
end
end,
}```
trying to get the description on this thing to work before i go to bed but i just get nil on the current mult
your loc_vars function only returns 3 values, but your loc_txt is looking for a #4#
well yeah because i had to loop it over to 2 and 3 because 1 is just 0 for some reason?
idk h ow to define the variable that makes the addition work im trying to figure out how it works on steel joker but it's not clicking for me
your config.extra only has xmult_per and thresh in it right now, but in your ability and loc_vars you reference things like card.ability.extra.Xmult and card.ability.h_size, which don't have values
i mean i thought that hand size had a value already, does smods not have a current hand size variable
there is a way to get hand size but it's not in the card's ability, it's somewhere in G
idk off the top of my head
the mult issue is because you didn't define it though
i have no clue how to define it it needs to do math involving the hand size and ANOTHER variable
I'm not even talking about the math rn, I'm just talking about getting your description correct
You just add it to the config as equal to 0
and for your description (and eventually ability) to work, you need to define Xmult in your config and return it in your loc_vars
Oh it's a different thing
ok but i can't do anything with the xmult right now since it requires math with the variables i already have
Prolly not quite this though
But you still put it in your config table as equal to 0
Or 1
Probably 1
It's just a starting value
That's what defining is
Unless I'm misunderstanding something
xmult lowercase? idk im gonna go to bed in like 15 minutes i wanna just get this done
i havent even gotten to the part where every scored king increases hand size by 1 and that is firmly in the realm of tomorrow
I think it's Xmult though you can just return it that way if you do do it wrong at first
afaik
nope, defined Xmult, still nil
Show the code now
SMODS.Joker {
key = 'kot',
loc_txt = {
name = 'King of Town',
text = {
"+1 hand size for every King scored",
"Gains X#2# mult per hand size above #3#",
"{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"
}
},
config = { extra = { xmult_per = 0.1, thresh = 8, Xmult = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh } }
end,
rarity = 4,
atlas = 'hsr',
pos = { x = 6, y = 0 },
soul_pos = { x = 7, y = 0 },
cost = 20,
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit < card.ability.extra.thresh then
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh - G.hand.config.card_limit)}},
mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit)
}
end
if context.joker_main then
return {
Xmult = card.ability.extra.Xmult
}
end
end,
}```
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh, card.ability.extra.Xmult } }
end,
What I said before and just deleted was wrong. This is right I think besides needing to add what chase is saying
ok the description works now i need to make the effect work
i just realized i left in "G.hand.config.card_limit < card.ability.extra.thresh" which makes it so that the card limit needs to be SMALLER than the threshold
You know only one of those returns can run right?
On what you have?
Return ends the function
but i have end after each return???
every single time i think i know something about the coding i'm mincorrect
A function only evaluates to a single return table or value
no offense but like. all this coding jargon is just turning into mush and oozing out of my ears i am retaining like none of this
So when you're returning, that's your functions output
And it has to come all at one time. It returns and it's done
ok so then what am i supposed to do
btw i got the hand size-mult converstion from hollow from morefluff where all the returns were intact. that works. i am genuinely unsure why mine would not
you know what it's 4AM forget it. i shouldn't have been coding so late it just makes me mad
i'll come back to this tomorrow
if someone can figure out how to format this properly, dm me and i'll credit you in the mod
in general if you helped with the coding lmk i will put you in the credits as well
SMODS.Joker {
key = 'kot',
loc_txt = {
name = 'King of Town',
text = {
"+1 hand size for every King scored",
"Gains X#2# mult per hand size above #3#",
"{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"
}
},
config = { extra = { xmult_per = 0.1, thresh = 8, Xmult = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh } }
end,
rarity = 4,
atlas = 'hsr',
pos = { x = 6, y = 0 },
soul_pos = { x = 7, y = 0 },
cost = 20,
calculate = function(self, card, context)
if context.joker_main then
Xmult = card.ability.extra.Xmult
if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit < card.ability.extra.thresh then
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh - G.hand.config.card_limit)}},
mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit),
Xmult = card.ability.extra.Xmult
}
end
end,
}```
@cunning barn I think something like this might work
Also you have to fix that one error again
I copied from the version you posted and edited
still xnil
i have no clue what this thing wants from me
yeah i give up this thing is just genuinely cursed
#4# still doesn't exist?
back!
well for some reason #1# is just randomly defined as 0
like if i put in #1# it just shows up as 0 and everything else is offset by 1
i think i just have some kind of evil spirit possessing this joker specifically. what is going on with it i have NO clue
right, so booting still isn't working
This is with only steamodded and lovely?
this is when i added the missing version file
it's doing that with both only those two, and also all my mods
Is there anything that has changed between when it worked and when it didn't?
not immediately, no
okay so, observation
removing the version file allows the game to boot
i still cannot find the value that makes the xmult accurate and now with +1 hand size it gives x1.7 mult????
i think i might just have to tear this one down and write it from scratch
mm, lemme try removing the lovely folder
That's just where the dump is, that wont change anything.
ah
alright so just ping me if you find a way to patch this joker it is just Not working. like every part of it is malfunctioning in some unique way
SMODS.Joker {
key = 'kot',
loc_txt = {
name = 'King of Town',
text = {
"+1 hand size for every King scored",
"Gains X#2# mult per hand size above #3#",
"{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"
}
},
config = { extra = { xmult_per = 0.1, thresh = 8, Xmult = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh, card.ability.extra.Xmult } }
end,
rarity = 4,
atlas = 'hsr',
pos = { x = 6, y = 0 },
soul_pos = { x = 7, y = 0 },
cost = 20,
calculate = function(self, card, context)
if context.joker_main then
Xmult = card.ability.extra.Xmult
if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit > card.ability.extra.thresh then
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit)}},
mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit),
Xmult = card.ability.extra.Xmult
}
end
end
end
}```
card.ability.h_size is undefined
i know but i can't define it. i can't define a variable with anotehr variable
config = { h_size = 1.273512735635213725378231573128, extra = { xmult_per = 0.1, thresh = 8, Xmult = 1 } },
ayup
but that's just a flat 1
what did you want to do with this line?
Xmult = card.ability.extra.Xmult
i don't even know at this point this joker might just be on the chopping block
right
even after changing all this stuff, the joker STILL gives x1.7 mult with +1 handsize
yeah honestly idk if i even wanna make this anymore. maybe its just the medication mixed with sleep deprivation talking but i have just steadily gotten less and less enjoyment from creating all this stuff. maybe there's a reason i'm just the concepts person
Can you explain the base concept of this joker
no im not even gonna bother ive been explaining joker concepts and debugging and sending down code all night
i feel like im working at a 9 to 5 at this rate
and on the contrary, my Balatro not working is giving me increasing joy :))) like how does it still not boot!
the idea is SUPPOSED to be that scored kings give +1 hand size (not even gonna bother with that effect at this rate) and every hand size over 8 gives x0.1 mult
but, currently, it's giving X0.1 per 1 hand size, + 8
which, with 1 extra hand size, would be 9 + 8 = 17, 17 * 0.1 = X1.7 Mult
oh well that makes sense actually
jdfgndfngdfngjdfngdfn okay what is happening to my balatro
Couldn't you just do xmult = (G.hand.config.card_limit - 8 < 0 and 0 or ((G.hand.config.card_limit - 8) * 0.1)) + 1?
you mean and 1
i genuinely cannot understand a single part of what you just typed i think im at the point where i NEED to go to bed
surely and 0 would cause X0 Mult :)
No?
yes?
Yes
0 + 1 = 1
aware
the +1 applies to the expression after the or, though
order of operations states that
Did you have to google that one?
yeah im going to bed way too late but im gonna come back to this in the morning
or maybe not. coding stresses me out especially when it Just Does Not Work Ever
wait i'm. duh
nah i had to go to wolfram alpha after asking deepseek for an answer
nvm i missed a bracket =w=
it's a complicated equation
Understandable
also pikat pfp
A friend sent it to me on discord and I loved it
right so
It's assigning a value to the Xmult through if statements, if the hand size is lower than 8, set it to 0 OR set it to (hand size-8)*scaling
i have the version file in the correct folder
i have the latest Steamodded version
and yet, my game refuses to boot 😭
There must be something wrong with your computer because it works fine for me?
i think so too, it works fine on my computer at home
i know it's not an issue with SMODS, as i checked out an older version
the weird thing is, it's worked before
What os are you on?
Windows 11
So he game just isn't starting?
the game's opening, but it doesn't get to the loading bar
Dyi you get a crash screen or nothing?
Does the lovely window say Select at the top?
Lus?
INFO - [♥] Lovely 0.7.1
INFO - [♥] Game directory is at "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Balatro"
INFO - [♥] Writing logs to "C:\\Users\\ghost\\AppData\\Roaming\\Balatro\\Mods\\lovely\\log"
INFO - [♥] Using mod directory at "C:\\Users\\ghost\\AppData\\Roaming\\Balatro\\Mods"
INFO - [♥] Found .lovelyignore in 'Phanta', skipping it.
INFO - [♥] Cleaning up dumps directory at "C:\\Users\\ghost\\AppData\\Roaming\\Balatro\\Mods\\lovely\\dump"
INFO - [♥] Initialization complete in 24ms
INFO - [♥] Applied 14 patches to 'main.lua'
INFO - [♥] Applied 5 patches to 'engine/controller.lua'
INFO - [♥] Applied 15 patches to 'back.lua'
INFO - [♥] Applied 7 patches to 'tag.lua'
INFO - [♥] Applied 2 patches to 'engine/moveable.lua'
INFO - [♥] Applied 2 patches to 'engine/sprite.lua'
INFO - [♥] Applied 2 patches to 'engine/animatedsprite.lua'
INFO - [♥] Applied 51 patches to 'functions/misc_functions.lua'
INFO - [♥] Applied 33 patches to 'game.lua'
INFO - [♥] Applied 1 patch to 'globals.lua'
INFO - [♥] Applied 3 patches to 'engine/ui.lua'
INFO - [♥] Applied 77 patches to 'functions/UI_definitions.lua'
INFO - [♥] Applied 47 patches to 'functions/state_events.lua'
INFO - [♥] Applied 105 patches to 'functions/common_events.lua'
INFO - [♥] Applied 48 patches to 'functions/button_callbacks.lua'
WARN - [♥] Pattern '*then G.E_MANAGER:add_event(Event({ func = function() G.GAME.blind:set_blind(nil, true, nil); return true end })) end' on target 'card.lua' for pattern patch from Steamodded\lovely\calculate_card_added.toml resulted in 2 matches, wanted 1
WARN - [♥] Ignoring excess matches
INFO - [♥] Applied 162 patches to 'card.lua'
INFO - [♥] Applied 9 patches to 'cardarea.lua'
INFO - [♥] Applied 36 patches to 'blind.lua'
INFO - [♥] Applied 2 patches to 'engine/text.lua'
i was unable to move Phanta, as it says it's in use by something, weirdly
everything else was fine
Isn't this what was happening when version.dll got deleted by the av?
ya
I'm confused
disabling real-time protection doesn't fix the issue
So it just deletes vetsion.dll on every boot?
Oh Utah fair. I just thought like.
. It was deleting it as it ran
So it'd halt until you reboot
The game I mean
Pffft
Yeah not utah
If you close the console and immediately try to launch the game again does it fail in the same spot?
yup
i'm still really confused that i can't move Phanta
i don't have any programs open other than Discord, Firefox and File Explorer
Maybe try File Locksmithing it?
what's that?
Literally any of those could cause that if you have a file or folder from it open on them?
It's a part of Microsoft PowerToys
okay, installing it
Task manager doesn't have anything called love, lovely, or balatro still in it?
nope
I swear us competent computer folk get the strangest issues, lol
jsnfjkndsjfndsjk 😭
Can you just reboot the machine?
Like might be the best bet at this point
honestly, fair =w= two secondssss
ease_ante?
well no
i mean like
when the boss blind is defeated
sorry should’ve been more clear sorry
I'm pretty sure it still uses that.
oh!!! it worked!
oh well alright
turn it off and on again :D
That would mean it would go down by -10 when heiroglyph or similar things are used?
yeah
thats perfectly intended
thiiiiiiiis is what i wanted to test >:3
ignore the ERROR, i still have no idea why that's happening -w-
ooh the negatives look fun!!
Just to check you didn't just call the set Zodiac did you?
Because that would have compatibility issues with other mods because of booster packs and other things that use the set, I think.
I think you would have to put something like this in the dictionary part of the localization file.
stack traceback:
[C]: in function 'init'
[love "boot.lua"]:48: in function <[love "boot.lua"]:42>
[C]: in function 'xpcall'
[love "boot.lua"]:357: in function <[love "boot.lua"]:355>
[C]: in function 'xpcall'```
hmm
function ASPL.FUNC.ease_risk(mod, instant)
local Risk = G.GAME.Risk or 0
local risk_UI = G.HUD:get_UIE_by_ID("astropulvis_risk_UI_shit")
local function _mod(mod)
-- Use the LOCAL Risk variable for calculations
if (Risk + (mod / 100)) > 1 then -- Changed to use local Risk
Risk = 1
Percentage_Risk = 100
Risk_manip_table.disp_risk = Percentage_Risk .. "%"
Risk_manip_table.risk = Risk -- Use local Risk here
risk_UI.config.object:update()
G.HUD:recalculate()
attention_text({
text = "Max Risk!!",
scale = 0.6,
hold = 0.7,
cover = risk_UI.parent,
cover_colour = G.C.RED,
align = "cm",
})
play_sound("chips2")
G.GAME.Risk = Risk -- Update global Risk AFTER local calculations
return
end
if (Risk + (mod / 100)) < 0 then -- Changed to use local Risk
Risk = 0
Percentage_Risk = 0
Risk_manip_table.disp_risk = Percentage_Risk .. "%"
Risk_manip_table.risk = Risk -- Use local Risk here
risk_UI.config.object:update()
G.HUD:recalculate()
attention_text({
text = "Min Risk",
scale = 0.6,
hold = 0.7,
cover = risk_UI.parent,
cover_colour = G.C.GREEN,
align = "cm",
})
play_sound("chips2")
G.GAME.Risk = Risk -- Update global Risk AFTER local calculations
return
end
-- Normal case (no min/max reached)
mod = mod or 0
local text = "+"
local col = G.C.RED
if mod < 0 then
text = "-"
col = G.C.GREEN
end
Risk = Risk + (mod / 100) -- Update local Risk
Percentage_Risk = Risk * 100
Risk_manip_table.disp_risk = Percentage_Risk .. "%"
Risk_manip_table.risk = Risk
risk_UI.config.object:update()
G.HUD:recalculate()
attention_text({
text = text .. tostring(math.abs(mod)) .. "%",
scale = 0.6,
hold = 0.7,
cover = risk_UI.parent,
cover_colour = col,
align = "cm",
})
G.GAME.Risk = Risk -- Update global Risk AFTER local calculations
play_sound("chips2")
end
if instant then
_mod(mod)
else
G.E_MANAGER:add_event(Event({
trigger = "immediate",
func = function()
_mod(mod)
return true
end
}))
end
end
can someone help me out as to why this sets risk to 100% when the function is first run?
let me get a vid
ive been debugging this
but it just isnt playing nice
pretty sure i put phanta_ at the start, hold on
ya i did that
i have this in my localisation file
I think you should have k_phanta_zodiac = "Zodiac" in the dictionary part of the localization file.
Also the seal should be phanta_ghostseal_seal
ah :D
phanta_stat_zodiacs also doesn't work, where should i put that?
also that worked ^^
What is that for?
You mean this?:
In the dictionary:
ah grand :D
thanks!
bingo! i may wanna change the colour =w=
thankuthanku!
sorry for asking for so much help ^^" this is very different from making Jokers and Tarots :)
I just hope SMODS fixes Consumable Types someday
and animated atlases :)
Is there a way to alter the strength of vanilla planet cards? e.g making it add +5 levels instead of one?
Maybe patch here to check if then run it five times?
🤔
is there any mod that creates a different SMODS.Object?
-# i mean, of course there is but idk which
You mean something that's not a consumable, joker, enhancement, seal, edition, sticker, blind, deck, booster, voucher, stake or tag?
yeah
CardSleeves and paperback?
which file is this in? Also probably an insane question but what does patch mean?
card.lua and lovely patches are things that modify or add lines of code from code.
hii quick question, how do you set up the git pages displaying the jokers and all?
i've seen mods doing it and it's elegant, although i haven't found yet ressources on how it is done
after editing card.lua and saving, running the game immidatly deletes/reverts all the changes I've made. How do i properly inject it so that doesnt happen?
You can't just edit the game files, you have to patch them.
how do i make a card or overlay pulse like the vanilla soul or trading card?
:juice_until
how can i track when an enhancement i made's effect goes off?
you could add your own context
SMODS.calculate_context({ your_own_context_here = true })
then in other objects' calculate, just do
if context.your_own_context_here then
and it should work, if thats what you meant
oh alright, so in the effect of my actual card i can make SMODS.calculate_context({unstable_proc = true})
then in the card i need it for i can go if context.unstable_proc then
yeah
okay awesome,didnt know that
very convenient :3
seems really powerful
oh, should be easy then
yeah
-# why is the "Chips" colored
its not supposed to be?
yeah
np :p
ive got 15 jokers so far
im targetting 50
feels nice to have a full page of jokers that ive coded all on my own
should I ask for help here or fan art channel if I were to ask about my card art?
Here
okok, I'm just wondering if anybody's got any specific advice with how to get basic shapes down on more complex objects, because the first original art I made was a calculator with very basic shapes, and I think I got it looking good. But a lot of my ideas (jimbos in unique stances, animals, etc.) have a lot more complex shapes and I don't even really know how to even get to a starting point. I'm using a reference in aesprite that I'm even tracing over a bit, I just don't know how to get the basic profile down pat
all of this is with the context of it fitting in with vanilla jokers
My first piece of advice is this. Make sure you target the right size! Everyone does their art in a 75 x 96 (I think off the top of my head) size, which is the default 1x size. Then use the resize.py script to double it without adding noise.
I did all of my art first at 2x size!
You can resize up but not down without it looking ugly @desert ore
Second peice of advice is use the balatro palette.
71x95
Yeah i got the script up and running, what I was referring to was like, the art in center of the card, i.e. something like the bull or even something like the castle
How to block out the silhouettes ig?
Oh wow I did something dumb!
You cannot add another joker to the info_queue for a joker. I tried and the game resources spiked and crashed with a stack Overflow
G.P_CENTERS.j_Fox_akuma.loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = { key = "artistcredit", set = "Other", vars = { "Akravator" } }
info_queue[#info_queue + 1] = G.P_CENTERS.j_Fox_shinAKuma
local hand_name = "Fox_shungokusatsu"
local retrigger = G.GAME.hands[hand_name].level or 1
return { vars = { retrigger } } -- Fix for missing values
end
You can though?
Oh I had a circular reference. This Joker (shinAKuma) also had an info reference to another joker.
I actually don't love how this looks either
Must be a recursive issue, joker a with a tooltip of joker b with a tooltip of joker a etc
I found that just drawing in a notebook, then taking a picture of it was the way to go. I could iterate much faster with placement in a notebookk
Just refer to it's localization location instead of the center.
Ohhh, good idea, thanks 🙂
you can also check for card.fake_card
I love how well these two Jokers go together
The left one is where the name for the Mod came from!
Why does it say gold seal but it says Gold Card on the side?
any common antipatterns or potential performance issues in here? i want to PR this to Grim but not sure yet
local old_set_alerts = set_alerts
set_alerts = function()
if G.HUD and G.GAME then
if not G.GAME.learnable_skills then
G.GAME.learnable_skills = {}
end
local flat_game_skills = SMODS.merge_lists(get_skills(true));
local flat_game_skills_length = #flat_game_skills
if G.GAME.skill_xp ~= last_skill_xp or flat_game_skills_length ~= last_flat_game_skills_length then
last_skill_xp = G.GAME.skill_xp
last_flat_game_skills_length = flat_game_skills_length
local skill_lookup = {}
for _, name in ipairs(flat_game_skills) do
skill_lookup[name] = true
end
local learnable_skills = {}
for key, skill in pairs(G.P_SKILLS) do
if skill_lookup[key] and can_learn(skill) then
learnable_skills[#learnable_skills + 1] = skill
end
end
if #learnable_skills > 0 and #learnable_skills ~= #G.GAME.learnable_skills then
G.GAME.skill_alert = UIBox{definition = create_UIBox_card_alert({text = tostring(#learnable_skills)}), config = {align="tri", offset = {x = 0.05, y = -0.05}, major = G.HUD:get_UIE_by_ID('skill_tree_button')}}
G.GAME.skill_alert.states.collide.can = false
elseif #learnable_skills == 0 and G.GAME.skill_alert then
G.GAME.skill_alert:remove()
G.GAME.skill_alert = nil
end
end
end
old_set_alerts()
end
Wow, I have never noticed that before. Good eye!
This art is so good I'm so jealous
My wife did it for me!
is there a simple method of marking a consumable as being takeable, from packs?
similar to Cryptid's Code Cards?
i have the relevant code open, but it's a lot
and i already have a SELECT button, instead of USE
If it's within a Booster, you can add draw_hand if you want the cards to go into your hand (like standard playing cards)
If you add select_card = consumables then the card chosen gets sent here
that would be defining it for all of the cards within a pack
https://github.com/Steamodded/smods/wiki/SMODS.Booster here is some more info on it!
so, add this to all the relevant Booster packs, then?
ah great, thanks ^^
hmm, just thinking
there's a mod that has movie tickets in it, and one spawns boosters containing all kinds of cards
like, Jokers, Planets, Spectrals, etc.
would i have to patch that, so they can be pulled from those?
Im getting this error message while trying to install cryptid. Any ideas on a fix?
if i were to add this code where would i put it
OMG IT WORKS!
it was surprisingly easy to do, bless steamodded
"boy i sure wish there was a better social media than twitter"
the chill bluesky:
lmao real (this is a reference to life is strange but can sure be bluesky too)
is that a retexture of jimbo or your own joker
that is just jimbo maybe give it a slightly different amount unless it being 4 mult specifically is very important to the reference
if you deem so
that sounded more like a command then a suggestion
<@&1133519078540185692>
thank you for your service

humm, getting this message when opening one of my new booster packs
the line being referenced has something to do with pools
code
...how is this a gradient
it isnt
gradients are animated otherwise
the gradient code is handled elsewhere
dang.
for custom gradient do SMODS.Gradient
