#đ»ă»modding-dev
1 messages · Page 88 of 1
in short: https://www.lua.org/manual/5.4/
in long: nobody here can help you if you barely know the language you're coding in and struggle to follow the help you're given
you think that's bad, well lucky cat aint allowed in until a lucky card exists!
so real
Does anyone know how to make a consumable open a pack?
now what happened here
The stupid way is to create a tag that opens the pack
Thereâs probably a direct way but also the game might not be prepared to swap to the pack state from any other arbitrary state
Hence why tags wait to open at a state that makes sense
Iâm gonna guess a missing comma or somesuch the line before
Honesy I thibk this is my favourite image in this channel
should the comma go here? I mean I tried it and got the same error.
No
ok
am i cooking with the art
Iâd be surprised if there wasnât already one tbh
Itâs a bit empty
Also not sure about the tooltip being âRuby Gem Slotâ instead of âRuby â or âRuby Gemstoneâ or whatever
I've tried deleting the entire check_for_unlock function but then it still does the error
Either go and study some mods that do work, or go and learn how to code
not finished, just seeing what i have in-game
then your art cooking-ness is yet to be determined
tooltip is right
I think the red in the background of the text could do with being a different shade, itâs all very very red for me
Im out of town and need some help. Can anyone find the file for the suits and ranks of cards so I can make some custom ones? I need to know what the base looks like so I can follow the style
can only be done cleanly outside of a round
takes a lot more work if you already have cards in G.play
ok
No seriously, I genuinely don't know where to start, it's just an equals symbol
what is just an equals symbol?
i guarantee there's something 5 lines up that easily explains the problem
Hmm... so where's the culprit?
Its not in a table
why is my code not working? the devious close bracket:
i may be stupid
Right of what
label name
I mean I donât think it sounds good
âRuby Gem Slotâ to me sounds like a Slot that can only take Ruby Gems
And the Slot itself grants an ability
Rather than a Gem Slot with a Ruby Gem granting an ability
still saying there's something wrong with this equals?
hmmm
is there another devious close bracket again
Missing comma at the very least
Why canât it just be âRubyâ
The card already says you need a Gem Slot
I don't see where it would be though
Before loc_vars
Ah, maybe it wasnât the comma
I thought everything was inside a table
Or maybe there are mismatched brackets again
this bracket should be not there
if it works how i think it works, i would name it ruby slot, and the gemstone should be in the description or something
I disagree because itâs the Ruby in the Slot that grants the effect, and it doesnât seem like Slots can only receive a specific type of Gemstone
the tooltip saying "Ruby Gem Slot" is like if the tooltip for a joker said "Holographic Card Edition Slot" instead of "Holographic"
hmm
???
i'll shorten it to just the gem
you know that red scary bracket you deleted way earlier
try putting that one back
now what?
config = { extra = {slots = 2}}
that's how you're meant to structure a config
config = { extra = 2 } works fine too
how about you read the error and try and solve the problem without any help
okay
please note that asking the people here to basically do everything for you is not an effective way to learn how to mod balatro, especially since there are like 5 people who are all saying different things every time
okay
it works! all I needed to do was add .slots to the end of G.jokers.config.card_limit
hooray!
yippee!
Genuine question: How do I make something spawn a spectral card when blind is selected?
and how do I make a joker reduce hand size
look at jokers that do that already (or ones that add handsize and just do the oppeside of that)
NLM got a joker that does that :D
ok
i'm lost
I've got the -1 hand size working, but I can't seem to make heads or tails of the spectral card creating.
hmm
hi! sorry to ask, but im not sure what exactly is going wrong with this custom poker hand im trying to make
Maybe it's case-sensitive? try "tma_DeadMan"
Oh wait
your key is deadman but below you call it deadhand?
yeah--
it was working a while back but something broke
its the poker hand part
or, is that not how it works? jsdhfksdfhj
Idk, never coded a poker hand.
fair,,,
Also sorry for the question but @wintry solar can Steamodded Enhancements be configured to never show up randomly?
how do i make a shader for an edition?
@languid mirage
Or also Eremel
I know they know
Other people might know
There might be a tutorial by now
i just need a purpley thing and like a broken thing
Or an example
In Steamodded
But shaders are math
Personally I think the math is the easy part and knowing what math to write is the hard part
But I reckon other people have a different opinion
https://github.com/Steamopollys/Steamodded/tree/main/example_mods/Mods/EditionExamples
And, personally, I've stayed away from shaders because they absolutely just don't click for me, it doesn't feel like the same kind of logic you use to program most code.
What do you struggle with?
I mean I donât know shaders either
I donât think the language Love2D uses for shaders is necessarily helpful
Since itâs like a modification of an outdated shader language
But outside of the language it really just seems like math
Except the math is describing how something looks so you need to know what equations describe what you want the shader to look like
(Which might incur additional programming, like defining a Particle class for a Particle shader)
But mostly: 1) knowing the description of what you want; and 2) writing the mathematics of it
Most programming languages, even if I don't know the language beforehand, I can read through and get a pretty good understanding of what's going on, like if stuff is variables, classes, tables, all that, but with shaders, and probably graphical code in general, it's just a lot harder to intrinsically understand.
I don't know much about shaders but I did build a shader watcher into DebugPlus's dev branch to help with develo0pment
Again I think thatâs because Love2D uses a variation of an outdated shader language
I mean I was able to understand some basics at a glance, but the shader as a whole I didn't quite get
So at least when I look up references
The references donât look like the language
Because theyâre either for the original, unmodified language or for the update
And not for whatever Love2D has baked in
IIRC, itâs a language with simple basic structures
It has vectors, whose entries you access in quirky ways
modification of a version from 2006 actually
Floats and numbers
And some shader parameters
I think those are the classes I remember
This is basically it, it's the differences between knowing words in a dictionary and knowing the grammar to use them in.
Itâs quirky because besides accessing entries 1 through whatever you can use specific symbols which mean specific numbers
you can read about the modifications to GLSL that love made here btw
https://love2d.org/wiki/love.graphics.newShader#Shader_Language
Like vec.x is the first coordinate
As is vec.u I think
And I think thereâs a third one too
there's x, y, z, w and r, g, b, a and also a third one iirc yeah
Iâve read that page months ago and it still seems quirky and esoteric and just increase the mental load when I try to translate from the original language or the updated original language to Love2Dâs
man... now i gotta learn shaders... i just wanted a purple......
iirc crytptid has a purply shader
cryptid save me
Eremel had perception-adjusted monochromatic shaders for Ortalab I think
And stupid made the Blueprint shader for the Blueprint mod
So again I think they can help
ill just do astral
I think this should be especially useful since the perception adjustment makes it look much better
Someone had made a phantom shader
Either stupid or
Whoever made the active items and
A bunch of vouchers
https://github.com/Kyiranes/vivid-stasis-balatro
my movator on here resets on any discard, even non-player discards
How do I make it only reset on player discard.
Betmma?
I think itâs easier if you send the relevant excerpt directly
only reason I'm not is because I'm on my phone
I think Phantom has some fading https://github.com/betmma/my_balatro_mods/blob/main/Betmma_Vouchers/shaders/phantom.fs
some mods about game Balatro. Use Steamodded (https://github.com/Steamopollys/Steamodded) to load them. - betmma/my_balatro_mods
Example #1225831216939536394 message
And here animated #1225831216939536394 message
Yeah Iâm pretty sure it respects in_pool properly
A common error is to define but not use the variable.```
```SMODS.Shader{
key = "CursedE",
path = "CursedEdition.fs",
}
SMODS.Edition{
--0.75X mult
key = "Cursed",
shader = "CursedE",
loc_txt = {
name = "Cursed!",
label = "Cursed!",
text = {"{X:mult,C:white} X0.75{} mult"}
},
unlocked = true,
discovered = true,
config = {
x_mult = 0.75
}
}``` i font think its working
Hmmm⊠the base game doesnât really track a pool of Enhancements so itâd need to have been added manually
Maybe the key is incorrect
whick key
Actually rereading the error maybe I donât know what Iâm talking about
Take it from me oh wise fox of the shaders
i directly copied astral shader TO LEARN not to copy
Iâm pretty sure the game uses pools for enhancements, it just adds them all regardless
No some effects manually iterate over Enhancements
Like uhhh Familiar
And the other Spectrals
Thereâs an âif not m_stoneâ
So Steamodded would need to modify those instances
Otherwise you could generate them from Familiar and the other Spectrals
Or whatever else
I might have patched them, I donât remember
(Itâs probably not written like this since it needs to be a comparison but you get what I mean)
I can look properly tomorrow, but itâs a simple patch wherever it needs to go
is there like a card.to_string() function?
why would you want such a thing
I'm making a joker that tells you the top card of your deck
Canât you have it just flip the top card instead?
you could probably hardcode the id number and name but i think there might be a really complex way of doing it somewhere
how do i fix this... i cant even learn shader... shader hates me...
Another one :P
Also doesnât Misprint do it
this is not giving me hope for making my own shader if i cant even load one that works
You can probably look at how Misprint gets the code for the card
Thereâs a localization function which can probably translate the name
High Card mod does something similar but it just shows the whole deck
The Homestuck mod showed the top three cards in a tooltip
An older mod showed shrunk down versions of the top three cards
Those are the four implementations I know of
is this card able to generate
because me and another person have had issues finding this card
This is probably the most relevant part for what @split creek asked
thanks
It looks like it should be but you can change Steamoddedâs print level and have the debug screen open to see if itâs loaded
?
It might be more useful to see if you can find where card tooltips are generated to see how it generates the name, because the actual usage of localize is probably hidden there, but the tooltips might be difficult to read
??
how?
You can change Steamoddedâs print level in the options in-game
The debugger is in a folder inside your Steamodded installation and you can run it, I think just calling the Python script from the terminal?
I'm just using the misprint implementation for now
Also, is it possible to get the base chips of a playing card?
card.ability.chips?
that might be it
you probably want to use card.base.suit and card.base.value like steamodded does btw https://github.com/Steamopollys/Steamodded/blob/main/core/utils.lua#L272
I remember when people found out that about Misprint
Woe be me who read Misprintâs tooltip code and completely ignored the secret
alas, poor Victin
how do i fix shader
random end and missing } too easy
calculate function in curly brackets?
ohhh
missing end as well
missing a } for thwe return
wouldnt the handTable = {} in calculate clear handTable every time it calculates?
good point
i need to clear it after round ends though
ill worry about it when this works
ik you mean key value pairs
but
im trying to make it so when I play a new hand, it makes that new hand the hand the card wants
I will eventually also display this hand for ease of use sake
but
how do i keep track of this hand
set it as a value in config?
well its not a consistent hand
also on another thing, in your loc_txt, i think you are missing a {} after #1#
the person has to play it
@weary jungle not necessary
does it go after or before
after
yea
gotchaaa
just so that Mult doesnt get colored too
its not exactly a requirement just like a styling guide thingy
i am still waiting for help with this...
did i bungle this
maybe you need to add your mod prefix?
hmm....
id put {C:chips}+#1# {} chips per unplayed hands
balatro style is more like
per {C:attention}unplayed{} hand```
but liek otherwise nah
fair enough
yeah something like that!
I would add the + though for the 40 but like yeah radical
i dont, quite get the ability but neat
If we are going by balatro, this is banner
also to make it easier, maybe make it per unplayed hand type
ooh true
thats... not the card idea
its so braindead easy
is it like full house 4oak?
NO
nono its like
or opposite of banner
!!!
at end of round, gains chips for each unused hand
not that either!
wait huh?
opposite banner?
,,,????
yea
also yeah thats right
its banner but with hands instead of discards
you are not making this any easier
oh gotcha
ohhhh
but then in that case
Nurse fully functions
i am now really confused, i changed the shader key in the edition but the error didnt change?
then yeah the more balatro style is
each remaining {C:attention}hand{}```
radical
hm,,,
...
you okay?
hm,,
cryptid might be wierd or something
how should i do it here?
i think thats already good
i would do it like
C:attention}poker hand{} hasn't
been played this round```
but thats also good!
conveys all it needs to
right
owned
put it under config next to mult?
jsdhskdfjhsdf
if you want to make a variable for a joker
its like mostly advised to have it in
config = {extra = {*insert variable* = value }}
or something
why is both shader refrences i have all structured wierdly
and then accessing it is like
card.ability.extra.variable
is it bad that i dont use config at all
i wonder if i could emplace a joker in the consumable area and have it act normally
typo..
instead of writing config, replace it with card.ability, i believe
woops
thats how you usually access the variables skdfjhskdfjh
?
card.ability.extra.handTable[hand], hand is nil
when i click play it crashes
you need to use context.scoring_name
should i use config? i think im setting myself up for failure
im just plugging in numbers
when selecting blind
when you send images, can you show more to the right, so that people can see the line numbers?
i think its easier if it looks like the right
i think the calculate code block should be in a if statement for context
like this
but its context.joker_main i think
--Code
end```
IT WORKS
nvm
it doesnt work after the second hand
we didnt it !!!!
are you
playing the same hand twice?
i can, understand why it wouldnt work across rounds
you may have to clear the table upon end of round
but??? huh????
add a ```for k, v in pairs(card.ability.extra.handTable)
print(k, v)
end
we NEED info
lets go
whre
after if context.jokermain
i forgot a do
is there a way to have an option to send a card to the consumables area from a booster pack?
print(k, v)
end
try looking in the code of alchemicals?
check code packs from cryptid, they do that
terminal iirc
do you have debug +
yea
set your setting
wha
now correct me if im wrong, but i think its this
not quite
whatr
when you open balatro, do you get a terminal thing?
no
hey could someone help me with something wrong with one of my mods
like this?
ok it should be in there
itd look like this
press /
nothing
press / in balatro?
there it is
what does it say!
ok
so at first there wasnt anything in it, then it added pair in
the printing is a hand behind
the printing happens after you play a hand right?
do you know where? or am i gonna have to search around a bit
how to do that actually...?
probably something with hooking end_round
i dont think you can do that
:(
I can?!
so id be if context.end_of_round i think
I think you forgot to put them in if statements
This
Its important
Also you have 2 different times, context.joker_main and context.end_of_round
gotcha
Or you should have
???
sorry wrong pic
ARD.ABILITY
BRUH
IT WORKS
blueprint doesnt copy it properly
đ
how do i make blueprint... work
đ
blueprint checks the table, and the table doesnt work because it was already indexed
how am i supposed to make good pixel art đ
like do the scoring in joker_main, but uptdafe handTypes in context.after?
practice
also should i make my cards in 1x then scale them up to 2x?
yes
yeah i can do that
what program do you use
searched on youtube for a good free pixel art program and found graphicsgale
aseprite is goofd
aseprite is paid
not if you build it yourself
oh you can build it yourself
this is a REAL pixel art i made
guess what it is
well time to compile aseprite
(this was 4 years ago)
dont stress if you feel you are bad, you will get better with time
this is an animation i made over 4 years ago đ
do you like the shift up because i didnt have any more space
what is difference between human discard and boss discard, thats the first question\
That'd work if it was {extra = {Curse = 5}} for the config.
It is a global.
i figured it out
also, is there a variable that shows how many dollars = 1 intrest
like normally its 5$ = 1 intrest
trying to make my mod more compatible
Are packs with both consumables and jokers possible?
return { vars = {ALL THE VARS} }
In loc_vars
i di d it!!!
set_ability = function(self, card, initial, delay_sprites)
card:set_edition("e_negative")
end,
unlocked = true,
discovered = true,
loc_txt = {
name = "NAME",
text = {"DESC"}
},
loc_vars = function(self, info_queue, card)
return {vars = {}}
end,
config = {extra = {}},
atlas = "runes",
set = "Runes",
name = "runes-NAME",
key = "name",
pos = {x = 0, y = 0},
cost = 4,
order = 1,
can_use = function(self, card)
CONDITION FOR USING
end,
use = function(self, card, area, copier)
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function()
ON USE
return true end }))
end,
}```is anything wrong with this base for consumables?
im going to sleep, ping me for above and ill see it when i wake up
oh wow
its a new dat
ok bye
that took long but i'm done
Is adding new ranks something that's documented somewhere, or is that relatively unexplored territory?
You can do it
I've never done it and don't know any mods that do it off the top of my head
but SMODS has the classes for it
Okay, so I just need to scour a little bit more for that code
Oh cool, Thank you!
Try using context.pre_discard and context.hook
For reference, this is the vanilla code for Burnt Joker:
function Card:calculate_joker(context)
-- [...]
elseif context.pre_discard then
if self.ability.name == 'Burnt Joker' and G.GAME.current_round.discards_used <= 0 and not context.hook then
local text,disp_text = G.FUNCS.get_poker_hand_info(G.hand.highlighted)
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 = ''})
end
-- [...]
end
is there a way to make a card act like both a consumable and a joker?
With all the mods doing booster pack count modifications I really wish there was a cleaner way to do it
hey! trying to code something that has a 1 in 4 chance to NOT be destroyed
meaning 3 in 4 to be
heres the code; it isnt destroying anything, i've played 10 total cards with this enhancement and they didnt destroy
shatter chance in this is 4
is there a way to make a joker unsellable and/or unable to be destroyed?
whenever its spawned just put a sticker on it
card.ability.eternal = true
anywhere
is that like an integrated ability or something
or what
generally set ability though
or add to deck
maybe add to deck yeah
ok no set ability
đ
is there somehwere where i can see an example or?
insane seed
i mean it's documented on smods
oooh, ty
i think it was discovered and unlocked
i dont know why it says that, i have it in my joker and it works
yeah but if its unsupported its not going to give out an error it just wont do anything
what are the upsides to summoning a boss?
but it does do it
call the function for it iirc
if you defeat it you get a purified curse
but why make it harder to do đ€š
what does that mena
erm
its a thing in my mod
curses are bad
purified curses are good
ok got it
doesnt it make more sense to call them blessings
or are purified curses like regular curses but converted
set_ability = function(self, card, initial, delay_sprites)
card:set_edition("e_negative")
end,
unlocked = true,
discovered = true,
loc_txt = {
name = "NAME",
text = {"DESC"}
},
loc_vars = function(self, info_queue, card)
return {vars = {}}
end,
config = {extra = {}},
atlas = "runes",
set = "Runes",
name = "runes-NAME",
key = "name",
pos = {x = 0, y = 0},
cost = 4,
order = 1,
can_use = function(self, card)
CONDITION FOR USING
end,
use = function(self, card, area, copier)
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function()
ON USE
return true end }))
end,
}``` I made this template to help me make runes easier, is there anything wrong/i should change?
if i want cryptid support, is there anything i have to do, or is it good straight out of the box
Im making consumables, is there anything that needs to be done for code cards or something?
No
good
how do sprites work
they are
confusing
i want to make a sprite appear in the middle of the screen when i use this spectral
unfortunately i do not know how
Any Steammodded devs/contributors active rn? Found a bug relating to the implementation of DeckSkins that needs fixing.
Line 58 in loader.lua detects instances of SMODS.DeckSkin in the code and identifies it as SMODS.Deck, and falsely flags the mod as outdated. This causes serious problems for mods that use prefixes, as all the objects that use prefixes get their prefixes removed and their keys change
outdated = { pattern = { 'SMODS%.INIT', 'SMODS%.Deck' } },
I wanna implement a fix for this locally for my own purposes for the time being until it gets fixed but im not sure how exactly
adding a curly bracket after Deck fixes it but that seems a bit hacky
is there like a template to coding balala jonklerss
i have minimal Coding experience but have many ideas
I think adding a SMODS%.( and a SMODS%.{ should cover most cases of the outdated stuff if you think thatâd work?
yeah I changed it to detect 'SMODS%.Deck{' and that fixed it
just feels like such a simple fix that there might be a better way to do it but i mean hey
i guess it works
im writing an issue page for this on the github page rn
any mod that uses a traditional function call wouldn't be detected by this
waow
yeah i was thinking that wouldnt be good for that
regardless you could just do SMODS%.Deck[{(]
oh wait no
SMODS%.Deck[{\(]
fuck discord
yeah i dunno the pattern syntax and stuff so i had no idea what to put for that
thanks
it's either this or SMODS%.Deck[{%(]
might also want to match optional whitespace
true
probably safer anyways
u right
i don't have too much regex experience 
I'm not sure trying to target SMODS.Deck{ or SMODS.Deck({ will work since 0.9.8 API declaration is SMODS.Deck:new(
I'm genuinely lost, I just can't see it
if you're gonna show a screenshot, at least include the linenumbers...
ok
I may be forgor
you forgot a comma
I mean, the error message tells you what line is wrong
oh yeah
just... try and solve it on your own next time
I did try, but I just couldn't make heads or tails of it
also I added a comma to line 78 (the one the error said was bad) and it still gives the same error
I removed this entire part and it still says the same thing; maybe it isn't line 78 then
did some tinkering and got it to work! had to copy some code off of NLM but I'm sure the creator will be fine with that.
also, I kinda want getting a second dream catcher to reduce hand size by 2, like how ectoplasm does
Trying to get multiples of a single joker to work, but it doesn't seem to be doing anything
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''elseif not (G.GAME.used_jokers[v.key] and not next(find_joker("Showman"))) and'''
position = 'at'
match_indent = true
payload = '''elseif not (G.GAME.used_jokers[v.key] and (not next(find_joker("Showman")) or not v.ability.name == "mtg-relentlessrats")) and'''```
any thoughts?
you want to check the key, not the name
so would it be v.key == "mtg-relentlessrats"?
j_mtg_relentlessrats, assuming mtg is your mod prefix and relentlessrats is your defined key in the joker
ok ok
Can't you use in_pool to allow your joker to allow itself to have duplicates?
I assume that's what this injection is meant to do.
So just in_pool = true inside of the joker object?
It's a function.
Not a boolean
Something like this iirc?
in_pool = function(self)
return true, { allow_duplicates = true }
end
How do I make unlock conditions for Jokers? I want a certain joker to be unlocked if you have 10 joker slots at once.
You're a lifesaver
Regarding this same joker, I want the duplicates in the shop to have negative, and this doesn't seem to be doing anything
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if card.ability.consumeable and not skip_materialize then card:start_materialize() end"
position = "after"
payload = '''
if next(find_joker("mtg-relentlessrats")) and card.ability.name == "mtg-relentlessrats" then
card:set_edition("e_negative", true, nil, true)
end
'''
match_indent = true```
ok
Didn't know smods has a find_card function
just read the documentation, it's to prevent mod name conflicts
It uses the key instead of the name
oh it doesn't really notice cause my key and name are the same
yep it usually doesn't matter, but names aren't always without collision (should you happen to specify one) and this version is consistent across modded and vanilla objects
how do i add a description with the name of the things
can you pass an edition into loc_vars
Like the tooltip
yep
You can do something like this https://github.com/WilsontheWolf/JamMod/blob/master/Jokers.lua#L126
With the key you want
fire
Would be nice if the text was more fitting with Balatro's, there are a lot of mismatches in this picture (black xmult, mult not capitalized etc..)
is there a dictionary or glossary on where to find the variables and what each one does
What variables
Steamodded has a wiki
The scoring calculation has been broken down here and there
Other things not specifically
Count how many Jokers you have
Ok so I was looking for how to destroy a Heart card and add that to Mult X value
Like an one time effect?
what's the doohickey for that
I want it to gain $3 for every joker you have at the end of the round
You can manipulate the Joker CardArea directly. A good in-game reference might be Abstract Joker.
like vampire where it's added, so the Mult X goes up
Most of the time you define your own variables
Thereâs like a small number of built-in ones
So you track the current value yourself
ok
Note that it needs to go inside the extra table
I can't seem to find the code for that in the code...
what is the extra tables
What program do you use to write?
Itâs a table you can add to the ability table
Try code searching the gameâs code for âabstractâ
ok
where does one find these?
If you want a reference you can check the Steamodded wiki or some mod that adds Jokers
when i open my runes section and go back out, the other consumables dont show until all of the consumables do the negative animation
sounds like a blocoking event
the what on the huh?
exit_func in the uibox you made
i did not make a uibox
wouldnt that make it so everytime you find it naturally itd also be instant?
i think that'd be better since it signifies that the negative is from itself and not a natural source
now it waits for the sound effect
which would be silent = true, but then itd be really hard to tell that runes are negative
I mean in the collection they probab;y should be silent
how do i do things only in the collection?
you should be able to check if card.area.config.collection is true(?)
if it exists, its true right
in this case yes
how do you have a ui for your collection without making a ui
SMODS does it for you
consumable type?
does it?
yeah
convenient
trust me, if i was supposed to make a ui i would not have made mods
card:set_edition("e_negative", card.area.config.collection, card.area.config.collection) This would work right?
table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button) i still dont understand this (Escape exit example mod)
i know its a tree, but there is like no labeling
yes
i dont know whats waht
the objects have a type on them
if your familar with the JS dom contents.nodes[1].nodes[1].nodes[1].nodes is like element.children[0].children[0].children[0].children
i can deduce that contents.nodes[1].nodes[1].nodes[1].nodes is the escape menu, but i dont know where any other ui element is
aw man
they might not have the area when the edition is set yet then
im going to add and true and see if that works
man the amount of times I would've been able to make use of a HTML-like DOM inspector
I've thought of making one bhut I don't have the determination
nope...
maybe if I end up writing a good text system for DebugPlus I can see it happening
maybve
it sounds like an absolutely pain in the ass and incredibly complex so I don't blame you lol
i do not know what dom is, so this is funny
dom is how javascript interacts with webpages
yea inspect all the doms i wont stop you
the DOM is basically the HTML/CSS/JS equivalent of the UI tree in balatro (?)
dom is how js interacts with html
i am a print() lover
but it works very similar to how balatro represents it's ui
it also has a super handy debugger
when are you going to make a sub inspector !!
ohhhh trhe html thingy
I won't đ
aka the faking google searches menu
Balatro's UI could be represented in a similar system
but it would have to be made from scratch
and I don't want to make an baaltro ui inspecter with the balatro ui
sounds like pain
I think the dev tools are written with html and js
make the ui inspector with a HTML-like DOM inspector
well now I need to make an HTML like system in love2d
making a card like ride the bus, but it increases only on face card use
ride the limo
but I have plans to make a semi-competent text system for DebugPlus's console
so something like that might make that bareable
i want to execute comands in debug+
okay switch to the dev branch
just like printing values or something
also is there a way to restart balatro without holding m? i always acidentally hold m for too long and type mmmmmmm
I just go to my terminal ctrl + c it then up and enter
I made a shortcut that automatically closes and restarts the game so I only have to click a single button
on windows
yea
maybe like control M
you can use smods keybind api and just call the restart function
I don't like that function its cursed and has weird behvaiours with a couple things
mostly screws up my terminal
we would have a better way if lovely didn't implode
ok quick swap mods to make debug + addons for myself
resets every hand
debug + is lovely??? no1!!!!
i dont know where restart function is....
So is SMODS, what's your point?
its different....
you have to only use lua even if you are more comfortable with lovely and lovely gives you more freedom!!!!
(jokr)
I don't need any of the api's smods uses and I need to modfiy the middle of a few functions as well as some stuff thats run before smods loads mods
delete debug plus and start it all over again đ
also where is the restart function
SMODS.restart_game() I think
Does anyone know the correct way to go about reducing the ranks of cards when using steamodded?
It seems like the ranks store which rank is next, but not which one is previous
I think you cna go through SMODS.rank and theres a property for next(?)
so find the one with yours as next
using my debug mod to debug the debug mod
I use DebugPlus to develop DebugPlus all the time
im calling my mod debugplusplus even though its more like debug plus|
(not even a full letter of plus)
what are you even doing extra?
ok fair
how do i control
if controller.held_keys["control"] then
is it like command or something
just use SMODS.Keybind
it would be lctrl or rctrl iirc
can i just write "m", "rctrl" in key pressed?
you can set a secondary key
look at the example mod
that uses keybinds
oh yeah
I wouldn't know I do keybinds manually cause I'm not a SMODS mod
no thats @gaunt thistle
i dont think you are a SMODS mod, because you are lovely
i dont think you are a SMODS mod, because you are a cursed script that modifes the executable directly
i dont think you are a SMODS mod, because i can see all of your uiboxes
thank
yw
still need help
i dont know why its resetting every hand
Regarding this, how difficult do you think it would be for me to modify the ranks to include the previous rank?
idk I think technically you can have 2 diffwerent ranks with the same next so how do you figure out the previous
diffwent
:(
the card was working entirely fine until i added the hook check
is that check wrong?
I would just hardcode it in
idk probably bring it up in #1209564621644505158
key = "RestBalatro",
key_pressed = "m",
held_keys = {'lctrl'},
action = function(controller)
if G.STAGE == G.STAGES.RUN then
if not (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.PLANET_PACK or G.STATE ==
G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.STANDARD_PACK or G.STATE == G.STATES.BUFFOON_PACK or
G.STATE == G.STATES.SMODS_BOOSTER_OPENED) then
save_run()
end
compress_and_save(G.SETTINGS.profile .. '/' .. 'debugsave' .. "0" .. '.jkr', G.ARGS.save_run)
log("Saved to slot 0")
end
delay(0.5)
SMODS.restart_game()
end
}
```this is just not restarting
it closes balstro but doesnt reopen it
does anyone know how to check if a card has a modded edition?
yea
wait i think i got an idea. ill report back
nvm it didnt work
checking if edition == "key" doesnt work
do you have the edition object?
cause I think they have a mod key if its from a mod
its declared as SMODS.Edition so yeah
and its key is e_prefix_name
i can get the edition to apply and work. Im just checking if a joker has that edition with another joker and nothing will run
Yeah if you have the center, if it's from a mod it has a mod key on the cetner
These 2 were the examples
well this didnt work either
for i, joker in ipairs(G.jokers) do
if joker.edition.name == 'e_jojo_misfortune' then
joker.set_edition(joker)
break
end
end
idk if im misunderstanding what your saying
what are you trying to do?
more ignoring
i want to remove the edition if it is on the current joker
SMODS.Ranks["2"].previous = { }
SMODS.Ranks["3"].previous = { "2" }
SMODS.Ranks["4"].previous = { "3" }
SMODS.Ranks["5"].previous = { "4" }
SMODS.Ranks["6"].previous = { "5" }
SMODS.Ranks["7"].previous = { "6" }
SMODS.Ranks["8"].previous = { "7" }
SMODS.Ranks["9"].previous = { "8" }
SMODS.Ranks["10"].previous = { "9" }
SMODS.Ranks["Jack"].previous = { "10" }
SMODS.Ranks["Queen"].previous = { "Jack" }
SMODS.Ranks["King"].previous = { "Queen" }
SMODS.Ranks["Ace"].previous = { "King" }
end```
The solution
what about modded ranks?
That should work for clearing but the key is card.edition.key
don't have enough context to sauy anything
I tried to make it work generally, but I couldn't figure it out :(
This will have to do for now
Oh I didn't realize next was a table
Probably something like lua for k, v in pairs(SMODS.Ranks) do for _, r in ipairs(v.next) do local rank = SMODS.Ranks[r] if not rank.previous then rank.previous = {} end table.insert(rank.previous, v.key) end end would work
Whats the difference between pairs and ipairs?
Cause I was trying to do this but couldn't get it quite right
pairs goes over every element in the table where ipairs only goes over numbered ones (for array like tables). See https://www.lua.org/manual/5.4/manual.html#pdf-ipairs and https://www.lua.org/manual/5.4/manual.html#pdf-pairs
ooohhh
that makes a lot of sense
I was using ipairs for the first line, so it wasn't actually doing any iterating
Does anyone know how Suit objects are stored in SMODS.Suits? I'm trying to make a playing card of a custom suit, and I don't know how they're indexed
Grim can randomly select the custom suit, so I know that it's in that table
could look at the base game and see how those are stored
Can I make a secret hand like royal flush
a table with the index using the suit's key (EX: 'Spades', 'bunc_Fleurons') iirc and the value being the actual SMODS.Suit object itself
Grim's generation involved a special implementation inside pseudorandom_element (SMODS's lovely patch to make it possible, the implementation can be viewed from lovely dump) that iterate through SMODS.Suits's own object buffer to make it a proper list + checking in_pool
@stray warren I think the preceding discussion about SMODS.Rank might be helpful
Oh cool, thank you. I was having that same issue with the nexts being identical with the Ace and the Apostle
Is anyone interested in a making a mod that reskins face cards to monstergirls? I have a copy of Aseprite
sprite modding is pretty simple iirc you don't need much coding knowledge
i don't remember which mod is used for deck skins these days though
malverk? deckskinsplus? smods? who knows !
Smods has it built in but I believe deckskins refactored to use it so you can still use the old deckskins format
How do i see the current ante
is it G.GAME.round_resets.blind_ante
why dont i check actually
finally, after like a day of messing with patches,,,
ive got it in a semi-usable state
just ignore the fact that it doesnt work for returning variables for some reason
shouldn't need patches for this
if there was an easier way to do this im going to actually explode
idk globals or something
,,,was there an easier way to make consumables that act like jokers?
i did something similar and just spawned a joker
sdkfjhsdkfjh
SMODS.eval_this I think idk
well yeah but thats not as fun
but im lazy
i wouldn't know i don't do much smods stuff
fair fair
because it didn't seem necessary to use a patch ?
shouldn't it be X1.5
but like apparently there seems to be this whole thing about how cards only evaluate when in the joker area
not to mention contexts being a pain
why dont you keep on use, toggle a global variable, only allow consumable to be used if not variable and then do things?
yea im just making all of them rn
im not that caring of formatting rn
sdkfjhsdfkjh
thats fair
is that a good sdkfjhsdfkjh or a bad sdkfjhsdfkjh
