#💻・modding-dev
1 messages · Page 405 of 1
also how would i go about the "creating a joker of rare rarity" part of it
Check how Wraith does it
Actually I think there’s documentation for that on the SMODS Utility Functions page for thr SMODS.create_card function
found how wraith in vanillaremade does it so im gonna modify that a bit and include my custom summon message
That works too
smth im curious abt that i havent asked before is why do jokers have and not context.blueprint in some if statements (mainly ones that do mult gain)? is it to prevent blueprint from adding extra to itself, or is it to prevent blueprint from doubling the upgrade of jokers?
Probably the first one.
No, actually the only reason would be to not show the message.
so it doesnt do anything functionally its just that the message is copied if you don't do and not context.blueprint?
I think so, yes.
how can i make so every played card counts as a wild card?
Do you want them to count as wild cards as just having every suit or have them actually count as wild cards?
hook is_suit
like if they had wild enhancement, but they dont
Then you're going to have to use quantum enhancements.
you can try something like this
No.
wdym no?
why? it works
You need to enable it in optional features.
They wont be wild cards.
idk how to do quantum enhancements 😭
honestly, i dont see the difference between them being all-suit or wild cards
You just enable it then you do if context.check_enhancement and context.other_card.area == G.play then return {m_wild = true}
how do i enable?
SMODS.current_mod.optional_features = function()
return {
quantum_enhancements = true
}
end
the functionality might be the same, but they arent "wild cards" by any means, as checks like SMODS.has_enhancement(card, "m_wild") wont work
aight
how can i stop context.individual triggering before the card?
the problem in question:
You return it instead of calculating the effect.
Also you can't calculate the effect of retriggers.
if i return it, only ret1 gets calculated
Yes, you need to use recursive extra effects.
like that?
what's wrong here?
No.
Why are you looping over the scored hand?
i wanna check if scoring hand has 6 or 9
And if there is make all cards played count as wild cards?
i mean if the scoring hand contains 6 or 9, played hand becomes wild cards
Try temporarily removing the card area check.
then what do i use?
if context.check_enhancement and context.scoring_hand then
not working
:(
now it doesnt become flush for example
how can i check a played card's enhgancement?
SMODS.has_enhancement(card, "m_modprefix_key")
ok thanks!
i got this crash lua calculate = function(self,card,context) if context.repetition and context.cardarea == G.play then for _, playing_card in ipairs(context.full_hand) do if SMODS.has_enhancements(playing_card, "m_bonus") then return {repetitions = 1} end end end end,
SMODS.has_enhancement
No idea what's wrong here
First image is the error, second is where it's detecting the error, third is the relevant code for the item i used that's causing the error
You are trying to set the center of a card to a nil value.
i had it set it to the first index tho
so it should just be one center
o
the thing that confuses me is rightmost is a card that has foil
so it does have enhancements
Foil is not a regular normal enhancement.
i might be too tired to be coding
same crash if I give the card steel
so doesn't seem to be related to not having an enhancement
Try checking if the card has an enhancement first before you try to change it.
still crashed :/
same error
i just wanna copy the enhancement of a card ;-;
Hello, I don't think I can find a reference to this, but I'd like to know if it's possible to check within the joker cards which one has a rental tag.
I imagine it would be something like jokers.missing.rental
No, ```lua
local rentals = {}
for k, v in pairs(G.jokers.cards) do
if v.ability.rental then
table.insert(rentals, v)
end
end
Thanks ;)
how can I make an enhancement count as other enhancement?
I'm trying to find an example in other mods but I cant really find it
You need to use quantum enhancements.
so im new to modding, and a thought it this was a simple first joker to start (it wasn't), so i just wanted to make a simple joker that squares your multiplier (a little bit busted i know), the thing is i can't figure out how to multiply the multiplier by itself, it always keeps returning a nil value and defaults it to 1, probrably because calculate function calculates before even playing a hand
so yeah i would be very grateful if anybody got a solution for this, thanks in advance!
It is quite simple, install talisman and do return {emult = 2}
really? let me try it
no, no, like
As a joker effect
I want to make a joker count gold cards as steel cards
Yes, you need to use quantum enhancements.
Isnt it disabled by default, which means that for most players it wont work?
Yes, but it is enabled per mod not per player.
any ideas for seal oriented jokers?
any example around that can help me figure it out?
this is pretty much my first or second joker
ok i know there's a bunch of question here already but where do i put "return {emult = 2}"? it's not doing anything when i put it calculate function or outisde
Code?
-- author: omega
-- description: Adds jokers based on some of the cards of uNOPE
-- version: 1.0.0
-- compatibility: Steamod, Talisman
SMODS.Atlas{
key = 'squared',
path = 'squared.png',
px = 71,
py = 95
}
local squared_joker = SMODS.Joker{
key = "squared",
loc_txt = {
name = "Squared",
text = {"{C:red}Squares{C} your Multiplier"},
},
atlas = "squared",
rarity = 3,
cost = 32,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
pools = { G.P_JOKER },
return {emult = 2}
}```
It needs to be inside calculate.
G.P_JOKER doesn't exist.
like this? calculate = function(self, card, context) return {emult = 2} end
No, ```lua
calculate = function(self, card, context)
if context.joker_main then
return {emult = 2}
end
end
but now about this, does that mean i won't be in the joker pool?
why is there {C} in your loc_txt>test, out of curiosity
It'll be in the pool by default.
you dont need the pools = ... line
yeah, what smtcom said
oh okay
it's so only the "Squares" part is in red
yeah you only need {} in which case
damm, again i only started modding yesterday💀
fair
is there a way to put a ui on cards that are being played?
create UIBox, then set the major to the card
Does anyone know how the fuck one controls the z layer of where a menu gets rendered?
i.e. render menus above cards that are not an overlay.
Similar to the debug menu?
newly created ui should always take priority on the front, idk how to manipulate the order tho
Cards and other bs get rendered above any UI excet the overlay ones.
As far as I know.
(excluding the debug UI)
try setting draw_layer to 1 in the configs
Hellooo, sorry but may I ask how should the code look for a retexture mod for all the Jokers, seals, decks, enhancements, tarot/planet/spectral cards, tags, boosters, vouchers?
Plus I'd need a way to rename jokers, suits and change the color of the text for suits (like how hearts are in red but instead it'd need to be a different color)
I'm a mere artist and don't know how to code at all😭😭😭
All that is in the file is shown in the pic
imma look into this, thanks!
been a while since ive modded at all
this mod does a lot of that if you need reference
https://github.com/xssgm/Touhou-Balatro-texture-pack/tree/main
A texture pack themed touhou project of Balatro. Contribute to xssgm/Touhou-Balatro-texture-pack development by creating an account on GitHub.
Ooooooo
time to, reinstall the modding stuff :,)
How would one draw a seal on a random spot on a card?
also you should install visual studio code, it's way better for coding
Oh okeoke thanks!
this aint working 💔
try comparing with strings instead of numbers, idk
wdym?
well another joker ive works without strings
no they're not
check_enhancement doesn't have scoring_hand im pretty sure
or at least it's not documented
how would I enable it for mine?
then how can i do it so if i have a scoring 6 or 9 my cards count as wild cards?
@wicked leaf
idk never used quantum enhancements
first one
shouldn't it be a locked repeater
adequate
-# I think it would be more appropiate.
id done so the redstone repeater interacts with the jokers to both sides
you code it
but first i wanna fix my blindfolded
putting this in my main file should do, yeah?
Yes.
what are 'quantum enhancements'?
support for returning enhancements as other enhancements
wat?
yummers
your mod's metadata
read the docs
ok
i did but its still there
game.lua
do they have a prefix or do I just leave it like this
Yes.
why does a repeater switch? shouldn't that be a lever or sum?
you are missing a jokers folder inside items
items/jokers/inverse_jokers
btw. what is your mod meant to do?
What is your mod about?
what's the order field for?
Entropy addon that adds a flipside form to every joker
It does nothing.
foolsgambitmoment
https://discord.com/channels/1116389027176787968/1333809003829923900
-# it doesn't interact with other mods yet, but uh... there is an API thing idk how you call it to aid in making silly alternates.
erm
Check your atlas definition thing.
And the file it is pointing towards.
Assume root is either the 1x or 2x folder.
I think I need to make the 2x actually
file in the cryptid files that exports stuff to 2x save me
i need
Bump 🙏
are you sure that's where the error is? are you checking the dumps or the vanilla files?
I don't think I understand the question
In the card.lua in the lonely folder it seems to start mentioning a center object at line 268 so it checks out
can you send the entire crash log?
Oki one sec
I'm getting an expected } at line 11 but there is no open {} anywhere I've checked.
Does lovely read the comment lines or should I start counting from the first line of code?
it does read comments, you're probably missing a comma so it thinks you're missing a bracket
all the commas are there, may I send the code?
yeah
also the line I'm getting the error on is local jokers = {
expect a lot of issues and wrong code
Did you try just :set_ability("m_steel")?
well it's supposed to work like Death does but for enhancements
so I can't just do any specific enhancement
i know, but did you try?
uhh
I'll give it a shot
What does the atlas look like?
doing that works fine
hiya! i'm adding the localisation for undiscovered Zodiac and Resource cards, but it's not appearing in game
(this is in Other)
I think it's because get_enhancements doesn't return a list of keys
it returns a key-indexed table
(also, i'm not sure i've done this correctly)
how would I go about returning the appropriate key
I was hoping it would be as simple as A:set_ability(SMODS.get_enhancements(B)[1]) 
i think next gives you the key
i am so confused about what next does
it gives you the next key, value pair in a table
(bump)
(unsure what i should do)
i thought i needed just the key tho
it depends on what the table is
if you use it by itself it just uses the first value
iirc
for general "arrays" it returns the number aka the index
for key-value pairs it returns a key
which can be a string
i miss coding in assembly
wild
I think it needs to be lowercase.
unless you specify two values in a single definition then yeah it's gonna return only the first one
which is the key
it indeed worked 
what needs to be lowercase, the key?
ok now make sure to not return nil there
The one in localization.
Assembly is at least like simple
It's tedious yeah but it's like
Easy
yea that's all good
easy if you like reading hexadecimals as words
yay thanks! it's annoying that the soul is off by two pixels here, though ^^"
im a math major i deal with other bases all the time 
sorry man you can only really gas up assembly in this economy if you're working with a game console from the 90s or if you're maximizing space
oh thats why
well
not all the time
I don't do number theory anymore
base 16 is way better of a base than base -ln(pi)/arcsin(6) or whatever
ngl
actually that cancels out a lot
I will hunt down all laymen until their dreams are filled with analytic equivalence classes and finite simple groups
arcsin(6) 😭
It's a number just like any other number 
what kind of extension is this
the complex numbers
sin(x) = 1/2i * (e^ix - e^-ix)
Solving for x is pretty easy and then you get arcsin
you got that down fast
smh how is this going to put chicken rice on my bedside table
Just analytically continue the chicken rice from the store to your bedside table by continuously analytically continuing the chicken rice along the contour to your house
Silly

are dependencies on the mod's metadata required?
no
ok
can someone help me know whats wrong with this code for the badge, it keeps doing this error report
wait i think its not formatted right
You would do create_badge("Guy", ...)?
Code?
ive given up
lol
How would one put a custom info queue that can go on any joker under specific conditions?
Also badges?
look at invis, ankh, etc for that
anything that copies a joker
those will have the info queue for negative on them when there's a negative joker
it is reccomended to add whatever version of steamodded your using at the time though
why doesnt it work?
It should be assets not resources
ah.
does anyone know how to fix this issue?
I guess I need to add the rarity to a pool
How can I make it so that something gives money at the end of a round based on probability? Looking at golden joker in the steamodded examples, theres no calculate function and adding one and putting the money function in makes it do nothing
Yes, for end of round money you use calc_dollar_bonus instead.
in calc_dollar_bonus
return pseudorandom("seed") < G.GAME.probabilities.normal / odds and amount or nil
ah I see
i would probably patch G.UIDEF.card_h_popup for both of those
What would I do if I wanted a consumable that added flat chips or mult to the next hand's score
is there a way to add an specific font to a consumeable title, or generally to anything?
Maybe you use keep_on_use then give mult then destroy it next hand?
like, to the name? you can in the most recent smods
yeah, to these things
and how?
True
are there any docs?
oh for those i don't think there is without patching
nope
to the badge?
also no
anyone know how to fix this?
Why does this hard crash if the number of seals on a card is 3 or more?:
Is there a way to increase the card selection limit? The card doesn't need to be scored, just like so you can select 6 cards to discard or whatever
SMODS.change_play_limit(mod) for playing, SMODS.change_discard_limit(mod) for discarding.
how would i go about getting a random poker hand like To Do List does (yes i know, vremade, but i dont get wtf is going on there)
"i dont get what is going on there"
as in i dont know wtf any of that means or does
as in ive already checked that
as in that doesnt help me something
It gets valid hands, and it gets a random one from those.
it loops through all the hands to get the visible ones that are not the last selected and then gets a random one
whats the mod variable supposed to be?>
A number of how much you want to change it.
1 increases by 1, -1 decreases.
data?
putting change_discard_limit in add_to_deck function crashes the game instantly when I get the joker, am I supposed to put this somewhere else>\
thanks
Are you doing just change_discard_limit or SMODS.change_discard_limit?
SMODS.change_discard_limit
And what's the said crash actually saying?
...which SMODS version are you on?
'cause said functions are in use as of https://github.com/Steamodded/smods/releases/tag/1.0.0-beta-0530b ...
..just remembered i downgraded a while back to try a mod and never upgraded again
mb
set_ability = function(self, card, initial, delay_sprites)
local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do
if v.visible and k ~= card.ability.extra.poker_hand then
_poker_hands[#_poker_hands + 1] = k
end
end
card.ability.extra.poker_hand = pseudorandom_element(_poker_hands,
pseudoseed((card.area and card.area.config.type == 'title') and 'vremade_false_to_do' or 'vremade_to_do'))
end
in the vremade for to do list, whats with the pseudoseed at the bottom and why does it have so many ands and ors instead of just being a single pseudoseed
im trying to get a joker to trigger an effect upon any card (not jokers) being destroyed, what would be the best way to go about doing that? this is what i have attempted so far
key = 'killerwisp',
loc_txt = {
name = 'Killer Wisp',
text = {
"{C:mult}+#2#{} Mult per",
"card destroyed",
"{C:inactive}(Currently {C:red}+#1#{C:inactive})"
}
},
config = {extra = { mult = 0, addedmult = 6 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, card.ability.extra.addedmult } }
end,
rarity = 1,
atlas = 'votdjokers',
pos = {x = 2, y = 0},
cost = 4,
calculate = function(self, card, context)
if context.joker_main then
return {
mult_mod = card.ability.extra.mult,
message = localize {type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
}
end
if context.cards_destroyed and not context.blueprint then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.addedmult
return {
message = 'Dismembered!',
colour = G.C.MULT,
card = card
}
end
end
}```
sorry that that block of text is so huge i probably shouldve just done the relelvant part
because it uses two different seeds for inside and outside a run, not entirely sure why but that's what vanilla does
oh, to ensure that the pseudorandom_element doesnt become different when you check the card outside the run, probably?
it would be possible to manipulate its rng otherwise 🤔
-# idk
im assuming thats what thunk went for
it shouldn't be but idk i don't understand the seed system all that well
also how do i localize the poker hand it generates
say, if i wanna retrigger four and seven, what do i type here
patriot?
how can i destroy 1 selected card?
You have to change the context to context.repetition and do return {repetitions = 1}
G.hand.highlighted[1]:start_dissolve()
what rarity should this be? im really bad at balancing scaling jokers so idk
When I'm creating a consumable type, what does shop_rate do?
Is more a higher chance or a lower chance of it showing up?
99999999999 is always showing up
oki
?
Uncommon
uh what's wrong here
forgot your mod prefix
No, it would be context.repetition instead of context.individual.
ohhh
okay
hold on
?
i know theres something wrong with the loc vars and config
why is it so blue
You need to remove the ] and fix all the other syntax errors.
hold
sorry this is my third time modding
so the loc var and config is fine?
how's the full name set?
It looks fine.
itemPrefix_modPrefix_key
i don't know what you mean by that
It seems fine.
chat how would i make the description of my joker change based on the current deck selected? like i know you can use loc_vars but it's very limited and doesn't support adding new lines and stuff
alright ill test
wait nvm can i just use different keys i shouldve read the documentation better mb
what is the context for first played hand (like dna?) cuz I cant find it in the documentation
I might also be blind
G.GAME.current_round.hands_played == 0
there is no context, it checks for how many hands have been played this round
I'm trying to make my Joker upgrade only High Card, Pair and Three of a Kind, but the card will actually upgrade any hand i play, not sure why honestly, i used the context exemples in the Smods Wiki and the naming of the hands is also corect based of Balatro's code, is there something i missed ?
if context.before then
if next(context.poker_hands['High Card']) then
return {
message = 'Upgraded!',
level_up = 3
}
end
if next(context.poker_hands['Pair']) then
return {
message = 'Upgraded!',
level_up = 3
}
end
if next(context.poker_hands['Three of a Kind']) then
return {
message = 'Upgraded!',
level_up = 3
}
end
end```
any hand?
because what you're doing is checking if your hand CONTAINS one of those poker hands
all hands contain High Card
what you need to be checking is the actual hand
give me a second
yes, regardless of the hand i play
Ah i see why ! Must have used the wrong context
Yes, you would check if context.scoring_name == "High Card"
they beat me to it
Oh i see, in the wiki with context.poker_hands, it was said as 'Here is another example for a Joker that increases the amount of mult it gives when you play a Flush', i think it just interpreted it wrong
Thanks a lot !
if context.joker_main then
return {
mult_mod = card.ability.extra.mult,
message = localize {type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
}
end
if context.cards_destroyed and not context.blueprint then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.addedmult
return {
message = 'Dismembered!',
colour = G.C.MULT,
card = card
}
end
does anyone know why this isnt working exactly? im really really bad at programming, but it seems like by all means this should be working?
What about it is not working?
should've clarified that, sorry
it isn't scaling at all
when cards are destroyed, it doesnt do any of the things in the if context.cards_destroyed and not context.blueprint then segment
I’m not sure if cards_destroyed is the correct context. Lemme double check
context.remove_playing_cards?
@daring fern
If the cards you’re checking to be destroyed are playing cards then yeah this should be the right one
Hi I need help again. I want the joker to randomize the first played hand cards suit each.
so if you play a flush of spades then the first card might turn into diamonds and the second turns into hearts and the third turns into clubs etc
Line?
Instead of doing an if tree like that, I would just pull a pseudorandom_element from SMODS.Suits
why are half the enhancements abilities and the other half effects
I think you would just check if context.other_card:get_id() == 7 or context.other_card:get_id() == 4 in the main joker.
how can i use change_base correctly to change the suit of a card im confused and cant find the documentation of it
yep, that did the trick, thank you
is there a list of all the contexts somewhere that can be found?
Bro you are quick
SMODS.change_base(card, "Hearts")
I literally had it open on another tab and you beat me 😭
thank you!
?
thank you
Add () after get_id and remove the if
Like this?
Yes, but no, you would want to do SMODS.change_base(context.other_card, ...) ... being the random.
Outside of the return.
I meant the if that is checking if fours > 0 and sevens > 0
oh okay
?
You would get the key of the random suit.
I meant the entire if and its conditions except the return.
should be good now
?
Also remove the variable declaration and the end
which end
also which var
and what do I do with the key?
It doesn't matter, also the local fours, sevens
You use it in SMODS.change_base
Basically all you should do is add .key to the end of the pseudorandom_element call
?
You need to add the context.repetition and context.cardarea == G.play back.
?
i really dont know what to do with that information
Your call is set up correctly, it's just the one argument that's a little wrong. Do what I said here and it should work
no
damn
pseudorandom_element(SMODS.Suits, pseudoseed('mysuit')).key
It should work
it doesnt do anything
Show the full code
@daring fern it doesnt retrigger for some reason
Why are you checking for 0 hands played
honestly idk
the full code @daring fern
It's context.repetition not context.individual
oh
oh fuck im stupid
hold on
I'm positive it is not exclusive to that
I do not know a 💩 about lua, and i want to make a texture pack replacing some of the collabs with my own textures. How can i do it?
I've already tried to make one from a template, but it didnt work.
You’re correct
it still doesnt work :(
It’s just cardarea checks are kind of useless in most contexts for jokers
change your hands played check from 0 to 1
no
i still dont know how to fix this
Remove the card area check.
I'm also unsure if context.other_card exists at this time either, so instead you might just wanna do context.scoring_hand[1] instead
doesnt work
try changing 1 back to 0 lol
Also you are starting a new run every time you test, right?
yes
ok good
still nothing
show again
the
so I replace the entire if context.after... with context.scoring_hand
still nothing
bruh
try adding a print() after SMODS.change_base to make sure it's even running. If not, something's still wrong with your hands_played check
like this?
ok my bad
ok there was an output
how can i knonw inside context.repetition if a card is enhanced?
is there a way to test if your in_pool condition is actually working without rerolling forever?
if next(SMODS.get_enhancements(context.other_card))
how would I go about setting the sell value of a consumable?
card.sell_cost = number
is there a version that works when I'm defining the consumable
I forgor they were two different values lol
or would I just use sell_cost as a parameter
No.
unfortunate
can someone tell me if this in_pool is incorrect?
If i wanna have my seal only create a card when it is discarded like purple and not make two if two cards are how can i do that? It rn creates two cards if u discard more than one with one having the seal
also check if the card has the seal i would guess
what is the thing for it?
context.other_card.seal == 'whatever your seal name is'
No, it's card.seal
gotcha makes sense
Also it's modprefix_key not the name.
Yes.
noted
ye ik
i thought that was implied since rarely does something not require modprefix and key
Atlases and consumable types don't require prefixes.
wow, i never noticed
about the consumable types i mean
the rarely was written with the understanding that atlases were exempt
You can do eval get_current_pool(‘Type’) using debugplus

Atlases do require mod prefixes, they’re just auto added in object creation if they’re missing
still weirdly is making two consumables with two cards selected
just added the card.seal but still is outputting two
Is this in the seal object?
yea the code is pretty short since similar to purple seal
if context.discard and context.other_card == card then iirc
No worries, I know an awful lot about calculation code
i would bet the intro to code through ur stuff has been amazing
Hello, I recently looked into modding balatro and I watched some videos and tried to follow along with what the videos were saying, but I couldn’t get it to work. If someone here would be so lovely to help me mod it that would be very appreciated
#1349064230825103441 Would be very useful for you
Thank you, I’ve watched some videos but the folders it mentions are not in the same place. I will try to use the guide you provided
Hello im new too (i was new) , my way to understanding balatro modding was scanning a lot of balatro mods. you can try its very useful.
When I first started I tried to make some jokers, using the example repo as reference.
how do i make it so it gives me 1$?
dollars instead of money
it works
ah
then I shut up.
I though calculate only triggered once and when returning it would only work for the first scored card.
scored and matching.
I’m not trying to create mods, I’m just trying to install mods
Oh ok
oh wait true
then how do i do it?
so it counts every 10
instead of returning, try ease_dollars(1)
ok
-- ...
if c:get_id() == 10 then
ease_dollars(1)
end
-- ...
this channel is to develop mods, not to install
-# again, I am up to help you getting started.
guys im out of ideas can someone help me idea
the reaper, 1 in 4 for every scoring card to destroy it
API to centralize getting card information, such as rank, suit, key, edition, mod where it comes from, etc
why when i play this hand type only 7 scores?
is this the only effect or is it like also x3 mult
what
destroying cards is useful
oh i thought u meant like any scoring card can destroy the joker
ah
Because uh... yeah. Shit like rank, suit, editions, seals, etc are just wherever the fuck.
I have a very horrid memory for stuff like that.
how can i make it so if ive selected 2 it wont let me?
i did the function already because uh... ye
return #G.hand.highlighted == 1?
i dont think it needs more than that then
if #G.hand.highlighted == 2 then return false else return true end
oh well
is it possible to have a message appear above a card without returning, like in an event manager function?
card_eval_status_text(card, 'extra', nil, nil, nil, { message = "Upgrade!" })?
SMODS.calculate_effect({message = "message"}, card)
I mean, it makes text appear under the card, like upgrades and whatever text you need.
thanks, i'll try that. does that function also support other things you'd typically return, say mult or chips for example
Yes.
ok perfect, thats what i need
can anyone tell me why please?
can someone send me the code for arrowhead?
Mods/lovely/dump/card.lua, ctrl + f for "arrowhead"
Label is for the edition badge that is shown below the rarity of jokers for example
if you're not using a localization file then put it inside the loc_txt of your edition
it's loc_txt not loc_text
That's saying you have something wrong with your atlas file
Make sure it's within assets/1x and assets/2x
i havent made the assets yet do i have to do that rq
well if you want an atlas you need to have a file
ok
you don't need an atlas for an edition tho
if you're only making an edition yes
wdym "only"
I thought the uv value that vanilla calculates in its shaders was supposed to cover only viewing one sprite of an atlas? Or am I misunderstanding what that means?
as in, an edition is the only thing you're trying to add into the game right now
no i have 3 jokers along with it
then, if you want your jokers to have custom sprites you need an atlas
quick question how do i make the description text with red background and white text?
{X:mult,C:white}text here{}
Do {X:mult,C:white}{} for the specific xmult example. the X: tag covers the background color
There can't be spaces.
chatgpt aint doing it bro
ok thank you guys
you get what I was saying tho
so i keep my atlas
Replace <text here> with your text
i have 3 jokers and am making an edition, i keep the atlas for the edition or no?
Editions require a shader parameter. You can check the SMODS docs for all the required values for each function https://github.com/Steamodded/smods/wiki/SMODS.Edition
i did the shader
You seemingly put it in the Atlas call which is not how that works
Is this fine? So it destroys itself after 3 rounds and creates another joker
yes
Did you put the label
You need to have a label for the edition
you likely put it in the wrong spot then
in loc_txt
Yeah that's in the wrong spot
you put it inside text yeah
o jeez
put it after the closing bracket of text
or after name
whichever you prefer
also it needs to be a string
So "Stock"
Ahem, sorry to interrupt but I wanted to ask why does the game uses two same sets of textures? It seems like in game it's only x1 but why does x2 exist?
scaling stuff i think
It's something to do with texture scaling
It's kind of superfluous but it's just unfortunately how the game is setup. It helps it look a little crisper at higher resolutions basically
basically just make a 142x190 and then go to some website that resizes pictures and put it in there as 71x95
that worked for me
ok the last thing i need to do for my edition is how do i get the texture
I make all my sprites at 71x95 (or whatever the base res is), and then basically every image editing software has nearest neighbor scaling
Editions don't use textures
editions work with shaders, and they're not beginner friendly
I have no idea what you're asking is the thing
We've just established they don't use textures, so whats the question of what you want?
I think it's for the "pixel art smoothing" in graphics settings
could be wrong
how do i make it look like the foil or whatever
Write a shader
make it look like it has texture
Which is not a beginner friendly task
...and how would i do that
You'll have to look at the examples given by SMODS
oh gee wizz
You need a file under Mods/your mod/assets/shaders/whatever.fs
https://github.com/Steamodded/examples/blob/master/Mods/EditionExamples/assets/shaders/ionized.fs here is the SMODS example of one
yes
Basically, shaders are calculated on your GPU. When drawing something to the screen, it does some math on the positions of the vertices of the object and on the colors of each individual screen pixel
I'm currently floundering around a relatively advanced shader rn
@red flower just lost my 50/50 to fu xuan
what would the "whatever.fs" be as a file
like a word doc or
here is an example of one
technically it's just a specifically formatted text file, but that's what basically any code file is
Here's also an overview of shaders in love2D
Which are a specific implementation of GLSL (open GL shader languge)
wait but shader = false
Yeah, that means for right now your edition just doesn't display a shader
Shaders GLSL, similiar to Minecraft shaders.
what do i replace
stock
that comment refers to this line extern PRECISION vec2 ionized;
you also don't actually need one if you aren't goingto use it
No I mean
You can def make a shader without that specific variable
And you can pass in variables as you wish using the shader definition as well
You aren't limited to that one
but from my understanding, if u want it to look like something it must be a shader
but that variable has specific information about the card ingame
I really do enjoy being misunderstood. Have fun
im just gonna give up and have someone volunteerly do it for me if they want to
damn...
it's okay, I've reached the acceptance state, it's not the worst case scenario
so I'm satisfied
is this a good way to put it like does it make snes
(this is the readme)
sense
not
super mario world
how do i take over a consumable's use functionm
isnt it literally take_ownership
more precisely how do i get the original function
oh i just look at the dump and then recreate
like here how i did with wheel (minus the ectoplasm and hex because the key will focus on the wheel)
(og dump function for comparison)
there is no original function, they're all jammed into one in the source (Card:use_consumeable)
😭
so yeah, your best bet to get the "original function" is to copy the relevant part from the source
(which can bring cross-mod issues if any other mod has a lovely patch affecting one of them)
to be fair your take_ownership thing can probably be done in a lovely patch
i don't know everything you've added to the original but it might be better to go that route
true
take_ownership seems very conflictive in general
Is this fine to autodestroy and create another joker?
like I've seen multiple people wanting to affect lucky chances
something's in the air
i just realised something
i want to, on startup, randomly move the location of the quit button to the options menu.
but i'm not sure how to implement that outside of the randomness
how can i hide the default quit buttons and put a new one in the options menu?
@thorny yacht
We did it again
poor Mods
that wasn't even a role mention
Is there an equivalent to G.jokers.cards[i].config.center.key == "j_joker", but that works for a ObjectType I created? Say I made a "Birds" ObjectType and populated the pool with a few jokers, how would I go about checking if I have a joker that is in the "Birds" pool?
yeah i shouldnt have pinged them sorry
oh god
2 in a row????
damn so fast
BACK TO BACK?!
No way
<@&1133519078540185692>
i have the sudden urge to click a steam link.,,,,
i made this to spawn 6 kings of spades and six kings of hearts but its giving me random cards, whats wrong? lua for i=1,12 do G.E_MANAGER:add_event(Event({ func = function() local _rank = "13" local _suit = "S" if i < 7 then local _suit = "S" else local _suit = "H" end local _card = create_playing_card({ front = G.P_CARDS[_suit..'_'.._rank], center = G.P_CENTERS.c_base}, G.deck, nil, nil, {G.C.SECONDARY_SET.Enhanced}) return true end}))
man
Begone
Help
It's not doing nothing after 3 rounds
Messages still here
rank should be K
oh yeah i forgot about that, my bad, thanks
wait for it
is the scam message still there for you guys
yeah
Yes
why
is it a bug
Some mod ban user without checking a box "deete all user's messages"
hewwo
hiiii aiko
ii tthink i didi t
You did it?
what is the variable that stores how much money you have?
G.GAME.dollars ?
ok thanks
how do i make it calculate this when the first number card in played hand is scored? basically like the photograph joker but instead of mult it gets the first number card digit and uses it to get a number based on the order of pi calculate = function(self, card, context) if context.joker_main and context.full_hand and #context.full_hand > 0 then for i, c in ipairs(context.full_hand) do local rank = c:get_id() if rank >= 2 and rank <= 10 then local pi_val = pi_digits[rank] card_eval_status_text(card, 'extra', nil, nil, nil, { message = "+" .. tostring(pi_val) .. " Mult" }) return { mult_mod = pi_val } end end end end
right now it only calculates it at the end when all the jokers are played
THREE????
bruh
Impossible
ohhh moderators gif
Even with this kind of acceleration look like game works normally
bump
you want if context.individual and context.cardarea == G.play and context.other_card == context.scoring_hand[1] (aka, whenever the first scoring card scores)
also use mult instead of mult_mod in the return if you're not including a message
does anyone know how to enable these "optional features"?
smt like this
heres how i did it for retrigger_joker and post_trigger
you generally want to be doing something similar.
preferably do that in your entry file, and you can just refer to your own mod as SMODS.current_mod
i did it for these four 
also it can be a function that returns a table or just a table
up to preference i guess, idk why both are allowed
SMODS.current_mod is not reliable and can return other mods than your own
that's why i did find_mod with my mod id
If you do that outside the loading stage yes
but this is something you should do during the loading stage of your mod
i actually have to update my cases of such to my mod ref
what is the "entry file"
your main mod lua file
the lua file that gets executed in your mod
[The Big One]
entry file as in like main.lua correct?
yeah
oh ok
the thing you typically load subfiles from
i wonder if there's a better way to do this*
*with proper ordering
it doesn't realllyyy have to be there, cus you can load other files, but still
i'd recommend putting it in there if you're unsure
any chance i could see more of the file? i didnt have one previously and im interested in adding one
i actually used assert for this, is that the same?
I'm new to coding, so can someone help me understand why this either spawns a random Legendary or crashes instead of working?
it seems to work fine
assert is fine
also do I use retrigger check or retrigger for retriggers
I recommend using SMODS.add_card instead of the vanilla functions
the issue here, if I had to guess, is that in the vanilla functions the rarity is a number and not a strng
not mentioned in the wiki but for rarity you can pass "Common", "Uncommon" or "Rare" if you want your code to be more legible
come again
i see that some mods use "retrigger_joker_check and not retrigger_joker"
Where would I put the editions and seals or other stuff, since its blank format is "SMODS.add_card(t)"? In the parenthesises?
so is that what I should use
From your code I assume you wanna spawn an eternal oops all 6s?
Correct.
Thank you!
is there any way to make this joker not crash whilst still making the message color my rarity color?
return {
message = "+" .. lenient_bignum(card.ability.extra.create) .. " Trash Jokers",
colour = "crp_trash",
}
it currently really doesn't like when i do this
cus colour is not meant to be a string
then how do i fix this? i want the bg to be the same as my rarity color, trash
I think what you want to do is colour = G.C.RARITY.crp_trash but i'm not 100% sure
Yes... I do it.
for _, file in ipairs{"1.lua", "2.lua", "items/1.lua", "farts/aeiou.lua"} do
assert(SMODS.load_file(file))()
end
assuming crp is your mod prefix
ah okay
their code is more legible imo, and that's more important
A valid point, just throwing my 2 bites out there.
game hard crashes when it tries to display this
jesse story mode gif
do you have debug plus installed
That... and my crossmod loading is pretty much the same, although the conditions can be confusing to some.
yes
that mightve been old retrigger_joker im not the surest
got a bunch of stuff
uhh
crp_trash is in the list
no crash log?
nope
I don't know what I did, because this is all I have...
does it crash if you do colour = G.C.MULT
i'll try that
you have to return true after the add_card line
cus it's inside an event
if you don't, the event will just repeat until it returns true (which in your case would repeat forever)
Can i ass shaders to tarot cards without it being an edition ?
works fine
yes, using drawsteps
"ass" 🥀
Uhh how exactly
if you do eval G.C.RARITY.crp_trash does it print smt
i have this one that adds a shader to jokers that meet certain conditions, you would just change the condition to check for tarots
https://github.com/nh6574/JoyousSpring/blob/ba699ffdde89a3bcd438e1111ecff78c1bdd2924/src/others/Shaders.lua#L7
it prints a big table
bump
can you screenshot it, it shouldn't
okay that makes no sense, why would smods put your entire rarity into the color table
regardless it still looks like it has the color indexes
this is the code for the rarity, if it's my fault
local trash_gradient = SMODS.Gradient({
key="trash",
colours = {
HEX("989898"),
HEX("272727")
},
cycle = 5
})
...
SMODS.Rarity({
key = "trash",
badge_colour = trash_gradient,
default_weight = 0.005,
pools = { ["Joker"] = true },
get_weight = function(self, weight, object_type)
return weight
end
})
if it has the color indices, it should work right?
oh true i'll try that
to my knowledge yes, but it seems my knowledge is lacking now lol
this just gives the default orange bg
return {
message = "+" .. lenient_bignum(card.ability.extra.create) .. " Trash Jokers",
colour = trash_gradient,
}
I mean a gradient is constantly changing color so maybe you hit a moment when it was orange?
maybe return doesn't take gradients
Idk anymore
But I thought a gradient was just a 4 length array whose values are constantly changing
trash's gradient is completely gray
yeah but idk
maybe it has to do with the fact that my rarity.lua (where trash_gradient is defined) is loaded after joker.lua (where the joker that creates trash jokers is defined)?
i'm not sure
maybe try SMODS.Gradients.prefix_key
well that'd do it
i'll try this, then try loading joker.lua after rarity.lua
so trash_gradient is a local variable in a different file, aka it doesn't exist in your joker file, so passing nil to colour would indeed give you the default color
yeah that tracks
it won't matter if you load one first or the other
this hard crashes; i'm going to try defining trash_gradient in joker.lua to remedy the issue
well no like
you would have to make it a global variable
how?
crp_trash_gradient = SMODS.Gradientetc etc
without the local keyword
I added your mod prefix to the variable name cus that's good practice when making global stuff
so just this in rarity.lua instead of what i had before?
crp_trash_gradient = SMODS.Gradient({
key="trash",
colours = {
HEX("989898"),
HEX("272727")
},
cycle = 5
})
yeah, and make sure to change where you previously used the old name