#đ»ă»modding-dev
1 messages · Page 256 of 1
probably dumb question but how do you make a planet card only appear after you discover the hidden hand?
if there's ever a mod that gives a shit ton of negative mult this would be so good
i keep getting the error message [SMODS _ \"src/loader.lua\"]:571: [SMODS tribouletions \"thing.lua\"]:96: '}' expected (to close '{' at line 95) near '=' whenever i do this. im currently trying to upgrade the joker's chips and display the "Upgraded!" message after a 1 in 10 chance. any pointers?
probably shouldve added actual code line numbers oops
Move the card.ability.extra.chipsAdded outside the return.
how come the name isnt showing?
['en-us'] = {
['name'] = 'CFBDSIR2419'
}
},```
so i managed to get the chip adding stuff working but the message doesnt appear :T (thank you btw)
wait nvm it just shows the +chips and thats it
realized thats how its supposed to be for other jokers lol
thank you!!
anyone know how to make an event that messes with the probability weight of certain card types appearing in the shop for the rest of the run?
nvm i got it, the GAME script just stores the rates as ints and stuff like the Tarot Merchant voucher just applies a change to that int to the run
im a little confused about the variables being passed into shaders, does texture_coords go from 0 to 1 or from 0 to pixel width/height, or from top left x/y on atlas to bottom right x/y on atlas
@wintry solar If you are not busy, would you be able to help me figure out this issue?
I know that context.discard happens once per card discarded, is there an equivalent for playing the card
Context.individual
ah, thanks
I might be stupid, but I'm trying to add a deck that just gives you one of my jokers so I can test it's functionality, and it just throws an error whenever I click play
The smod modding guide doesn't say anything about a center field, do I need to add it, and if so, what do I put in it?
the key you're passing is incomplete
there's prefixes added to object keys
This is my first mod, I do not know what you mean by incomplete, what do I need to do to make it complete?
in this case the full key looks like j_modprefix_tennisjoker where modprefix is the prefix from your mod's metadata file
Alright, thank you
also you should probably update steamodded and lovely, both of those are a good bit out of date
It works with the mods I play, and when I update a lot of them stop working
then you need to update those mods as well
I really don't recommend developing on an outdated version, any features you see in the docs or elsewhere might not yet be supported on the version you're using
Now it says area is nil even though area is specifically defined
two things there
you should use SMODS.add_card instead of SMODS.create_card or it won't be placed into the jokers area properly
and you need to do it inside of an event, otherwise you're acting before the jokers area is created
What do you think of this mod structure?
something like this
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card({
key = 'j_modprefix_tennisjoker',
})
return true
end
}))
yes you can remove the set and area, set is only needed when generating something random and area defaults to G.jokers anyway
Got it
Good or not so good?
i am trying to comprehend shaders, how is image_details a vec4? i presume the first 2 values are width and height of the atlas, so what are the 3rd and 4th??
wait nvm i may be stupid
its texture_details a vec4
ok why is texture_details a vec4
oh shit the z and w are its position in the atlas
incredibly useful
OUGHGHGHHHGH
I KILLED JIMBO
PROMISING
NOPE
I MEANT THIS
ok now does it work on all jokers
thats the deciding factor
no.
no it does not
game crashes on load, it says unexpected symbol on the 23rd (second here) line
{ hand }```
is there a context for when the played hand is on screen, and after the scoring is done, but before the played cards disappear? (e.g like a context that would activate before stuff like mime works on gold cards)
I've trying to make a config menu for my Gamepad Button Prompt mod. I'm looking into adding a menu portion where you can simply choose between button icons without needing to drag-and-drop specific icon files.
I already got the config.lua portion mostly sorted (in terms of getting the menu to se it), but I haven't gotten the actual config menu to work.
here's a concept image on what I'm trying to achieve right now:
bump
the effect of my card happens before the message pops up
can I delay the effect or have the message appear sooner?
G.GAME.chips is what you've scored, and G.GAME.blind.chips is what the blind requirement is
thank you
note that they're not going to be numbers if you have talisman installed
how does this work?
what would they be then? just curious
the malverk experience
they're tables, because they represent bigger numbers
there's more info on talisman's readme
interesting
if you use an event inside that function it will run after all the messages that are sent in the return, for example
so the timing of whatever you want to run is correct with the scoring steps instead of doing everything before
fuck you (melts your jokers)
anyways I CAN REST!! THE HARD PART IS FINALLY FUCKING DONE
it looks a bit jank on square joker
but quite frankly
i do not
yep, nope, still broken -w-
care
how the fuck did he do this to all of my precious jonklers
which is this line:
for k, v in pairs(G.P_SEALS[_seal].config or {}) do
painful joker fuckery
(sorry, but correction: she)

