#đ»ă»modding-dev
1 messages · Page 31 of 1
it should, but that shouldnt change the functionality
ability gets copied fully, but it happens after the load hook
so card.ability isn't yet initialized with these values when using that function
If you reset the Sprite in set_ability does that help?
thats not called on load
Also, what you suggested aure, card.ability is nil at the point of set_sprites execution
so id have to rewrite some code to catch that, but card.ability is where the part im trying to access is stored so i dont think its gonna work lol
Itâs called when the card is created, and AFAIK loading the game recreates every card
I thought I tested it last time and it didn't work, but I'll test it again
first ill move stuff into extra
set_sprites should do for load
it's called at the end
though maybe there's no reason for the load hook to be this early
nupp
Works now
with set_sprites and some nil checks
I have a Joker that has self.ability.extra.whatever = stuff in set_ability and it works
hmm
I also think there's an issue with the Gear pool from testing but I had several other mods loaded so đ€·ââïž
@mellow sable did you do anything weird to cause that to happen? iv been trying to replicate it in a game but i got a trowel with it's full uses after already using one fully, and everytime i get a gear from the debug menu it doesn't come back with no uses, and in addition using two gears side by side still gave them individual numbers of uses
i think it might be a mod you had that interfered with the game's ability to distinguish between instances of an object
something definiterly is wrong with the gear pool though
it appears that it causes crazy amounts of jokers to spawn if you have one in your consumable area
i didn't really define a fallback gear
so it defaulted to joker
but i still dont know why the pool regards every gear as the same one
oh no the pool is more jank than i thought
local function fillInDefaults(t,d)
for k,v in pairs(d) do
if t[k] == nil then t[k] = v end
end
end
i dont know what went wrong there so i wanted to ask what i have to fix and how
t doesnât exist
Hey what is this super weird name
Yo my game is saying edition is nil but I've seen it used before in this exact way
That looks correct to me, what situation is it crashing in?
Try putting the card.edition.negative in a separate if block
Getting somewhere
ballmon
ballman
I should legally be allowed to murder anyone calling it a pokemon mod 
poketro
ur not so womp womp
Sucks
dude downgrading your 1.0.0 mod for 0.9.8 users is pain
boketro
polamon
pokeatro
yea, i found out it is 10x easier to mod in 1.0.0. I've already had multiple of my 0.9.8 problems solved from previous code thanks to 1.0.0 so converting it backwards is... pain
simply dont đ
they gotta make the switch eventually anyways
best solution
i really hope that 1.0.0 gets a full release soon
and the agonizing bugs with the pools it generates are fixed
i buy 1 modded consuable and now the shop is flooded with jokers
Are there gonna unique jokers for evolving ones 
base jokers
space joker's evolution is gonna be AETURNUS, THE ETERNAL LORD OF ALL SPACE AND TIME
1 in 2 chance to level up played poker hand
1 in Ï
wait is doing fraction odds legal
Is there a way to dynamically change a card UI_box content?
while its being displayed?
Like if an event trigger similar to a joker context
cant you just use loc vars for that or are you changing, like badges and stuff
Not really, because the card value I'm fetching only exists during card addition
This didn't work as well
And the card object from the UI func isn't really a card đ
In fact if I just have "if card.edition then" still doesn't work
remind me, what does the card object in the ui function contain
theres probably a convoluted path to get back to your card
alright im stumped
I could do a loop trough G.joker.cards if I wanted to maybe đ€ That feels so unoptimal lol
What's that?
its just a unique value for every object
so you can differentiate 2 exactly the same cards
i also dunno what your use case is, so maybe you dont need it
what's sort_id then?
But otherwise I can't just change the uibox content?
Iâm guessing the âcardâ here then is also not really a card like these others are discussing, can you see what it contains inside it?
you probably need a way to get back to the actual card object from wherever youre doing your stuff
I know the card when I do my stuff
Interesting, I'll give it a look
that exists only while youre hovering the card though
I mean that's when info_queue shows up so I guess it doesn't really matter?
and gets regenerated when you re-hover it
yea
maybe
yea i think its card.AUT.(probably a table name here).info or something for the info queue
i havent looked at code in a month so sorry if im wrong
Eh I'll just experiment, thanks a lot đ
maybe sort_id is within a card area, so you can have jimbo with sort_id 1 in jokers and jimbo with sort_id 1 in consumables
idk tho ive never touxhed sort id
i usually use unique_val just to check if the card im messing with is the card it should be
like "this affects all other jokers" type beat yknow
Victin (i think it was them) told me to use sort_id to save the joker im looking for
it probably works fine
i just found unique_val first so thats what i ended up using yknow
not me IIRC
then probably Math
Is that the unique value of each node?
yea
Is it saved?
every node AFAIK
But I haven't checked to see if it was saved when you saved the game
Because Card objects aren't
dont objects extend nodes
oh you mean like saved saved
also it's the other way around
oh
yeah saved saved not saved saved
the way i use it, it doesnt matter what the actual number is
Because Card objects aren't saved
so it can change and the use case still works fine
so if the unique ID is saved that helps
(im literally just checking if card.unique_val == self.unique_val)
i dont think its saved
pretty sure they get (basically randomly) reassigned when you re-opem the game
F
I'm talking about Node.ID
I don't think it'd help me
If it's not saved
Because I'd want a thing to remember a specific card
you can save a value to the game object
in fact, you can save anything to the game object
But it doesn't matter because Cards aren't saved
When you load the game, it recreates every Card
So the saved Card doesn't exist anymore
yea but it has to load the old cards .ability table
so you just toss whatever you want to be saved in there
card.ability.extra.remember = other_card doesn't work because other_card stops existing between reloads
card.ability.extra.rememberer = G.game.num_remember
other_card.ability.extra.rememberee = G.game.num_remember
G.game.num_remember++
boom
that's not helpful because if I need to iterate over every card to find out which card remembers which then there are better ways of doing it
First I'd need a list of all cards
then iterate over it
for each card that needs to remember another
thats like, 200, tops
(you might be able to do one pass by being smart)
well if you figure out a way lmk because im kinda curious what a good solution would be
Add a Boolean variable to each card and iterate over each relevant card when I want the thing that I want to happen to happen
if you meant specifically how to do a single pass, just as you go through cards, write down the first member of a pair/group as you go through the list, then when you find the other member(s), add it to the same list
But I don't think there's a master list of all cards
although maybe you can do it on Card:load
When the game loads cards don't exist yet
They're recreated
yes i know
which is why saving the Card object doesn't work
im asking if other_card is a center or a card
For me it was a Card
yes
because you can just iterate through the three seperately
I was mostly concerned with playing myself but in principle it could be extended to anything
but is there a list of all cards?
g.deck
aren't they removed from G.deck when they go to other CardAreas
iirc they arent
when i was testing beaver, it upgraded everything i think
i could be wrong
id test beaver again to see for sure, but im not home fr another day or so
im pretty sure it has sometjing to do with the translucent cards in G.deck
Looking at the sequence of calls they do seem to be removed
When I debug it it says AUT (or ability_UIBox_table) isn't a table
card.AUT doesn't exist.
AUT is defined as a local variable in G.UIDEF.card_h_popup, which is equal to card.ability_UIBox_table
If you want the ability UIBox table, you check that.
Yea I know I was just mentioning it to correct him
ah
But its weird cuz it says it's not a table?
Is it nil?
It does get set to nil when remove_UI is called
Might actually return as a UIBox
(which is a table so probably not)
If it's nil then it would return "not a table"
Which makes sense, it's only set when the card is hovered.
So it can't be modified
card.ability_UIBox_table is the same as card:generate_UIBox_ability_table()
If you need the values you can fetch it from there.
Hi guys, I'm migrating my mod to 1.0.0 but somehow when I use the function create_card i get this. It works perfectly on the 0.9.8 version
I just need to modify the UI box, like perishable in some way
Thing is it's different from perishable as a mechanic
Modify as in add stuff to it?
Not add, replace
The UI is screwed but hey, it works.
Corner stuff happened to me when I accidentally UI in the global scope
Screw it, no tracking
How would I make it not global scope?
Right now I'm copying how blinds are created in their menu with this as the text info.
Copying the name text from a different desc setup since name_text also contains the {C:attention} that I do for the normal description.
I think the issue is when the name or whatever the text is is created
What do you mean
ooooh what do those d6 sides do?
also why are thye hexagonal when a d6 is a cube
Because representing a 3D object like a D6 as a 2D image was too complicated so I settles with it being displayed like a revolver chamber. #âă»modding-general message
Hexagon is the best shape for that + it's 6-sided.
Nvm I got it working
The mod is also inspired off of Astrea, which does the same thing when looking at the die in menus.
Very simple way of representing it.
If only one side applies you only need to display that side
There's a selector sprite drawn to show which one is rolled.
It's the white line
Oh I know what you mean.
Don't like that idea as it means you won't know what the all the sides are.
You can show that on a tooltip
And have the current face display somewhere where you donât need to click to see
does anyone just have a joker template of a joker that just gives +4 mult
im still confused on how to make one do anything
I feel like the better solution is to just have the D6 in the art and swap the sprite to the currently selected one.
Something like that
I've made a joker with tons of tooltips, adding another one could cause it to not be visible when hovering.
You usually add the effect you want it to have inside the calculate function. The function should verify whatâs the context so it only does something when the context is right. In that case, then Joker does something
i understood that but
i didnt understand the basic mult stuff
just pure +4 mult
Find out the context for giving raw bonuses like that, then what to do for the game to compute it
In this case, Iâll let you know you can define an appropriate return as the game collects them and displays an animation
I think the context ought to be joker_main, which youâd test for with if context.joker_main then ⊠end
So it would end up looking something like
function calculate(self, context):
if context.joker_main then
return {something goes here}
end
end
ty
What is the context for a joker card that is in the available booster cards to pick from a buffoon pack?
I see context.open_booster, but is that for when it's first opened? I see Hallucination uses that
I donât think thereâs any
You can try set_ability and see if a Joker was created while the state is a Buffoon Pack and the Joker is in the right place
As opposed to being in G.jokers
Oh, I think I see what you mean. Is that section a cardarea perhaps?
I donât know
I'm gonna try to send some debug messages and figure it out. Maybe it'll show me
You can just see where Buffon Packs add cards to
I didn't think of that. That seems much easier
It looks like this might be what I'm looking for... checking if G.STATE == G.STATES.BUFFOON_PACK in my calculate_joker function
I had already said that
But remember I also said they need to be created in the right place
Oops, I didn't realize that. But all I'm really doing is adding some text to its description so I'm not sure that's something I need to do
Judgement
Wait what about Judgement? I'm not sure I understand
<@&1133519078540185692> bot?
It can create a Joker at any time
Including when the state is G.STATES.BUFFOON_PACK
what in the world
Lol
Yeah that ain't a bot
I saw the posts and the bio and I was suspicious
People have have links in bio we only band posted links
That's a discord feature?
Yeah, that shouldn't be an issue. All I'm doing is appending the sell value of the joker to the end of the message. It goes away as soon as the STATE isn't BUFFOON_PACK
Thatâs not what I was referring to exactly but anyways
Then you donât care when theyâre created, just for the current state, unlike what you said
I still think itâs weird to have it show up on every Joker when the state is that tho
As opposed to only the Jokers you donât yet have
Yeah, that's true. I probably need to make it that way
Is the pack its own cardarea? That would be easy to check for if so
Yeah, I was hoping that was the case. I need to do a little more research to see if that's a thing
If itâs not itâs also easy to check for
Guys look.
It works
And the "text in the corner" is gone (somehow, I've done literally nothing about text)
I should add a badge to this.
Nah, actually
No need
how do you remove suits, during runtime in 1.0.0?
wait not enough pluses, hold on
when making a challenge, should i ban blinds that don't effect anything at all in the context of the challenge.
There we go
WOOOOO
Anyone know why context.end_of_round appears to be triggering 3 times at the end of the round?
key = "test",
name = "My First Joker",
rarity = 1,
discovered = true,
pos = {x = 0, y = 0},
cost = 2,
config = {extra = {Xmult = 3}},
loc_txt = {
name = "My First Joker",
text = {
"{C:inactive}({C:mult}+#1#{C:inactive} XMult)"
}
},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.Xmult}}
end,
calculate = function(self, card, context)
if context.end_of_round then
card.ability.extra.Xmult = 1 + card.ability.extra.Xmult
end
if context.joker_main then
return {
Xmult_mod = card.ability.extra.Xmult,
}
end
end,
atlas = "jokers"
}
Because it's called 3 times. Once for jokers, once for cards, and once for repetition.
You'd need to specify the CardArea
adding and not context.individual and not context.repetition then to the end_of_round check should work
thanks
I wish I was called 3 times đ
if i have an if statement like this is it possible to use lovely to inject another or condition into it? ive tried with no luck
use the replace at
and just copy that line
and add your "or" part
and add it back
pattern = (what you just sent)
position = "at"
payload = (what you sent + your new or statement)
is there a way to alter how many joker slots a joker takes up
If itâs an âorâ you can also inject before the end or any else and write elseif ⊠then
Not that I can think of, but maybe you could just check if 2 slots are available before adding, and decrease the size by 1 after its added, and then increase by 1 again if removed
you could make it do the opposite of a negative i guess
"-1 joker slot"
but as an or it there are no further changes replacing the line with itself plus an or ⊠is better
Some mod mustâve done it already
probably, yeah
To use as reference
Does it start with 10 Mult or 0 Mult?
not sure, and id have to play around with the values to balance it
Interesting but the scaling seems too weak
but the idea is you just keep storing up power
Yeah I was about to write it down
To see the scaling
The scaling is linear but the price is quadratic
i linear until she quadratic
I do like the synergies it enables, but I donât think itâs worth it
Balance-wise currently I mean
mfw cryptid
oh yeah btw i created a github for cardsauce with a list of things i gotta figure out how to do/need help with
It does have a lot of cool synergies
I think it should be the same card thatâs created in the shop so it inherits other buffs
How hard would it be to have a mod, that holds both Steamodded versions 0.9.8 and 1.0.0 and checks if a mod failed to load with the one and tries with the other instead
how would i specify the end when there's so much ends in any given lua file really
im using the replace at but im not happy about it because it means if any other mod tries smth similar im boned
Thats literally the case for any lua injection lol
go look for the line before the end and use it as the pattern
then use position = "after"
No itâs not, you can totally inject multiple things at the same place
Lua injections can always conflict in unexpected ways
still ambigious in my case because the line before the end in question is "end"
It depends what youâre injecting though
Then you donât but as I said I think you can just inject into the condition itself if the contents donât change
You can use regex to pattern match a series of lines
i love jsut completely messing something up
aight cool i got it working
set is in loc_txt
lol
loco loco
mojo jojo
naw
Cringe nether
Cute
Cringe Victin
đ
I am, and so are you
đ€
is it possible to prevent glass cards from shattering?
Hello,
I'm creating a mod and I'd like to create a deck with infinite jokers but after the 4th joker bought, the ante scaling increase
Is there a way to increase ante scaling in the middle of the game?
If there isnât you can add one
A lovely patch might make it easier to do
do you have an idea of how I can do that?
Probably but why
Make them shatter more
i'm trynna make a joker that retriggers glass cards and keep em safe
Thereâs a function that computes the ante values. Youâll to change that, also probably change the UI in real time whenever the Joker count changes
ok, I'll try, thank you
Again I personally favor breaking them more but depending on what you want to do exactly you can change the variable that prepares Glass cards to be destroyed
For the UI youâll want to see if the specific UI elements have names to find them, but also to test if they exist
so, I found how to modify the ante scaling ingame, but now, I need to re compute the blind score
I have some code that does it but not at hand
Actually I think I do the code is inside this I think
@mossy robin
You didnât close some {
theres as many {s as }s
nuh uh
It just returns a line where it thought there was an issue by assigning pairs of brackets
For example, {{{}}, which brackets are paired up? 1 and 5? 1 and 4? 2 and 4? 3 and 4? 3 and 5?
It assigns some pairs and returns one bracket it couldnât match
its the card.ability.extra.Xmult right?
i assume
why is that in your return
wait
doesnt it need vars= or am i mixing things up
^
Ok so, I tryed your code and I have this error
here is my code
`G.E_MANAGER:add_event(
Event(
{
trigger = 'after',
delay = 0.8,
func = function()
local new_chips = math.floor(G.GAME.blind.chips * IJnewantescaling)
G.GAME.blind.chips = new_chips
local chips_UI = G.hand_text_area.blind_chips
G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)
G.HUD_blind:recalculate()
chips_UI:juice_up()
return true
end
}
)
)`
ty!!!
As I said, you need to check that the UI exists
but you can omit the part that updates the UI for now, probably
how do you do that?
the error comes from this ligne
local new_chips = math.floor(G.GAME.blind.chips * IJnewantescaling)
You can use if object then ⊠end
Oh thatâs not even the UI
Thatâs just if youâre currently in a Blind
I mean you know you can just no do it
Or again you can check if it exists before doing it
so i uh have this joker and its supposed to scale in xmult when consumables are used and decrease when the shop is rerolled, and that part works fine, but any time it creates the little effect for xmult triggers it just says ERROR
calculate = function(self,card,context)
if context.using_consumeable and not context.blueprint then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmultgain
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.x_mult}},
colour = G.C.MULT,
card = card
}
end
if context.reroll_shop and not context.blueprint then
if card.ability.extra.xmult ~= 1 then
card.ability.extra.xmult = math.max(1,card.ability.extra.xmult - card.ability.extra.xmultloss)
return {
message = localize{type='variable',key='x_mult_minus',vars={card.ability.extra.xmultloss}},
colour = G.C.RED,
card = card
}
end
end
if context.joker_main then
if card.ability.extra.xmult ~= 1 then
return {
message = localize{type='variable',key='x_mult',vars={card.ability.extra.xmult}},
mult_mod = card.ability.extra.xmult
}
end
end
end
}
anyone know what's happening
also just realized the adding and subtracting mult messages aren't happening either
i changed it and it still doesnt work
that's... also not a key that exists.
whats a key that does?
a_xmult
oh
You can check localization/lang file to see all the base game localization keys
Or search through the code for times when the localize function is used.
Coding isnât magic
yeah im not stupid
@fast badge this is literally the only code in the mod lol
from what autumn said, i have to use the take ownership call on the other spectral cards so smod registers them
gngn
they were orignally going to all be editioned and sealed too
it appears playing cryptid has completely destroyed my sense of game balance
who needs game balance
How can I make an event fire if an other event fire?
I want to attach a function to the new_round() function
What do you mean
sorry if this question has been asked a million times but you cant load .dlls with with steamodded right?
so, when a round start (the function new_round is called)
I want to call my own function
You can hook
does the break_positions context not work on steamodded 1.0.0-alpha
because my joker needs it to function
and so i checked on Bunco mod's Joker Knight
and it doesnt have a negative side effect anymore so im assuming its just broken
this is a custom context lmao
it doesn't exist in the base game
Can I grab a list of all spectral packs and iterate over them?
Also, how can I remove the Mod badge from a joker for example?
speaking 0.9.8
Adding more evolution cond
P_CENTER_POOLS i assume
would it be possible to have using a specific spectral card force an evolution on a random joker and have that be the only way to do it
since if so i might be able to get my mod idea back off the ground
Yea Ig so
is there a way to check whether or not your jokers have been rearranged
What exactly are you trying to achieve
joker that gains mult/chips/Xmult when jokers are rearranged once per round
You could save the ordering of the jokers in context.setting_blind, and then in the context.joker_main (when it calculates it's scoring) you can check if it has changed. if yes, increase the mult, and also add a boolean that tells you "increased already", and that boolean you only reset when entering a new round (context.setting_blind)
thats basically what i tried doing
problem is i dont now where to find the ordering of the jokers
if its just how the G.jokers table is arranged then im just confused on something
OH.
no wonder goddamn
cant find where to find the ordering of the jokers
i tried looking for brainstorm code but its just G.jokers[1]
You'd have to ask someone more advanced in Lua on how to make sure to go through them by order, maybe using ipairs or iterating using the index, I don't know
how do you add code to decks in 1.0.0?
ipairs(G.jokers) should go through them in the order they are afaik
that'd be my first try too
did you find a fix for this?
https://github.com/OceanRamen/Brainstorm
You can see it working here
thx
chat i am so barack
Welcome back
thanks
@brisk pond (moving here since this is related to mod debugging) you should be able to do this and replace the self.effect.config.spectral_rate stuff with G.CerloMod.Milk_Used = 0
Added this piece and it now works
You don't need to return true btw
it works
I won't change it
does anyone tryed to overide any of the base game function to make something work?
Yes but hooking or injecting are better practices
can you inject code in an already existing function?
Yes thatâs exactly what injection is good for
how can you do that?
Lovely
lovely rewrite the majority of the game no?
how do you inject some code into an already existing function with lovely?
You need the file it is defined in, some way to locate the line you want to inject into, and⊠thatâs basically it
By some way I mean one of the two ways lovely gives you to do that
I found that the easiest way to do that with lovely, it's to hook to the function and the overide it
that feeling when you are stummped for 15 minutes only to find out you are missing a then after an if
or just a ,
You mean to introduce a hook in the middle of the function?
to do that
`local original_set_blind = G.GAME.blind.set_blind
G.GAME.blind.set_blind = lovely.hook(original_set_blind,{
after = function ()
if G.GAME.starting_params.UwU_infinitejoker then
self.chips = get_blind_amount(G.GAME.round_resets.ante)self.multG.GAME.starting_params.ante_scaling*IJantescaling
self.chip_text = number_format(self.chips)
end
end
})`
welp, it doesn't work XD
have you even looked at the lovely docs?
Copy-pasting code from one place to another will likely not help
Unless you understand what the code does and what youâd rather it do instead
the thing is that I don't know where the lovely doc is
I just found that I'm trying to modify a function which is not even used XD
thx
ok, the game starts
i will never understand why a lua injector is written in rust
Cause rust is the best
you have 3 days to live
was the name tag_ethereal
yes that is the key for the ethereal tag
#1247528518842191971 message i did a workaround tho :P
I wonder if this is a steamodded bug @frosty dock ?
I do know that the Steamodded API takes ownerships of some objects so that they work.
it probably has to do with tags not being centers
and not being in G.P_CENTERS specifically
I wonder if we should add a condition for Steamodded taking ownership of objects so that when other mods want to take ownership of it they're not obstructed.
Oh? I thought they were
mods past the first are added as "dependencies"
you can have 200 mods take ownership of the same thing, and it all works out. granted, any conflicts between them might cause problems
e.g. if two of them modify the atlas
only the last one to load will function
what is the most balanced way of modifying the chips of the blind for a deck with infinite joker?
if #G.jokers.cards > 5 then
IJantescaling = math.log(#G.jokers.cards,2) - math.log(5,2) + 1
end
or
if #G.jokers.cards > 5 then
IJantescaling = math.sqrt(#G.jokers.cards) - math.sqrt(5) + 1
end
#âă»modding-general message here is from aure implementing this
Would a legendary joker that makes it so you can play 6 cards instead of 5 be possible?
(i know atleast if it is it would be a lot of work adding in new poker hands, planets, and a lot more...)
yes
So I know G.jokers is for the jokers area, but what is it for cards that are in a buffoon pack?
I've been debug messaging for a while now with no luck trying to find it
huh, so thats how you make a fallback consumable
doesnt fix thew stupid everything is a duplicate bug but it's a start
Ok, so is there a way to access the cardarea of a certain joker in this function function Card:generate_UIBox_ability_table()? It doesn't have context as a parameter
like the calculate_joker function does
so ive been looking through the steamodded code to find out what the bug could be and i think ive narrowed it down to this
if SMODS.ConsumableTypes[_type] and SMODS.ConsumableTypes[_type].default and G.P_CENTERS[SMODS.ConsumableTypes[_type].default] then
_pool[#_pool+1] = SMODS.ConsumableTypes[_type].default
this is the code that makes it go to the fallback consumable
you can loop through the area and check if v == self
actually maybe not
i genuinely cant tell
im unsure of what G.ARGS.TEMP_POOL is in the games code
gahhhhhh i cannot understand why this stupid bug is happening
seriously why is this stupid function such spaghetti code
i can barely understand it
thunk moment
i literally cant find out where the hell the section that culls duplicates is
this comment isnt being very descriptive
considering its for all of this and then even more
I'll try that, thanks
Ok, so it looks like I can just check if self.area == G.pack_cards. I didn't realize Card had it's own area field. That's good to know
Do also look at how Steamodded injects into it presumably
i'm adding a Tarot that discards all cards from hand. What is the function for it?
What function for what
Discarding cards ig?
Like Hanged Man, but without removing the cards from the deck and with all the cards of the hand
you just discard the whole hand
What part donât you know
You can search the gameâs code for how cards are discarded
first thing you should think of is if there's a vanilla functionality that does this
not other than the "Discard" button
but I can't find it in the game files
There's also The Hook
If only there was a word describing the action of discarding one could search for in the files
maybe I can tweek this part to make it so that all cards are table.remove'd
Wrong part
If only there was a function in that screenshot that could âdiscard cards fromâ somewhere
the parts that are important to you are add_to_highlighted and discard_cards_from_highlighted
i found the discard mechanic (i think) in cardarea.lua while looking for something else might be wrong sorry if am
if not self.cards then return end
local _cards = discarded_only and {} or self.cards
if discarded_only then
for k, v in ipairs(self.cards) do
if v.ability and v.ability.discarded then
_cards[#_cards+1] = v
end
end
end
if self.config.type == 'discard' or self.config.type == 'deck' then
card = card or _cards[#_cards]
else
card = card or _cards[1]
end
for i = #self.cards,1,-1 do
if self.cards[i] == card then
card:remove_from_area()
table.remove(self.cards, i)
self:remove_from_highlighted(card, true)
break
end
end```
I fully didn't see that one lmao
đ€
don't understand why in the first loop it is "for k, v". Why 2 variables?
For the key and the respective value in the table
I donât think thatâs it. That removes cards from a CardArea
Itâs related but separate from discarding.
Any kind of movement between two CardAreas is treated by the game as a âdrawâ, so the actual function that moves cards would be something like âdraw from hand to discardâ, though thereâs like 3 or 4 different draw functions inside that one
It also doesnât help drawing also refers to drawing images on the screen
moment
So the code has a couple of different functions that refer to two different kinds of card drawing
Treating everything as a draw makes sense, all the helper functions are reasonable, the two completely different types of drawing are unfortunate but I do think it could be avoided
I tried with this code and it freezes like this when I use the card, like in an infinite loop
do I need to add table.remove() in some way?
You didnât tell the game the event ended
Compare how both yours and the Hookâs event end
where can i find how the game limits how many card you can play in the code? i am currently looking in common_events but idk if this is the wrong file...
I think MystJokers might help?
CardArea.add_to_highlighted
i wanted to change the played card limit from 5 to 6 if you have the specific joker
has anyone checked if undiscovered cards display properly in 1.0.0?
They do
ewe
bruh there's a literal undiscovered sprite API
I'm not sure how I should have even tried to break vanilla undiscovered cards
i wrote my shit incorrectly so i wanted to ask to double check
understandable
would this be sorta balanced
i was gonna make it so that it changes whenever it is rearranged but i didnt know how
and realized this would make more sense
how is it getting triggered though
when the hand is played
Someone made that recently
who
we told you how đđ»
joker never gets triggered no way!!!!!
i am stupid okay đ
has anyone figured out how to use the custom sound api in steamodded
it hasn't exactly been working for me
which one?
literally register_sound_global()
i dont know where the hell to put it and anywhere i put it chaos happens
steamodded reeeeally needs more documentation
dont we all
whatever its called
1.0 sound API is integrated into the new API system, it's just that sound.lua isn't deleted yet because of insufficient testing
it's more or less the bottleneck of getting 1.0 released at this point
I'm on it when I can, but I'm currently sick in case you haven't heard
I don't have anyone else who writes these for me đ
i know
bro didn't wanna waste a word, huh
something like "Get well soon" can't be too much to ask for tbh

Do you actually need help? Not sure how I can be useful
I don't think asking others to document my code for me is something I'd want to do, but ty for the offer
Get well soon
Get well soon!
thanks :)
How do you use process_loc_text correctly? I need to take control of the amount of cards you can play.
process_loc_text is for the localization of text and not controlling the amount of cards you can play..?
no i want to take over the part after process_loc_text
what
its from base game code and i thought i needed to localize it for my ability to work
how do you change values in text?
trying to change the (Currently x time(s)) but i have no idea how
placeholder in your loc txt and the return in the loc_vars fills it
well fuck
my text has multiple values per row and i think it broke because of that??
Wrong syntax
wharg
#n# where n is the n-th value
if there's a lovely injection that replaces a line, can I use that new line as a pattern?
Donât think so
omg so sorry, get well soon
ty đ
I don't see how these things relate... process_loc_text is for feeding in text that is meant to be displayed in-game in one or more languages
oh i found it it was G.UIDEF.profile_option(_profile)
i've been making okay-ish jokers really quick
god forbid the amazing digital is clown...
X being in front of the number triggers me
wait what the fuck why is it there
regional difference
i think
some people say "two times x", some people say "x times two"
how the hell do you use G.GAME.chips
i thought it was a number
why is it a table
are you using talisman?
It works fine with numbers too just comparisons will break
so how should i get the chips
Youâd need to do something like:
Big and Big(x) < Big(y) or x < y
Anything besides comparisons should just work
With both types mixed
talisman support scary
I wish Lua just let you do this
erm
whar.........
all i wanted to do was make a chip multiplier......
Then you donât need to touch anything
What was the error?
gimme a sec
Check if Big exists and wrap it around a Big:new(<equation>):to_number() if it does
Did you use two dots instead of one?
:to_string() my bad
i assume for vars{} then?

and do you mean tostring() instead of to_string() or is it just something i didnt know about
Wrap it around number_format()
Itâll work with and without Talisman and you donât need any checks for it
it works now, ty!!!!
that's not how x is functioning in this context
x is the times.
it's one card... or is it?
hm how do you do formatting with strings in loc_vars
get well immediately wtf
we dont pay you to be sick
we get paid?!?
maybe i should ask people to pay me for my 9 hours of work next time
you are payed in balatro dollars
epic
I should probably make another mod, Blackjack Hands went pretty well.
Now the consumable works, but it only discards 5 cards and not the whole hand
because you can only select 5 cards to highlighted
What she said
Canât the order operator be extended to work with this? Or is it literally a table and not an object that just looks like a table?
you might want to look into G.FUNCS.discard_cards_from_highlighted
I think reimplementing that would be unnecessary, so Iâm trying to think of a good hook or injection one could make into that function
Besides an API hook for Steamodded that adds a new argument, Iâm not sure what else could be a good option besides either injecting to use a new global parameter or doing what they suggested
I think the global parameter is slightly less likely to break things
well you either reimplement discard or you remove highlight limit
I mean, there are different ways to remove it, is what Iâm saying
hm yeah just set a global var
start paying me then wtf
Here, have this 
Earn +3$ per line coded
*starts coding \NL*
You get paid in pings and complains sorry I dont make the rules
elloo
anyone know what the key is for the soul crystal?
im just adding one.. ""final"" addition to the trans mod
1.0e7.9e23
wdym? the key of the soul card itself is c_soul
the crystal is a floating sprite
I was about to say this
ill aure strikes again
its for the 1.0.0 version
Still
iunno doesn't seem doable before the heat death of the universe
the stone does not have its own key / sprite
i got the soul card changed just fine đ
Yay
oh really?
its linked to the soul card
the weird thing with The Soul is that it doesn't actually have a soul_pos
mfw
so it doesnt even have an object type eh?
Precisely
for this one, you need to mess with a shared sprite
^
since it gets initialized before steamodded loads, just overriding G.shared_soul should be fine
sorry, how do i override G.shared_soul?
G.shared_soul = (your sprite)
how would you write it?
Lua doesnât let you compare metatables with other types
the game crashed when i went to the spectral card menu with the soul card on it xd
what'd you assign to shared_soul?
the Enhancers png
I mean like the exact code
oh sorry
G.shared_soul = "Enhancers-TSpectrals.png"
yeah no, it's meant to be a Sprite
oh a sprite is a different thing?
i see
sorry, i have no coding knowledge whatsoever
G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["centers"], G.P_CENTERS.soul.pos)
should do fine
on second thought, G.shared_soul:reset() is probably good enough
"it didn't work" is never specific enough...
oh the sprite didnt change
the soul crystal is still using the vanilla one
I don't even know which one of the two things I suggested you tried...
i tried both of them, sorry
wait
are you replacing the vanilla spritesheets at all?
if not, you need to give it your own atlas
is the spritesheet different from atlas?
no
yeah
Omg white text editors
my eyes are burning
I didnât know people unironically used those
that is NOT an excuse to burn your eyes âŒïž
ah I see, you need to replace centers G.ASSET_ATLAS["centers"] with the correct key for the relevant atlas then
ah! okay
so G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["TransCenters"], G.P_CENTERS.soul.pos)
like this?
actually, i should just try it first
Is it in the same position as with the normal atlas? Then yes
otherwise G.P_CENTERS.soul.pos will be the wrong position
the game crashed đ
mfw
you didn't account for the mod prefix, I think
âŒïž
Trainer Nether challenged Wild Aure to battle!
The two babies standing there with raised arms
Am I registering for trying to find a flush properly? I feel likemy main concern when it comes to the calc is probably around the self.ability.extra.poker_hand part
https://hastebin.com/share/diqepewaho.lua
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
There's a few things to note here
First, you need to limit the context of your calculate function or it will literally run all the time, so wrap everything in
if context.joker_main then
end
you then need to check, also from context, whether a flush is contained
you'll want to use context.poker_hands for this - it contains a table for each poker hand
you need to confirm that table contains something to know if that hand type is contained
So you might extend your check like
if context.joker_main and next(context.poker_hands[self.ability.extra.poker_hand]) then
end
next there's the issue that you can't have more than one eval status text be returned from your calculate function
there's this helper function
while it's bundled into steamodded 1.0, you have to include it yourself in 0.9.8
eval_this.png
you can give it the card, message and mult_mod or chip_mod and return the other, or use it once for each
So would I be able to implement this code higher up in my script and then refer to it later on? Like taking eval_this and plugging in (j_conniving_joker, mult = 80) or whatever
Sorry if I'm asking a lot of questions still a bit eepy
you'd give it self as its first argument, then whatever you would otherwise return, something like { mult_mod = 80, message = { key = 'a_mult', ... }
Joker evo update, I got 10 evolved jokers done, need to add more evo conds for the API and do some spriting
how do i do that?
also sorry for replying late
went out to eat
yo guys how do i properly get a ref to the Game:update(dt) function
local update_ref = Game.update?
ye thanks i already found it, but its much appreciated, new to lua n stuff
apparently if the number is above 1000, chips becomes string?
goddamnit
cant even use G.GAME.chips without atleast one problem
all i wanted to do was make a chips multiplier...............................
how do we make custom tooltips? I can assign an existing tooltip but when I try to add my own to G.localization.descriptions.Other i just get "error" on the tooltip
what's the scope for
G.localization.descriptions.Other['my_key'] = { name = 'My tooltip', text = { 'Fancy text, and', 'even more fancy text.', 'Var 1: {C:attention}#1#' -- this will display 10 } }
depends on the Steamodded version
1.0 alpha or 0.9.8? that was not of help
alpha
I'll try to get it done soon, I'm sorry đ
I'm currently sick so I can't do much
you need to put it inside this
it's okay man haha
function SMODS.current_mod.process_loc_text()
end
progressđ
adding that was needed due to the language API requiring and additional reload of localization
np
Did you hear about the disaster with the orchestra?
||It was treble||
me when 2,808 instead of 2808 đ
how do i find the goddamn chips!!!!
type(<chips>) == 'table' and (<chips>):to_number() or <chips>
where <chips> is whatever expression you use for the chip calculation
@nocturne garnet
Anybody know how to check for the current stake of the run??
poker reverse card.
nice
although this has a few function overrides which mess with the function logic it may be hard to make this compatible with other mods
this is a blackjack
6+4+2+2+7=21
Why is a Reverse counted as a 7? XD
probably is put between 7 and 8
Fair point. I mean, with +2s and +4s, that at least makes sense.
Also, just imagine having Splash, then playing a 4oaK hand with four +4s and a Reverse at the end. +32 in card advantage
Which number should I use?
I mean, I wasn't saying it was a bad thing that Reverses were 7s. If anything, I would've thought that they'd be treated as 3s
Not too sure what to do for skips tho
Tag?
Not that kind of skip
Skip rank
Just had an idea, Iâm thinking end the hand and give you the 1 hand back (as in your amount of hands per round)
That's the joke
Am I doing something wrong? I'm trying to create a custom info box, but I keep getting this error. Here's the code:
local generate_UIBox_ability_table_ref = Card.generate_UIBox_ability_table
function Card:generate_UIBox_ability_table()
local generate_UIBox_ability_table_val = generate_UIBox_ability_table_ref(self)
local info = generate_UIBox_ability_table_val.info
if self.ability and self.ability.set == 'Joker' then
info[#info + 1] = {
{
{
{
config = {
scale = 0.32,
colour = {
0.1,
0.1,
0.1,
1
},
text = tostring(self.sell_cost)
},
n = G.UIT.T
},
},
name = "Sell Value"
}
}
end
return generate_UIBox_ability_table_val
end
how can i make this basegame code local for my joker? (process_loc_text is my part i saw someone else use it but im not using it correctly...)
Maybe Skips could be your 8s?
day 395 of patiently waiting for someone to figure out how the hell you use the sound api
How would I go about checking if a specific Joker triggered its ability?
I've gotten this to work through just overwriting the entire function from the source code in a lua file, so I know this part at least works, however, whenever I tried to move it into a .TOML file, it seems to just not apply. Anyone have any ideas? Alpha steamodded, and lovely 0.5. It also throws an error whenever I get rid of the "match_indent", however, the patch counter to the file I'm writing to doesn't seem to change when it's added or removed.
what even is that syntactically...?
đ€đ
hyptothetically....
we should not repeat this hyperbolically
no more
but technically?
accidentally?
tbh i dont get whats so funny about thisly
anyone know how context.other_joker works lol
wanna get a joker to trigger something when a specific other joker is in your slots
You should probably just iterate over all jokers and check if its there ig
well i figured id use baseball card as a blueprint
and that uses context.other_joker
Aha
It looks like it just iterates over all other jokers
so youd check for if context.other_joker.ability.name == <xyz> i guess
which file are you on where youre seeing what it does?
card.lua
would context.other_joker.config.center.name work? not seeing where context.other_joker has children
or whatever theyd be called
i forgor đ
yeah i saw but the way my jokers are set up they dont rly have ability names like the vanilla ones do
Well you should
It's the normal way jokers are handled
If you don't that'll ensure that your mod is compatible with like, 0 other mods
mfw
that's where you're wrong
literally the entire reason we use keys for everything is because names are prone to overlaps, causing deadly incompatibilities
the piggy bank incident
i don't even a way you could have been more wrong there nether
(I'll admit the game sometimes expects a name to exist and has freaked out for no reason)
but that's beyond the point
đ€ âđ»

Just saying that it might kill itself due to nil values
it doesn't
names are, by definition, not keys
good for me, I didn't want one anyways
nerd
no u
here we go again sigh
sighly


