#💻・modding-dev
1 messages · Page 411 of 1
You need to use events also if you want an animation it won't count in scoring.
Axy wrote something for this before, lemme find
how do i check the ante number
how do I use this lol (sorry)
how
G.GAME.round_resets.ante
so i want to make a spectral card that's like soul in that it's rare and can also appear in arcana packs, but i want it to be a tad more common than soul cards.
where do i start with that?
You would modify soul_rate
Also you would patch here I think:
...ohhh right, the consumables page has this kinda stuff...
so hidden is a table parameter of SMODS.Consumable?
No, hidden is a boolean
ok so I just started a new run and it worked
i don't think i need to.
if i'm reading this right, i should just be able to specify the parameters soul_set = 'Tarot' alongside my hidden = true and soul_rate
so if i'm understanding properly, my consumable would look like
SMODS.Consumable({
key = 'myKey',
set = 'Spectral',
atlas = 'myAtlas',
pos = { x = blah, y = blah },
soul_pos = { x = blah, y = blah },
cost = 4,
hidden = true,
soul_set = 'Tarot',
soul_rate = myRateHere
})```
obviously excluding my can_use and use functions
Ok, so how do I remove the revived jokers from the table of destroyed jokers
pseudorandom_element also returns an index so you would remove the entry from that index.
where would I put that
local random_joker, index = pseudorandom_element(G.GAME.destroyed_jokers, pseudoseed("seed"))
local card = SMODS.add_card({key = random_joker.key})
for k, v in pairs(random_joker.ability) do
card.ability[k] = v
end
table.remove(G.GAME.destroyed_jokers, index)
thamnk
calculate = function(self, card, context)
local valid_context = context.cardarea == G.play and context.repetition and not context.repetition_only
if valid_context then
BerryLegendaries.FlipApply(context.other_card, function(i,v)
SMODS.change_base(v, 'Hearts')
end, true)
end
end
That's if you're using that code directly
If not, thennnn
continues typing
calculate = function(self, card, context)
local valid_context = context.cardarea == G.play and context.repetition and not context.repetition_only
if valid_context then
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
context.other_card:flip()
return true
end})
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
SMODS.change_base(context.other_card, 'Hearts')
context.other_card:flip()
return true
end})
end
end
Just try copy-pasting that in place of your calculate function
lmao
Alright, now we can check if other_card exists in the context you want
Or if we access it some other way
?
Looking at this atm
ah
well I'm trying to make it so all played cards are given a random suit
then they're played
the true gambling of joker cards
Oh
That's like, almost exactly what Axy does with one of their Jokers, except it's a random enhancement then
oh lol
great minds think alike ig
my amazing joker art
(yes this is the final one, no I'm not changing it, yes I'm a professional pixel artist)
The one for the relevant Joker
stick 🔥
where could I find the base game backgrounds and other pieces for jokers?
do you have 7Zip or winrar
7zip
open Balatro.exe with it
should be under resources
btw the animated background is a shader
which one?
calculate = function(self, card, context)
local valid_context = context.before
if valid_context then
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
for i,v in ipairs(context.scoring_hand) do
v:flip()
end
return true
end})
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
for i,v in ipairs(context.scoring_hand) do
SMODS.change_base(v, pseudorandom_element({'Clubs', 'Diamonds', 'Hearts', 'Spades'}, pseudoseed('Astral_meow')))
v:juice_up()
end
return true
end})
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
for i,v in ipairs(context.scoring_hand) do
v:flip()
end
return true
end})
end
end
Ah wait, gotta add a random suit
Fortunately, you just need to press the copy button and paste it in the right spot 
if you wanna talk about a wall..
And this is like 30 lines of code, not much
Balatro The Wall reference?!?!?
this is the code for the fishing minigame im working on
oh dear lord


Astral_meow is crazy lmao
for reference this is it currently
Okay, so I'm looking at the smods ownership of Grim, Familiar, and incantation. Is there a way to check for a specific modded suit from the outcome and then reroll before the card is made (I'm trying to bypass an ARGS issue I'm having.
Do we have to play Go Fish for our cards instead of the shop
Spend money to get bait, to get chance of card
lmfao no but thats funny
the idea is tarot = bait, a joker allows you to fish, fish = econ
they flip but they don't change lmao
I'll figure it out
trust
Mmh, maybe the SMODS.change_base function wasn't written right, Axy didn't quite look at the docs
hmmm Go Fish, you say?
how would i have a joker read the suit of a played card
cool footage of functional sticker working as intended
bump
Try SMODS.change_base(v, pseudorandom_element(SMODS.Suits, pseudorandom('Astral_meow'))).key)
(I'm gonna be bumping this for awhile lol)
wdym by this
Would look into it too, but currently helping others, haha
While we're at it, would also like to know how to make a Text object hoverable and clickable
The basic gist is I added a Love2D Sprite object to the main menu and I want to make it clickable
Also obligatory shill this was done using this library I made
https://discord.com/channels/1116389027176787968/1378838298851541022
what is with that syntax?
Uh, is SMODS in your workspace for the IDE you're using
you added an extra ) before .key
oh, oops
lol
would this be in balatro's base code somewhere
a classic blunder
xD
Can someone help me with brainstorm mod
It works
Does it like, make the suits change too
It should work with modded suits this way, if you don't want that we can change that too
I have no clue tbh. I tried digging into how cards are made clickable but that wasn't helpful
Please?
id imagine you could use the code for the object added to the main menu but i have to scour the base game's code to find that

It's perfect thank you so much
downloading?
I never would've figured out the event crap
Actually nvm I got it figured out
fuckkk i have to actually learn how to use pseudorandom
Line 27 should have #context.scoring_hand == card.ability.extra.size, since you need exactly two cards. Then set context.scoring_hand[1]'s suit to context.scoring_hand[0]'s suit, using SMODS.change_base().
when bp is used on this card, it works fine, however the status effect message appears twice over the original card, rather than once on bp and once and on the card. what's happening here?
alright thank you
you need to store the value of context.blueprint_card before launching any events
as by the time your event runs that value will have changed
agh okay, so just save it as a local var?
alright, I'm trying to randomize between a large list of actions to perform at context.end_of_round, how would i do that?
What happens if you put card = context.blueprint_card or card just below colour = HEX("FF98E2") in your code?
that will have the same effect sadly
blueprint_card is nil by the time the event runs
worked perfectly, ty!
np
Ok update: it changes the suit but other jokers aren't effected and still use the old suit :/
i've never used pseudorandom before
Other... jokers?
you want to use context.modify_scoring_hand
Ohhh
I have no idea how to change that so it's a feature not a mistake
context.before is too late to change stuff like that
otherwise you can do context.after to provide more accurate feedback lol
Awh, that's sad then. At least saving in a local variable works.
like these
they use the old suits instead of the random ones
If you can put the list of actions in a table, can use pseudorandom_element to choose between them. You could also randomly choose between a list of integers using that function, then have a giant if, elseif chain that switches between them based on the chosen value.
Oh, didn't think about that. Then yeah, try the other context srockw mentioned
if you do use that context you will probably have to move the changing of suits outside of the event still
but i could be wrong
could i just do something along the lines of "if pseudorandom = 1 then action 1" etc
honestly I might make it turn all cards played into 1 random suit after they're played
am, hi
uhhhhhhm
im interested in learn how to do a mod
bump
:)
man im havin trouble with something simple again
what have you tried
it's simple, i only want to change names of the jokers
the vanilla remade database is not helping cause everything related to changing suits is contained within a massive bracket of stuff i feel i dont need
Store the result of your pseudorandom call once in a local variable, then branch off that later.
i havent tried anything, i dont know the code to put in the loop to check the rank
how do i turn on debug menu in brainstorm mod
how would i do that?
local has_rank
for k, v in ipairs(context.full_hand) do
if v:get_id() == 4 then
has_rank = true
break
end
end
pretty much
the 4 is just whatever rank i want it to be?
it's the id of the rank
so like v:get_id() == 6 would return true if there was a 6 in hand?
that's hwo to check for 6 yeah, where you're checking depends on what you pass to ipairs, here I put context.full_hand which refers to the played hand, including unscoring cards
yeah that is what i want to check luckily
awesome
Use a local variable to store your pseudorandom calls as shown in lines 508 through 509, then use an if statement as shown in lines 514 and lower.
yk using pseudoseed(os.time()) kinda defeats the point of pseudorandom numbers
at that point might as well use math.random
The person requesting it wanted true random, but also wanted stuff like Rigged to work on it. So going through a commonly used function in Balatro would let others hook that function, while still preserving randomness while using DebugPlus or similar.
Elsewhere in the code Axy uses a string for the seed, since that needed to look random, but be deterministic per seed.
Oddities like this are usually because it better matches the card creator's vision, rather than whatever Axy was trying to do for cleanliness.
im trying to use seeded random without rigging working
man im art guy not code guy, who wants to code for me cause i aint gonna get frustrated over this
No one if anyone would ever hook pseudorandom, but yeah
fair enough, although I believe rigged modifies only the probabilities, as modifying the pseudorandom functions will most likely lead to side effects
i'll keep pumpin out art if someone can code it
why pog
Mmh, although Axy has enough on their plate to code and worry about, rather than look into Rigged atm
Although that's a good idea to look into later
Thank you!
Essentially this is what i'm trying to do, for example it would choose between things such as hands, discards, dollars, chips, mult, etc.
but fr tho if anyone wanna work with me on a music mod code wise, let me know
how would one "disable" a card like in the plant?
cant pay cuz im broke but it'd be a guaranteed popular mod a-la balatro goes kino
once again pretty banger arts
thanks
I would probably offer to help if I didn't have a lot on my plate rn
fair
Axy you should get on that
weh 
Ideally i would like to call pseudorandom, change a config value to that number, giving a random number and then for each end_of_round context check for the number in the config
So i know what i want to do from a technical standpoint
I just don't understand how exactly to do it
followup question if i wanted to add a second rank to the loop, would "or" be represented by breaking the loop after returning true in the if (or would that stop it from reading the second if) and would "and" be represented by... not breaking?
There's a bunch of ease_hands or ease_discards functions or similar, that you could use for that. Just need to branch it as described earlier.
you'd do if v:get_id() == 4 or v:get_id() == 5 for example
yeah i don't need help for anything except utilizing pseudorandom
yeah i figured i might as well ask, worst that can happen is silence, best is a nice idea gets done
oh, ok
im guessing i wouldnt do and in the if though considering a card cannot be multiple ranks
exactly
in the most simple sense, i want to simply randomize a value in my config at the end of each round from a set range (for example 1 to 10)
and you want that value to be independent of the run's seed?
no i want it to tie into the run's seed, but not able to be riggable
wouldn't that just be pseudorandom("something", 1, 10) then
Yeh, and calling without both of those parameters would give a random value between 0 and 1
so im guessing it would look more like lua local has_rank = 0 for k, v in ipairs(context.full_hand) do if v:get_id() == 6 then has_rank = has_rank + 1 end if v:get_id() == 9 then has_rank = has_rank + 1 end
so something like this?
if you wanted to count the amount of each yeah that'd work
that pseudorandom call will return an integer between 1 and 10 inclusive iirc, so you need to do something with it
wdym
would i need to run 2 different loops with each adding true respectively if i wanted a joker to make sure that both ranks are present?
no, you'd just make two variables
and increment a different one for each rank
you can shorten it by just having one if statement and if v:get_id() == 6 or v:get_id() == 9 then
like in the local? local has_rank_(one) has_rank_(two)?
well you got your randomized value, you gotta do what you were planning to do with it, "randomize a value in my config" is what you said and i'm not sure what that means exactly
i think they're trying to do smt different on each rank
i want to randomize card.ability.extra.random
local has_rank_one, has_rank_two = false, false
i know how to do the or, im trying to do the and
card.ability.extra.random = pseudorandom("some unique string", 1, 10)
awesome ty!!
if v:get_id() == 6 then
has_rank_one = true
end
if v:get_id() == 9 then
has_rank_two = true
end
smt like that
hi bepis :3
hi brock from pokemon
how do i get the player's settings?
i think theres G.SETTINGS or smt
like whether or not they have pixel art smoothing on or not to be specific
Looks like it's G.SETTINGS.GRAPHICS.texture_scaling which is 2 when smoothing is on
and 1 when it's off
"looks like its", where do you see it?
I just logged G.SETTINGS in the debugplus console
World's best seal
and scrolled thru until i found smt to do with graphics
do you need to end a for statement in a loop?
weird overlay issue
i may have forgotten, ill check my code to see if i did with others
hm
yeah, i do
hm, what'd i do wrong here?
wait
i think i see the issue
random is supposed to be set to a number
which happens in the same context as ease_discards
i think the function just has a different name
ease_discard
not plural
uhm what
it says 3
3
add and context.main_eval to your end_of_round check
it also seems to be temporary
but the hands/discards easing is intended to be permanent
you'd have to modify G.GAME.round_resets.discards i believe
also this question may sound incredibly stupid but would there happen to be some variable that tracks when jokers with certain effects trigger? like jokers that trigger with chips, mult, xmult (xchips partly required but if not possible i might instead be able to just hook the trigger of other jokers (even if i dont entirely know how to do that))
to apply a permanent change
hey this modding thing is pretty easy when you have a lot of documentation
(I've been modding minecraft for 2 years)
should be, you can check ingame by putting eval G.GAME.round_resets in the console
that will print that table
oh that seems useful
i am having a fucking field day with these stupid ass jokers based on your games settings
You can use help in the console for a list of commands, too
I have a custom seal that I'm trying to apply to all played cards but it just crashes?
I can do it with 'Purple' and such but my custom one won't work
id try hooking to SMODS.calculate_effect
i dont see why this wouldn't work, it's printing "3" just fine
Wondering if it needs a mod prefix or similar, not sure how set_seal works
Like, it might want s_modprefix_useless_seal or something
you're increasing the max amount of discards, but not the amount left in the current round
try starting a new round and it should set to that
Prolly Talisman for that error
table vs number
I'll try it
i guess discards aren't big nums
it seems to be in balatro itself though, not my mod
nope :/
Talisman stores numbers as {mantissa, exponent}, while numbers are, well, a number.
ah i see
so i shouldn't to_big the discards
Yeh, lovely patches exist and can make it look like that
try without the s_
what
modprefix_useless_seal
how do
i dont think G.GAME.round_resets.discards was initially a table
whatever is in your mod's metadata as prefix
so you turning it into a table mightve caused some checks in the base code to go wrong
oh-
uh
It worked!
anyone got the hook tutorial in hand
the overall lua hooking tutorial is not entirely helpful when it comes to balatro modding
it... kind of is for me
i might just be an idiot then
im on phone rn so give me a moment
still getting the same crash after removing to_big from G.GAME.round_resets.discards
what does the code look like now
you're still calling to_big on the other value tho
ye
number + bignum = bignum
im looking at the tutorial rn
i hope luajit2 becomes meta eventually so this wont be an issue
local ceref = SMODS.calculate_effect(add the args here)
function SMODS.calculate_effect(add the args here)
local ret = ceref(self, add the args here)
if ret.xmult or ret.x_mult or ret.Xmult then
--xmult?
end
return ret
end
okay, it STILL gives the exact same crash, i dont understand
this is assuming that SMODS.calculate_effect is used when calculate returns smt
if you saved your run after setting discards to a bignum yeah that will keep happening
you will have to manually set it back using the console or start a new run
i do a new run every time i test
Oh
hm
stupider question, what are "the args"
card.ability.extra.mod is being set to a bignum earlier
can you check what the line the crash log is pointing to rq
search smods
go to your vsc, do a search on function SMODS.calculate_effect and check for the args
im not a wizard so i cant remember them off the top of my head :3
that can't be right
u sure ur checking from lovely dumps?
thank you 🪨
ah i am not
also it's gotta be line 96 here
you're setting it to a bignum there
in lovely dumps
yep it's gotta be that first comparison with 0, it's likely the game sets discards_left to round_resets.discards when round ends
so discards_left would end up being a bignum too
how do i fix this
!!!
yeah, what srockw pointed out, card.ability.extra.mod is a table
yes
it shouldnt
it will only cause comparisons with that and a bignum to crash, but as long as you keep that in mind it shouldnt matter
Axy's never used to_big in functions before, despite having Talisman installed. Things just work. Wondering if Axy is somehow doing something wrong, despite the code working anyways.

i can not wait until luajit2 is more popular 😭
it wont crash if no bignums are compared with a normal number
it only really matters when you modify game values directly
if you don't do that then you're safe
aka if its variable stuff in your jokers and such only, then ur good
anyone know what causes this issue when i try to open deck view? it happens regardless of if i have cryptid, entropy or vall-karri enabled
and not all numbers are turned into bignums
who would want more than 1e308 discards i guess
Ahh. Axy tries to use provided functions whenever possible, in case anyone wants to hook them, so modifying game values directly doesn't happen.
true
alright, seems to work now, thanks yall
like so?
on the first line you don't want the arguments, only local ceref = SMODS.calculate_effect
updated smods like i thought it was but it still happens unfortunately
THATS WHAT ARG MEANS???
as for when you call that ref you want to pass the same arguments of the function, aka local ret = ceref(effect, scored_card, from_edition, pre_jokers)
no self needed here
does anyone know where glass card code is stored?
not for recreation purposes this time, im trying to patch
this better?
you can hook to glass card's calculate instead
are you coding in the notes app of your phone or is it just the same screen size and font
a lot of mods uhh take ownership of glass cards, so your patch will turn out to do nothing in certain cases:3
me?
yes
im using google docs on my phone because the actual files are on my steam deck and the built in keyboard on steam deck is... not good lol
😭
i tried coding in notepad when i first started 😭
im getting two conflicting stories here
theres no need for self??
ok fr does anyone know what causes attempt to index field "T" (a nil value) when attempting to view the deck
its not caused by any of the major mods i have enabled and my brain is boiling right now im so damn tired
Depends if you're writing class:function or class.function in the hook
One of them wants a self as a first parameter, the other doesn't
Same functionality, just different syntax
Mmh, it's better to use : for organizational purposes
what's actually the capital T in this case
T would have to be a transform, but dunno which card lost its transform table or how
so a card in my deck has no transform for Literally No Reason! im so tormented!
And like, staring at the crash log doesn't help much, and you'd have to look at the lovely dump and trace the code there to debug
a card with no transform means it's a ghost card????? idk
hello, i just started modding and im using vs code to make the mod. when i type SMODS, its underlined as red. how do i make it so that it knows steamodded syntax?
Add the Steamodded folder to your IDE's workspace
well i think in that case your last parameter is nil which doesn't affect anything
Then it should recognize those values
add Steamodded into the workspace
cus self would be taking the value of effect here
a
as long as you call SMODS.calculate_effect and not SMODS:calculate_effect
using the 2nd one would break a lot of things
i usually hook like this, so yeah :p
the specific line is when it tries to create a new card for copy_card but the new card doesnt have a transform it appears
yeah cus it'd be the same as doing SMODS.calculate_effect(SMODS, effect, etc...)
which doesn't make sense
Mkay, then you need to pass in the right values for copy_card. What does the code for the offending mod look like?
i have absolutely no idea considering the fact that this error is only in common_events line 2561, and disabling all of the major content mods including my own does not fix it
im just gonna disable mods until i find out who's problem it actually is
oh <3
(Also hiiiiii)
hii
sob
Can't really help you trace the code without like, a screenshare or similar. Directing you to the lovely dump would take too long over text. 
im so cooked
i mean it only affects if you CALL the function like that
which i doubt you've done considering you haven't had any issues
is that calculate_consumable
the other issue i had with hooking was that i called all the references hookTo
what the FUCK
which surprisingly didnt collapse inward yet
vine boom
this is smt i did

:3
let me template this out rq
fixed it with the old reliable binary search
it was cartomancer being out of date with recent smods changes and i didnt notice because i literally never use deck view
Oh nvm then thanks
how can i give a newly created card any values?
is there a way to force a game loss?
Ah, nicely done then!
is there a place where i can see all valid C: color modifiers?
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
Axy's code also has this
Rickroll
i mean
Its stated in the code-
rickroll
There should be a globals.lua or something, that stores all the vanilla color modifiers. To see it in game, try inspecting the G.UIT.C table or something? Forgot exactly what it was called.
does the glass card itself trigger a destruction context that I can check for
This is the full list of stuff the Joker does, although it's based off an incrementing trigger count rather than being entirely random.
theres a new context for that added by N'
everything’s coming up me 
uh one sec, lemme check what it was
is checking for certain enhancements v:has_ability? also is glass and lucky cards just m_lucky and m_glass?
(What I- ok)
There's an SMODS.shatters() function in the utils.lua file that could help.
SMODS.has_enhancement
Real and it’s hella nice
Pet Joker
eats (deletes) the rightmost joker each round.
if there is no joker it DIES. and you lose
always eternal
thank you i forgot and needed to double check with someone
context.glass_trigger
dies
I don’t think it’s a context, moreso a card attribute
not sure what to do for the Painted Joker
paint it
oh
now for the second half of the question
It's made with MS paint, hence the name
the rightmost joker every hand or discard
make an overfeeding mechanic like the password game
if theres more than 3 jokers to the right of the cat it also dies
Stacks 4 of itself
how can i add to this new card created any value?
what
Ok, every hand it eats the joker to the right and he gets 1 food point, every round he loses 1 food point. if he ever has more than 2 food points he DIES.
if he dies he kills your run
now get to work
Please do not the cat
like, i wanna do a consumeable that lets you store 1 joker in it (the joker destroys), but when i use the consumeable it gets destroyed so i have to create another one inside the code. How do i make so that newly created consumeable doesn't repeat the same code of use, using a variable or anything?
would this work as intended (check the scoring hand and see if there's cards that are glass or lucky, iterating one each time a card is glass or lucky)
I keep forgetting no stickers 
I had to hold in the laugh
:sadge:

cant you just clear/reset the values after you use it
wdym?
like is the issue that it saves the value of the joker stored despite being another copy
i mean i want it to save it
What is it's name?
fat fuck
how do you get the number of cards played?
can you do #full_hand or something?
Maybe store the key of the joker in a variable when you use the consumable, and only reset it after using if the consumable’s storage includes a joker
ive done this before lemme check but you're missing the context in the #
oh right
wait does it automatically saves whenever i create the new consumeable?
like how square joker checks if you played exactly 4 cards
go to next page and return
double checked its #context.full_hand
You could look at Vanilla Remade in that case, if you know what joker you want to copy
aw man
thanks!
Accidentally munched
I don’t know ✨
oh, true
well it's not at all like square joker, but I'm sure I can glean something from it nonetheless
Makes me having an idea of munched joker-
wait huh
true, i grabbed a bunch of my easier to understand code from vanillaremade
i can drag my card anywhere 😭
Use add_card instead of create_card
bro just started cheating
bro forgot to set the area
You could also just recreate the contents of add_card in your code, but that's up to you really
Bro is on creative mode
Drag it outside the videogame, onto your desktop 
im so mad you adhd trapped me with that bio
Mindwave cool 
make it one of those little desktop buddies
??
the bubble wrap
ok i didnt mean that anywhere
xD
the bubble wrap 
ohhh that's cuz i saw someone with it and i decided to copy it
the thing is that he was a mod of the server
If only I could swipe on my phone without accidentally tapping
bump
The actual parameters into the has_enhancement function might be off, but the idea seems sound enough.
paean
p.a.r.a.m
what parameters are off there

KRIDDLE FINGER LMAO
youre missing card
Which would be v in this case
it’s (card, key)
like this?
im sorry its on google docs😭
thx
can't you uh
change the font to a monospaced one
IM ON MY PHONE
Also you could just use FTP to just, download your code file from your computer and work on it on your phone
Then upload it back
you can change font on phone
YOU CAN ZOOM OUT ON MOBILE VER
is everyone this picky abt text or is it just yall three
it does lmfao
no it's just that you're making it unnecessarily hard for yourself
Coders tend to be picky about their font choices and all that, since we read a lot xP
gulp
this is the easiest for me (my other option is the steam deck built in keyboard)
i know you don't have a ce but google docs still has the ability to make code readable
do i need to manually color my text too for ease of reading for yall
you would cry
You can use three backticks, then the word Lua, then paste your code on a new line, then close with three backticks. That'd give color on Discord.
But also there are code editors for your phone
Could just use those 
god this is the fucking worst lecture ive ever had in my life
xD
pretty sure, never have i been lectured abt something as nothing as my goddamn text preferences
Time for the sequel, choice of syntax highlightingggg
holds up rainbow colored brackets
😱

would you guys hate me if i said i didnt even use vsc on my steam deck for my lua files
Eh... anything works, at the end of the day. As long as you can compile your code and have it run on some machine, all's well
do you use a ce
i use kate
Anyways, gonna actually do schoolwork now
oh yeah that one (never heard of it)
timezoned
built in text editor (variant of Kwrite)
oh
like it came free with my Desktop Mode
it reads code... kind of
i dont get syntax errors or anything and i have to do debugging manually but imo thats probably the least impact using kate has had
YOU HAVE! A CODE EDITOR!
IT CAME FREE WITH YOUR DESKTOP MODE
like this looks okay enough to use for code
does this work in lua?
i yearn to change my kate font as soon as i find out how
what is any of this
concat is x..y
like "+X"... total?
message = "+X"..total
some code to run in if context.before then
fantastic
yes, use loc_vars and put #[number]# in your loc_txt for where you want the variable to go
“Is it possible” shows it being possible /lh
example (I forgot to replace the second #2# with #3# but you get the idea)
lose the run?? damn
Your cat dies, ofc you go with it
seppuku after your pet dies? respectable
oh yeah are you able to do math with card variables inside a loop? (like card.ability.extra.mult = card.ability.extra.mult + (card.ability.extra.mult_gain * [whatever the variable is that's added by the loop]))
begging you to stylize but good job!!
already on it dw
hooray!!!
or would it reset the card variables every time the loop is run
anything I should change before working on the functionality?
The wording
?
When is “Every Round”
Each Blind?
Beginning
World's longest description lol
aikoyori TLDR Joker
?
I have no mult and I must score
what about cg joker smh..
What the hell is that
it mentions jacks 3 times and i missed the 'c' on all of them
I need to make one of those oh my god
WHAT IF I MAKE MINE ACTUALLY FUNCTION
YOU HAVE TO READ THROUGH IT LIKE 8 TIMES PER ROUND JUST FOR THE MULT
HAHAHA
NO EXPLANATION BOXES. NO HELP. PURE SUFFERING.
that's one of mine
I assumed from the name
its too lnog you cant see the mod badge youre missing out on free clout
THERE'S JUST SOME CHINESE CHARACTERS FOR NO REASON HAHAHAHA
i mean now it doesnt fit on the screen does it
do these mean anything btw? i would imagine tehyd be like seeds or smth but then theyd be longer
I need to not look at that so my mind isn't tainted
I need fresh ideas
not ones someone else made
you'll have to accept the fact that you can't be 100% original
have a random number generator give you a number 0-100 and thats how original youre gonna be
lol
why limit yourselves
true -100 to 200
maybe something like this (minus the counter) idk what do you think
decreses
Le yoink(™️)
oh hold on ill just
"Consumes the Joker to the right of this card when a hand is played, gains +1 Food for each Joker consumed. When Blind is selected, eats 1 Food. You lose the run if it runs out of food."
do it anyway 
this is a shitpost mod
respectfully, I'll work on the function first, then the form will come
np ✨
Uhhh
Did you define food in your localization?
What do you want the message to say?
Chomped! or smthn
Then you would just do message = "Chomped!"
I think you overestimate how popular it is 😋
oh, Thanks!
If i wanted to have a deck that made specific vanilla Tarot cards more common, what would need to be in the lovely patch? would it just be:
_pool_size = _pool_size + 1```
in payload?
i'm pretty novice at patches
is there a way to have a planet card level up a hand type by less than one level?
I'm trying to add a voucher that adds +50% planet card effectiveness
Yes.
neat!
well.. i did... something...
I don't think those are vouchers btw
oh shoot good catch thanks
dare i open the buffoon pack
i think i know whats gonna be in there
oh nvm it was jokers
the celestial pack however
And its all "joker" jokers
okay well the first part successfully adds my modded jokers to the joker pool 4x more often, but the second adds justice and tower in every other pool i guess?
"TOWER"
- Everything
trying to create hermit 2.0 is crashing my game. Any ways to fix it?
SMODS.Consumable
oh, it's spelled correctly?
not SMODS.consumeable
someone told me it was spelled consumeable lol
not in that case
maybe where they live
it's spelled that way everywhere else
it should make it so that Tower and Justice show up as vouchers i can show you how
it's still crashing 😔
Tarot not tarot
cheers
Had a Joker idea
Math!
If you solve a random equation (result will be 1-5) and play that many cards, You get a X10 Mult
how do I change the text for a new consumable type?
Show the registering
Maybe "randomly switch the suit of every card you played"
that's what it used to do but it was pointless
oh nvm I'm silly. It's just a loc_txt
what's the point of cards switching suits if when they come back they're switched again anyways
How about, "cards drawn from deck are from the bottom instead of top while having the joker"
fixed lol
Because
Paint
What would that do tho
if anything that ruins combos
there are some cards that see the top card of the deck
now you can't grab it :<
well, all the others do that too so
one joker I added gives all played card a custom seal called "useless" which debuffs the card
So its eternally debuffed unless the seal is replaced?
and the other...
Feels like a challenge run joker
Painted joker
"1 in 2 chance to retrigger each joker card except this or its copies"?
Then be my guest
I mean, look at this thing
I made a joker to double its mult up to 1 trillion anyway
does this scream "balanced"?
You forgot to give the limit
... what limit...?
set the limit randomly each game start-
what limit tho
The food limit ofc
No i mean, set the limit to random-
Since if food < 1 or food > n is a losing
Then put n as randomized number
Just to make it interesting-
and maybe, 1 in x chance to consume 2 food-
I was thinking about that
atm this consumable basically just copies deja vu, but it's crashing my game. Thoughts?
whats the crash message for
idk, it doesn't specify anything in the consumable.lua file, so I don't know what line it's having issues with
Did you define Chineze_Zodiac?
ah, I fucking spelled it wrong in the card instantiation🤦♂️
nice
Trying to get the cards that appear on the startup screen to have a different back from red deck, changing G.GAME.selected_back has just done nothing, is there anywhere else that it would pull the card back from?
card.back is just "selected_back" which is whats confusing me on why changing G.GAME.selected_back does nothing
mainly just checking that im not being an absolute idiot and changing the wrong thing or if theres some other place it checks for the back
although it would probably be a pain to change all of them
i mean the way its making the card is this function repeated 200 times so honestly i could just input that
args = args or {}
local angle = math.random()*2*3.14
local card_size = (args.scale or 1.5)*(math.random() + 1)
local card_pos = args.card_pos or {
x = (18 + card_size)*math.sin(angle),
y = (18 + card_size)*math.cos(angle)
}
local card = Card( card_pos.x + G.ROOM.T.w/2 - G.CARD_W*card_size/2,
card_pos.y + G.ROOM.T.h/2 - G.CARD_H*card_size/2,
card_size*G.CARD_W, card_size*G.CARD_H, pseudorandom_element(G.P_CARDS), G.P_CENTERS.c_base)
if math.random() > 0.8 then card.sprite_facing = 'back'; card.facing = 'back' end
card.no_shadow = true
card.states.hover.can = false
card.states.drag.can = false
card.vortex = true and not args.no_vortex
card.T.r = angle
return card, card_pos
end```
okay even if i put card.back = Back(G.P_CENTERS.b_green) into the code the back still shows as red
when it creates the card you can add {bypass_back = {x=0,y=0}} to change the position in the atlas
as the last argument
what just instead of card.back = ... just put in {bypass_back = {x=0,y=0}}?
oh wait you mean as in local card = Card()
yes
just woke up so took a second to process lol
if card.area and card.area == G.jokers then
local other_joker
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card and G.jokers.cards[i + 1] then
other_joker = G.jokers.cards[i + 1]
end
end
end
return { vars = { (G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
end,
--gotta re-add the function of before
calculate = function(self, card, context)
local other_joker
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card and G.jokers.cards[i + 1] then
other_joker = G.jokers.cards[i + 1]
end
end
if other_joker then
return SMODS.blueprint_effect(card, other_joker, context)
end
if other_joker and pseudorandom('cymbal_dprinter') < G.GAME.probabilities.normal / card.ability.extra.odds then
local blue1 = SMODS.blueprint_effect(card, other_joker, context)
local blue2 = SMODS.blueprint_effect(card, other_joker, context)
-- Combine both effects if they return tables
return {
blue1,
blue2
}
end
end
}```
So i want my code to act like a normal blue print but with a 1/3 chance to retriger twice more but it only half works, for now it only act like a regular blueprint, i tried to use a local effect but it doesn't work, should i replace the local with something else ?
Also should use the prefix of my mod for 'pseudorandom' ? i used with and without but both does nothing so i assume the problem is more about trying to trigger it twice
thank you so much, thats a lifesaver, it works
the seed in pseudorandom doesn't matter as long as it's unique (but even if it isn't it will work)
the problem is that when you return from a function the function ends so it's impossible to reach the second return
and even if it did the second return is formatted wrong
Oh i see, so i should probably instead fuse both ways as a elseif then ?
like, if the 1/3 chance hit it'll trigger 3 times, otherwise only triger it once like a normal blueprint
yeah
Also for the second return being formatted wrong, because of the double usage of the Smods blueprint or something ?
because returning a table of tables does nothing
you need to merge them together using something like this
https://github.com/Steamodded/smods/pull/736/files
ah i see, i should then move out the local blue i made after the calculate to avoid that issue
i think i get it now, thanks,, and for the link too
keep in mind that is not merged into smods so you would need to copy the function as well
Ah okay, gotta add this entire code as well, sure i'll think of this, thanks !
Joker idea
All or nothing
Hands are set to 1 but you get + 5 hand size
1 in 10 chance to "win big" and get $3
or just mirror the burglar-
Guys Im having some trouble with this joker being copied by blueprint specifically
it retriggers each card a number of times equal to its spot in the hand, first card retriggers once, second card retriggers twice etc
Brainstorm does this exact thing when copying it
but Blueprint goes first, doesnt increment the repetitions tally so falls behind by 1 trigger. First card none,second card once, thrid card twice
What if instead of counting manually you just loop over the hand and get the position?
I didnt know that was possible
is there a reason that this method of copying a played card doesn't trigger hologram?
Yes.
or i suppose, is there a better method i should use that would trigger it
playing_card_joker_effects({c1})?
fascinating, thanks!
Because if you play a pair with an unscoring card in the middle, the 3rd one will only retrigger twice.
That was kinda the original intention. I think I was gonna change it to each card retriggers per each card scored before it. So i'd just start the value at -1 but Id still have the blueprint issue
Then the way I said would be way more complicated.
all good
any idea on how to make blueprint behave
My method.
You would just iterate over context.scoring_hand instead.
oh sick
spectral not showing in my mod
i copied my seals code and changed stuff to show spectral but not working
the seals code work
found the issue
solved
As in replace cardarea = g.play or a for loop over the scoring hand to assign each card a # of retriggers
No, it would be something like: ```lua
if context.repetition and context.cardarea == G.play then
for i=1, #context.scoring_hand do
if context.scoring_hand[i] == context.other_card then
return {repetitions = i}
end
end
end
YAYYYYYYYYYYYYYYYYYYYYYYYY IT WORKs
thank you
amen
pogchamp
many thanks
This is a normal way to show appreciation
It's the same as yours, it calls a context
Although you'll need to change the code a bit as mine is set up for when probabilities fail
If you're gonna use it you should probably try and learn how each bit works so you can safely modify it
any booster pack example i can see?
I added something :D
Is card:set_edition() supposed to work when the card already has an edition? It doesn't seem to be working
Yes.
I see
any ideas for making this not completely broken for econ?
oh
i dont think its too bad
most of your income comes from interest or gold jokers anyway
Maybe if handsize <10?
yeah or maybe just a flat addition? kinda just a clone of burglar then
If handsize <6, double it
Else +5?
Also weirdly enough, when i have both burglar and that joker, mine always triggers before burglar regardless of joker order. Is that just how context.setting_blind works or am i missing something
just cause i think intuitively, the player would put burglar first to get +3 and then have the x2 hit, but it just doesn't happen like that
Sorry i meant
If handsize < 6, double the hand
Else, just plus 5 hand
probably event timing
so i wanna add booster packs, is it the same as seals and spectrals?
it is the same as in you need to use SMODS.Booster but the functions are different
function u mean the code for booster like how they work, or u mean the code for adding them?
i'll worry about functionality later, for now how to add them in game
so this is spectral code
change consume type to booster?
and also consumable to booster too?
How would I apply a shader to a joker?
also if you spectrals are just regular spectrals you don't need the ConsumableType bit, that's just adding a new type of consumable also called spectral
see NOW its wordy enough to be a true modded joker
much better
i'll see if it works without it
yep, it worked
now gonna try doing the booster code
What if you used Mr. Bones last round?
you simply must score bones
good catch though I absolutely would've overlooked that
Or jokers that removes/destroys itself/others when its triggered-
maybe just "blind score or previous score whichever is greater" and then treat a bones score like a 0
Nvm me that my head empty
what's the code
looks correct to me
did you restart the run before testing?
it doesn't do anything?
hmm did you try hard coding a 1 instead of using card.ability.extta
whats kind?
i see, so whatever i put wont change much
i see






