#š»ć»modding-dev
1 messages Ā· Page 370 of 1
What is the default shop_rate of Tarots and Planets?
vanilla quirk
^
yeah
ok
Did SMODS overwrite Card:open?
Edit: a quick check reveals they did not.
how does one turn a joker into an eternal joker
Set id for input and all be fine
card:add_sticker("eternal", true)
than you
huh?
why would I respond to a random waving dm, if you have a problem and want my help just message me the full details and if I have time I'll have a look but if not don't go bitching about it to everyone else
for fuck sake it was the id all along
well im glad my fix wasnt the reason your ui broke š
also, that reminds me of the cheat uis ngl
idk if thats intentional, but thats neat
No and yes.
The original UI was more minimalistic
But I decided to leave this one because it looked neater.
You can make the background invisible.
this is what i meant btw :p
thats true
how do i hook to draw_card again
https://forums.kleientertainment.com/forums/topic/129557-tutorial-function-hooking-and-you/ i suggest reading this so you know how to hook to pretty much everything :p
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
Use SMODS.Drawstep instead
but also, ^ what sdm said if you are doing what i think you are
trying to get this joker working
i need the tally to increment every time a card is drawn from the deck, someone gave a solution with hooking draw_card up but i don't know what parameters to pass to draw_card
Can someone remind me again what is the target value for patching smods files?
Use context.hand_drawn
I had a different approach, this is for each drawn card.
bump
what variable do i use to get the table of drawn cards
they also wrote the hook, you can look at that
but like I said, use hand_drawn
i also told u this : (
Sorry, I mean I was avtually new here but then again.
I don't know how you work in general
can I just tell you in DMs?
or here?
also I didn't mean to be "b***hing" about.
I am new alright?
but now I need to take this into note.
hey, is there a way to update this litol numba'?
oh yeah you did, my bad
G.GAME.blind.chips
unsure then
multiplayer mod updates that number
Alright eremel I sent you the DM in FULL detail.
bump
just like what you wanted me to do.
'=[SMODS _ "src/utils.lua"]'
would i have to process context.hand_drawn and context.other_drawn seperately?
yes
lovely-injector has crashed:
panicked at crates\lovely-core\src\lib.rs:204:45:
called `Result::unwrap()` on an `Err` value: Os { code: 123, kind: InvalidFilename}
š¤ are you sure you have the correct target
is your lovely updated
Ah crap, I haven't.
My DriveSpace Joker does mess with the value.
I am struggling to work out where the data about the cards in the main section of the shop are, can someone help me please
how do i:
- check the current stake
- check what deck the player is currently using?
Other drawn is during packs fyi
Is there a way to increase the amount of shop slots?
Overstock voucher does it
Iād look in card:apply_to_run() for that
change_shop_size(number)
it adds the num to shop size btw
yeah that's the intended behaviour
yo can someone link me to the post in #1209506514763522108 for making your first mod? thanks :D
thank you
Good schmorning chat
i would assume the icon path should be from the mod root, so is the icon in the main folder for the mod?
e.g: Balatro/Mods/<yourmod>/bearo_icon.png
no but most mods that I've seen that have custom icons have them in their assets and not in the mod root?
Remove the = on the top line
Youāre redefining the atlas function here
OH
ALL NIGHTER BRAIN
THANKS
that works
awesome
hi dilly
My goat bepis
i managed to add sorting, and name searching to the inventory
searching soulfragment, SoulFragment, SOULfragment should all work
Ie 9 rare make 1 legendary
that is if i can think of other fragment ideas lol
i want them to still reference balatro in some ways
They reference balatro in rarity :)
Is there a command to dislay the bounding boxes?
why do my jokers have a sell value of 0, I did add the price value
or keybind
that's part of debug mode right(?)
I thought so but I can't find it
It exist but I don't remember keybind
Hi vic
Hello dilly how are you

