#💻・modding-dev
1 messages · Page 33 of 1
See Aura which is using the ugly (?) way to animate sprites but it works for now
here's my idea
make a sprite for each joker as usual (no numbers)
make transparent sprites with only the numbers
draw them ontop using soul sprites or even just a shader
Nether reinventing Aure and Aura
None of those are real
You just made them up
Which means you can buy the domain names from me
The will be real v ery soon
from you???
Yes, pay up
why you 🤨
Because I own them
nuh uh
You’ll hear from my lawyers
im trying to update the enhancement collection ui to have multiple pages and im traumatized
since the enhancement api is terrible
i have to lovely inject everything
unfrotunately it seems like they are not going to show up in the enhancement collection page because i value my sanity
UI patching is seriously an awful time
props that you're attempting this in the first place
I gave up lol
For the sake of still having a desk
I remember people were talking something about hiker-like mult support for cards in 1.0, does it exist?
I think our PR that we’ve been working on for editions and enhancements has working UI
I think
At least it definitely works for editions
So I would assume ejwu replicated it for enhancements
btw what's the status on that currently? I saw it's no longer marked as a draft
I think all the base functionality works apart from extra scoring contexts
I can’t speak for enhancements as I haven’t tested those out, but editions can be created and have chips, mult and xmult modifiers
alright I just don't wanna be untimely with merging again
@sly forge could tell you more about enhancements, I think he’s done so 0.9.8 compat too
But I’m happy with where editions are at for now
We’re trying to think of the best way to add the advanced calculation, the current calculation stack is super jank
And I shall write docs for the stuff I have done over the next few days
is there any example of how to use it, and if it's even possible to use without enhancements/editions?
to use what?
Then, bump
Not yet AFAIK but me and someone else wanted to add it
Someone else isn’t around currently
I have code that does it for Jokers and I’d need to update it for more situations
ohhh, yeah I know about that, but it's fine
They had already done it but they aren’t around so v_v
well, thank you!
example of working editions (oh no negative playing cards has broken)
Good to see it working smoothly with Aura
yes, it's a shame the shader on that effect isn't very visible on lusty
coming soon don't worry friend
+10 seems a bit too good, lower it to +5 or lower maybe?
Make it +20 instead
no i was just looking for some direction for sounds
how do you add cards to a deck in Back.apply_to_run?
damn i get why yall want plug n play mods in smods now, starting this game up with smods takes kinda long
its like right in the sweet spot of not really that long, but long enough to be annoying
I apologize to anyone who has long load times due to the sheet amount of objects needing to be loaded for D6 Jokers.
nah the only mod i had was my own which shouldnt (?) take long to load
also i wonder how bad a huge modlist actually affects load time
For me it depends on what's currently open, but it's usually 5-6 seconds to load.
With this as the modlist
yeah it takes quite a while each load
lovely should prob do some caching too, should help startup perf
Ortalab is ported?
There’s still bugs to fix and address but for now the test branch is definitely compatible with Steamodded 1.0 0608a.
Probably also current as iirc there are no breaking changes.
Surely no secret crash I’m not aware of (clueless)
xdd
Nice
He from the future
is there a context for buying a joker
Probably
Cuz Drunkard
for what its worth i just want to calculate something upon picking up the joker
also add_to_deck
add_to_deck is what you want if you want your joker to do something when you buy it
will add_to_deck be better?
would that trigger upon getting it off like a judgement or smth
yea
this is my jokers effect and what i wrote for it btw
there MIGHT be a buying_self context? lemme check
buying_card
yea its buying_card
you can probably just use buying_card then check if the card bought is that specific joker
no buying_self, but selling_self does exist
yea i think i combined buying_card and selling_self in my head
how would i write that, if buying_card(self) ?
its a context
if context.buying_card and card == self then?
i'd check if card.config.center_key == whatever your jokers id is
instead of card == self
is that 1.0 or 0.9.8
both
gotcha
Why though
i'd imagine comparing tables is more expensive
Depends on what you want it to do
you could check unique_val or whatever its called instead then
isn't buying_card only a thing for vouchers
i checked, its for everything
ugh this is going to be annoying to test though
hm
im gonna have to reroll the shop until i get it lmao
why don't you just add_to_deck instead
and have the wording be "when picked up" or something
i think they dont want it to be procced on stuff like judgement?
honestly thinking about it
it would be so fucking funny
yea xdd
anyways chat, if you dont use any apis, turns out making mods compatible w/ balamod & smods is really easy
i think i can make super auto balatro compatible with both with a little effort too
ah
abt to code a makes rerolls free joker just to test this lmfao
shout out balamod console for having a luarun command so you can just forcibly add stuff to shop
so, context.add_to_deck?
add_to_deck is different from context
idk how smods does it but its basically a different calculate_joker
are you still on 0.9.8
yea
okay you still need to hook to add_to_deck sadly
API API for compAPIbility
i think i understand what hooking means now but not how i do so
something likke this?
WOW
grrr and i dont even see add_to_deck in the balatro code anywhere i swear ive checked everywhere
wait no its there im dumb
me when I'm in debt and this becomes negative XMult
good point adds if > 0 statement
Is there a context similar to remove_playing_cards that triggers when a joker is destroyed? (not sold)
iterate through the jokers yourself in remove from deck
Will the joker be in the removed table?
uhhh, can I use function for Joker's loc_txt?
What does the function do?
it returns different localization depending on condition
That sounds like it should work, can you show code?
yep, one sec
maybe loc_txt is being created at the start and isn't generated later at all, idk
loc_txt is called every time you hover
cool, then I don't see what I did wrong
in 1.0, you can use loc_vars
loc_txt is a table
loc_vars allows you to return a key field and it will use that loc entry
and the purpose is I want to change the amount of lines in the description based on context
yeah loc_vars works for that
so I return something like {vars = my_vars, key = my_key}?
yeah
SMODS.Consumable {
loc_txt = {
name = 'Dummy',
text = { 'Does nothing...?', '{C:inactive}(#1# remaining)' }
},
process_loc_text = function(self)
SMODS.Consumable.process_loc_text(self)
SMODS.process_loc_text(G.localization.descriptions.Spectral, self.key .. '2', {
name = "You're the Fool",
text = {
'?????'
}
})
end,
config = { extra = 10 },
loc_vars = function(self, info_queue, card)
local extra = card and card.ability.extra or self.config.extra
if extra > 1 then
return { vars = { extra } }
else
return { key = self.key .. '2' }
end
end,
}
example with irrelevant code cut
loc_txt isn't used directly anyways, it's just put into G.localization
well that'd be self
alright, will try, thanks!
Well it wasn't triggered on joker destroy
So gotta come up with a way to just, figure out joker destruction myself ig
@frosty dock Do you have a tip for that?
Okeydokey
is there a way I can put some helper functions in an other file and use them in the main one? Steamodded 1.0.0
Yeah
how?
1s im booting up my ide
sry
eww
... what'd you do 💀
idk, trying to follow the thing 💀💀💀
what function is that in, and how are you using it?
i literally can't tell from that
dunno why you'd process_loc_text at runtime though
It's just for return (this one is loc_vars)
Do I need to make process_loc_text function as an argument?
process_loc_text only needs to be called during injection
it's already present in G.localization after that
😵💫
iirc you would need to call init_localization again otherwise
doing this right?
okok
not the name of the table ^^
I have that same function. I’m wondering if I sent you this lol
(you did)
(i stole it)
great
🤝
fun fact: that probably happens when running this line of code:
table[index] = nil
i hope that was helpful
hope this helps!
try making this
table[index] != nil
I remember when I had this issue it was because the UI element was global
it also happens with this
table[nil] = index
but not with this
table.__index = nil
don't ever try this one
nil[table] != index
goofy C 1[arr]
(I'm not sure what's the first arg supposed to be in process_loc_text)
it also happens with
index[table] = nil
nope
that one's "Attempt to index a nil value"
What if the type of index is table and the type of table is integer?
the first arg is the table to add the localization to, the second arg is the key, the third is the localization value
that's fine, but it assumes the key is in the descriptions of the set that object belongs to
you can't easily pass it through if it's in Other
do I need to use .Joker or something?
By the way @frosty dock what if each Joker has its own atlas but it’s an animated Joker so the atlas has multiple sprites?
real confused
yeah
what about it?
it tells that ref_value is nil
ref_value is the key
do I need to fill it with something beforehand?
I just remember the idea being to force people not to use individual atlii but this is a good reason to
you need to put the key
oohh key as in joker's key
the text will be in descriptions.Joker[ref_value]
then how do I get the localization value itself?
oho
I think I finally got it
can I divide it even deeper in the descriptions.joker table?
so G.localization.descriptions.Joker.something[ref_value]
I think that breaks things?
uhmm
if you can put descriptions.Joker.something in ref_table, it will do that
given it exists
but I think it will break
did I get it right? I'm inside SMODS.Joker{ }
looks good for 1.0
yaay the description is empty but it doesn't generate that floating text anymore
you don't even need to elseif hell
saves the use of end though
it's cleaner though
do I understand correctly that this will create a new entry in G.localization.descriptions.Joker under the name of crop_circles with localization value/processed table of loc.crop_circles_exotic?
hows end spamming cleaner
also prevents unnecessary double checks
not if you're smart with your checks
end newline if is literally the same amount of characters as elseif
makes sense?
return
that'd work too, still i dont like if end spam
🧙*casts if-end spam*
am i the only one who uses separate ifs?????
your font gives me an aneurysm
I do
Skill issue
you're just having an umstroke
returning any key in loc_vars makes my description empty
I think it’s texteditorfontenstroken
well, apparently not
I don't think you need , in the function?
(second screenshot)
no, I'm wrong
it's the process_loc_text function that screws it over
do I even need to return anything in there
bingo
something appeared
i'm trying to set up Global Variables in the helper file "PT_RobinHood.lua", and I need to reset them every time I start a new run.
The code for resetting Global Variables in the main file is
local BackApply_to_run_ref = Back.apply_to_run
function Back.apply_to_run(self)
BackApply_to_run_ref(self)
G.mymod.var = 0
return true
end
so I reset var to 0, but only when var is in G.mymod in the main mod file
use G.GAME.your_variable for run-specific global variables
G.GAME.your_variable will reset to nil every time you will start a new run
am I doing something wrong?
or maybe it has mod specific prefix
The commas are wrong, too
this doesn't work for me either
what's custom_vars, i haven't heard of it
it's just loc_vars
i fucking did it again 😭
eh-?
I will put many helper files, each one with its global variables so I'm making this change. Thanks for the help ❤️
well why isn't custom_vars(self, info_queue, card)
because I don't use the info_queue and card args in this situation
hm
no clue
I used self.key as the second argument in process_loc_text and it showed me the second description instead of fisrt
I was like, maybe it generates some kind of prefix on both things then?
and I added postfix to both of them and they do not work again
what
???
am I stupid?
OH GOD
key doesn't even need the localization.description part
it gets it by itself
it works now!!!
@frosty dock tytytyty so much! I now understand what this goddamn function does
yippee
I can now make another wrapper for my dictionary using this
so consumeable == 'Justice' is wrong
completely
context.consumeable.ability.name == "Justice"
if context.using_consumeable then
-- When Justice Tarot is used, rank up (max Rank is 10)
if context.consumeable.ability.name == 'Justice' and self.ability.extra.Rank < 10 then
self.ability.extra.Rank += 1
sendTraceMessage("RobinHood rank is " .. self.ability.extra.Rank,"RobinHood")
end
end
.
if context.using_consumeable then
-- When Justice Tarot is used, rank up (max Rank is 10)
if context.consumeable.ability.name == 'Justice' and card.ability.extra.Rank < 10 then
card.ability.extra.Rank += 1
sendTraceMessage("RobinHood rank is " .. card.ability.extra.Rank,"RobinHood")
end
end
still error
at the card.ability.extra.Rank += 1 line
+= 1 is not valid lua syntax
card.ability.extra.Rank = card.ability.extra.Rank + 1

