#💻・modding-dev
1 messages · Page 406 of 1
if context.individual and context.cardarea == G.play and context.other_card == context.scoring_hand[1] then
for i, c in ipairs(context.full_hand) do
local rank = c:get_id()
if rank >= 2 and rank <= 10 then
local pi_val = pi_digits[rank]
card_eval_status_text(card, 'extra', nil, nil, nil, {
message = "+" .. tostring(pi_val) .. " Mult"
})
return { mult = pi_val }
end
end
end
end``` like this? it now counts 2 times the mult
everywhere i put trash_gradient is showing up as orange in vs code which isn't a good sign
remove the card_eval_status_text call
now you have to refer to it as crp_trash_gradient
yes
you changed the variable name remember
i know
oh
then dw, vscode doesn't know better
anyway game crashed
rip
there isnt a crash log?
I mean G.C.RARITY.crp_trash should've worked in the first place, so I guess return statements don't like gradients
which is weird cus if you do colour = G.C.EDITION it'll work just fine
let me try
yeah i'm just gonna define a local variable in joker.lua that is the average of my gradient and use that as the color
ok yeah it's working now, but it plays on the first card, not the first number card
oh yeah it just hard crashes
yeah
i just ended up doing this
return {
message = "+" .. lenient_bignum(card.ability.extra.create) .. " Trash Jokers",
colour = HEX("606060"),
}
can you try making a new table that just has the first 4 indexes of the gradient
oh, I didn't catch that part
works
would there be a good way to generalize this table so it can support modded hands? It's all the poker hands that "contain" the index hand (four of a kind necessarily 'contains' a three of a kind, pair, etc)
the reason it does on the first card is cus of the context.other_card == context.scoring_hand[1], you'd have to find the index of the first number card
not really, but when evaluating the poker hands it always evaluates all the things it contains. what do you need this for?
just a joker that operates on that table. makes planet cards have a chance to promote one of the hands that its a subset of
you could sort hands based on their order in G.GAME.hands and do stuff that way to generalise but it still seems really complicated
not every hand is composed of other hands
but yeah you dont even need a custom table here
get_poker_hand_info returns a table poker_hands as one of its return values, (which also exists under context.poker_hands in some contexts) which allows you to check for hands even if they arent the main hand for this purpose
for example when playing a pair next(poker_hands["High Card"]) still returns true
bump
so youd loop over poker_hands then check if next(value) == true and that means that hand is a subset of the current hand
orr i guess you dont need == true here i forgot lua for a second
ooh okay. only issue is that it's going through planet cards not played hands, so i'd probably have to use the cards in the example hands? but then at the same time guarantee the example hand aren't accidentally another hand as well
for planets its a little more complicated since you wont have a poker hands table
but you could technically abuse the example of the levelled up poker hand
to get a fake hand to pass into get_poker_hand_info
seems janky though
yeah that wont work with my poker hands for example because they're all enhancement based
why not? just make the dummy hand copy over the enhancements
janky is what this community runs on lmfao ill play with it and see if i can get somewhere
because the contained poker hands will be different every time
oh
well theres not really a better solution other than hardcoding it which is worse
since it will work even less
yeah
Yeahh the idea might be a bit too specific to be able to broadly work for modded hands. Might just add a check and if its a modded hand its just "chance to upgrade any other poker hand"
like any other possible version of this idea would be less janky to implement 😭
planets levelling up a random lower hand that doesnt need to be a subset or levelling up a subset of the played hand for example
yeah, the whole crux of the idea that i like though is that it makes Pluto more powerful
Oh but its also not leveling it up one level its applying Pluto's l_mult and l_chips to the other hands so like Pluto gives a teeny wittle buff to the other hands but upgrading mars can still give you enough occasional leving to 5 of a Kind that you can make a pivot without sacrificing wasted leveling
but anyways yeah, finished up all my jokers and was happy with them but going back and trying to make them more broadly cross-mod compatible
this joker crashes the game for some reason, the error says other_joker is a nil value
something along the lines of that anyway
because when it's checking the conditions, it has to evaluate the variables
so when it enters the first condition in the instance where you want your second condition inside that condition to be triggered, it's trying to index context.other_joker when it's nil
im pretty sure it's other_card not other_joker, and don't use self, use card
and vice versa, since those conditions aren't exclusive of each other
so how would I fix it?
what are you talking about
...is other_joker not a thing?
i thoughti t was a thing during post_trigger
the joker retriggers all negative cards and jokers btw
maybe it is idk never did retriggers
other joker is a thing, i've used it in other jokers before and it works
they want to retrigger all negative cards and jokers, though, right? i think the idea there is other_joker for retriggering negative jokers and other_card for retriggering negative cards in played hand 
in which case, the nesting is kinda wrong? since i don't think retrigger_joker_check happens on cards when a hand is played
yeah im not talking about the lower if
hi besties i hope youre having a fantastic day
i wasn't sure wether to use it considering it's not documented
the nesting looks correct to me
just checked, it's other_card

like instead of...?
instead of other_joker
instead of other_joker
yeah even in context.post_trigger it's other_card
so like this?
yeah
change self for card tho
alr
how do i make the description not be this wide💀
use multiple lines
text = {
"thing",
"thing 2"
}```
in loc_txt or your localization file
ah damm that simple?
a better example
any ideas on what lua file the default jokers are stored in?
card dot lua
what for
this is a better reference if you want to look at them for help with making things though
just want to make a joker and needed to read the code for the effect that i want
these are vanilla jokers remade with the smods api
okay then definitely reference the link I sent
yeah looking through it now, and it is exactly what i needed thx! 
My god thank you so much
what does this do?
so it looks like the main VanillaRemade.lua will load the other additions
instead of having it all in one LUA file
no problem im just reading through it myself right now
fire profile btw 😭
thx
how do i make a deck start with a certain amount of money?
ah thanks
bump
what this mean
whatever you're trying to loop, the thing in your ipairs function is a string, when it wants a table
text has to be a table
how do i do that
you forgot to put {brackets} around the text input
yeah, text needs to be lua text = { 'Line 1', 'Line 2' }
etc.
like this:
'other round' }```
there, that should work now
did you save the file
yes
does anyone here know anything about the cardsleeves mod?
nope
now to make texture for it
uh
how do i do that
what should i use
what about piskel
that would work too
Is it possible to make a modded joker spawn another modded joker?
aseprite is the best app for pixel art imo
but what are the dimensions of the sticker lol
but it's not technically free
if you add the prefix it should be
for example cryptid's prefix is cry_
for a sticker, you wanna use the same dimensions as the cards, just position the sticker where you want it to be on the card
ah
while i'm here, i'm having an issue with card retriggers. i'm trying to make a seal that, on scoring, retriggers the card to the left. the issue is that when it retriggers that card, it triggers the original card again which i don't want it to do. i imagine that it's just setting the card to the previous one and then continuing forward, which ends up triggering the main one again. is there a way i can avoid it?
if so, how would I make a sleeve disable the effects of a certain deck
Do I need to specify the prefix for each joker?
?
Where does the prefix come from
the mod
in the main json file you specify your mod's prefix
so you would check that json in the other mod
Oh I’m trying to create one from my own mod lol
like make a new joker?
if you want to spawn a joker from your mod i don't think you need the prefix
I tried putting the key and it didn’t work
screenshot?
what's your code
of code
bump
Yeah you need the prefix
j_modprefix_key
where modprefix is your mod prefix, duh, and key is the joker's key
Ah I see
do i delete the card texture now???????
like the card part
yeah, you just want the sticker
but leave the file the same size
just make everything but the sticker transparent
ok
i now have the texture
where do i put it in the code
and do i make a new folder other than x1 and x2 for it?
no it also goes in the 1x and 2x folders
ok
you just add the texture the same way you would for a normal joker
is there a way to scale a floating sprite? trying to add my own joker to the main menu similar to how cryptid does it but the face sprite is laughably teeny tiny
nope
didnt work 😦
you need to create an SMODS.Atlas
oops
how would one get the amount of money currently in possession
G.GAME.dollars
just dont compare number with table and you should be fine
so you will have to to_big() the values youre comparing it against
the place next to the ocean
beach
shore
oh
god. WHY AM I TINY
a beach is an ocean and a shore
okay jimmy beach
thats what the B means
is there anything wrong that im being silly about
i see it now nvm
nvm again no i dont
somoene help
did you save
yes
resend code
bump
now i just need to make the thing that says "error" work and make the thing do the thing it says
how would I make a joker that applies the "X2 Mult" message multiple times in 1 context.individual calculate call?
I can only do this by returning a table of the message or pop up for the joker but I need to return multiple for this
would I use the event manager? how do I make the event manager do the "X2 Mult" or "X2 Chips" thing?
is there something similar to Blind:press_play() that can be used on a joker, aka right when a hand is played?
specifically I'm working on something similar to Observatory where it applies X2 Mult and X2 Chips for each Planet in G.consumeables.cards, but I don't know how to loop through every consumeable per hand played
you need a hashtag before the hex code
#50C878
and don't use that prefix
you will regret it
no my mod metadata works fine
this is false
nvm
does anyone know
rahhh
for me i got the same issue when not adding the #
bump
its the tag that says "50% Use"
so you're looking to loop through all consumables after a hand is played, and give a bonus depending on that?
yep
is this for a joker?
yep
but i can't do this using context.individual because context.cardarea is never G.consumeables (other than using a consumable)
yeah don't use context.individual
bump
so without the help of seperate calls on calculate(...) by context.individual I can't return multiple messages to show X2 Mult
i think you're just going to want to loop through every consumable card when a hand is played
yeah i know that
but what about the popup
for x2 mult or chips
card_eval_status_text()
ah
that'll give you a text popup without needing to return
thats good
how do I multiply the scored mult? stupid question but I cba checking the smods documentation
it should be a simple answer anyways
you'll want something like card_eval_status_text(card, "extra", nil, nil, nil, {message = "etc etc",})
what are you meaning? like, the scored mult on the side?
hmm, that one may be a bit more difficult
you could always compound all the mult together and give it at the end
let me think
no not that
my thing only fires when everything is done scoring
so I'd just have to multiply the currently scored mult by 2
it should be decently simple no? it's the equivalent of doing
return {
x_mult = 2
}
ohh, you'll likely want something like context.after or context.final_scoring_step
yeah I know
that's fine
well I'm currently using context.post_joker but that isn't the problem
well i'm a little confused on what you're wanting to do here then
where would i put the code to make it say "50% use" in red when it is applied to a joker
also what would i type
context.other_consumeable?
no
I'm not having this applied by using consumeables so context.other_consumeable will always be nil
I literally just have to apply 2X mult lol
without returning
that's not what that context does
is there a context for right when the hand is played? i'm looking to do something very similar to the hook blind, and context.before has a delay
that context works like observatory
context.press_play i think
yes but there is no context.individual loop that has a G.consumeables context.cardarea
oh damn, that's probably perfect
yes, other_consumeable
bump
it's a different context
oh, I didn't know context.other_joker also iterated over consumeables
shit mb lol
wait no
yes
alt f4, haha get it
it's just called other_consumeable instead of otehr_joker
okay so, this works, but my only problem now is even though I'm doing this:
return {
x_mult = self.ability.extra.x_mult_per_planet,
x_chips = self.ability.extra.x_chips_per_planet,
card = context.other_consumeable
}
the X2 Mult and X2 Chips effects are on self, not context.other_consumeable
replace card = for message_card =
that worked, very nice
bump
in a file
how would i make it so that value changes?
use calculate
like if this then give+2 joker slots if not then nothing
how would i use it for that
alr
how do I do that
G.jokers.config.card_limit = 6182
well, first of all what's the condition for changing
if you're playing on the modded deck i made
it's basically the same as making a deck
except that there are some extra contexts for calculate
then i would check how black sleeve does it
black sleeve changes depending on the deck from what i see but idk how it is set up
for black sleeve it just kinda changes the config for black deck
i don't want the base deck to modify joker slots
what's the difference
?
well the normal deck doesn't change your slots, and the sleeve is the same
but when combined you get +3 slots
bc you spawn with more jokers
ok, but you can do that by adding it to the config
well that's a problem
joker_slots = 3 should give you 3 slots
i want it so that only under the condition do you get an extra 3 slots
and the condition is that you have both the sleeve and the deck, right?
yeah
then you can do what black sleeve does and change the config when you have that sleeve on that deck
Question. Can something bad happen if I'll update event queue G.E_MANAGER:update(0, true) multiple times inside Game:update()?
So far it works fine, but maybe I don't know something
After days of stupid runarounds, this shader effect is finally done
my game is saying SMODS.find_mod is a nil value
bump
could you send code
this is the line local SMODS_NYCTO = SMODS.find_mod("NYCTO")
this is the block
function SMODS.INIT.NYCTO()
-- file loading
SMODS.load_file('ddcjokers.lua')()
SMODS.load_file('ddcchallenges.lua')()
-- config
local SMODS_NYCTO = SMODS.find_mod("NYCTO")
SMODS_NYCTO.optional_features = function ()
return {
post_trigger = true,
retrigger_joker = true,
quantum_enhancements = true,
cardareas = {
discard = true,
deck = true
}
}
end
end
say, what to do if i want to make it so that it lasts for 2 rounds before self destructing?
or maybe it isn't
also what you're doing isn't neccesary
idk if it's required but i would load files last
and second to enable optional features you can do this SMODS.current_mod.optional_features = { retrigger_joker = true, cardareas = true }
that's just from my mod so do what you will
i'm assumong that this is your main lua file
yeah
if so you don't need everything in a function
do something like this
SMODS.current_mod.optional_features = {
the stuff
}
SMODS.load_file(stuff)()```
Is there something like G.jokers.cards[1].edition but for ObjectTypes I already defined? I added some vanilla jokers to an ObjectType called "Robot" and I want to check if one of my jokers is in there
here's mine for example
do any of the files need the header?
is robot a pool?
--- STEAMODDED HEADER
--- MOD_NAME: Nyctophilia
--- MOD_ID: NYCTO
--- MOD_AUTHOR: [Nycto, AnnaSH]
--- MOD_DESCRIPTION: Adds a few jokers.
--- BADGE_COLOR: c7638f
--- PREFIX: nycto
----------------------------------------------
------------MOD CODE -------------------------
headers are deprecated
oki doki
https://github.com/Steamodded/smods/wiki/Mod-Metadata use this instead and you can delete the headers
bump
It's an ObjectType containing a few vanilla jokers. I also added it in the pool parameter for one of my custom jokers
😔 I should probably take a break from shader stuff and just make normal cards for a while
Ough
im not sure about objecttypes that contain defined cards
ok second idea, use the sleeve's apply function and copy the black deck apply from vanilla remade
oooh didn't notice
I just wanted a simpler way to add a group of jokers as a condition for triggering one of my custom jokers, instead of adding each card as a separate condition. I thought ObjectType would be the best approach, but now I'm not sure it's intended for this purpose
im pretty sure it is for that
Is there any way to check for it? Something like G.jokers.cards[1].edition, but for the ObjectType?
you can check if a joker is in the pool by going to G.P_CENTER_POOLS.<your pool name>
iirc
top 10 moments before comparing number with table
this is the code thats causing it
it's probably the return of calc_dollar_bonus
no the problem is that you're returning a bignum
man
I don't like talisman
I don't like talisman
In this case, what I would have to do is loop through the pool for each joker slot until I find a match?
Unfortunately
It's not very efficient
you can maybe generate a look up table once on startup or something
I'd go that route too
problem is you have to make sure to generate it after every mod has loaded
is there a way to trigger a specific card in your played hand? im trying to make a seal retrigger the card to the left of it but using the normal repetition system retriggers the current card instead
is it breaking copyright with all of these references to other games in a bunch of mods?
cause like
yes shush
im thinking maybe i can call a method that triggers the previous card if the current card has the seal
okay so plot twist. it isnt
its when i play a hand
bump
you can make an argument that it's fair use
question, what is e_mult
but is that a bignum?
talisman thing for ^
i see i see
its like. 25. (sell value of last sold card)
i guess the crashing one has decimals??
also unless its nintendo, no company is evil enough to kill someone for liking their game enough to make a mod for another game based on it
it's a bignum
w. why
big nums are tables
no i understand that part i just don't understand how big numbers can be tables LMAO
{mantissa, exponent}
{base,exponent}
does anyone know what could be causing this?
it just won't tell me what mod is the issue
this is like teaching a goldfish advanced calculus asdkjasd
alas i do not need to understand the math behind it all
it just makes it instead of one number being max_limit now you can have max_limit^max_limit
yes
as one number?
yeah
dang
and omeganum is that but bigger
regular num - 1e308
bignum - 1ee308 (1 with 1e308 zeros)
omeganum - youll never hit it, so who cares
Is there no try-catch in Lua, to like, catch that error in the to_big() function and try something else
Like loading the number into a table in the function for comparison purposes
if there is no one has told me about it
Sadness
isn't that pcall
probably
but it would be hard to wrap smods functions in it unless you reimplement a bunch of stuff
anyways the crash isnt happening when i cash out anymore i can do that no prob but i still cant score 😭
guys please lmao
code?
bump
you can prolly grab the card list and then do the card w seal + 1 and retrigger that
this reminds me of paperback's bandaged cards, which took adding a new context for calculating retriggers on cards from playing cards
hopefully you find a better solution
this is what i had before, but it still retriggers the current card and not prevCard
yeah i tried something similar with enhancements and i couldn't get it to retrigger the other cards, only itself idk why
so is it not possible with the base framework?
to my knowledge nope
hii does anyone know how to call the sell cost of a joker? im starting to mod stuff and im trying to make a perkeo-thing that copies stuff bassed on sell value
joker.sell_cost
https://github.com/Balatro-Paperback/paperback/blob/07539b371639a5a2e133a09042185e4306ca1af8/utilities/hooks.lua#L147 this is how i added it to paperback
Welcome to modding :)))
tyyy ^^
so. its defineityly the commented line >:/
so would i just replace repetitions = 1 with calculate_repetitions(prevCard, context, 1)?
try to_number
not at all
wait.
?
it seems like maybe an issue with my code, but i don't know what's causing it or what "mul" is
it only occurs when scoring cards and playing with my moddd sleeve+deck
what that code is doing is adding a new context called paperback.repetitions_from_playing_card (which is currently only called on enhancements cus we didn't need it for anything else atm) that you can use inside the calculate function of the enhancement to add repetitions to other playing cards
livesaver as always 😭
it's perfectly fine when using the individual deck or individual sleeve
so if you want to implement this in your mod I recommend you change the paperback part with your mod id and modify the calculate_enhancement part with whichever is the equivalent to seals
that much work for a mult of ^2 </3
which it seems there is no calculate_seal so idk
this might not even apply to seals
anyhow, it won't work if you just copy paste it, you need to modify it to your needs
it worked tysmm ^^
nvm
Yup, works perfectly. Thanks for the help you two!
How can I make it so that the seed is refreshed each time the loop passes instead of just once per card scored?
is_numbered is a thing right?
-# No?
It would be not card:is_face()
i want to give the player +15 chips for each played cards
Although I can't guarantee a modded card that's not a face card is implicitly numbered either depending on what bullshit the mod author does
Like Aikoyori lmao
fair
so like, what do i type
not context.other_card:is_face()
-# me making 2s count as face cards:
how would i use G.GAME.blind:set_blind() for a custom boss?
i can put G.P_BLINDS.bl_final_vessel in there just fine and it goes to the violet vessel but thats not what i want
EDIT:
For anyone else who finds this in the future, Solution Found!
G.GAME.blind:set_blind() asks for the blind OBJECT. NOT KEY.
What I was Doing:
G.GAME.blind:set_blind('bl_modid_bosskey', nil, nil)
when infact i was supposed to do
G.GAME.blind:set_blind(G.P_BLINDS['bl_modid_bosskey'], nil, nil)
i might be stupid but how would one change the bg color in the splash menu of the game
bc this doesn't seem to be working rn
How does the stay_flipped calculation return work?
did i do something wrong here
it's called when a card is drawn from one area to another and stay_flipped = true keeps it flipped face down and prevent_stay_flipped = true prevents it
No but I mean, are there specific contexts where it's valid?
Like just draw_cards or whatever it's called?
Oh, I see
I love undocumented features
Either way if it allows me to replace some stuff I had used before, I'm all for it
yeah i added to my mod as soon as it was added it's cool
I had some kinda finnicky patches for a card that draws diamonds face down
yes, you need a more strict context check like adding context.individual
thanks
also then and
fixed
wait, where do you add that
at the beginning of the first if condition
oh okay
Hey question: what args is a booster pack? (Like a standard playing card booster pack)
can you elaborate?
?
yes, but now you need (get_id == 6 or get_id == 9) in parentheses
sure
which parentheses again
👍🌅🎧
bump
i mean i dont have an answer for that but the main menu is like any other ui element
aka: learn how ui works in balatro
where would i find the definition of the main menu ui 
and the options menu ui for that matter
idk, i'd start looking through functions/UI_definitions.lua maybe
if you pass the correct variable yes
should be good
create_UIBox_main_menu_buttons
i recommend looking for the localization strings
G.GAME and G.GAME.probabilities.normal or 1 otherwise it will crash when hovering in collection as G.GAME is nil when not in a run
thank you
okay so
bad news
the XMult doesnt work
but the ## worked
what's your calculate looking like
i dont think this is true
yeah that's not true
that happens for me
if i pass something via loc_vars that depends on G.GAME being indexable, it crashes when viewing it in collections in main menu
im getting conflicting results for how to replace the title screen's logo
how does your config look like
SMODS.Atlas {
key = "balatro",
path = "(filepath to your image goes here)",
px = 333,
py = 216,
prefix_config = { key = false }
}
yeah you use xmult there but Xmult in the return
case sensitive?
yeah
always
i believe so, yes
fml
oh wow didnt know this
i'd love to see a programming language that's not case sensitive
brainfuck
it does work but something tells me that something is wrong
get a new copy of your joker
yeah the values of jokers save with the run
otherwise you'd just lose all the stats you got on your scaling joker if you ever left
made a custom title logo
i'd kneel if someone made the logo font
⚠️ LOVELY PATCHES DOWN. I REPEAT, LOVELY PATCHES DOWN ⚠️
Always feels good to shake a few
but they're lovely!
ayyy me too bestie
latest smods release i removed like 10 of them
would i theoretically be murdered by the YOMI hustle dev for adding a joker based on it
granted most of the PRs were mine
no
I keep seeing how many PRs you put in lmao
im gonna do a cool thing whenever i get back to working by pretending my patches are needed still regardless of changes
is there a context for "trying probability"
what?
nop
Honestly it'd be an incredible tool but no
would be nice
there's a pr for that
is it your pr
but seems hard to enforce
im not that smart
you are that smart tho
thank you myst
You're v smart. It seems like almost all of the really useful new features I've been leveraging are yours lmao
i mean the pr looks like it's just replacing all pseudorandom calls with its own
That's kinda what it has to do if it wants a feature like that
Since vanilla doesn't wrap the entire thing in a function
Experienced and dedicated, yeah. Been seeing a lot of your messages helping others here, and you even code on phone. Amaze.
I know but it doesn't seem overly complicated, making the regex is the hardest part
will destroy_cards just skip eternal cards or is that implementation manual?
i saw most of the smods team has been busy recently so i wanted to help a bit haha
Wugh I need to remove my lovely patch for quantum editions too
it doesn't have an eternal check
I'm just gonna make it a function hook and update it ocasionally when smods changes something
Right now it's weird and annoying
so if i destroy_cards an eternal itll still kill the card?
yes
yep, that's on you, you monster
if it's a joker that destroys itself just make it non eternal compatible
otherwise yeah you have to check
if card.ability.eternal
pretty much
Is there something to correct?
is there something not working?
this should be enough to say yes
who made it up
up quarks
thunk
what is the civil chatter role
i think that allowed you to be in thunk chat or smth?
When I set this up it crashed when I played a queen
Python type shit
you have your config formatted incorrectly
ive never seen this error message before
Me when the photograph Xmult is in extra
remove the } after 'Spades' and the { before invis_rounds
more proof that you're smart
the indentation is pain
indeed
Doesn't VS Code have an autoformatting button at least, or is that an add-on
it does
the addons provide the formatters
i have it on save
Nod nod
not a balatro addon, a lua addon
ohhh okay
Just that I don't have the security to use it
it's a bit annoying when i do PRs
you should always use it
yes, now you shouldn't get the error you did (if you start a new run)
That's the quick fix stuff right? Just to know
When I get in vacations, which is in 2 or so weeks if I don't get into university right after
fuck security, who up downloading extensions from unknown sources
it doesn't fix stuff, just formats the code to look nicer
(sometimes it might add commas)
you just right click and "format document" anywhere on the text
Okay I couldn't completely eliminate my multi-edition patch but I made it less stupid, which is acceptable
Meanwhile, Axy in Notepad++, since VSC would likely lag with too many tabs open...
We ridin'
my vscode did lag a lot when i had a massive localization file
average nix user
does Axy actually need all of those tabs open at once
I've never had lag with having too many vscode tabs open
When we get bored with one thread of development, we switch to another one, and they all do different things, soooo
insane
Some tabs are just for reference, like the compat_0_9_8 one, but most of them are to figure out what fields things have
Currently trying to figure out UI, get a sprite to change when it the user hovers over other nodes on the page
But if that gets frustrating, can switch to looking at rarities, or replacing textures during play and restoring them when the card is sold, or so on
Will eventually think of storing card state between runs and per profile as well, to have things progress between runs. And if all that gets too frustrating, there's always updating things to add Joker Display stuff
i love jokerdisplay
Yeah, it's so good
best mod ever
i wonder who made it
aka there's too much stuff to do and too little time
i need someone to do jokerdisplay for me i hate it
not the mod but the compat with my other mod
Even with this it dosen't destroy itself and creates the other card
Will definitely learn it eventually, just uh... the progress is horizontal, as you can see
let me know if you need any help with that
the wiki should cover most of it but im not that good at english or writing
Mmh, documentation is difficult
you don't put all of your code inside the return statement
and message is meant to be a string, not a table
SMODS.destroy_cards(card)
SMODS.add_card { key = 'j_sab_spade_king' }
return { message = "stuff" }
you want something like this
is it possible to have 2 style in 1 string?
So it should be something like
context(card.ability.extra.invis_rounds >= card.ability.extra.total_rounds) then
SMODS.destroy_cards(card)
SMODS.add_card { key = 'j_sab_spade_king' }
return { message = "stuff" }
end
end,```
with the (card) being the own card's key?
the only thing you'd have to change there is the message
and please run the lua formatter on your file
wdym
Gains will be gray, +15 will be blue and Chips will be the default color
What?
that sucks
let me figure out a way
right click anywhere in your code and click "format document"
a way to do what?
first one
you can pass a string to message yes
if that's what you meant
thanks
actually 2 last question
how the hell do i make this joker endure 2 losses
ignore the text
don't make it destroy itself when it saves you lol
but like
Like this?
i want it so that its still there until 2 losses
you'd want a variable to keep track of how many times it can save you, decrement it each time it saves, and if it's less than or equal to 0 destroy itself
and you want that variable in your config
on the line right above SMODS.destroy_cards you want to remove the context( .. ) part, leaving the stuff inside the parenthesis but getting rid of the rest
well my pc died so i can't work on my stuff anymore for the time being :/
in the meantime, how do the floating image jokers work? (legendaries & holo)
in a joker definition you can optionally add soul_pos = { x = 0, y = 0 } which will take the sprite in that position of your atlas and make it floating
the condition card.ability.extra.invis_rounds >= card.ability.extra.total_rounds is always false
cus you're never modifying either of them
so that's why it's not destroying itself
hey im trying to figure out how to destroy Hearts after they have been scored,
any ideas?
am i hooking this wrong
local add_to_deckref = Card.add_to_deck
function Card:add_to_deck(from_debuff)
if not self.added_to_deck then
if self.ability.name == 'Christmas Tree' then
G.hand:change_size(self.ability.extra.h_size)
end
end
add_to_deckref(self, from_debuff)
end
something like
if context.cardarea == G.jokers then
if context.after and not context.blueprint then
for k, v in ipairs(context.scoring_hand) do
if v:is_suit("Hearts") then
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
func = function()
G.hand:remove_card(v)
v:remove()
return true; end}))
return true
end
end
end
end
going to test that out
i cant seem to get it to work at all lol
error?
no error just not doing it
if christmas tree is a joker you don't need to hook for this
you can add an add_to_deck function in your joker def
question: how do you use no_ranks? this is what i've got inside but it doesn't work
"A",
"2",
"3"
}```
calculate = function(self, card, context)
if context.cardarea == G.jokers then
if context.after and not context.blueprint then
for k, v in ipairs(context.scoring_hand) do
if v:is_suit("Hearts") then
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
v:start_dissolve()
return true
end
}))
end
end
end
end
end
no_ranks?
i figured it out
if context.destroy_card and context.cardarea == G.play and context.destroying_card then
for _, card in ipairs(context.scoring_hand) do
if card:is_suit("Hearts") then
return {
message = "Upgraded",
remove = true
}
end
end
end
are you talking about no_rank in enhancements or something else?
the challenge deck one that's supposed to remove ranks from a deck
it is named "no_ranks"
@zenith sage thx for the help!
wait no now it destroys the whole hand if it has one heart in it lol
like this it seems
ah, neat, thanks
as a string, so '2'
is there a limit to how long a file can be before it stops being read?
im getting a crash that says '=' expected near 'key' but there is one there
code
and its line 1396?
yes
would it be context.blind == G.GAME.blind.boss?
yea
alr cool does not crash and works as intended
What is the key of an enhancement
like steel or whatnot
c_steel iirc
i keep getting editions and enhancements confused 
o
thanks :3
o
its c_base for unenhanced
m_key for everything else
m_steel
c for consumables, m for enhancements, e for editions, j for jokers
[SMODS RReferences "items/jokers.lua"]:21: unexpected symbol near '='
Code?
what is it for modded
I can't figure it out
m_modprefix_key?
I just realized I forgot to have the game load the enhancement file
I cant just type out the code in chat because I dont have Nitro
You have an extra } before config
But if I remove that, the game breaks
What is the crash if you remove that then?
Yes.
[SMODS RReferences "items/jokers.lua"]:26: '}' expected (to close '{' at line 8) near 'calculate'
so I need that parenthesis
No.
New code?
You're missing a , on the end of loc_vars
It's because since you're missing a , it thinks you want to end the table.
Is the negative edition functional on cards or does it require custom implementation
Yes?
Negative works on cards?
i mean like playing cards not jokers/consumables
It works on those too.
oki
It's implemented by SMODS
I wasn't 100% sure because like seals don't work on jokers for example