I am trying to access the items in the shop, and I am struggling to find where the actual data of what is there, such as the joker/consumable IDs (j_joker, c_mercury etc.), can someone help me please?
card.config.center.key
I am so very tired
But my class was canceled today so I can rest and lounge a little more today
How are you?
I'm doing ok
@shell timber https://github.com/WilsontheWolf/DebugPlus/blob/master/keys.txt it's not here unless I'm unable to perceive it
h?
no it hides everything on top of the background
press a and g
anyone know why global variables (set in G.GAME) could evaluate as nil instead of an integer? i haven't been able to replicate the issue, but crashes are happening to other people when the game uses that variable in a card description. the only mods that both people have installed are talisman and cardsleeves
after checking the lovely dump, said variable is declared normally too which is confusing
which variable in particular?
one thing that could be happening is the serialization/deserialization of G.GAME during a save/load cycle, but that's supposed to just automatically work
one declared by my mod, juggler_count = 0 is all
but when referenced in a card description, it's seen as nil (only in two cases though, and i haven't been able to replicate it)
bump
the only mods shared across both reports of the bug are talisman and cardsleeves which is even stranger
the lovely dump for one of the reports shows that the variable is declared perfectly normally
i know this is looking too far into the future but how would i add modded jokers to am object type
wouldnāt the game crash because itās looking for an object that isnāt loaded
(referring to jokers from mods that arenāt active)
i know people add cases for stuff like this
i mean like, add jokers into an object type AFTER an object type has been stated
i would have to add the balatro-kai jokers to their respective tribes afterwards but
thereās no easy way to do that
because my load order goes tribe, other, consumable, joker, mod-compat
can calc_dollar_bonus use negative numbers?
Your load order is whatever order smods loads stuff in, without looking I would assume object types are loaded first
yeah thatās what i want
the tribes (seperate object types) are loaded first
then i make the ui display a badge that shows which tribe a joker is in
then i load stuff like editions
then consumables
then the modās jokers
then mod compatabilty related stuff
i donāt know if i can just, tell smods to load whatever in whatever order i want
No what Iām saying is it doesnāt matter what āorderā you try to load stuff, smods has an order that it runs through in terms of all the different objects that you cannot alter
ah.
You just tell smods āI would like to create these objects pleaseā and it handles all the rest
so i just cram all my stuff into a single lua
the main lua that is, with all the āassertās
If you want to handle navigating a giant file sure
help. working on return to hand functionality and for some reason the returned card is flipped down and non-functional
all i can figure out is that 'down' doesn't matter. i tried 'up' and it's the same
no i mean, assert all my seperate luas into the main one
Oh yeah
thatās what i usually do
can someone help me i want to create some jokers mod idk where to start
so i want there to be a badge right above the rarity that shows which tribe a joker will be in
am i using context.destroy_card wrong? this code is supposed to delete the leftmost king if there's two in the scoring hand. the xmult triggers properly so i know it's not the tally code
i'm putting it in the main lua because
uh
idk actually
anyone have any clue as to why this is happening?
so, what do i need to know before i start making an entriely new ui thing
Remove king will always be false when this function is called with the destroying context
it's nothing too big, just a small badge
but it's still something ui related
and i'm scared
bump
Be ready to suffer
That's it
how do I check stake stickers for decks
yeah i just figured that out with some testing, any way to stop that or do i have to tally up the kings twice?
even IF all i'm trying to do is add a new badge???
well that doesn't sound reassuring
It's even worse
a new badge is really easy actually if you mean like the rarity badges n stuff
yeah that
yeah hold on a sec
but for the yo-kai tribes
each tribe is a seperate object type and i want them to appear for each joker in said object type
Easiest thing in UI is G.OVERLAY_MENU imo
set_card_type_badge = function(self, card, badges)
badges[#badges + 1] = create_badge(localize('k_localize'), G.C.EDITION, G.C.WHITE, 1.2)
end,
put this in the object like the calculate function
badges[1] replaces the first badge, badges[#badges + 1] adds a new badge (probably)
replace k_localize with whatever you want it to be
how do i do that for existing jokers.
one color is for text, one color is for background
smods.take_ownership()
that one should be on the wiki
that would take so long though
not rly
having to take ownership of all 150 basegame jokers
.
just for a little badge
Store it in the card object instead of a local
why do you need to add a badge to all the vanilla jokers
because
run take_ownership inside a function and get it to iterate through the list and do it to all of them for you
if you plan to do that with other mods as well I would do that
i was about to suggest iteratting through that list and taking_ownership that way, similar to what i do for planets
how would i do that
Find the badge bit in generate ui and add your badges to that table
okay okay i think i might need to clarify on what i want to do more, both for myself and everyone else
so, each joker that's a part of a tribe gets a rarity-type badge denoting which tribe it's a part of.
so what i need to do is patch the badge creation code to allow for that to happen
just have it generate the badge for each joker in the tribe object type
Yeah thatās what I told you how to do
Then go and learn š
Itās possible with a hook but youāll have to rummage through ui tables to do that
the function iterate option is an option if you want to avoid learning
bump.
i guess thatās what iām gonna have to do then
oh boy, time to iterate through every basegame joker
that's because the card is getting sent to the deck first
it is being treated as a card on the deck that you drag around
bit of a hacky solution but what can you do
you need to do your hand stuff before the card is "sent to the deck"
and stop the card from being sent
no no no
besides patching but iām not learning how to do that
you have lists
iterate through the LISTS. i see
yeah
iterate through each object type
the only code that needs to change is the joker you're adding to and the badge you're adding
unless someone is crazy enough to sit my ass down and teach me
Patching is not hard
Take the five minutes to learn it
And save yourself hours of future time
look, iām sorry, but if iām seeing an easier way out then iām taking it
donāt blame me for not wanting to jump through AS many hoops
i have no idea
i stole my first patch from another mod and then figured it out from there
And just look at any toml file in smods
wdym stop the card from being sent? the function i showed leeches off this draw_from_play_to_discard hook
okay so iām weighing the options. itās either i sit my ass down and learn something for once, or i take the lazy way out
you're hooking the function, the original function still happens so the card is still "sent to the deck"
and this is all on me
i think you should patch the original function
...no? it returns out before the old function call
this should only destroy the leftmost king but it destroys all of them
anyone know why global variables (set in G.GAME) could evaluate as nil instead of an integer? i haven't been able to replicate the issue, but crashes are happening to other people when the game uses that variable in a card description. the only mods that both people have installed are talisman and cardsleeves
said var is just juggler_count = 0
well clearly the card is still being sent to the deck so something is certainly up with it
G.GAME is reset at the start of each run
fwiw, the ālazyā way out is a jank solution that might not play as intended with other mods
yeah, that's intended
Where as the patching way shouldnāt cause any issues
but it's being evaluated as nil despite being declared in G.GAME
well, i am concerned about mod compat...
i haven't been able to replicate the issue at all
and when are you evaluating it
for both crashes they're during a run, when a card is hovered over
when does the value get created
Do you have the crash screen?
???
as in, set as a global var
just put a set_ability in the joker and check if G.GAME.juggler_count exists there, if it doesn't, set it to 0
the lovely patch isn't necessary
set_ability runs when the joker is spawned in any capacity so that guarantees the value exists before you hover over it
yeah, neither of them are my screenshots. haven't been able to replicate the issue myself
hmm alright, it's set as a thing for a consumable and i had seen other mods patch so i just went with that
so, where the hell am i going to be patching in new badge
And can you show the juggler code and the patch?
when the juggler consumable is used it increments by 1 and that's it
yeah, one sec
and how do i make sure that the correct badge is set for the correct object type
the guy in rift raft had this issue too and idk how they fixed it
missing's rift card copying only worked for them and nobody else
cause it was a G.something
like, where am i gonna have to patch this into
Card:generate_ui iirc
if you have visual studio, open a workspace with the source code and ctrl + shift + F
lets you search in all files in workspace
should i use the lovely dump of it?
Yes
yeah
while they're on that does anyone know how I can get stake completion for a deck
i need a joker to access that
okay so i found two instances of it
this is the entire patch, i'm on mobile so let me just send the card's file real quick
ik the patch syntax is a bit weird but eh
wait, is it not in card.lua
or am i on the right track here
badges are in G.UIDEF.card_h_popup
this is all
Are they crashing in the collection?
i am in the wrooong place, holy shit
This will crash in the collection
both are crashing upon being hovered on, i haven't ever had this issue before so it's strange
bump, i have no idea why this is wrong
why will this crash in the collection? am i not covering for edge cases right?
You assume G.GAME exists
okay, i'm there
now what do i do
is this the part where we start kicking
and by kicking, i mean hijacking the code
you want to do soemthing like this
ohhh that'd make sense. i thought i covered for that, weird
i have a toml file at the ready
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "AUT.main.background_colour = AUT.main.background_colour or AUT.box_colours and AUT.box_colours[1] or nil"
position = 'before'
match_indent = true
payload = '''
badges[#badges + 1] = ...
'''
You want a unique line a bit lower down than that screenshot
and replace ... for your logic to make the tribe specific badge
what would that be?
i see.
Sorry that was for violet
yeah i found that line
ohh, all good lol
it should be easy to make sure G.GAME exists
this is what my toml looks like right now
you need the header manifest as well
Then just make a function that takes the card object and returns the badge and call it there
wait i'm realizing something
something a bit odd
how is it supossed to know which tribe to assign which badge to
queston: how much lua do i actually need to know to make balatro mods?
or do i supply it with that info myself
i see.
do i also supply it with color info too?
you want a function that does something like this ^ but changes the localize string and color depending on the card
reiterating that each tribe is a seperate object type
so i need to add loc vars to my mod then
for each tribe
i mean you can hard code the string if you dont care about localization
i have something like this for my yugioh types
so how would i hardcode the string
is it as simple as just, "fuck your loc string, we're using my own"
just write "whatever" instead of localize('k_whatever')
no you don't want the function there
does the Creator God let you win the run immediately
there's no creator god, i just put it there for completion
it's only one card and im probably not gonna add it
lol that makes sense though
I'm not even sure if you can do a code to win a run immediately
badges[#badges + 1] = create_tribe_badge(card)
and then in your mods file:
function create_tribe_badge(card)
return create_badge("Brave", G.C.EDITION, G.C.WHITE, 1.2)
end
and you replace the logic in that function to do what you want
excuse me can someone please tell me what im doing wrong
so after that, i would tell it to apply the tribe badge for each tribe
for each joker in each tribe object type
yeah
okay, double checking. is this all my toml should be
imo yes
so now i don't have to look at that ever again.
imo it wasn't THAT hard
idk what all the fuss was about
imo, it was probably a yo-kai.
now what? do i load the toml with an assert?
or does the toml load automatically
no it's loaded automatically as long as it's in the top folder and named lovely.toml OR it's in a lovely folder
okay so i have a lovely folder
code is still a bit barebones and it probably won't do anything important yet because i have yet to make the badge appear for every member of a tribe
you're right, let's see if it actually runs.
even modded jokers
everything has a brave badge though...
yeah you need to check if card is a joker and stuff
might as well flout my own textrue pack for a bit
okay, flouting time is over.
time to actually fix this shit
Yeah nows the time for the logic check
okay. time to put you through the wringer. and probably give you the correct colors too
hex code maybe
is it possible to add the texture of spectral to jokers?
How do you determine whether you're in the shop after a small/big/boss blind? I believe the blind is temporarily unset inside the shop until you hit next round so I don't believe you can check the upcoming blind type when you're in the shop directly
i believe it's as simple as "if it's a joker, then display the badge"
You'd have to add a draw step for this! But yes, you can call to draw the spectral shader on them
Maybe I'm asking a stupid question, can I make variations of a hand type, playing this variation gives different base chips and mult compared to the base hand type, but the variation shares the same upgrade level and which planet to upgrade the hand, so the only difference is the base chip/mult
I know it's easier to just make a bunch of new poker hands for each of them, but if I do so then it should be very hard to build towards a specific poker hand, as all of them now have separate upgrade levels
what the fuck
Oh!! There's a global G.GAME.blind_on_deck
fuck, i kinda lost my groove here
how would i create a random tag?
i had a bit of a ball rolling here and i lost it out on the road
there is a caaaar...
okay but seriously i need some help here
i forgot the function that makes it so something happens to only a specific object
i need it for this here
i'm going mad why does this delete every king and not just the first one
I'm trying to make a new type of planet card, but when I try to discover it, it crashes my game
have you started a new run
Same problem as before, local variables are reset every call
no, I use the debug mod and when I use it to discover the card it crashes
head to the line the error code is pointing to
does this work with object types
the code for the planet is right there
every call? how would i store this variable in the cardobject then
if it works with jokers surely it works with object types too
thats not what the error code is pointing to though
there is no line 2982
in functions/common_events.lua?
did you added the new hand type while created the planet
card.ability.extra.whatever = bla
G.jokers.cards might be what i'm looking for
i've changed king_removed away from a local variable and it's still removing all of the kings i play
my best guess is it probably crashed because you added a new hand type then continued the old save, I had this problem before
just do a new run
you also forgot to add a cost
but also try starting a new run and try to find it in a planet pack
cost hasn't made anything crash yet tho
my custom planets doesn't have a cost but it works all fine, I believe there's a default value of it
still trying to figure out how to make this only appear on jokers
have you tried the second thing yet
Can you send the new code?
It showed up in a pack, but immediately crashed after spawning
card is the object youāre hovering on so you need to check that
was the crash code the same
yyup
if card is a joker then,,,, badge
do you know where the draw step textures are stored?
that's confusing, but I'm still speculating the error is because your poker hand type, did you do that properly
Textures are stored just as they are for everywhere else, but for example, the spectral shader doesn't use a texture
is it as simple as "if this card is a joker then make the badge"
oh?
there it is, but when my mouse goes over it, it crashes
the variable is defined up in config = { extra = {...}}
I think youād be better using card.config.center_key and using that the find which badge to give it
so i should create every tribe badge first
You set it to false for every card
maybe that's because the text
then make the code for putting them on the jokers
A draw step to make the jokers display the spectral shader would quite literally just look like this:
key = 'joker_shine',
order = 11,
func = function(self)
if self.ability.set == 'Joker' and self:should_draw_base_shader() then
self.children.center:draw_shader('booster', nil, self.ARGS.send_to_shader)
end
end,
conditions = { vortex = false, facing = 'front' },
conditions = { vortex = false, facing = 'front' },
}```
does context.destroy_card call for every card?
Yes
i do think this is likely the problem
is that what i should be doing?
Check in the SMODS repo to see what existing DrawSteps there are and STEAL
No you only need to create the correct badge
what should I change then?
You just need to work out what the correct badge is first
the correct badge SHOULD be the badge for each corresponding tribe
eg: brave jokers get the brave badge
Yes but each card is in a different tribe right?
yeah
So you need to determine which tribe the card is before you can make the badge
maybe instead of process_loc_txt just do a normal localization, this is what I did for my own custom planets
have you made sure to give the name in your localization file
something's missing in terms of your localization if the nil index is occurring when you hover over the card
i didn't make tribe.lua for no reason, after all
so it should just iterate through all these jokers then
could someone describe what pseudorandom and G.GAME.probabilities.normal are used for? I assume card.ability.extra.odds is the listed probability on the card in the config = { extra = { odds = _ } } ?
I saw you did a custom badge, and did localize('k_planet_q') for the badge name, did you forgot to add it to the localization file perhaps?
Iām not 100% on the uses of object types, but in theory yeah, youd just loop through them all and check for type.cards[card.config.center_key]
I didn't even know I needed one until now
i'm just lost on where to actually start
keep in mind that this is my first time doing this kinda thing
the toml was easy, but this is much harder
now how would I do that, exactly?
do you have a localization file
don't think so lol
then just erase the localization part and replace it with a string you want
i think this is actually one of the easiest parts of the smods wiki to understand so im linking it here https://github.com/Steamodded/smods/wiki/Localization
instead of localize(k_planet_q), just do whatever name you want to
i donāt exactly know the specifics of it but yeah i guess
and i would do this for every other tribe
right
What other things are tribes going to do other than the badges?
why not just make a pool for each tribe and call for the pool when needed
well, the yo-kai watch joker works alongside jokers of other tribes
How do you address the jokers that are on hand?
like in a joker slot?
Yes
i specifically made all of the tribes a seperate object type so i could have them be called by other jokers
like this???
and for booster pack pool reasons
does anyone know how to do the balatro jokers for my mods?
but more specifically this
create_badge('Skaro') i think is what they were saying
ah
nonono just erase the localize part.
that badge thing is what the planet card's badge shows
arenāt the object types technically just joker pools
like Planet X is Planet? and Pluto is Dwarf Planet instead of Planet
eugh
cryptid uses a pool for it
food jokers are still a seperate object type though
lemme double check how cryptid does it
do this badges[#badges + 1] = create_badge('skaro', get_type_colour(self or card.config, card), nil, 1.2)
This is going to be a long shot. I have a seal that will sometimes copy the effects of other seals, could the SMODS.blueprint_effect work to copy the seal?
or just erase the entire set_card_type_badge if you don't really want a custom badge
it's purely for cosmetics, it works all fine if you don't have a custom badge name
neither change a thing
yeah you can do self:inject_card to insert whatever base game jokers you want into the ObjectType
how do you make custom pools?
if you do that, it doesn't apply to everything, and you can call for that ObjectType as a pool
show me the code then, I don't get it
does this not matter then?
is it adding the badge to jokers that aren't on that list?
itās adding the badge to everything because i havenāt told it to only put it on jokers yet
still havenāt figured out how to make it apply to only jokers
This is supposed to "add 3 random enhanced odd cards", but crashed upon use.
Does anyone know where the issue is?
ok, you should not name it's key planet, if you're at least planning adding more
and it's strange to see you have 'flush_Flush' as your hand type, I'm pretty sure you're wrong
ah, cause thats what it was like in the example
still need to figure this out btw. iām not really getting anywhere
if this planet is upgrading your custom hand, then the hand should be (mod prefix)_(hand key)
ohh
are your mod prefix flush? I don't think that's the case
hah, no
okay I am on my pc now, let me type something up for you
this is an example of mine, it upgrades my custom hand named Chroma and bjwd is my mod prefix
if i have a sticker, and i want to detect if the sticker is on a card held in hand, what would that look like? would it just be if context.cardarea == G.hand?
sticker on hand? is that possible? or you mean seal
i have a card that applies custom stickers to playing cards (which is a thing that is available by default)
back to square fucking one
wow I never thought it would work
if that's the case maybe you should try
@sullen fern ```lua
function create_tribe_badge(card)
local tribe = get_tribe(card)
return create_badge(tribe, G.C.EDITION. G.C.WHITE, 1.2) -- adjust these values
end
function get_tribe(card)
local tribes = {'Brave', } --Add keys for other types here
for _, tribe in ipairs(tribes) do
if SMODS.ObjectTypes[tribe].cards[card.config.center_key] then return tribe end
end
end
i have it working, im now just trying to get the sticker to actually do stuff
can I see your custom poker hand code then? the planet's code is fine but I think the problem is you didn't add the poker hand properly
I'm not trying to make a new hand, just a new planet
remove the generate_ui = 0
that's confusing? why would you make a planet if you didn't add any new hand types?
does anyone know whats wrong with this when i try and use this partner it shows the image but says error and it effect doesnt work right
to make it upgrade two handtypes instead of one
I'm pretty sure if you want that then the general code for planets are not usable
you have to hard code the use function to make that
well son of a bitch.
alright.
what do i replace the "_" with
nothing
cryptid has planets that upgrade multiple hands right?
dont change anything I sent for now
all of the cards STILL have the brave tag

oh woops I missed a line hold on
add if tribe then above the create_badge line
and an end after it
hey, it works!
only the brave tribe jokers have the brave badge
now to change the color of the badge
i think i can just use a hex code
does each tribe have a colour?
each tribe is associated with a different color
add the colours to the object types
then you can put SMODS.ObjectTypes[tribe].colour in the function
there goes my planet plans
brave is red, msyterious is yellow, tough is orange, charming is pink, heartful is green, shady is blue, eerie is purple, and slippery is teal
so i would just, bake the colors into the tribes?
yes
add colour = HEX('hexcode') to each object
look through this to see if it helps
https://github.com/SpectralPack/Cryptid/blob/main/items/planet.lua
i forgot but does the hexcode need the hash
no
yes it needs to be a string
so i would replace "G.C.EDITION" with that
yup
where is SMODS.ObjectType 's stroed
do i keep it as "tribe" or do i replace it with the tribe key
shit.
wait i forgot to make one of them a string
wow!
got it to show different colors for different tribes but the badge still just says "brave"
yeah you changed the value
=]]
idk why canio doesnt have a badge
The value of 1 comes right away no whistle is in hand or not j_fut_testing, what is the correct way?
you probably typed his key wrong
example
pretty sure i did
how can insert cards into my pool?
Yelled right, he's probably looking for it in the collection, not in the
no change when i patch the original function. same behaviour occurs
How do I get him to check it in his hand?
bam
gilgaros and slurpent finally have effects
I made a lot of new hand types based on suits and that made normal Five of a Kind builds nearly impossible to play lol
if you want an ordinary five of a kind you must have a 2+1+1+1 combination suit-wise or it'll be another poker hand
bump
now that i have the tribe system implimented, i gotta implement the tribe specific buffoon packs
I need to make a check if there is a Joker in my hand, if yes to return =1.
G.jokers.cards
I fixed it, but it still returns 1 no matter if I have the Joker or not
try check if #SMODS.find_card("joker") > 0
SMODS.find_card creates a list of all instances of the card
It should be G.jokers.cards btw