i tried the basic a = a+1 and it runs
day 3 or 4 or so of being angry and confused at lua for not having += and -=
now the hard part
arggghhhh!!!
the concept is right?
the 10 trigger will never proc
right, I have to put it in Loki calc
can't you use set_ability with the new card instead of destroying the old one?
how does it work?
like I have this weird card here
you need to use it 10 times before it transforms into The Soul
if I want to make a custom ability I have to use G.P_CENTERS[...] or another table?
you can use G.P_CENTERS
the main idea is this
but there are other Jokers I plan to add which change abilities depending on the rank, instead of destroying and creating others
so your advice was indeed pretty useful
to get the string 'RobinHood', which is the key of the Joker, I have to use card.key?
because I put pt_util.evolve(card,'Loki') in the main and
function PT_UTIL.evolve(start,end)
sendTraceMessage("Evolving to "..end,start.key)
end
but it doesn't show start's key
do note it won't be exactly 'RobinHood', it will include a type prefix and your mod prefix
first of all you can't use end as a variable name
it's a reserved keyword
yeess finally I did it and it works and I even tested it on french language and it works again!!!!!
victory
switching to dest now
🏆
I'd probably rather add my stuff to misc.dictionary because it's easier to access
oh yeah, will do that, ty
yeah it works but with the prefix
i can see why
now I have to add the other 3 functions
it would be good to see where the card table is defined in the base game
so that I can see which functions hold the editions of the jokers
again I think set_ability should get you around that
I think I messed up
incredible
the DEST card spawns but it has no edition
because you're not giving it an edition to set to
also these should not be globals
with debug you can press B to new game without having to load the save
TIL
changed to set_edition(Edition,Negative) and it works, but I noticed another bug
if I evolve n Jokers with different editions, it creates n Jokers with the edition of the last one
.
ok, how do I make them not globals?
above if start.edition then, add local Edition, Negative
yeah
you didn't do as I said
now these variables are local to that if block
you need to declare them outside of it
ok I misread
but now I know what local is
only negative works
all the Jokers had different editions
before and after
read your condition
you only do anything to the edition if the original card was negative
if Edition and Negative then
so just changing to if Edition then should solve
mhm
That is the jankiest edition code I have seen
But I don’t remember how base game set_edition is written
I'll take that as a compliment
hey chat any ideas on how can I efficiently count the most played rank?
I want to know how you would go about doing it inefficiently ...
idk using joker function as counter lmao
but what should I really use?...
context.scoring_hand???
you didn't have to reset profile
you can remove the save.jkr file to erase the saved game
just open balatro before you delete it, steam cloud resyncs files when you open a game
most crashes on pressing play are fixed by this
I keep thinking the .jkr files stand for .joker
they do
does anyone know why this isn't shrinking the hand size?
move h_size out of extra
thanks
Does anyone have an example of a mod adding a Joker in Steamodded 1.0? Cryptid does it in a loop in a way that seems a bit obscure
Actually I found one
six suits
do you have an example of eval_this in use?
not in any of my code, I don't think
Do I have to call it twice for chips and mult?
if you want two separate messages, yes
I guess it's slightly more economical than manually calling card_eval_status_text
it's just a wrapper for that, so I wouldn't expect much more
I'd expect a for loop
anyways, when do I use self and when do I use card in calculate?
self is the center object more or less as you define it
technically it's only there for consistency, as you could also access it via card
in other words you can be fine always using card
but static information like key might be easier to access using self
(self.key vs. card.config.center_key)
that should go straight to the documentation 🤓
Some custom API also might have the check between card vs. config longer.
D6 Jokers stores all the D6 side info outside of the joker config because the game hates it when you add an object into their ability config.
So it becomes self.key vs. SMODS.D6_Sides[card.ability.extra.local_d6_sides[card.ability.extra.selected_d6_face]].key
xdd
Do you think this would work?
== true
does context.adding_card_to_deck exist?

