#💻・modding-dev
1 messages · Page 662 of 1
You would get the same result if you removed the assert and pcall
the only change i made was switch it to an table since i like to organise my items so i didn't have to do something like 00_JOKER 01_JOKER
programming is weird
looking at system monitor (gnome task manager in layman terms) and nothing seems to be effected
i can try to restart which would roll out anything remaining in memory
okay restarting didn't fix the problem
wait
im stupid
i understand it now
talisman was typed as talismman in main
@red flower not sure if i lifted from your code right
that would have an effect yes
does G.C.CHIPS.EFFECT exist
(im gonna guess no)
effect is a color from my mod
OHH
i just woke up so apologies but am i seeing i didnt do anything wrong after all
yeah you didn't
but is somethingcom right or wrong about the pcall and assert?
uhh, i dont think theres necessarily anything wrong about it, i use pcall and such within my own mod pretty often
im of mind if it works it cant be wrong
OHH i see why
do i get rid of the whole SPLASH_BACK thingy if i want to keep the vanilla colours
i heard it isn't on the release build yet and you shouldn't be developing with the dev branch
you can develop on dev, just don't release the mod or have your own dev branch
uuu, I was looking around and now I see what you mean. Very new to this still.
How could I make it so all of those things trigger?
I could not find a lot of info about the modifier thingy.
i see well if i want to go ahead and work on the dev branch how do you do the system next thingy
yes
menu_cards, not menu_card.
That's very normal
I always forget that damn ,
does this make sense?
decided to get rid of the tab since i probably won't need a whole lot to configure
joker concept idea: cotton-eye joe/jim/jimbo, idk the effect though
Question about, I guess any files. Is it possible to see if a certain file exists? For example, if a custom sound exists?
if NFS.getInfo('fullpath')
Cotton-Eye Joe
Uncommon
Sell this card to destroy a random held consumable and create a consumable of the same time
Maybe I’ll think about it but I do like the idea of selling the card since the song is basically where did he come from where did he go
anyone know were the draging knowledge for the shaking of the card is held
i want to make a rigid drag
When a new consumable type is added does the collection automatically update to have the extra menu housing the consumable types or no
Or is it manual
Cuz I've seen the menu across many mods but I'm asking to be safe
Yes.
Ah ohkay
Maybe back then but it’s an automatic thing now
Also is the best way to turn a joker into a different joker to destroy the original and spawn the new one in
Like it does what's intended but I'm worried it'd accidentally trigger or scale some other vanilla or modded stuff
how would I convert a consumable key like c_strength to the display name of the card? I tried using localize("c_strength") but it doesn't have the intended result.
i think Flip-Flop (Fusion Jokers) fixes that? idk you may have to check with that to see what it does
Are you saying for me to borrow code from it?
People borrow code from other mods. I even encourage people to take from mine, and I've looked through AikoShen to make PRs for Splatro.
localize({type = 'name_text', key = key, set = G.P_CENTERS[key].set})
Oh I know it's fine, even legally protected even without consent thanks to the required license to display your mod in #1209506514763522108
I was asking if they were telling me to borrow fusion code or not
They probably are at least hinting at it.
Does the set ability thing only change the mechanic or does it change what joker is there
Like does making jimbo into cavendish keep them as jimbo but with cavendish's abilities or are no remnants of jimbo left after it's engaged
latter
Ohohkay
Is there a way to make these two nodes display on top of each other?
{
n = G.UIT.C,
config = { align = "bm", padding = 0.02 },
nodes = {
{
n = G.UIT.C,
config = { align = "m", colour = colour_tarots, r = 0.05, padding = 0.05 },
nodes = {
{ n = G.UIT.T, config = { text = ' ' .. uma_tarots_named .. ' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.3, shadow = true } },
}
},
{
n = G.UIT.C,
config = { align = "m", colour = colour_planets, r = 0.05, padding = 0.05 },
nodes = {
{ n = G.UIT.T, config = { text = ' ' .. uma_planets_named .. ' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.3, shadow = true } },
}
}
}
}
}```
make the two inner nodes R instead of C
but displaying like this is better in this case by the way
probably would look ugly if the cards have long names
flip flop only changes the sprite, not the actual joker
(the fused jokers are changed properly but that's different)
Is it possible to set a predetermined function as crossmod support
Like if I wanna turn something into ortalab jester upon use would that be possible as long as ortalab is enabled
And the function be disabled if ortalab is disabled too
in this case I'd want one function to do the check, and another to do the transformation
ok thank you thunk
The specific context is that I have bizarro jester featured in bizarrtro as well as a consumable that switches jokers between their vanilla and bizarro counterparts
are you talking about what i said
yes
oh lol
it would if anything could change the status of disabled!
is there a place where i can see every single context listed cause i keep having to search through code to find the specific context im looking for cause i can never remember what theyre called
do i just memorize it at some point
if card.ability.extra_value > 0 then how do I check if the sell value is greater then 0 cause that isnt working
card.sell_cost
Is it possible to get a list of currently installed mods?
i know this is a really stupid question but why cant i print randomBlind
it's outside the loc_vars
randomBlind only exists within the loc_vars function, because it's local
How could I scale a value in G.GAME whenever a specific joker is created in the shop?
calculate during context.modify_shop_card
context.card is the card that was just created in the shop, check if it is the specific joker
(it's called modify_shop_card because you can also use it to modify the card by e.g. applying editions/stickers, changing its cost, etc. much like the edition tags)
thx
will the card call this itsself?
i don't think so
i assume you just want this in a mod calculate function, unless you only want it to increment if the joker is created while you have some other joker
its this
how do I do that?
I didn't even know that was a thing
it was added back in august
do this just as its own code, not inside any jokers or anything
SMODS.current_mod.calculate = function(self, context)
if context.modify_shop_card then
G.GAME.whatever = G.GAME.whatever + 1
end
end
thx
any way to add a -x# chips keyword
does anyone have experience with making a new card area? or is there somewhere in the documentation that I missed that goes over this stuff?
could I take a look at the project where you did it? Or is it part of vanilla remade?
i mean you can but its big https://github.com/nh6574/JoyousSpring/tree/dev
the dev branch is better because it uses the new smods function for them
awesome, thanks!
that is where theyre defined and this is where they are aligned https://github.com/nh6574/JoyousSpring/blob/75cc95da3f528289c1f8a2645de46d0ef57ed853/src/extra_deck.lua#L237
i should probably move that to the other file
What is the limit for how many frames an animated joker can have because when I give them a large amount it becomes the flag of Poland
it What
i don't think there's a limit what is the problem
Red and white blocks
Idk but I couldn’t get it to wrap so I just put all the frames in a line
Around twenty worked but when I went to around a hundred or more boom Poland
maybe the size is too big
Probably
I was thinking there might be some issue because the width of the image but since I can’t make it wrap back to read the image of a second row as part of the animation either way it becomes an artificial limit no?
i dont think it's the width but anyway i haven't heard about anyone having this issue before i couldn't tell you
Damn why do I gotta be a pioneer to Poland
you are sure the atlas is defined correctly right
I wouldn’t change the name of the file and when I adjusted the length of the image but cropping off enough frames it would work but when it was just the image it would fail
Also changing the px and py gave more red strips
i can't believe this is the first joker i made with art for this mod
idk what the name or effect should be
can i see the atlas definition
i just tried this and it worked fine maybe i didn't do enough
oh ok i tried 100
Because I wanted to see how long of a video would work so it was like thirty second
Joker idea: the animation atlas is just like movie from start to finish, idk the effect or movie
If I can get this to work you bet imma do the bee movie
key = "jokers_53",
path = "animation.png",
px = 71,
py = 95,
atlas_table = "ANIMATION_ATLAS",
frames = 898,
}```
898 frames 👀
yeah i would guess there's a size limit for how much love2d can load or something
i will say that the frames itself weren't the issue because when it was the same amount of frames but in a brick as opposed to a line it went for a bit then went black
i mean you could do a speed up one like a lot of gifs
ah then it's probably not the size lol
oh thats what I did I just started skipping frames
you should just try to do it manually with drawsteps
the reason it had gone black was because it went to the end of the image's x value but didn't wrap back around into the second row
yeah if I figure out the limit I can seperate the rows by just simple changing the atlas when something happens but I wanted to see if I could get it to be seamless which was a hassle
this could be a hot take: ken shouldn't had been painted as this grand villain just because apparently it is a bad thing to get cucked by a bee jerry seinfield when you have a severe bee allergy
might just me saying that though...
try printing love.graphics.getMaxImageSize() in the debug plus console
you can get it to be seamless by just copying the code the animaeted atli use but you make it jump a row down when it gets to the limit
idk why but it always returns nil
where can I find it btw, on the vanilla remade where I found the animation atlass it only showed it existed but not the code
sorry I haven't actually access the vanilla code before what is the directory of it?
it's under Mods/lovely/dump
i think the file is like engine/animatedsorite or something
what's the preferred way to manipulate joker slots?
I'm not sure if I'm in the wrong place but these files don't have much info, they do load the animatedsprite but don't explain it
why is your lovely dump not dumping
I'm not sure why it's constipated
G.jokers:change_size(mod)
mod can be card.ability.extra?
uhh what lovely version do you have
any number
yes but can it be c.a.e?
oh when I ran balatro it began dumping
if it is a number yes
is it automatic removal when joker is removed?
what do you mean
new joker done
@tidal hemlock since you inspired the idea of selling the card for an effect how do you want to be credited in the mod credits
uh okay one issue
is there a way to prevent it from applying the negative onto itself
and do I just create a copy of the animatedsprite.lua in my mod, change the key of the ANIMATION_ATLAS to something else, give it a clause to wrap around, load it and it should be prioritized?
no
maybe an additional check in eligible_card where it skips if it has ability.extra.cotteneye_rounds
you should copy the code in that function i said and use an SMODS.DrawStep to replicate it for your joker
gotcha
i have something like that here but it's a lot more complicated because it should sync yo music and also only uses like 6 frames
https://github.com/nh6574/Repertorium/blob/e32250548ce196b7d8575e1f48888312388865c0/src/jokers/001erika.lua#L489
do i not need to use remove_from_deck?
if you're adding slots in add_to_deck then yes you do
if it's tied to a card you can also just do card_limit = mod in the config iirc
i'm currently doing some jokers for starspace, there's this one joker that gives joker slots every 2 skips, the thing i'm asking about is if i still have to use remove_to_deck to get rid of the added joker slots.
clearly i am not to be trusted with loop statements
yes
is there a better way to check it isn't itself or another "cotten-eye jim"
card_you_are_checking.config.center_key ~= "j_prefix_cottoneye"?
i can try that
Thanks for the help and the reference but holy cow that is a lot of language I have not used before so I'm going to work on this in the morning, Goodnight
yeah i do not recommend copying mine for the record
maybe only the drawstep structure
so would this be fine?
It would be impossible, sorry but I have to ask, why did you create an entire animation choreography from six frames?
if #jokers > 0 then
local eligible_card
while true do
eligible_card = pseudorandom_element(SMODS.Edition:get_edition_cards(G.jokers, true), 'cottoneye')
if not eligible_card.config.center_key ~= "j_gros_cottoneye" then break end
end
if eligible_card ~= nil then
eligible_card:set_edition({ negative = true })
eligible_card:juice_up(0.3, 0.5)
end
return { message = localize('k_active') }
else
return { message = localize('k_no_other_jokers') }
end
yeah... idk if that worked 💔
wait i can see why
if not eligible_card.config.center_key ~= "j_gros_cottoneye" then break end
if NOT center_key DOES NOT cotten eye jim
the ai in this 😭
🔥
oh nvm
i meant to reply to this
everything works except if all jokers are cotten eye
and it actually crashes the game not a soft lock lmao
lowkey would be funny if i leave it and make it a divine punishment for having jokers where the entire point is to sell to make another joker negative
SMODS.Edition:get_edition_cards(G.jokers, true) so probably with G.joker make a table and then cycle out the cotten eye jimbos and then apply the negative
actually i think i have a better idea
hi again, guys. I got the stake working. (It was surprisingly easy 😭 ).
calculate = function(self)
if G.GAME.round_resets.ante % G.GAME.win_ante == 0
and G.GAME.round_resets.ante >= 2 then
G.GAME.modifiers.scaling = (G.GAME.modifiers.scaling or 1) + 1
end
end
})```
But now it doesn't reset when restarting a run for some reason. It scales in between runs.
I thought g.game was for that.
are you taking ownership in the middle of a run
if so don't
damn, didn't think about that.
it will add the function to the stake from then on in all future runs
it's not good practice to take ownership after the game loads
oooh I see
also it's not good practice to have a calculate function without context checks
clearly that didn't work 💔
Aight, thanks guys. Let me get back to it. 
what are you trying to do
okay so the point of the cotten-eye joe joker is that after two rounds (like invisible joker) you can sell it to make another joker negative but sometimes when you sell it, it both applies to either itself or another copy, and i don't want that to happen
i already told you what to do i wasn't asking u 😭
oh
sorry
haha
I'm trying to make the blue stake increase the spectral pack rate (done, omg) and increase the score needed in the finisher ante.
It's surprisingly difficult to do for someone with my experience, not a lot of info.
oh then you can do what you're doing in that calculate but in SMODS.current_mod.calculate I recommend checking if context.ante_change
okay so its really weird
so if you have another cotten eye jim it just kinda applies to itself? weird
if you just one it seems to always pick another joker
i think what is tripping up is that i am not handling the detection of a cotten eye jim let me look
if G.jokers.cards[i] ~= card or G.jokers.cards[i].config.center_key ~= 'j_gros_cottoneye' then hold up
local options = {}
for _, jcard in ipairs(SMODS.Edition:get_edition_cards(G.jokers, true)) do
if jcard.config.center.key ~= "j_gros_cottoneye" then
table.insert(options, jcard)
end
end
local pick = pseudorandom_element(options, "seed")
Okay. Will check it out. Thanks 
since G.jokers.cards[i] ~= card is true to the other cotten eye joes (i presume card is for itself) it doesn't matter if is or isn't cotton eye joe
hopefully this works
it works!
this is WEEshit
did i do it wrong?
finally
it just works
thanks nh
i copied shoot the moon's effect but i want to change from queen to steel cards
how do i do that?
i assume it has to do with changing
context.other_card:get_id() == 12
ok i figured it out
but now i find
that the steel card mult applies before the +mult
but that's fine
cuz i can do another change
to xmult instead of +
Joker idea; Chewbacca (Jimbacca?) Defense, idk the effect
How would I make a seal that force triggers either all or a random joker
Is there a context that I can use for cards in hand that trigger around the same time as glass cards breaking? I want to apply enhancements after the hand scores, but I've been unable to target it properly
context.destroy_card is when glass cards get checked for destruction
(context.destroy_card = {card_checked})
How do I display negative chips on card's tooltip?
I know that. I’m asking if there’s a context around the same time as glass cards breaking, so that I can change enhancements on the scored cards after the hand is done scoring.
Use context.after probably
That’s what I’m currently using, and it technically works, but the juice up function triggers at the start of the hand played, as well as the visual of the enhancement changing, even if it isn’t included in scoring.
Add true as the third argument of your set ability call
Put it into event?
Worked like a charm, fixed both the display and the juice up
My mod wont show up when I use a JSON file for it as SMODS recommends. I've compared to every other mod I have, I've rearranged the things inside, checked file paths, checked that it's a JSON. I have the latest SMODS and every other mod works. I can't spot the mistake as hard as I try.
FusionForce-v1.1.1\FusionForce.json
{
"id": "FusionForce",
"name": "Fusion Force",
"display_name": "Fusion Force",
"author": ["Minus", "LunaAstraCassiopeia", "amstd", "Gappie"],
"description": "Adds 20 new Fusion Jokers",
"prefix": "fuseforce",
"main_file": "FusionForce.lua",
"priority": 0,
"badge_colour": "BD597A",
"badge_text_colour": "FFFFFF",
"version": "1.1.1",
"dependencies": [
Steamodded (>=1.0.0~BETA-0827a),
FusionJokers
]
}```
The mods in the dependencies list should be strings
Okay I unstringed them after looking at something out of date, oops. But that was the last attempt to get this to work. But focusing on the dependencies is when I spotted the missing comma after the ]. That was all it was.
I love copying same utility functions over and over in every mod I made 
Maybe I should make a library or smth
<@&1133519078540185692> scambot
Killed
Thx
yeah sure
Are the keys for G.GAME.modifiers.no_blind_reward Small, Big, and Boss?
Yes.
thx
how could I force the reroll cost to the specific value while for one of my decks?
uhhhhhhhhhhh (not me failing to read the word "how")
just "Tatsu"
Hook calculate_reroll_cost and set G.GAME.current_round.reroll_cost
thx
👍
how to sleep? googles says love.timer.sleep(0.1) but timer is nil :/
sleep as in?
as in make the thread wait a bit before continuing
os.sleep exists to pause a program but idk how that works in threads
You may now know it yet, but if you work with UI, you probably need this: https://discord.com/channels/1116389027176787968/1417179003504165037
is there a way to disable the shine shader on custom stickers
there is but I forgot how to do it
cryptid does it for its code stickers
i figure it's possible with overriding the draw function but i have no clue how to approach doing that
ill look in cryptid's code
ok i figured it out
for anyone in the future looking for the answer to this here it is
how would one approach rendering text? i need text to appear above a joker but when the next bit of text needs to be renders i want the older ones to get smaller, move up and get a bit more transparent. it should also slowly fade out. iv done basically no rendering stuff and i have no clue where to get started or how to get started lol >.<
So text that stays on-screen and is positionally defined by the joker, right?
You're in luck, because that used to be super difficult. Balatro's UI, by default, does not interact with the shaders that make anything move, or change opacity. The dev version, though, has a new feature called CanvasSprite, which allows you to create text objects (and more, but I'm not sure yet how features beyond that work) that you can impact with shaders, like the ones that make cards move, or appear and disappear. Biggest issue is going to be that it's not documented yet, due to the feature still being worked on.
In the smods code, search all for SMODS.CanvasSprite will show you how its set up, and canvas_text should show you the specific drawstep. That's mostly important for if you want to change the layer it gets drawn on
For a concrete example, I'd check #1406859448596828210. That's Meta's mod, and Meta's the person who largely made the canvassprite system. I think her dev branch has some usage for it
i may be stupid but i dont see CanvasSprite in SMODS TwT nor do i see it in mata's mod qwq
Do you have the dev version of SMODS?
O.O where's the dev version? i dont see it in release or a branch named that qwq
The main branch is the dev version.
oh ok
"dev version", with the code formatting, is a confusing way to describe it
it's just the latest commit on the main branch instead of the latest release
how do you make config ui for your mods? specifically in smods
im confused over the syntax, how do i make a new CanvasSprite? there a init func but it doesnt return anything. (i fear i may be to stubid to use this qwq)
yes
yipee
thank you
time to learn dark magic
my other mod used to have a simpler config i used to show but it doesnt anymore lol
i honestly just want the checkboxes to enable or disable certain x10 aspects
It's not super simple to figure out without documentation, no worries. https://github.com/MetaNite64/High-Roller/blob/dev/content/Misc/d2.lua#L78 This is the snippet from Meta's code I used to figure it out. You define the CanvasSprite when sprites are made, basically, though you can also do it during a drawstep, as long as you don't reinitialize it every time it's checked
my other mod just has this
but the tabs make the code a bit more complicated
let me find an old commit without them
me want code :>
here this one is easier https://github.com/nh6574/JoyousSpring/blob/181d006ce94a853fdb1833fd2d78eeb0a3296f6c/src/mod_info.lua#L217
Yu-Gi-Oh! Mod for Balatro. Contribute to nh6574/JoyousSpring development by creating an account on GitHub.
thank you
I have no idea what any of that means TwT i should stop carrying if shit looks good cause idk how to make shit look good lmao
thats my motto
Make it work first, then get working on making it look nice. Using CanvasSprites and DrawSteps is super fidgetty and unclear if you haven't touched it before, yet, I can imagine
Easier to just learn the framework piece by piece
im just gonna use attention_text and when the text over laps its your fault for having a fast chat lmao
You should have some control over how fast it disappears, iirc
this is so goated
time to make the new balatro
||time to make the new facebook thing joke||
that would be nice but i have not the slightest of clue whats going on in the code you sent. plus i dont want people to need to download a dev release of something to be able to use my mod if that makes sense. i want it to be compatibal with the smods thats on the mod manager
Yeah, that makes sense. It's straight up just the right way to design your mod. The dev features are there so you can work with them so you don't have to implement them only after the dev release became the official release.
But I meant that attention text also has a way to ease it, no? I think you can make it variable how long it stays up
true but unless its gonna be in the official release my sunday it isnt useful to me as thats when i plan on having my mod out
pretty sure the hold does that ya
the main porb i have with it is that it overplays but thats just how its gonna be ig
yeah that's correct
i had to tweak that value a lot for a sticker so it'll be seared into my mind
ahh shit that reminds me
canvas_text isn't under card.children anymore, I haven't updated that in high roller yet
i know i can just whitelist hearts with yes_suits but im a lil confused on how to write it .w.
id assume not? you can try and see what card sleeves double checkered deck does
how do you have a joker work during a specific ante
is there like code that goes, if ante == 8 or
if you look at vremade a bunch of jokers use the current ante for part of their random seed
so you could check against that value
how
do u know any examples
wait couldnt i just do mult = 1
or would that not work
uhh
just checked and nothing beyond unlocks
it is the current ante
oke but im confused, how do i have code apply to a specific ante
for example a joker that gives +12 mult if its ante 12
but not work in any other ante
if G.GAME.round_resets.ante == 12 then
end
it's the "jokers use the current ante for part of their random seed"
thankies
thats all i needed
wondering abt making a divine idol that gives xmult depending on the ante
idk if that makes sense
ah well
it checks in G.playing_cards and converts them but do pack cards count in that?
no, im just trying to make a challenge run that only lets you use hearts, no matter where from, including packs
this is what it does
you can hook SMODS.add_to_pool to accomplish this nowadays tho
let me write it
local smods_add_to_pool_ref = SMODS.add_to_pool
function SMODS.add_to_pool(prototype_obj, args)
if prototype_obj.card_key and prototype_obj.card_key ~= 'H' then
return false
end
return smods_add_to_pool_ref(prototype_obj, args)
end
but i dont wanna add to pool, if anything i wanna remove from it lol
so i just put this in a .toml file and that's how i make hooks?
never done this before so idk
no, this is lua
oohh mb
okay i think i understand now
but then how to i turn the hook into a custom rule for the challenge?
you can either make a custom challenge rule and check for that in the hook or check for the challenge name
i have a challenge that uses an add to pool hook coincidentally
well that's hella convenient for me then :D
time to bug test now but i assume i wont be back here for the night lol
not even 5 minutes-
is there a way to get a list of all the valid contexts
for what
I wanna make a card based on this image
have it select a random context to do effects on
i wouldnt recommend that
there are many context that are not intended for things to happen
i would make a list of ones from here https://github.com/Steamodded/smods/wiki/Calculate-Functions
so just create a list manually then
yes
you cant get them all anyway
Is there an established way of saving data between launches?
in a run or to the whole profile?
Currently to the whole profile, but I've been thinking about run too for another thing
oh I think I meant, beyond the profile, like how the settings are unified for every profile
G.SETTINGS i think
I'd put that in the mod config personally
but that works too, not sure what the benefits would be of doing it once way or the other
oh im assuming from watching the video they sent earlier that theyre doing an smodsless mod
if it's smods then yes save it to the config
@tidal hemlock
How do you retrieve and hook the functions for all vanilla seals?
Ooooo wait how do you do that?
when randomBlind == 2 it should debuff all face cards but anytime i try to make something debuff any type of card it never works. im pretty sure it never passes the context.debuff_card check but i dont know how to make this work and all other effects from randomBlind work just fine
context.setting_blind might happen after debuffs are calculated
try looping over all cards to call SMODS.recalc_debuff or whatever its called on them after setting the effect type
Oh and it should be context.debuff_card:is_face(true)
any idea where in the original source the code to display the stake chip here is? I've been digging and can't find it
nevermind i literally just found it LOL
so are those just extra run modifiers?
-# ooohhh, I had an idea
-# an option like that, where you get to apply challenge deck effects
How do I get the actual atlas object for an smods center? Need to pass to the sprite init call
G.ASSET_ATLAS[center.atlas]
is it possible to check if a certain sound exists by its key?
perfect, ty
Does anyone know where to get the code for making a new consumable type
I imagine it's just a template that you put the name and colors for
check vanillaremade tarots/planets/spectrals
is there any easy way to stop something from being draged past a certin points
wdym by past certain points?
Is it possible to apply audio effects to the current track? Like reverb, muffled effects, panning, volume, etc
Technically yes, you'd just need to figure out how to attach to the Source and set such effects. https://love2d.org/wiki/love.audio.setEffect
Wuh woah
Okay
How would I go about using or hooking a function from another mod?
same way you'd use or hook a function from your mod, or smods, or vanilla
just probably do a check first to confirm the other mod is loaded
What does one mean by the secondary color of a consumable type
e.g. this is me hooking a cryptid function
how do I change this image?
Like I need examples of the primary and secondary colors of a consumable
make an atlas with modicon as the key
I'm checking if the mod exists (it's true), but the function isn't global, so it fails to run it
joker+
you could lovely patch the other mod to put the function into a global, if you desperately need this
and/or just copy the function into your mod
just found I was using SMODS to find the relative mod path for the cursor images (I meaaan, there probably is a way to do it without it). By saving to config, I don't have a config file but I've seen a config file being just 'return {stuff}', idk how it works on a lower level
This code is fully functional, but I'm just curious as to why it gives me a warning. I know that I can just quick fix to disable the diagnostic, but I'd like to know why it's happening
next ==?
that may not work as expected if quantum enhancements are in play
You should be using SMODS.has_enhancement
get enhancements is for when you want all of them, yeah
eveything in SMODS.Mods[modid].config gets saved to a file
if you want to do it smodsless for jokerdisplay i just copied the smods file loading stuff
so coming back to this from earlier
this defo isnt supposed to happen-
is this just cause it returns false or is it an actual bug?
sorry, what does that mean exactly?
ah okie
The reason I tried that originally was because i was trying to follow VanillaRemade's recommendation for checking for no enhancement. How would I check for no enhancements better?
the problem is that prototypes dont all have a way to differentiate them
anyway this works
local smods_add_to_pool_ref = SMODS.add_to_pool
function SMODS.add_to_pool(prototype_obj, args)
if SMODS.Suits[prototype_obj.key] and prototype_obj.card_key ~= 'H' then
return false
end
return smods_add_to_pool_ref(prototype_obj, args)
end
the lsp says that get_enhancements can return nil but i dont think thats possible
i just add or {} to get rid of the warning personally
No, it would be not next(SMODS.get_enhancements(card)) for checking if a card has no enhancement, but it would be SMODS.has_enhancement(card, 'm_modprefix_key') for checking if a card has a specific enhancement.
what should I do to stop my custom challenges from being named ERROR when I load them
misc = {
challenge_names = {
c_modkey_challengekey = "Challenge Name"
}
}
}```
in a localization file
ok
does smods already have a set default blind atlas?
yes the vanilla one
so if i dont set a position, my blinds will just show up as small blind, right?
i think so
anyone help me figure out why this is crashing o why a node would be nil
i acceedentally made a cool joker out of a corrupted texture
here is the file after being corrupted and before editing (possibaly not a true corruption but IDK)
how did that corrupt in that way
my pixel art editing software crashed so some stuff was me trying to leave liike the stroke
but i hoestly dont know how the dots and bar appeared or even the different backround
Probably, but the Red Sleeve is also a template to use I think.
mmm
73x97?
im fairly sure the full green one is the only one to be explicitly stated as a base for art
Though if youre just making another coloured sleeve just use red prob
The green one's technically the template
but if you think it's easier to work on top of the red sleeve go ahead
I'd personally just take the gray border from the basic 5 sleeves, and put your green dithering effect in the middle
No, it's 73x95
is there a "best" way to get a cards raw description text
localize({type = 'raw_descriptions', key = key, set = set})
thanks man
Please
I kinda need it
For like
My mod n stuff
Y'know
the primary colour is basically useless, i dunno what vanilla even uses it for
the secondary colour is used to color the button for the consumable type in the collection, the badge, and the special color that gets defined for the consumable type in text styling (like how you can have {C:tarot}, {C:planet}, etc)
In that case nobody ever sets primary color to anything meaningful I assume
They just go #FFFFFF and call it a day?
i'd say just go with the same as secondary_colour
Alr
what's the best way to revert a card's size (card.T) back to its regular size
the worst deck idea in history
there's probably a standard way to derive it based on G.TILESIZE/G.TILESCALE/whatever but i'd just save the old size somewhere before you resize it lol
uncheckered deck
Toilet deck
Uncheckers your deck
it's actually pretty broken lol
I jsut breeszed through all 8 antes
gonna add some nerfs to it
i try to save values on a playing card but they wont save, even in card.ability
because it's a meme from a streamer friend of mine
maybe have blood stone always appear as perishable
was thinking of making the final boss always disable hearts
so you have to work your deck around it
instead of just flushing to the end
dunno gonna have to pitch some ideas around see how it goes
Calling all the way back to when I asked how to turn jokers into other jokers, the code I was given works but it seems anticlimactic when transforming
What visuals/audio should be done to make it more impactful (like when a joker triggers for example)
card.original_T

I was checking this original_T, it's kinda bad
Because of it deck is blinking in deck selection menu
thank you
Would the visual/audio stuff from using judgement be good?
oh, it doesnt account wee's size change
not sure if it will account for other cards that are resized by default
eh whatever, it's good enough for the bare minimum that i need for this stupid effect i have to implement
it stores sizes of card when it was created
and of you change what joker is it, it doesnt update at all
my point is that it doesn't account wee's size difference; wee has a set size when it's created that is not reflected in original_T
if it doesn't acknowledge wee then i'm not confident it acknowledges other size differences in other mods
yea i think sleepy is agreeing with you that it's insufficient
but it's good enough for the bare minimum of what i'm implementing
(which is randomly mess with card widths and heights)
it just makes the card do a little shake animation
Ah
The tarot or the joker summoned
are you asking a question
it makes card shake
if you want the summoned joker to shake you have to assign SMODS.add_card to a variable, say foo, then do foo:juice_up()
Oh
No, you could do SMODS.add_card({...}):juice_up()
Let me send the code for the consumable to better understand what I'm hearing
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('tarot1')
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
card:flip()
play_sound('card1')
card:juice_up(0.3, 0.3)
return true
end
}))
delay(0.2)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
card:set_ability(_jokers[G.jokers.highlighted[1].config.center.key])
card:set_cost()
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
card:flip()
play_sound('tarot2', nil, 0.6)
card:juice_up(0.3, 0.3)
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
G.jokers:unhighlight_all()
return true
end
}))
delay(0.5)
Should it matter where this goes in the code
Yes, it should replace everything in the use function.
Ok
By that you mean line 195 right?
Yes.
Alr
How do I turn it into one big code block
It's too short to be converted to a text file
```lua
code
```
You can press the + to turn it into a file anyway.
I said that cuz text files can be set to have the lua language
But since I have the code block shortcut now I don't need to
SMODS.Seal{
key = "pink",
atlas = "atlas_enhancers",
pos = { x = 0, y = 0 },
badge_colour = HEX("EB57BE"),
calculate = function(self, card, context)
if context.main_scoring and G.jokers and G.jokers.cards and
context.area == G.play then
local joker = pseudorandom_element(G.jokers.cards,
"fs_pink_seal_random_trigger")
if joker then
G.E_MANAGER:add_event(Event({
func = function()
return SMODS.blueprint_effect(card, joker,
context)
end
}))
end
end
end
}
This seal is supposed to randomly trigger a joker when scored
I think the issue is with the blueprint_effect cause I am not entirely sure how it works, but I could be completely wrong and there is something else
You mean you want to force-trigger a random joker when a card with that seal is scored?
Yes
I think when making the code I was trying to make it copy the effect not trigger it, but got lost along the way
Okay guys. Change of plans, increasing an specific ante scaling is too difficult is not even funny.
Would any of you know how to modify the blind requirement of the finisher blind? Give it a multiplier. Like times 2. There also isn't a lot of info on this.
oooooooh, so the config table itself that is returned in the entire file IS what keeps the data, I was wondering whether every time something there changes it would reset the saves when game is restarted and was looking for an external way of saving, but I guess the config file is handled separately
I mean, I guess the source code has it's own way of saving without the config file and the config is just an smods convenience
SMODS.Blind:take_ownership('ox', { dollars = 5, mult = 2, pos = { x = 0, y = 2 },})
mult is the one you wanna change, basically its the small blind requirement x mult
But would not this do it only for the ox?
you can change the key to another
can you do it for all? even the modded ones?
i believe so
how could I do it on a modded one I don't know the player is gonna have.
seems like it requires the key name
not sure but you can do an injection to get all blinds and then multiply a specify blind, you'd still need the name ofc
yeah, it might be similar to the ante thing, so really difficult, haha.
Thanks for the help, I might just do what you suggested. 
How do I make a seal on a scored card trigger a joker
check for the seal in context.individual for the area you care about
if you're the actual smods cat then name all the smods versions
btw, guys.
How do you take ownership by kind of only the showdown blinds?
Could you elaborate I am not sure I fully understand and my attempt did not work
what do you have so far?
SMODS.Seal{
key = "pink",
atlas = "atlas_enhancers",
pos = { x = 0, y = 0 },
badge_colour = HEX("EB57BE"),
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
local rand_joker = pseudorandom_element(G.jokers.cards, "fs_pink_seal")
for _, joker in ipairs(G.joker.cards) do
if joker == rand_joker then
return {
repetitions = 1
}
end
end
end
end
}
Multiple variations of something like this
I also had card:get_seal() too at one point but it did not change in game either way if that was what you were referring to in your original response
and what exactly are you hoping to achieve?
When the playing card with the seal is scored, trigger a random joker you have
what do you mean by triggering the joker
If you only had the default joker that gives +4 mult, when the card is scored, trigger that joker, if you had 5 different jokers, youd randomly trigger the effect of one of them
I should check for blueprint_compat too I suppose just to make sure
so if you just had basic joker, you'd want it to give +4 mult when the card with the seal is scored??
Yeah and if you had like running man and that +4 joker, it would randomly give either the effect of running man or the +4 mult for example
joker evaluation doesn't work like that, jokers have different effects at different timings
So is it possible
you can't just take a specific scoring timing out of context
what you can do is add a retrigger to that joker for the entire hand
which will cause its effect to repeat in whatever timing one actually exists
I guess thats good enough
https://github.com/nh6574/VanillaRemade/wiki#retrigger_joker this is roughly how it works, you'd need some extra logic to determine the joker at the start of the hand and save that until the end, or else you'd get different jokers randomly retriggering or not
Just a bit of advice, be more precise with what you want when asking questions here. What I thought you meant was that you had a joker that was supposed to have some kind of effect on cards with a specific seal
Alright thanks ill keep it in mind
Speaking of smods is there an easier way to keep up with new functions being added
Other than hoping you can find it in the commits pages
Would be nice to have a page dedicated to recent functions added in development version
We will document changes that are on the dev build when it moves to a release
If you’re using the dev build, you’ll either need to read the commits or know the right people to talk to
Not trying to be mean but even the release wiki is very lacking
In what sense?
Hard to explain but just seems like I see myself using the vanilla repo people link over the official smod one
Just easier to find stuff there
That’s because the vanilla remade repo is written in a guide way rather than a documentation way
I'd explain more but I'm limited on time rn
So if your question is “how do I do X?”, vanilla remade is more likely to have an explicit answer, whilst the smods wiki is more of a “here is everything you can use, go figure it out yourself”
I guess that about sums it up yeah
Not knocking what y'all doing very greatful for it
Hope what I said didn't come off as assholish
No I just think it’s important that people realise the difference in aims of the two resources, and that they both should exist alongside each other
Yeah
SMODS.Seal{
key = "pink",
atlas = "atlas_enhancers",
config = { rand_joker = nil },
pos = { x = 0, y = 0 },
badge_colour = HEX("EB57BE"),
calculate = function(self, card, context)
if context.main_scoring and G.jokers.cards and context.cardarea == G.play then
card.ability.rand_joker = pseudorandom_element(G.jokers.cards, "fs_pink_seal")
end
if context.retrigger_joker_check and card.ability.rand_joker == context.other_card then
return {
repetitions = 1
}
end
end
}
What are the conditions for context.retrigger_joker_check to happen. Even without the extra check in that if statement, it is never true.
Both have helped out on the mod I've been working with
Also if this code would not work anyway I would like to know why perchance
SMODS.Joker{
key = "sugamimi",
config = { extra = {retriggers = 1}},
pos = { x = 0, y = 8 },
rarity = 4,
cost = 20,
blueprint_compat=false,
eternal_compat=true,
perishable_compat=true,
unlocked = true,
effect=nil,
soul_pos={ x = 0, y = 9 },
atlas = 'grasslanderJoker',
calculate = function(self,card,context)
if context.other_card and context.other_card.seal then
local effects = {}
if context.other_card.seal ~= 'Blue' then
if context.end_of_round and context.cardarea == G.hand and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = function()
if G.GAME.last_hand_played then
local _planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == G.GAME.last_hand_played then
_planet = v.key
end
end
if _planet then
SMODS.add_card({ key = _planet })
end
G.GAME.consumeable_buffer = 0
end
return true
end
}))
effects[#effects + 1] = {
message = localize('k_plus_planet'), colour = G.C.SECONDARY_SET.Planet,
message_card = context.other_card
}
end
end
if context.other_card.seal ~= 'Purple' then
if context.discard and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = function()
SMODS.add_card({ set = 'Tarot' })
G.GAME.consumeable_buffer = 0
return true
end
}))
effects[#effects + 1] = {
message = localize('k_plus_tarot'),
colour = G.C.PURPLE,
message_card = context.other_card
}
end
end
if context.other_card.seal ~= 'Gold' then
if context.individual and context.cardarea == G.play then
effects[#effects + 1] = {
dollars = card.ability.extra.dollars,
message_card = context.other_card
}
end
end
if context.other_card.seal ~= 'Red' then
if context.repetition then
effects[#effects + 1] = {
repetitions = card.ability.extra.retriggers,
message_card = context.other_card
}
end
end
return SMODS.merge_effects(effects)
end
end,
}```
Anyone know a better way to code this?
I want a Joker to make it so any card with a seal has the combined effects of all four seals
How can I check if the source of a context.card_added is riff raff?
how to save custom data? at the moment im using add_to_deck and remove_from_deck to register and unregister callbacks but when the game reloads there not registered anymore. how would i save the custom data?
add_to_deck = function (self, card, deck)
Twitch.Chat.register_callback(card, self.chat)
end,
remove_from_deck = function (self, card, deck)
Twitch.Chat.unregister_callback(card)
end,
also is there like uid for cards? checking with the card itself seems stupid and i dont think it would even work lol
Twitch.Chat.unregister_callback = function (card)
for i, cb in ipairs(Twitch.Chat.Callbacks) do
if cb.card == card then
table.remove(Twitch.Chat.Callbacks, i)
break
end
end
@blazing helm you working on a twitch mod to?
How is yours working just curious ours is more of a twitch vs chat style back and forth
I just wanna make sure ideas don't overlap and they could coexist lol
If not oh well beaten to the punch I suppose
ours seem quite dif. mine, as the name EngagementBait suggests, is more using viewer engagement to make cards stronger (and sometime weaker) like one im working on rn gains chips every chat message sent
Oh nice
If you wanna collaborate something sometime let me know
Be nice to see these mods interact
sure! i just need to get the base mod working first lol also probably need to add the auto balancer running first as depending on the size of the streamer my jokers are ether completely useless or WAY to strong lol
Most the commands are done on our in we are just fixing up bugs and adding in jokers and stuff
There's a bug in the level down that crashes the game because level -1 isn't a thing