how can i create a tag?
add_tag(Tag("key"))
a random one?
keep in mind you need to do more work to make sure Orbital Tags work
you need to pick it from G.P_TAGS iirc
been having a crash i cant decipher, could someone help me understand what is causing this?
add_tag(Tag(key, nil, "Small")) i think? from what Eremel said the other day
Paperback has an utility function to create a random Tag
do you use a table as a key anywhere?
so I'd just use that
i dont think i do?
also do you do anything with applying Edition shaders to soul sprites
not anything more than what you posted on the smods discord no
SMODS.Joker {
key = "jokERROR",
config = { extra = { } },
unlocked = true,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
rarity = 2,
atlas = "EmeraldJokers",
pos = { x = 0, y = 1 },
cost = 8,
calculate = function(self, card, context)
if context.before and not context.blueprint and G.GAME.current_round.hands_played == 0 then
local suit = pseudorandom_element(SMODS.Suits, pseudoseed('vandalised'))
for k, v in ipairs(context.full_hand) do
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
v:change_suit(suit.key)
return true
end
}))
v.base.suit = suit
end
return {
message = localize('k_ERROR'),
colour = G.C.PURPLE
}
end
end
}
this is the joker that causes it
Thanks bro, it worksš
i had a game where hovering over a "The Star" would crash my game lol. I looked at the save data and nothing was wrong. weird stuff
i think it happened once i installed Talisman
is v.base.suit a suit table?
or is it a string normally?
iirc its a string?
then you're assigning it wrong
assert(SMODS.change_base(card, suit))
suit.key? maybe idk
i assume making a booster is easy though, especially since in have pools in the form of object types
or change all the logic to use that
i would look into how other mods do it
for the objecttypes you can do
return { set = "key of the objecttype", area = G.pack_cards } in create_card iirc
same issue, it doesn't take a table it would be suit.key probably
bump
bumping my issue - working on return to hand functionality and for some reason the returned card is flipped down and non-functional
'down' doesn't matter. i tried 'up' and it's the same
patching the original function instead of hooking into it makes no change, the behaviour is the same.
can you show me the definition of draw_card pls
you also need to check if context.other_card has the sticker, otherwise it tries to calculate every card held in hand
not sure how that looks though, never interacted with stickers
to my understanding, this is a vanilla function found in common_events.lua
yeah it's the stay_flipped argument
apparently they act kinda similar to seals, so whatever works for those might work for stickers?
ah, i see it. so i need to adjust how i call the function
thanks
Could I get a 2nd set of eyes on this maybe?
https://github.com/SpectralPack/Talisman/issues/79
I've looked through the source code and also my inflated save file and I'm struggling to come up with what would cause this.
I tried to find numbers that are just like half defined or something but nothing. Maybe some number is not set when it needs to be? but I couldn't find anything like that.
I can try to post my save file if it helps.
it's crashing on e_ify so the exponent is nil? idk how that would happen
i was about to say that i adjusted the function to pass false for stay_flipped to no effect, but i looked at draw_card() and... the stay_flipped argument appears to do nothing?
do i need to patch draw_card() to make it take stay_flipped into account
how do i make a joker do something when a card retriggers
unfortunately this does outspeed the event
i think ill go back to my original method but with the key
I did this I think but I donāt have the code right now.
does anyone have a booster sprite template
Iām pretty sure I used G.FUNCS.draw_from_play_to_hand I think.
is there SMODS.has_enhancements key for no enhancements?
Are you trying to check if a card is not enhanced?
yeah pretty much
if not next(SMODS.get_enhancements(card))
I thought maybe there was like m_none or something
actually aikoyori's mod actually has blank booster sprites
if anyone wants to work with me on trying to save my save file and/or fixing the underlying issue, feel free to ping or DM me.
well, wouldn't I need to do context.other_card to check the actual playing card instead of the joker? because when I try that there seem to be errors
I might be missing somethin
card is supposed to be the card your referring to and not a joker?
sorry I should've given more context
I'm checking the playing card during scoring, since I'm making a joker that activates on non enhanced cards when scored
context.other_card?
yeah it gives an error when trying context.other_card in the code you suggested
not with card though
actually nevermind same with card
Code?
wonderful
this bit
Are you checking for context.individual before this?
What is the crash log?
ok wait it might just be my code editor marking it as an error when it isn't
lemme test in game first
sorryy..
yeah it works, it was just me being stupid
thanks :>
i think that's what i did before context.stay_flipped was a thing yes
context.stay_flipped?
i am also trying to patch it, but it's being extremely stubborn about it
this is where i got, but it's still not making any difference
context.stay_flipped let's you keep cards drawn from the deck flipped like the blinds do
before it existed i patched the functions
let me look at the code and ill get back in a sec
Thatās a thing??? 
oh i think i got it
trying to make my very first joker, although i'm not sure what context is needed when a hearts or clubs card scores
your returntohandfunc is evaluated in the if statement but it doesnt return anything so it never passes the check, so the game then tries to run the original draw from play to discard and flips the card
the context for cards scoring is context.individual, you need to check manually what suit it is
check https://github.com/nh6574/VanillaRemade/blob/2f0d20ef767c7de985d71b8e283690d2d9ca5dbf/src/jokers.lua#L35
alright, i'll look into that
yep, fixed. thanks 
the code conditional on the tally isn't activating (everything after if tally >= 2 then)
and apparently there's an unexpected symbol near '=' on line 32, which is supposed to represent if the joker's discovered or not
oh wait maybe it has to do with the comma just before it
remove the cardarea check
bumpin'
Is there some good reference code to use for making blinds?
the names code, source code
That stuff is so confusing.
blinds have calculate functions now so you can treat them like jokers
oh yea I forgot source code doesn't have that
Already been looking at that, just wondering if there's any fully fleshed out blind code I can look at for reference.
aikoyoris shenanigans has some blinds but idk if they use default smods code so take that with a grain of salt
Thank you!
would really appreciate if someone would look into this with me
you could maybe use the localize function to do what you're trying to do
i need a value from a specific joker
to display on an info queue
because the value scales per joker
what card is the info queue on
a joker
the joker that has that value
i'm hoping i can refer to loc_vars returned values with #1# and such like in a joker's description
is it that easy
{ set = "Joker", key = key, vars = {} }
i think
and you put what you would in loc_vars in vars
is that the return of loc_vars?
or the localize function
no you add that to info_queue
that's something you would put inside a loc_vars to get it to pull an info_queue from somewhere
which is the opposite of what I want
oh interesting
G.P_CENTERS[key]:loc_vars ?
i dont understand what you're asking honestly
I think they want an info_queue box to pop up but to use a variable from the joker creating the info_queue
instead of just using the other center's normal values
doesn't this do that
unsure, I've never done that before and I'm not at my computer
does anyone know how to send args to shaders (manually)
oh oh the vars = argument
yeah
how do i texture a modded thing in malverk
if you dont know, are there any example malverk texture packs that textures modded stuff?
is anyone able to give an example how they add their consumables to the collection? I have been unable to figure it out by looking at other mods
consumables should automatically be added to the collection
did you add a custom consumabletype?
yea sorry should have been more clear
(not that that changes the answer, those get added automatically too)
new type
@shut crater do you know how to pass args to shaders directly
I remember seeing the code that does it but I haven't done it myself and I'm not at my computer
I'm looking at the code but I don't understand why mine doesn't work
I'm calling draw_shader
someone remind me how i shallow print a table again?
inspect I think
I assume you've already looked here
https://github.com/Steamodded/smods/wiki/SMODS.Edition#api-methods-1
how do i access the current chips?
the current chips for the blind or the currently scoring hand?
Yes but I'm using draw_shader
I'm not using any SMODS.Shader method
and I don't think I should based on vanilla's Card.draw and the SMODS.DrawSteps that I'm looking at
can you more specifically describe the intended effect cause there's like 15 different kinds of "current chips" and I want to give you the right one
(slight hyperbole but there are like 3 or 4)
when the joker is triggered, i want it to do the tangent of the current chips
not blind chips, the scoring chips
I hate it
use hand_chips, it's a global variable
:)
math
wasn't it chips?
math
as a math tutor I cringe
integral and derivative joker coming soon š„
heres what they all do
hey this is just like in the hit videogame the world ends with you
Unit circle:
X3 Mult if you can fill out the unit circle in under a minute
i would do that but i SUCK WITH UI
valid
i would KILL for a ui helper tool
true
r u insane
while true do
hand_chips = hand_chips + 1
end
oops that's python
too many languages in my head
"what the hell"
repeat all cards in hand 2^900 times
too zetta slow
just use the tech from that mod that allows you to draw Jokers in-game
this joke is getting too close to becoming a reality
has anyone made their own shaders? looking at the .fs files it seems like itd be hell
yes and you are correct
shaders are dark magic and the toll they extract is emotional
haha i dont need to learn them for anything i want to implement but is there anyguides on how to make them? or how to learn
For Love2D specifically: https://blogs.love2d.org/content/beginners-guide-shaders
Shaders in general: https://thebookofshaders.com/
Love2D uses a slight variant of GLSL so you can just learn GLSL
damn, did it take u long to learn?
who said I learned anything lol
I struggled through it and technically have a working shader
lmaoo
(I had some minimal shader experience prior)
the good news is that there are actually a ridiculously large number of resources on writing shaders, so if you're actually interested in learning you would definitely have the ability to do so
hm ill take a look ty!! i dont even want to use them tbh i just want to learn how to do it
oh also I've had this series recommended to me
https://www.youtube.com/playlist?list=PLImQaTpSAdsCnJon-Eir92SZMl7tPBS4Z
does anyone have symbol ideas for the fighter, the malicious, and the leviathan?
i already have a bit of a theme going with the ones i already made (that being fictional languages)
symbols will simply not do.
okay, followed the github for 'ConsumableType' and it appears in collection now but the name on the button is ERROR? Tried using the key 'name' to fill in a value but no dice... anyone know the problem?
i have 2 questions... where would i put it so that it removes $200 every time the death save is used?
also how do i change the saved by dr.bones text?
in your return table add dollars = -200
I think maybe that's not possible
or at least it didn't used to be
tried adding a hook to the ease_dollars function and now its just negating all money earned nothing?
the ones that i already have are the warrior ("warrior" in the warrior language), the poltergiest ("dead" in the devotee language), the fairy ("fairy" in the alchemist language), the ditz ("idiot" in the bard language), and the fear ("fear" in the anchorite language)
al of which are from chants of sennaar
you're passing in self, not the parameters of the function
i dont want to be just limited to chants of sennaar though
that worked... the text is fine ig... thanks for the help
why does that matter? my other function hooks call self and they work fine
real quick, how do i set mult and chip gain to the highest number they reached previously
ohhhhh i think the issue was the others dont have parameters
uh
like you want to know what is the highest number of chips and mult that any hand has reached in the whole run? or
no i'm trying to make rock bottom as a joker
beautiful
I don't understand what that means
rock bottom, from the binding of isaac
basically, rock bottom saves the highest stats you reached in it's original game, and the way i'm recreating that as a joker is by adding the chips and mult by the highest number they reached
I've never played š
sorry, i'm not understanding
not sure how i'm gonna get the chip and mult gain to fit that logic though
do you mean like across runs? like meta-progression?
no
you need an additional localization entry, I linked you to where I put it in my mod
how would i patch my game to allow me to change this line? do i need to use .toml??... i hate toml
from smods/utils btw
I can't just use a string? I haven't been using localization
How difficult is the code for this?
stray pixel lmoa
LOL
but considering that the draw runs off a pseudorandom line i belive, probably VERY difficult
this idea was so cool for Athena š
you could patch the game to draw cards to a custom card area and those cards are then drawn to hand
easier than changing how you fundamentally draw cards