is it supposed to choose either chips or mult when you purchase it?
there's context.playing_card_added as per hologram
If it's a playing card then context.card.ability.set == 'Joker' would be false
so what is it supposed to do
i know
pseudorandom(pseudoseed('lucky'))
where's the question
this is historical revisionism
oh I deleted it because changing it to pseudorandom('luckys') fixed it so I assumed I was just dumb
thanks lmao
it's just that adding_card_to_deck doesn't exist unless you're adding it
== true
== true 😭
context.buying_card and context.card.ability.set == 'Joker'?
brb adding boolean values for maybe and maybe_not
I don't think a context exists for when a joker is added to your area
There is adding_card_to_deck
yes
is it something you've defined yourself?
yes
Does SMODS.current_mod use a forward slash between the Mods folder and the mod's folder?
the loader always uses forward slashes, as to work on all systems
clearly it's not working on mine @_@
I need more context @_@
Windows 11
I had / instead of \\ when I got that error message
okay how about you don't use require
what else would I use
load
what does it do
it's how steamodded loads files
you get the file content with NFS.read(path), then feed that file content into assert(load(content))()
but what does it do
require appends the file as if it were written there
I can also put a return at the end to recover specific local values if I want
it turns it into a function
The former is useful to hook, overwrite, or have globally accessible definitions. The latter is useful to iterate over data
iirc you can also return from it and retrieve those values
Cryptid uses it but I don't understand
@mellow sable can you explain how a minimal working example of using NFS to load a Joker can work?
so basically
you need to return the table in a separate lua file (not wrapped inside a function yet)
That's what I do with require
I use NFS.load to load the file
NFS.load(filename)()
then you can register a joker with the table that is returned
what are you calling
you just said it's not wrapped =_=
NFS.load(mod_path.."Items/"..file)
this is how I load a file
I then check if it's enabled in a config file
the file is basically loaded as a function
when it runs it executes the code in that function
It's the same as doing NFS.load(mod_path.."Items/"..file)() but in two steps
so it wraps the file in function() … end?
pretty much
why doesn't it like line 33 specifically
everywhere else card.config.extra works fine
is it not self.config.extra?
@frosty dock this is neither displaying the animation nor affecting the score 🤔
Aure said "you can be fine always using card"
changing everything to card.config.extra made gaining chips and mult work but it doesn't actually contribute to the score
card.config shouldn't have "extra" as the only values the game sets for it should be card and center.
what does ?= mean?
card being something (idk) and center being it's info in G.P_CENTERS.
so card.ability.extra?
Yea
It kinda works but it doesn't juice up the Joker and it's setting the mult to 2 instead of 3 when it should be 1 + 2 🤔
your config starts as mult = 0
yes, then it increased to 2 but the score's mult became 2 instead of 3
oh right
when it increases to 4 it still changes the score's mult to 2
do you need card.ability.extra.chips/mult in the return?
wait
I see the issue
alright it works but it still has no juice
@frosty dock disregard the previous ping. Do I need to manually juice up my Jokers when calling eval_this?
how to put vars into the blinds?
tried multiple methods
nvm I borked something
nvm no I didn't lol
well i used a patch that calls the blinds locvars so i only needed to do it once for the whole mod
patch is here you can probably adapt it without too much fuss https://github.com/Bazinga9000/MathBlinds/blob/main/lovely.toml
yeah I'm checking it already lol
that doesn't feel right
I would rather wait for fix
reasonable
i definitely dont think its a Good way to do this but it worked so im just keeping it until fix
thanks anyways!
np
am I stupid?
doesn't do anything
card:get_id() returns nil sometimes
very confused
oof I fixed it, I was comparing number to string
So I'm trying to create a new flag in the pool_flags to check if diet_cola has been sold. Is this the correct way to initialize something like that?
-- Creates the flag
local BackApply_to_run_ref = Back.apply_to_run
function Back.apply_to_run(arg_56_0)
BackApply_to_run_ref(arg_56_0)
G.GAME.pool_flags.diet_cola_sold = false
G.P_CENTERS['j_diet_cola']['yes_pool_flag'] = 'diet_cola_sold'
G.P_CENTERS['j_ghost_cola']['no_pool_flag'] = 'diet_cola_sold'
end
-- Modifies the `diet_cola_sold` flag
local calculate_joker_ref = Card.calculate_joker
function Card:calculate_joker(context)
local ret = calculate_joker_ref
if self.ability.set == "Joker" and not self.debuff then
if context.selling_self then
if self.ability.name == 'Diet Cola' then
G.GAME.pool_flags.diet_cola_sold = true
end
end
end
return ret
end
--------------------------------------------------
I'm on ver. 1.0.0 of Steamodded, and it's saying j_ghost_cola (a custom joker) is a nil value.
you might need your mod prefix in there too
does anyone know how to get this to only work if high card is played instead of containing?
context.scoring_hand == ‘High Card’
i think
with things like this you can always check the source code
thanks, I was trying to find a joker in the source code like it but all of them were containing. Where should I be looking?
https://discord.com/channels/1116389027176787968/1247703015222149120
This has all the contexts and calls
im so blind, thank you
to do list pops into my head
supernova also does
yeah
guys is there a context for the first operation?
So something like ['modname_j_ghost_cola']?
I can only think at
loc_vars = function(self,info_queue,card)
but this activates every time you hover with the mouse so it isn't a great solution
It wouldn’t be a context.
I think it’s j_modprefix_ghost_cola
It would be an “add_to_deck” function.
hmm, that doesn't seem to be working. I'm gonna try to see what it is registered as
how do I change this text?
Right now it is showing the Joker's text
but I have to put a message with what to do to unlock it
Ok, so I printed out G.P_CENTERS and my custom joker isn't even there. Would it be in a different place? Like under SMODS?
How do you print the table?
sendDebugMessage(tprint(table))
can I create a thread in this channel for asking for help on a function?
i need help for various functions and I don't want to fill the chat
I think I found the correct prefix. Hopefully I can get it figured out from there
How would I know if it worked or not? Do I just have to play for a while and hope that me not seeing it means it worked, or is there a way to view the current shop pool somehow?
do you have a generate_ui function???
don't see why not
try making a challenge that bans all jokers
I don't even know how to start making a challenge lol
f
not if you include a message like in return values from calculate
huh.
i kind of expected steamodded to be out of alpha by now; not to say that i think aure is slacking, just that i felt like i took that long of a break to where i fully expected to have missed the full 1.0 release.
it means it can be present but doesn't have to
oh
makes sense now
couldn't get any vars to work
is that something that needs to be fixed?
well I've had more irl things going on recently, and I just haven't quite been able to get docs for everything on the go
but also there's been some new features in the workings that aren't quite ready yet
yeah; again, i wasn't meaning that negatively! i guess i was just overestimating how long my break was
I don't remember testing that, something about it might require fixing
is it the not updating in blind select problem
if you scroll up the chat to yesterday you'll notice that my joker's code would add it to the consumables area.
No I don't have a generate_ui function ready
i had to do a lovely patch for that
Hmmm, I’ll see what I did different
that seems fine to use loc_vars for on current
is it patched now?
using loc_vars is equivalent to your patch, at least
what is loc.dictionary.most_played_rank?
you might have to use loc_vars function and pass it through localize
nah, vars is always most_played_poker_hand
loc_vars, not vars
also my dump looks like this
unless I'm dumb and that's somewhere else
you're dumb and that's somewhere else
oh i see
loc_vars is used in blind.lua, this is create_UIBox_blind_choice in UI_definitions.lua
i talked about this like three times already...
i don't recall being made aware I literally missed that function
I thought it was about something being wrong with a patcht that was already there
oh also I see why the end of round eval blind sprite is wrong 💀
💀
I put function/common_events.lua
incredible
it's a string that was processed with process_loc_text
when I put a string there, the blind shows it without issue, but when I put processed, it gives error
try on latest commit
brb
no luck
still ERROR
maybe it's the same problem I had with crop circles, where text wasn't processed at this moment
Like this?
SMODS.eval_this(card, {chips_mod = card.ability.extra.chips, message = localize{type = 'variable', key = 'a_chips', vars = {card.ability.extra.chips}}})
passing card.ability.extra.chips twice feels wrong
yeah
yeah I tried the same thing I had on my first screenshot and it works now
cool!
you'll see it's the same for return values from calculate_joker
Wait did I not see it when looking at my 0.9.8 code? 🤔
damn wait what do I use for different places?
oh yeah i also had this issue, look at my The Ancestor's code for how i did it
it's the same in the blind menu and in the run
haven't updated it to the latest commit though
there's nothing wrong on the screenshot
for ingame use loc_vars
yea loc_vars
ty myst!
love when everything works
satisfying
it looks wrong
should it be "all 2s"?
Yea
there's no plural rank loc
also this is wrong because it shows literal id as in number instead of the name of the rank
is it possible to convert id to name?
oh yeah
G.GAME.current_round.mail_card.rank is a string, I store my ranks as a number
which is probably wrong
yep
will try
wait
I probably need stone check if I use that
but seems to be working nicely (I'll fix the description)
will use this
while I'm still here, is this stupid?
I'm almost certain this is
for _, v in g.p_centers do if v.set == enhancement then enhancement_pool[#...] = b end
or something like that
basically this does not work on custom enhancements
can't you look in G.P_CENTER_POOLS.Enhanced instead?
^^
?x2
nah It's fine I'm just trying to figure it out
should be pairs(g.p_centers), set should be enhanced, keep it as v and not g.p_centers[v]
G.P_CENTER_POOLS.Enhanced but this is already a pool of all the enhancements
i thinkkkkk
why do you need to make another one
does it list the enhancement the same way I do?
can't find it
I tried it and I think it works
so yeah, thanks!
I don't know what you're doing with your enhancement pool, but do you even need to bring it local? the G.P_CENTER_POOLS.Enhanced just contains all the P_CENTERS of the enhancements
it would
hey, blinds also probably should have mod badges
at least in the blind collection menu
Thank you
do blinds have add_to_pool?
how to hide hidden planets?
no, but that's not a bad idea... they probably should have more options than min/max ante
currently you can only modify the blind pool by hooking to get_new_boss
G.GAME.round_resets.ante % 8 == 7
it's not something I critically need so I won't do injection just for that
Locked Joker's text
I'm trying to make an ability that pays out 300 chips every twelve times you play a 2, 3, 4, or 5, and I'm having a bit of difficulty with it.
config = {extra = {chips = 300, played = 0}}
calculate = function(self, card, context)
if context.individual
and context.other_card:get_id() <= 5
and context.other_card:get_id() >= 2 then
if card.ability.extra.played >= 12 then
card.ability.extra.played = 0
return {
chips = card.ability.extra.chips,
card = card
}
else
card.ability.extra.played = card.ability.extra.played + 1
end
end
end
It's correctly incrementing the played value whenever I play a 2, 3, 4, or 5, but it also seems to be incrementing that value for the joker itself. I'm not sure why - I thought that get_id would mean that it only triggers on playing cards, not joker cards.
you want to also check for context.cardarea == G.play
this will make the joker only affect playing cards
Aha, that should do it. Thank you!
also not end_of_round
what does end_of_round have to do
wait with G.play you won't need to I think
💀
context.individual and context.other_card show up three times, one of which is during the end of the round
hm fair
Looks like just adding G.play fixed my issue
Yeah, two of the calls use G.hand but the third uses G.play
is there a way I can condense this monster?
is that you
use tarot.ability.name as the key for the G.GAME.Util_UsedTarot table
this is not localthunk this is yanderedev 💀
sendTraceMessage("Adding "..tarot.ability.name.." to the table","PTutil")
G.GAME.Util_UsedTarot[tarot.ability.name] = G.GAME.Util_UsedTarot[tarot.ability.name] + 1
sendTraceMessage(tarot.ability.name.." has been used "..G.GAME.Util_UsedTarot[tarot.ability.name].." times","PTutil")
You're right
G.GAME.Util_UsedTarot[x] starts at 0 or do I have to initialize it to 0 when I start a new run?
neither
it starts at nil I think
this avoids the issue of trying to add 1 to nil ```lua
sendTraceMessage("Adding "..tarot.ability.name.." to the table","PTutil")
G.GAME.Util_UsedTarot[tarot.ability.name] = (G.GAME.Util_UsedTarot[tarot.ability.name] or 0) + 1
sendTraceMessage(tarot.ability.name.." has been used "..G.GAME.Util_UsedTarot[tarot.ability.name].." times","PTutil")
so you don't need to initialize it
when you use pairs to iterate over it (instead of ipairs or manual indexing), you won't find nil entries
the manual indexing won't work, but it's compatible with new tarots that have different names
you could use the key instead of the name to avoid issues when two tarots have the same name
by putting tarot.config.center_key it now has other mods support, thanks
so the function
function PT_UTIL.tarotUsed(tarot)
sendTraceMessage("Adding "..tarot.config.center_key.." to the table","PTutil")
G.GAME.Util_UsedTarot[tarot.config.center_key] = (G.GAME.Util_UsedTarot[tarot.config.center_key] or 0) + 1
sendTraceMessage(tarot.config.center_key.." has been used "..G.GAME.Util_UsedTarot[tarot.config.center_key].." times","PTutil")
end
works, but how can I create
function PT_UTIL.createMostUsedTarot()
like, how can I iterate inside the table if I don't know the indexes of the table beforehand?
for k, v in pairs(table) do
you could also keep track of the most used when you update the table
when you write for k, v in pairs(table) do i never understand what K and V represent
Key and value
when you update an entry to n and n > most_used_n you can set most_used_n = n and ``most_used_key = key`
that seems like the easiest solution
You could also order the table by uses and grab the first one whenever you need it
now that's a bit complicated for me
someone can help in this thread about locked joker's text? https://discord.com/channels/1116389027176787968/1251515004566372403
is there a function that runs whenever a new Joker is acquired?
Another question about my ability - how do I make it display a message whenever it increments how many 2/3/4/5s you've played?
calculate = function(self, card, context)
if context.individual
and context.other_card:get_id() <= 5
and context.other_card:get_id() >= 2
and context.cardarea == G.play then
if card.ability.extra.played >= card.ability.extra.req-1 then
card.ability.extra.played = 0
return {
chips = card.ability.extra.chips,
card = card
}
else
card.ability.extra.played = card.ability.extra.played + 1
return {
message = card.ability.extra.played.."/"..card.ability.extra.req,
colour = G.C.FILTER
}
end
end
end
This is how jokers like the Invisible Joker do it, but it's not working here. Does the message thing only work in certain contexts?
Every modded Joker I'm adding is linked to a Tarot (ex. joker01 is linked to Justice etc.) and whenever I get one of these jokers I have to add the linked Tarot to a table. Suggestions on how to do it?
whats the linked tarot table for?
a Joker has the ability "Creates a useful Tarot card at the end of the round" (useful tarots are ones which are linked to owned modded Jokers)
EXAMPLE:
Joker01 is linked to Magician, so Magician is useful
Joker02 (linked to Hermit) has the ability to create a random useful tarot every round, so it creates Hermit or Magician
I'd code those links into your joker definitions and then on the end of round calculation look through all your jokers and if they have the link, add them to a pool then
so add the function addToUseful(myTarot) inside context.joker_main?
Anyone want to test a Balatro coop randomizer??
yeah hold on let me clear my mod files rq
If anyone else wants to join, shoot a dm
set_ability
Just pass it to the Steamodded Joker constructor
Just like it did in 0.9.8
But in hindsight that activates when the card is created in the shop
So it’s really hooking add_to_deck
i was asking about archipelago
Well it’s usually when there are a bunch of islands next to each other
Serious answer on Archipelago - it links games together by having items from one game appear in the other game
So, for example, say you were playing Balatro and someone else was playing The Legend of Zelda
Aaah okay. That I don't know
boss blinds
one check for every Ante of a Stake of a Blind
it's a broken mess rn lmao
Is there video footage of this mod?
I’ll take video footage once it’s not a broken mess
lmao
count me in haha
Might also be able to test later tonight
what mod are these from?
Bunco I think
bunco blinds!!
bunco, yeah
these are in 0.9.8 and a little bit more than that, but those on screenshot are currently ported
too bad cruel blinds are 0.9.8
oh damn I literally can't access the part of archipelago discord that balatro is in 💀
gotta blame pegi
can you not get into ad?
in case you haven't noticed, my date of birth is literally in my bio
mobile bad i cant see your bio
It says you’ve been alive for 18 years
You know what I haven’t seen many mods add?
Tags
Might add those next to Cryptid to be the first 
I think I’ve seen a mod add Tags
if it's, like, new types of tags, don't think that's been done
but yeah you can already get busted amounts of tags with existing mods
YOU'RE MY AGE???
aintnoway
(well technically I'm younger by several months but still HUH)
lol what'd you think
I got the impression mostly everyone was an adult due to high knowledge of programming.
Anyways I gotta go and add 2D6 and D12 support for D6 Jokers
lmao
running into a weird issue with taking ownership of jokers
for which ver?
1.0
ok what's the issue?
so in cryptid I basically fully override green joker
to work with double scale
In Aura I override it and do nothing
when I play with Cryptid and Aura the loc vars are error
all of them?
let me test if the effect works
yeah the effect works fine
just localization that's screwed up
I’m an adult with a low knowledge of programming 
just pushed something, though beware it's not tested
lmk if it works
Why is this not working?
calculate = function(self, card, context)
if context.cardarea == G.jokers and next(context.poker_hands['Three of a Kind']) then
return {
chips = card.ability.extra.chips,
card = self
}
end
end
I'm just trying to make a simple joker that gives chips when a 3 of a kind is scored, and this should be more or less copy-pasted from the source code with the required changes
But every time I try to run it, it says that it can't find context.poker_hands
The confounding part is, I just finished a much more complicated Joker that, before a hand is scored, converts all cards into Bonus Cards if you played a 3 of a kind, and since that joker triggers if context.before, it isn't having any issues at all.
You need context.joker_main
Otherwise it’s going to try and trigger on any evaluation of the jokers area
Thank you!
hm
wrong commit
the one I pushed should be 0615b
aure is 5 years younger than me... aware...
💀
ok, it's about time for some HYPE. been working on a PR that includes 0.9.8 compat as part of it- you'll be able to load 0.9.8 mods seamlessly in 1.0! (except Reverie)
NOTE: this should not be taken as an incentive not to update your mods to 1.0
it's pretty smooth from my limited testing of it
"except Reverie"
well without lovely mods
I'll have another look around the PR in a bit, I'm hoping this is separate enough to not become baked into the main project
I simply can’t figure it out, so I’m staying on 0.9.8
you're free to ask any questions here
I'm aware docs are still incomplete, that's on me
but docs for 0.9.8 were never complete either
pro tip: just code everything with lovely injections so you'll never have to worry about compatibility
I think it's still possible to create something incompatible even with lovely injections
not even that hard in theory
lovely injection that prevents game from booting
👍
imo lovely is good when you're not touching steamodded api
that's why I use it alone for some mods (Trance, Ankh) but not others (Aura, Cryptid)
(I'm already touching steamodded api with lovely lmao)
well not a lot and a very minor thing
so still counts
lovely should be okay if it's non-destructive
update
I think I ported all bunco base blinds from 0.9.8
nice
time to start playing with it
in my modpack
lots of modded blinds in 1.0
out of the four mods I have that add blinds, all of them except Cryptid have this idea
bruh
So how do I install lovely on mac, it seems like I need it for 1.0.0
bruh
yeah i tried that, im trying again in case i did something wrong the first time
keep in mind you need to run run_lovely.sh to play modded, playing through steam won't work
i went though all the steps and it just errored
does anyone know why this isn't changing the hand size?
Is h_plays the correct name?
its the one troubadour uses
am i doing this right
k i think i got it working
that is syntactically not correct
can you point me in the right direction
local add_to_deck_ref = Card.add_to_deck
function Card:add_to_deck(from_debuff)
-- your code here
add_to_deck_ref(self, from_debuff)
-- or here
end
you also can't return from add_to_deck for an eval message, you have to use card_eval_status_text or whatever it's called
thank u based aure
new blind
oooh cool idea
