#💻・modding-dev
1 messages · Page 99 of 1
I don't remember why I wrote this over using the games version though
there was a reason
I think it was that the base game didn't use ref_tables?
do i have to update something in the actual ui elements?
like write "callback" or something
yes
mhmm
sorry i know i'm asking a lot, this mod i'm making is very complicated though
i do not make easy projects for myself, they aren't fun if they aren't challenging
this is probably like the 1st serious thing i've done in lua, minus some other mods from time to time in the past
Xmult_mod is for the mult's multiplier. What is the chips equivelant?
Xchip_mod i think
i'm not even joking
oh my godddd it still isn't working
help me
you need a mod that adds xchip support
i am going to
explode
?????
or do i need to reference G.FUNCS.cycle_update instead
you need current_option too
current_option = Wrenbind_config.IsaacVersion
ok thank yoyu
oh
now it says "attempt to perform arithmetic on field "current_option" a string value"
💀
let me guess, i can't use strings
no shockingly it doesn't matter because this thing is still broken
your config needs to be index based
including all values?
and delete the config file the game has made in appdata/balatro/config
😔
Is there no chips_mod or is it chip_mod?
what kind of paper, you could always emulate the crusty ass lucky cards
just like mostly normal white paper but with a small amount of creases, etc.
dude i'm tired i'm going to eat dinner
maybe start with heavily degraded by copying the lucky card and then start toning it back
I figured it out! I just looked at the lucky cards and made it very minor, thank you lol
Is s_chips the chips the base chips of a poker hand type?
is the difference noticable?
or should i darken the creases more
less is more in pixel art but it doesn't look outright papery yet so i'd go quite intense with it then remember to view it from afar
when you're zoomed in the details always look deceptive
you're right lol
How do you get the base chips from the scoring poker hand type?
i hate how i know immediately what this is the second i see it
how's this?
still too little?
almost there i'd say, maybe a touch more yellow/off-white
the card is too pristine white right now, you don't want too many details as the card is quite complex as is so colour might be your friend
the entire paper or just the creases?
both
alr bet
contrast on pure white compared to pure black is much harder to notice
it's called the simultaneous contrast effect
is this too yellow?
too green maybe make it a touch warmer
then use that base colour as a reference for your darker or lighter creases
this one looks pretty good
yeah looks more papery now
maybe?
yeah you're on the right track, just make small tweaks as you see fit
pure white like that is pretty forgiving with light details in the background
as long as you don't overdo it and make it too busy you've got lots of leeway
alright!
Thank you so much for helping me lol
trying to make a consumable the rerolls another consumable, and it isnt doing anything for some reason
i have no clue what is going on here
it just refuses to acknowledge the fact that there are 2 higlighted consumables
use the balatro source code
ok managed to fix it i think
SMODS.create_card
how do i get the round score from G.GAME.blind? after ante scaling is applied
i can only find G.GAME.blind.chips in the source code but that didnt work for me, maybe the error is elsewhere
nvm i got it working, my mistake:)
thx for the help yall
i did this
wait is that not the repo name
oh
there u go
look at d20 and d4
the actual roll mechanics are in the "logic" key in dice.lua in jokers/dice.lua
ur looking at d20 tho
hmm
how do i get the current mult at the end of calculation for jokers as a joker
like i want to know what everything's mult is AND THEN do my calculation
it's going to multiply the mult by the mult
mult and chips actually
i did try checking for context.final_scoring_step = true, but it seems like that doesnt work for jokers, or at least not by itself
this is something i would like to know myself
minor mistake i think context.after does work for scoring jokers
it does
i found something from cryptid but oh
ohhh
oops
rip
i found something that might work
i think it's
if
context.cardarea == G.jokers
and not context.before
and not context.after
oops
i'll lyk tho i'm testing it rn
huh
what would even be the difference between that and context.joker_main
shrugs
i guess we'll never know
i'm about to test it tho, i'll lyk
how do u get the current chips and score tho
chips+mult*
hand_chips and mult, both global vars
if you want to add the current score to that you do G.GAME.chips
gotcha
the latter
for both
i only hesitate to use context.after because according to steamodded docs that makes the joker activate after deck effects (such as plasma)
which isnt very nice
whats your code?
if
context.cardarea == G.jokers
and not context.before
and not context.after
then
print(hand_chips)
print(mult)
return {
message = "^2"
}
end
literally this
one sec
its triggering for every time cardarea is == G.jokers
which in this case would be context.joker_main and context.after
no clue
i might've made it work though
we'll see
i made it work
oh that's not doing what i wanted it to do though
btw
this is what that does yes
even still that should only trigger once unless cardarea isn't changed from G.jokers and the docs dont mention that
no i got it
it triggered twice, but i just set a global variable so i only listen once
ok very nice
so now, how would i change the mult and chips completely
would it literally be as simpel as hand_chips = hand_chips*hand_chips and such
theoretically my polyphemus is working now
i think it works
i would not have expected that to work
what can i say i'm good at programming
yeah no it actually works
15*15
4*4
i'm so good
anyway it is NOT doing eval text
💀
yeah i bet it doesnt look very pretty
no actually it's surprisingly decent
ok this REALLY does not want to do the eval text
sigh i have to use my custom eval function
oh my god
wait i'm so fuckign stupid
😭
i have disable scoring animations on in talisman
i did need my custom function though
since the thing it was doing was not related to scoring
I'M SO RFUCKING DUM B
😭
ok it works
very nice..
how could i change legendary jokers to show up in the shop with a like .025% weight?
or at least, how could i make my own custom rarity that does that lol
I think you need to use in_pool.
i was trying with the cryptid codebase but it was NOT working
whar
On the Steamodded wiki: https://github.com/Steamopollys/Steamodded/wiki/SMODS.Center
that's not very helpful where do i evben run that
not saying ur not helpful just saying the docs suck
but everyone knew that already
You put that in your SMODS.Joker like where you put calculate = function...
I think so. Ive only used it to disable a non-legendary joker from showing up.
alr
honestly 0.025 is way too much
1/20 chance sounds a lot better to me
nah 1/15
does this work even if the rarity is 4
guess not
lemme try it at q3
that. did not work either
😅
oH
no that worked
nice.
it's not consistent though...?
ughhh
i do know there's SMODS.Rarity though i just don't know how to use it
weak documentation aside i find steamodded to be quite intuitive
props to the creators
me too yeah
if an idiot like me can use it
It seems like the documentation is kinda getting better each day? A few days ago, half of the pages were still for the outdated pre-1.0.0 alpha versions of steamodded.
yes it was updated just yesterday so i have huge respect for whos tending to it
hold on im curious about something, the docs say that the blueprint_compat argument is cosmetic, but by default nothing is compatible with blueprint unless coded to be, correct?
Ive had some of my jokers trigger when I didnt include if ... and not context.blueprint, so it it just cosmetic, and they do trigger by default. The blueprint_compat is just for the 'compatible'/'incompatible' message in Blueprint's description.
By default, I think blueprint_compat is set to false.
ah ok, context.blueprint is for when its triggered via blueprint
i hadnt understood that for some reason
thank you very much
@frosty dock is the main maintainer rn
is there a mod template out there for a basic single joker addon?
something i can work with to change and play around with the code and mod
https://github.com/Steamopollys/Steamodded/blob/main/example_mods/Mods/ExampleJokersMod/ModdedVanilla.lua this is 10 jokers, but it goes over the basic functions of jokers, very useful to have
it's pretty old by this point but
most of this should still hold up
thanks
Have there been new fields or SMODS specific functions that need to be added in? I don't know what would need to be updated, but I haven't been paying as close attention to Steamodded over the last month or two.
None to my knowledge
i heard someone say in passing that some things in the example mods don't work anymore, haven't tested anything myself so idk for sure
It was Gros Michel/Cavendish's end of round check getting triggered 6 times because of Retrigger API calling more contexts, it's been patched.
Other than retrigger API bugfixing I don't remember anything tied to jokers that would've broken these jokers.
Glad to hear it, mostly just double checking in case there was another obvious bug I've missed.
Wasnt there a glitch where the joker queue was off by 1 if you had SMOD?
Ah ok cool to know
well there was some other weird stuff too 
(but yeah seed behaviour should be fixed now)
chat should i set up ko-fi?
You always can. What's it for?
ig just for support for whatever projects I've ended up being a part of here xd
whats ko-fi?
donation platform basically
ah okey
how can i destroy a card? joker or otherwise?
I'm not sure people are very willing to donate to someone who was part of a project instead of to the project as a whole tbh
(though tbf, I have no personal experience with such things)
i mean i do have some of my own projects like black hole, but might be tricky for steamodded
Ah yeah personal projects will probably work better
I'm top contributor by far and do a lot of organizing and stuff, but I've never claimed it as my project
I know Jen set up a donation for his Almanac mod which seemed to be doing alright
it's definitely personal but with almanac attached
Oh you're right, the ko-fi page is pretty general, but the discord channel implies it's mostly almanac + other balatro mods
maybe i should plaster my kofi on all of my mods 

