#💻・modding-dev
1 messages · Page 483 of 1
a
Like to my home
ah ha
But also toma
im gonna get you
hmm
A nice beverage?
with hammers
Hammers dont often go with beverages

there is no nodes 3
i knew there wasnt
but im out
of idea
s
surely someone has a mod where the button is on the bottom
surely
it's the same UI
what is line 277
i just dont put buttons at the bottom anywhere else because..... i made jokerdisplay
i know what happened dw about it
k
How would things work at the bottom also with joker display
i forgot about.... joker display....
you would have to hide the display first
Cause at some point I want to add a health bar to a joker but also make it work with that
how do i do that?
to hell with it it's going to the top then
i can't be more extensive without writing the code for you im sorry
there's a joker in cryptid that does it
cool mb
guess where jokerdisplay also is
perishable and rental counters
MOVE
anyway just put it at the bottom
the display will get in the way
youre not even supposed to have to click the card first but i wanted to at least get the button oriented properly first
is it this one
do you think i remember my code
yes
does anyone know why this wouldnt be changing the variable?
it's supposed to basically remember your last played hand
and store it in a game variable
how does cavendish tell if gros michel has gone extinct
iirc theres a flag thats set i think
check vanillaremade :3
also smods examples
vremade cans how you how its done there, or you can check the source itself for the flag
fucked up that N gets the thumbs up
aluminum or tin?
nickel
unfortunate
what am i supposed to do with a nickel can
use it for soup
what's the level of persistency of info you save in G.GAME? like if i do G.GAME.myTable = {}, how long does that table last? when is it removed? does it persist between game closes and openings? does it persist between games?
no
yes to all but the last one
it only doesn't save cyclic tables (like cards)
it might not save functions either, i never tried
Remove and context.main_eval
It is set to true during joker type scoring and is nil all other times.
what's wrong with this
if card.ability.extra.round < card.ability.extra.maxround and rylen.ability.eternal ~= true then
local card = card
local target = #G.jokers.cards == "rylen"
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
play_sound("card1", 1.1)
target:flip()
target:set_eternal(true)
return true
end,
}))
end
end```
ohh gotcha :3
Hey, all. How can I go about using the config to remove specific cards from the pool when enabled? Edit: Imma make it a little bit clearer. I have a config option in my mod where I can enable and disable. Now, I need to make it so that when I enable that option, it removes some cards from the game. Just haven't figured out a good solution
check for it in in_pool
hi modding dev
RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 
hi es rock double u
what did you need from me
can you write some hater shit on mine next
One silly way is to put those cards in their own file, then only load that file if the option is toggled appropriately.
Oh, this is likely better
this approach would require restarting the game every time the config option is toggled
my fucking sticker got shot
dw I see it
i thought only gifs were shot dead
Ah... Right, since you can't just reload files, can you. Huh.
yeah
And I get it instead
I was thinking about doing that, but its not a great solution when I saw some other mods do it. I want to know if anyone has a great example of how in_pool works for config stuff
thanks toma
im about to remove all burgers from the ecosystem besides one
np srock
you just define an in_pool function in your object like so
in_pool = function(self, args)
return SMODS.Mods.your_mod_id.config.this_thing_is_enabled
end
i ate it
im coming after you
i have made 7 fully functional jokers (6 if you exclude blank joker, as it's effect is a placeholder) and i'm proud
we're all proud

Congrats!
how would I go about doing that?
youve done a perfect job, youre a beast and nobody could best you, the world is yours for the taking, all you desire is yours and all of your potential has been realized
carry on proudly
yooo thanks guys : ) (sorry for the space, if i delete it it turns into an emoji)
Use SMODS.load_file("other_file.lua")() at the top of your entry file
bless 🙏
i'm not really sure how to make jokers become inactive for the rest of the round once they activate
what am i looking at actually
also hello omori font
if it helps any heres a bit more of the scripting i've done for the joker
no i mean what is it supposed to do
trying to debug a joker which adds a glass card when a diamond is destroyed, it works ok with one diamond being destroyed at a time but when multiple are destroyed it only creates one. how would i fix this?
ah right
once you reach 0 hands for the first time in a round, it gives one hand back
for loop

this formatting is certainly one of them
also it's cus you're returning inside a for loop
OH is that whats going on
so you always only do one iteration, return and exit the function
i have made this mistake as well
...how many
maybe if i add a mention of the card.ability.extra.active in the if statement?
oh wait that's pretty easy actually
let me look at what you have
i don't think that's simple to do, cus once you reach 0 the round ends
you could do it during scoring
hand count visually goes down to 0 then
extra = {
hands_remaining = 0,
hands = 1,
active = localize("k_active_ex"),
},
},
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.hands
},
}
end,
loc_vars = function(self, info_queue, center)
return {
vars = {
center.ability.extra.hand_remaining, center.ability.extra.active
},
}
end,
calculate = function(self, card, context)
if
(
context.joker_main
and (
G.GAME.current_round.hands_left >= card.ability.extra.hands_remaining and G.GAME.current_round.hands_left < card.ability.extra.hands_remaining + 1
)
) or context.forcetrigger
then
return {
func = function()
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil,
{ message = "OMORI didn\'t succumb.", colour = G.C.BLACK })
G.GAME.current_round.hands_left = G.GAME.current_round.hands_left + card.ability.extra.hands
play_sound('SnipersTV_omorisuccumb')
return true
end}
end
if context.end_of_round and not context.retrigger_joker and not context.blueprint then
if not card.ability.extra.hands then
card.ability.extra.hands = true
card.ability.extra.text = localize("k_active_ex")
return {
message = localize("k_reset"),
card = card,
}
end
end
end,```
i ran out of characters by the way
thats why there's no SMODS.Joker{
i mean it wouldve just sent as a text file
actually yeah thats a very good point, lemme go do that
a bit of an awkward timing but i guess it could work
an awkward timing for an awkward effect
in paperback we had a similar joker, we ended up making it be +1 hand always, but if you ever beat a round with 0 remaining it destroys itself
that sounds busted
honestly I don't know like half the references, i just write the funny code
this should be way better than that block of text
its been a life saver at times, but it definitely hasnt feel supremely strong
why do you have two locvars
it does get a little wacky when paired with my joker that also carries over discards
but i also have one that carries over unused hands too
i see i see
How would I trigger a click event on an object with a click function?
this one will always be my goat though
hook node:click()
what if triboulet was government sanctioned
honestly, that was most likely because when i first put hands_remaining in the config, i made a typo
erm trib gives mult and mine doesnt
Controller:queue_L_cursor_press also works
probably another idiot moment for me
i didnt say government sanctioning was a good thing
the fact that Negative isnt doing the uhhhh wowowow effect
alright here's the fixed loc_vars version
it will eventually i just ahvent gotten around to it
makes me think youre just spawning a bad president
im still missing a ton of art
did that, am still getting this error
out of my like 60 jokers im missing...17 pieces of art on the joker side
then several planets and tarots and spectrals and vouchers
What's line 241 of your main.lua file
this. is it because i'm trying to store it in a variable?
in the file i'm trying to refer to
Are you overriding LRG in your main file somewhere
aka, LRG = {} somewhere in your main.lua file
yeah, so does that mean LRG should be defined only in the other file?
yes
out of curiosity how would i send a message without returning anything?
Do SMODS.calculate_effect(table, card) where table is what you'd normally return
if your joker is blueprint compatible do SMODS.calculate_effect(table, context.blueprint_card or card) instead
god i never went through my jokers to make them work with blueprint
i should do that at some point
would i just replace the phrase table with all the message stuff?
mrreoww
with the table you'd normally return
hi cat
I just got LRG is a nil value again
- your
extrasayshands_remainingbut you're returninghand_remaining - just change the hand count check to check if
G.GAME.current_round.hands_left == 0if it's just gonna be when there aren't any hands left - since it's supposed to only be when you first run out of hands, add a flag variable at
falsethat gets set totrueafter the hand increase (which you can just do withease_hands_played(your.hands.variable.here)for btw), then add to the conditional to check if that flag isfalse
no idea what you want at the end of the round though
Honestly, I need more context, can you send both the main.lua and the file you're loading
i thought things were default blueprint compatible unless you specified not context.blueprint
smods header....
they are
have you seen joyousspring
ive seen it of course in screenshots
some things must never be blueprinted...
SMODS.load_file(path)() you're missing those last ()
ive just never seen anything it does because its not spring rn
so it cant be joyous
Also the 2nd parameter is meant to be a string, you're passing a variable that doesn't exist
yeah but there are many things that shouldn't be but i never add not context.blueprint
ah icic
ahhhhh got it got it
but i just added jokerdisplay to 300 cards so im gonna leave that for another update
Wow.
once i add my own blueprint-likes
Unacceptable
add joker display to all of mine now pls thx
ok i can do that
how would i go about making it so that a joker causes all face cards to act like all face cards? (ex. a king, queen, or jack could be discarded for hit the road and all would trigger baron etc etc)
i would advise against any kind of "treated as another rank" effect lol
and i assume i have to set the flag variable's initial state in loc_vars right?
calculate
and make sure it's local
is it just like hell to code / causes problems or is there some other reason?
no that's it
simple reasoning
it's hell to code and causes problems
thanks, i've finally got it to function without crashing, you've been a great help 🙏 <3
the most i ever did was make aces count as 1 and 11 otherwise i dont make one card act as another
can confirm it's hell
if you needed a 2nd opinion to be sure
aces counting as 1 you need to go
my bad for making blackjack function as it would normally
:(
all face cards count as 10, aces as 11 and 1
im bringing a fuckign banana
this aint ur grandma's casino
i have it as a joker and as a playable hand
joker gives x5 mult for scored equalling 21
hand is shrimply a hand
dont aces like already count as 1s in vanilla
things get silly though if you pair blackjack with secret service with photograph and make them glass eternal
rank is 14 so pulling its id made it count as 14
in straights and otherwise yea it do
(all the practical applications)
im just saying that aces have always counted as one but mods dont follow that pattern sometimes even though they probably should
whenb i didnt have the check manually it did not function as that
so i will simply disagree
unfortunately you are not localthunk
i forgot i did all that just to get the button working i havent even done the effect
fortunately
i set the local flag exactly as told and yet the joker still activates everytime
at least i can perk it
are you him
then you burn
idk
you wouldnt burn your buddy would you
...so what's context.forcetrigger
my buddy is dilly
not localthunk
cryptid compat
does anyone know why SMODS.add_card({ set = 'RupeeConsumableType', key = 'b_rupee' }) says that center is assigned a nil value while SMODS.add_card({ set = 'RupeeConsumableType'}) seems to work without issues?
but what if dilly = localthunk
dilocalthunky
well technically you can do forcetriggering without cryptid now
because of cryptlib
its between the lines
but thats where it originates from
then he must dielly
forcetriggering my jokers counts as harassment
D:
why don't you politely ask it to trigger
to be honest it came from another custom joker that i knew required a certain amount of hands for it to activate
that means b_rupee is not a valid key of your set
have you tried just putting parentheses in the conditional
me getting flashbacks to yahimod 😭
whats yahimod
the original code does have parentheses for checking how many hands you have left
yaha mouse
a mod with a joker called "Semicolon" that "politely asks the joker to the right to trigger"
😭
presumably as a reference to Cryptid's demicolon
OH
and it was my idea
it is not
that would make more sense lmfao
banger idea btw lol
that explains the cryptid connection then 😭
damn we got the idea police
we?
i'm not policing anyone 😭
you're free to steal my ideas after besting me in armed combat
i'im just complimenting them on a great idea for a shitpost joker
dude lets 1v1 rn
i have the same policy but it's BYOA
bring your own armadillo
tf the armadillo gonna do
people can take literally every single thing from my mod when its out i couldnt care less as long as myself and the artists are credited
transform into an armadilly
roll with it
🥁
How can I stop loc_var's from rounding and get them to always display the full value?
im stealing the whole thing
feel free
make it a string
where is your mod
give me
make great again
soon....
dilitro
im waiting on art before releasing
dont even know what it is but
but bribing my artists with fast food has been ineffective
have you considered money
have you tried slow food
i spent like 50 bucks on her and she said 'delicious, im offline now'
wheezing
me
i was cursed with artists who get struck with curse of lazy
but to be fair i go on huge bursts of no activity
oh my god it keeps on activating every single time without fail
im clearly developing
but i made most of my stuff so i deserve a breaky wakey
back to your regular programming
wdym, this is where the devs hang out and talk, that's as much modding-dev as anything else
what the fuck is that font
now THIS is the formatting ever
modding chat is for the people who play the mods and chat, modding dev is for those who make the mod and chat
this is unironically better than the other one
oh god
the parentheses
Sure they look bad but they're clear
i should start coding in courier prime
active would get reset every time calculate is called
i should code in comic sans 🔥
But I'm copying the key value from the code I used to make the consumable and I can access it without issue in the consumables menu
would putting it in loc_vars help or no
hop on m6x11 plus
The key of any of your consumables should be c_prefix_key where prefix is your mod prefix, and key is the key you put inside the definition
or hell, putting it in the config
no, you need to put it in config
toma im sorry i hate that too
oh, that's probably it, thanks!
but how am i supposed to convey that the joker's active in the description?
hate it in an unfun way or a development hell way
my answer was that your problem would be solved by putting it in config
that's another problem, which would be solved by putting it in loc_vars too
second
the active variable is already in loc_vars
i dont believe it will work if you have it like right now
but anyway worry about that part later
ill take it
im probably gonna change soon too
(too many commas keep getting cut off as fake periods...)
N and toma i have a very important question for you
what should i have for dinner as i am feeling rather peckish as they say, a bit hungering as the kids have proclaimed
steak
beef stroganoff
hey...
general consensus is cow eat cow
but my main problem with the variable is that it's too plain and dull compared to the other jokers that activate once per round
youre a genius
why would an uber eat
fuel
more unreadable fonts 🗣️
this is funny as shit im so rotted
for that you would need to add a custom string when it's active
true…
what do you mean? How do I turn the var to a string?
true..
that is readable asf
tostring(10)
ehh it’s harder to read than just like you know
the default balatro font

honestly my biggest problem with omori was the font resolution when i played it

not again


fair
the only thing i know about omori was something something drifloon
that's pokemon
ty
didnt happen

anyway, after putting the flag variable into the config, the joker just doesn't wanna work anymore
what's the code
i will seriously ask you to change to a regular font tho
heres an example of the renogare font in the decription of the joker i'm working on
that's more readable
event manager looking kinda scary
this one is for UI coding
it's impossible to differentiate , and . lol
it's funny how the {} look normal
hi everyone
how would i get a joker rarity not to show up in booster packs but still appear in the shop
hi bepis
nvm bye bepis too many people said hi
wtf

alright i think this is good enough
now to fix the 'Active!' message from being spammed after the round if it got triggered
bugs like that are my favorite
the card works functionality-wise, but you want it to be perfect
remember chat, its not a bug if you can declare that as a feature
real
here's the part of the code where the active message kicks in at
you forgot and context.main_eval in the if
no at end of round lol
context.buying_card
oh i read incorrectly 😭
you forgot to mention to replace 'active' at line 1464 to 'extra', but other than that it actually works now. thanks!
joy and whimsy restored
ah right yes
pain
imagine having compatibility with JokerDisplay 🥱
L mindset
it's foil
Imagine having
I was made aware of an extension today and I think I like it :o
(random bit of jokerdisplay code to demonstrate)
I might add it eventually but I'm not making it a priority
very very fair
so what's the extension
The priority of everyone is to have a functional mod for release :)
codesnap
Anything else is extra
and it makes actually nice code screenshots
well yeah we need that for config
i forgot to grab that
I am approaching at speeds you are not prepared for.
your chair is waiting
the one with over a million installs
cool thanks
What do I need to write for permanently adding chips to a card
bonus not chips
oh ok
BEAR IS APPROACHING FAST
WE HAVE LOST VISUAL ON BEAR
but is perma_mult is the good thing for permanently add mult
yes
okok thx
is there a way to increase the cards offered per booster? Like turning 1 of 3 into 1 of 4
I wanna make it a voucher
yeah it's nice 
wait
for all elements of set Booster, set Extra to Extra + 1
thats probably doable an should totally do the thing I want
tho I do recommend fiddling with the settings a bit
yeah I was trying to do that too but for specific booster. I give up
i did lmfao that's why it's gray
and square
can you make it a circle
no :(

I think you removed the padding
and the background color is the padding color lol
oh lmao
but my quesiton is what the point of this over just ctrl + or - taking a sc
It just looks nicer than an on-the-fly screenshot imo
More precision than potentially cutting something off
i suppose, personally it just seems needless
but i also dont have any special fonts or anything either and just leave shit default
i feel like if im sending a screenshot im not really cutting anything off
It's definitely an "if you like it" thing
ye for sure
dilly im coding in Hardpixel and before that it was the balatro font
mfs cant stand arial
lole
there are 3 bad fonts actually

already am
no you arent i refuse
thats it, no burger and no fries for you
all you get is the toma to
heh
get it
🍅
im changing my naem
you despise that im a funny guy
these puns are horrible and i love puns
why is this workspace ujst not titled
im dumbad
s
HELLO
BRAIN
is this your way of saying i need sleep
ok fine
what pillow case
is this too juiced for a legendary
Can anything ever truly be too juiced for the highest rarity
im trying to make a blind but every time i launch no matter what i do it says "bad argument #1 to ipairs" any idea what to do?
my drawstep has stopped working...?
it should be entering the condition, but it's not doing the thing.
fair enough lol
Once again more front designs
Trying to make essentially "fake" suits. Not new suits for gameplay reasons, but that the existing suits will get randomly assigned one of these with colors assigned via shader, and thus the actual suits are obuscated for the purpose of a blind
please tell me there's an easier way to draw a specific card from the deck than the way enchanted works in lobcorp
it looks like they move every other card in the deck down by 1 spot? i'm very confused by their methods
That's just inherently how lists work
If you use table.insert() or table.remove(), all further indeces in the list are adjusted accordingly
it doesn't look like they use either of those? i still don't actually know how the code works
You'd have to show the code
this is the best i could find for the actual mechanics of the edition
its description is that it always stays in your hand (that's like half of what i want)
almost every other mention is either compatibility for perma_enchanted which is just enchanted but it can't be replaced, or big bird's effect, which is where you get enchanted from?
but this does not look like enough code to do that it might just be me
Well I don't know what the n variable is used for but it's iterating n for every enchanted card it comes across. It doesn't seem to change values of cards in the deck
hand_space = n in the pattern
the hand space gives you space to draw cards this doesn't explain how it comes back into your hand
so yeah it's just adding extra hand space when it goes across enchanted cards, similar to how negatives increase card limit
but why
idk? I've never played this mod tbh so I don't know the intended purpose
oh i found it
understood
they hook the draw_card function
that makes a lot more sense
I can totally do that
anyone know how i would go about picking random suits to change cards into?
as in when you play a certain hand, the cards in hand would all change to one random suit
you can do local suit = pseudorandom_element(SMODS.Suits, pseudoseed("some unique string")).key
that will give you a random suit string, like "Spades" or "Hearts" that you can pass to SMODS.change_base
how do I change the rank of a played card
i'm getting really fucking sick of change_base crashing every single god damn time I use it
Whats the size for blind sprite?
i don't even know what the assert() does but sometimes it does and sometimes it doesn't make the card crash the game
34x34 for each frame.
Ok thanks
It crashes the game if the input is false or nil
well I can't just not input anything for the suit because I don't want it to change the suit
the suit argument will always be false or nil
assert(SMODS.change_base(value, nil, "6"))
value is a real playing card this is inside for index, value in ipairs(G.play.cards) do
how can I destroy multiple cards in hand? I got this code however it sumtimes will pick the same card twice which I do not want.
destroycard = pseudorandom_element(G.hand.cards)
SMODS.destroy_cards(destroycard)
Is there code that makes you lose the blind when an action happen
Or ig lose the run
Can you share the full block thsts causing this crash? There must be a different issue somewhere
little help?
calculate = function(self, card, context)
local bonus_active = false
local ret = {
mult = card.ability.extra.base_mult,
chips = card.ability.extra.base_chips
}
if context.joker_main and context.scoring_hand and #context.scoring_hand == 5 then
local all_same_suit = true
local all_same_rank = true
local first_suit = context.scoring_hand[1].base.suit
local first_rank = context.scoring_hand[1]:get_id()
for i = 2, #context.scoring_hand do
if context.scoring_hand[i].base.suit ~= first_suit then
all_same_suit = false
end
if context.scoring_hand[i]:get_id() ~= first_rank then
all_same_rank = false
end
if not all_same_suit and not all_same_rank then break end
end
if all_same_suit or all_same_rank then
bonus_active = true
ret.xchips = card.ability.extra.xchips
ret.message = localize{type='variable', key='a_xchips', vars={card.ability.extra.xchips}}
play_sound('tngt_neverforget', 1.1)
card:juice_up(0.5, 0.5)
end
end
if not bonus_active then
card:juice_up(0.2, 0.2)
end
return ret
end
}
this joker somehow adds score outside scoring
and stuck at exiting the shop
Yes, you are doing return ret outside of context checks.
And ret is not nil
what should i do then
Put everything inside the joker main check
all the locals?
calculate = function(self, card, context)
if context.joker_main and context.scoring_hand and #context.scoring_hand == 5 then
local bonus_active = false
local ret = {
mult = card.ability.extra.base_mult,
chips = card.ability.extra.base_chips
}
local all_same_suit = true
local all_same_rank = true
local first_suit = context.scoring_hand[1].base.suit
local first_rank = context.scoring_hand[1]:get_id()
for i = 2, #context.scoring_hand do
if context.scoring_hand[i].base.suit ~= first_suit then
all_same_suit = false
end
if context.scoring_hand[i]:get_id() ~= first_rank then
all_same_rank = false
end
if not all_same_suit and not all_same_rank then break end
end
if all_same_suit or all_same_rank then
bonus_active = true
ret.xchips = card.ability.extra.xchips
ret.message = localize{type='variable', key='a_xchips', vars={card.ability.extra.xchips}}
play_sound('tngt_neverforget', 1.1)
card:juice_up(0.5, 0.5)
end
end
if not bonus_active then
card:juice_up(0.2, 0.2)
end
return ret
end
No, move the juice_up and the return in the contect check as well.
ohhh okay
like this?
No, the return goes after everything but stays in the if
If you want to destroy random multiple cards in hand, you can shuffle all cards first and then pick the first N cards to destroy
local cards_in_hand = copy_table(G.hand.cards)
pseudoshuffle(cards_in_hand)
SMODS.destroy_cards({
cards_in_hand[1],
cards_in_hand[2]
})
No.
You cannot do copy_table on a table of cards.
oh you can't?
Yes, the game will hard crash.
Right, then shuffle a table of index would be enough
is that because cards contain references to their area which contain references to themselves or something else
you can usually just press the button on the right of the repo to create a new release if there are none
in github desktop?
Yes.
interesting to know
do you have a github repo running right now
not like i would ever try and copy a cardarea beucase but interesting to knowq
Here's how to choose multiple cards in hand to destroy
local chosen = {}
for i = 1, #G.hand.cards do
table.insert(chosen, i)
end
pseudoshuffle(chosen)
SMODS.destroy_cards({
G.hand.cards[chosen[1]],
G.hand.cards[chosen[2]]
})
You can SMODS.shallow_copy them though I think.
hold on im relogging
like this?
What
What Bro
?
D:
have you made a commit yet
Nxkoo you will die after you publish my mod for me
wait not yet
like. an inital commit
that could almost work except the amount of cards is constantly changing depending on the hand played
in the repo go setting > General > Danger Zone > Change repository visibility
should be good
got it thank you
Ah, then you can add a loop to destroy cards after the shuffle like this
-- set your number of cards to destroy here
local to_destroy = {}
for i = 1, number_of_cards do
table.insert(to_destroy, G.hand.cards[chosen[i]])
end
SMODS.destroy_cards(to_destroy)
sorry, I should be a little more specific, I want to destroy a card for every card in the scored hand that is not a 6, I could count the amount of cards that are not 6 then do that but it seems a little messy
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() ~= 6 then
destroy_cards
end
end
Ah then it's gonna get messy the other way. You'll want to filter for non-destroyed cards before choosing the random card to destroy
Change context.individual to context.destroy_card and destroy_cards to return {remove = true}
And context.other_card to context.destroy_card
Heres how to destroy a random card in hand for that
local not_destroyed = {}
for _, card in pairs
(G.hand.cards) do
if not card.destroyed then
table.insert(not_destroyed, card)
end
end
destroycard = pseudorandom_element(not_destroyed)
SMODS.destroy_cards(destroycard)
He want to destroy a random card held in hand for each not 6 in scored hand, not destroy a random card in scored hand
great, exactly what I want, ty
Yes, it still wouldn't work.
wdym, why wouldn't it work 😭
Because you have to do it at context.destroy_card
Or the game will break.
Attempting to use this consumable crashes the game with this log, please help
Yes, SMODS.poll_enhancement takes a table as input.
What
no you don't, there's literally a smods function for destroying cards, iirc even the game destroys cards out side of that context
That doesn't help.
Yes, you do, you can't destroy cards during scoring without using context.destroy_card.
Still doesn't help.
SMODS.poll_enhancement({guaranteed = true})
I am so tired rn.
Where in here was I supposed to know that it takes a table?
iirc, I only see the ghost card problem when destroying card during scoring without that destroy_card context
But only for played cards, not cards in hand
I feel like they should put that in brackets
looking to make two jokers with the effects "5s can be played as any suit" (i.e. making all 5s functionally equivalent to wild cards) and "10s can be played as any face card of the same suit", and i have no idea where to even start with implementing those effects
any suggestions?
how do you add more than one person in the author json
"author": [
"1",
"2",
]
``` I think.
Everytime I keep doing this I get "bad argument #1 to insert"
function playEffect(effect,posx,posy)
if effect == "explosion" then
neweffect =
{
name = "explosion",
duration = 100,
frame = 1,
maxframe = 17,
fps = 20,
tfps = 0, -- ticks per frame per second
xpos = posx,
ypos = posy,
xvel = 0,
yvel = 0,
}
end
table.insert(G.effectmanager,{neweffect})
end
Is G.effectmanager a table?
Ngl I'm "borrowing" this from Yahimod so-
@unborn bay how do you randomize a sound
randomize how
one of their voucher has this ability
where it overrides everything in text
with ZZZZ
and plays randomized sounds
You mean when something tries to play a sound it plays a random other sound?
yesx
You would hook play_sound
make sure this is in a file titled imrocksolidrnouuugh.lua or it won't work
(kidding)
soon
and then
You would change sound_code to be a random key from SMODS.Sound.obj_buffer I think.
local oldplaysound = play_sound
function play_sound(sound_code, per, vol)
if conditions then sound_code = pseudorandom_element(SMODS.Sound.obj_buffer, "seed") end
return oldplaysound(sound_code, per, vol)
end
thanks dude
What does it say after that?
Does it say table expected, got nil?
Yeah
Have you defined G.effectmanager yet?
Smth like this?
if G.effectmanager then
for i = 1, #G.effectmanager do
local _xscale = love.graphics.getWidth()/1920
local _yscale = love.graphics.getHeight()/1080
if G.effectmanager[i] ~= nil then
if G.effectmanager[i][1].name == "explosion" then
if nic.imageexplosion == nil then nic.imageexplosion = loadThatFuckingImage("explosiongif.png") end
if nic.imageexplosionsprite == nil then nic.imageexplosionsprite = loadThatFuckingImageSpritesheet("explosiongif.png",200,282,17,0) end
imagetodraw = nic.imageexplosion
quadtodraw = nic.imageexplosionsprite
_imgindex = G.effectmanager[i][1].frame
_xpos = G.effectmanager[i][1].xpos-(200/2)
_ypos = G.effectmanager[i][1].ypos-(282/2)
love.graphics.setColor(1, 1, 1, 1)
end
love.graphics.draw(imagetodraw, quadtodraw[_imgindex], _xpos, _ypos, 0 ,_xscale,_yscale)
end
end
end
No, because since G.effectmanager doesn't exist, it doesn't do anything.
G.effectmanager = {}
Is that it
how do you mess with the text in the UI
is there a fix to this? it only happens when the context.retrigger_joker_check is uncommented
Yes.
please enlighten me 🙏
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card
Now this is saying attempt to index global 'nic' (a nil value)
function loadThatFuckingImage(fn)
local full_path = (nic.path
.. "customimages/" .. fn)
local file_data = assert(NFS.newFileData(full_path),("Epic fail"))
local tempimagedata = assert(love.image.newImageData(file_data),("Epic fail 2"))
--print ("LTFNI: Successfully loaded " .. fn)
return (assert(love.graphics.newImage(tempimagedata),("Epic fail 3")))
end
Then I thought of doing nic = {} but then it says attempt to concatenate field "path" (a nil value)
Curse Yahimod
Just want funny gif on my things
is there anything wrong with this? the crash log says i have to close the SMODS.Joker{ in line 575 (the last end,)
name = "1-UP",
key = "1up",
config = {
extra = {
}
},
loc_text = {
['name'] = "1-UP",
['text'] = {
"{C:green}Extra life{}"
}
},
pos = {
x = 0,
y = 2
},
soul_pos = {
x = 1,
y = 2
},
cost = 20,
rarity = 4,
blueprint_compat = false,
eternal_compat = false,
unlocked = true,
discovered = false,
atlas = 'CustomJokers',
calculate = function(self, card, context)
if context.end_of_round and context.game_over and context.main_eval then
G.E_MANAGER:add_event(Event({
func = function()
G.hand_text_area.blind_chips:juice_up()
G.hand_text_area.game_chips:juice_up()
play_sound('tarot1')
card:start_dissolve()
return true
end
}))
return {
message = localize('k_saved_ex'),
saved = 'ph_1_up',
colour = G.C.RED
}
end
end
end,
}
}```
isn't there one too many }
there's two at the end
there's also one too many end's
SMODS.Joker { --1UP
name = "1-UP",
key = "1up",
config = {
extra = {
}
},
loc_text = {
['name'] = "1-UP",
['text'] = {
"{C:green}Extra life{}"
}
},
pos = {
x = 0,
y = 2
},
soul_pos = {
x = 1,
y = 2
},
cost = 20,
rarity = 4,
blueprint_compat = false,
eternal_compat = false,
unlocked = true,
discovered = false,
atlas = 'CustomJokers',
calculate = function(self, card, context)
if context.end_of_round and context.game_over and context.main_eval then
G.E_MANAGER:add_event(Event({
func = function()
G.hand_text_area.blind_chips:juice_up()
G.hand_text_area.game_chips:juice_up()
play_sound('tarot1')
card:start_dissolve()
return true
end
}))
return {
message = localize('k_saved_ex'),
saved = 'ph_1_up',
colour = G.C.RED
}
end
end,
}
I fixed the syntax errors.
And I also formatted it.
how do you do that?
Right Click > Format Document
Is there a way to have multi color mod bages?
Yes, it's loc_txt not loc_text
Like a gradient?
can I put it into badge_colour tho?
Yes.
i think he means JSON
yea
wont it sheet itself if I start to put code in the .json file (idk how .json works)
so I need to put the badge_colour thing in the main mod file?
or it just doesnt work at all
is there a context when entering shop? and if so what is it?
nvm i can just use end of round
BlindStation.Blind {
pos = { y = 0 },
boss_colour = HEX('ed1b24'),
boss = { min = 2 },
config = {
extra = {
change_suit_type = false,
suit_type = nil
}
},
set_blind = function(self) -- Reset potentially changed Blind settings
self.config.extra.change_suit_type = false
self.config.extra.suit_type = nil
end,
debuff_hand = function(self, cards, hand, handname, check)
local playing_suit_type = nil
for _, card in ipairs(cards) do
if not SMODS.has_no_suit(card) then
if card:is_suit('Clubs') or card:is_suit('Diamonds') then
if self.config.extra.suit_type == 'dark' or playing_suit_type == 'dark' then
return true
end
playing_suit_type = 'light'
elseif card:is_suit('Hearts') or card:is_suit('Spades') then
if self.config.extra.suit_type == 'light' or playing_suit_type == 'light' then
return true
end
playing_suit_type = 'dark'
end
end
end
return false
end,
press_play = function(self)
if not G.hand or not G.hand.highlighted or #G.hand.highlighted == 0 or
self.config.extra.suit_type ~= nil then
return
end
for _, card in ipairs(G.hand.highlighted) do
if not SMODS.has_no_suit(card) then
-- Select matching suit type, will be changed after draw
if card:is_suit('Clubs') or card:is_suit('Diamonds') then
sendDebugMessage('First hand of Blind uses light suits', 'BlindStation')
self.config.extra.suit_type = 'light'
self.config.extra.change_suit_type = true
return
elseif card:is_suit('Hearts') or card:is_suit('Spades') then
sendDebugMessage('First hand of Blind uses dark suits', 'BlindStation')
self.config.extra.suit_type = 'dark'
self.config.extra.change_suit_type = true
return
end
end
end
end,
drawn_to_hand = function(self, cards, poker_hands, text, mult, hand_chips)
-- TODO: Fix suit type not always switching after playing a hand
if self.config.extra.change_suit_type then
-- Switching allowed suit type
if self.config.extra.suit_type == 'light' then
self.config.extra.suit_type = 'dark'
elseif self.config.extra.suit_type == 'dark' then
self.config.extra.suit_type = 'light'
end
self.config.extra.change_suit_type = false
end
end
}
I'm having trouble with coding a Blind that records something about the state of the most recently played hand and remembers it
If I change the state immediately, the debuff_hand function triggers and the player can never score anything
This is my current solution, but it doesn't always flip flop, like drawn_to_hand isn't being fired every time
Any ideas on how this can be fixed?
is there a way to check another joker's rarity? (not like the baseball card but rather using G.jokers)
Decided to just use badge_text_colour as the 2nd color
whats the difference between in pairs and in ipairs
ahem
<@&1133519078540185692>
what happened
bot
owh
should i use SMODS.pseudorandom_probability in the release version of my mod or should wait for it to be in a stable version of SMODS
depends, are you releasing in the next couple of days?
I would not release your mod with a dependency on smods dev versions
people will get confused on the smods version
bump
i really want to do the same kind of credits display that cryptid has, where it shows "Cryptid", then it shows who did the code, art etc and just cycles through that
ive been going through cryptid's source code, and all i found is a table in the jokers called cry_credits with tables containing the names of people who did code, art etc. but cant find where and how this table is actually being worked with
anyone has any idea on how to do the credits like that
just use what baseball card uses but in a G.jokers.cards loop
what do i have to change about this code for it to only apply to scored cards? right now it also counts cards held in hand
if context.individual and not context.blueprint and not context.other_card.debuff and
context.other_card:is_suit(card.ability.extra.suit) then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT
}
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
}```
add context.cardarea == G.play to the check at the beginning
ohh okay
i will but please dont tag me for troubleshooting
soryy
when is this? do you know what code caused it?
n can only do so much in your pitiful life
this happened when i added the title screen card thing
i removed it and it still happened
does it happen without your mod
hold
Good schmorning chat
hi diwwy
it doesnt
Hello N my bestie westie
oh do you add a clicked card context
oh yeah
make it so it only triggers in game
where did you make the context
if G.jokers then
SMODS.calculate.........
end
i wrap all of the local inside of the G.jokers?
just that line
oh okay
local click_ref = Card.click
function Card:click()
local ret = click_ref(self)
if G.jokers then
SMODS.calculate_context { clicked_card = self }
end
end
should be good?
yes
how do I find the position of the currently scoring card? (so 1-5)
loop through context.scoring_hand until you find the card
I wan't my joker to get "mult_per_potato" additional "current_mult" every time I select a blind. And then apply "current_mult" at the end of the hand.
calcualte = function (self, context)
G.E_MANAGER:add_event(Event({
mult = self.ability.current_mult
}))
if context.end_of_round and context.main_eval then
G.E_MANAGER:add_event(Event({
func = function()
self.ability.rounds = self.ability.rounds + 1
self.ability.current_mult = self.ability.mult_per_potato * self.ability.rounds
end
}))
return {
message = localize('p_potato_more'),
colour = G.C.P.GREEN
}
end
This is what I have currently. It does not work
calculate not calcualte
aa
also
calculate = function(self, card, context)
oh
But otherwise it is good?
what's
G.E_MANAGER:add_event(Event({
mult = self.ability.current_mult
}))
It is to apply mult that hand. I'm sure it is incorrect I just didn't know what to do.
thanks
im making a new enhancement right
can i then do the atlas = (even though the other enhancements dont have that) referring to a different spritesheet?
instead of the default Enhancers.png
yes
refer to the SMODS docs
how could i put a space between the text and button elements? is there a padding config?
Weitd that padding also works like gap
im padding it
how could i anchor the Art, ideas.. text to the bottom of the tab, i tried using align: 'bm' yet that didnt seem to work
I have no clue why my audio file isn't loading and crashing the game
play sound is a function
oh
It crasheds (at the right time though) and says it i can't parse ablity since it is a nil value
could someone assist me with making a new enhancement?
i wanna make an enhancement that when scored the card gains +1 mult, but i have no idea how to do it
Try the wiki: https://github.com/Steamodded/smods/wiki/
my stupid ass was wondering why my game wasnt launching and realized i had clicked into the lovely console and hitting enter made everything work again after like 10 minutes of sitting here
do i put my custom sounds in "assets/sounds/honk.ogg" or resources/sounds/honk.ogg"??????
assets
Ok but now it says extra is a nil value
how do you replace the music playing
when you bought a joker
or have the joker that changes it
did you restart the run
I created a new run
it crashes in collections/jokers screen
but only while on the page with the joker
I'm trying to get the custom sound to load but i keep getting crashes
do you have an SMODS.Sound
what's the joker code
SMODS.Joker {
key = 'you',
loc_txt = {
name = '{f:tngt_DETERMINATION}You{}',
text = {
"{f:tngt_DETERMINATION,}* Despite everything, it's still you.{}"
}
},
config = { extra = {} },
rarity = "4TH WALL",
atlas = 'ModdedVanilla3',
pos = { x = 0, y = 1 },
soul_pos = { x = 4, y = 1 },
cost = 20,
unlocked = true,
discovered = true,
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS.e_negative
end,
calculate = function(self, card, context)
if context.ending_shop then
G.E_MANAGER:add_event(Event({
func = function()
local card = copy_card(pseudorandom_element(G.consumeables.cards, pseudoseed('perkeo2')), nil)
card:set_edition('e_negative', true)
card:add_to_deck()
G.consumeables:emplace(card)
return true
end
}))
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil,
{ message = localize('k_duplicated_ex') })
end
end
}
ignore the calculation
havent edited it yet
modprefix_key for rarity
thats odd
does it still accept space?
tngt_4TH WALL
i think so
its a string anyways, should be
it works now
but it says error
smods.rarity requires loc_txt?
yes
fuck
i can look up the answer in the smods docs if you want
MY BAD
does this actually store xmult and unleash it?
if context.individual and context.cardarea == G.play then
card.ability.extra.cards_played = card.ability.extra.cards_played + 1
card.ability.extra.stockpile = card.ability.extra.stockpile * 2
local total_xmult = card.ability.extra.stockpile * card.ability.extra.xmult
if card.ability.extra.cards_played == #context.scoring_hand then
card:juice_up(0.5, 0.5)
play_sound('holo1', 1, 0.5)
return {
xmult = total_xmult,
message = "X" .. total_xmult .. "!",
colour = G.C.MULT,
card = card
colour, message and card are unnecessary
and it seems like card.ability.extra.cards_played can go above 5 very easily (which, i hope you have it reset somewhere)
key = 'sillyboosternormal',
loc_txt = {
name = 'Silly Booster',
text = {
'Choose 1 of up to 2 Silly Joker cards!'
group_name = 'Very silly indeed...'
}
},
atlas = 'sillybooster1',
pos = {x = 0, y = 0},
weight = 1,
cost = 3,
pools = ['sillyjokers']
}
``` it appears i have a couple of errors here, is anybody able to indentify them?
group_name goes outside of text
pools seems wrong altogether
other than that you're missing a create_card function
you guys ever be testing something and then realize you are flat out testing it incorrectly for the last half an hour
no
alright ill just stab myself then
✋
im getting there
i was trying to fix my shit ass spectral that sets your most played hand to level 1 and your second most played hand gets half of those levels
but i was not once levelling up the hand to see why the levels were not updating and then discovered my stupid ass was looking at the number that just says how amny times youve played the hand instead of actually looking at the level
cause it was crashing people not on talisman and i was tryna fix that but its fixed now
so how does pools work
no no dont do that
also finally swapping to smods smart level up yippee
No
it adds a booster to the pool, not the other way around
that's your issue
It resets when all cards finish registering
alright
i see, whats going on then?
Whenever it registers a card, it should store xmult
And it does
But what it doesn’t do is unleash it
by unleash do you mean making the card give xmult or something
what
The final card yeah
oh is if card.ability.extra.cards_played == #context.scoring_hand then for checking if the card is the last scored card??
I think it's easier if you tell me what you think pools do
Is there a way to use SMODS.Gradient on badge_colour?
i create a pool with cards in them, and if i give a booster pack the pool, it will pick from the cards in that pool
yeah, that's what I was saying
it adds the booster as a card to the pool, it doesn't make the booster pick from the pool
that's what create_card is for
I thought this was for stockpiling xmult
i understand it now
what
I thought that was how it checks for the final card
im actually stupid
id recommend iterating through context.scoring_hand to check whether the card is the final one instead
because card.ability.extra.cards_played = card.ability.extra.cards_played + 1 will trigger when the card is retriggered too
bepisss
hi dilly
hi
What, so remove cards_played?
For some reason "mult" is nil as early as loc_vars, all the sendInfoMessage triggers but it does not return mult cause "mult" is nil
dont use it, basically
okay so i really need help with this cause im soo lost, ive been trying to make a joker that makes all cards in hand give mult for every different rank to the left and its behaving really weird, anyone can tell what im doing wrong?
did you restart a run before testing
from new run or restart the game
I did the latter and collection also shows it as +nil
new run
local is_last_card = (context.other_card == context.scoring_hand[#context.scoring_hand])
but yeah if the collection doesn't work that's an issue
Replace cards_played with scoring_hand basically
@red flower i think i ironed out all the bugs, let you know if i get anymore
nah use this to check if the card is the last one instead, i figured this is shorter
the description should have #1# instead of #3#
no lua extension alert
key = 'sillyboosternormal',
loc_txt = {
name = 'Silly Booster',
group_name = 'Very silly indeed...',
text = {
'Choose 1 of up to 2 Silly Joker cards!'
}
}
atlas = 'sillybooster1',
pos = {x = 0, y = 0},
weight = 1,
cost = 3
}
line 95 is SMODS.Booster{
okay with new run it works and now collection works too thanks
noted to do a new run instead of continuing
missing a comma before atlas
thanks