sorry i didnt get it?
all the scoring contexts run immediately when the hand is played and the returns run inside events so they get played in order
func allows you to put an event at the appropriate place in the queue
thank you kind ghost
ignore the fact that the ability doesn't line up btw, i made the seal first because the code was at hand for creating seals
the error is somthing to do with your localization file i think
ah, i don't have one of those
anyway my one card scoring hand doesnt work and shows high card even though its higher than high card
SMODS.Joker{
key = 'pumpkinmoon',
atlas = 'Jokers',
pos = { x = 3, y = 3 },
cost = 6,
rarity = 2,
blueprint_compat = false,
eternal_compat = true,
unlocked = true,
unlock_card = true,
discovered = true,
config = { extra = { money = 8}},
calculate = function(self, card, context)
if context.cardarea == G.play and context.individual and next(conext.poker_hands['Three of a Kind']) and context.destroy_card then
return{
money = (card.ability.extra.money or 8),
destroy_card = card,
destroying_card = card
}
end
end
}```
I'm getting an error for missing context value, what am I missing here?
conext?
conext
the code for the hand
if G.hand.cards == 1 and G.deck.cards == 0 and G.hand.highlighted == 1 and next(parts._highest) then
return { hand } end```
how would i go about destroying all cards in hand when a joker is sold?
i cant lie, looking at all the stuff about contexts with destroying cards is confusing me LOL
ah i see, is there any example mod or documentation for func?
why does the edition property not have any of the config data?
this is being printed in on_apply
ok so it has it after the fact so it seems i just can't access it during on_apply?
no, it's just a function that gets run after the messages
is there a way around this? i need to randomly set the x_mult using the variables in extra
would this be how you use an if statment?
sweet
you have extra commas too
ah
none of those commas go there
How does one make a joker not trigger in the individual context if the scored card is being retriggered?
Is there docs on info_queue? I want to put an infoqueue on glass card based Joker :)
is this correct
is there any way i can get a jokers original config? i thought G.P_CENTERS would be right but nope, for some reason the values there are also modified?
try info_queue[#info_queue + 1] = G.P_CENTERS.m_glass
like from base game?
essentially as if the joker just spawned in, im trying to revert a certain food joker to its original state but when i use G.P_CENTERS its also already changed
game.lua
has each jokerâs config, but some are in
code format
i should send an example in case you mean something else
here's ice cream
thats in G.P_CENTERS. i literally had used that .-.
so i guess i modified the original index or ive used it wrong, brb
đ
so i did modify the original index. WHAT
im saying cause as far as i knew thatâs where they go
G.P_CENTERS is definetely right, but somehow the way i modify my joker modifies it too
Figured it out by keeping track of triggers in joker_main and individual and then resetting in after
When you're accessing from G.P_CENTERS or G.P_CENTER_POOLS, what's the nesting for the center's basic config values? I'm trying to access the cost of all centers in the game, not just existing cards (as Clearance and Liquidation do to update existing ones)
how would you make it so you earn money if the chips earned is equal to or more than the blind requirement?
is there a context that exists for a start of an ante?
setting_blind? or what do you mean by start of ante?
how to check if a played hand included a certain suit?
and that works with âandâ right
like i can add context.after
Need help diagnosing an issue for some reason when I have the TexturePack object in my code it causes some of the decks descriptions for plasma - erratic decks to not update when you select a new language and only updates when you reload the game and I don't know why, I'm not sure if the issue is due to a mess up in declaring the AltTextures or the TexturePack object itself
I know the issue is coming from this as when I remove the TexturePack object it works fine
i mean, if G.play.cards is still the same in context.after then yes
so
if context.after and v:is_suit(suit) then
would work right?
suit is a variable i have set in the jokerâs config
how do I make something open a random booster pack?
is there a mod or a way i can quickly reload the game without having to close and reopen it each time i change one single line in my mods code lol
is there a way to replace all joker slots in the shop?
there's no hot reload but you can hold M to restart the game I believe
gangster
correct thank you
careful though because if you have your cursor in the IDE it can just type a bunch of m's and it won't reload correctly because of the syntax errors caused by that
mmmmmmmmmmmmmmmm
HA yeah
that just happened in discord đą
how do i pull the edition of a played card again?
context.scored_hand[i].edition?
if context.after then
for i,v in ipairs(G.play.cards) do
--check v here
end
end
how do I stop it from just going to the blind selection screen? https://medal.tv/games/balatro/clips/jW629mInqPc8TyZCP?invite=cr-MSxONGUsMTk5Nzk5MzE1
Watch balator bug and millions of other Balatro videos captured using Medal.
wdym check vâ ohhhh the is_suit right?
yeah
that's supposed to be a condition
ohh ok
I made it shorter
really confused rn
so if v: then ??
Does a structure like this make sense in mods for balatro?
I've just never seen this kind of file splitting before
honestly whatever works best for you. if you do plan on adding a lot of jokers, though, i do recommend not putting each in a separate lua file
whats an easy and quick way to define blueprint features?
like if i have a super simple joker how do i define his blueprint behavior
do you even have 450 unique joker ideas
im at just over 50 and scraping bottom of the barrel
I have a one idea for 450 unique jokers
ok so maybe have a 90.lua 180.lua and a 270.lua
and then put your corresponding jokers into each file
like 90 jokers into 90.lua
etc
like if i have a joker that just adds x2 mult how do i make a blueprint or brainstorm do this?
I'll think about it, it's just that when there's a lot of code in one file, I start to get confused
Just set 'blueprint_compat = true' in the SMODS.Joker
thats it? i thought i have to define my jokers function in code
thatâs a visual thing. as long as you donât tell it not to be, blueprint applies the same effect
Then idk
that seems right, mhm
hi bepis, i sent u a dm bestie
testing time then đ«Ą
This is my jokers
oh but you probably have to do context.after and context.cardarea == G.jokers too
else it will probably trigger more than once
OH TRUE
ok NOW testing time
I am getting a weird issue, anyone knows why card.ability.extra.parity doesn't actually swap around?
if context.end_of_round and context.cardarea == G.jokers then
if card.ability.extra.parity == 1 then card.ability.extra.parity = 0
else card.ability.extra.parity = 1 end
return {
message = localize('k_reset')
}
end```
The "Reset!" message does appear so I know the code is being run
whatâs going on with your equalities
Unraveling it it's just lua if card.ability.extra.parity == 1 then card.ability.extra.parity = 0 else card.ability.extra.parity = 1 end
I tried some fancier stuff before but no dice
you set your parity equal to a number but you didnât use the number equality sign
I also tried removing the == 1 which should've worked but didn't work so I specified as much I could
change it to = 1
???
That would assign it 1 wouldn't it?
isnt single = for assigning value and not checking it
Unless it's some weird lua thing I'm too java brained to understand x)
i JUST saw the if disregard me
understandable
loc_txt = {
name = "Clueless Deck",
text = {
"Start with {C:attention,T:v_tarot_tycoon}Tarot Tycoon{}",
"and 7 {C:negative,T:e_negative}Negative{} copies",
"of {C:tarot,T:c_fool}The Fool{}",
"{C:inactive}at a price...{}",
},
},
The C:negative indicator isn't changing the text color. Anyone know what the color indicator I need for the spooky color changing text is?
understandable
You want either edition or dark_edition
hi guys
oooo thanks
how do i modify how the game does score calculations?
Ooh that's a handy chart, where did you get it?
was about to ask the same thing
Wdym?
Where can i find this?
for example
the game can only go up to e308 before naninf
and also it doesnt work with imaginary numbers
how would imaginary numbers work for scoring?
like
That's mine, as part of the documentation of text styling that I started and might continue with at some point
it would mess up your score
Ok then no clue x) I'd say look up Talisman, maybe there's something there
unless you multiply by imaginary again
until its back to normal number
but with a higher multiplier
that sounds like an interesting mechanic
i know how i will make imaginary number gameplay but idk how to make the calculations
i tried but i dont understand anything there
its a bit hard to read
Oh interesting
i tried studing uni math but dropped out so this is way too big brain for me
found it, dark_edition is what's used for Negative
I'm VERY new to coding balatro mods. What am I doing wrong?
might just be a formatting issue then
Maaaan, and I wanted it to look good x)
that doesnât matter if itâs not gonna work đ
Trying the more verbose one see if it works
i think it might be messing up your end statements
gn
G'night!
SMODS.INIT is a very old thing
Why is it still not working.
if card.ability.extra.parity then
card.ability.extra.parity = 0
else
card.ability.extra.parity = 1
end```
which is why it doesnt exist
Oh, ok. What should I use instead?
I was just looking at a guide lol.
try it like
must be a very outdated guide, theres no replacement since its useless
So how should I initialize my jokers so they appear in game?
you can just put the code in the top level scope
SMODS.Joker
start with the steamodded documentation at https://github.com/Steamodded/smods/wiki

it looks like youre initializing them the 0.9.8 way
so yeah that guide is completely worthless
0.9.8 is long gone
This is literally my code lua if context.end_of_round and context.cardarea == G.jokers then if card.ability.extra.parity == 1 then card.ability.extra.parity = 0 else card.ability.extra.parity = 1 end return { message = localize('k_reset') } end
I see. That's fantastic.
I am checking, yes my config is config = { extra = { parity = 0, chips = 20, mult = 2 }}, so naming is right, the reset message is shown so the code gets run
your end statement isnt lined up with your if
That's just me not copying right, it looks fine in code
may i have an example of how this is used?
Besides Lua doesn't use indents for blocks, that's a python thing
(ignore the for loop, it's for my sequence)
no the
the indents matter
I swear I saw some weird indents in the base code
coding...
oh you meant functionality "matter" no with lua indents just make the code readable
Yeah nah I meant functionally Lua doesn't do anything with indents
yeah
I reassure you my code is properly indented everywhere x)
can i see the full calculate function?
Sure
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if (context.other_card:get_id() <= 10 and
context.other_card:get_id() >= 0 and
context.other_card:get_id()%2 == card.ability.extra.parity)
then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult
}
end
-- I can't be bothered to write it better right now...
if context.other_card:get_id() == 14 and card.ability.extra.parity then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult
}
end
end
if context.end_of_round and context.cardarea == G.jokers then
G.E_MANAGER:add_event(Event({
func = (function()
if card.ability.extra.parity == 1 then
card.ability.extra.parity = 0
else
card.ability.extra.parity = 1
end
return true
end)
}))
return {
message = localize('k_reset')
}
end
end```
It's basically a Joker that's like, a fusion of Even Steven/Odd Todd that changes parity each round
(This didn't work btw)
Did it the correct way as it is now showing 151 in collection, but the atlas won't load despite it being the correct name.
thank you to @hushed field for the help with this last night also i 100% used some of your empress of light polychrome code from way ago so thanks for figuring this out
so thanks lmao
this whole discord server is the best wiki
im not..... ice........
villainous
you did an empress joker a while ago right>
can i see the name of the atlas youre using in the joker, the SMODS.Atlas call youre doing for that joker, and a screenshot of YourMod/assets/1x in file explorer
i did?
best thing i got now is to uhhh run some print checks
you helped @warped marsh with their joker lmao
yes đ
so thank you to both of you lol
Sorry, I was being a little stupid and accidentally put an = after SMODS.Atlas. Sorry.
Oh cool x)
yeah run some print checks and see whatâs going on
Although I did get another error now lol.
happens to the best of us
Now I got this error.
Ok so imagine a reality in which I was stupid and it worked this entire time
And it's just the card description that didn't update properly
Huh
(In my defense it's almost 3am)
Oh toma
iâm gonna eat you alive actually
I forgot to tell you
hi
nvm justified
I changed all my files so it actually looks decent now and like I have it all localisation based now
you made a really cool empress of light joker a while ago that so happened to exactly have the code i was scratching my head trying to figure out how to get
peak đ„č
i was just searching thru the discord and i was like "OH thats how i do it"
mhm! made a joker that has a 1 in 10 chance to turn each played and scored card into a negative playing card
couldnt figure out how to target one specefic playing card at a time
you did the scoring_hand[i] for loop
which was the answer
Oh yeah yeah
so thanks
No worries :)
crashes because of a bad argument to ipairs
I understand that Castle picks a suit from your playing cards, but how does Ancient Joker pick? Does it just pull a random suit from SMODS.Suit?
That Joker took me actual hours to code (originally used for another Joker) Iâve been so proud of the code Iâve recycled it 3 times already
did you look at midas code for it?
Look into my mod and look at wall of flesh
The code is above it
i feel like thats exactly how midas works
also the flipping of your cards to make em fancy is quite cool
Quick question, do the loc_var variables update over time or are they locked to the variables set at the start
Apparently card.ability.extra.parity and "even" or "odd" didn't work, so I just wanna make sure for later
Got the code for enhancing cards yeah, and then just copied and tweaked other peopleâs code for animations
Since you have to do it manually (cringe)
now i gotta make a spectral card that does a few things
Ghost:
- Select up to 3 playing cards
- For each chosen card, add Negative to that card and have a (amount of cards chosen) in 4 chance to lose 1 discard
thats gonna be fun to figure out i think
i wish there were example tarot cards like the example jokers mod somewhere
Isn't that also just pulling from suits you have in your deck?
Pretty sure yeah, I donât have the code right now with me and itâs been a while
if i could see like The Magician in SMODS terms this would be fire
yknow what sure, already used your code already whats more right
ill take a look lemmie check
More specially for specific tarot cards itâs Rotten Girl in MIKU mod
I have an update version of my Terraria mod that Iâll update tomorrow thatâs cleaner and more refined btw
you do that pixel art?
does hanging chad increase the amount of context.scoring_hand
that shits kinda clean with it
For terraria?
mhm
No. Only for my Miku mod
I collared with someone :)
Collabed*
some people can code lol
reworking the base game legendaries and im collabing with someone who turned all the jokers into yandere anime grils
king
bro that last one what
I do digital art so the full art jokers are the easiest xd
Well itâs a hobby
not articically talented!
I study programming, art is my hobby
Because originally I learnt art to make art for my games, got into art instead
I study AI, programming is my hobby đ
oh peak
Ah me too! I do Data science with ai
might need some help
Damn saaaaaame
how do i make a consumable create a joker
Anyways thanks Toma! Even though in the end it was my own fault everything is working properly now :p
except for aces but that's a tomorrow me problem
like judgement?
It should be fairly easy
it's my first time modding
ight i dont understand lua much
if G.jokers.config.card_limit > #G.jokers.cards then
SMODS.add_card{
set = 'Joker',
}
end
end
Look at the judgement code, and you can provide the key of the joker to the create_card function
There is also smods.add_card I suppose
use = function(self, card, area, copier)
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
if G.jokers.config.card_limit > #G.jokers.cards then
play_sound('timpani')
local card_t = {
set = "Joker",
area = G.jokers,
key = "j_rh_lockstep"
}
local new_card = SMODS.create_card(card_t)
new_card:add_to_deck()
G.jokers:emplace(new_card)
card:juice_up(0.3, 0.5)
end
return true
end }))
end```
That's how the base game does it
Look at the j_rh_lockstep string, that's where SMODS defines which joker to spawn
Can someone please tell me why I'm getting this error? I'm very new to modding.
pos = { x = 0, y = 0 }
Oh... welp, I'm a little dumb. Probably should've noticed that looking at the docs.
Thank you
why does hanging chad overide the #context.scoring_hand
if #context.scoring_hand == 1 then
card.ability.extra.count = card.ability.extra.count + 1
end
end
what ability shall this poker joker have
Also, you have a semicolon ; at the end of your config, it should just be a comma 
Look at https://discord.com/channels/1116389027176787968/1350849322408738828 a Joker called Rotten Girl
sharp corner spotted
but for an ability
maybe mult become chips and chips become mult
i will try to figure that out
Wow, I am in love with this card
Anyone super great with Lua? I feel like surely there must be a more efficient way to do this, but I don't know if lua is just really limited. Many languages let you use
foreach (var x in collection) to spin out an easy enumeration of an array
In Lua this was the best way I could come up with to build an array of cards that aren't scored
for i = 1, #context.full_hand do
local thisCard = context.full_hand[i]
if has_value(context.scoring_hand, thisCard) then
sendInfoMessage("card " .. thisCard:get_id() .. " was played and scored", self.key)
else
sendInfoMessage("card " .. thisCard:get_id() .. " was played but not scored", self.key)
local cardINdex = #unscoredCards + 1
unscoredCards[cardINdex] = thisCard
end
end
sendInfoMessage("count of unscored cards " .. #unscoredCards, self.key)
for i = 1, #unscoredCards do
local thisUnscoredCard = unscoredCards[i]
sendInfoMessage("confirming would be modifying card " .. thisUnscoredCard:get_id(), self.key)
--to do decrease this card
end
if v.var then
rest of code`
``` this right?
k is i and v is all the elements in the collection
k is the index (starting from 1), v is the value at that index in the collection
so yep
yippe i know my stuff
i was hoping there might be some 'syntax sugar', but I guess not
Your code seems pretty good here
Like itâs only super minor things I think could be changed
Why the heck doesn't lua have a continue?!?!?! I read the Lua authors statement on it and they said it would cause confusion with variable scopes, but to me it is very intuitive
Wait Fox can you try something for me?
Thank you, it felt so verbose! But thanks
How would I go about referencing a joker to the left of the current joker?
:131: attempt to perform arithmetic on field 'felt_discards' [a nil value]
attempted to copy yorick's homework, but what confuses me is that yorick's variable for how many discards are left uses self.ability.yorick_discards, when normally don't variables like this use self.ability.extra.[...]?
local scoringSet = {}
for _, card in ipairs(context.scoring_hand) do
scoringSet[card] = true
end
local unscoredCards = {}
for _, thisCard in ipairs(context.full_hand) do
if scoringSet[thisCard] then
sendInfoMessage("card " .. thisCard:get_id() .. " was played and scored", self.key)
else
sendInfoMessage("card " .. thisCard:get_id() .. " was played but not scored", self.key)
table.insert(unscoredCards, thisCard)
end
end
sendInfoMessage("count of unscored cards " .. #unscoredCards, self.key)
for _, thisUnscoredCard in ipairs(unscoredCards) do
sendInfoMessage("confirming would be modifying card " .. thisUnscoredCard:get_id(), self.key)
end ```
me too, it is like i am working in an ancient language suddenly. Also to see the % sign used for modulo really shocked me! I am used to that being foreach
also wanted to ask where variables are stored too
what are felt_discards
hey misen you use the card flip animation right? how do i make it only trigger once
the amount of discards that are needed to increment the mult
Can you please send me the code here? I donât have it with me (a screenshot is fine)
yes of course
heres how yorick increments
how doth one send a message to the playing card and the joker
i assume card_eval_status_text
Uhh.... I'm having a very strange circumstance where modded jokers correctly have their atlas stored on card.config.center.atlas, but vanilla cards don't?
for context i have it do the animation after a scoring hand, but it does the animation for each scoring card
That does work, but I don't understand this ipairs(context.scoring_hand) syntax.
I really like that this syntax assigns the variable directly, it removes the need to assign a local thisCard = cards[i] which is fantastic! @warped marsh Thanks đ
nil value: your trying to reference something on line 18 that doesnt exist
check there first
is this in the base games code?
mhm
wdym
Wait sorry what?
the base game code is so hard to scout through sometimes đ
ctrl f my friend
they gotta make a ctrl f for all the luas man
like
the code for midas is not in the same file as yorick etc
stuff like thagt
is every ability not in card.lua?
the joker does the flip animation after a scoring hand, which is correct. however, it repeats the animation for each card that was scored, which i do NOT want. how do i make it so the animation only plays ONCE
actually effect the score
In VS Code you can search an entire workspace and in Github you can search the whole repo
remove the delay so it flips all cards at the same time?
yeah like i cant find where yorick applies its own xmult or where it stores any of its variables
like. where is the 23 discards
the joker is the one flipping
OH so
Yeah this is really bizarre to me. This log shows that the center for the jokers are valid (both modded and vanilla), but trying to access config.center.atlas on the vanilla joker is nil??????
sendDebugMessage('atlas: '..tostring(rand_joker.config.center.atlas))```
that joker is flipping for every single card?
thats
actually really funny lol
it is
You based it on my code right?
If i remember correctly removing the bottom third should do it
are you flipping the joker inside the for loop?
Because the first part flips it
obvs question i know but
iâll check
if theres a for loop shawty gonna flip a bunch
Ah okay, thanks
mistakes were made HOWEVER IT WONT DO IT UNDER PROPER CONTEXT OTHERWISE
LMFAO
was that it đ
Because how the code works Toma is that the card flips and it changes suits (in you are king for example) and then it flips again, but it goes by so fast it looks somewhat natural
OH so yorick.discards isnt even stored in the extras table okokok
who else up developing they mods
Oh my god I figured it out
everyone bro
real
oh so flipping once is a full 360
real
Yes pretty sure
use ```if context.discard then
var = var + 1
if var == required val then
Xmult = xmult + x
end
end
Get rid of the last bit of code and see how it reacts
And shorten delay maybe?
The delay is there so you can see the cards turn into whatever
thanks for the help but why is it doing that
Adding delay like most people donât play on x8 or x16 
there is nothing there for line 18
i need to see your code tbh
like the error statement isnt gonna say much unfort
making a joker that has a chance to give Xmult
how would i add the chance
here i gotcha
Look at Michel in Steammodded Mod examples
Also gonna bump this since I wanna figure out how to do this
why are cards just... not being destroyed? am i using context.destroy_card incorrectly?
If anyone wants a joker to pick a random suit like Ancient Joker and not from your deck pool like Castle, you can do something like this:
function SMODS.current_mod.reset_game_globals(run_start)
G.GAME.current_round.traffic_card = { suit = 'Spades' }
local valid_traffic_cards = {'Spades', 'Clubs', 'Diamonds'}
if valid_traffic_cards[1] then
local traffic_card = pseudorandom_element(valid_traffic_cards, pseudoseed('traf' .. G.GAME.round_resets.ante))
G.GAME.current_round.traffic_card.suit = traffic_card
end
end
I removed the loop that gathers all the suits in your deck and indexed the table valid_traffic_cards with the suits I wanted
iâll get back to you if it works
I might be eeping but okay
welp im very new to lua and dont understand how to get to the raw code for that
usually I do SMODS.Suits to accomodate for modded suits
You store destroy in a local array. Each pass deleted the contents, so the context.destroy will always have an empty table!
bascially set up a config to have your chance not be hardcoded
then that if function is the most important part so you joker can work with things like Oops all 6 etc
@rancid bridge
oh, you're right lol! so no need to delete the contents of the array then?
misen
now its just flipped over lol
You're also taking a lot of steps you don't wanna take! You don't want to call dissolve on playing cards yourself. That's luckily what the destroy context is already going to be doing for you
oh awesome, thanks lol. i probably would have realized that sooner if i managed to even get the actual destruction working lol
QHAHAH
hey was looking for you actually
how do i stop a spectral or tarot card that assigns editions to a card from being used if i select more than the amount of cards it can modify?
Hmmm OKAY HEAR ME OUT
like change 3 cards to clubs wont work if i have 5 chosen
how do i get it to do it outside of the for loop then đ
HESR ME OUT
OK
HOLY
Hmm okay I figured out the weird atlas issue but im annoyed by it
WEE LOVE LOOPS
Check out this legendary card I added. If you play a high card for your first hand, but play multiple cards, it will decrease the rank of the other cards!
It also will eat played 2's and increase mult. I am not sure why other than I like the idea of kirby eating cards
yeah I don't know what that is about, sorry
So, the effect destroys all cards that match the dark idol's current rank/suit combo? You can fully remove the context.after you have there! As well as the looping you do in context.destroy_card. I recommend just marking the card you want to be destroyed with a custom bool, and checking for that bool in the destroy context.
Thatâs cool though
ok but itâs repeating because of the for loop đ
the humble common legendary
alright
i... totally understand all this..
Can you send me the code in a file please, and let me tinker
okidoke
You shouldn't have to, it's part of the core set up of a consumable of that type to have a selection limit
the very last thing I am going to do before release is to fix rarities, I promise
im gonna cream thank you john smods for making SMODS actually peak
thank you
true
This chat is overwhelming
Also lucky you found me because it's 4 am for me haha
how would you do a custom bool to mark a card? would i add something to the joker itself then or what?
also yup, you're right about the effect
@rancid bridge check ya dms king
bro it was 4 am for me last night when we were talking đ
it gains .5x permanent mult for a random card in the deck every round, then destroys it
Let me grab one of my jokers and show ya! I'm going to bed soon and I'm on my phone so it's a little bit harder to explain haha
all good, i appreciate you helping me out with this lol
Nobody has responded to me asking a question ;~;
If I donât respond to a question is because Iâm clueless
My question keeps getting lost in the sauce
https://github.com/icyethics/Kino/blob/main/items/Jokers/fight_club.lua
You can ignore everything but the calculate function, but this joker picks a random card to destroy, and it does that by setting an arbitrary boolean on the other_card. The naming is entirely unimportant!
Very similar to my Indiana Jones legendary joker, haha, so I have to like the concept
i can't take credit here unfortunately, i'm just on programming duty lol. we're over at #1335221042204901396 if you wanna check it out, lord of the deep dawn does great joker art/concepts
Does anyone know offhand how to add an entry to never mind, found itinfo_queue for e_negative applied to a consumable?
oeugh
ohh, okay! i didn't think you could give variables to cards that easy lol, thanks
to the dms
See I just want other folks to come up with cool ideas and then me get to program then
You iterate over G.jokers.cards, to find your current joker's position. Then you save that position. That position -1 in the G.jokerd.cards array is the joker to the left of it
i did that for a while as well lol
They don't get saved, iirc, but that doesn't matter for this purpose!
in case you're curious:
info_queue[#info_queue + 1] = {key = 'e_negative_consumable', set = 'Edition', config = {extra = 1}}
Do I just do a for loop and break when it hits the current joker?
I have 200 more joker concepts for Kink I wanna set up, if you're looking for busy work đ and like 3 enhancement types, haha
Save the index, then you can break, yeah
ooh throw me a enhancement type and I'll try it to learn how to do enhancement
I wrote a bunch of editions and fell into the weirdness of shaders, never did enhancements
let me finish my mod before I sign up, but I really like doing this đ
for what
Look kino isn't a dutch word and kink is, so my autocorrect is gonna mess it up okay
i also have 200 + kinks
inb4 I see jokers based on Rule34 tags
yknow what i gotcha
hmm really?
ill make one right after this specral card
i was gonna make one anyway for my practice mod you can use it in yours
Would this be correct for debuffing the joker to the left?
Quick question: How does hologram check for a card being added to the deck to update its xMult? The copy in question is:
G.E_MANAGER:add_event(Event({
func = function()
local jacks = {}
for k, v in pairs(G.playing_cards) do
if v:get_id() == 11 then jacks[#jacks + 1] = v end
end
local chosen_jack = pseudorandom_element(jacks, pseudoseed('the_function'))
if #jacks > 0 then
card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Pull up' })
G.E_MANAGER:add_event(Event({func = function()
local card = copy_card(chosen_jack, nil, nil, G.playing_card)
card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, card)
G.hand:emplace(card)
return true end }))```
thats the wrong one?
Haha they're all a bit cumbersome to set up and need either sprite rendering code or some card eval patching, so I'm not sure they're the best ones to practice with, haha. But if you wanna take a crack at Mystery Cards, which are always face down, showing your deck's card back, and give X2.5 mult but lose x0.5 mult every turn they're in your hand, while also revealing either randomly suit, rank, seal or edition each hand, you're definitely welcome to!
This is the code that's doing the copying. Hologram won't detect it adding the copied card to the deck
call SMODS.calculate_context({playing_card_added = true, cards = cards})
gotta be thrown in the deep end sometimes
call it where, at the context or in the jacks > 0 ssection?
ah yeah nice and simple
revealed rank suit or seal/ edition through like a message or
No, ideally I want that on the sprite
anoywhere in that event after you make the copy
cards should be { card } probably

Says the god to the pesant
i might need a few more days of modding under my belt first... good luck lol
It's why it's one of the enhancements I haven't implemented yet after 200 jokers haha
thats a viceral idea
love it but
shiver
cant wait to rework smeared joker into a rare and make all rnumbers count as all numbers and all faces count as all faces
while making aces count as anything
go ahead
play a straight flush every round
see if i care
Bump
give it a whilr
if it errors we will know what caused it
just rip it and see if it works ol
if it doesnt and it crashes its gonna tell us why
It doesn't like the if stoppos != nil then line for some reason
Should I make it define a number and check if it's not that number instead?
the if statement is probl written wrong one sec
no np this should be fine
nil is just a scary thing to use in code
Here's what I tried adding, still haven't gotten it to trigger hologram
if context.cardarea == G.jokers and context.setting_blind then
G.E_MANAGER:add_event(Event({
func = function()
local jacks = {}
for k, v in pairs(G.playing_cards) do
if v:get_id() == 11 then jacks[#jacks + 1] = v end
end
local chosen_jack = pseudorandom_element(jacks, pseudoseed('the_function'))
if #jacks > 0 then
card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Pull up' })
G.E_MANAGER:add_event(Event({func = function()
local card = copy_card(chosen_jack, nil, nil, G.playing_card)
card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, card)
G.hand:emplace(card)
return true end }))
return true end
SMODS.calculate_context({playing_card_added = true, card = card})
return true end }))
end
end
})```
oh lol
thats why
!= isnt actually a lua thing lol
use ~=
wait lowkey
SMODS.calculate_context({playing_card_added = true, cards = {card}})
remove that entirely just straight up say if stoppos then
is there a context for after score is fully calculated and displayed, but before the hand played disappears
nil is treated as "false" in lua
Also, it's not debuffing the card to it's left
end_of_hand
funnily enough, glua is whats helped me here haha
^
oh hi ice
Been making addons for years, still haven't posted them to the workshop [=
I doubt it'll be too complex, it's just that I need to look into how sprites are actually rendered in this game. Same reason for why I haven't implemented Crime Cards yet, which Retrigger for each crime card you are holding in your hand, but only give 2 chips on each Retrigger, instead of the nominal value + upgrades
if context.cardarea == G.jokers and context.setting_blind then
G.E_MANAGER:add_event(Event({
func = function()
local jacks = {}
for k, v in pairs(G.playing_cards) do
if v:get_id() == 11 then jacks[#jacks + 1] = v end
end
local chosen_jack = pseudorandom_element(jacks, pseudoseed('the_function'))
if #jacks > 0 then
card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Pull up' })
G.E_MANAGER:add_event(Event({func = function()
local card = copy_card(chosen_jack, nil, nil, G.playing_card)
card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, card)
G.hand:emplace(card)
return true end }))
return true end
SMODS.calculate_context({playing_card_added = true, cards = {card}})
return true end }))
end
end
})```
Tried envoking it here, is this right?
i feel you, i worked a little bit on pointshop 2 with kamshak and ran some of the more popular prophunt and ttt servers back in...2014-2018
ty
Quick question: I wanted to make a joker that was default negative (and had no other effects). I have code
card:set_edition({ negative = true }, true)
which almost works? In the collection it's always negative but in the shops it isn't. Any guidance much appreciated
Also, the game runs now, but it isn't actually debuffing the joker, is there a dedicated function for debuffing cards, and am I using SMODS.recalc_debuff correctly?
i always used set_debuff
no, you're returning true before you get to the calculate
ohhhh
When using context.destroying_card, is that context window looking at an individual card, or the whole hand of cards?
individual
context.individual my beloved
it looks like card in that context is actually the joker itself. So what is the handle for the other card? I need to check it's ID to see what it's number is
it's literally context.destroying_card
use context.destroying_card to refer to the card being looped through
it seems like it shouldn't work but it basically acts the same as context.other_card
ah, so I could call context.destroying_card:baseId or whatever
Thank you guys, or girls
context.destroying_card.base.id or context.destroying_card:get_id()
pretty sure get_id() is generally recommended more than the base id but not sure
Why is there no text on the joker?
SMODS.Joker {
name = "Mouthwashing",
key = "mouthwashing",
text = "Gives 20X Mult",
config = {
extra = {
x_mult = 20
}
};
atlas = 'test',
pos = {x= 0, y= 0},
rarity = 3,
cost = 10,
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
effect = 'XMult',
calculate = function (self, context)
if(context.joker_main) then
return {
card = self,
x_mult = self.ability.extra.x_mult
}
end
end
}
My main lua file.
return {
descriptions = {
Joker = {
j_mouthwashing = {
name = 'j_mouthwashing',
text = {'Gives 20X Mult'}
}
}
}
}
And here's my localization file.
You probably need the mod prefix
What would that be? I have it set to "Frosted Gambler" in the json but I don't think that would work for it, right?
You have that set as the prefix or as the name?
So, I thought the prefix was that little name that shows up on the cards at the bottom with the card name. It should be changed then, shouldn't it?
The prefix is internal identifier for the mod
So could I use "fg" and change the joker id to "j_fg_mouthwashing"?
Well the reference to it I mean.
I'd use the name instead to avoid conflicts, but yeah
i dont think this is a context
at least from the calculate functions page on the wiki
When within a joker's calculate function, and then in context.discard, would context.other_card reference each discarded card individually?
I'm trying to use a custom gradient for my editions badge color, but its crashing due to a number comparison to nil. When calling a custom gradient, im assuming I just use the gradients key right? Such as:
badge_colour = 'gradient_key_here'
any documentation on this?
- the joker's
nameandtextaren't needed here as it has a localization key set (also, remove thecard = selfin the calculate function)
- the joker's key for this localization file (
j_mouthwashing) should bej_(your mod prefix here)_mouthwashing
i want a function to be called at the time the message pops up in my calculate function. as of right now, the function runs (causing a visible change on the screen) and its out of sync with the message
this is my current code
Thank you, but someone else already helped me figure it out. Got a question though, I'm trying to figure out why the 20x mult won't trigger.
returning xmult is xmult instead of x_mult (no underscore)
xMult, not x_mult
Ah, ok, thank you!
Still doesn't work.
SMODS.Joker {
key = "mouthwashing",
config = {
extra = {
xmult = 20
}
};
atlas = 'test',
pos = {x= 0, y= 0},
rarity = 3,
cost = 10,
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
effect = 'XMult',
calculate = function (self, context)
if(context.joker_main) then
return {
xmult = self.ability.extra.xmult
}
end
end
}
confused because this exact value is accessed for judgement, why is it screaming at me
wait nvm i just notice
that is not G.jokers
as u can see its completely off
This destroying_card business is weird!
When I played a hand full of 2's instead of each of them being destroyed, it replayed the animation over and over for the last card
--it was a high card, we will eat 2's
if context.destroying_card:get_id() == 2 then
sendInfoMessage("This is a 2 " .. context.destroying_card:get_id(), self.key)
card.ability.extra = card.ability.extra + card.ability.extraGrowthRate
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.45,
func = function()
play_sound("Fox_yoshiEat", 1.05)
context.destroying_card:juice_up(0.3, 0.3);
return { remove = true }
end
}))
sendInfoMessage("we are going to destroy this card", self.key)
return { remove = true }
end
end
ok this was completely unrelated i'm just tired lmao
you're referencing self for the card's ability, which is used in the base code and works fine, however with how smods does stuff, self refers to the card object itself (as in, every single instance of the joker). instead, change that self to card
animation plays as soon as cards finish calculating, but the message pops up way after
card references that specific joker's variables, which is useful when jokers have changing variables that are independent of each other (therefore why it's used, at least iirc). self references the general joker object
your also missing card in the calculate hook i think
Can anybody tell me what's wrong with my code? It's not establishing the stoppos value when iterating through the table, so it isn't debuffing any cards
nah, that's not required anymore as far as i know
ah okay
anyone know how to fix this? can i use an event?
two more things to note - while it doesn't mess up your code to have it, effect = 'XMult' isn't needed. also, you have a semicolon after config, which should be changed to a comma
It worked, thank you trif and balatroni
Sorry, instinct from c# lol.
what are you using update for instead of calculate?
I want it to be running basically at all times
Should I replace it with calculate, would that fix anything, or is it just an optimization fix?
Either way it isn't doing the thing I need it to do
Is there a context for redeeming a voucher?
Changing to calculate does not fix the problem
definitely keep it calculate though, update happens every frame
G.jokers.cards
Probably context.buying_card but you need to figure out if it's a voucher
can someone help me fix this weird offset between the visual and message showing? ideally I want this visual change to be held off on until the message pops up
and i have no idea how to do that
The message is in the return so it tends to be more closely tied to the visual part of the context rather than the actual code execution of the context
is there a way to make a joker that does X mult if there are less than a certain number of cards in the full deck?
But I don't know how you'd make the message appear otherwise or make the visual appear in the return
have you tried making a message show up with card_eval_status_text()?
no, is there an example on how to use that
it basically just gives a message from a card without using an actual return value, here's an excerpt from the smods example joker mod that explains it (also check the vanilla code for it, and how it's used in vanilla jokers!)
context.other_card:explode()
end ```
This the correct way to destroy discarded gold cards?
okay that works. The question tho is why the message appears at the end of scoring. but the visual change happens at the beginning?
could i see the full code for the section handling this?
The visual change is probably happening right as the scoring is calculated
yeah
you can always put the visual change itself into an event
sure
are you wanting the two to both occur after scoring, or before?
i changed it to before in that screenshot
the video was when it was context.after tho
and i would want after if possible
I tried context.consumeable and context.other_card but it didn't work, so what do I use to check?
i think you could try putting both the visual change and the message in an event, with the message happening after
as in card_eval_status_text being lines after the visual change lines
when would the event happen?
depends on the triggering but if you leave it default, i think it'd happen after scoring
okay
trying to add a joker that has a chance to disable the boss blind (like the ability)
i am slightly stuck at loc_vars
as in i am just sitting here, looking at this
why is that
no, like why are you stuck on loc_vars
oh
i don't really know what variables to put there..
How does one check when buying a card that it is a voucher?
well first off, loc_vars is just for setting variables to a card's description
config is where variables are declared
and secondly, i would assume you would have a variable for the card's chance to trigger (as in, if it's a 1 in 2 chance, a variable for 2)
yeah
alright, well this code again changes the enhancement immediately and doesnt display a message (probably because i fucked up something with the message code)
why are the contexts ambigious in nature
wait
oh thank god
would this all work...
this worked. its voodoo on why this configuration in the code worked. but it worked
fuck yea
yup
strange, but good that it actually did it lol
The game is now telling me that "ability" on card is nil, when I'm just referencing a variable
oh dear lord how do i calculate this now...
Is it because the "debuffed_joker" table is empty?
agh
a if G.GAME.blind and G.GAME.blind.boss and not G.GAME.blind.disabled then check would suffice, plus a if pseudorandom('any key you want') < G.GAME.probabilities.normal / card.ability.extra.odds then should do just the trick
then just do G.GAME.blind:disable() and optionally return something
is it possible to get a random joker without creating it? I'm attempting to create a joker that will spawn a completely random joker when sold, but tells you what that joker is going to be, which changes every round
Is this possible?
in which lua in the game that contains the balancing system for plasma
Can card variables not be tables?
would if math.random work instead of if pseudorandom or is that a different thing
Yes but it won't be based on the seed
what's the difference..?
That it won't be based on the seed, if you put in the same seed twice and use pseudorandom, it'll have the same outcome both times, but if you put in the same seed twice and use math.random, it'll be two different outcomes
Psuedorandom should be used for functional random outcomes, math.random should be used for visual random outcomes
What if you got a random value from every value in G.P_CENTERS that starts with j_?
eh i'm gonna use math.random tbh
I got it working, I had to make the variable start as 0, and then it'll run the code to un-debuff the old joker if the debuffed joker variable isn't 0
And it's working exactly like I want it to, but to make it work properly I had to set the function to update instead of calculate
it's generally good practice to use pseudorandom otherwise your mod is incompatible with seeded runs
would you mind posting your joker debuff stuff so i can snag it
for some odd reason the debuffs im attempting to enact are like 'false' debuffs where it shows them as debuffed but the effects ar still playing
local stoppos
local currentpos = 0
for k,v in pairs(G.jokers.cards) do
currentpos = currentpos + 1
if v == card then
stoppos = currentpos
break
end
end
print(stoppos)
local debuffjoker
if stoppos then
debuffjoker = G.jokers.cards[stoppos - 1]
if card.ability.extra.debuffed_joker ~= 0 then
if card.ability.extra.debuffed_joker ~= debuffjoker then
SMODS.debuff_card(card.ability.extra.debuffed_joker, 'reset', 'stopjoker')
SMODS.recalc_debuff(card.ability.extra.debuffed_joker)
end
end
if debuffjoker then
SMODS.debuff_card(debuffjoker, true, 'stopjoker')
SMODS.recalc_debuff(debuffjoker)
card.ability.extra.debuffed_joker = debuffjoker
end
end
end,```
alright i'll use pseudorandom
i'm making the key "stupidfuckingkey" though
much obliged thank you
I mean hey you do you, the key just exists so the pseudorandom value isn't shared with something else
i mean yeah the key can be whatever you want, just as as long as its not the same as a different key
brilliant.
pseudorandom is a lot better and more compatible
damn, my bad lol
Since it dynamically changes based on your joker order in real time in needs to well, change in real time
Also I made the card infinitely more annoying by making it debuff your first hand drawn in it's put in the leftmost slot [=
also uhh
for some reason this only works if you have more than two aces
like if you have 3 aces THEN it gives +25 chips
yeah why why's it doing that.
it's not subtracting chips either, no
if you have one or two aces in your hand it just does nothing
Hi, I just started learning and putting together a few jokers today and was wondering if i could have a hand with getting the same functionality as Egg (increasing sell value) after the pseudorandom if, I tried looking at egg itself but can't figure it out
Oh god the cards stay debuffed after the round ends how do I fix that
card.ability.extra_value = card.ability.extra_value + (number of sell cost you want to add)
I think.
thats what i had in there but i didn't have the actual number adding to it đ
i'll try it out ty
bump
I think it is back.lua
thanks doc
why is it being evil
how are you wanting it to function?
hey how does deck.cards in SMODS.Challenge work
silly question, are you restarting a run to test it?
i know i've been stupid a lot let me retest it
it looks ok to me so it might be because some other values are wrong
i did this earlier and rewrote the same 3 lines about 10 times before restarting the run lmao
it's not giving chips
and i haven't restarted a run yet
okay why is it just not giving chips now
wait
HUH???
OH MY GOD I JUST REALIZED
IT'S GIVING CHIPS BASED ON HOW MANY ACES ARE IN THE PLAYED HAND
NOT HELD IN HAND
OH MY FUCKING GOD
okay now i need to rewrite the code so that it gives chips based on aces held in hand not in the played hand
just use G.hand.cards instead of context.scoring_hand ig
joker art mock up don't know what to call it
whats it do?
so uh wondering if i could get a bit of help with something, i was trying to make it so that the shop would pretty much be only this rarity and it kinda works, but the default joker is also in there for some reason
idk the art just came to me
Make it give +4 Mult and -4 Mult xD
that worked
kinda thinking it swaps in and out of negitive
i need to fix my formatting with some of my descriptions now
Could give it +4 mult and +1 joker slot so its basically just a free Joker and if it gets negative then you essentially have +2 slots
because
tbh im not sure how it works the wiki doesnt give examples
if pool empty it fills the pool with a Jimbo
+2 joker slots if theres at least one spare joker slot
so if they arent all full give some more
why isn't this following psuedorandom rules? every time I load from a save state, this spits out a completely different joker key even though it should be the same
Maybe G.P_CENTERS isn't initialized that deterministically?
surely a game so heavily based on deterministic randomness and seeded RNG wouldn't do that
surely
^clueless
so how do i actually make it work because i tried using the key of the joker i wanted but that didnt seem to work
Jimbo is omnipresent
You can't escape him
He will always find his way to you
does the rarity even have things in it
i mean ive got this in the one joker i have
tbh im not sure how rarities work
it wasnt working before so i tried adding the pools thing
I think you set the rarity key wrong
rarities are typically numbers but beyond that i have no idea
taking a guess though i'd imagine you'd have to implement the rarity?
it still has the rarity tag in the collection it just seems to be the shop that isnt really working
maybe the weight is too high and it can't process the number correctly?
could it be the "ja_" difference or is that intentional?
set it to like 99999 and see what happens
if it shows up in the collection and that's his mod prefix it should be fine
I looked it up and rarity key format is {mod prefix}_{rarity key set in SMODS.Rarity}
oh god, is there any way to fix nil values on jokers when they're in the info_queue
How would one run code if the joker you want to run it on is sold?
You might be able to help with this one if your code is finished
if context.selling_self
Got it
do i actually need this pools table like what does it do
is it just the chance of getting each joker in that rarity?
doesnt seem to be it
its still seems weird that when i add just jimbo into the pools thing both jimbo and the other joker have an equal chance of appearing
and nothing else
just with jimbo
what did you mean by this?
Because you sell your joker to do something
How could one do the misprint effect on the text?
How do I add a card to the hand or deck with a direct card table?
oh no i just had the idea to do a wordle joker
you type in the info box that show up and if you get the wordle correct it give you X5 mult
trying to make a hiker but for mult and only lucky cards, but this doesnt work
đđđđđ
don't you dare
oh you did it already LMAO
nuh uh
i love the infinity symbol being a sideways 8
gotta make do
How hard is it to add a playing card to the player's hand or deck? I'm looking around for how to do it and I can't find anything in the documentation
area:emplace(card)...
you look in the game source code...
so i have a joker thats meant to destroy all cards held in hand once sold, but i have no idea how id go about doing that. closest thing ive done is print the value for all cards held in hand :/
I did, and "emplace" isn't the most self-explanatory phrase to search for
i think you would look for something that does what you want
then you look at code for it
not finding the function directly
if context.other_joker and context.other_joker ~= card and not self.safe then --safe chance roll fails
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
context.other_joker.T.r = -0.2
context.other_joker:juice_up(0.3, 0.4)
context.other_joker.states.drag.is = true
context.other_joker.children.center.pinch.x = true
-- This part destroys the card.
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
blockable = false,
func = function()
G.jokers:remove_card(context.other_joker)
context.other_joker:remove()
context.other_joker = nil
return true;
end
}))
return true
end
}))
``` this deletes all other jokers on a chance roll
you can use this is a base if you want
sweet, thanks!!
unpack the exe file with 7zip
So I don't have the luxury of using like, any of the stuff I've used thus far, awesome
Okay I've looked through every .lua file in the .exe file and can't find anything related to "dna" that actually shows it's functions
How do I look through the source code to find what I want?
if #context.full_hand == 1 then
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local _card = copy_card(context.full_hand[1], nil, nil, G.playing_card)
_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, _card)
G.hand:emplace(_card)
_card.states.visible = nil
G.E_MANAGER:add_event(Event({
func = function()
_card:start_materialize()
return true
end
}))
return {
message = localize('k_copied_ex'),
colour = G.C.CHIPS,
card = self,
playing_cards_created = {true}
}
end
end
``` here
look at what hanged man does for the selected cards and point it to G.hand.cards instead
I saved the "card" variable to a table that's stored inside a joker, and the original card is destroyed, and I want to create a new card that is a carbon copy of the original card, how do I do that?
ctrl+f for something you know the base game does
copy_card
which file are the joker things in because im looking in card.lua atm and its like, half there
That's what I did
the joker definitions are in game.lua
ah ty!!
Anyways, this
card.lua is just the handling
Does that allow a card variable to be passed through?
This one?
no clue
havent needed to yet
look at the big loc_vars table i forget where it is
or the localization files maybe idk
ctrl+f is your friend
I do not understand that.
like
press control (or command)
then F
then type in the name of the joker or something
until you find what's relevant
No, I don't understand what this means.
it's what does the misprint random text
I know.
bump
perma_mult isnt a thing