:jolly:
btw, any updates on the sound api looping delay issue?
the what
Hello, I am adding support with JokerDisplay (this runs after my custom joker is added correctly with SMODS.Joker)
But I assume it's not added into G.P_CENTERS
How can I get its properties?
or should I just write "hearts" instead (altho it could be useful for future jokers that change suit)
you need to use the full key (j_modprefix_enarmored_joker where modprefix is your mod's prefix)
Prefix is
"prefix": "my",
joker key is
key = "enamored_joker",```
so to get it I would have to type
```my_enamored_joker```
correct?
j_my_enamored_joker
that's a weird error
what does your code look like
because it seems like you're doing j_my_enamored_joker.index when you should probably be doing G.P_CENTERS["j_my_enamored_joker"].index
main
local utils = dofile(SMODS.current_mod.path .. "/MyJokers-utils.lua")
-- Create an atlas for cards to use
SMODS.Atlas {
key = "MyJokers_atlas",
path = "MyJokers.png",
px = 71,
py = 95
}
-- List all Joker files here
local joker_files = {
"enamored_joker"
}
-- Load and register Jokers using the utility function
for _, filename in ipairs(joker_files) do
local joker = utils.load_joker(filename)
SMODS.Joker(joker)
end
if JokerDisplay then
SMODS.load_file("JokerDisplay.lua")()
end```
Joker Display
```local jd_def = JokerDisplay.Definitions
jd_def["enamored_joker"] = {
text = {
{ text = "+" },
{ ref_table = "card.joker_display_values", ref_value = "mult", retrigger_type = "mult" }
},
text_config = { colour = G.C.MULT },
reminder_text = {
{ text = "(" },
{
ref_table = "card.joker_disp
lay_values",
ref_value = "localized_text",
colour = lighten(loc_colour(G.P_CENTERS["j_my_enamored_joker"].ability.extra.suit:lower()), 0.35)
},
{ text = ")", colour = G.C.UI.TEXT_INACTIVE },
},
calc_function = function(card)
local mult = 0
local text, _, scoring_hand = JokerDisplay.evaluate_hand()
if text ~= 'Unknown' then
for _, scoring_card in pairs(scoring_hand) do
if scoring_card:is_suit(card.ability.extra.suit) then
mult = mult +
card.ability.extra.s_mult *
JokerDisplay.calculate_card_triggers(scoring_card, scoring_hand)
end
end
end
card.joker_display_values.mult = mult
card.joker_display_values.localized_text = localize(card.ability.extra.suit, 'suits_plural')
end
}
it should quite literally be the logic used for Lusty Joker
enamored_joker.lua
key = "enamored_joker",
loc_txt = {
name = "Enamored Joker",
text = {
"Played cards with",
"{C:hearts}#2#{} suit give",
"{C:mult}+#1#{} Mult when scored",
}
},
config = {
extra = {
s_mult = 5,
suit = 'Hearts'
}
},
rarity = 2,
pos = { x = 0, y = 0 },
atlas = "MyJokers_atlas",
cost = 7,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
soul_pos = nil,
order = 3.1,
loc_vars = function(self, info_queue, center)
return {
vars = {
center.ability.extra.s_mult,
center.ability.extra.suit,
}
}
end,
calculate = function (self, card, context)
if context.individual and context.other_card:is_suit(card.ability.extra.suit) then
return {
mult = card.ability.extra.s_mult,
card = card
}
end
end
}```
🤔
and you're still getting this error?
I'm not seeing how that's relevant unless I misunderstand the error
oh I did misunderstand, weird that Lua gives an error like that
"id": "MyJokers",
"name": "MyJokers",
"display_name": "Personal Jokers",
"author": ["Me"],
"description": "Adds leveled up Jokers of existing ones",
"prefix": "my",
"main_file": "MyJokers.lua",
"priority": 0,
"badge_colour": "c7638f",
"badge_text_colour": "",
"version": "1.0.0",
"dependencies": []
}```
its where I set the prefix
you're taking the value from the center itself
which does not have ability
but rather config
yeah yeah Myst is right but it's not really relevant if "field 'j_my_enamored_joker' is nil"
and using centers instead of the card means that you cannot change it at all so lol
yes it throws an error in G.P_CENTERS["j_my_enamored_joker"]
oh
honestly I'd just print the whole G.P_CENTERS at this point
arent there a few jokers that change suit every round like mail in rebate
it crashes on startup tho like when loading the mods
then comment out the line that's making it crash
a lot of them use global variables
eg G.GAME.current_round.mail_card
I see 🤔
we were speaking so I thought it was ok (there was a reason), sorry
its that line that crashes
is there a way to make the card2:start_dissolve() happened after the scoring of the Joker?
Wrap it in an event
what line?
colour = lighten(loc_colour(G.P_CENTERS["j_my_enamored_joker"].config.extra.suit:lower()), 0.35)
yeah so comment that line out
I did and it doesn't crash anymore, yeah
and print out G.P_CENTERS so you can take a look at it
oh I see
you can use inspect(G.P_CENTERS) to stringify the first level
what
if i wanna use pseudorandom_element() to select a random joker, do i pass G.jokers to it? because that doesnt seem to be working for me
it's making pseudorandom_element() return weird values like -1 or false
you'd want G.jokers.cards
how do I target smods files with lovely now?
why is this not working
show your shader code
=[SMODS _ "src/overrides.lua"]
file structure got changed around, that's all
👍
so we were right but why doesn't it work then 😵💫
is that from inspect? I thought inspect only showed the top level
and your smods.shader declaration?
I inspected card when the joker is triggered
ah
key = "Cursedshader",
path = "Cursed.fs"
})```
I just set this as target = '=[SMODS _ "src/overrides.lua"]' ?
change the filename to cursed.fs
its probably something to do with calling DisplayJoker before adding the joker
but I made sure they are ordered correctly
local joker = utils.load_joker(filename)
SMODS.Joker(joker)
end
if JokerDisplay then
SMODS.load_file("JokerDisplay.lua")()
end```
let me try something
maybe the key too
i did that, same error
not the key one sec
--0.75X mult
key = "Cursed",
shader = "cursedshaderpleasework",```just to be sure, this is how you add the shader?
yeah its not working
let me tell you, this shader sure is cursed
let me try that
this makes lovely panic D:
ugh
Weird. Try looking at the jokerdisplay docs and how other people do it
- why isnt this on the steammoded wiki
- if they have to be the same, why have 2 different fields???
genuine question
I checked some but I need one specific instance where someone displays the suit
lets see
i thought it had worked at one point :v
maybe it's on a newer version than I have?
oh right it's borked with nested files doesn't it
am i being dumb?
oh looks like the explanation is on the wrong field
in answer to question 2, the values are in two different files
ok, i wasnt being dumb awesome
just tried, also borked on my end
hey! im trying to make some balatro themed graphics for a tournament and was trying to see if any of y’all have the backgrounds in the game as a video/gif? I’ve found some pictures but not anything moving. asking y’all cus you’re the ones sifting through the game making swag mods
or if you don’t have it is there a way I can get ‘em?
this is NOT purple
😭
Which channels are you boosting?
Use less red
i got to tweak values
it's a shader, so there's no way to export as video directly
Pure Red + Pure Blue is what we call magenta, the more traditional purple uses less red
no, because it's a shader. however, you can install #1228149931257237664 and use (Ctrl+)H to hide all UI elements, leaving only the background and you can record your screen
ah okay that’s very helpful. thank y’all so much <3
so with the steamodded implementation of create_card() i still need to emplace it, but do i also still need to add_to_deck()?
yes
fair enough
so it triggers effects that happen when it is added to your slots (including Negative!)
and other mods
i see, that makes it make a lot more sense
Why is my tag not appearing :( SMODS.Tag { key = 'legendary', loc_txt = { name = 'Legendary Tag', text = {"Create {C:attention}a", "{C:legendary,E:1}Legendary{} Joker", "{C:inactive}(Must have room)"} }, min_ante = 12, atlas = 'T', pos = { x = 0, y = 0 }, config = {}, apply = function(self, tag, context) if context.type == "immediate" then local lock = self.ID G.CONTROLLER.locks[lock] = true self:yep('+', G.C.PURPLE, function() if G.jokers and #G.jokers.cards < G.jokers.config.card_limit then local card = create_card('Joker', G.jokers, true, nil, nil, nil, nil, 'legend') card:add_to_deck() G.jokers:emplace(card) end G.CONTROLLER.locks[lock] = nil return true end) self.triggered = true return true end end }
Wait nvm
For some reason it's working now
do you know how can I check the full debug
inspectDepth or tprint I believe
just do eval print(tostring(G.P_CENTERS['j_my_enamored_joker']))
the thing is it crashes when I do G.P_CENTERS['j_my_enamored_joker'] and I'm suspecting it has a different name
in the debugplus console it'll be fine
unless you mean scrolling btw in which case, pressing ctrl + / allows you to scroll
it auto-disappears sadly
roserjoker
What am I doing wrong why is my tag not applying?
SMODS.Tag {
key = 'legendary',
loc_txt = {
name = 'Legendary Tag',
text = {"Create a", "{C:legendary,E:1}Legendary{} Joker", "{C:inactive}(Must have room)"}
},
min_ante = 12,
atlas = 'TAtlas',
pos = {
x = 0,
y = 0
},
config = {
type = "immediate"
},
apply = function(self, tag, context)
print(context.type)
if context.type == "immediate" then
local lock = tag.ID
G.CONTROLLER.locks[lock] = true
tag:yep('+', G.C.PURPLE, function()
if G.jokers and #G.jokers.cards < G.jokers.config.card_limit then
local card = create_card('Joker', G.jokers, true, nil, nil, nil, nil, 'legend')
card:add_to_deck()
G.jokers:emplace(card)
end
G.CONTROLLER.locks[lock] = nil
return true
end)
tag.triggered = true
return true
end
end
}```
Nvm figured it out
Docs are wrong
make sure you're using version 1.1.0~dev of debugplus
how so?
https://github.com/Steamopollys/Steamodded/wiki/SMODS.Tag It states that the function apply should have the arguments (self, tag, context) but in reality the args should be (self, context) (this is...
You’re not updated
I am
But now I am getting a different issue
I'll get back to you
### Tag API
# Tag:apply_to_run()
[[patches]]
[patches.pattern]
target = "tag.lua"
pattern = "function Tag:apply_to_run(_context)"
position = 'after'
match_indent = true
payload = '''
if self.triggered then return end
local obj = SMODS.Tags[self.key]
local res
if obj and obj.apply and type(obj.apply) == 'function' then
res = obj:apply(self, _context)
end
if res then return res end
'''
are you sure? 🤔 this was updated 20 hours ago
You aren’t
oops
missing texture joker
jimbo where did you go
For some reason context isn't being passed through correctly
It's type field is nil
Which doesn't make sense
Are you on Steamodded v1.0.0-alpha-1217b?
Ok I fixed the issue
Thx for the help y'all
Idk why it wasn't being passed correctly before but I restarted and it worked so I'll take it
how do I do that?
Does anyone know how to remove a card from the hand? I can get a random card chosen with local dCard = pseudorandom_element(G.hand.cards, pseudoseed('mjoker')), but I cant get that card removed.
Do you want it to dissolve or be discarded
Dissolved. Like not in the deck anymore
There’s some other stuff you need to do too though
That works perfectly! Thank you. I didnt realize that process was called disolve
We should probably have a utility function for removing cards
ourple
Doesn't dissolve handle itself being removed from the deck? Or just the cardarea.
They are disappearing from the deck, so I think it does work?
If it works it works
do you mean like while playing hand, it destroys a random card in played hand?
if so then you should use :remove() i think
if you dissolve it does some weird ghost shit
You should also ask in #🎨・fan-art
No, in the hand, not the played poker hand
oh true
remopve is all thats nessicaery to destroy a card (I use it for DebugPlus), but I'm not quite sure the process for disolving a card
like what? 🤔
Well I'm pretty sure dissolve uses remove is the thing
Lemme check
yeah dissolve calls remove
Yeh
The new steamodded docs are so good
shoutout aure for those
Just realized soooooo many things that there are much much easier ways of doing
so what's the difference between remove and dissolved?
remove just gets rid of the card. Dissolve does thefading effect then calls remove
where are the patch notes/ new docs?
AHHH!!!!
Remove is like literal removal of the object from mem
what did i do???
Fucked up evil jimbo
EVIL jimbo be like: -4 mult
i wanna make a mod that lets you see future cards for this and the next blind, and what cards are linked to eachother.
Dissolved does the games standard removal animation that also includes the cool shader animation
isn't it only particles? no shaders?
Remove just completely thanos snaps the object from existence
No theres both a particle and slight shader effect
does the rarity api no longer mess with the games rng
Its best to use dissolve in most cases
try it and see ¯_(ツ)_/¯
It just...kinda disappears?
is texture_coords normalized? if not, what are the dimensin
should be fixed since https://github.com/Steamopollys/Steamodded/pull/317 from me and flowwey
cool
how high is your game speed in this clip
Remove just makes it be completely erased from existence instantly, but dissolve makes it look very pretty
If it’s playing cards you’re dissolving you need to remove them from other tables too and call the calculate function
depends when you're removing them
Does in_pool also prevent spawns by consumables and what not?
but yeah in certain parts of calcuation removing them causes ghost cards
Would it cause ghost cards in context.joker_main or context.after?
Ah, I see. Yeah might be nice to have an easy to use SMODS.remove function for yeah
I don't know ff the top of my head
what is hapen
lol: paint bucket in a nutshell aah shader
At this point, you might just have to settle with missing texture jimbo
SMODS may just be able to add checks in certain parts of calculations for remvoed cards too and then just remove them without a deticated function
i just want it to fade to black at the edges
wouldn't it be easier to patch that into Card:remove?
looks good to me send it
idk wherever
Is there a way to display a message without using this?
return {
message = '...',
colour = G.C.RED
}
but it does seem like a common bug that could be fixed
card_eval_text iirc?
With example for "Upgrade!", card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')}).
Is it better to use localized string in files like en-us.lua for hardcoded text?
I've yet to use a localization file myself, so, can't really say much there. 😅
black jokers mod? sounds interesting
now if i move my joker over here it had a blue
just remove the explanations
this is so balls
how are you changing the color of Jokers like that?
If I dont have a localized message, would it just be card_eval_status_text(self, 'extra', nil, nil, nil, {message = 'foobar', colour = G.C.RED})?
atleast it isnt crashing
for localization support, yeah
are shaders like an animation for the joker or does it only change color
it's graphics coding
it can do a lot
like all editions are shaders
the disolve effect is a shader
the background is a shader
is good with shaders
Think of the Minecraft's enchantment glow... also could count as a shader imo. 😂
where does one find more about shaders and how to use them
how do i screw with ui
https://thebookofshaders.com/00/ i htink
someone please get this voodoo out of my face
i am SO bad at shaders
I have that version, maybe its because I have a different keyboard but ctrl + / doesnt do anything
is there a way to refresh shaders
like if i make a change to a shader, then i press M, it reinjects the shader?
this is so bad... and its not even working
for loc_vars = function(self, info_queue, card) and calculate = function(self,card,context) is the word function defining it as a function or is it the name (the name of this function being named function
does anyone have any mods that just alter the ui so i can use them as a reference. @EV3RYONE
Function.
so the first one
Ye.
there, I had to edit the mod code to change it to f12 lol
Isn’t everyone?
Shaders have nothing on regex tho
how do i darken a shader so that as you get closer to the edge it gets darker?
regex is life find and replace rigt?
by mastering the dark arts
i felt the same way and eventually after changing a : to a . my code worked, took a extremely long time to figure out that was the problem
lmfao
tf is a swizzle
"ah yes the common swizzle bug" insane
really? pressing ctrl + / or just / doesn't open the "chat"?
I never thought an error message would make me laugh
nope. I had to go and edit the code. now its set to f12
Please learn shaders 
In computer graphics, swizzles are a class of operations that transform vectors by rearranging components. Swizzles can also project from a vector of one dimensionality to a vector of another dimensionality, such as taking a three-dimensional vector and creating a two-dimensional or five-dimensional vector using components from the original vect...
ah
im TRYING but im LAZY and i HATE SHADERS!!!!!
thats such a goofy name for an aspect of shaders
here's the specific part for opengl https://www.khronos.org/opengl/wiki/Data_Type_(GLSL)#Swizzling
In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument.
In the prototypical example, one begins with a function
f
:
(
X
×
Y
)
→
...
crazy
Should I reword the description to say "held cards"? Also, should it give something positive in return? The deck its used in gives +5 hand size.
so I still dont get why third image crashes
what is a turn
My personal favorite is "Truthy" and "Falsy"
Like every played hand
then write that instead of every turn
the phrasing is good, it should definitely give something good because it is very bad, there isnt a joker that is just a pure negative like that is.
after each played hand, destroy a random card in hand
im going to change random values till i see anything working
whats the crash
also if it's
a random card in the hand you play that's played hand/played card
and a random card held in your hand and not played is held in hand/held cards
like the 5 or less cards that are played each turn or all the cards in the hand?
learning shaders:
When you play a poker hand, the joker will destroy a random card held in your hand (Where you might keep steel cards, etc)
okay so is it when you play the hand, before the hand is scored, or after the hand is scored
before scored.
then it should say "before each played hand, destroy 1 random card held in hand"
yeah this joker is pretty much utter dogshit. if you get it at the start of the run and play three hands each round you will loose 72 cards by ante 8, even if you only play 1 hand which blocks you from using most accumulating jokers, its 24, your probably going to have to use discards in order to remove any valuable card that you aren't willing to play, which gets rid of more options. this is more like a challenge deck effect than an actual joker.
although it gets rid of cards its just a huge pain to work around all the downsides
This is why the Joker is tied to a deck, as was mentioned above.
there isnt a single joker in the game that makes the game harder to play than without it, a lot may not be too useful but it doesnt make the game more difficult. there isnt any point in adding a joker to the game if the negative effects severly outway any positives.
The idea was that the player would have to buy the standard packs to get more cards so they make sure they dont run out. Maybe I should add some sort of benefit to like? Like maybe it adds the chip value of the destroyed card / 2 to a mult stat that persists for the run?
They're meant to be like challenge decks. Each have their own unique quirks. Im trying to make sure each have a pro to go with the con, but maybe this joker needs a bigger pro?
i would say +3 mult per destroyed card is fair
is uv the whole screen?
3 cards lost per round till ante 8 is 72 * 3 is 216 mult will make it decent enough to be worth considering early into a run, and considering all the gymnastics needed to get 20 extra cards it isnt too powerful either
considering the fact that this also is a deck thinning card it wouldnt make sense to give any more mult than this
main
local joker_files = {
"enamored_joker"
}
for _, filename in ipairs(joker_files) do
SMODS.Joker(utils.load_joker(filename))
end
if JokerDisplay then
SMODS.load_file("JokerDisplay.lua")()
end```
JokerDisplay
```local jd_def = JokerDisplay.Definitions
jd_def["j_my_enamored_joker"] = {
text = {
{ text = "+" },
{ ref_table = "card.joker_display_values", ref_value = "mult", retrigger_type = "mult" }
},
text_config = { colour = G.C.MULT },
reminder_text = {
{ text = "(" },
{
ref_table = "card.joker_display_values",
ref_value = "localized_text",
colour = lighten(loc_colour(G.P_CENTERS["j_my_enamored_joker"].config.extra.suit:lower()), 0.35)
},
{ text = ")", colour = G.C.UI.TEXT_INACTIVE },
},
calc_function = function(card)
local mult = 0
local text, _, scoring_hand = JokerDisplay.evaluate_hand()
if text ~= 'Unknown' then
for _, scoring_card in pairs(scoring_hand) do
if scoring_card:is_suit(card.ability.extra.suit) then
mult = mult +
card.ability.extra.s_mult *
JokerDisplay.calculate_card_triggers(scoring_card, scoring_hand)
end
end
end
card.joker_display_values.mult = mult
card.joker_display_values.localized_text = localize(card.ability.extra.suit, 'suits_plural')
end
}```
Is it possible that JokerDisplay is loaded before the Jokers are added with SMODS.Joker(joker)?
Thats fair. I think it make sense for the joker to get more powerful the more its fed.
i mean the name is gluttony id kind of expect that it would get stronger
ONCE I FIX THIS SHADER ITS OVER FOR YALL!!!!
how am I able to set up an event after my function of scoring cards
that's ccol
ok.. all the values are lik all wierd
card in hand is an accurate description considering the game itself refers to the 8 or howevery many cards you have as a "hand"
Hand -> cards you're holding
Poker hand -> cards you're playing
also if your going to give the card +3 mult then nerf the hand size because its pretty much just a buffed painted deck with a weird playstyle atp
but the game itself likes to use "held in hand"
So maybe +1 or +2?
yeah
held could also be used for Jokers. You're holding them in a specific way, after all.
Im going to continue my shader struggle here
best of luck
i pulled out the desmos, its going down
how does "function G.UIDEF.view_deck(unplayed_only)" check if full deck or remaining deck is selected in the deck menu
I love making placeholder sprites sometimes
check the callbacks for the buttons
or just look through references
how?
(to view_deck)
like look through uidef like im doing
they'll be in that function
i did the uv thing
iirc it sets unplayed_only to true when you’re on remaining
How would you check the enhancement of a card in hand?
I've been trying to figure it out, but it appears to be different than for played cards
G.hand.cards[i].config.center_key == "m_steel"This is what I'm at currently
That looks fine
Putting this here in case anyone wants the full pattern to the Cartomancer joker.
I dont think so, but here are some guidelines to follow:
- In your mod's dir, you need an
assetsdirectory with1xand2xdirectories inside - The base Joker sprite needs to be
71x95. That one goes in1x - The joker in the
2xdir is just a scaled version of the1xjoker (142x190) for pixel smoothing. - The resolutions also account for the border (The card frame), so make sure you have that too.
- To add the Jokers sprites to your Joker, you need to use
SMODS.Atlas. I recommend looking at the Steamodded wiki (https://github.com/Steamopollys/Steamodded/wiki/SMODS.Atlas) or This post: #1307744498360520805 message
Is there like, any card templates
just use any of the 150 in-game jokers
or any from the plethora of mods
heres one for the 1x version
there's #1224362333208444989, which i hope i linked properly because mobile discord doesn't make it easy if a thread is inactive
oh good that is correct
I see only #deleted-channel
probably because you haven't loaded the thread or whatever
clicking it should still take you there
I don't really want to code tho, just make cards for other people to use
How this thread is called
Can you ping me here
just team up with someone
or make some for fun
but you still need to know the modding requirements
especially if you plan on getting them implemented
I've got a fix for this in the pipeline. It crashes because it's trying to dump that to a file, but =[SMODS _ "src/overrides.lua"] contains invalid path characters.
It shouldn't crash?
I've had a patch with invalid characters forever and it always just printed an error and kept on
It'll crash here if there's a path separator in the buffer name iirc
You're correct in that the actual file write is checked such that panics are handled
oooh
Yeah, that .parent() call will return =[SMODS _ "src/
based
Unfathomably
I would like to have some sort of pattern to detect if the buffer name is like =[SMODS _ "src/overrides.lua"] as it would make the dumps end up in a logical location
If they don't match that then we can sanitize and dump em to whatever
true
hold on
just rewrite this with rust
surely something won't change and break it later down the line
ez pz
makes sense
split by space, match against the first, grab the path at the end, resolve that down to a directory
yeah
Am I right in assuming that the underscore in =[SMODS _ "src/overrides.lua"] can be the mod id?
Are there any limitations on what can and cannot be a mod id?
unsure
heard
and then make sure it's okay with ones that don't match, e.g. =hi =[] =[hi] =[john cena]
I think json values allow any arbitry characters as the id
header ones don't allow spaces and newlines
I almost just want to skip buffer names that don't match
and just print out a warning
but we'll see how complicated it is
I think just filter out invalid characters and do a best effort based on the name
anyway if you want to make art for cards that someone else coded, we've got a bunch lying around in #1308185262664450068
probably so do other mods but i can't rember any offhand
those are all actually valid paths
oh
oh quotes ar invalid
thanks legacy windows
I love inheriting quirks from an operating system I don't even use
wine my beloved
I'm amking a buffer named just COM
omg 😊
we can implement a specific case for DebugPlus, but other cases would likely be ugly dumped into whatever the path sanitizes down to
in the same manner that =[OMGWTFBBQ ojdkawodaaw "odkwaopdkoawd.lua"] would
Someone put a regex patch in their mod that matches return and replaces it with in buffers named DebugPlus Eval and then get popcorn and watch me debug a weird issue for a while
Honestly i kinda had idea of creating jokers based on pre existing card games
does anyone know why it keeps crashing on
colour = lighten(loc_colour(G.P_CENTERS["j_my_enamored_joker"].config.extra.suit:lower()), 0.35)
?
im really struggling with finding out how to work a ui, can someone point me in the right direction?
send crash
JokerDisplay doesn't have G.P_CENTERS with my new joker for some reason
But when I print it in the calculate function it doesnt crash
key = "enamored_joker",
loc_txt = {
name = "Enamored Joker",
text = {
"Played cards with",
"{C:hearts}#2#{} suit give",
"{C:mult}+#1#{} Mult when scored",
}
},
config = {
extra = {
s_mult = 5,
suit = 'Hearts'
}
},
rarity = 2,
pos = { x = 0, y = 0 },
atlas = "MyJokers_atlas",
cost = 7,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
soul_pos = nil,
loc_vars = function(self, info_queue, center)
return {
vars = {
center.ability.extra.s_mult,
center.ability.extra.suit,
}
}
end,
calculate = function (self, card, context)
if context.individual and context.other_card:is_suit(card.ability.extra.suit) then
print(inspect(G.P_CENTERS["j_my_enamored_joker"].config.extra))
-- local result = eval print(tostring(G.P_CENTERS['j_my_enamored_joker']))
return {
mult = card.ability.extra.s_mult,
card = card
}
end
end
}```
for context im trying to make the joker compatible with DisplayJoker
it's been really bugging me
how'd i go abouta having a seal removing it self? ._.
am trying with cryptids consumable but it doesn't seem to be working
WE ARE SO CLOSE!!!!
:O
whats the goal?
What are you trying to make?
someone has the same problem ? on lauch
Oops! The game crashed:
Syntax error: card.lua:961: '}' expected (to close '{' at line 957) near 'grim_bonus_mult'
Additional Context:
Balatro Version: 1.0.1m-FULL
Modded Version: 1.0.0~ALPHA-1217b-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.6.0
Stack Traceback
(3) C function 'function: 0x356ad378'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 881
(6) global C function 'require'
(7) Love2D function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x356aefe8 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x356af038 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(8) global C function 'xpcall'
(9) Love2D function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(10) global C function 'xpcall'
(11) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
How do you modify how many joker slots you start with in a deck?
I would love joker that looks like this
theres a way i can make a joker trigger a message under a different joker right?
what are you trying to make?
?
Im trying to come up with deck ideas themed around the 7 Deadly Sins. So far, ive already got Greed, Lust, and Gluttony. What do you think works well? Im trying to make sure each deck is unique and each deck has pros and cons (Ex. In Greed Deck, you get a lot more money and start with a lot of money, but your money is tied direcly to your Xmult). Heres what I have so far. What are your thoughts?
-- Deck Ideas:
-- - Pride Deck: Start at ante 3. Pride Joker will randomly either half chips or -3 mult.
-- - Wrath Deck: Wrath Joker Adds/Subtracts mult or chips each played hand in the range of -20 to +20. Doesnt go below 0 chips or 1 mult
-- - Sloth Deck: Start with all hand types at level 5. Can only play 3 cards per hand.
-- - Envy Deck: Envy Joker Replaces the lowest card in your hand with the highest one
what does the pride deck give? does it just thrust you into ante 3??
Pride is supposed to be real confident that it will win, something like "Im so confident that I will win, that I dont need to play the early game". Im thinking Pride and Sloth need better ideas, but im not sure what
ooh nice
Wait wha
well anyways time to write docs for SMODS.Stake and notice more inconsistencies we glossed over
time to make my jokers be able to select other ones (pain and suffering)
but first: time to make it check for which of all of the save files exist in the isaac directory
that sounds mildly painful
it is
i have a feeling that this is not how you are supposed to use SMODS.poll_seal
you can use it like that
this does not seem to be doing anything tho
anything wrong with where im using it?
spelling
the worst enemy of any programmer
even local thunk spelled consumable as consumeable through all the balatro code
I was so confused when I searched for "consumable" and got nothing
how do you detect when a certain sound is playing?
i need an event to specifically trigger when a sound finishes to get the correct effect
either that or a fixed delay
Whats JokerDisplay.lua look like?
someone please remind me what unlocked_stake does and how i can make it not look jank af for docs
iirc its either the key for the stake it unlocks when you beat it or it doesn’t do anything
guessing that's close enough to the 'nothing' side of that
fun
yeah it definitely doesn't do anything like unlocking stakes
maybe i should leave it out of the docs
why did local thunk have to make it so hard to bypass the speed system
trying to get an event to trigger at a very precise time in relation to a sound playing
if v.ability.set == 'Joker' and ((v.ability.edition and v.ability.edition.key ~= "e_negative")) then
table.insert(NonNegativeJokers, v)
print(v.ability)
end
end```this isnt working
How can I change mods folder location
is there a way to change where a consumable goes when being used? i want my consumables to stay where they are
what variable stores how many hands the player has currently
hm
i found it
hmmm
so after playing with my Joker (takes played hearts cards and dissolves them) and I'm left with these blank spots in my hand, what are they and how do I get rid of them?
also on final Ante so all my Jokers are fliped, I am only using base game Jokers and my modded one
that happens when you don't destroy cards the right way iirc
what is the right wat to
if card2:is_suit("Hearts") then ---increment Xmult value by adding increase to the Xmult value card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod G.E_MANAGER:add_event(Event({ func = function() ---destroy the card card2:start_dissolve() return true end })) end end
this is my code for disslove
or where can I find how to do it
where is that
you should use context.destroying_card for this
do I put this with my other context
no, instead of it
take something like
if not context.blueprint and context.destroying_card and context.destroying_card:is_suit('Hearts') then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
return true
end
if context.joker_main and ... then ... end
Would anyone be able to help me figure out why Talisman is causing my game to crash on load? I've got the most up to date versions of the game, Lovely, and Steamodded and I've tried removing all other mods and still the same issue. I am able to load with earlier versions of Talisman (versions before 2.0), I really would like to get Talisman working so I can have it for dependency with Dread Jokers mod. Thanks for any help anyone can provide!
for starters it would help to see the top of the crash, what's in this image is the uninteresting part
Sorry, let me grab a screenshot of it real quick
does this do the dissolving animation or only makes them disappear?
Here's the top of the error report
it has the animation ofc
that's not terribly helpful either I fear
how do you get only the first character of a string?
need it for suit prefix making
awesome thanks
if it's for suit prefixes, you shouldn't
oh just found change_suit
SMODS.change_base:
Oh darn, I was really looking forward to gettting to the bottom of it. The Dread Jokers mod I found looks so interesting but I guess I will have to do without. Thank you for your time anyway!
it's just that I don't think I've ever seen this exact crash
have you confirmed it loads without talisman?
do I still put G.E_MANAGER:add_event(Event({ func = function() ---destroy the card card2:start_dissolve() return true end }))
in the context.joker _main or only keep it in the new Context.destroying_card
neither
Yep, I take out Talisman and it loads just fine with no issues
ok so the Context.destroying_card replace the event
does it still play the cards being destroyed after the the card scoring?
alright then I'm out of simple ideas. Can you send over your mods folder?
it does everything sixth sense does when it comes to destroying cards
Sure thing! I almost feel special that this is a new error lol
You on mac by any chance?
judging by the zip file, yes
I've seen some thread issues on mac before
Yes I am
is it somehow related to smods.change_base?
Yeah talisman 2.0.1 or 2.0.2 issue on mac
I believe the previous 1.2.2 version has no such issues
And Math's aware of the issue
does macOS have a case sensitive filesystem?
Yes, I am able to run the previous version of it just fine. Reason I'm fussing about it has to do with another mod that uses 2.0 as a dependency (Dread Jokers mod pack)
Ah, sucks
it seems to run fine on my end (on windows) if I take out RoJ and the outdated version of reverie you have in there
Yeah people had no issues on windows, only apple
no
Ah darn, wish I still had my windows computer but it crapped out and the Mac was free from a friend. Glad it can run Balatro at all. I'll just have to wait until Math and company figure out a workaround somehow. Thanks guys for trying!
Is there any documentation for making new booster packs? Or will I have to resort to scraping another mod?
Presumably one of the commits between 1.2.2 and 2.0.1 fucked something up but I do not have a mac to test so I really dont feel like taking the time to inspect it haha
that's still missing
hold on let me add it, shouldn't be too much work
Wasnt there a text file floating around for SMODS.Booster?
Or was that for a different object
I'm trying to put some custom decks together and I'm a bit lost. Looking at how other mod decks are put together and looking over the Steamodded wiki, I understand where the config information goes, but I can't find a full list of variables it can affect. I'm aware of a few basic variables like hand size and joker slots, but I can't find all that information in one place. Any help would be appreciated.
actually yeah
I just tryed this and it justs works no bugs or anything
is this all from the wiki?
I'll still make my own version to make sure I double check everything for correctness
as it should
check back.lua:174
What's that?
what's the "best" state check for verifying the player's not actively doing something else so they don't modify a card while a calculation is ongoing?
(for a consumable's can_use)
I've looked at that, but it wasn't all that clear to me
you mean how to unzip the exe into the source code?
with 7zip
it literally gives you an option in the right click menu in explorer to open up games exe as archive
No, I can open it fine, it's just that the config info doesn't look like it does with steamodded. I'm not seeing anything that's like hand_size = 4.
yeah they're formatted differently
this is e.g. the definition for painted deck @ game.lua:639
b_painted = {name = "Painted Deck", stake = 1, unlocked = false,order = 12, pos = {x=4,y=3}, set = "Back", config = {hand_size = 2, joker_slot = -1}, unlock_condition = {type = 'win_stake', stake=3}},
all I'm seeing is stuff like effect.config.joker_slot, but I don't see where the actual variables are being put in
Who here has worked with shaders? I wanted to see if there's any way for me to make a shader but be able to preview it without having to go in and out of Balatro
then the Back:apply_to_run (at back.lua:174 like I mentioned before) takes those variables and actually applies them to the run
iirc debugplus has a "watch file" command you can use for that
watch file?
Okay, I think I see what the general variables are. I'll need to play around with it more but thanks for pointing me in the right direction.
I was hoping to not constantly load balatro every time i try to make the edition but i can try
also, i'm having a weird crash
the point of the watch command is that you don't have to do that
ooh i read it wrong
So I'm trying to make a custom title screen. I have 2 problems with it
- I can't load the one modded joker from Ortalab when I try to make the custom title screen
- Any legendary joker just... y'know
Is offcentered
loading Perkeo works but idk why ortalab's joker won't
Weird. I tried loading caffeyne and it worked
But of course the off-centered/wrong sized sprite is bugging me
My tag causes the game to softlock (freeze?) when it tries to run
object_type = "Tag",
atlas = "mtg_tag",
name = "mtg-bigmagictag",
order = 26,
pos = { x = 0, y = 0 },
config = { type = "new_blind_choice" },
key = "bigmagictag",
min_ante = 2,
loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = { set = "Other", key = "p_mtg_magic_pack", specific_vars = { 1, 4 } }
return { vars = {} }
end,
apply = function(tag, context)
if context.type == "new_blind_choice" then
print("TAG ME")
tag:yep("+", G.C.SECONDARY_SET.Code, function()
local key = "p_mtg_magic_pack_3"
local card = Card(
G.play.T.x + G.play.T.w / 2 - G.CARD_W * 1.27 / 2,
G.play.T.y + G.play.T.h / 2 - G.CARD_H * 1.27 / 2,
G.CARD_W * 1.27,
G.CARD_H * 1.27,
G.P_CARDS.empty,
G.P_CENTERS[key],
{ bypass_discovery_center = true, bypass_discovery_ui = true }
)
card.cost = 0
card.from_tag = true
G.FUNCS.use_card({ config = { ref_table = card } })
card:start_materialize()
return true
end)
tag.triggered = true
return true
end
end,
in_pool = function()
return false
end
}```
It opens a custom pack that I have implemented
It worked fine until I updated steamodded
key = 'TC_Tag',
atlas = 'ShinkuTags',
pos = {x = 0, y = 0},
name = "Shinku_Tag Card",
order = 1,
min_ante = 2,
loc_txt = {
name = 'Tag^2',
text = {
'Gives a free',
'{C:dark_edition} Mega Tag Card Pack'
},
},
config = {type = "new_blind_choice"},
apply = function(tag, context)
if context.type == "new_blind_choice" then
local lock = tag.ID
G.CONTROLLER.locks[lock] = true
tag:yep('+', G.C.SECONDARY_SET.Spectral,function()
local key = 'p_Shinku_tagpack_giga_'..(math.random(1,2))
local card = Card(G.play.T.x + G.play.T.w/2 - G.CARD_W*1.27/2,
G.play.T.y + G.play.T.h/2-G.CARD_H*1.27/2, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS[key], {bypass_discovery_center = true, bypass_discovery_ui = true})
card.cost = 0
card.from_tag = true
G.FUNCS.use_card({config = {ref_table = card}})
card:start_materialize()
G.CONTROLLER.locks[lock] = nil
return true
end)
tag.triggered = true
return true
end
end,
}```
Feel free to edit this one
thanks, time to make sense of both this and the functioin it references
copied your directly, it also freezes the game
strange
Well you don't have shinkulib obviously
I mean make yours out of my code
SMODS beta is coming together
I did this, I replaced your atlas and pack with mine
same issue occurs
What version of smods are you using?
the one from days ago
This is what happens
I've no idea what's wrong since it doesn't crash, and I haven't changed anything since like a month ago
Is there a way to forcibly open a booster pack from the collections menu, like DebugPlus lets you forcibly gain jokers/consumables?
might actually release this month year
There were some tag changes committed yesterday, maybe that's the issue?
Yes
you can spawn them in in the shop and then purchase them, not sure if there's a faster way
Figured out the issue
@wooden nexus
apply = function(tag, context) becomes
apply = function(self, tag, context)
Is there a way to essentially remove the interest cap at the end of the round?
set it to an absurd amount
How would set it to something like 1e100?
would this be a good effect?
look in the code for seed money, theres probably a variable you can change to 9999999999999999999999999999999999
Is the ["Joker"] part of the following code snippet on the SMODS.Rarity Steamodded wiki page where you put the name of your joker or it that just Joker? If the latter, how do you set a joker to this rarity?
{
["Joker"] = true, --uses self.default_rate when polled
["Joker"] = { rate = 0.7 },
}
This is for adding the rarity into an ObjectType (which "Joker" is created as one).
How would I add my own rarity that I can set to a joker? Or, override the rarity text to something else?
You do rarity = "prefix_custom_rarity" in the joker's declaration like how you'd do for vanilla rarities.
is there a way to force the game to display the high resolution textures found in 2x through just the settings? I can't get decent enouogh looking low res textures, so I didn't know if I could just bypass that?
Nvm I might just be stupid
i know i'm 100% not going to find my answer here, how do i add a permanent child that is drawn on top of all layers on my joker card and can be configured to be different sprites
i don't even know why i'm asking because, to my knowledge, nobody has done this yet
So kinda like the vanilla soul card jokers?
no
not like that at all
i need to draw on top of that layer
that layer already exists and it has its own separate movement that i cannot use
i already looked through cryptid but what they do isn't what i'm doing
i need to be able to change sprites
this is the spritesheet. i need these to be able to be drawn on top of the joker (on top of all layers) at any time using a function
again i don't know why i'm asking because i did my research and nobody has done this
but hey it never hurts
i'm just driving myself crazy looking through the base game trying to convince myself that i don't need to rewrite the entire Card:draw() function
actually this card:draw isn't even the right fucking function i don't think
💀
i mean i've looked through all of them
imma be real chief i have no fucking clue how shaders work but i'm like almost 100% sure that you can't
also bc i still want this to be compatible with existing ones
You can use a shader to draw a sprite
That's what the game does already ("dissolve" is a shader)
Also no you don't need to for this
Just do what SMODS.Sticker does.
Have a table with all the sprites for each level, then check for what level and draw them.
i did this and it doesn't work
unless if i need it to be a lovely patch
i'm not joking this is literally 1:1 to what i did
local charges = {
["6"]= 1,
["4"] = 2,
["2"]= 3,
["1"] = 4
}
local function draw_charge(card, hold, charge)
card.children.charge = Sprite(card.T.x, card.T.y, card.T.w, card.T.h, G.ASSET_ATLAS['wrenbind_charge'], {x=charge, y=charges[tostring(hold)]})
card.children.charge.states.hover = card.states.hover
card.children.charge.states.click = card.states.click
card.children.charge.states.drag = card.states.drag
card.children.charge.states.collide.can = false
card.children.charge:set_role({major = card, role_type = 'Glued', draw_major = card})
card.children.charge:draw()
print("i should've drawn by now...")
end
i made a new layer to draw over and also had a lovely patch to draw in the main draw function that does the animation and everything as well
Thats... not what stickers do
i know it's not exactly what they do