#đ»ă»modding-dev
1 messages · Page 32 of 1
ok
What?
What?
come mod slice and dice with me arachnei
"come mod, slice and dice arachnei with me"
which one of these values correspond to the chip count
hand_chips i believe
What if you just do "chips = chips" ?
whar
I remember having to refer to chips for a joker I made
which one
hmm
what is args referring to here
The parameter from trigger_effect
La Révolution iirc
yes but what is args
what is used to trigger it
Just look at what trigger_effects functions calls elsewhere
Search for âfinal_scoring_stepâ
It only appears twice and youâre looking at one appearance
then?
Then you read
what im looking for is to know what i can do to find out what to use to get args.chips
and it isnt G.GAME.chips, thats score
And Iâm telling youâll find what args is by searching âfinal_scoring_stepâ
Itâs in the evaluate_play function
Itâs what it refers to as the number of chips scored in the hand
Just a local variable iirc
Not sure if this can be done, but is there a way to make it so that a Joker always triggers after another Joker regardless of position, if they both have to trigger in context.before?
Like, say I wanted a Joker to trigger after DNA triggers, regardless of position, but before any scoring Jokers. Is there a way to do that?
Could there be a problem if a Mod ID or a Mod Name is too long with Steamodded ?
not that I could think of one except text not fitting in the boxes in the mod menu
names in mod badges are cut off, so no visual issues there
can't think of any non-visual issues, anyway
đ
What's being cooked?
đ
oooh, how would this work?
So it looks for a localization file and loads it into G.localization?
it looks for a file in Mods/your_mod/localization/ (either the current language, or default.lua or en-us.lua)
and it loads non-destructively into G.localization (fun fact, this code worked first try)
How do you deal with two function hooks conflicting with each other? Is there a way to prevent one overwriting the other, or force one to load last?
there should be no conflicts if you call the original inside your hook
just make sure the reference to your original function isn't global / reused
This is the correct way to do it, right? At least that's what i've seen done before.
yeah looks right
and then I return the table_val variable at the end
so what's the issue?
Well some of the jokers in the PampaJokers pack use this same hook, and from my testing, the jokers that use the hook overwrite my hook, and the ones that don't use the hook, don't overwrite my hook
I guess this would apply to any modded joker that used that hook
does PampaJokers override this function destructively?
I'm not quite sure what defines that, but this is the beginning and end of their function:
local generate_UIBox_ability_tableref = Card.generate_UIBox_ability_table
function Card.generate_UIBox_ability_table(self)
and end:
return generate_UIBox_ability_tableref(self)
end
It seems like they do the same thing
I've forgotten how terrible not using lovely for these functions is
it should be fine so long as your mod loads last
given you always use the return value
add this at the bottom of your mod header
--- PRIORITY: 100
That seems to have worked! Thank you!
np
So I've been using self.area == G.I.CARDAREA[7] to access the shop cardarea. Is there an actual name for this? Like the others are G.jokers and G.pack_cards
i cant for the life of me find where the descriptions for the jokers in the source code are. want to look at how i can use the formatting
Under localization, all the different languages are in there.
thank you so much
Me making a joker go "Nope" using card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize('k_nope_ex')}) (Don't mind the weirdly sized border, windows capture is being weird)
i still don't know how to use it đ
i am not a very smart person
how do you get and use hand_chips
its not there by default, and i cant find how to get it
where are you trying to use it?
its supposed to happen whenever a face card is scored
im assuming i cant use hand_chips on every context huh
damnit
hand_chips is in the evaluate_play stack
you can't access it from anywhere else
what are you trying to do to it?
i just wanted to use it in a calculation
just a X1.2 chip mult whenever a face card is triggered
You tried "chips" ?
Oh I checked my code and I actually use hand_chips in a context.after
I don't think hand_chips is ever passed through apart from the deck calculation
although I also don't see where it is ever defined?
unless it's global
so much for a week of rest
I had a challenge idea in which the player starts with a full deck of permanently debuffed cards. How would I go about making that show up in the starter deck?
I think I can get everything else set up except for that by looking at the challenges code and some other mods that have added challenges.
I did an alternate method but the challenge is locked. How do I make it unlocked?
challenges are unlocked based on your number of completed challenges, unless you Unlock All
you can insert your challenge at the beginning of G.CHALLENGES so it will be the first challenge and won't be locked
i had 20/20 challenges completed tho?
err, 20/21*
regardless i'm gonna have to figure out a better place to inject my change because I'm currently doing Blind:debuff_card but I think that causes that one joker that triggers when boss blind is triggered to trigger
guys how can i get the localized name of a modded joker from my mod? (load priority considered). for 0.9.8.
simply using G.localization or localize{type = 'name_text', key = xxx, set = 'Joker'} just wont work, but for vanilla jokers both works fine
hey guys, is there a good example of how tags are implemented in steamodded somewhere?
either an example in steamodded itself or a mod that does it would work
nevermind, think I found it
quick question, are you trying to get the localized name of a joker to appear somewhere else?
correct
can I ask where and why? it seems kind of counter-intuitive
the best reason I can come up is some kind of "when ... spawns joker X"
like using it as a loc var for descriptions, showing the name in another joker's infobox
if you wanna make a joker that has some co functions with another from another mod in this case its not counter intuitive at all
what keeps haunting me is that i can easily get the localized names of vanilla ones but for modded ones its not working, returning a nil, like they got discarded or sum
sorry, the reason I used the word "counter-intuitive" is because the base idea of most synergies in balatro is that they synergize on something together, not directly with each other if that makes sense
nah ur good im just explaining
I've picked up a little bit of lua, but I was advised to look in the balatro source code to figure out how the unmodded stuff works as well. I've figured out everything on that front, and I've found the code says what jokers are and what they require to be jokers, but I was wondering if someone could point me toward the info on individual jokers, as I can't find it. All good if not, I get discussing source code could be a touchy thing.
it's in card.lua, just ctrl f
most everything you need is either in card.lua or common_events.lua
thanks!
I remember the discussion that modded Jokers should be distinguished by their keys, so maybe if you access the localization dictionary with the right key you can get the name
hey i have this joker here which gives more mult foir each 2 in the deck
and i copied the code and edited it from cloud 9
but the joker doesnt seem to update as often as cloud 9? and it doesnt use the current deck in the collection menu
anyone know whats up?
Are you sure itâs G.playing_cards?
And not G.deck?
thats how it was in cloud 9 but ill try it
yeah no playing cards was right that broke it
There might be another calculate
Like, for a different context
Actually nevermind
maybe its cause its only calculating unde rjokerinfo.calculate? but idk
tbh its not too important because the joker works for all calculations its just a bit laggy on updating sometimes
Cloud 9's check for 9s is under update not calculate
the former updates every frame (hence you'll always see C9 displaying correctly), the latter only updates every action
ooooohhh okay thank you very much
so would i do function jokerInfo.update?
like this?
is this 1.0.0?
nope
okay yeah thats giving me the same results so, hook onto card.update?
yup
how would i do that
so G.localization.descriptions.Joker['j_modded_joker'].name wont work?
cool thank you ill try it
btw while youre here i wanted to ask
is it possible to have infoboxes on different columns
cause this onne kinda escapes the screen lol
it'd need a rewrite of the uibox likely
alright
im assuming this goes in main and not in the joker file
you can try adding your own localization of Wheel of Fortune instead
and ill have to add a key to the joker manually or is that just the slug?
should be your slug, with a "j_" at the beginning
so if your slug is joker_slug, your key is j_joker_slug
ok sorry but where would i define what the #1# value is here
I donât know exactly how the game handles the position of tooltips (probably in card_h_popup, but I didnât investigate it much), but you can manipulate if the card test appears below or above the card in Card:align_h_popup.
i think my solution is gonna be to just define my own wheel of fortune description without the additional definitions
Itâs what determines if the card info text (I.e. name and desc) is above or below the card.
i just gotta find out how to make it point to G.GAME.probabilities.normal
aight imma just go straightfoward.
mod1 and mod2 with a lower priority
in mod2
G.localization.descriptions.Joker['j_mod1_joker'].name
crashes the game saying 'j_mod1_joker' is a nil
it doesn't happen at load
if it does, it will get eaten by a loc reset
wait no, 0.9.8
screw me
it does happen at load then
you'd have to do it post-load then somehow
im more confused rn lol. like, post steamodded load?
do i have to use lovely to do it?
now it became much harder than i thought itd be
aight i got this. its SMODS.Jokers['j_modded_joker'].loc_txt.name
now its much more easier than i originally thought
But 15*4=60
is it performing the operation twice? (15 x 2 x 2 = 60)
you're multiplying hand_chips by 2, then adding hand_chips again with the return
what? why are you pinging me? 
wait whar....
am i??
its just a message though
Also your for loop here is flawed, you can't return more than once
yeah i knew that would probably happen
Just make a local variable for your chips and return that outside of the for loop
#1248287850512781452 i finally fixed it oml
Why is your layout so jank?
why is what what
your video
oh
OBS moment
Don't use that lol
why not
Is there something wrong with this grammar? Still a tad unfamiliar with lua, so, might be obvious somehow, but this is throwing an error saying that the bracket doesn't get closed.
SMODS.current_mod.process_loc_text{
G.localization.misc.dictionary.b_play_cap = "START"
}
end```
that's not how you use process_loc_text
your function would be
function SMODS.current_mod.process_loc_text()
SMODS.process_loc_text(G.localization.misc.dictionary, "b_play_cap", "START")
end
Completely different than I expected. I'll compare it with the source code and see which parts are connected, hopefully figure it out myself, but, might end up coming back for clarification. Thanks.
arghhh what did i do wrong this time
self.ability.name should be card.ability.name
That too
hey ! you probably got this question a thousand times but, i would like to create balatro mods, is there some tutorials somewhere please ?
other useful resources include code of other mods as well as Balatro's source code, which you can view by extracting Balatro.exe with 7-zip
thank you !
should i come here if i have some question or can i dm you @frosty dock ?
Can't it work like calculating jokers?
It's the same logic but it doesn't work 1:1 the same
Couldn't you hook calculate_joker?
That's how it works yea
Gonna add a "Reach times X the score goal" too
@mellow sable Idea: do you think it's possible to attach an AnimatedSprite to a Joker (like a soul sprite, but its own individual object) without crashing the game?
you'll likely get a faster answer if you just ask here
I am not always available
and I'm not the only knowledgeable person around here, either
ok thank you !
i have a question, as i'm starting to learn how it works, i'm gonna ask stupid questions lol : i'm looking at the dna joker in the game.lua file and i don't understand why there's nothing in the config section (see in the image)
the config is where the jokers store extra values, often the amount of mult/xmult/chips they give. DNA doesn't have any of this and all it's logic is done when calculated
so i guess the code for it's effects is somewhere else ?
yeah, look in card.lua at calculate_joker
its this part of card.lua
and i guess this is the config for the dna joker, right ?
also, how do you use a different text editor for this file ? u just extract balatro, edit and compress ?
whar
This is the code that make the joker work, right ?
yes
Yes, but itâs not config
Thx !
I'm getting an error in my code: attempt to call field 'end_calculate_context (a nil value). I'm on version 1.0.0-ALPHA-0608a-STEAMODDED and this occurs within the JokerAPI example mod. Any ideas what I could be doing wrong?
I've got the crash report if that would help
The example mod is outdated
It was doing that with a different custom joker as well. This is the calculate function for it:
calculate = function(self, context) --define calculate functions here
if G.GAME.blind.triggered and not context.blueprint then
card.ability.extra.x_mult = card.ability.extra.x_mult + 0.25
end
if context.end_of_round and not context.individual and not context.repetition and not context.blueprint and G.GAME.blind.boss and not self.gone then
card.ability.extra.x_mult = card.ability.extra.x_mult + 0.25
end
if SMODS.end_calculate_context(context) then
return {
Xmult_mod = card.ability.extra.x_mult,
card = self,
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.x_mult } }
}
end
end,
That seemed to do it for me. Thanks!
Is this how you access the hand_type of the current scoring_hand? if v.config.hand_type == context.hand_type then I'm not quite sure how to access that
what is v?
I'm looping through the planets in G.P_CENTER_POOLS.Planet
it's the value at that index
the context should be context.scoring_name
Sweet, that fixed the error i was getting
okay so for this joker
i wanna have a message showing what hand was the last hand played
oh yeah i just did that for one of my jonklers lmao
and basically keep track of the last hand played and compare it with the current one to gain mult
if context.cardarea == G.jokers and context.before and not context.blueprint then
local hand = context.scoring_name
if hand == card.ability.extra.last_hand_played then
--- increase xmult
else
--- reset xmult
end
card.ability.extra.last_hand_played = hand
end
but for now this is crashing the game upon hovering over and im not sure why, cause i looked at another modded joker for reference and its able to have a variable be a string just fine
your extra.crack_hand is a table not a string
yeah
aure go to sleep
go back to sleep
also, you should have a "None" check in your locDef. here's the code for it in my jonkler
local hand_var = card.ability.extra.last_hand_played and localize(card.ability.extra.last_hand_played, 'poker_hands') or localize('k_none')
(if the last_hand_played is not nil, return the localization for the hand played, otherwise return the localization for none)
is your joker basically the same as this one? lol
mine levels up hands
ah
but similar trigger
can i see?
mm it uses 1.0.0 functions
oh im just curious as to what it is lol
nice
btw heres mine in game it uses sould for the hand
Pee Wee Says âSay No to Drugs!â
Love the 1980s? OF COURSE You Do!
Now Visit THE #1 Website EVER:
www.80sThen80sNow.com
#PeeWeeHerman #PeeWee #PaulReubens #Movies #Movie #Television #TV #PSA
clever tbh
i think i'd die when i have to use c++ again
what is 1.0.0 version of this?
i edited it a bit to add a multiplier if the hand is none and i think its working properly now
thanks for the help
dios mio
i can already tell this is going to be annoying accidentally playing a straight flush
how do i get this to only trigger once per end of round? its triggering a bunch of times
context.end_of_round triggers for every card
you also need to check not context.individual and not context.repetition
Or just use context.joker_main
context.end_of_round does not have a context.joker_main
Get rid of that too
the somewhat-technical reason is that Lovely hooks the Lua runtime before the game is even loaded. the best language for this is something that compiles to a native binary - C++ and Rust were the obvious choices, I went for the latter because I'm way more productive in it.
nvm i got this one done too
(reading back through message history)
knockin em out today
was browsing the Balatro Nexus community and came across this: https://www.nexusmods.com/balatro/mods/29
if the author is here then you definitely should not be redistributing a modified balatro executable
đ
yeah, I found 3 others that were doing the same thing.
đ
they're scared of him
how can i get a joker's name and extras if its not in the deck
im trying to make a joker that copies a completely random joker every blind
damn
though maybe not exactly like you envisioned
still, how do i do it?
G.P_CENTERS["j_joker"] ?
works with steamodded 1.0.0-alpha right?
ye
works without steamodded, actually
ah i see
accidentally summons jimbo, the god of all balatro
how do ya use it
You just call it like anything else
nvm think i understood
how would I reference files in the steamodded assets from the game_object.lua?
anybody in here interested in helping me troubleshoot my lua code to make some new jokers?
shoot me a message if you want to work on jokers with me
Is this the context for when a card is getting destroyed?
calculate = function(self, card, context)
if context.destroying_card then
card.ability.extra.current_mult = card.ability.extra.current_mult + card.ability.extra.mult_gain
card_eval_status_text(card, 'extra', nil, nil, nil, { message = localize('k_plus_planet'), colour = G.C.SECONDARY_SET.Planet})
end
end,
I tried this, and it's not triggering when I use the hanged man to destroy cards.
what is the context for selling other jokers in 1.0.0?
context.selling_card
Take a look at mâs implementation if you want to know more
context.card is the card being sold
Is that the same for destroying_card?
that was easier then i thought it would be
hey uh I see the joker count jumping to 2 when you sell it... does that mean it won't proc if you have 5/5 max jokers ?
dope result tho, I like how silly the chick looks with the egg's face
goat
is there a function for whenever a joker is removed from your jokers for whatever reason?
remove_from_deck
that's a thing in 1.0 only
for 0.9.8 you'd have to hook Card:remove_from_deck()
You could also evaluate if the Joker is there at runtime
oh dang youre right
how would i do that?
or
actually i could just check if theres another copy when i remove it huh
find_joker
imagine using find_joker
ok this seems to be happening regardless of the joker being there or not
i just have this in the main.lua
Shouldnât it be âby keyâ
I guess not necessarily
should be next(find_joker(...)) if you're just searching
by is lame
with with i get to use two extra characters
It was more of an English language question
still gramatically correct
As I said
the font is giving me a brain aneurysm ngl
Skill issue
okay now its just not triggering at all
SMODS.find_card:
Is the name correct?
wuh
is it still "Grey Joker (WIP)"
nope
oe
I find the name misleading
why? it finds cards
smods ghost change doesn't count
not just jokers
can it find my dad? đ
Wait I see the issue. I think this code runs once
if your dad is a consumable, maybe
name =/= key
Sorry he's debuffed
But not in the deck
it isn't even my function
It doesnât even find consumables if you donât have Jokers
don't complain to me
so like this then
ask mr thunk
not me
no, it doesn't find consumables if the card area for jokers doesn't exist
or aure ig
Huh TIL
Thatâs what I meant
hru btw aure, feeling better?
that's not the same as not having jokers
Kinda but you should hook the original
I'm doing better, still not fully recovered though
getting there
I mean if you donât have the CardArea for Jokers you canât have Jokers
but you can have an empty cardarea for jokers and it will still find consumables
Only because an empty list evaluates to true in Lua 
not sure what you mean
if G.jokers or G.jokers.cards don't exist, you're literally not in a run and have no business calling that function
But is G.jokers.cards empty or nil?
it's empty
Jokers that persist between runs 
You create a reference to the original function then call it inside the overwrite so you donât lose the original
self.cards literally gets initialized to an empty table in CardArea:init()
Otherwise multiple mods couldnât overwrite the same function
đ
Iâll suggest calling the original function when the Joker isnât found
mfw i write non compatible code
yeah i did that
(me when i delete the joker atlas)
oh yeah btw
got a voice actor from final fantasy to do a line for this mod
so thats a thing
đ„
Iâll probably be a good bit less active this week since my finals are coming up
gl đđ»
Best of luck to ya
Good luck!
tysm
Hey guys
I'm just porting my mods from balamod to steamodded
does steammodded have a console?
Some way to run commands like balamod?
ah damn
being able to add console commands from inside your own mod is super handy
balamod is very good
I guess I'll just add a button in-game to trigger what I need
oooh i like steamodded's error stack trace
Every guide and mention of Steammodded im seeing says version 1.x.x but the latest version is 0.9.8 as of April 6th?
1.0.0 is in alpha and not released yet, its the main branch if you still want to download it
You Will Be Incredible
How do I put multiple lovely patches into one file correctly?
maybe you know @zealous glen
nvm found it
localization/en-us.lua

hmmmm
Okayie
alternatively it just doesn't search in localization
Yeah I think so, because this didn't work either
The pattern needs to match the whole line AFAIK
Aha
Antonidas after you cast a spell:
localization files aren't patchable by lovely unfortunately
Me whem
this is what i get for searching in steamodded 0.98 mods while making a 1.0.0 mod....
that steamodded 1.0 is criminally outdated
here you go
ok
dammit vscode didnt save the tabs i had open
steamodded hot reloading is basically unusable for me rn guh
if i reload via crash it doesn't load lovely
if i reload via mod menu it reloads via steam which is so fucking slow
you see, there's currently no better way that works
it's mostly good for reloading mods that aren't lovely mods
there's literally no better way for lovely mods than just killing the game and starting a new process
and why wouldn't that work
I mean I can try with the executable directly
I would just need to figure out how to always know where it is
and I also can't disregard launch args
which I guess just means I need the argv
Jimbozo
how would you change the behavior of a consumable when used?
ik theres a .use() but idk how to use it 
nvm stack overflow got me
alr im still stuck, how would i change the value of a planet card mid game?
if thats possible
like how ectoplasm changes from -1 to -2 when you use it once
@frosty dock looking for a way to access the steamodded assets folder for PaletteAPI, any help?
SMODS.dir
that's where I keep the top-level directory of steamodded
So SMODS.dir..'assets/' should have you covered for the assets folder
I get this error when I use SMODS.dir
G.SHADERS['recolour'] = love.graphics.newShader(SMODS.dir.."assets/shaders/recolour.fs")```
this is my code in `game_object.lua`
in fact, upon checking, I don't have a SMODS.dir at all
oh this is a sequencing error
oh I see
it's not available before mods are loaded
during injection should work fine
I've made other APIs automatically use it instead of the mod dir when there's no current mod, so I haven't run into that sort of issue
is there a way for a new modder to know what the G tables have to offer besides reading the whole Balatro game code?
read Balatro source code and use vscode global search or similar to your advantage
at this point someone probably will know if you ask here though
you can also throw a lua for k,v in pairs(G.table) do sendDebugMessage(k..": "..tostring(v)) end
and it'll spit it all out to the console
sendDebugMessage(inspectDepth(G)) 
note: it will be harder to make sense of than just reading the code
this is bad advice
Balatro has a nonrecursive function to print tables, and you could make a recursive version
there's a built in table printer?
tprint, i believe
Also keep in mind if you add anything new itâs good practice to create a sub table for your mod
I wish I had known this sooner
I think thereâs an actual printer but Iâm not sure
This may be a bit redundant of a question to ask here, but how does one code Jokers into the game? (Mainly asking because I have ideas for a 'series' of Jokers, like the Cosmic and Combat Ace series', but have absolutely no idea on how to code, yet I want to give it a shot)
Most of the time the main part is writing a custom calculate function that checks the context argument for the appropriate timing to activate then does something. This usually involves defining new variables in the extra table.
Which I have no idea on how to do that, since I have no idea where to even start when it comes to coding for Balatro
Can you code
No idea on how to do so.
add custom sound global is giving me an error, i was told it was included in steammodded 0.9.8 tho
erm
Fixed in Steamodded 1.0 đ
whats the method in 0.9.8?
Oh I had to update the modloader myself to fix it
But the general idea for file-related bugs is to use nativefs to make a copy in the main folder of the game and load the sound with that
I had some issues trying to load Cryptid with my palette stuff because of that, but I think it seemed like an issue you have introduced with how you load files there
How did you fix that? Want to make it as compatible as possible
I donât use any love functions so I wouldnât expect issues
Do you know what the error was?
lemme reinstall in and grab the error for you
G.SHADERS[self.key] = love.graphics.newShader(self.full_path) offending line
but it works perfectly without crpytid/talisman installed
shaders = {'recolour', 'negative', 'holo', 'polychrome'}
for _, v in pairs(shaders) do
local file = NFS.read(SMODS.current_mod.path.."/assets/shaders/"..v..".fs")
love.filesystem.write(v.."-temp.fs", file)
G.SHADERS[v] = love.graphics.newShader(v.."-temp.fs")
love.filesystem.remove(v.."-temp.fs")
end
Excuse that formatting issue
But I got a similar bug when trying to install and this was how I fixed it
Yeah I've seen that, but it seems unsustainable to have to rewrite every file loading with that
Pretty sure file loading issues happen even without Cryptid for me
I think itâs only needed if youâre loading it using a LOVE function
I mean I haven't thrown a load of mods in there, but cryptid is the only one I've encountered the issue with so far
Idk why Cryptid in particular would cause the bug
could it be the nativefs part of talisman?
deleting talisman at least loads the game
I was just wondering if something it does overwrites the base game functionality
If you remove the Talisman dependency from Cryptid as well, does that load?
It does a lot (but mainly just for numbers)
yes
it does load without the dependency
look you can have a lovely lesbian white hole
wait actually how does Steamodded even load NativeFS?
I think it just doesn't use it if it's not there
how the hell do you use the actual steamodded sound api
maybe just loading nativefs crashes the shader, period
it's in loader
look at jimball
i cannot for the life of me figure out the play function
i dont see anything
alr lemme paste the relevant source code
Alex did you see this btw? #âă»modding-general message
SMODS.Sound({
key = "music-Jimball",
path = "music-Jimball.wav"
})
if there a way you can load nativefs and not overwrite love.filesystem?
idts
thanks
do you play the sound through play_sound()?
ye
the nfs thing was supposed to be for thunderstore
but when I have talisman I don't hit that error, so I guess it's loading it in before this check,
and then it kills love.filesystem being used
well thats fun
any errors with these?
and yes SwordLunge is an mp3 i double checked
It can't open a .ogg file?
its an mp3 file
the error message doesn't say that though
if i have to convert every mp3 into an ogg i am going to die of pain
wait what
why is it trying to open an ogg
ogg files fail too
why is it looking in resources/sounds?
what the hell
it's doing some fuckery with looking in the base files
how do i make it do some virginity
ive been using play_sound('SwordLunge')
it there soething else i should use?
it happens to oggs too
play = function(self, pitch, volume, stop_previous_instance, key) this is how you play it I think
actually ima check if it happens for wav
oh you can do play_sound too
how do i do that in my gear code though
I mean I used wavs so đ€·ââïž
correct
although I just used play_sound so play might be bugged
I don't see play_sound anywhere in jimball
if you use mp3 in your mods i will hunt you down
it's a lovely patch
that explains that
AND IT THINKS ITS AN OGG FILE IN RESOURCES/SOUNDS
I also patched Steamodded to be able to do custom music
which calls play_sound internally I think
nvm it uses Sound:play
then make it an ogg file
then put it there
that doesnt work lol
it's not ebign registered properly
so it's ending up in the base play_sound function
doesnt work
try putting your mod prefix on the key in play_sound
oh
that worked
yay now i can release v1.2.3
g.jokers.cards
on steamodded 1.0.0?
pseudorandom_element takes a table as the first argument, not a cardarea
dang
cardareas are tables but hush
why must allat be so confusing goddamn
im at an impasse, should i change my mod to be 1.0.0a
pros:
-doing custom sounds and music will be (presumably) easier
-i wont have to update it later
cons:
-i have to rewrite the whole mod
-will be harder for vinny to download it if 1.0.0 is still in alpha
-future updates might break it
how time consuming is the leap to 1.0.0a?
porting is not that time consuming as you may think and you don't need to rewrite the whole mod. The main differences are in this guide (also mod prefix that isn't in it). Once you understand these differences it's just using regular expression to replace old code patterns with new patterns
Or using a for loop
I don't recommend this approach btw
If you already used a for loop then it ought to be easier
IIRC Betmma had bad coding practices 
I've never intended for that sheet to be complete, either
Pinging you to repeat myself: use a for loop rather than manually adding Jokers
but it's the only source of guideđ€ isn't it
I used loop to add jokers in my joker mod from the beginning but didn't use loop in my voucher mod
probably because there weren't many voucher mods to reference at that time
the best guide is the source code itself 

Choosing to understand Steamodded API has been a blessing. I can do anything.
Except UI
I barely understand UI
no one does 
Itâs so bad you probably canât make API out of it without it also being scuffed and unreadable.
hey is there any mod using take_ownership in 0.9.8? wanna check some examples
or its actually the same as 1.0.0 shown in the doc?
I kinda understand tooltips after theyâre created
the difference is that you can't give 0.9.8 take_ownership a table, you have to insert modifications yourself
e.g.
SMODS.Joker:take_ownership('joker')
SMODS.Jokers['j_joker'].config.mult = -4
(you can give SMODS 1.0.0 take_ownership a table????)
yeah
With multiple jokers?
no, with what you want changed
Learn something new every day
nice. got it
Iâm slowly getting a grasp of UI stuff but itâs a long process
so i tried like
SMODS["Joker"]:take_ownership('j_joker')
SMODS.Jokers['j_joker'].cost = 1
but it said j_joker is nil, in the second line. am i missing anything?
oh I'm sorry
I forgot you have to register in 0.9.8
mfw
SMODS.Joker:take_ownership('joker'):register()
mb
100 whippings
đ
straight back to the code factory
Ayo?
That is the most unhelpful crash log Iâve seen in a while
can you screenshot your install folder
Theyâre devving a mod
But why would you have crash reports turned off
I'm not sure why that would display
How is anybody supposed to provide any insight
what steamodded version are you using
@regal wolf
i fixed the issue
i should have seen that đ
oh
where can you find every joker in the game
in steamodded 1.0.0a
someone told me G.jokers.cards but thats just the jokers that you currently have
Maybe centers
yeah I think G.P_CENTER_POOLS.Joker should have them all
omg its finally starting to work
i love that sprite
isnt it awesome?
yes
i worked REALLY hard on the sprite!
i can tell
im not using steamodded 0.9.8
i think that's still there tho unless Steammodded just changes the whole code for the game
as in that should work for vanilla jokers at least
nvm it works, ty!!
np
steamodded 1.0.0 uses key instead of slug so i thought it might have changed
you may need to do something else for modded jokers tho, im not sure but just a heads up
Is this getting the name within the joker description?
You can use localize{type = 'name_text', key = joker_key, nodes = {}}
I'm trying to get my mod working for Steamodded 1.0.0 (I tested with 0.9.8, the last official release) and I'm getting a weird crash log. Something about a "regex" variant that isn't recognized within Toml?? I don't imagine this was caused by my mod at all. I downloaded the zip directly from the GitHub, deleted the old 0.9.8 folder in the Mods directory, and put it in.
update lovely
ah i got 0.4.0 cuz 0.5.0 is in beta so i thought i wasn't supposed to
how would i add the Blueprint/Brainstorm compatible tooltip to one of my own jokers?
someone tried to put it into my mod in 0.9.8 and it just refused to work so i have no idea unfortunately
ah, thanks
if anyone knows how to though id also like to know
why is my music still playing when music slider is 0 uhh
the problem here is that you're adding a string to your chosenjoker
and a string does not have calculate_joker
yeah that'll do it
So is the idea behind your card that it becomes a random joker each time blind is selected?
out of all possible Jokers?
yea
random shot in the dark, could you perhaps initialize a Card object with the corresponding joker? idk
You can store a joker inside another joker's config but be warned the game WILL NOT like it.
You could use the key of the joker to find it's config and call calculate from there.
I think you need to manually add it through main_end
I did that but with just the available jokers in your joker slots
so doing it with any random one would be pretty easy
Yup, this
well, now that i'm past a life emergency that kind of limited my ability to function socially... i figured out an effect for a card i made art for!
(i guess the updated art isn't in the game just yet; but that can be easily fixed.)
here's the updated art, for those curious.
(for those curious: it wasn't anything that affected me; family dog was just goin through some stuff and now he's better)
Any way to print the key(s) of the context (table) so I can figure out what the context for the trigger is to debug it? Would a k,v interation and printing them work? (Yup, printing the key worked fine for me)
randomly swaps between Amber Acorn, Crimson Heart, and Cerulean Bell
Reminder that this has all the contexts present https://discord.com/channels/1116389027176787968/1247703015222149120
Yeah it was more for debugging why the calc was triggered 5 times instead of once
Ah I see
I think it's just you
Just you AFAIK
I'm trying to modify suit functions that are for disabling & enabling/populating my suits, but I can't get them to work: I call :disable() on my suits, yet they still appear in card packs, what am I doing wrong?
update: nvm, it works, it seems like something else doesn't
nvm its just that i shouldnt use both regular jokers and jokers with soul sprites on the same sheet
how do I inject with lovely using multiple lines as a pattern?
Thatâs exactly what the base game does though
Regex? But I think it might just do the first. @gaunt thistle
Regex
How do I use it?
oh, found it, ty!
and 100% test your patterns with a tool like https://regexr.com
also keep in mind that you can keep your patterns short by using wildcards n such
regex is cool 
Regex is cool, but regex also hates you
\\s*\\ mania
firch cooking
yippeee
Is it possible to change the order of suits?
small thing but it feels wrong to have custom suits at the top of the list instead of the bottom
yeah...
my 3 new jokers
is there add_to_pool but for consumables?
or, a different question, which function adds the registered consumable to the pool?
add_to_pool is not limited to jokers
it works for anything that uses get_current_pool
in get_current_pool
sweet!
what are you working onđ
just a better way to hide suits
unregistering them is yuck and causes a lot of jank
King of um... idk
tell me when you find out that'd be really useful for the decks of 600 suits
if you will have a deck that starts with one suit and it adds more and more as the game progresses then yeah lol
So you need an alternative for 5 of Fleurons?
Alt F5
@frosty dock sorry for ping!
it seems that the poker hand preview doesn't work on cards that aren't in the pool, but are still registered. Which would make sense for something that previews cards elsewhere but not in the poker hand menu. Is there anything I can do?
I don't have registering/unregistering at all now, I don't use disabling (as in disable bool) either. I only change if suit is added to the pool
As soon as I populate the pool, the preview fixes
on the same note, custom suits still appear in the loading screen
is there an 'on play' function in pokerhand api?
I copied sixsuits' poker hand code and it seems like every straight spectrum is royal
Does anyone have any idea if it's possible to manually enable an entier mod only for a single deck.
Reverie for its own deck only in my case.
i don't know if the mod prefix is prepended to the suit but try adding your mod prefix?
If you want a mod to have mechanics only for a specific deck you can code interactions to check what deck it's in. Checking the source for Back:trigger_effect in back.lua might give some inspiration.
Thanks đ
where is calculate_enhancement located in the source code?
anyone know how to get this to not replace the name of the card yet still have a badge?
how do i stop my joker from shaking when winning the blind? it's activating an effect like Shoot the Moon / Baron for cards held in hand after a hand is played
check if you have an errant juice_up() somewhere
my code doesn't have any juice_up()'s in it
I think I had that backwards at one point, then changed it in SMODS code but not in six suits smh
I think you have an end_of_round context trigger; do sendDebugMessage(inspect(context))
another thing that is happening with straight spectrum is that it seems that the cards aren't scored at all
other spectrums work fine so far for me
hey, i have a joker that generated planet cards for your most used hand, but it generated them seemingly based on what the most used hand was at the start of the round. im guessing i need to change the underlined bit, but confused on what to change it to
I think G.GAME.current_round.most_played_poker_hand updates only at the start of each ante
it is used in blinds for that reason
refer to this code from the SC:
if G.GAME.blind:get_type() == 'Boss' then
local _handname, _played, _order = 'High Card', -1, 100
for k, v in pairs(G.GAME.hands) do
if v.played > _played or (v.played == _played and _order > v.order) then
_played = v.played
_handname = k
end
end
G.GAME.current_round.most_played_poker_hand = _handname
end
In other words, you have to set it yourself by iterating over the hands and checking the played stats
the SC? thank you tho
Source code
yeah but that was at the start of the blind
it was the most played at the start of the blind
the joker currently works most times but not when your most played hand changes in the blind
cursed
the cards are done with this shit
Laterr!!!!!!!!!
jokes aside, anything messing with the G.FUNCS.get_poker_hand_info or evaluate_poker_hand functions
"hell naw we aren't the royal spectrum"
this seems to just be giving me plutos
this can access this, right
OH
maybe updating order is missing?
like that perhapst
I, also, was wondering why that's missing in the literal source code of the game, but it seems to be working ig đ
How'd ya fix it
added the order update
must be some sorta difference for it only checking each blind
got another joker working
hell yeah
last question for tonight
this joker works but the joker message doesnt time with the card actually changing and it bothers me lol
is there a way i can fix this
Maybe move the card_evals inside the G.E_MANAGER
^
like, all of it, including the for k v?
try card_eval before the add_event for juice_up
id tried that first, is close but the transformation still happens before
actually
hold on
think i got it?
wow i tested it out and got this lmao
hmmmm
yeah that does work but its a bit fast
ill fiddle around with it more thanks
im ideally looking for how, say, midas mask or vampire are animated with their messages and card switches, but for some reason even copying the code it orders differently
How so
well, formatted like midas mask/vampire was how it was in the screenshot i sent
I mean what does it look like
event ordering is funny
Event handling 
the current version or the one in the code i sent
The one youâre complaining about
this is basically perfect just need to make a buffer between the trigger and the chip count
How does Midas Mask does it?
I feel like adding a delay would resolve it
But Iâd see how they do it
is there a way to make a part of the sprite change during the run?
I have these Jokers with a number on the bottom that changes depending on the used tarots.
Do I need to make a new full Joker sprite for every number?
like this
you can either use completely different sprites for each, or use a floating soul sprite for the number
@frosty dock it seems like your slothful & envious jokers do not work :P
(the suit jokers)
also all poker hands that aren't spectrum (and take spectrum as atomic part) do not score their cards
oh it's all of them?
I might have borked something in the API then
nvm I was just returning the wrong thing
yep
my suit mult jokers were missing effect đ