am i right to just assume this will spawn in the soul spawn pool?
how do i get the cost of a card in context.buying_card and does it scale with clearance sale/liquidation
if rarity is 4 then yeah
context.card.config.center.cost i think? you need to look for the cost var in context.card
and yes it does scale with vouchers
good, thank you
how do i have a voucher that doubles (and a tier 2 voucher that quadruples) the chances of select rarities appearing
change the default weight of rarities
e.g for rare being double as common def weight could go from 0.95 to 0.90
?
is there a way to store data in a sticker? the normal config = {} doesn't seem to work at all
anyone know why this consumable use code doesn't work? [crash below]
use = function(self, card, area, copier)
card.ability.extra.active = not card.ability.extra.active
local temp = copy_card(card)
temp:add_to_deck()
G.consumeables.emplace(temp)
end,
i might be a bit braindead but i have no clue what the problem is since card is evidently not nil
wait, really? currently working with stickers (or at least trying to) and did not know this
if i want to keep my code in a file other than main.lua, do i have to write code that says to load that script, or does smods just load every lua file in my mod?
print cards config.center.key and show output
well that is just the name of my card
yep, debugging along with the crashes shows me that any value that I store inside is not being properly stored (extra is just what I put inside the config ={})
yup so is that the card you are copying
yea im trying to make it so it just copies itself, as it's meant to just be a toggle for an ability rather than a one-time thing
use keep_on_use = function(self,card) instead for mutliple use consums
did this crash before you got into the game (i think i had this error last night with smth other than a sticker)
ooh thank you
only when I hover on the card or try to access it
hovering cause of the description
start a new run
i'm just in the collection lol
what is the whole crash message, because i know it points you to a specific line in something
how do i add repetition to this so i can stop the calculation from triggering 7 trillion times instead of once ?
here's the majority of the crash log and the line it crashes on
if context.end_of_round and not context.repetition and not context.individual
okay !
.config is for self, .ability is for card there.
this is not very clear
yep that works! Thanks for the help!
Sorry to bother everyone with a simple mistake lol
i just got another idea for a joker: it acts like mr bones but instead of self destructing once it's used, it takes money from you. once you get into debt the joker won't save you
idk take ownership of rarities and change the default weight var of them
how can i hook my own joker to also have holograms shader
Wow this is such a great idea, I am pissed
does anyone have a better answer
Super unique and eye catching artwork
im pretty sure there's a G.GAME.rare_mod or something like that to change the weights
let me look
@wispy sparrow I was literally just helping someone with that lol
(not the debt part though)
i mean im using custom rarities, the voucher is supposed to change the chance
but also how tf does weight work
like ive asked a few times what the default weights are for the vanilla joker rarities and never got an answer
it's like 5% 20% and 75% i think
how would that be expressed in weight
i mean weight is relative to all other weights
so you would have to calculate it based on those
knowing the percent doesnt help if i dont know how its expressed
āļø
if you have only one 0.1 weight that would still be 100%
(assuming the default values N provided are correct)
Common has a weight of .75
Uncommon has a weight of .2
Rare has a weight of .05
The sum of their weights is 1 so they have probabilities of 0.75/1, 0.2/1, and 0.05/1, respectively
Adding a rarity called Blork with a weight of 0.4 doesn't change the weights of the others, but it changes the sum of the weights to 1.4
Now Common has a probabilty of 0.75/1.4, Uncommon is 0.2/1.4, Rare is 0.05/1.4, and Blork is 0.4/1.4
if you have 0.1 and 0.1 each is 50%
Is it possible to make non animated blinds?
what is the easiest way of applying the hologram shader to another jerkler
do what hologram does but in the jokers draw function
it does this, i dont know how to do this lmao
Ctrl+C, Ctrl+V
alr, say i used the same weight for my rarities, what would i do for a voucher that doubles/quadruples the chances of the custom rarities appearing? double/quadruple the weight?
yes
this variable works but doesn't seem to scale with vouchers
oh shit sorry
use context.card.cost
oh yeah how do i chance the dollar value without dollars = because that sends a message
technically the math doesn't work out that nicely but that's probably how I'd implement it
ease_dollars(value)
there's probably a way to make that not send a message but i dont remember rn
how would i do that in code
https://github.com/Steamodded/smods/wiki/SMODS.Rarity#api-documentation-smodsrarity
default_weight: Setting a numerical value for default_weight enables cards with this rarity to appear in the shop at the specified weight.
This sets a default weight, which can be modified by accessing G.GAME[key:lower() .. '_mod'] during a run.
so would the voucher just change it like
G.GAME['key'] * 2 or smth?
I would guess G.GAME['key'] = G.GAME['key'] * 2
but I've never done this before, I'm just going off of documentation
how do i change this to all cards instead of face cards only?
(this is assuming that 'key' is following the correct template provided by the docs)
how could i make a consumable give 0.5xmult in context.post_joker
remove the if statement that checks if the card is a face card