#💻・modding-dev
1 messages · Page 364 of 1
how can I make a consumable give a selected enhancement?
like this?
yes
i dont know how 😭
if you have the lua extension just right click > format document
oh nice
Or select from the add card line to the final end and press tab
This code isn’t too bad to be fair, it’s all indented correctly in respect to each other, just one less than it should be
okay, now how do i make it keep track of the amount of gros michels broken and add that amount of cavendishes?
per ante, i want it to reset each ante
If anyone would like a reference, here are the default drop rates for editions in the game
INFO - [G] This edition is e_negative weight = 3
INFO - [G] This edition is e_polychrome weight = 3
INFO - [G] This edition is e_holo weight = 14
INFO - [G] This edition is e_foil weight = 20
@daring fern thanks for the example of how to do render effects on decks! I was able to understand it after looking at the snippet you sent me!
It let me do this!
ohhh that looks good
-# there’s a lovely explanation of weights on the wiki shhhh
Why am I gonna waste five mins reading the wiki when I can spend 30 minutes figuring out how to irerate through GPCenters object to filter out those beginning with e_ and do it myself
I'd suggest make it a variable. I do not know how to make persistent variables that don't get lost when you close the game.
just add them to G.GAME
huh?
You can just add extra vars to the G.GAME table!
i recommend using the mod's prefix just in case
does Smods blinds have calculate functions now?
Real brogrammers store their entire mods code as XML in a G.GAME variable
yes
finally 😭
I am reworking the Starlight Glimmer
How would I go about checking for identical attributes between cards in the played hand?
So I can do G.GAME.FG.data?
Hello everyone,
For my mode, I need to add chips/mult or xmult based on the other jokers, but at the trigger of a played card (unlike Baseball Man). However, for these values to be taken into account in the calculation, I need to return them in my Joker's calculate function, which allows me to do this only once per played card.
Is there another way to add bonuses multiple times during a single evaluation of the calculate function (like going through G.E_MANAGER), or do I need to apply a patch to take into account a collection of return tables?
Thanks for your help!
Assuming I declare G.GAME.FG first?
use ipairs to iterate through the played hand and add the rank, suit enhancement combo to a variable you increment @primal terrace
yeah i think so
which part here is wrong?
Still don't know the difference between pairs and ipairs
it doesnt crash or anything it just doesnt trigger
What's the code? You should be able to do that with a little change in the logic
But to answer your question you can as extra to a return to do more than one effect
ipairs is for an integer indexed table, pairs is for any table but doesn't guarantee order
most of it is wrong, you dont put the hook inside calculate and you can't return a calculate table in a hook
also ease_dollars should go outside the return or do dollars = 2
ah
I've seen how extra works, but I need to return a table containing x values for chips, mult, and x_mult, not a single value for each variable.
What I want to do is: When a card with an assigned edition is scoring, iterate over the jokers and activate the edition bonus if the joker's edition is the same as the card's.
like this?
return {
chips = 50,
extra = {
chips = 50
}
}
is there a way to detect if a joker/card/edition like trigger a +mult?
Not really, let's assume I have 5 Holographic Jokers and I score a Holographic card, then I want to apply the Holo bonus (+10Mult) 5 times (once per Holographic Joker)
Extra allows me to apply additional bonuses 1 time, not multiple times as I wish.
I don't know how post_trigger works, do you think it's suitable for my needs?
return {
chips = 50,
extra = {
chips = 50,
extra = {
chips = 50
}
}
}
and so on
I may be wrong, but it seems to me that balatro's code does not take into account nested 'extra' fields.
extra is an additional effect table basically
extra is uh
a smods feature
lmao
if you're talking extra like the extra table in the ability table that's just a way of storing values without fear of something else generally overriding it
it does, i literally have a system that concatenates a dozen extra tables
Extra is a vanilla feature 🤣
But yes, post triggers are sounds like exactly what you need, if you search for it in your ide (assuming you have your entire mods folder loaded) you’d be able to see how it is implemented (I haven’t wrote post trigger docs yet)
how do i see the code of vanilla jokers? more specifically DNA
i couldnt find any of the actual functionality in the files but i might be stupid
you can find them searching for the name of the card in card.lua
Contribute to nh6574/VanillaRemade development by creating an account on GitHub.
question, would SMODS.create_card({ set = 'Spectral', edition = 'negative' }) be inclusive of soul cards and respect its rate?
holy crap thank you so much
SMODS.create_card is functionally a wrapper against create_card so yes
i see
anyone know where I can find the reference for joker in the card.lua? (jimbo, the plus four mult one, john balatro if you will)
-# hey, how funny colored lines for indentation and sh*t?
i think it doesnt show up because it just has mult in the ability table so the game applies that directly
Great, I'll dig around a bit to figure out how post_trigger works. Thanks for your help.
may have done something a liiiiiittle wrong...
anyone knos how to localize a planet card?
localize { type = "name_text", set = "Planet", key = key }
for the name
in a loclizatrion file
return {
descriptions = {
Joker = {
j_cdv_bocette = {
name = "Bocette",
text = {"At shop end, consume a", "non-eternal {C:attention}Joker{}.",
"Adds {C:dark_edition}Negative{} copy.", "Gives {C:mult}+ #3#{} Mult and",
"{C:chips}+ #4# {} Chips per Joker", "Current: {C:mult}+ #1#{} Mult and {C:chips}+ #2#{} Chips"}
},
j_cdv_rebeca = {
name = "Rebeca",
text = {"At end of blind, create", "{C:dark_edition}Negative{} Celestial", "card for most played hand"}
},
j_cdv_creadora = {
name = "Creadora",
text = {"At start of round, replace", "random card in hand with",
"4 upgraded {C:attention}random{} cards",
"{C:inactive}(Uses {C:tarot}Tarot{C:inactive} and {C:planet}Celestial{C:inactive} enhancements)"}
}
},
Planet = {
c_cdv_haumea = {
name = "Haumea",
text = {"{S:0.8}({S:0.8,V:1}grd. #1#{S:0.8}){} Gradum augit", "{C:attention}Iugi",
"{C:mult}+#3#{} Plex et", "{C:chips}+#4#{} nummuli"}
}
}
},
misc = {
poker_hand_descriptions = {
["Definitive Straight"] = {'5 cards in a row (consecutive ranks) with',
'all cards alternating betwen two suits'}
},
poker_hands = {
["Definitive Straight"] = "Definitive Straight"
},
dictionary = {}
}
}
i have this but it chrashes
looks fine to me, how does it crash?
nil value
i would like the crash log
maybe it's the poker hand? i think you're using the wrong poker hand key in the localization
it says cdv_def_straight_Definitive Straight in the log
nope the key is Definitive Straight i tries cdv_def_straight_Definitive Straight and cdv_Definitive Straight but none work
how do i use context.destroy_card?
hypothetically if I wanted to make Canio's effect work with any card, not just face cards, could I simply replace "face_cards" with "playing_cards"?
no, thats a local variable
you need to replace the counting logic
it would be simpler because its just #context.removed
return {
message = localize('k_again_ex'),
repetitions = 1,
card = self
}
what happens if i returned this without context.repetition?
not "context.remove_playing_cards"?
context.remove_playing_cards has a field called removed that has all the removed cards
thats how canio counts them
im pretty sure it doesnt
does context.remove count everything including playing cards? if so why wouldn't the remove_playing_cards work?
you mark cards that meet your conditions for being destroyed in other contexts with some kind of boolean
then you do
return { remove = true }
end```
here's how i do it in my joker that destroys cards by random chance. mine's a little fancy because i specifically tuned the sequence to make it go per card, but the general gist should be clear
i hope that helps 
it is usually fine to just use ``.getting_sliced`` for this purpose ~~as that has no other real effect aside from being the same name as what ceremonial dagger uses~~ 🤷♀️
How I am laying out solving this:
- Iterate through all played cards and add all their attributes (rank, suit, enhancement) as a concatenated entry into a new table in order, so that there is no overlap in the attributes
- Then, check through the new table for duplicate strings, and if there are more than three, return XMult
Still feel like a noob at this
Hopefully this sounds correct
context.removed is inside context.remove_playing_cards, you need to check for both
it is usually fine to just use .getting_sliced for this purpose as that has no other real effect aside from being the same name as what ceremonial dagger uses
It does, it prevents them from calculating
oh, right.
i guess it doesn't do that for what i did since i'm applying it in context.individual and not context.before
yeah because individual is just before destroy_card iirc
you can do table["rank_suit_enhancement"] = (table["rank_suit_enhancement"] or 0) + 1 and then check if any is >= 3
it seems like it might
You shouldn’t need to apply getting sliced inside the destroying context
This is assuming "rank_suit_enhancement" is the combined string with all the card attributes, right?
yeah
for i = 1, #G.hand.highlighted do
G.hand.highlighted[i]:set_edition({negative = true},true)
end
end,
``` how do I this consumable give an enhancement or seal instead?
:set_ability("m_key") for enhancements
:set_seal("key") for seals
although i think consumables have an option to just give them the enhancement you want to make
How to check if a card is a consumeable?
As in, while we can use if v.ability.set == 'Joker' then to see if v is a Joker, we cannot simply use if v.ability.set == 'Consumeable' then because that is not how it works.
Consumable btw
would applying both an enhancement & seal at the same time work?
card.ability.consumeable iirc
I know, but the habit has formed.
you can do one after the other yeah
Would that be a table or a boolean?
no idea
I'll go check that myself.
Like this?
yeah
yep ur right, in state_events it checks specficailly for repetition context (makes sense)
fml
more patching
you can do this but for repetitions if you need to do it in another context ^
i dont see why you would need to patch
huh?
what do you need to do
huh, those editions which were showing up black /do/ do something
oh i just realized
i never explained what i was doing
its not a specific joker i wanted to make a change for red seals 😭
whats the change
It's a table.
i mean i wouldnt patch it, i would take_ownership but yeah thats more complicated
also, the issue is even if i do take ownership, for a red seal how would that work
it basically lets you replace parts of cards using the smods api
is there a calculate function for a red seal
what's the different between 1x and 2x textures? i put them next to each other and it seems like 1x is... blurrier?
wait
like whats the point of each
im so dumb lowkey ofc there is
yeah, it still wouldnt solve your problem i think but it would avoid patches
i think to solve my problem
i have to patch anyways
so that in state events when counting reps it checks for the context i want
x2 is for when pixel smoothing is on
Hey guys, Im getting started on making some mods and this is my first time coding. What program do you all use?
i see
vscode
2x is 2x the resolution of 1x (1x is 1x the resolution of 1x)
ok cool, thx
no it isnt
no
what would happen if i did this
theyre the same size the other guy answered me
1x is 1/2 the resolution of 2x
thats not what i said
ok yeah
cause then i could probably add a new eval in state_events that checks for context.repetition and context.discard being true
they are the same size though
i was about to say
but im also worried that may horribly destroy the game somehow
no??
photopea is fucked to shit then they open as the same size
this seems terrible idea
cursed af
it would do close to nothing actually
well by itself sure
but if i patch state_events to check for this
where context.discard == true and context.repetition == true
yeah youre right its double the size for some reason photopea makes it smaller if you place rather than open
my bad
just some rogue effects in context.discard meant for context.repetition
and no, you can't add repetitions like that
not even if i change state_events
?
this is vanilla code
for red seals
what if i made the change i suggested and change that repetition_only at the end to be discard = true
smods code is substantially different from this. what i mean is that it's not reliable to add repetitions from the inside like this
i see
to refresh waht im doing
i just wanted to have red seals do a repetition on other contexts
like context.discard
i feel ive gone down a wrong turn dark spiraling path with this current method of getting it to work
there must be an easier way
there's a bit of a logistical issue with repeating context.discard because it can destroy cards, but that can be worked around
oh thats true
this is the relevant code as patched by smods
i see
this is how repetitions are built into the main scoring phase of playing cards
why doesn't this condition enter? 
so i assume SMODS.calculate_repetitions changes reps based on whether the context and card added a repetition
you would then pretty much have to patch to integrate the repetition loop into the discard effect
is there any way to get the key of the current stake instead of the number returned by G.GAME.stake?
hmm looks fine to me
tryna work it out in my head here
it asks everything that can generate repetitions and puts them into reps
couple issue here, actually
context.end_of_round isn't unique and will trigger multiple times [context.end_of_round and context.main_eval is correct for a single trigger]
SMODS.create_card won't put the card where you need it, you should use SMODS.add_card for that
iirc it also expects edition = 'e_negative'
weirdly to me it feels like it should just work if i added repetitions = 1 to any context
i know thats wrong
partly cause i tried that a while back
repetitions are specifically checked in any repetition context, not anywhere else
Another question rq. In the source code, where can I find the code for the joker cards specifically?
that's mainly because anything else would require an unlimited amount of repetition layers
so how would i add a repetition when discarded in that case
if its not checked
i realize atp im just asking to have it spelled out, its quite hard to wrap my head around somehow
depends on what part of them. you'll find metadata like names, keys, price, rarity, etc. in game.lua. code for calculation and similar are in card.lua (just search for the names in those files)
Ok cool, thanks
let me make a diff
i usually do ctrl-shift-f to search all files, look for the joker name directly, find the key, then search for the key
also self promotion 🙂 https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua
vanilla usually doesn't use keys
sometimes it doesnt even use the correct names!
i wish the wiki was less misleading about this 
i figured that based on what it says here, that it would just do it
looking at G.P_STAKES[G.GAME.stake] but i sort of doubt that'll work on a modded stake
how do i make a joker shake like booster pack?
read up
Is there any documentation for the API? I wanna read it and get a hang onto the funcs n stuff , also is there an extension for VC? Cause I like it so it auto fills , more convenient imo
SMODS.create_card is a direct mirror of vanilla create_card, just with a different/extended param structure. this is also needed sometimes
https://github.com/Steamodded/smods/wiki/
Also you can add smods to your workspace and it will have autocomplete for it
well it works now, so thanks 
hmm
Thank you very much!!
How can I find smods?
it should be in your mods folder if you installed it, else install it following that link
How do I check what the red notification means in the discord mobile app?
nvm i don't have the patience to work this out in full
is it that hard 😭
all good
you grab a phone and look at your notifs i gues
lol
i appreciate every bit of help so far
idk where they are on decktop
it's no different than how repetitions work elsewhere, I just haven't touched it in a while and would have to remind myself of how exactly they function
The IOS app is weird!
ill look into it when i have some free time
made my first joker :D
Hey @brisk rose I did a new release and gave you a shout out for your ideas!
this thing
Now that’s a fun idea. What about virus? Spreads an enchantment or edition or seal from one card to the other, if played first hand is a pair
thats a good idea i'll try
twas confused upon seeing this
amazing tho congrats
Apoptosis - destroys cards for last discard of each round
Could be another fun take on the cellular gimmick
i like that
how do i make a spectral look like the soul, and appear like the soul but in buffoon packs instead of arcana packs?
soul_pos is the location on an asset sheet,
In_pool for the baboon pack
baboon pack
Autocorrect
wait huh?
Which one looks better?
right, but change it to "if no cards were selected"
civilization
For a second I thought I misspelled, lol.
oh damn, im sorry 😭
does anyone have an example mod of booster packs and/or vouchers?
question, how can i, in its return table, get a joker to juice without any message?
why does it need to be part of a return table, as opposed to just callingcard:juice_up()?
why is this crashing? i don't even think that's my code
...i guess there's no specific reason, huh.
any ideas on what the easiest way is to check if someone doesn't spend any money in the shop (per round)?
idunno if that would work or how but probably add the money spent to a vars and check if it's 0
how do you track the money spent?
no idea
art is ugly as hell but it works
i removed the blueprint compat i forgot before that screenshot
Make an event with juice
If you just call it no event, it will juice at the beginning of calc
i actually just put it in the func 
because i am a cursed individual
That also wokrs
yo can someone with a brain (not me rn) help me debug some code? lol
joker works fine, only issue is values display as +nil and I'm not sure why
let's take a look. show us what's wrong
cool, here
no nitro, sorry :(
don't judge too harshly this is literally my first time working with lua lol
so the #1# and #2# are defined in the vars table inside a table returned from loc_vars, which you do not have. so since there isn't anything, they show as nil
oh that was supposed to be my loc_def table, could I just change that to local_vars?
that won't do anything, since all you're doing is just making a random variable with a name in your calculate function
i'd recommend reading up on how it works on the wiki https://github.com/Steamodded/smods/wiki/Localization#Localization-functions
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = '''
function ease_dollars(mod, instant)
'''
position = 'after'
match_indent = true
payload = '''
if mod < 0 then
# money has been spent
end
'''
although this will also trigger in non-shop contexts so also check if G.STATE == G.STATES.SHOP
yeah, we also found that tracking just money has some loopholes but we found an idea that will hopefully work
like with the spectral card that turns your money to 0 and stuff
it expects a string for the key of what you're trying to add in SMODS.add_card(). because it's not sent as a string, it's trying to parse a variable with that name instead and is getting confused
hey gang i’m having an “attempted to call a nil value” error and i’m not seeing what could be wrong- all the code i have rn is posted in #1371331136961380382 if anyone wants to take a look and try n help
oops lol
well it's still crashing but different
the key you passed is likely not a valid key.
keys in this context always need to have their set type prefix
and if they're from your mod, they need your mod prefix, too
the standard formula for, for example a mod joker, is
j_[your mod prefix]_[your joker's key]
oops
Jeeze, that was fast!
To me that’s a powerful card. It would be cool if it’s sell value increased per card you destroy as an added perk.
It’s a godsend for deck fixing and especially if you use Obelisk
Check out my mod, I’ve got five custom boosters that all do different things
i think the sell value would be a little op because i wanna keep it uncommon
No
why not?
why not? and how would i make it actually spawn?
Remove the thing that makes it not ik through pool
oh lfmao
hm, still doesnt work
it only spawns in spectrals
is stealing ideas from reddit to practice in coding a good idea?
most of the ideas ive seen are pretty good
yo if the key a_chips="+#1#" then what is +#2#?
I think I got the jist, just no idea how to replace +#2#
my spectral card isnt spawning in buffoon packs, how do i fix this?
where can i find it?
i have a consum that spawns a tag, every other tag works fine but this one crashes, are there any fixes?
i think soul rate should be 1?
i remember cryptid had a fix for this
might me 0.3%
Once again, anybody have any ideas how to get negative to do the thing and shut it isn't
I presume I just have to pass different values to the zhzder, but I don't know which to which ones or why it isn't able to pull unseen automatically
any idea where it might be?..
nope sorry
you can try looking for tag_orbital
it's in the file for pointer
yo if I use loc_vars like this...
return { self.ability.extra.chips, self.ability.extra.chip_mod }```
to return two different values, is there any reason they should display as nil?
is there an easy function to find the most played hand?
wait found it
depends on what you define as easy, you can edit what obelisk does
you need to return { vars = {...} }
o sheit you right
in terms of this, id need a if for if its an orbital tag but since addtag is only taking in a key what would i need to do?
ahhhh
you can just separate them
so Tag(tag.key).ability.poker_hand = ... in an if?
i wouldnt edit the values in the same line youre creating the object but yes something like that
Add “Small” as the second argument to where you create the tag iirc
I haven’t looked at your code but it is mega cursed for the ortalab shaders too
this doesnt work...
i just add this folder in my mod folder?
just in case, I want to ask, is there like a guide on how you can code a joker? Like how to know about the mults creating random jokers or torot cards or maybe even special ones like copycat ability?
Looks like it’s Tag(key, some_bool, blind_type)
do what eremel said but also you're not editing the tag object, you are editing the center
get_enhancements returns a table so i think thats why but i dont see how else i can get it
no, add it to the workspace in vscode
if you add it to your mod it will cause problems
you are defining a new local which overrides the previous one
so just drag it in here?
go to file > add to workspace
yes that's intentional, i only set it to base at the start so it doesnt error if something goes wrong
i added it now what? cause it doesnt autocomplete lol
i don't mean you're replacing the value, i mean you're overriding the entire variable by making a new local with the same name
oh right i didnt know how lua worked mb
if you do SMODS. it doesn't?
imma try some bandaid fix for my problem though
you need the lua extension as well
i think it does
hmm that looks like normal vscode autocomplete
do you have the lua extension?
how is it named?
i searched steammoded or smods
does anyone know where a debug print might show up? I'm trying to see if my config extra table is properly initialized and the self.ability.extra is being initialized before I try to access them
it says its undefined
Hi, I have what I think is a fairly complex joker concept to implement and I'm not sure where to get started, just need some pointers.
The closest vanilla card is Pareidolia but looking at how that works in VanillaRemade doesn't give me much of a hint since the function it modifies is very specific to face cards
I also fully understand if it's just straight up not doable
weird, you might need to restart? im not sure
the lovely console or the debugplus console if you have that
it wasn't showing up on debugplus when I loaded the mod or when I triggered the joker, how do I open the lovely console?
it opens with the game
or you can look at the logs under Mods/lovely/logs
oh good call
hi dilly
Not really doable right now
Hi n :D
i did , still undefined lmao
no idea then sorry
oh btw how do i make my spectral card destroy all other jokers?
its fine dw
anyone?
if anyone finds the solution to this , would be appreciated
Uhh.. I'm sorry if I interupt but right now I still want to ask if there is a detailed guide on making jokers
and also geting to know how they function
does anyone know how i can make my spectral card destroy all jokers in hand? i tried looking at the balatro code but that didnt work
you have jokers in hand and not in the joker slots?
assuming you mean in the joker slots, https://github.com/SpectralPack/Cryptid/blob/4c791ed4eda9c66c2e7755b57babb18736c725f0/items/exotic.lua#L4
Yeah they kinda work if I don't render the original dissolve shader first, but only kinda
yeah joker slots
no idea which part of that actually destroys it
me neither but that destroys all jokers so
Small?
speaking of joker slots, I'm wondnering is it possible to make a joker card that can do any of these things:
copy a random joker card.
try to boost up any stats.
turn any stone cards into regular cards?
(just something to test modding if any)
add_tag(Tag(tag, false, 'Small')) like this
would that fix my issue of orbital tag not having a hand to level up?..
Huh
...what? oh you sorted it, unsure why discord decided to ping me now
you'd probably want to do something similar to my thanos joker
-- Collect all cards separately
local jokers, consumables, hand_cards = {}, {}, {}
for _, c in ipairs(G.hand.cards) do table.insert(hand_cards, c) end
for _, c in ipairs(G.jokers.cards) do table.insert(jokers, c) end
for _, c in ipairs(G.consumeables.cards) do table.insert(consumables, c) end
-- Function to destroy a rounded-up half of a card list
local function destroy_half(card_list)
local num_to_destroy = math.ceil(#card_list / 2)
for i = 1, num_to_destroy do
if #card_list > 0 then
local randomIndex = math.random(#card_list)
local target = card_list[randomIndex]
if config.sfx ~= false then
play_sound("fn_dust")
end
target:start_dissolve()
table.remove(card_list, randomIndex)
end
end
end
-- Destroy cards separately
destroy_half(jokers)
destroy_half(consumables)
destroy_half(hand_cards)
-- Create a Legendary Joker
local new_joker = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
new_joker:add_to_deck()
new_joker:start_materialize()
G.jokers:emplace(new_joker)
return {
message = "Balanced...",
colour = G.C.MAGENTA
}
end
return true
end}))
end
end
}
Any chance you can send the init function for tags. I never noticed the extra args while making better tags
@daring heron
how do i write out colors for badge_colour in rarity
but does anyone know how i can delete all the current jokers?
yeah?
the thing i just sent discord bugged and didn't reply
HEX("XXXXXX")
do i keep the quotes
Ye
k
well i have no idea which part actually destroys them
Interesting
target:start_dissolve()
and how do i make it target all?
Orbital tags specifically require the blind type to populate their hand
you'd do similar to my thanos joker that i sent that targets everything then halves it you'd just remove the non joker targets and remove the part where it halves it
This is a long shot, probably making this too complicated - I have a seal that will change between 3 random values every round. At the moment I am able get the change to value on all instances of that Seal, that bit is easy, but I'm wondering if it's possible to have different values for each instance of the Seal.
i still dont know how i would do that
the text I'm trying to display is,
"{C:chips}+#2#{} Chips when each",
"playing card is destroyed",
"{C:inactive}(Currently {C:chips}+#1#{C:inactive} Chips)",```
how I'm trying to return those values is with the loc_vars function, that wiki you linked me to says that ```return { vars = {self.ability.extra.chips, self.ability.extra.chip_mod} }``` should return as +#1# and +#2# respectively, yet it just returns as +nil and +nil, so I'm trying to figure out how to use the keys, I figured out that I just had to define whatever key I wanted as +#2#, but if what I'm doing is nonsense then lmk lol
card instead of self
what is in your extra table
ah
config = { extra = { chips = 0, chip_mod = 50 } },
idk how this would be done but my best guess is to have the random variable be randomly applied when the seal is applied?
yeah, card instead of self then
That’s very simple, can you screenshot your current code?
like have an initial randomization between the variable
replace self with card in all of my functions?
ok seriously where tf are my cards
how did this even happen?
@tall wharf you are good with ui. do you know why the cards arent there (sory for ping)
custom cardareas are weird
there are cards in the new cardarea. where are they
nah, still displays nil
what does your loc_vars() look like?
nvm no it is patching
card.ability = card.ability or {}
card.ability.extra = card.ability.extra or { chips = 0, chip_mod = 0 }
return { vars = {card.ability.extra.chips, card.ability.extra.chip_mod} }
end
}```
oh wait
OOPSIES :))))
loc_vars = function(self, info_queue, card)
deleted more than I meant
still nil tho lmao
even though I have not gone through the destryo joker section yet, I can see that it's hard too, even if someone who hasn't figured out about how to trigger any random joker?
could you not just do a ipairs(G.jokers.cards) v:start_dissolve()?
it's not being drawn lmao
hook CardArea:draw
how does the pools var work for cards? e.g. pools = {[collection} = true where is this stored? i checked G.P_CENTER_POOLS but cant find it
ok, new idea:
Straights can wrap around
(ex: Q, K, A, 2, 3)
in theory this should be far more possible but I'm not too sure
(I'm looking at how shortcut works in vanilla remade and I'm struggling to figure it out)
nope..
code?
Is this too much for a single joker? I guess it's not hard to understand the ability as it's mostly just Marvel + Stone Joker, but it is very, very long compared to any vanilla jokers.
huh?
for i,v in ipairs(G.jokers.cards) do
v:start_dissolve()
end
here modified one of my things this destroys all jokers
SMODS.Consumable{
key = 'LTMPolychromeSplash',
set = 'LTMConsumableType',
atlas = 'Jokers',
pos = {x = 4, y = 5},
loc_txt = {
name = 'Polychrome Splash',
text = {
'Destroy all jokers'
},
},
config = {
extra = { cards = 1 },
},
loc_vars = function(self, info_queue, center)
info_queue[#info_queue + 1] = G.P_CENTERS.e_polychrome
return { vars = {} }
end,
can_use = function(self, card)
return G and (#G.jokers.cards > 0)
end,
use = function(self, card, area, copier)
if not (G and G.jokers and #G.jokers.cards > 0) then
print("No Jokers to destroy.")
return
end
for i = #G.jokers.cards, 1, -1 do
local target = G.jokers.cards[i]
if target then
play_sound("slice1")
target:start_dissolve() -- Initiates card dissolution
end
end
end,
}
This is what I've changed it too but now I'm getting the "attempt to index field 'config' [a nil value]" error when hovering over the seal
why use an if...
card.ability.blablabla
well thats not what the card even was originally i just modified one of my existing ones real quick lol
No error now but all my values are nil
ahh yeah that makes sense lmao considering that would be needlessly inneficient
where can I commission someone to code my jokers for me
me me me
what it actually does is checks if you have any jokers or playing cards if you do then theres a 50% chance to either destroy 1 or make it polychrome
why not use if #G.jokers.cards >0 or #G.playing_cards >0 ?
Likely need to generate the card again
@wintry solar this no workie
I reloaded the game and started a new run
idk my code is very inefficent like everywhere probably lol
btw might be a really stupid question but how do i give my mod an icon?
Still says just poker hand?
make an atlas with the key modicon
given the original code is 886 over limit im going to go with yeah its just horribly inefficient but works
Umm, guys does anyone know where to start coding a joker?
so I put this code into here, still nothing
Like I was tihnking of mkaing a copycat joker that can just like copies a random joker.
as a test first.
Yeah I'm stumped
but i also have a joker from when i started this mod whos full code can't even fit on screen so if i was to go about having efficient code i should probably start there
why does my spectral appear so often? like almost every single pack..
Current code?
maybe try setting rarity or weight?
soul_rate should do that
Uhh... I'm sorry to interupt but I'm stuck trying to learn how joker codes work, I don't know if I missed anything even though I'm actually new to this but a little guide would help if any.
on coding.
Or how to mod a custom joker.
The first part is making a simple folder for your mod, then using SMODS.Joker
There's a wiki here for development: https://github.com/Steamodded/smods/wiki/Your-First-Mod
You can also take a look at other mods and see how they handle such things
have you watched the example mod tutorial?
STEAMODDED 1.0.0
A tutorial on how to make a modded Joker.
https://github.com/art-muncher/Example-Mod -- EXAMPLE MOD
https://github.com/Steamopollys/Steamodded -- STEAMODDED
https://github.com/WilsontheWolf/DebugPlus -- DEBUGPLUS
-----------------------------------------------------...
I did but I'm lost on how I can try to make a joker do a copycat of a random joker
oh like blueprint?
as well as trying to figure out how I can convert a stone card into a regular card
yeah except copies a random card on the slot
not just only to the right.
hm i have a legendary joker that works as a left and right blueprint but thats not exactly the same thing (could still send that if you want tho)
Yeah,
Ok good news it looks like each Seal has a different value now, but it's still showing "Male" in the UI for every seal
Also, wished there's like tutorials about like custom abilities mostly.
It could be that I never migrated the fix to make it work into smods 🤔
wait no, i forgot to add tag.key it works now
yeah that would be pretty helpful i mostly just look at other mods and see what they did and see if i can just use similar code to what they did

that code should be in main
and replace the whole "path to file" with the oath to the planet file
Do you have deck calculation turned on?
Yup
and of course the code is too long because almost all of my code is :/
Can you show where you enable it?
True.
Right at the top of my file
first half
SMODS.Joker{
key = 'Zorlodo',
loc_txt = {
['en-us'] = {
name = "Zorlodo",
text = {
"Dissociates so hard the he thinks he is ",
"The {C:attention}left{} and {C:attention}right{} jokers",
"Even if they cannot be copied"
}
}
},
atlas = 'Jokers',
pos = { x = 3, y = 4 },
config = {
extra = {
-- No additional properties required for now
}
},
rarity = 4,
cost = 4,
blueprint_compat = true,
calculate = function(self, card, context)
-- Initialize a table for results
local results = {}
-- Identify left and right jokers
local left_joker, right_joker
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
left_joker = G.jokers.cards[i - 1]
right_joker = G.jokers.cards[i + 1]
break
end
end
-- Process the left joker, if it exists
if left_joker and left_joker ~= self then
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
context.blueprint_card = context.blueprint_card or card
if context.blueprint > #G.jokers.cards + 1 then
return
end
local left_result, left_trig = left_joker:calculate_joker(context)
if left_result or left_trig then
if not left_result then
left_result = {}
end
left_result.card = context.blueprint_card or card
left_result.colour = G.C.GREEN
left_result.no_callback = true
table.insert(results, left_result)
end
end
Ohhhhh
second half
-- Process the right joker, if it exists
if right_joker and right_joker ~= self then
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
context.blueprint_card = context.blueprint_card or card
if context.blueprint > #G.jokers.cards + 1 then
return
end
local right_result, right_trig = right_joker:calculate_joker(context)
if right_result or right_trig then
if not right_result then
right_result = {}
end
right_result.card = context.blueprint_card or card
right_result.colour = G.C.GREEN
right_result.no_callback = true
table.insert(results, right_result)
end
end
-- Return the combined result
if #results > 0 then
return results[1] -- Return the first result (or adjust as needed)
end
end
}
Have you tried it multiple times?
Yes?
SMODS.blueprint_effect would clean this up to about 8 lines of code
🤷♂️ I don’t see any reason it wouldnt change then
damn i probably have the least efficient code on like everything then lol
remove the "path to"
taking like 90 lines to do something that can apparently be done in 8
is it possible to make a cardarea not allow dragging the cards in it?
Ok, so it exists now, but this pops up
Oooh. nice! I'll try this out if any.
Strange instead. Female via the console but Male via the game
so this seal is a 1/3 chance for +1 chip and +1 mult? sounds pretty weak idk
figured it out, patched CardArea:set_ranks() to include the cardarea's type in the elseif for setting card.states.drag.can to false
wild someone remade all of the stuff from vanilla?
thats honestly really helpful
is it possible to make a card area give all its held cards a button?
<-- someone
yes, i hook card:highlight for that
It'll be +1 Chip if Male and +1 Mult if Female too. The Seals aren't where the main scoring happens, it'll be the Jokers that grant the most effect. Might tweak the numbers in the future
Uuuh I currently have Agender set for +3 chips if no cards in hand have a gender
also that's where the arrows for monus cards in modernfluff come from btw
By the way, somehow it got me thinkin' or rather an odd question I've seen some random custom Balatro jokers from other sites on my searches for like how I can make jokers randomly before I stumble across this server and I had the idea or thought of idea of actually making one into an actual joker that can work. though I wasn't sure about these though they were made by other artists, but I wasn't sure if they seem to worth making them into an actual joker in Balatro:
you should probably ask the creator's permission if you do
you should probably ask the creator's permission if you do
Yeah, I mean honestly even though I haven't gotten any contacts for these artist or creators but then again, yeah.
Although I was thinking just using one of the custom card designs just for testing or maybe just for fun but when I actually do a full mod, I wouldn't include the card art unless given permission from one of the artists.
Also I wasn't sure if any card artists outside from this server are in this server?
<@&1133519078540185692>
But yeah
KILL THIS INDIVIDUAL
ok
thank you mods
I do need to ask permission if I ever use these artworks.
Mods, send them to the shadow realm
i have a question... what software do i need to write the code for custom jokers?
any text editor will do
A text editor
Even notepad words - but if you don't want hate yourself I'd recommend a proper IDE. I'm using Visual Studio Code 
could you maybe send me a link? im still new to lua, so i want to make this learning process as easy for myself as possible
lol
this code doesnt work, i know its the card = self line because it works when i remove it, any ideas?
yeah but it uses context.individual
and i want the message on the joker, not the cards
message_card = card
dont use card =
oh right yea mb
self is the joker type, card is the specific joker card
how would i make a joker gain 3 Xmult per Ramen joker the player has?
is ramen a specific joker or a class of joker
xmult = 1 + 3 * #SMODS.find_card("j_modprefix_key")
splendid
what context would this be under in the calculate function?
oh yeah i forgot that was a joker
context.joker_main?
i assumed because of the name it was their mod lol
well you need to put it in loc_vars too
i may be stupid but i'm trying to make a joker that gives x7 mult if the scored hand is a three of a kind with rank 7
currently it's doing nothing
the cards are card objects, not numbers
it added it Again lmfao
youll want to get uhh card.base.rank
i think
there are like 3 of them that give slightly different values so idfk lmao
or :get_id
again how
card.base.rank doesn’t exist.
also is there a way to refresh balatro w/ the new lua or do you have to close and reopen everytime
ive been trying to fix this for so long im really confused why this doesnt work
damm
this what it's meant to do
first hand it added x3 rank upon scoring, second hand it added the x3 again
and what's the problem with that
Press ALT + F5?
he wants it to just be a flat x3 mult per ramen that's owned, not a gain on hand
s'posed to just be X3 per ramen the player has, not add X3 every time a ramen is scored
oh wait i get it, my comment was to do return { xmult = ... }
don't make it an scaling joker
it gives me the table for the enhancements variable, but the print(enhancement) part doesnt print anything
card_eval_status_text(
card,
"extra",
nil,
nil,
nil,
{
message = localize({ type = "variable", key = "a_xmult", vars = {card.ability.extra.Xmult_ramen * #SMODS.find_card("j_ramen")} }),
colour = G.C.MULT,
}
)
return { xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_ramen * #SMODS.find_card("j_ramen") }
message = localize{type='variable',key='a_xmult',vars={card.ability.extra.Xmult}},
Xmult_mod = card.ability.extra.Xmult,
}
end```
so this?
yes
so im trying to get my thing into the game, but it doesnt show up in my mod list for whatever reason
although it does show up in the mod manager
if you don't want the extra 1 do
next(SMODS.find_card("j_ramen")) and 3 * #SMODS.find_card("j_ramen") or 1
didnt it print the table with m_bonus
no thats the first print statement, the second one is empty
and it doesnt do anything to the card but juice it
if the table is {m_bonus: true} then iteration should be via pairs, not ipairs
not sure i know what you mean
im not that good at lua yet
THANK YOU SO MUCH OH MY GOD
i have been trying this for so long you just solved it in 20 seconds
1 + 3 * number will give you x4 mult with 1 ramen x7 with 2 etc
what i sent you gives you x3, x6 etc
depends on what you want
ah
i need some help actually getting my mod into the game to test it out...
the problem is that if it's 0 it will multiply the mult by 0
just do math.max(1, 3 * ramens)
yeah it should be 1 + (0.25 per tarot used) + (3 * ramens)
also
still doesn't work </3
i tried following the tutorial, but it wont show up in game
note that xmult_mod and all of that other stuff is the old way of doing it
you should do just
return {
xmult = card.ability.extra.xmult
}```
hold up
c:get_id() == 7
good news, it does something now but it does x7 for each card and then also at the end at the top
you're missing a context check.
what's the effect?
the effect?
of the card yes
wdym by effect
isn't that legendary joker art from another mod?
what is it supposed to do
yeh
i'm gonna change it later on
if the scored hand is a three of a kind of rank 7, the final score gets x7 mult
does it need to be the final score or can it be on the timing the joker scores normally?
im asking because those are different contexts
final score
is it possible to take effects from boss blinds and or decks and add them to jokers? for instance adding plasma deck's balance to a joker, or the arm's ability to de-level a hand?
then you probably need to do it in context.after
replace cardarea == G.play for that
or context.final_scoring_step
both of those are easy to do with calculate yes
there are a couple of mods that make jokers that have blind abilities directly as well
dope
can anyone tell why this doesnt work? it doesnt give me any money at all
can someone explain to me why my mod wont show up in game? i am hard stuck on this
this is the most cursed straight i've ever made
Lua doesn’t work like if x == 1 or 2 or 3
is there any way to do it without doing if x == 1 or x == 2 or x == 3?
Also why not just return dollars?
No.
you can do that?
do you have a json file?
you wrote steamodded: header instead of steamodded header. also the header is a deprecated approach, see https://github.com/Steamodded/smods/wiki/Mod-Metadata
Yes return dollars = card.ability.extra.dollars
uhhh... no... i just followed the tutorial i saw earlier
listen to amaryllis
I've been using Extra Credit as a reference, but I can't figure out what the purpose of this file is: https://github.com/GuilloryCraft/ExtraCredit/blob/main/src/lib.lua Anyone know?
doesn't it initialize their global table?
hi Balatrostuck dev here who uses same convention
this is used to initiate the mod init object
every joker's registering function is then added to this init object
and then the mod iterates over the init object
and adds every joker individually
oh the cryptid method
from the INIT object
what do i fill in for these? or does it matter what i put there right now?
don't call it that, cryptid doesn't own that
Shouldn't this work for tag context?
before cryptid Codex Arcanum did that
i call it that pejoratively
agree to disagree
I don't understand how it's actually being used though. ExtraCredit doesn't seem to be used anywhere in the actual source, and afaik new Jokers are initialized by simply calling SMODS.Joker?
You need to put that in a seperate JSON file in your mods main folder and yes.
i dont think that's a tag context, it doesn't take regular ones AFAIK
might be a redundancy then
but that's the usecase of creating an INIT object
what the fuck. william mutual
does the JSON just have to be a txt file?
maybe EC had that at one point and the refactored
Balatrostuck has that because we deal with seven million merge conflicts every tuesday
No? It has to be a JSON file?
we would deal with seven octillion merge conflicts otherwise
yeah, i meant as a text thing tho
like i just make another text thing here and make it .json?
Yes, it's a plaintext format
No, I don’t think.
how does it help
every joker has its own file
meaning that if i work on joker X and my friend works on joker Y
we will not have to edit over the same file
If each separate file individually just calls SMODS.Joker does that not work? Not familiar with lua in this respect
it does it but after the hand is scored, like it'll be 51 x 7 and then it'll be 306 chips but it'll show up as 51 x 21 afterwards and stay that way until the next card is picked
we are working in two separate files which makes comitting our changes cleaner
ok... so now the mod is being loaded... thats good. now i just need help understanding this
i just have my jokers in separate files and initialize them normally
i dont see the need for init
i'll be real we'd have to rewrite the whole mod at this point so it stays there lol
we've been doing this since before SMODS had stuff like consumables support
anyone know what variable controls how often finisher blinds show up? ik they show up every 8 antes in endless and i'm wondering if there's a variable i could change to make them show up every 6 instead (i.e. 6,12,18,24 instead of 8,16,24,32)
even worse art this time but
i dont understand
do you have all the required fields in your metadata json? id, name, author, description, prefix, and main_file?
sometime this summer I'm gonna get back into jokestar. I know I'm CLOSE on KOT's coding but it's just not working right. might have to recode from scratch since I largely based it on another hand size-correlated Joker that probably had different variables
still excited about this mod but I'm really gonna have to buckle down to work on it
all but main file
what do i fill for that?
i used context.after instead of context.final_scoring_step
it works now
ignore the shit colours my monitor tricked me
so in this case main.lua?
it's a relative address. if your main lua file is in the same folder as the json, it's "name.lua". Otherwise "folder/name.lua" etc.
only problem is it says "x7" twice
yes
what are you returning
reminder of the effect before I repost the code later today:
i have an effect involving scored cards but the main one is "gains x0.1 mult for every hand size above 8." the + hand size effect probably is gonna take way longer but I just want to get the xmult for hand size effect done and dusted
uhhhh shit i have a problem
this works for three of a kind too
how do i make it if it IS a pair, not contains it
I think there's a separate variable for specific names of hand sizes
look at the image above you
LMAO ty
cheers
looks like it (unfortunately) uses the win_ante variable, gna check for mods that add a finisher blind before ante 8
this card is triggering before the modded joker i did
does that happen with brainstorm or doesn't it always go left to right
the one on the left is my modded one btw
final_scoring_step is at the very end
that's why i asked if it was normal joker scoring instead
if it's normal scoring then it's joker_main
ty ty
OK! my mod is now in the game... issue is whenever i try to change profiles the game crashes
is there a fix to this?
i want to use unlock all to check to see if the sprite is loaded in properly... but i cant change away from my main profile
yeah... thats only a bandaid solution... but its a good temp solution
oooh
good news
it loaded?
it wasnt my mod that was doing that
i turned off the mod and relaunched, and it still crashed
close enough... glad i got it in the game... thanks yall for the help!
your joker needs to have an atlas inside of it
based on your previous screenshot it doesnt
under the key add atlas = 'cheese house',
Keys can’t have spaces I don’t think.
idk if they can i was just going off of what he already has
if the sprite doesnt load after that remove the spaces in both your keys though yeah
OK i have another idea that's probably somewhat simpler?
all cards trigger as if they were queens
i.e. all cards in your deck trigger as normal but also are treated as Queens for jokers like shoot the moon, triboulet, etc.
realistically it won't be SUPER easy but I feel like with the servers help I could finish it in like a day
can't seem to find any other mods that do this, so i think i'll have to use a lovely patch to override the use of the win_ante variable to proc finisher blinds
quantum ranks are currently impossible iirc
well that's just great I have to entirely rewrite the joker idea
one last thing but i'm not entirely sure how chance works
i was thinking about making this a 1 in 3 chance
They aren’t impossible it’s just a lot of work.
well, obv, but is it worth the hassle?
like you'd have to rewrite most of card:get_id()
for context it's based on senor cardgage from homestar runner and one of his things is that he refers to everyone by a butchered female name, and i want to reference that. my idea involving quantum ranks was my only one that I thought was unique. like pretty much every other idea was a super niche version of triboulet or shoot the moon etc
so back to the drawing board I'd rather not rewrite a ton of base game code
maybe something with wilds to make them viable. considering hes just generally spouting vaguely familiar gibberish most of the time
Is there a way to set rarity for a consumeable? I'm not seeing anything in the github for consumeables
ok i got it.
face cards become wild, retrigger wild cards twice
this has Probably been done but it works for me
You mean the weight?
ughghh why cant i find what code makes use buttons turn red. this should be simple
isn't it like G.FUNCS.can_use_consumeable or something
I saw weighting on packs but not on the consumeblaes in them can that still be applied to the consumeables themselves?
Consumable types can have weights but I don’t think individual consumables can.
yup, dunno why i didnt think to check that
what abt the soul and black hole though
I believe that uses the Soul_set and Soul_rate which can set a rate for a consumeable in a different sets booster pack
Maybe I could finagle that if I make 2 different "consumeable types" and make it so the higher rarity ones appear in the regular at a specific rate
trying to make a joker whose effect only triggers if played hand contains only stone cards, does anyone know how I could make something like that work?
You would iterate over played hand to check if any card is not stone.
cool, that did the trick... thank you guys for the help
do you guys think this theme fits the effect?
how would you do that? I'm only familiar with checking individual cards for various events
i need help.
low key genius for the straight theme
only true bio nerds gonna get that so checks out
for k, v in pairs(context.full_hand) do if not SMODS.has_enhancement(v, “m_stone”) then stone = false end end
does anyone know how to use juice_card_until? ik invis uses it but the only reference to it in its code is lit juice_card_until(self, eval, true) which crashes when I use it
awesome, always wondered what the k, v in pairs was used for. It kinda confuses me lol
Use card and did you define eval?
nah i didnt define it, not sure what to set it as tho
and this doesnt work
key and value
as in table[key] = value
ahh damn that would have saved me a couple hours of pain
i usually try to give them more descriptive names
eval is a function which returns false when the juice should end
(so it's more like juice_card_while than until)
ok so what am i doing wrong here. when i try to engage a hearts, clubs or spades card it just Doesn't Stop making the destroy noise, and i can't destroy anything else, im presiming because its fille thde event queue or smth
(this is the function that gets called when you press the button given to a card while its in my custom cardarea G.rascal_room)
return true in the events
events re-add themselves to the queue until they return true
hey y’all i’m getting an “attempted to call a nil value” error with a mod i’m working on. if someone would be able to help me out in #1371331136961380382 id appreciate it a lot as i can’t identify what might be causing the issue
can anyone tell me why this isnt working?
- this is a hook
- this is the only part changed
what is it supposed to do
jump cards are meant to count as any rank for straights
as far as I understand what that code is doing is that straights take one less card, but it's not allowing skips
you need skip = true for that but even then i dont think it would allow 2 jump cards
that's the issue
yeah straight calculation is one of the things that's stopping quantum ranks from being a thing so it's too far out of my field of knowledge lol
ok wtf. how come using a card has a seemingly random delay anywhere from instant to like. a whole second? at least it feels like a second, its probably closer to half a second lol
maybe it's because there are already events in the queue?
hmm no idea
how do i do the icon thing for my mod
the only examples i can find in my mod folder use the old steamodded header
make an atlas with key "modicon"
thats it?
ye
thanks
ok ive discovered something even weirder, doing it on a diamond card stops any future delay from happening??? it does also stop any more cards from being drawn after a new one is drawn to replace it for some reason but thats not my main priority rn lol
hey, I'm trying to make a joker that balances mult if played hand contains only stone cards. I've managed to get it to balance when a stone card is played, but if there's any more than one stone card played it doesn't balance. does anyone know what might be going on?
not without seeing the code
fuck it im making this way simpler
How would one take ownership of The Devil? i can't seem to find its code
outside of its locvars at least
im pretty sure you can just return { balance = true } instead of doing most of that
but anyway the code should only work when all played cards, even unscored, are stone
you should also do calculations inside contexts instead of checking if the attributes don't exist
shameless plug but you should check out this to see how code in calculate should be structured
https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua
the game checks if the consumable has "mod_conv" instead of the name for the ones that have it
ITS DUE TO HAVING ZERO CARDS IN HAND. ??????????????
why does having zero cards in hand cause events to have delays??
by unscored do you mean held in hand? cause that isn't the case in testing
no i mean unscored played cards
ah, isn't that irrelevant cause played stone cards are always scored?
ok so
i want to make it so
jump cards have no rank in a straight
but do have one outside of straights
is that possible
possibly yeah but that means that it should work as long as you play all stones as far as i see
also I can replace the whole plasma deck clusterfuck with return { balanced = true} ? lmao
yeah im pretty sure, it's pretty new
lmao fuck
without d tho, just balance
no d? 😔
OKAY so it seems like when i don't have any cards in my hand for some reason the event queue gets flooded with events
honestly im surprised its not just flat out ending the run
target = '=[SMODS _ "src/utils.lua"]'
how do i split this text into multiple rows?
you make loc_txt.text an array of lines, as stated
wait so then how would i detect usage of a certain one or does taking ownership still work
if you take_ownership and don't change the config then it's going to still do the effect
if you want to change it you need to change the config to delete the mod_conv or change it to another enhancement
nope
not at all what i meant
remove the {line 1} parts
the rest is good
and put commas at the end of each line but the last
outside of the quotes
text = {
"blah blah blah",
"blah blah blah 2",
"blah blah blah some more"
}
well im not trying to change the enhancement it gives im trying to count each time one's used
so im trying to figure out where i'd add the counter increment
cool, thx
what do you need to count it for
you could just use context.using_consumeable
can i do that in the main file
you can hook SMODS.calculate_context
ill whip something up brb
searching for checks of #G.hand.cards < 1 or #G.hand.cards == 0 or #G.hand.cards <= 0 has given no asnwers. am i gonna have to search through all 800+ instances where Event is called in the game
might have something to do with the game trying to draw cards when the hand is empty?
ok its only 400 events. thats better
maybe? but i checked everywhere where it checks for a <= 0 hand size and nothing came up
looking through the instances of draw_card
i see
draw_from_deck_to hand (very lengthy function name, thunk) is getting called. a lot.
how would you go about this? If I run this without checking for a non full hand it reads as nil and crashes