Red seals are the only ones that do things on jokers normally.
Tell me if there is an author of All in jest mod here
just send a message in that thread?
i ego browsed this and null cards are forced to not be face cards
What is ego browsing?
i just look up my name in search
Ah I see
anyway
null cards are inherently just a blank card
so they are not face cards ever
unless you have Henohenomoheji
then j q k are considered face cards
Is it possible to determine whether the player bought specifically a Joker or a consumable? I tried to use ".ability.set == 'Joker'" but crash errors say that context.buying_card is purely Boolean
context.card is the bought card.
I need to use "if context.buying_card.card.ability_set == 'Joker' and not context.blueprint"?
No, it's context.card.ability.set == 'Joker'
so i starting coding today "finally after 3 days of trying to figure out what will i do with the mod"
was writing the json file
whats badge color?
The colour of the mod badge.
Got it, thanks
and what version do i put in dependencies?
The version you're using?
if my questions seem stupid thats because i just woke up and my brain is still in dream land
Hi, I know the YT video is outdated, but I am at the point (5:33) where I can potentially see my joker in game, But I don's see it there, Here is where I am at in coding.
the documentation is on it's own json file
You need a JSON to load your mod.
i know, whenever I try to make it a lua file, it adds the tct on top of it.
Change it in vscode or turn file extensions on.
should be fine as long as the main_file in your json is "mod.lua.txt"
cursor
so if i put it as ex. mod.lua, it'll add I think I finally got it.
sorry, I can be abit annoying when I ask questions
all good lol
so, now that I got the lua file figured out, is there anything else I need to do so that my joker appears in the game. I;ll taks care of the variables next after seeing the joker.
can you show me your .json file
Or use the template.
misspelled, my bad
How do I go about getting/setting a seal that's on a card
card.seal and card:set_seal("modprefix_key")
hm
to get the key of said seal would be card.seal.key right?
No, the key is card.seal
so in the assets folder where 1x and 2x files
i put the same files with same names?
Yes, but the 2x is double sized.
I want to compare suit of the first played card in a hand with suits of the rest of the played cards but
"first_card_suit = context.scoring_hand[1].suit" returns nil?
Suits are at card.base.suit
thanks!
How would I go about lowering the blind requirement
Modify G.GAME.blind.chips?
Okii
Thank u :>
Also
How would I check if the player is currently in a round
actually nvm
What are the tags for the vanilla seals
You mean the keys?
The keys yeah
Sorry
"Red", "Blue", "Gold" and "Purple"
O
!!!!
you could always just print them out to check, actually
I thought it wouldve been like "Red_seal" at least
True
You don't need the print().
SMODS.Consumable {
key = 'bread',
set = 'jojo_Scraps',
config = { extra = { blindPercentage = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.blindPercentage } }
end,
use = function(self, card, area, copier)
G.GAME.blind.chips = G.GAME.blind.chips * (1 - card.ability.extra.blindPercentage / 100)
end,
can_use = function(self, card)
return G.GAME.blind
end
}
Am I doing something wrong
I figured that would be how you'd lower the blind but it doesn't do anything
Way too overpowered
return G.GAME.blind.in_blind for the can_use
