#💻・modding-dev
1 messages · Page 41 of 1
I haven't looked at your calculation stuff at all, work's been crazy busy, but I'm not sure how you even get your effect in to EzSc_Effects looking at this code
I'd also make sure that you XChips calculation comes after the + chips block
probably really unnecessary, but it's funny and i like it 
(still got a few more things to fix)
positive energy for you from here 🔝
i'm just trying to have a global variable that goes through different files
I want the aChips() function to set that variable, and the game to read its value
that would solve my problem
oh of course I didn't look at the other images properly
that's only an explanation of the context
yeah I get it now
i am doing an unbelievable amount of nonsense to put a custom booster into 1.0.0
I want to have
calculate = function()
if context.joker_main then
aChips(20,card,context)
end
end
instead of the tedious return{} stuff
and you've already implemented +chips/mult and XMult?
once you do one, you do everything else easily
I'm still trying to solve this problem
other than xChips 😡
I thought the easiest path would be this, but I don't know if it's possible
I used to have a disclaimer that said:
"cerloCasa assumes no responsibility or liability for physical or psychological damages of any kind arising out of, or in connectoin with, the use of this mod"
just so people couldn't do "xChips 😠 "
i've done it
how to do lovely injections?
how do i make something give all the jokers in the deck a certain edition?
I mostly learned by looking at other people's injections
you need to see the balatro source code
injection allows you to add your own code before or after a specific string, or in place of it
I did this, hoping to get this result
the 'specific string' can be of multiple lines?
yeah
but I believe the only way to do that is with regex
you need to use pattern.regex
and specify pattern as regex
do you know regex?
This is an example of what I did for my mod
[patches.regex]
target = "cardarea.lua"
pattern = '''
(?<indent>[\t ]*)local deck_height \= \(self\.config\.deck_height or 0\.15\)\/52
[\t ]*for k, card in ipairs\(self\.cards\) do
[\t ]* if card\.facing \=\= 'front' then card\:flip\(\) end
[\t ]*
[\t ]* if not card\.states\.drag\.is then
[\t ]* card\.T\.x \= self\.T\.x \+ 0\.5\*\(self\.T\.w \- card\.T\.w\) \+ self\.shadow_parrallax\.x\*deck_height\*\(\#self\.cards\/\(self \=\= G\.deck and 1 or 2\) \- k\) \+ 0\.9\*self\.shuffle_amt\*\(1 \- k\*0\.01\)\*\(k%2 \=\= 1 and 1 or \-0\)
[\t ]* card\.T\.y \= self\.T\.y \+ 0\.5\*\(self\.T\.h \- card\.T\.h\) \+ self\.shadow_parrallax\.y\*deck_height\*\(\#self\.cards\/\(self \=\= G\.deck and 1 or 2\) \- k\)
[\t ]* card\.T\.r \= 0 \+ 0\.3\*self\.shuffle_amt\*\(1 \+ k\*0\.05\)\*\(k%2 \=\= 1 and 1 or \-0\)
[\t ]* card\.T\.x \= card\.T\.x \+ card\.shadow_parrallax\.x\/30
[\t ]* end
[\t ]*end'''
position = "at"
payload = '''
a'''
overwrite = true
line_prepend = '$indent'```
(?<indent>[\t ]*) is used to specify indent (for the followup code)
it's used in here line_prepend = '$indent'
eh that's probably too much to explain
- Copy all the code you need to find
- escape special regex chars on every line (I used https://www.regex-escape.com/online-regex-escaper.php cuz I got lazy, but it only replaces 1 line at a time 😭)
- copypaste this
you can use https://regex101.com to confirm it works
hey how do i make a consumable to changes the edition of jokers?
it has to be the first match or the only match?
that's why I always try to make matches unique
I did this
i don't know if I did something incorrectly
it says 'missing field: manifest' @languid mirage
version = "1.0.0"
dump_lua = true
priority = 0
You need the header part
at the top of the toml
got it
This is the file now ```toml
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]] # EZSC A
[patches.regex]
target = "functions/state_events.lua"
pattern = "}\n for k=1, #G.jokers.cards do"
position = "after"
payload = '''
-- EZSC START: A
EzSc_Effects = nil
print("EzSc_Effects is nil")
-- EZSC END: A
'''
match_indent = true
it seems like it didn't work
how does it look like in the game source
the line of code you're trying to change
also
you can just
payload='''
line 1
line 2'''
you should probably copy both lines
instead of trying to grab } at the end of the line
I believe you have to match entire lines
ye thats what I was trying to do as well
thats why I sent these steps with indent
corrected to this
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]] # EZSC A
[patches.regex]
target = "functions/state_events.lua"
pattern = '''
(?<indent>[\t])*\-\-calculate the hand effects
[\t]*local effects \= \{eval_card\(scoring_hand\[i\], \{cardarea \= G\.play, full_hand \= G\.play\.cards, scoring_hand \= scoring_hand, poker_hand \= text\}\)\}
[\t]*for k\=1, \#G\.jokers\.cards do
'''
position = "after"
payload = '''
-- EZSC START: A
EzSc_Effects = nil
print("EzSc_Effects is nil")
-- EZSC END: A
'''
match_indent = true
line_prepend = '$indent'
still, doesn't do the print
game starts tho
i'll try a different approach
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]] # EZSC A
[patches.regex]
target = "functions/state_events.lua"
pattern = '''
(?<indent>[\t])*\-\-calculate the hand effects
[\t]*local effects \= \{eval_card\(scoring_hand\[i\], \{cardarea \= G\.play, full_hand \= G\.play\.cards, scoring_hand \= scoring_hand, poker_hand \= text\}\)\}
[\t]*for k\=1, \#G\.jokers\.cards do
'''
position = "at"
payload = '''
--calculate the hand effects
local effects = {eval_card(scoring_hand[i], {cardarea = G.play, full_hand = G.play.cards, scoring_hand = scoring_hand, poker_hand = text})}
for k=1, #G.jokers.cards do
-- EZSC START: A
EzSc_Effects = nil
print("EzSc_Effects is nil")
-- EZSC END: A
'''
overwrite = true
line_prepend = '$indent'
Now it's this
basically I try to rewrite the whole block adding the EZSC block under it
still, doesn't work
@wintry solar @languid mirage i'm losing more braincells than i can afford
Is your patch actually applying?
i don't think, i don't know how to verify
check lovely console
the print function that I implemented didn't work
it should say if it does not
.
didn't know about that
Check the dumps
said that it didn't find matches
but I followed your guide
this should probably be here
Actuslly shouldn't \s also match tab?
yeah \s should work instead of [\t ]
it's broader, but shouldn't be worse?
its grabbing the lines before current
\s might also match \n
got it. sry
oh yeah, it does
now it's this
[[patches]] # EZSC A
[patches.regex]
target = "functions/state_events.lua"
pattern = '''
(?<indent>[\t ])*\-\-calculate the hand effects
[\t ]*local effects \= \{eval_card\(scoring_hand\[i\], \{cardarea \= G\.play, full_hand \= G\.play\.cards, scoring_hand \= scoring_hand, poker_hand \= text\}\)\}
[\t ]*for k\=1, \#G\.jokers\.cards do'''
position = "at"
payload = '''
--calculate the hand effects
local effects = {eval_card(scoring_hand[i], {cardarea = G.play, full_hand = G.play.cards, scoring_hand = scoring_hand, poker_hand = text})}
for k=1, #G.jokers.cards do
-- EZSC START: A
EzSc_Effects = nil
print("EzSc_Effects is nil")
-- EZSC END: A
'''
overwrite = true
line_prepend = '$indent'
still no print
Does it match?
WARN - [♥] Unknown key patches.0.?.overwrite found in patch file at "C:\Users\cerlo\AppData\Roaming\Balatro\Mods\Easier-Scoring\lovely.toml", ignoring it
why is ignored?
Overwrite doesn't do anything
Check the dumps folder and see if it succesfully patched it
where is it?
mods/lovely
Nah this isn't python
I finally found the solution
i am not telling you because you are gonna unalive me
or worse, kick me from the server
I have no stake in this game or mod perms
ok then
I injected it in the for k=i, #joker_cards do and I was testing it without any jokers in the jokers slot
yeah
be scared...
still waiting..
Waited like 10 mins before exiting the game, no luck 
How do I force a card's tooltip to update?
This card gives x1.7 Mult now (I'm doing a Hiker-type effect on it) but apparently just changing the value of card.ability.h_x_mult doesn't also change the value of the localized text
the tooltip is based on value in card.config.center
iirc autumn made something a while back that does that but dunno where they're at now
I copy card.config.center (so other cards and the default value aren't changed) and then modify its value. Remember to update value in center when loading a game since it will be the default one in G.P_CENTERS.
Does card.config.center store a complete copy of an element in G.P_CENTERS, or just a reference to it?
reference
Can I get it to point to another table that persists between game loads, like if I made something in G.GAME?
i think it's fine
All right, thanks! I'll give that a try.
Well that's not quite right.
Here's the code I was using. Theoretically this should work, so I'm starting to think the problem might be that the tooltip function only looks G.P_CENTERS to what to write?
local Card_get_h_x_mult = Card.get_chip_h_x_mult
function Card.get_chip_h_x_mult(self)
local retVal = Card_get_h_x_mult(self)
if retVal and retVal > 0 then
self.ability.h_x_mult = self.ability.h_x_mult + 0.1
if self.config.center == G.P_CENTERS.m_steel then
G.GAME.twewy_lapinSpecialCenters = G.GAME.twewy_lapinSpecialCenters or {}
local newCenter = {max = 500, order = 6, name = "Steel Card", set = "Enhanced", pos = {x=2,y=1}, effect = "Steel Card", label = "Steel Card", config = {h_x_mult = 1.5}}
self.config.center = newCenter
table.insert(G.GAME.twewy_lapinSpecialCenters, newCenter)
end
self.config.center.config.h_x_mult = self.ability.h_x_mult
end
return retVal
end
If someone could point me to where it actually draws that tooltip I'd love to take a closer look at it.
Take a look at generate_card_ui()
I think you can actually take ownership of m_steel and use card.ability.h_x_mult in loc_vars
That's probably easier than creating these fake centers, yeah
...or maybe not
generate_card_ui only gets passed the card's center, not the card itself, so I can't actually look at what what the card values are
Oh so it does! Wonderful!
If this works it'll be the easiest Lovely patch I've ever made
Well, it didn't work.
Oh that's literally just because I was trying to patch the wrong file
Okay, now it's definetely not working
oh, it didn't work? oh no
🎉
It was crashing, but that was because it couldn't find a card when hovering over the Chariot tarot.
I just added an if statement to use the regular localization if it can't find the card
pattern = '''elseif _c.effect == 'Steel Card' then loc_vars = {_c.config.h_x_mult}'''
position = "at"
payload = '''
elseif _c.effect == 'Steel Card' then
if card then
loc_vars = {card.ability.h_x_mult}
else
loc_vars = {_c.config.h_x_mult}
end
'''
match_indent = false```
Still a really easy Lovely patch, all things considered
Thanks for the help!
oo i need that for amplified
What do you think?
Iron deficiency
Very deficient since it's gold
Wow
What's this boss effect?
Currently Base Chips can't be greater than 50% money, but it might be too weak
what's the difference between chips and chip_mod, mult and mult_mod, dollars and p_dollars?
I could change it to Chips
where
evaluate_play
the values that jokers return
search for If mult added, do mult add event and add the mult to the total and you find the chunk i'm talking about
I think _mod is granted by the Joker while the other is by the card
Likewise p_ is by the card
these are essentially the same, just used interchangeably because thunk moment
Myst what do you think of the Blind icon above?
I did change the dark inner outline to a light one
I could just remove it completely like Violet Vessel
The bar's perspective feels off
Like maybe the right side is too steep compared to the left
Also gm chat
The right side?
I feel like I'm doing something stupid; Is it possible to inject with lovely into steamodded's changes? I feel like I could do it before but can't get it to work now
(as in: injecting into steamodded's injection)
Did you try changing priority in the manifest
oh, nope! forgot about that
is bigger priority = later or it's the other way around?
okay, will try anyways, ty!
how would one add a rank?
ik its smods.rank but looking at the steamodded files i cant really decipher how you would actually do that
priority 1 seems to not work, and priority -1 straight up crashes
😭
I have no idea what to do
rust jumpscare
Maybe try changing folder name to be before / after steamodded. I don't know if that will do anything but it might affect the order of the patch
yeah usize could maybe be changed to isize?
I assume comment that says does nothing means both dump lua and priortiy do nothing
But might be wrong Ig
Changed folder name, nothing
Kinda weird that it gets usize somewhere, but I never worked with rust so
okay because nothing works I'll ignore this thing for now,
Is there a thing in steamodded that lets to change joker sizes (like photo, square and half joker do)?
API functions you need to modify for it are provided, but there's no built-in way to do it (yet)
oh okay, thanks!
how would i use decks in steamodded 1.0.0
like how would i make something trigger when defeating a blind as a specific deck
I think i should make mod something like jestobiology
you can use a trigger_effect function for that (see the vanilla function Back:trigger_effect in vanilla code for reference
could you give an example
i do not fully understand how these things work
and i still dont know how i got this far without knowing
the vanilla function is an example, id imagine
nvm i found out how
somewhat
kind of
maybe
ty
why does args.context == 'eval' not work
its the exact same as anaglyph deck
without it it works (but with every context)
anaglyph deck doesn't actually work, from my experience
it WHAT
seriously, give it a try.
wait seriously??
yes, seriously, give it a try. i swear, it doesn't work, it's never created a double tag for me
if args.context = 'eval' doesnt work then what does
i don't know
config = {type = 'immediate'}
do those files return anything?
huh?
im juat trying to change my mod name
what does it do
it makes it work, at least when i did it
do I need to but if not self.debuff then in my joker's calculate?
no
okay so apparently args.context doesnt exist
did you try the thing i suggested?
idk soemone told me to do and it fixed my tag
im not making a tag
im making a deck
oh
for some reason args is just a blank table
{}
nothing inside of it
i tried checking length of args
0
https://regex101.com/r/TP3C6d/1
ngl this is a very nice regex to escape special chars for regex patches
ive tried adding new eval_card and calculate_joker instances with different contexts
but every time i try to add them, they seem to not work
ive been trying to add this calculate_joker call for when a debuffed card scores
(rest of the contexts)
it just doesnt trigger, ever
is there something im missing about patching in custom eval_card triggers?
make a loc description for it in Other
then pass {set='Other',key='whatever',vars = {'if you need them'}} into info_queue
if context.end_of_round then
...
for i, planet in ipairs(success_planets) do
-- need this bc OG doesn't accomodate for transforming planets
planet.config.card = {}
play_sound('card1')
planet:flip()
planet:set_ability(G.P_CENTERS.c_black_hole)
planet:flip()
trying to make some ability that transforms held planets to black holes. This works, but all planets flip simultaneously. How do I get them to flip sequentially? I've tried playing around with events and looking at Sigil, but I clearly have no idea what I'm doing because my experimental flailing around just causes infinite events and other problems
how do i fix this
The file path in your code isn’t the same as the location of the actual files
This also happens if you have syntax errors in the files you’re loading, so Jokers might have a syntax error
pretty sure those files have to return something, correct me if im wrong
Im trying to change the mod name
love getting stuck at a problem just to realise I was updating code in the game's source and not my lovely patch

anyways I guess I just need to figure out how to sort this 
i fixed it
I'm trying to pass vars to the deck, but it says that the vars are nil, am I doing something wrong?
(the numbers are temporary; I will replace them with config values later)
wtf that's a major oversight
loc_vars somehow went unsupported for decks
ohh
I know that there’s a few places that loc_vars were unused.
Mostly game objects in collections iirc
Probably should look through them
I've replied in DM
I'll have a look and see where else loc_vars support is missing
Hey guys is coding a consumable easier or harder than coding a joker
all other centers should be implemented as cards at least, so that part is standardized
I'd say it's a bit easier since you don't have to worry about calculation contexts
seems to work now! I only need to figure out how to fix my hoverable text
seems like seals are also missing
at first I tried to put just a table like I did in the info_queue (it looks like anaglyph deck does that kind of thing), but it crashed. now I'm doing this with localize{} but it gives ERROR
vars go in a vars table inside of what you return from loc_vars, for consistency
I don’t think we’ve looked into that for Steamodded, it’s possible it’s missing stuff.
{T:key} is how vanilla decks are doing it
ah
how do I check which key to use?
I mean, should the key exist only in certain part of dictionary?
I'd have to check the implementation, but I think a center with that key must exist
I believe I put my localization into descriptions->other, but it doesn't seem to want to get descriptions from that place
even vanilla ones
actually it has to draw from G.P_CENTERS, otherwise it wouldn't know which category to look in
that does seem to be the case
{c:green}1 in #{}
more like {C:green}#1# in #2#{}
it's 1 in 7
im making jonklers
(hint 99% quit before they hit big)
what did i do wrong and how do i fix it
you have no context check
if its that error in state events, thats almost always the case
oh
m
You should also give it a chance to create a jolly joker
why?
Cryptid reference
...
also why hardcode the probability :(
i dunno if it'll help, but i directly insert some loc objects in super auto balatro
i tried to code the probability by doing like everyone else
Would that not work with oops all 6's then
Yeah but you can just put the 7 in the config as a variable
It would, but it wouldn’t work with Misprint Deck
True...
then how would i make it create a jolly joker?
also i thought only the one had to be softcoded
Good practice for the 7 as well
look at what Cryptid does
im not looking at something that crashes my game
Why does it crash your game?
💀
idk it just does?
user error
local card = create_card('Joker', G.jokers, nil, nil, nil, nil, 'j_jolly')
card:add_to_deck()
G.jokers:emplace(card)
return {completed=true}
Ok here’s code from Cryptid that does the thing
thx
i hope you are going to credit me for the stack display code, it looks identical to mine 
wait so i put this with the other function
If you want the joker to do both things if you hit the 1/7 then yes (before your return statement, and remove the return statement in the code I gave you)
Ofc, I was going to ask before publishing, used it for testing purposes
Also I though it would be a good addition to Incantation (that's why I left a message there as well)
Tho tbf I have no clue how suit mods work and I have a feeling that my implementation might break/clash with some
Since I have to replace a lot of code in deck view
how do i make it negative
view deck is fully replaced by steamodded
you should be good if you base your implementation on that one
{completed=true} is apperantly a nil value
incantation's purpose is to enable identical cards to stack, what you're doing is moreso visual quality-of-life
i think it's better if you add it as part of Fixed Deck Size and rename that mod to "Deck QoL" or something catchy
Actually I tested without steamodded, will see what it changes 🤔
at this point the function in steamodded is fully incompatible with the original
I see, that could work too
it's also a huge optimisation mod, as deck view is instant with 500+ cards
that reminds me, i believe the game's framerate still dies when you have thousands of cards even with fixed deck size, let me quickly check to confirm that
I had fps randomly die on me when I was testing card stacker
But it got fixed after game restart
It's pretty weird
Ye I didn't really try to optimize the game, just limit amount of stuff being rendered and I didn't like gigantic card pile
neither did i, and i praise that
Not sure what goes behind the scenes to cause that much lag
i don't know, there's probably update() code that's being run on the entire deck or something
though i feel like if that were the case, the game would run a lot more slower than the current ~36FPS i'm getting right now
so, beats me
sometimes it feels like there's a memory leak or something - when I was going for naneinf in vanilla, after getting high scores, the game would become super choppy with only like 200+ cards in deck. then after game restart on next day it's back to normal
pretty weird behaviour
Hey so is it a good idea to directly base the mod I'm gonna make on codex arcanum
Just like reuse the code
no because codex is 0.9.8 at the moment
Alright I'll just do more concepting for now
Hey what's more "cookie"
the first one
how do i make the jolly joker have an edition and how do i make this end?
card:set_edition(edition)
and how do i make it so that i don't accidently get more than one?
also where exactly do i put that
after "create_card", but before "card:add_to_deck()"
Hey guys what's the balatro font
The one used on tarots and planets and stuff
Actuall I can just look at it nvm
Nice
yep
did i art
so I am trying to apply this patch to this loop
but I get this crash
I'm kinda confused because it should create the suits_sorted
nvm, it does not apply for some reason? checked in the dump folder, forgot it existed
both regex patches failed
but non regex applied
I'm so confused
because both regexps are valid
on the main.lua from dump
patches are in the same file
are the patches not applying in the same order they're specified? the only thing I'd understand is if all regex patches are applied before copy patch from steamodded
huh
according to this regex patches should apply last
so I have 0 ideas why it won't work 😭
Forgot to move the text box but it should go where that top arrow is pointing at
Put it before
So the entire line should be if context.joker_main and context.cardarea == …
ok
also iirc you have to do card:set_edition({holo = true}) to make a joker Holographic
aijfifoidsij
any reason why specifically Cryptid jokers are immune to my shader
idk
It’s an issue with Cryptid’s glitched shader too
Most of them are resistant to it
Does Jimball work?
Yeah only like 1 or 2 of them worked for some reason, Jimball included
And of Cryptid’s editions it only affected Glitched
Is there something different about… Jimball?
jimball too peak
Only thing pretty unique about it is that its extra value is a number and not a table
And also the special resizing thing and animation/music
Maybe animated sprites don’t respond well to shaders?
It’s the one that did
I feel like it’s some Steamodded issue but idk what about Cryptid jokers causes shader API to freak out a bit
And only for certain aspects of shaders
now how do i stop it from going over the card limit
Check if the #G.jokers.cards equals G.jokers.config.card_limit
where
what if i just put it below emplace?
That would just make it not give you the mult
so i put above local card
It’ll be an if statement so all of the highlighted code should go inside the if statement
what did i do wrong this time
jokers.cards not jokers_cards
oh
Oh looks like the daily episode of make ai gen gokus mod for him
...
mathisfun wanted me to make the joker make jolly jokers
i originally wanted it to give 25 mult and that's it
besides I can do some stuff independently
Thoughts?
it's off-center
what do you mean "Nope"
now it is centered
maybe you can try nudging it up a bit?
i'd say so
yeah i think its fine
let me take a guess, is this related to cookie clicker? 🍪
Yes it is
a delicious cuisine
I am once again requesting help 😭
I have 2 regex patches in this file https://github.com/stupxd/compact-deck-view/blob/main/lovely/steamodded.toml
which are both valid, but they can only apply to steamodded code (which is added from overrides.lua with a copy patch to main.lua).
I checked the lovely/dump/main.lua, and the regex should absolutely match the final code
but for some reason...
also I checked lovely and regex patches should apply last
so I am losing my mind over this
it's probably because your regex is applied first. unfortunately, lovely doesn't currently support priority
I'm not sure what to say about patching something that Steamodded has already patched. it's just not really possible now. maybe try renaming your mod to something else as a stopgap
see the issue is
it's not applied first
because pattern patches work from this exact same file
that's why there's an error in the first place
and if I'm reading this correctly, regex patch should apply last to a file
found a silly bug with lovely
@gaunt thistle
dw I created an issue
Regex patches are supposed to insert the payload directly at the exact point you specify (so, right before the indent)
The "correct" result would actually be ```
-- Pattern patch test
-- Regex patch test _n, _a, ......
regex patches are also weird with newlines
not enough people and time to fix lovely, unfortunately
proving my point. these patches are applied at the very end to main.lua
with simple logging
something really weird is happening there, and I have no clue why 😭
okay so applying regex patch over a regex patch seems to work?
This is wrong for reference, using a string of the edition key is preferable behaviour
I'm genuinely confused
taking ownership of specifically blinds makes them auto-discovered
maaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaan why does this work but not my other patches
hey, sorry I was under the misconception you were using beta6
really sorry for the extended miscommunication here.
if you built the newest branch directly then it's my code which breaks somehow
lovely
I just assumed because I haven't seen anyone in this thread go and build lovely themselves
well I only built it to test with logs
before that I was trying with lovely from whatever version was on releases page
there are behavioral changes to patch order in beta7. your original patches still break, right?
yep
full log here
I just escape everything with
https://regex101.com/r/TP3C6d/1
you can see both regex patches there
I'm at my wit's end here too. can you still try unescaping your commas?
gotta cover all bases
ok, thought of another method: bisection. start deleting half the regex at a time and see if it still results in no matches
good idea
ok game crashed before it even got to splash screen
soo
it does apply
I removed this part \n[\t ]*table\.insert\(SUITS\[v\.base\.suit\], v\)
maybe new line is the problem
like the new line from another file
is not \n
but like \n\r
or something
omg yes
\r\n
instead of \n
fixes it
well so we either convert \r\n in all steamodded files to \n
or I have to use \r\n everywhere I patch steamodded files
and do one big inline regex
😵💫
ok this would also work
yay
my brain is melting but at least it works
if \r\n is in a steamodded file, that's actually wrong
I would assume it is
I'd thought the line endings were fixed, there's a git file for it
file is overrides.lua
in fact, the problem might be when it's checked out on Windows- git by default uses the line endings of the platform you're on when checking out, I think
check the line endings in VSCode?
does anyone know how to use decks in steamodded 1.0.0
because i tried using trigger_effect
args is a blank array with nothing in it for some reason so i cant use it
ye it is CLRF
i just want to make something happen when a blind is defeated
ah ha. ok, I believe I can fix this
pushed a new .gitattributes file
see if this helps?
yea give me a sec
if i had a nickel for every time steamodded had an issue with CLRF, i would have two nickels
why the hell does this work
It indeed is
If you search for trigger_effect in this channel, someone else yesterday was having the same issue
Maybe they managed to find a solution, I wasn't paying too much attention
that was me lol
yes it is
Ah
Lol
to_big
if it works it works
how do i fix the code mathisfun gave
That's more or less how the base game does set edition no?
now it's not making any jokers
is there any documentation/examples on how to do the new card textures/reskins thing?
It is but base game edition stuff is horribly hard coded, the new set edition accepts the key of the edition instead, it looks cleaner and makes more sense imo
We’re still in the process of finalising stuff for this, hopefully it will be released within the next few days 🤞
ah okay, thanks!
is there a chip and money version of mult_mod
chip_mod
and what about the key a_
To change amount of money you can use ease_dollars(*here amount of money you wanna add)
ok
you mean a_chips? exists
no for the money
As I can see there is no a_dollars or something similar I guess
a_extra?
if you want a money message, Matador uses this
but you still have to call ease_dollars yourself
ok
you can also return p_dollars right?
or just dollars
or that might be on playing cards, I don't remember
that exists, I'm not exactly sure how/when it works though
Guys I have a small problem.
I want to open a random booster pack at the end of the shop. The opening of the booster pack works, but the timing is wrong.
Here the code
And this is what happens:
Any way to open the pack after the blinds pop up? Or just delay the code a bit?
I think the game just doesn't like that timing a whole lot
maybe look at how tags that open a pack work
also you shouldn't use math.random directly, results will be inconsistent on the same seed
use pseudorandom_element instead
alright, thanks :D
how do i make a card create a spectral
p_dollars is for indiv iirc
Does check_for_unlock even work now? Getting zero reaction from the game
nvm, I think I know why I'm getting zero reaction
💀 what
oh no, no I don't
I'm testing this by going into any challenge and then pressing the "Win this run" button
yet I don't have any messages
is there a way to make a joker that does not appear regularly
by using in_pool maybe?
any examples on how to use check_for_unlock?
I guess you can find this by searching for the function of the 6th Sense Joker
does anyone if there's a way to remove space between 2 text nodes in UIBox?
kinda just want to test how it looks but the only way to do it I can find requires a lot of effort (with localize)
Add a row node?
Maybe a column node?
Alternative I think there are some padding options
But maybe those are for row and column nodes
I have no idea how
is there an example I could look at
cuz searching for rownode or row_node returns nothing
rows are G.UIT.R
You can look at tooltips
Each line of a tooltip is a row
I think the boxes are rows too… maybe columns
Text backgrounds (XMult) are columns I think
Okay I tried to see what the hell happens with check_for_unlock, and it doesn't seem to ever work in challanges (while working just fine in normal decks)
Just put this message - never got any messages while playing a challenge deck, but got a lot of them while playing a regular one
ye
but there's a 'win_challenge' argument???
i wonder if its possible to create a joker with another joker
i assume you couldnt but it would be cool
ah I see
is 'win_challenge' arg type obsolete then?
super confused
you can simply search win_challenge in source code to see where it's being called from
so it shouldn't be completely obsolete it seems like
yep I mean I see it, but why would it exist if check_for_unlock is disabled during that???
I got this arg type from this in the first place
I'm sure SMods code is after that check
you can confirm in lovely/dump/functions/common_events.lua
yeah it is
lovely patches 
of course
yet still I need to figure out what exactly do I need
removing that challenge check doesn't seem like a good idea
OH MY GODDDD
"Talisman" 💀
hold on does the joker even work
HE DOES INFACT WORK
apparently jokers of the same key dont count as different jokers maybe??
also i cant place sprites on them i think
well of course, they're indexed by key
208 jokers but not actually
why are they all soul sprites
idfk
apparently it does not like setting an atlas
ignore the video in the background oops
please don't ping, thanks
soz
it should, but you can just return true in your object's check_for_unlock
💀
I made an injection
yeah i realized
so it works specifically for this
not sure what's not working then
the message is printed yet both unlock and return do not work
I'll try just returning true
without condition
?????
it crashed but after restart it seems to be unlocked
I heard unlock sound while it was loading, and after that it crashed*
yeah I get a crash everytime it is unlocked
(tried resetting profile)
it looks like knuckles
you don't need to send like 3 images of you changing your art slightly in a row
sorry
I thought it was funny
does anyone know why it wont add the name and description?
Nowadays I have a dedicated localization file
Are you sure?
wym
Check the wiki
it should be loc_txt?
for context this is not a regularly made joker, its made whenever you defeat a blind as a certain deck
I don’t think so but as I said I currently use a dedicated localization file
Okay the wiki does use loc_txt
Oh, I think then the issue must be it doesn’t reload the localization file
That would be my guess
wait you may be right
when I'm making joker art do i have to use the same joker thing or can i create my own format?
apparently it really does not like :process_loc_text()
Using differently sized Jokers require you to do some programming to display it correctly
...
okay I keep getting this crash at seemingly random times (I can guarantee it happens when I unlock first ever vanilla jokers by resetting profile and winning the run on the red deck, but other jokers unlock just fine), how can I fix it or maybe it's steamodded's thing?
Tried without mods, also happens without any mods
(also why the crash log shows disabled mods?)
Balanced?
Yeah cookies are basically just alchemical cards
alchemy cards but edible
i dig it
Cookies are done
(milk is a sellable joker that upgrades as you score higher hands)
Also here's golden cookie effects
If I had a nickel for every mod I know that adds Milk in it I'd have 3
Cool theme tho
Shimmer and getting Black Hole is like Soul and getting Chicot.
except you don't get $10
Just don't open a planet pack duh
Damn which other ones are there
spectral pack i mean
The two SAP mods iirc
also what are the exceptions of Eternal Taste?
Walnut, Dark-Chocolate, milk
Also idk how jimbos garden works yet but here's something that's also in cookie clicker
has coding for this begun yet?
COOKIE CLICKER?!?!?!?!?!??!?!?!?!?
Mhm
oops
Do you know my mod?
Yes
Speaking of which I should finish updating it to 1.0 then finally release it for beta @_@
I realised that I have been coding and testing my mod on steammodded 0.9.8. Is the standard now steammodded 1.0 and if so will it be a seamless transition or will i need to change things
Theres a 0.9.8 compat thing for 1.0.0 but its not perfect, it depends how big your mod is
Not that big it adds 8 jokers right now. Around 400 lines
Then it should be fine, tho if you only got 8 jokers you could transition rn to make it easier sooner.
Ah okay
1.0.0 api is like 10 times easier and simpler
Every game object is just a big table
locked decks in the steamodded are kinda awesome
Having difficulty finding something in the base game code - does anyone know where the after hand played step is located?
Trying to hook some code in there to make this deck work
it'll be down near the bottom of evaluate_play if I understand what you're looking for
Wherever context.after is called
Aha, that looks like the place. Thank you!
Is there a context for playing card removed?
Trying to make a joker with a trigger whenever a playing card is destroyed
Check context.remove_playing_cards and context.destroying_card
I’d write “Card with a Red Seal”
y
👍
Okay so I'm just gonna yoink the code for alchemical cards and then use it for my own purpose
Is that fine
Depends what you're gonna make with it
Just a different mod
Like I'm gonna change a bunch of stuff but like the basic structure of the UI and api is gonna be the same
which smods version are you using?
but why would you replicate a 0.9.8 version that had to write a load of stuff itself instead of using the 1.0 api?
omg cookie clicker mod
extremely reflective cookie
that last cookie seems weirdly flavored
Correct
isn't it Wrath ingame and not Wraith
u should fix that
using steamodded 1.0.0 pre-release/alpha/etc, are atlas for decks/backs bugged or am I not doing something correctly?
holy shit I'm stupid nevermind
probably should've done more research on the optional pos argument
This cookie was baked with love anger
haha... yeah,....
FYI 1.0 has custom Consumable and Booster support AFAIK
you also need to call process_loc_text on each one as well as init_localization at the end
its done! tysm!
Does anyone have any ideas for how I can control the sprite of a card without affecting other copies of it?
doesn't every node have a unique ID? maybe you can try something with that?
modify card.children.sprite or whatever Sprite object directly
Prob a dumb question im not on pc rn but is it possible to emplace a newly created Joker card at a specific index position?
cardarea emplace only has very front or very back
Having trouble porting my 0.9.8 mod over to 1.0.0. The mods I were using as a reference were in 0.9.8... Is this the direction the community is going?
Awesome balatro does not have many mods for 1.0.0
Can't you emplace then move it?
that list is heavily outdated
speaking of, should there be a more formal mod list that is not that repository's readme
Sounds tedious
we can probably change that, the location being front just sets it to insert at 1, it could easily be passed a number to insert at
(saying this solely because it doesn't have Cryptid nor LobotomyCorp smh)
to get current mult and hand_chips in my calculation, do I use G.GAME.mult and G.GAME.hand_chips? or are they just not global variables?
pretty sure they're local to the evaluate_play function
I'm modifying calculate_joker() and I'd like to use them
they're globals
thanks both
I stand corrected
How so?
Do you know if it's possible to include Blind tooltips in a Joker's info_queue?
🤔
Also not sure how it will look anim wise, tho iirc theres a Joker out here that swaps position, think it was Bunco
nope, not quite it, there's a joker that simply shuffles cards, it doesn't really swaps with anything
(I know I'm a bit late but I just saw this)
Cassette tape one right?
I mean it's close enough no?
I mean you can probably look into base balatro's shuffle function that amber acorn uses
That's what I'm doing 👍
IIRC it moves everything to the leftmost position
Oh Joker knight yeah
Sometimes breaking stuff is funny
hi
ive got a joker that retriggers aces
when it says "again!"
its somewhere in the top left of the screen
instead of underneath the joker
does anyone know how i can fix that?
ill try get a ss
try card = card
bald jimbo...
bimbo…
gentlepeople, I yet again need your help
I modified the calculate_joker() function to read the self.EzSc table I add with my Easier Scoring mod
This is inside the calculate_joker() function
if context.cardarea == G.play then
-- EZSC START 26
if self.EzSc then
if self.EzSc.aChips then
self:juice_up(0.5,0.5)
hand_chips = mod_chips(hand_chips + self.EzSc.aChips)
update_hand_text({delay = 0}, {chips = hand_chips})
EzSc_card_eval_status_text(context.other_card,'aChips',self.EzSc.aChips)
end
if self.EzSc.xChips then
self:juice_up(0.5,0.5)
hand_chips = mod_chips(hand_chips * self.EzSc.xChips)
update_hand_text({delay = 0}, {chips = hand_chips})
EzSc_card_eval_status_text(context.other_card,'xChips',self.EzSc.xChips)
end
if self.EzSc.aMult then
self:juice_up(0.5,0.5)
mult = mod_mult(mult + self.EzSc.aMult)
update_hand_text({delay = 0}, {mult = mult})
EzSc_card_eval_status_text(context.other_card,'aMult',self.EzSc.aMult)
end
if self.EzSc.xMult then
self:juice_up(0.5,0.5)
mult = mod_mult(mult * self.EzSc.xMult)
update_hand_text({delay = 0}, {mult = mult})
EzSc_card_eval_status_text(context.other_card,'xMult',self.EzSc.xMult)
end
if self.EzSc.dollars then
local JUICE = self
local MONEY = self.EzSc.dollars
G.E_MANAGER:add_event(Event({
func = function()
JUICE:juice_up(0.5,0.5)
ease_dollars(MONEY)
EzSc_card_eval_status_text(context.other_card, 'dollars', MONEY,nil,nil,{delay = 0.45})
return true
end}))
end
end
-- EZSC END 26
if self.ability.name == 'Hiker' then
...
I tried different times on how to make the Joker juice up, but I always get the timing wrong
for all the other contexts it was easier
This is the Joker
calculate = function(self,card,context)
if context.individual and context.cardarea == G.play then
aChips(30,card,context)
xChips(2,card,context)
aMult(8,card,context)
xMult(1.5,card,context)
addMoney(10,card,context)
end
end,
and this is the mod
male bimbo
mimbo
himbo
ty, the font colour is cos im using trance
oh
it matches the base games colours
looks good then 👍
lil jimbo is cute
when i first resized him he was terrifying
looks like all self:juice_up are executed simultaneusly
have you messed with event trigger timing?
sry pinged
Are you making Jokers able to have Hiker-like modifiers?
im on mobile and i miss the button sometimes xdd
I had added some of them myself in 0.9.8
I need to port it to 1.0 and I was going to push to 1.0
I'll show you what I did
as well as more Hiker-like modifiers for cards
search for -- EZSC START and you get all my modifications
I just would like to know "yes" or "no" :P
I think the answer is no
pretty sure its no
No
theyre making functions that make modifying chips/mult easier
I see
the mod creates a table in card.Ezsc which is filled with parameters you give using the functions like aChips() for adding chips
- You put
if context.joker_main then aMult(3,card,context) endin you calculate function - The
aMultfunction createscard.Ezsc = {}and addscard.EzSc.card = card, card.EzSc.Mult = 3 - The calculate_joker function reads from
self.EzScand performs the operations
thoughts on a mod based around playing 0 card hands
You just throw a brick instead of playing a card
More about 3.
In all the supported contexts there is this
if self.Ezsc then
if self.EzSc.Mult then
mult = mod_mult(mult + self.EzSc.Mult)
update_hand_text()
card_eval_status_text()
end
which is usually easy because card_eval_status_text juices up the calling Joker
but when context.individual it is more difficult because card_eval... juices up the played card, so I don't know how to juice up the Joker
why not put a juice_up in that function that juices up the joker
in context individual
you say to create a EzSc_card_eval_status_text(card,callingJoker) which juices up the callingJoker too?
and use that instead?
you can just do juice_up(callingJoker) right before card_eval_status_text(), i think?
By the way have you seen SMODS.eval_this?
might need to put it in an event
I tried and it doesn't work
because the juicing doesn't time with the played card's juicing
because card_eval_status_text adds an Event for juicing
try making the juice_up event trigger immediate and nonblocking
I'll try to add
if callingJoker then
callingJoker:juice_up()
end
inside this event
and pass self as callingJoker
Weird, I have a "card_eval_status_text" func spawning the text a bit lower than usual
Is the an updated list of mods for steammodded?
it works, thanks
dimserenes, probably
np
also thats a modding-chat question
so ask there next time 👍