What I'm struggling with is balancing the commands with jokers
Cause I got funny commands but they are kinda more powerful than the jokers battling them
rip gl with that lol
Currently working on a deck based on a meme from a streamer friend of mine
Can't send a picture of it for some reason did pictures get disabled in #💻・modding-dev ?
did you set the feature flag?
how can i emmit custom calculate call? i wanna send out a custom context at a certain point in the game, but i dont know how
(example of recieving vanilla context, but i wanna send out my own)
no
try uploading it in another server and send the media link
It's probably just the mobile app being dogwater
likely
try this then
if it doesn't embed I can at least view the image
?
you can store custom data for the run in the G.GAME object
recursive tables wont be saved properly
there could be some issues with saving though if your object is too complicated
also make sure when removing you check for duplicates of the card to make sure you don't disable the effect even though they still have a copy
put a call to SMODS.calculate_context({ the context table}) wherever you need it
cool thx
noted
there's no way to identify a saved and reloaded card based on information you stored elsewhere. you have to set some flag on registered cards and register based on that when the cards are loaded
you can define a load function on the relevant object to achieve that
How do I display negative chips on card's tooltip?
thx this is probably better that acctually saving it :3
would this also be run when the card appears in the shop? was gonna ask if that was possible was i want to to work in the shop as well lol
Also the flag needs to be in the card's ability table
hm I'm not actually sure
either way, setting it with add_to_deck won't register it until you buy it
Is there a way to check how a card was created from context.card_added?
I'd like to check if it was created by riff-raff specifically
card_added doesn't specify a source, no
you'd probably want to patch a custom context into riff-raff to make that work
In that case, is there a better way to do this?
The goal is to fill every empty joker slot with the joker that's added, and the main issue with riff-raff is that it adds 2 jokers at once, so I'd need to use -2 instead of -1 when calculating free slots (as context.card from context.card_added apparently doesn't count towards the #G.jokers.cards yet)
if free_slots > 0 then
for i = 1, free_slots do
SMODS.add_card {
key = context.card.config.center.key,
no_edition = "true"
}
end
end```
And it's completely possible I'm just overcomplicating it (this is inside card_added context and I also check if it's a joker)
I think you can take G.GAME.joker_buffer away instead of 1
I tried, if I use G.GAME.joker_buffer, then even if I add a card in another way (e.g.: buy it from shop), I'll end up with 1 more Joker than my slots
Is riff-raff perhaps adding the second joker after you've already filled the slots with the first?
I feel that's also a possibility
I think the way it works is that before anything gets added, riff-raff fills it up to 4/5 slots with the copy of the first riff-raff joker, and then the two jokers from riff-raff get added and push it to 6/5
Or at least that's my assumption, may be wrong
Because of how I need to subtract 1 even when buying a normal joker as the joker I buy gets added after its copies, that would be how I imagine it works with riff-raff
Actually, doing - G.GAME.joker_buffer - 1 works for 1 riff-raff (ends in 5/5), doesn't work for 2 riff-raffs (6/5), and for 3 riff-raffs it works again (5/5), probably because there are no slots for the 2nd riff-raff to trigger in the first place
I suppose you need to update joker_buffer when adding your cards
How do I use quantum enhancements?
nvm
anyone know why using quantum enhancements targeting wild cards is stupidly laggy?
this joker is supposed to flip all jokers when the blind is selected but this code doesnt work
enhancements get checked a lot, so quantum enhancements is very intensive. A thing to reduce the lag is to make sure you only check the enhancement with SMODS.has_enhancement() if it's absolutely necessary, while hard-checking the center in any other case
im not checking the enhancement anywhere
I have a card which makes flipped cards act as wild cards
and whenever I select cards I lose a ton of frames
Yeah, it makes it check very frequently to see if your selected hand is a specific poker hand, I suspect. I think there are ways to optimize it, but in my experience, quantum enhancements as a feature is just an insane performance drain in most situations
I know I removed any design that would need it from my mod so I didn't have to use it
hmm
anyone know what im supposed to change here for it to be each 5 dollars instead of 1?
card.ability.extra.chips * math.floor(math.max(...) / 5)
why not check bootstraps
what does your code look like also?
when i was looking through base game cards to base my code off, i went from first page down the list, so the bull was the first i saw and i didnt think to check for others
in short: i forgot bootstraps existed lmao
You should use vanillaremade to check vanilla code...
Well
Actually nvm this doesnt tell me that you arent already
:p
@wintry solar Setting up the font like this, and just tested it both with and without the mod prefix because I wasn't sure whether Fonts needed it and this seemed quicker than to check 😛 I'm not sure why the text isn't glued right on the card, though, when it comes to movement.
oh jesus, haha
Yeah I fully just read the code wrong. just .font is how it's stored in the canvassprite, not how it's passed along
The movement's the bigger mystery, though
calculate = function(self, card, context)
...
if context.check_enhancement and not context.blueprint then
if context.other_card.facing == "back" then
return {m_wild = true}
end
end
end
I can't think of away to nerf the flush deck

how to you nerf a deck where every card is hearts
Looked into the drawstep I use for counters, and it's functionally identical except the layer and the location of the stored CanvasSprite. Really can't figure out why the movement doesn't match for the mystery card
What’s the issue with the movement?
Yeah it’s just quantum jank in that case then
The counters in the first clip are fully glued to the card. The question marks on the enhancement seem to move from a different axis, though
I wonder if it’s a table issue
is there a way to lock a joker until a certain hand type is played in a run? i know how planet cards do it but i dont know if it is the same for jokers
rip
You can determine spawn conditions by writing an in_pool function for your joker
I suspected it might be, so already tested it outside of a table, by just using a single CanvasSprite, directly put into canvas_text
I think I'll make it a config option then to enable
time to figure out how to do that
Doing a quick test and setting the offset at x=0,y=0, I think the pivot point is no longer offset when the text is 🤔
I’m pretty sure the offset should just control where on the canvas the text is
I don’t believe it actually moves the canvas
Son muy bolaceros
I'm wondering if it's just a visual illusion, where the bottom left doesn't make you notice the lack of change as much, while centering it does 🤔
Have you tried centring the counter ones?
Playing around with that now, yeah
I think it still sticks. Accidentally moved the sprite up, though. Wondering if maybe the sprite moved strangely, and that made the text seem more separate than it actuall is? 🤔
it's for sure the sprite. Moved it slightly right as well and it's pretty obviously moving off of the card now. That makes so much more sense, haha
Yeah, okay, I think it's a combination of the sprite offset, and that being less noticable when its idling because sprites don't pixel crunch as much when rotating, while the font does get affected by it
how can I make loc_vars change while your looking at the card?
Changing the sprite and changing to a font that's less blocky functionally solves this, luckily
Like in Misprint? You want to use a DynaText for that
You'll have to set up a UI node that you pass along to main_end or main_start in the loc_vars. Depending on how complicated you want it to be, and how intergrated you want it to be in the actual description text, it can be quite the hassle
uhhhh
a balatro mod for movie dorks. Contribute to icyethics/Kino development by creating an account on GitHub.
This is how I've set it up for Deadpool
which looks like this
its probably related to the font's settings actually
did u switch custom fonts or did u use another nilla font
okay I think i got it
how does urs go so fast?
mines updating once a second
I copied what u have
I'm not sure why the speed would be different then 😬
Might just be how fast my event updates the timer variable?
Could be game speed
wait im stupid
im using os.time which doesn't have ms
its refreshing fine it's just not precise enough lmao
wait how do I get ms
I dont know much lua
os.time is float
its only giving me seconds
love.timer.getTime()
thx
why are the text nodes not in columns?
each text object should be in a row too
i'm gonna try saying that in the most non-judgemental way possible
but that feels kinda clunky imo
Tell that to thunk
thunk will not read this channel you can say whatever haha
Balatro ui code is pretty much made just for the use cases in vanilla balatro so its very clunky for use in modding
imaging you jinx it-
everything about balatro ui code is clunky 😭
Factual statement
it works, you need to know only 1 UI system (hello unity), and you dont need draw everything manually. so it's not the worst outcome
THIS MESSAGE WAS APPROVED BY
THE TRUE BALATRO MODDERS ✅
How do I get localized text from descriptions.other.text?
It works for vanilla but not in my case
By "in my case" I mean custom text that I added
Im trying to make -chips from rank being displayed
And in steamodded's localization I have card_chips_minus
you need parse it first
How do I do that?
in v_dictionary?
In descriptions.other
also this is incorrect, type = "raw_descriptions" for .text field
What does parsing mean? Doing it like {text = 'ABC'}?
no the game parses all the localization text into its formatting
it shouldnt matter in this case tho like i said
if it's perma minus chips the look at SMODS.localize_perma_bonuses in the code
does this seem more like a common or uncommon?
common, though a strong common
pair it with hologram and chad to be most effective
ok I want to make a challenge deck where all cards are debuffed how would I do that (sorry for asking during conversation)
it's like a variable photograph with somewhat more complex numbers lol
i feel like rarity is kind of a blend between effect strength & complexity
rarity, to me, is a combination of "how hard is it to achieve this effect" vs "how strong is this effect"
yea that's a fair way to look at it
the starting cards or all?
starting cards
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
if not G.playing_cards then return false end
for k, v in pairs(G.playing_cards) do
v.ability.perma_debuff = true
end
return true
end
}))
end
ok so v.ability.perma_debuff gives cards a permenent debuff efferct
ok thanks
do I put the code in the challenges or somewher else
I am having trouble debugging this challenge so if anyone could help that would be nice
How do I add something directly into SMODS localization? When I add through other mod it works just fine
It seems like new entries just don't get added
you would need to be more specific
G.localization.descriptions.Other.card_chips_minus = {text = {'{C:chips}#1#{} chips'}}
I'm trying to make a joker that destroys all scoring stone cards on the first hand of the round but this error keeps appearing and I can't figure out why
This is the calculation code:
calculate = function(self, card, context)
if context.joker_main then
return {
x_chips = card.ability.extra.x_chips
}
elseif context.destroy_card and G.GAME.current_round.hands_played == 0 and not context.blueprint then
if SMODS.has_enhancement(context.destroying_card, "m_stone") and not context.destroying_card.debuff then
SMODS.scale_card(card, {
ref_table = card.ability.extra,
ref_value = "x_chips",
scalar_value = "xchips_mod",
message_key = "a_xchips",
message_colour = G.C.CHIPS,
})
return {
remove = true
}
end
end
end
that should be loading
it depends on how you want to use it
also you should put it in a localization file instead of inserting it into G.localization if that's what you're doing
context.destroying_card doesnt always exist in context.destroy_card, only the other way around
Oh alr I'll try switching to destroy_card, thanks
Nevermind, i just had duplicate
Yep it works now, thanks a lot!
??? what lmao im not allowed to ask questions? XD
oh so that one went through
lest try again lmao
how do i make the slider wider?
ok so when i post the code it gets block 😭
Is it possible to make a joker that changes a hand type?
As in, if you play a hand type it gets considered as another
Like you play a pair but the game treats it like a flush
Thank u :0
how come juice_card_until not animate the joker even though it does get evaluated correctly?
What could I possibly have done so wrong that the card literally does nothing?
You added a joker main check
Yeah, it works now after removing it
is there a way to increase the spacing between the cards here (this is the collection)
if there isn't without like a lovely patch then i won't do it it's fine
key = "martianmanhunter_joker",
pos = { x = 0, y = 0 },
rarity = 1,
cost = 4,
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
effect = nil,
atlas = 'martianmanhunter_joker',
soul_pos = nil,
loc_vars = function(self, info_queue, card)
return { vars = { localize(card.ability.extra.poker_hand, 'poker_hands') } }
end,
if context.evaluate_poker_hand == 'Three of a Kind' then
local poker_hands = context.poker_hands
return {
replace_scoring_name = "Four of a Kind",
}
end
}```
definitely not doing this right
i think i get like the gist of it
but it's not clicking
it's supposed to turn three of a kinds into four of a kinds
calculate = function(self, card, context)
if context.evaluate_poker_hand and context.scoring_name == 'Three of a Kind' then
return {replace_scoring_name = 'Four of a Kind'}
end
end
key = "martianmanhunter_joker",
pos = { x = 0, y = 0 },
rarity = 1,
cost = 4,
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'martianmanhunter_joker',
soul_pos = nil,
config = { extra = { poker_hand = 'Three of a Kind' } },
loc_vars = function(self, info_queue, card)
return { vars = { localize(card.ability.extra.type, 'poker_hands') } }
end,
if context.evaluate_poker_hand and context.scoring_name == 'Three of a Kind' then
return {replace_scoring_name = 'Four of a Kind'}
end,
}```
changed it to this
but it says
unexpected symbol near if
so it crashed D:
this needs to be in a calculate function
ok the game laucnhed
but when i went to hover over the card
it crashed
said something about the arg value
"attempt to index local args (nil value)"
your card doesn't have ability.extra.type, it has ability.extra.poker_hand
omg thank u all
you're all life savers
when something isnt in vanilla remade
i kinda dunno what to do lol
ok so
one more thing😅
if i want this effect to now apply to two types of hands
as in, a three of a kind and five of a kind
both get turned into four of a kind
how would i implement that
or context.scoring_name == "Five of a Kind" in your condition
you will need parentheses surrounding both scoring_name conditions
i know u can check if you used a type of consumable with context.consumeable.ability.set == ‘Planet/Tarot/Spectral’ but can you check for a specific consumable?
context.consumeable.config.center.key?
And for the vanilla keys you can check vanillaremade since it uses the same keys as vanilla
or look at vanilla
Or like the one keys reference, i dont have a link though
I just learnt how to inject stuff with lovely... now this is a game changer
i replaced my hacked solutions with injecting and that made some bugs dissapear... life is good
that worked tysm
lovely injections are awesome and also using them often irrationally stresses me out but it'll be #okay
patches are evil but it’s more evil to use janky hooks
patching in a function call is my favorite way to solve a problem
lets me keep my code in my files but i can still put it in the other files exactly where needed
This was my evil janky hook before injections. Event in a separate queue that runs every frame to serve as DIY update function
--Hack for detecting state switches.
G.E_MANAGER.queues.vissamap = {}
VSMP.last_state = G.STATES.SPLASH
local event
event = Event {
blockable = false,
blocking = false,
pause_force = true,
no_delete = true,
trigger = "immediate",
func = function()
if VSMP.last_state ~= G.STATE then
print({msg = "VANILA SWITCH", last_state = VSMP.last_state, new_state = G.STATE})
-- ... i was doing buncha stuff here
VSMP.last_state = G.STATE
end
event.start_timer = false
end
}
G.E_MANAGER:add_event(event, "vissamap")
holy
yeahhh
Ho lee
maybe put it inside of a Column with minw set to a big value?
i want this joker to debuff itself if it hits a random chance but this code doesnt work. is there something internal that makes it so something cant debuff itself or is my code for this just wrong
I dont see debuff in the list of returning effects? So there's some other way to debuff it
found in utility functions
context.debuff_card doesn't happen during context.after
set a flag during after, check it during debuff card
Also fyi this wont ever undebuff itself
If you want it to do that
Since jokers dont calculate while debuffed
-# unless you hook Card.can_calculate for this joker
true
you could use the mod debuff and calculate functions instead to get around that
yea i know i was just trying to see if i can debuff it in the first place ill cross the undebuff bridge when i get there
not all returns are listed there, returns exclusive to their contexts are listed under them
gotchu
never realised pseudorandom_probability exists, its not on the utils doc page
oh its on the calculate page
it should be in both honestly
why does this never get passed the "After!"
G.jokers.cards
Not G.jokers
Also you should be using SMODS.find_card instead of find_joker
Also you dont need to do the for loop to begin with if youre using that
some way to prevent selling consumables? tried context eternal check but it only seems to be for jokers
hey guys.
How do I take ownership or modify a finisher blind within a stake?
I don't think there is any initial modifiers for that, and all the stuff I've tried makes the change global.
nevermind, just needed to use override_compat
if you only care about selling then it should be a hook to Card.can_sell_card because that will prevent destruction too
I check for context.trigger.from_sell, so that should be fine right?
a joker
the its probably good yeah
After scoring I wanna draw a card, check if the rank is in hand and draw another if it is (can repeat) but the played hand goes away while the events are running so context.full_hand empties out, is there something I'm missing or is that normal?
if context.final_scoring_step then
drawExtraCard = function()
card_eval_status_text(card, 'extra', nil, nil, nil, {message = "Go Fish!", colour = G.C.ORANGE})
play_sound('tarot1')
draw_card(G.deck, G.hand, 0, 'up')
G.E_MANAGER:add_event(Event({
trigger = 'after',
func = function()
-- context.full_hand empties out before events are done running
for _, playing_card in pairs(context.full_hand or {}) do
if playing_card:get_id() == G.hand.cards[#G.hand.cards]:get_id() then
sendInfoMessage("Card drawn match ranks")
drawExtraCard()
delay(2)
end
end
return true
end
}))
end
drawExtraCard()
end
Move everything out of the event.