#💻・modding-dev
1 messages · Page 62 of 1
if it's an object of a different type, it should all be fine, just note that the subordinate object type needs to be created after the caller
Could this be because of the PNG file not being an 8BitDeck one? That shouldn't matter 🤔, it's just the suit in a sprite sheet
else the class has already being injected by the time the new object is created
oh hey, that did fix it for hand sorting! now i gotta figure out the deck preview
Object A creates an Object B, which creates an Object A, which…
thanks :D
looks about normal, you don't have a loc_txt. I assume you don't have a localization file either?
this won't infloop
assume A is injected before B, then A creates B while all A's are being injected, then during injection of B's, B creates another A that never gets injected
Lemme double check (this is on someone's else's repo I just wanna make sure the actual setup is good)
and probably add it to the loc_txt
is the order just the order they are in the file?
I see, but then sometimes creating B inside A wouldn’t work, because the type of B has already been created, no?
generally speaking the order in which extend is called, be it in the same file or not
pretty sure you just need loc_txt to get your tooltips working
it's injection order that matters
if A injects before B, then A can create B's during injection because B's aren't yet injected. But not the other way around
That doesn’t clarify my question
that'd mean it works alright for your object creating an atlas?
yeah

then i don't get you
it doesn't matter if the type of B has been created, in fact you can't create a B if its type doesn't exist yet
oh you need some stuff for the loc txt
1 sec
return {
['misc'] = {
['suits_plural'] = {
['cere_Leaves'] = 'Leaves',
['cere_Crowns'] = 'Crowns',
['cere_Coins'] = 'Coins',
},
['suits_singular'] = {
['cere_Leaves'] = 'Leaf',
['cere_Crowns'] = 'Crown',
['cere_Coins'] = 'Coin',
},
}
}```
smth like that in the loc txt file
huh, weird that this fixes it for hand sorting but not the deck preview since they both use get_nominal!
oh
oh wait no it doesnt
deck preview uses registration order
specifically this
yeah i was looking at that bit... no way to really modify the object buffer order easily i assume
I’m not talking about creating a new type, I’m talking about creating an instance of a type
since SMODS itself registers the suits in vanilla order
obj_buffer receives keys at the end whenever objects are created
you could just manipulate that table
that feels ugly, but maybe it's the only way haha
I still don't know what you mean
You start creating object A, which creates object B, which creates object C, etc.
clearly when creating an instance of a type, the type has to already exist
You don’t even need different types actually
You could try to create the same type of object
The only other problem I'm having now is the texture just not showing up 🤔
creating an object of the same type definitely has potential to infloop if that's what you're saying. I'm not sure how exactly this works in lua, but I presume the for loop will catch the new elements
it's named correctly in my files and I think it should be called accordingly with atlas pos
did you use the correct infix key
actually it will definitely, given it just goes through numerically until it finds a nil
Aka prefix
If you didn’t set a custom one, it’s the first four letters of your mod’s name
Tried doing that with the hc and lc atlas, same result of it just showing hearts
lc_atlas = 'fam_webs'```
(fam is the prefix in this case)
i tried it with and without
in the constructor, the prefix is out of place
it's not needed there
actually this might be a case of the few select patches that the update broke
🤔 potentially
actually yeah that was about front sprites now wasn't it
so it's not gonna work till a smod patch is out, good to know
working on it now
Kinda suprised so little broke.
Basically just SMODS.Sticker application and front atlases
ig it is a cosmetic update so not much was added
i think the update next year is gonna be the one that breaks a lot
i still find it so crazy that i hadnt touched stickers until today, then i couldnt figure anything out and it turns out they just broke
🙏
aure the beloved
Joker idea:
Before your final hand of round, disable the Boss Blind
I also had had an interesting idea to disable the Boss if you play a Stone card, but I think it overlaps too much with my Stheno Joker
thats pretty cool, might 'borrow' this
Not if I borrow it first
got the suit order fixed!! thanks again for the help :D
turns out I wasn't injecting an atlas and my print message was wrong 🎉
is there a way to manually inject it?
I get an assert failure because it can't find the mod path, I guess because the current mod isn't my mod anymore?
oh right
I mean, I can just have the atlas seperate, it's not a big issue
in that case you could just use SMODS.Atlas.inject() and pass in the object to that without creating an object of this type
as in just give it a raw table
anyways there's your fixes for 1.0.1g
lemme know when it hopefully gets pushed for a fix
and if I need to change any other code
sir is fine
I'm looking at the steamodded wiki and I am completley befuddled
Assuming for dev stuff, since you're in this channel, what's confusing? There are some example mods in the steamodded files for another starting point, as well.
oke I'll check out the example mods thx.
how tf am i getting ghost patches
i do not have a patch for this
i swear
why is it there
wait thats probably a real thing isnt it
oh yeah that boss
still tho
my patches just randomly broke i swear
hey how does the new update effect mods
not by very much
the last fix that was needed was pushed maybe 15 mins ago?
It was all cosmetic stuff
Which files are modified with the new update
How would I be able to try and have the new suits I added not appear in the initial deck? I see that Bunco did it through essentially creating a new function, is that the only way it's possible?
huh? arcana?
nvm, I think I figured this out
nope; this straight up crashes
still have no idea where that arcana desc came from
oh
it's Other, not Booster
okay I'm going to sleep tomorrow I'll try and implement full suit texture packs
@zealous glen @shell tangle made a start, this is the entire defintion rn
AltTexture({
key = 'test',
type = 'Joker',
path = 'hd_jokers.png',
loc_txt = {
name = 'HD Jokers Concept'
}
})
oops sorry I missed this, it's not really a new function it's just in_pool controlling that. You just do return false whenever you don't want it to appear and return true if the suit should appear anywhere iirc
I think this should do the trick:
in_pool = function(self, args)
if your_thing_happens then
return true
else
return false
end
end
(in this case you can just return your_thing_happens I guess)
what exactly does key_append do in create_card()?
i'm trying to set up a deck with 5 eternal jokers
do i need a loc_txt for consumable types?
or can i fit it into the loc file
this makes it seem like i need a loc txt
unless im misunderstanding it completely
just saw this thanks for the update (no pun intended)
Looks like booster packs opening and closing even more hardcoded than shop
is registering locale-specific atlases possible for non-center objects?
or just having locale-specific version of an atlas in general
i should've probably checked the documentation first because it literally says it right there
do smods backs have an apply to run func or how does that work?
ty
config = {
vouchers = {
'v_clearance_sale',
'v_hone',
},
reroll_discount = -2,
},```
negative reroll discount lmao
Oih i like that
art pass, still thinking of the effect for the one on the right but i like how it turned out
art looks amazing
['b_cere_soul'] = {
['name'] = "Soul Deck",
['text'] = {
"Start run with an {C:eternal,T:eternal_sticker}eternal{}",
"{C:legendary,E:1}Legendary{} Joker",
}
},```
how do i get this to display the eternal info thing
ive tried T:eternal
it works for things like vouchers but i cant figure it out for stickers
uh you don't, it draws from centers, not loc descriptions
you can use a fake center
G.P_CENTERS['sticker_eternal'] = { set = 'Other', key = 'eternal' }
Hey guys what's the consumable version of jokers_to_create and G.jokers.config.card_limit?
if context.setting_blind and not (context.blueprint_card or card).getting_sliced and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
func = (function()
G.E_MANAGER:add_event(Event({
func = function()
local card = create_card('Spectral',G.consumeables, nil, nil, nil, nil, nil, 'poltergeist')
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
return true
end}))
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_plus_spectral'), colour = G.C.SECONDARY_SET.Spectral})
return true
end)}))
G.GAME.blind.chips = G.GAME.blind.chips + (G.GAME.blind.chips * (card.ability.extra / 100))
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
G.HUD_blind:get_UIE_by_ID('HUD_blind_count').UIBox:recalculate()
end```
consumeable_buffer
and G.consumeables.config.card_limit
My mods aren't existing and what is this error?
Give it a Soul sprite smh /hj
that might look really goofy, or really cool
lemme try it
oh
it just doesnt work
I think the rendering of soul sprites is hardcoded, so you need to add it to Backs
wayy too hard for me
It’s probably just a lovely patch copying the pre-existing call to draw a soul sprite
yeah exactly, way too hard
if you disabled lovely, that means your run save still has modded things. You would have to remove save.jkr from the active profile
Yeah that's talisman
I think
Talisman makes your save unusable on vanilla Balatro because it saves your high score as it's bignum / omeganum chicanery
I'm currently making a 'sandbox' challenge generator thing that is a python gui and generates a challenge.lua file with the specific parameters selected and you'd just save it to a folder in your mods folder etc. I only just thought about joining the discord and checking, but is there something like this already and I've wasted my time or is this something actually useful and desirable? I'm having it do jokers, if they're eternal or not, their enchantment (ie, poly, negative etc), cards in the deck (suit, number, enchant, seal etc), consumables and vouchers. So yeah, is there something like this already or shall I keep going?
Because yeah, this is what I have currently, it will auto produce jokers, cards and consumables in the correct format, I just need to add in vouchers which I will probably do with just checkboxes. But the big work is then making a reference library and list of all the names and their code counterparts for generation etc and also all the other file stuff and formatting in it. That's just very time consuming and if something like this generator already exists then I don't really want to put the effort in doing all that.
But if it's not already been done, I can have up on github this ready to be shared and tested/used later today/tomorrow. Future plans being able to easily input things like challenge name, author, game conditions/modifiers etc so it can be used to generate full challenges to be shared.
i honestly forgot
how do i renable it?
i tried reinstalling it
and it keeps on dying
so can someone send it
It’s probably being eaten by your AV
im now looking for a way for a joker to add mult AND THEN upgrade per card scored
which idk how to do since adding mult uses return
maybe add an event to add mult?
that way it returns first
if thats how it works im not 100% sure
ill look into events ty
the first half is done, now i need to figure out what to do with the other half
I'm guessing there is nothing already and I should just keep cracking on?
pretty much yeah
hello, im a noobie and im trying to change the game's sprite on my own, has anyone done that? i would really appreciate any help, specifically the cards
elaborate a bit?
Like what are you trying to change
im trying to change the hearts into little amongus guys
to fit the amongus collab better
i think i figured out how to change the sprites of the deck, but im trying to figure out if its possible to change the deck ONLY after pressing the "collabs" tab in the settings
I would say wait on it for now, I know someone is working on Alt Textures with the brand new stuff and idk if it'll be a seperate mod or in steamodded
Alt textures will likely be entirely separate to thunks stuff
does anyone have an updated method for making decks?
SMODS.Back is what you want, here's an example: https://github.com/Steamopollys/Steamodded/blob/main/example_mods/Mods/LabyrinthDeck.lua
A Balatro ModLoader. Contribute to Steamopollys/Steamodded development by creating an account on GitHub.
thank you
“Implements an unused deck hidden in the game's textures”
We have Golden Needle at home:
im making a mod with a friend (only problem is we have a very small amount of Lua knowledge) so it's taking a while to get used to
Yeah, unfortunately there definitely is a learning curve
My best advice is to look at mods or vanilla things that have done similar to what you want, and base your items on that
yeah, we've been looking through ModdedVanilla for it, i actually tried to get a deck going with Cryptid code earlier
it did not work
Cryptid uses its own system for registering items so that changes things a bit
Basically instead of:
SMODS.Back{
code here
}
we use
local deck_name = {
object_type = 'Back',
code here
}
how tf do you get the edition that a card spawns with in create_card
Where is ret defined?
If you do ret = create_card(…) I imagine that should work
ya thats what i did
idk then 
nvm it was just my stupidity, i forgot i had to make 1000 of the same edition to guarantee it appearing because i had no idea how edition chances work
its nothing
do you want to know what the edition of the card is? or make it a specific edition?
know what the edition of the card is
if self.sprite_facing == 'front' and self.edition and self.edition.type == 'cere_mint_condition' then```
if card.edition then
local edition = card.edition.type
end```
think you can use edition.key too
which ive been told is better
it be done
i added like 1000 editions because i thought it'd be funny
who did that 💀
^^
im told it was meaningful
I can almost garentee there's a better way of doing whatever they're trying to do.
wtf
so you want your edition to have a higher chance of spawning?
so you made 1000 of them
i edited the weight and it still took like 10 tries to spawn one so
if its just for testing you can do G.GAME.edition_rate = 1000000000000
or smth like that
well maybe actually
oh damn
im not sure what the order of polling editions is
💀
😭
you can always hook to create_card and do set_edition too
just do edition rate
look i was NOT smart
also debug mode lets you cycle editions
sorry im just tryna be helpful
not point and laugh at you
dw
as a rule of thumb for i in range 1000 is never a good idea
we arent pointing and laughing at all
even if i cycle im pretty sure it wont work since mine is hooked to create_card
everyone single person here has done silly things like that
yeah i know that
i once spent 4 hours trying to figure out why a feature wasnt working.
only to realise I hadn't actually loaded it.
😭
this is me but just all the time
happens to the best of us
The worst ones are barely visible typo errors
well i mean it IS funny sometimes
this is fine 🔥
Got back to working on it now and have vouchers and a library for them working. So it's just tedious library building and then non variable code formatting for the file and it should work. An example of what it's like though currently and the file it output
Got the extra common I need to drop in vouchers and consumables but yeah. It's promising enough at this point I'm confident in having it ready tonight/tomorrow
Do have to test if leaving edition written there but blank breaks anything though. As otherwise I've got a rabbithole of removing that from the generated code only if it's empty. Although I suppose I could just do a library where the names include that section of code but eh
hello, came back from my little adventure, i made some progress and i figured out how to change Aces using the ingame button, but i have trouble with trying to change other cards, i think aces were easy, cuz they are defined as "Ace", but other numbers are being read as values i think
if i remove the 2, the game runs without any problems
I downloaded lovely and put in but it does not respond
Looks like my early anaglyphic shader
it's probably the one in the steamodded examples
Yeah stealing is not cool
you're not supposed to just take an example and claim it as your own smh
They’re not even supposed to be in the examples, they were merged by mistake but I’ve left them to be an example
if you consider it stealing, might want to indicate it better
If people are taking them and using them I will remove them
Thank you.
and half of those are from google
^
???
@solid salmon if yours is crashing still because of "to_big", you need Talisman installed
and if that doesn't work, go to your appdata folder and delete your save.jkr
WHY
also
bro I legit explained why 💀
its not crashing
just add a disclaimer to shaders that you created yourself that they cannot not be used by other projects
its just load'nt
do you have a crash screen?
I’ll just get them removed
like it says to fail to load to_big
is there any other details you can give me?
Why lol
Because I’ve made them for a different mod and people are just ripping them
"ripping them"
They were never supposed to be in the example mod
im sorry but if you're upset, the only person to blame is yourself
they've been in the example mods for a long time
and the example mods have had that message about copying the code for your own projects for a long time.
You can't go around accusing people of stealing code just because you didn't fix your "mistake".
If it was a mistake, why did you leave it in?
yeah honestly if it's been in there for at this point months?
Exactly
Why didn't you remove them then?
he said it
Because I don’t have write access to the repo
every time i try and discard wit this 1 dumb, stupid, idiotic joker it gives me all my cards in deck, anyone able to help me? left is what happens when 1 or more cards are discarded, right is the joker
you could ask aud lol
And because people can look at them
right... so you left it in examples as an example...?
again lovely logs or anything else, because if you just have lovely it should load fine with the mods folder
in appdata/roaming
can we move on please
Maybe I have a misunderstanding of what examples are for or something
yea like my question <3 :)
But still, I’d rather it wasn’t used in whatever mod this person is making
Jesus
try both verifying files and deleting your save.jkr in appdata/roaming/balatro
i think it's appdata/roaming/balatro/saves
bruh- i straight up broke my joker
to_big is talisman
You haven’t got talisman loaded correctly.
again
Can you please show ur file structure
what does the talisman folder look like?
is your version.dll still there
no i deleted it
because smods didn't load
you need that
💀
That's the actual mod injector part
that makes steamodded work
which makes talisman work
😭
do i have to extract version dil
don't saves loaded with talisman work in vanilla after 2.0.0
please update all your mods, and readd version.dll
I think that's totally fine,but it's somewhat unfair to remove them completely since I already put some effort into adding explanations
adding disclaimer to those shaders you made yourself makes more sense - so it's clear that they shouldn't be used in any other mod
btw I really mean your shaders because e.g. sepia is directly from google, and I don't see the point in calling it yours
I'm trying to iterate through every Booster Pack, and I'm using this for loop to do that, but right now it just crashes the game for "attempting to call table value". Any help on what is the correct way to iterate through all booster packs?
for k, v in G.P_CENTER_POOLS["Booster"] do
does someone have the extracted version.dil
It’s the same with a few of them
how would i put a specific Joker into a deck?
like, when the player starts the run using this deck, they start with the joker
wait i might be silly
anyone? 👉 👈
You're putting the effect straight into the calculate function. You need an if statement with context
hmm so change calculate into context?
As of now, it's adding to hand_size whenever calculate is called
why is calculate taking info_queue 😭 where’s context
Check Merry Andy in the ModdedVanilla pack for an explanation of hand size
this better?
i may or may not have ripped the merry andy from moddedvanilla and changed it? :)
And you need to check for the correct context
where would i find this (i have about 5 hours of lua experience and started modding yesterday)
You should not be putting it in the calculate function at all, afaik
What do you want this card to do exactly?
hey do i need lovely.toml?
hands are random when round is selected :/
Right now, it's randomizing hand size literally all the time, which is what's leading to you drawing way too many cards
yea- i realized xD
kinda goofy lol
should i make it everytime the shop is left? its kinda the same, since you get put into the shop right after a round is done
You should have the calculate function like this
calculate = function(self, card, context)
And check that it's the start of the round like this
if context.setting_blind and not card.getting_sliced
hmm, thanks!
what does, getting sliced do?
It checks whether or not Ceremonial Dagger is destroying it. Wouldn't want it to have an effect when the Joker is being destroyed.
true
Are you just losing the dll to your antivirus?
You need to add an exception for it
How did you set your exception?
i went into the "quarntine" and restored it and gave an exception
Now can I get some help with this?
seeing as u helped me with smth that seemed so basic i lack the knowledge to help you in return :(
woops
What’s the full error and code?
"Attempted to call a nil value"
(It was table before when I was experimenting w/ other stuff)
for k, v in G.P_CENTERS["Booster"] do
end
end,```
Wrap the pool in pairs()
Ah, that's probably it
is there also a end of round? so i can remove the hands that are gained this round?
Yes, here's a full list of contexts
https://github.com/nicholassam6425/balatro-mods/wiki/Contexts
https://discord.com/channels/1116389027176787968/1247703015222149120 this one has more information
New problem
Are you using p_centres or p_center_pools?
Ah, I should be using center_pools
Yeah
I had that before but I changed it while testing :/
Centers is a table of keys and objects, pools is just the objects but split into sub tables
i cannot get this deck to start with a joker at all
and more complicated for my brain :>
Yeah but that other list misses out a lot of useful information
this is what happens when i try to extract
Add the whole folder as an exception whilst you extract
my joker is ‘j_bnan_bogdonoff’
i’ve tried setting the config “jokers = {‘j_bnan_bogdonoff’}”, tried creating an event to make the joker (which just doesn’t work)
it works! thanks <3
What’s your code looking like?
currently this (i was trying the config version with Abstract)
it doesn't look like backs support joker keys like that, you'll need an apply function
my programming might be a bit silly because i started in Lua (with this mod) yesterday
nothing wrong with your programming, you're just trying to do something that isn't possible the way you're doing it
I think that will be fine if it's in an event like the consumable one in back.lua is
btw you don't need to use {} at the end
It's not like HTML tag
it just means reset formatting
oh lol
like this?
oh ok
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
for k, v in ipairs(self.effect.config.consumables) do
local card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, v, 'deck')
card:add_to_deck()
G.consumeables:emplace(card)
end
return true
end
}))
end
code is scuffed but the format is correct here
ok
Yeah you only need to add {} if you have text afterwards you want to have the default text field formatting for
should i have another function inside the event or not?
yes, events need a function
hoping this works
return true after your materialize line
ok
i tried to start a run with the deck, the game crashed
center is nil
should center be set at this point?
can you send the crash?
yea
Oops! The game crashed:
functions/common_events.lua:2281: attempt to index local 'center' (a nil value)
Additional Context:
Balatro Version: 1.0.1g-FULL
Modded Version: 1.0.0~ALPHA-0820c-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.5.0-beta6
Steamodded Mods:
1: UltraHand by Xioxin [ID: UltraHand]
2: Baronana by Opal, Looby [ID: BANANA]
3: Inscrybed Jokers by LunaAstraCassiopeia [ID: InscrybedJokers]
Lovely Mods:
Stack Traceback
(3) Lua global 'create_card' at file 'functions/common_events.lua:2281'
Local variables:
_type = string: "Jokers"
area = nil
legendary = nil
_rarity = nil
skip_materialize = nil
soulable = nil
forced_key = string: "j_bnan_bogdonoff"
key_append = nil
area = table: 0x215b7d38 {click_offset:table: 0x21924848, children:table: 0x212466f0, shuffle_amt:0 (more...)}
center = nil
(*temporary) = table: 0x217345c8 {j_mime:table: 0x2173a580, j_ring_master:table: 0x2174ace8, b_challenge:table: 0x2175ec48 (more...)}
(*temporary) = number: 1
(*temporary) = number: 1
(*temporary) = number: 2.75122
(*temporary) = number: 0.0015
(*temporary) = number: 20
(*temporary) = number: 1
(*temporary) = table: 0x21b549c0 {click_offset:table: 0x21b54a88, children:table: 0x21b549e8, parent:table: 0x21b53d18 (more...)}
(*temporary) = nil
(*temporary) = C function: next
(*temporary) = table: 0x21b549e8 {1:table: 0x21b54b88, 2:table: 0x21b54d50}
(*temporary) = number: nan
(*temporary) = number: 2
(*temporary) = string: "attempt to index local 'center' (a nil value)"
(4) Lua field 'func' at file 'data/decks.lua:16' (from mod with id BANANA)
(5) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
self = table: 0x2168ef98 {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x216c6188 (more...)}
_results = table: 0x21939558 {blocking:true, pause_skip:false, time_done:false, completed:false}
(6) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
self = table: 0x217b1690 {queue_last_processed:6.9666666666666, queues:table: 0x217b16b8, queue_dt:0.016666666666667 (more...)}
dt = number: 0.00605956
forced = nil
(for generator) = C function: next
(for state) = table: 0x217b16b8 {unlock:table: 0x217b16e0, other:table: 0x217b1b58, tutorial:table: 0x217b1730 (more...)}
(for control) = number: nan
k = string: "base"
v = table: 0x217b1708 {1:table: 0x2168ef98, 2:table: 0x214754d0, 3:table: 0x216c8f90, 4:table: 0x219215f8 (more...)}
blocked = boolean: false
i = number: 1
results = table: 0x21939558 {blocking:true, pause_skip:false, time_done:false, completed:false}
(7) Lua upvalue 'gameUpdateRef' at file 'game.lua:2492'
Local variables:
self = table: 0x21250e58 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x21b511d8 (more...)}
dt = number: 0.00605956
http_resp = nil
(8) Lua method 'update' at Steamodded file 'core/ui.lua:81'
Local variables:
self = table: 0x21250e58 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x21b511d8 (more...)}
dt = number: 0.00605956
(9) Lua field 'update' at file 'main.lua:936'
Local variables:
dt = number: 0.00605956
(10) Lua function '?' at file 'main.lua:880' (best guess)
(11) global C function 'xpcall'
(12) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 851 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
for context, UltraHand allows you to select Jokers from the collection and InscrybedJokers adds 4 jokers
are you sure that's the correct key for your joker?
yeah give it a go
ok using abstract gives a different crash?
huh
Oops! The game crashed:
[SMODS BANANA "data/decks.lua"]:18: attempt to index field 'Jokers' (a nil value)
Additional Context:
Balatro Version: 1.0.1g-FULL
Modded Version: 1.0.0~ALPHA-0820c-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.5.0-beta6
Steamodded Mods:
1: UltraHand by Xioxin [ID: UltraHand]
2: Baronana by Opal, Looby [ID: BANANA]
3: Inscrybed Jokers by LunaAstraCassiopeia [ID: InscrybedJokers]
Lovely Mods:
Stack Traceback
(3) Lua field 'func' at file 'data/decks.lua:18' (from mod with id BANANA)
Local variables:
card = table: 0x27e31ef0 {click_offset:table: 0x27d78e48, children:table: 0x27e85e78, ambient_tilt:0.2 (more...)}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = table: 0x27ab74a0 {alerted:true, _saved_d_u:true, unlocked:true, _u:true, effect:Joker Mult (more...)}
(*temporary) = nil
(*temporary) = number: 0
(*temporary) = string: "j_abstract"
(*temporary) = nil
(*temporary) = string: "attempt to index field 'Jokers' (a nil value)"
(4) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
self = table: 0x2771d858 {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x278e33c8 (more...)}
_results = table: 0x27d17030 {blocking:true, pause_skip:false, time_done:false, completed:false}
(5) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
self = table: 0x27b2c0a0 {queue_last_processed:8.4666666666667, queues:table: 0x27b2c0c8, queue_dt:0.016666666666667 (more...)}
dt = number: 0.0060596
forced = nil
(for generator) = C function: next
(for state) = table: 0x27b2c0c8 {unlock:table: 0x27b2c0f0, other:table: 0x27b2c568, tutorial:table: 0x27b2c140 (more...)}
(for control) = number: nan
k = string: "base"
v = table: 0x27b2c118 {1:table: 0x2771d858, 2:table: 0x27a87160, 3:table: 0x27d36bd0, 4:table: 0x27e2fde8 (more...)}
blocked = boolean: false
i = number: 1
results = table: 0x27d17030 {blocking:true, pause_skip:false, time_done:false, completed:false}
(6) Lua upvalue 'gameUpdateRef' at file 'game.lua:2492'
Local variables:
self = table: 0x275f0cd0 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x27ecd1a0 (more...)}
dt = number: 0.0060596
http_resp = nil
(7) Lua method 'update' at Steamodded file 'core/ui.lua:81'
Local variables:
self = table: 0x275f0cd0 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x27ecd1a0 (more...)}
dt = number: 0.0060596
(8) Lua field 'update' at file 'main.lua:936'
Local variables:
dt = number: 0.0060596
(9) Lua function '?' at file 'main.lua:880' (best guess)
(10) global C function 'xpcall'
(11) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 851 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
Line 18 is G.Jokers:emplace(card)
oh it's G.jokers
yeah
did you define your mod prefix?
my mod prefix is "bnan"
ss your joker pls
the joker im trying to set in this deck should have the key "j_bnan_bogdonoff"
weak for a legendary probably
your key is j_bnan_j_bnan_bogdonoff
you dont need to prefix it yourself
smods handles that for you
should work now then!
thank you so much for your help
no problem, happy to help!
it's still giving me this crash, despite the fact bogondoff's tag should now be j_bnan_bogondoff?
my deck code uses j_bnan_bogondoff
Hmmmm
🤔 could it be the mod code header? Idk if it has to be formatted a certain way or not
well my joker has key = 'bogondoff' and the deck code looks for 'j_bnan_bogondoff'
the header looks fine
this key is different to the one you had before, you had bogdonoff
the key before was also 'j_bnan_bogondoff', so smod was making the joker's key j_bnan_j_bnan_bogondoff
is it bogdonoff or bogondoff
oh my god its a typo
happens to the best of us
its bogdonoff in the joker but bogondoff in the deck
just change it to bogdonoff it should work
i would have spent hours looking for a solution if it wasnt for yall, thank you
Who up bogdonoff their buskin
wawa
@zealous glen @shell tangle I've got it working based off individual keys now
Neat.
wtf
i just realized why beta languages don't work
somehow bound them to achievements not being disabled, of all things
aure, did you see this? #1209564621644505158 message
yeah i saw, must have forgotten about it
will add this in for now
there's a PR about similar things, but I'm not too happy with its current state
oh the betmma one?
yeah
yeah I wasnt too sure what the point of that was
oh I sort of understand the reasoning behind it upon further inspection
So I'm trying to make a voucher that makes it so Booster Packs contain 1.5x more cards. This is the code I have now.
for k, v in pairs(G.P_CENTER_POOLS["Booster"]) do
v.config.extra = floor(v.config.extra * self.config.extra.mult)
end
end,```Problems:
1. The voucher does not come into effect immediately, only in the shop _after_ the voucher is purchased.
2. This voucher does not reset after a run. It continues to be in effect during every run until you reload the game.
3. Speaking of reloading the game, doing that will stop the voucher from working properly.
Anyone have a good solution to these problems?
I'm possibly going to have the challenge generator done in about an hour. Would anyone be up for helping me test it to see if I've missed anything?
What are all the color variables that I can use in text localization? I can't figure out how to get the spade color lol
you can just search loc_colour in the source code. For spades it's {C:spades}
forgot the last s, thanks!
Nobody has done any mods where they've added extra card numbers right? Like things above J Q K A etc. Just checking as I'm trying to code my builder as mod friendly as possible with easy additions where possible. Add a new joker in? Just add it to the dictionary and you can use it in it etc.
steamodded has an API for ranks
not entirely sure if any mods that use it have ever been fully released though
I think the only one that's tried it is Everdeck
and that was the only one that ever got like anywhere
If it's got API for ranks I may as well toss in a library then. Will also do it for suits.
it did get dropped because the guy never paid for Balatro
I think
he modded it without fully testing all of their stuff and then dropped the project 
I guess this might sort of have its place, I just don't feel like it worth the effort for a layer of abstraction where not that much coding knowledge is required to construct a challenge in the first place. I like the idea, though I could imagine an in-game editor like in #1211808102999924746 could suit it well
that sort of format would also make mod support easier given you could basically only have text inputs for arbitrary modded jokers/vouchers/consumables or whatever
I dislike how phallic my code looks
Lmao
pretty sure 10 should be T there
I hate that it wasn't ever updated
😭
I've made a deck or two in lua but man I just wanna pick up and go
Ahh is 10 coded to T? Thanks for pointing it out
fair
Stuff like the enhanced decks from Cryptid definitely need code
🙂
or the suit only decks with no boss blind appearing
like the club deck where the club doesn't appear
I mean, I am making a deck building program
This is an earlier revision since I can't launch it currently with the dictionary changes etc
I feel again the only problem with it that Aure mentioned would be mod compat
it's why an ingame editor would be easier in that regard
Yeah true
there's only ever so many things you can support with a gui editor, but changing the starting deck and banning bosses isn't that unreasonable
Currently this just spits out a lua for a challenge which has the right deck and jokers etc
true.. not to mention like with deck creator that all becomes incompatible if Steamodded changes core components
like smodded 2.0 or whatever changing everything again would fuck it up
that's the only real "problem" with modders in the balatro community (or well any community), people will release a mod and then drop any support for it for a while until it's redundant
I need to work on having a previous popup window that handles stuff like author name, challenge name, game conditions, banned stuff etc
or well obsolete because old code
But for now just a basic start is what I'm wanting
best example I can think of with it is Jellymod since it was made before Steamodded was even a thing and unfortunately was pretty broken from the start
Regarding mod compatibility, I've made it that the libraries are easily added to for now, I can eventually have it that it enables/disables mod stuff to the libraries depending on checkboxes. But I'm shit with coding and hate doing it XD
jellymod is a tough case as it suffers both from early modding being widely incompatible with itself and also from being unmaintained
Again I can see that being way easier with an in-game editor. For example you could just browse the collection and use certain keys to add starting cards or ban certain things and whatnot
@mellow sable
yo
how can I get all the information on a legendary joker in an Immolate filter?
i see next_joker in one of the filters but it just returns the enum
are you using the C++ or OpenCL version
opencl
Oh for sure, auto detecting the folder etc. But I'm really not a coder. I can make this python script possibly read your mods folder though.
i wanna have access to the editions as well
next_joker_with_info
thanks
yw
does that return a JokerData?
not sure how you'd have python interfacing with lua that way, but sure
ye
alr ty
For a start it'd just read the folders in your mods folder and operate off the titles and a known list, enabling and disabling etc. It's possible to make it scan through the lua scripts looking for anything in the right style though but I imagine that'd take time/computing power and be pretty unoptimized.
Need to fix joker edition buuuut
This was generated by the program, so really close.
Lemme cook
This is only art so wip
tf are these
the Ace cards of the Minor Arcana
https://en.wikipedia.org/wiki/Minor_Arcana
The Minor Arcana, sometimes known as Lesser Arcana, are the suit cards in a cartomantic tarot deck.
Ordinary tarot cards first appeared in northern Italy in the 1440s and were designed for tarot card games. They typically have four suits each of 10 unillustrated pip cards numbered one (ace) to ten, along with 4 court cards (face cards). Tarot ga...
how would you add +mult to a card at the end of a round?
if its individual keys then having it in a cycles option doesnt really make sense
cus even in the video - you switched off HD Jokers and yet the changes made by HD Jokers remained
maybe it could be handled via a list where you enable/disable the various alt textures and order their priority? (basically like minecraft handles it)
I was going to be like "that's a strong tarot card" but it doesn't seem to be one?
No random crits
Does it only work on edition cards. If yes that's too niche if not that's too op lol.
Ayyy, generated code
Now to just get the other categories formatted and add the footer stuff etc and this is ready for people to test
Oh you're doing this on SMOD 0.9.8?
Oh wait got to change that
I dunno. I'm pretty much just looking at how other challenges are done and trying to work out how to make a template from that.
So guessing an outdated one
Is there an up to date challenge mod template anywhere?
My mod's challenges uses the 1.0.0 format if that can help
Or maybe SMOD wiki page have something challenges
Nvm it doesn't
Alright if I can copy your homework that'd help a lot XD
Perfect thank you
Shouldn't be too different from what you have
You can delete the INIT too it's unecessary in 1.0.0
Would it just be an SMODS.Challenge{ section I just put in for the file ? Guessing everything above that is checking dependencies for other mods?
Oh yea all the things above it is just stuff for my mod
unrelated to the challenges but why not use localization files
I haven't got to it yet
So this is what I've got in a file to just test it showing up and no dice. Not showing under my mods at all or in the challenges. My version of SMOD should be right, installed it yesterday. I only got Balatro on the 21st, sunk 80 hours into it, decided to get a custom challenge and edit it to do a test I wanted, then just went down this rabbit hole making a program to do it for me
does anyone know how I can make this show in a info_quene (the stuff seals and editions use)?
Got the program generating and working for me at least. Tested to be consistent for me, it's at least a start. If I can get the newer version of challenge mods working I can easily update the code and the way it generates the script. So if anyone can help with that I'd appreciate it.
@coarse nest for adding ranks here's some example code:
SMODS.Rank {
key = 1, -- the number or name (ex. "Jack") of your rank if it has one
card_key = 1, -- the short key put after the suit when coding a card object (ex. for the card "H_5" the card_key is 5). this seems to usually match the shorthand
pos = { x = 0 }, -- x position on the card atlas, here 0 because it's to the left of 2
nominal = 1, -- the number of chips this card scores
next = { '2' }, -- the next rank directly above it, not sure what this does?
shorthand = '1' -- used for deck preview (ex. 1 of Spades)
}
i haven't figured out how to get the rank to work correctly in straights, though
does anyone know of a way to make a UI element draggable?
this is one, i think: https://github.com/Toeler/Balatro-HandPreview/blob/main/Mods/BalaLib/BalaLib.lua
i have a local copy of this that i converted to 1.0.0 that i just haven't committed yet
i can push it up somewhere if you want
...I'm not even using steamodded for this mod
fair
but MoveableContainer is probably what I'd want, yeah
honestly not even too bad now that it's "working"
what's working?
it's draggable now
i removed all the fluff from balalib so now it's basically exactly what I want
all that's left is putting it into the right position
real
I plan on adding that feature tomorrow, shouldn’t be too hard
What do you mean?
It doesn’t have to a full sprite sheet, you can just have a selection of sprites as long as you tell it what they’re for
I’ll hopefully get time to work on selecting multiple packs today, going to concept a few different layouts first
Hey, you are genuinely a GUI wizard at this point
looks rly great
i love how the outline changes colour with the other menus
never noticed the game does that til now
Ayyy managed to get the game crashing from too many vouchers somehow XD I gave myself all the vouchers, once it played the foil shake animation for the jokers as they appeared and I assume started to load the vouchers, it crashed. So now might have to test to see the limit as to how many vouchers is too many.
Also, anyone got any examples of a mod to add in another button on the homescreen that then goes into a new page etc? Since I may be up for learning how to implement my deck generator into the actual game etc.
generally that's a bad idea because it goes off the screen if multiple mods try to do it
custom decks?! 👀
it's better to make a tab in the mod's page in the mods menu, like settings/credits tabs that usually exist
That would also be fine.
I've made a python program that allows you to custom generate a challenge with jokers, cards, consumables and vouchers of your choice.
So sort of sandbox modey
wow i would love to try this out some time
I've got it shared in modding
nice, i'll check it out once i got some time :)
Palette is broken though so avoid that and it should all be fine. I intend on pushing an update fixing it later though. Going to also add in the ability to change the challenges name, the deck used, some extra rules/modifiers etc if I can work it out.
But yeah, python script program is cool and all but yeah would be better to get it in game. So a tab in the mods page sounds good. How would I go about doing that?
Palette is no longer broken because it's been removed
You'll want a closer look at how the game's UI works, refer to this: #💻・modding-dev message
I was referring to my generator. I had a typo for it in the dictionary.
ah
One typo that really got me is consumables though. The game code and by extension the needed bit in challenges, has it as consumeables even though it's spelled right in game on display.
So I had the correct spelling in my generator and it wasn't working, had fun figuring that bit out.
where would i go to trouble shoot / get advise for why modding isnt working?
probably #⚙・modding-general for mod installing
if you are making your own mods, here
right when you thought you knew anything about this game's UI...
Assumption failed?
How do I draw a transparent box under a custom cardarea?
I tried this (which is a edited copy of a thing in CardArea:draw()) but it doesn't show up
MyCardArea.children.area_uibox = UIBox{
definition =
{n=G.UIT.ROOT, config = {align = 'tm', colour = G.C.CLEAR}, nodes={
{n=G.UIT.R, config = {
minw = MyCardArea.T.w,
minh = MyCardArea.T.h,
align = "tm",
padding = 0.1,
mid = true, r = 0.1,
colour = {0,0,0,0.1},
ref_table = MyCardArea}},
}},
config = {align = 'tm', offset = {x=0,y=0}, major = MyCardArea, parent = MyCardArea}
}
lmfao
i love it when atlas [a nil value]
how did we get here
im just trying to get my blind atlas to work
oh I mean the code snippet
its this, and then in all of my blinds i have atlas = 'bnanblinds',
what is your mod's prefix
oh is this another prefix thing
also make sure to add atlas_table = 'ANIMATION_ATLAS'
wait you dont need a prefix for your mods own atlases
^ this
i didnt do anythin
What we thinking? Have it all on one page/window or have them each accessible with a next button? Since I'm doing a page 1 for things like name author etc, you hit next then go to this window. I could make it that each get their own window accessible with next.
Looks cool, but why not just do it in game?
I'm working on the BU-CB mod and for that I'm just going to have a challenge maker in game
It's an eventual thing but I'm not a coder, a python generato is the best I can do for now XD
Ah, Gotcha
Ah if you're already on it I can stop then XD
No no!
I was just asking a genuine question
like maybe there was some upside I hadn't realised
There's more upside getting it done in game for sure, since you can interact with other mods and read their additions and add that to your options etc.
I guess the only upside to doing it outside of game is that I'm not even a coder and made a fully functional challenge generator in a day? XD
yeah its definately a lot quicker outside of the game
the ui engine is a little annoying lol
What mod are you using to inject the challenges?
If you're already working on one though I might just do this as a two page thing then, get the titles etc and just leave it as that to work whilst yours is being done.
dont let me stop you. mine is probably a little way away. I'm working on a few things at the same time
So I have it generating a full lua file for steammoded which you just make a folder in your mods folder with the name of your challenge, enter it, save the file to that and it'll be under your challenges.
Oh nice I didn't know steamodded did challenge stuff
--- MOD_NAME: Generated Challenge
--- MOD_ID: GenChal
--- MOD_AUTHOR: [HoneySoakedSeagull's Challenge Generator]
--- MOD_DESCRIPTION: A challenge generated with HoneySoakedSeagull's Challenge Generator.
----------------------------------------------
------------MOD CODE -------------------------
function SMODS.INIT.HSSCGCC ()
G.localization.misc.challenge_names['c_mod_GenChal'] = 'General Challenge'
table.insert(G.CHALLENGES,1,{
name = 'Custom Generated Challenge',
id = 'c_mod_GenChal',
rules = {
custom = {
},
modifiers = {
}
},
jokers = {
{id = 'j_marble', eternal = true, edition = 'foil'} ,
{id = 'j_marble', eternal = true, edition = 'foil'} ,
{id = 'j_marble', eternal = true, edition = 'foil'} ,
{id = 'j_marble', eternal = true, edition = 'foil'} ,
{id = 'j_marble', eternal = true, edition = 'foil'} ,
{id = 'j_stone', eternal = true, edition = 'foil'} ,
{id = 'j_stone', eternal = true, edition = 'foil'} ,
},
vouchers = {
{id = 'v_palette'}
},
deck = {
cards = {{s='C', r='K',e='m_stone',g='Red'},},
type = 'Plasma Deck'
},
restrictions = {
banned_cards = {
},
banned_tags = {
},
banned_other = {
}
}
})
end
----------------------------------------------
------------MOD CODE END----------------------```
That, bar the plasma, was fully generated with it earlier.
Ohhh ur doing it like thatttt.
Probably not the best way but it works XD
if ur not happy with that u could always make them inject into BU-CB
I've no idea how to do that. As said, I'm not a coder at all. I've no prior experience with lua, I literally just got Balatro on the 21st, sunk over 80 hours in a week into it, decided I wanted to do some ideas I brainstormed, made a custom challenge and then went into making this generator.
Balatro University Challenge Bundle - A Custom Challenge Mod - OceanRamen/BU-CB
i mean it looks great :D
this might be easier, and saves making a tonne of smod mods 😭
0.9.8 code......
Ahhh, so basically would just remove the header stuff, and just put return
tbf steamodded is really not too helpful with the whole 0.9 - 1.0
like the only "release" says "depreciated"
but its still 0.9.8 or smth
yeah exactly
And yes, it's working with my 1.0 version and I tried what I had seen written for 1.0 and it didn't work
still, i'd suggest against using 0.9.8 code
Well I can make the shift to BU-CB without much issue
I've made the code really easy to edit for what output you get etc
This is what I wrote earlier to control the header output in preperation for me giving the first page for inputs etc. I can just wipe this chunk out and do the return stuff etc
And yeah, I could have it all under the lua_code = but I want it formatted in the program to make editing easier. Which makes what I'm about to do simple as well.
Is there a way to credit an author for it? Or would I just have it as a ruled out thing in the file? Or as part of the callenge name etc
Yes
return {
name = "Fleeting Memory",
id = "c_mod_fleeting_1",
rules = {
custom = {
{ id = "all_perishable" },
{
id = "cm_credit",
value = "Djynasty",
},
},
modifiers = {},
},
jokers = {},
consumeables = {},
vouchers = {},
deck = {
type = "Challenge Deck",
},
restrictions = {
banned_cards = {},
banned_tags = {},
banned_other = {},
},
}
example challenge file
{
id = "cm_credit",
value = "Djynasty",
},
just add sometihng like this to the custom rules of the challenge.
Perfect thank you.
No problem
I assume that I can still use ' instead of "?
Good because it does in python XD
xD
The code generation part writes everything between the " so whenever a thing is quoted with " it can break that line.
why does BU-CB have no commits for two months lol
cuz it got moved to a dev branch
*repo
oh right
and then I started work on a new version of the mod
And generator is updated to output for BU-CB (bar credit stuff etc)
Looks correct yeah?
i think so
Bar some formatting mistakes I made for the gen, will fix that whilst adding in the stuf for rules and restrictions.
here it is reworked for 1.0.0 format:
SMODS.Challenge {
name = 'General Challenge',
key = 'general_challenge',
jokers = {
{id = 'j_marble', eternal = true, edition = 'foil'},
{id = 'j_marble', eternal = true, edition = 'foil'},
{id = 'j_marble', eternal = true, edition = 'foil'},
{id = 'j_marble', eternal = true, edition = 'foil'},
{id = 'j_marble', eternal = true, edition = 'foil'},
{id = 'j_stone', eternal = true, edition = 'foil'},
{id = 'j_stone', eternal = true, edition = 'foil'},
},
vouchers = {
{id = 'v_palette'}
},
deck = {
cards = {{s='C', r='K',e='m_stone',g='Red'}},
type = 'Plasma Deck'
}
}
(you can add the rules and restrictions the same way, i just left them out in the example for length)
For banned cards, consumables, vouchers, jokers and packs can be listed, I don't suppose that individual cards like the 6 of Diamonds could also be listed? I highly doubt anyone would want to but if it's possible I should probably include it in the dictionary list it references
I did try it yesterday and had no luck getting it to display. But thanks. I can give it another go but I have reworked it to output for BU-CB. I suppose I could add a checkbox to change whether you want to output for BU-CB or SMODS but that would depend on want.
i'm not sure, but you can try it and see if it shows up in the challenge preview screen or crashes
feel free to ask me any questions, i'm stuck at work atm but i should be able to help out
and here's a complete 1.0.0 mod if you want to reference: https://github.com/EvanCPSC/Balatro-Mods/tree/main/Fibonacci
has jokers, challenge, and a new hand type
I suppose the simplest question is, would it be worth adding an option to export it as an SMODS file or should I just leave it as BU-CB only
what is bu-cb?
This
hey real quick what's the scale and color code for light gray texts like this
i see, seems like if you're just focusing on making a challenge it shouldn't be too hard to make a file for both formats
you just need to replace the table.insert call with the SMODS.Challenge call where the formatting is basically the same
File for both formats is I literally just swap the return and the SMODS line depending on the state of the checked box.
Providing SMODS supports the credit stuff in custom still
scale is the same as the rest of the texts, the color label in loc file is {C:inactive}
thx
you'd also need to remove the closing parentheses at the very end, unless you make the first bit SMODS.Challenge({ (which i think is also valid syntax)
Oh and change id for key. Again not hard
yeah that's not bad
It's pretty much just two if statements and a checkbox
I used the smods.challenge code and yeah, it's not showing up. Is there a specific placement I need to put it or am I right with how I have it as the .lua in it's own folder in mods?
that should be all you need, you still need the mod header/footer comments and you also have to have steamodded installed
but if you have both of those it should automatically work
If you drop the lua file you’re outputting that might be helpful
Ahhh it still needs all the --- header stuff?
Also, can't seem to get banning individual cards to not cause a crash, so don't think that's possible so I don't need a dictionary for it at least
Tried it even with the header stuff, just swapping the body out for the new code and no luck still. I've not been using the generator for it, just copy and paste what was written etc. Once I have a confirmed working file I would then tune the generatos output
Can we see the file?
I've tried it both as just this
And as
Neither appeared
Regarding steammodded version,
could you show your mods menu? just to make sure that the mod shows up and doesn't have a conflict with another one
that's the most likely thing i can think of
And obviously all mine are just challenges. The generated challenge is what I change and save over with the new stuff and it just disappears from the list.
So yeah, unless a visual change or the enabler messes it up...
silly question but did you go to the last page of the challenges menu? modded ones show up after all the vanilla ones
Are your other mods from your generator?
i'm wondering if this is a mod id conflict
Do they have the same mod ids?
The ones by me use the older version. There's different mod ids
interesting...
i may be able to test your mod later today to debug but it'll be a bit
General Challenge is GenChal, Lucky Cat is LuckyCat, Hurru is HR
I might see about removing Lucky Cat and Hurru (Hurru was just a test gen to see about having multiple etc) and see if having the old challenge code there confused it or something
Yeah, removing the other two and having the header etc added does have it work
is there a list of all the context types cause i cant find anything on the github wiki
It might need some loc txt to show up? I dunno, everything looks fine and the mod is being loaded so 🤷♂️
Oh
Can I see the other headers?
So it must be defaulting to the older code type when it sees function SMODS.INIT.HSSCGCC ()
🙏 🙏 🙏 🙏
Welp, it's showing now with the other two added back in but ends up at the end known as ERROR
hmm, probably needs a localization/en-us.lua file
containing this:
return {
misc = {
challenge_names = {
c_mod_hr = "Hurru"
}
}
}
or whatever your key is with what the name should be
Sounds like it could be the culprit
I'll test it with genchal
If it works it's not hard to add onto the generation
Having no luck saving as it, it hates the /
that means a file called en-us.lua in the folder called localization
loc_txt = {
name = <name here>
},
in challenge definition
separate localization files are much more flexible though, since it allows changing the language instead of hardcoding the text in the object definition
Ah yes, I am an idiot.
this is for autogenerated challenges, and I think with generation it would be easier to do it in one file than in multiple
like usually I'd be all for loc file use, but for this usecase I feel loc_txt is the better solution
either way!
true
So generating an extra file isn't hard but regarding folders I'm not sure. It's probably pretty simple too though.
loc_txt supports multilingual definition so it could be automated to generate those too
it would look like this
loc_txt = {
<languagecode> = {
name = <name>
}
}
['en-us'] for english
Where abouts in the file is it to be placed? It keeps crashing my game on launch
Is how I currently have it
you forgot the ,
what's the error
In the challenge list the challenge shows as ERROR
the name should be a string
Yup working now
I'm really not a coder XD
I think my best option for adding in localisations would be to have a dropdown box of languages that reference a dictionary for the language codes and then has the textbox to put the name in it for those that want to.
Sound good?
That's actually easy to have added
i ain't one either, but with help from others i can make things work (team work (without me) makes the dream work)
so ['en-us'] = {}, etc
This is how my joker lines are generated
joker generator?!
With the written output being {id = 'j_marble', eternal = true, edition = 'foil'},
dang, u going to replace every mod with this one 😆
So would basically do the same section for localisations but obviously only for what's needed etc
but this is so cool! can't wait for it to be finished (and i mean finished finished)
challenge generation
So if custom joker generation (at least for existing abilities being reused but values tweaked/combined etc) is as I believe it to be, I can make a simple joker mod generator
the picture clearly says joker generator 🤷♂️
It's in the challenge generator
oh well
It's the code for generating jokers in the challenge.
there's a site for generating a joker mod already, although no calculate code
so the visual, mod skeleton and the loc_txt
I feel like the only non-challenge thing that can be generatable are decks (and even then they'd require assets so idk how you'd manage that) only bcos challenges are basically hyperspecific decks
which site is this? i am newly getting into modding and would be interested in a starter like this
So assets would just be a case of you'd have to have them already, can't get around that, but having the code auto generate based on selections is what I would be able to do. Having you name your asset etc. Basically I can make code be written and have strings be added and swapped based on options selected. So anything that can use that I can do
Asking again for help with this problem. I'm trying to make a voucher that makes it so Booster Packs contain 1.5x more cards. This is the code I have now.
for k, v in pairs(G.P_CENTER_POOLS["Booster"]) do
v.config.extra = floor(v.config.extra * self.config.extra.mult)
end
end,```Problems:
1. The voucher does not come into effect immediately, only in the shop _after_ the voucher is purchased.
2. This voucher does not reset after a run. It continues to be in effect during every run until you reload the game.
3. Speaking of reloading the game, doing that will stop the voucher from working properly.
Anyone have a good solution to these problems?
what you're doing is directly modifying the center, which is persistent
you may need a lovely patch for this
Ah, the day has come for me to learn how to do that?
look at Cryptid's Off by One
I think taking ownership of them and adding a modifier variable in there would also work
would that work for modded boosters
Errrrr
I’m sure you could set up a loop through the pool and take ownership of them that way
But that does seem kind of jank
it is
Making a lovely patch sounds complicated and I'm not afraid of jank, so sure, how do I do that?
that's why i recommend checking off by one
Lovely patches are super easy tbh
I've still never done one before
Then it’s time to learn!
Hooray
They will open up so much more for you honestly
Where do I start?
fellow mod devs i need assistance
tbh idk why I'm avoiding lovely patches when making my own stuff
steamodded uses a lot of lovely patches
Then look at the code in your lovely dumps to find your patterns
Where do I find them? The lovely folder?
ye
lovely patches are lovely.toml in the mod's root folder and any .toml files in the lovely folder
I'm trying to interpret this Lovely patch code and figure out what everything does. Let me know if I'm getting anything wrong.
[patches.regex]
target = 'card.lua'
pattern = 'G.ASSET_ATLAS\["centers"\]'
position = 'at'
payload = "G.ASSET_ATLAS[(G.GAME.viewed_back or G.GAME.selected_back) and ((G.GAME.viewed_back or G.GAME.selected_back)[G.SETTINGS.colourblind_option and 'hc_atlas' or 'lc_atlas'] or (G.GAME.viewed_back or G.GAME.selected_back).atlas) or 'centers']"
[[patches]] and [patches.regex] are required to make the code recognize there's a patch.
target is the file you want to patch
pattern is the specific segment of code you want to modify. I don't know what the \ means yet.
position is where you want to modify the code. before means placing it before that segment, after means placing it after that segment, and at means directly replacing that segment?
payload is the segment of code that is being added to the file at position relative to pattern
Did I get all of that right?
[patches.regex] specifies the type of patch. the other one that's ofte used is [patches.pattern] it's a lot more efficient than regex and enough most of the time, but it's more restrictive, i.e. you can only match single full lines.
if you don't know regular expressions, have fun figuring that out
the \ escapes the square brackets, which otherwise have reserved functionality of grouping characters together
.....
inconsistently either everything is animated, nothing is, or only the top half
Did I get everything else right?
yeah the rest is all correct
6 rows pls mr aure
the tooltips go off screen (yes ik I can re-align them but wtf)
is this some weirdness relating to updating object nodes inside other object nodes
Is default 5 rows of 6?
6
It would probably be easier to make them cards instead
it's a bit over-padded still but I can figure out the specifics for that once everything else is right
Like galdur does for stakes
You can use card areas then which are a breeze to update on page change
That’s a good question
ik it didn't work out natively for aura, but it might just be due to that one undefined global
Are you also planning on paginating tags and seals after blinds?
yes
🥳
How do you all code mods for balatro? Asking because I want mod for balatro. Are there any video guys I can watch?
there's some (written) documentation and lots of mods that you can look at for reference
do you have any experience with coding?
So when making a lovely patch, do I put it in the lovely folder or do I put it outside in the Mods folder
Where can I find the written documentation? And yes, I do have experience with coding + my father has been coding since 1986.
So any gaps in knowledge I have, I can ask him for help
There's some written documentation on the Steamodded Wiki
The Steammodded-main folder also has a few example mods
The #1209506514763522108 channel has some guides you can follow
Thank you, Lua is a language language I am not that strong in.
I also suggest either extracting the game file or looking through the lovely dump to see how the game does things
Anyway, where do I put lovely patches?
Because I know Cryptid both has a lovely.toml and a lovely folder
I think you can do both?
it works as long as it's in your mod's folder in either one of lovely.toml or lovely/*.toml
You can either have it as a "lovely.toml" folder inside your mod directory.
Or you can have it in a sub-directory inside your mod directory called "lovely"
for example
Should I have a mod directory? I've always just put things right in the Mods folder
Yeah
You definitely should
It makes debugging mods easier
It's the recommended way to do it if a mod is hardcoded
for looking for a specific directory
I mean it's just good for a million reasons.
Do I just add a folder inside of Mods, put everything in it, and everything still works?