#💻・modding-dev
1 messages · Page 640 of 1
how can i do that?
is there a way to change how many cards you draw when opening a booster pack? effect tided to the booster itself
Is there anything in the smod wiki to show how to place or add to the ace on the main menu
i think there is a way , cryptid mod did that
you can look at talisman
oh! what booster?
waiting for me , i will take a photo of it
Is talisman required to do it? I thought cryptid mod did it
Isn't talisman just for making sure the score can go higher
they modify the ace
i mean for code, nothing you must use with
I just wanna tinker with the idea or replacing it or just adding some next to it
i see
like this?
What line would it be located at in the base game I guess I could just look see how it's done myself
i mean like the playing cards drawn in an arcana pack
instead of your hand size a fixed amount
oh, i think there are no solution unless fix game logic
blast
or using lovely is a best way too

You could use a mod calculate and change the handsize while in your booster
Idk if there's a context for leaving a booster in general (I know there's one for skipping)
context.ending_booster
Oh nice
You can probably use this too
so
Just need to check if you’re in the booster state
Is there a context for jokers changing in any way? (changing order of jokers, adding jokers, removing jokers) I'm trying to do joker that debuffs near jokers
How do I make a balatro fangame?
Read modding rules
Wdym, in the repo
Which rule?
literally the first one which you would see if you read them
just use SMODS.debuff_card
They're talking about a fangame and not a port of Balatro
are you sure you're correct?
i pointed them to the right rule if it were a port because that's what i saw someone else trying to do and they hadn't replied yet
hi, I need help with creating my first mod pack, I am using fedora linux instead of windows so I cant really find a guide.
does anyone maybe know a bit and can help me?
No, it's a fangame I want to create, not a port
Well I successfully downloaded it already and I can run mods on it, however, when I try create a modpack and run it it doesn't seem to exist, it doesn't even show on the activated mods
I'm trying to make a Boss Blind that debuffs cards held in hand before the hand starts scoring, and removes the debuffs after scoring. I believe the debuffs themselves work, but I'm not sure how to make the cards visually look debuffed with this setup
SMODS.Blind {
key = "gears",
dollars = 5,
mult = 2,
pos = { y = 5 },
boss = { min = 4 },
atlas = 'MySingingBlinds',
boss_colour = HEX("a3a3a3"),
calculate = function(self, blind, context)
if blind.disabled then return end
if context.before then
for _, card in ipairs(G.hand.cards) do
if not card.played_this_hand then
SMODS.debuff_card(card, true, 'gears')
card:juice_up()
end
end
end
if context.after then
for _, card in ipairs(G.hand.cards) do
SMODS.debuff_card(card, false, 'gears')
end
end
end
}
try doing the context.after part in an event
alright I'll try that
ok I made it into an event, it almost works but when the hand finishes and the debuffs are removed it never moves on after that so the game becomes stuck
if context.after then
G.E_MANAGER:add_event(Event({
func = function()
for _, card in ipairs(G.hand.cards) do
SMODS.debuff_card(card, false, 'gears')
end
end
}))
end
I personally started with https://www.youtube.com/watch?v=Zp-4U5TlbxY , it explains most basic things, also https://github.com/nh6574/VanillaRemade/ is pretty useful to see code to vanilla jokers, tarots, etc.
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 am using that already but when I use it without a context it crashes without a crash log, it works when I set a context (I tested it with context.reroll_shop)
Thanks
🙏🏾
What exactly are you trying to make
Im trying to do joker that debuffs near jokers
Thank you!
would there be a way to check a vanilla joker rarity other than number? or do i have to just use a map
rn im trying to do something like this
#G.jokers.highlighted > 0 and G.jokers.highlighted[1].config.center.rarity == "common"
-# (yes this is for jokerforge and leaving it as a string would help a bunch)
also welcome back 👋
card:is_rarity('Common')
Creating mods on Linux is no different than windows just fyi
The only difference is the game runs through proton
Just need to find you something to write in
I feel like personally the video those not match up with the vanilla remake index, I had Joker that was working and the last thing it needed was the imagine and boom it crash
And I not been able to figure what did wrong
the video is kinda old
@slim ferry anything on how to use the :extend() function?
or maybe a page in the wiki?
not that i know of
however what it does is create a new object class with the values you put into the table of the function as the new default values
which you can do a lot with
a good first step is probably to see what class youre best off extending for what youre trying to make
What was the name of the "vanilla modded" github repo? I forgot it, but I plan to pin it once you guys send it over
there
thx much
so if i like extend joker class i can add new properities and functionality to all objects to use right?
yes
hmmm
though usually if youre creating some type of card its better to extend the basic SMODS.Center
since those have basically all the same features as the individual center classes
im like trying to make keywords so that in the game object you can do keywords = {} and it will get some effects/ premade things from based of what is there
so you can put like keywords = {'hewnk} and then the cad will automatically have another button under the sell button for something
and idk if i should use :extend() hooks patches or multiple
what is exactly the end goal? are you just making jokers or something different entirely
i want to add an extra param to consumeable/joker cards, and based on that param, automatically add extra functionality to the card, like buttons, or just mechnics, that would be too long to copy/paste on every card that would have them
for buttons you can try looking at the system that entropy uses, which just allows jokers to have a use and can_use function like consumables
Someone need to make updated or modern version of it
though for everything else youre probably best extending, i do this in my own mod for stuff like consumables that are mostly the same code-wise with one slight difference so i dont have to copy and paste the same function into all of them
you can also use that to create default functionality similar to vanilla consumables
yea bc the way i want to do it, is that you predefine these keywords in a separate object/class, and then you can add these keywords to jokers, somehow, and when you do, the keywords functionality is added to the jokers functionality, so you can add the whole keywords code to the jokers code
wydm by modifier
like editions and stuff
yes, but it will add some more complex things to the cards, and it is predefinad, so the card always has it, and you cant just remove it or smth
hmm
well you can probably do it with a Card.calculate_joker hook then
by checking the effects of all the keywords on the joker after the main calculation
ok thx ill try to do it
Do hooks only work outside of a SMODS.Joker{}? I want to create hook for Node:stop_drag() to trigger a joker.
This Boss debuffs all cards held in card, then removes the debuffs after scoring is finished. I don't want the debuffs to be removed if the hand defeats the blind (so Gold Cards, Blue Seals, etc don't trigger at end of round) but for the life of me I can't figure it out
SMODS.Blind {
key = "gears",
dollars = 5,
mult = 2,
pos = { y = 5 },
boss = { min = 4 },
atlas = 'MySingingBlinds',
boss_colour = HEX("a3a3a3"),
calculate = function(self, blind, context)
if blind.disabled then return end
if context.before then
for _, card in ipairs(G.hand.cards) do
if not card.played_this_hand then
SMODS.debuff_card(card, true, 'gears')
card:juice_up()
end
end
end
if context.after then
G.E_MANAGER:add_event(Event({
func = function()
for _, card in ipairs(G.hand.cards) do
SMODS.debuff_card(card, false, 'gears')
card:juice_up()
end
return true
end
}))
end
end
}
I feel like the solution is really simple as well so I feel like an idiot for not being able to find it
try removing the debuff in defeat by iterating over G.playing_cards
that happens much later than other stuff
that would remove all the debuffs after everything else (and will be added when I figure out the current problem) but right now I need to figure out a way for the cards to stay debuffed if the hand wins the blind
I'm sorry, I'm not sure if I understand (I'm still very new to this)
defeat runs much later so itll keep the cards debuffed until after all the end of round effects trigger
yes but the trigger in context.after would still run, wouldn't it? that would clear the debuff earlier than I want
remove the trigger in context.after then
but I still want that trigger to occur after every hand that didn't beat the blind
all I need is a way to see if a hand will win the blind that will turn that trigger off
It might help if you explain what the effect is rather than asking vague questions about trigger timings
I already explained it above, the boss debuffs all cards held in hand when a hand is being scored, and after scoring is finished the debuffs are removed. Right now the issue I'm facing is that end of round effects like Gold Cards are still triggered because it isn't detecting if the hand has won the blind
I have figured out a sort of solution by adding the below code, but the issue with that is that the debuff is removed and then added on a moment later, which looks clunky
if context.end_of_round then
for _, card in ipairs(G.hand.cards) do
SMODS.debuff_card(card, true, 'gears')
end
end
hey y'all, how can i draw specific cards from deck to hand? nvm i got it
custom cards are not rendering in my poker hand preview
{'bm_Wi_E', true}, {'bm_Wi_S', true}, {'bm_Wi_We', true}, {'bm_Wi_N', true}, {'bm_D_R', true}, {'bm_D_G', true}, {'bm_D_Wh', true}},```
I assume I need the prefix
yes, on both the rank and suit
im running into a mild issue, i have a context.discard where i have a joker scale in a similar manner to ramen. it runs just fine, but it doesn't run as fast as ramen does and i can't seem to find out what ramen's doing differently
how am i mean tto make a objectclass anyway
@wintry solar https://github.com/SpectralPack/Cryptid/pull/820/files can you confirm for me that these changes would address the problems that cryptid is having with its localization on latest smods release , if you have the time
oh wow the embed is Me
you dont have to read the whole thing obv i just wanna make sure that i fixed the problem generally
that's two giant cat github embeds now 🔥
I am 95% sure it's just the stuff in v_dictionary
im distraught
is it problematic to remove the tables from the other things at least
I don't believe so
then i lowkey might just merge it anyway
assuming it doesnt crash on boot
yea no it does i guess ill just restart and apply it only in v_dict
whoever did the chinese localization PLEASE WHY DID YOU FORMAT IT
based
based
are legendary jokers i make automatically excluded from the shop pool?
shop? yes
they spawn as normal legendary jokers would in vanilla
if you want to make them not spawn the soul, or only spawn on certain conditions, consider using an in_pool function for them
so only from soul cards
only from anything that spawns legendary jokers intentionally
so the soul in vanilla, or anything from other mods that spawns legendaries
but nothing that just picks a random joker
yeah makes sense, thank you
do i need an E_MANAGER event?
Do you have a delay value set in your return?
i do not
that was not worth my time but it's fixed now, you guys can stop directing people to old smods
install smods 0.9.8
that was actually not worth any of my time because cryptid sucks and i had limited time today which is now up but what fucking ever
thanks lily ❤️
sure
That’d do it then. Ramen has this too, but it looks like it’s missing from VanillaRemade. Lemme find an example rq
ahh do the messages have a default delay that is overridden by setting it yourself?
oh?
Yes
code from the lovely dump
if self.ability.name == 'Ramen' and not context.blueprint then
if self.ability.x_mult - self.ability.extra <= 1 then
SMODS.destroy_cards(self, nil, nil, true)
return {
card = self,
message = localize('k_eaten_ex'),
colour = G.C.FILTER
}
else
SMODS.scale_card(self, {
ref_table = self.ability,
ref_value = "x_mult",
scalar_value = "extra",
operation = "-",
message_key = 'a_xmult_minus',
colour = G.C.RED,
message_delay = 0.2,
})
return nil, true
end
end
I’m only now discovering this myself too lmao
oh i didnt notice you two were the
you and the other contributors to vremade have been a blessing to our work, thank you
o7
hmm does it only work with scale_card?
no, you can add delay = num to the return
Yeah scale_card is a tiny bit different
yay!!
fixed it on vremade
Should we update vremade to use scale_card? Or is that a lil more of an advanced feature we let devs learn themselves
that's just for other jokers that alter scaling to reference, right?
yes
ok cool
i think having a comment about it next to relevant scaling jokers might be nice
much like e.g. marble joker has the big comment with "just use this code if you don't care about the animation"
not my place to butt in but i wow ok meta stole what i was going to say
hive mind
🐝🧠
they do
? i just ctrl-f'd for scale_card and there's nothing in jokers.lua
a
key = 'twitch_pack_1',
loc_txt = {
name = "Twitch Pack 1",
text = {
[1] = 'A booster pack with {C:purple}Twitch{} Jokers.'
},
group_name = "ttv_boosters"
},
config = { extra = 3, choose = 1 },
atlas = "CustomBoosters",
pos = { x = 1, y = 0 },
group_key = "ttv_boosters",
discovered = true,
loc_vars = function(self, info_queue, card)
local cfg = (card and card.ability) or self.config
return {
vars = { cfg.choose, cfg.extra }
}
end,```
remove the group_key
awesome works now
how do i make a G.GAME table anyway
I saw in the changelog for the latest SMODS that animated textures are now supported for all Atlas types. Can anyone confirm if this works with the balatro key? Whenever I try to set it as ANIMATION_ATLAS, it reverts back to the vanilla sprite.
I even checked in SMODS.Atlas.obj_table.balatro and the path and everything is as I set up, but it's still showing the vanilla sprite.
put a SMODS.current_mod.reset_game_globals(run_start) function in your main code file and initiate it there
like if run_start then G.GAME.yourtable = {}
No, the splash logo hasn't been updated to use the new functionality
A shame, thanks though!
is there any existing way to find the amount of times a specific playing card has been played or should i just track it myself
card.base.times_played
awesome
how do I use add_round_eval_row() ?
essentiallly what i'm trying to do is this:
SMODS.PokerHand {
key = "Straight Flush",
...
modify_display_text = function(self, cards, scoring_hand)
local royal = true
...
if royal then
-- TODO: ADD BONUS CASH ROW TO END ROUND
return 'vremade_Royal Flush'
end
end
}```
you can't add a cash row there
can I queue an event or do I just have to send a variable elsewhere to be picked up when it reaches the correct context
latter
How do you give a joker a use button?
but keep in mind that function is also not good for that since it also triggers on selection
check vanillaremade wiki, there's a question towards the bottom to add a button
best way to implement this would probably be to copy most of the logic from todo list joker, however idk how to make a joker effect something that just lasts an entire run constantly, do I need to write a custom object?
SMODS.current_mod.calculate = function(self, context) :3
.current_mod or [mod_prefix]
how do you make sure the card appears on only jokers that need it? (for example, isaac is a joker that gives a random negative joker based on what number you get after 6 rounds)
in the card highlight hook in the guide you check for the key
thank you wiki devs 😭
oh keep in mind royal flush is not considered a hand
it just modifies the display text right
so i add the joker's key in the pre-existing check?
in that case context.scoring_name can grab it right
nope
that will be straight flush
the only way to grab it in contexts is in context.evaluate_poker_hand
i forgot how to do this ```lua
if context.card.config.center.key == "j_busterb_isaac" then
can i replace true with can_use(...) or is that not possible```lua
local can_use = true
yeah
there's no context there, it would be self instead of context.card
wait, do i have to write multiple of these just to add multiple abilities?
do you mean multiple buttons or multiple jokers
i was trying to copy the way entropy went about giving jokers button abilities
you can give the jokers use and can_use functions and check those yes
SMODS.calculate_effect({ use(self, card) }, card)
that's not a piece of code that makes sense
yeah most likely I'll have to split up all the poker hands into their own objects
not terribly difficult but will add a ton of clutter and would make creating jokers that synergize more difficult
what can i do to modify a jokers values? Cryptid doesn't seem to have what i'm looking for, although I'm probably not looking in the right spot
like double or something
I am getting so frustrated trying to link a Joker with it sprite
I just can't comprehend what doing wrong this time
SMODS.Joker {
key = "png_joker",
blueprint_compat = false,
rarity = 1,
cost = 4,
pos = { x = 0, y = 0 },
config = { extra = { h_size = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_size } }
end,
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(card.ability.extra.h_size)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size)
end,
}
This what using but if I try adding Atlas to it, it instantly crashes it
What is the solution here can anyone explain it to me
how is ur atlas defined
Using
can i see the code where you defined the atlas
yes, stupid fat hands won't move fast enough
if its crashing when you add the atlas target for the joker, you probably screwed something up within the atlas
- Png.Joker
SMODS.Joker {
key = "png_joker",
blueprint_compat = false,
rarity = 1,
cost = 4,
atlas = 'jokers',
pos = { x = 0, y = 0 },
config = { extra = { h_size = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_size } }
end,
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(card.ability.extra.h_size)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size)
end,
}
that all I am using and the sprite name joker
I watch the video how to make joker that what they said
I'm assuming you added an SMODS.Atlas somewhere in your code?
If so can i see the code for that
That would be why
and where do I add that one
Ideally before all the Jokers are defined
so at the top of the file
For reference, heres what a Joker atlas should look like
SMODS.Atlas({
key = "placeholder",
px = 71,
py = 95,
path = "placeholder.png",
})
replace placeholder with a more apt name
ok let try this now
and then dont forget to set the atlas value in your joker to the key of the new atlas you made
you lost me there
oh it work I see
ah
wait but where do I add the text for the Joker information
before the atlas or after it?
2 options:
Inside a localization file
(make a localization folder inside your mod folder, then put an en-us.lua inside, then follow these instructions: https://github.com/Steamodded/smods/wiki/Localization)
or inside the Joker via
loc_txt = {
name = "Your Joker name",
text = {
"Row 1",
"Row 2",
}
}
also for text formatting see https://github.com/Steamodded/smods/wiki/Text-Styling
anyways im tired so im heading to bed
this is pretty basic stuff though so if you're still confused there will most definitely be people here that can help ya while im away sleeping
looking at you, sr. nacho
how can I debuff all jokers except the leftmost one during a boss blind?
if context.debuff_card and context.debuff_card.area == G.jokers and context.debuff_card ~= G.jokers.cards[1] then return {debuff = true} end
can i really just add use and can_use to a joker and a use button will magically appear onto a joker?
No.
how does entropy do it
by coding in its own use button support
my mod's use button code is a modified version of the lobcorp mod's use button code
if is_on_cooldown() then return end
if G.STAGE ~= G.STAGES.RUN or not G.GAME then return end
level_up_hand(nil, nil, false, -1)
play_sound('ttv_fart_sound1', 1)
end```
working on this the level down all hands part works everything works but the moment it finishes leveling down all hands it crashes with an error in common_events.lua 507 with a nil value looking there it's just an end statement
Why not do a reverse black hole instead?
tried that
this is the closes i've got to work lmao
do I need to add update_hand_text()?
is that maybe why it crashes?
nope taht didn't work crashes lol
Can you go into your Mods/lovely/dump/functions/common_events and show whats at around that line?
(Wow english is hard this morning)
The dump contains everthing, with applied lovely patches from all mods and smods
trigger = 'immediate',
func = (function() check_for_unlock{type = 'upgrade_hand', hand = hand, level = G.GAME.hands[hand].level} return true end)
}))```
looks like this is my issue
Its hard without my pc, if you dont figure it out until 8 hours ping me
i'll tinker around
i'm not excatly an expert at lua
I'm a if it works it works
Duck tape and glue
is this line 507
so it's more so related to level_up_hand(nil, nil, false, -1)
I'd say so
let me tinker see
try using the smods function to level up instead
i guess actually, can you send the entire level up function in your dump
nvm
G.GAME.hands[hand].level = math.max(0, G.GAME.hands[hand].level + amount)
G.GAME.hands[hand].mult = math.max(G.GAME.hands[hand].s_mult + G.GAME.hands[hand].l_mult*(G.GAME.hands[hand].level - 1), 1)
G.GAME.hands[hand].chips = math.max(G.GAME.hands[hand].s_chips + G.GAME.hands[hand].l_chips*(G.GAME.hands[hand].level - 1), 0)
if not instant then
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function()
play_sound('tarot1')
if card then card:juice_up(0.8, 0.5) end
G.TAROT_INTERRUPT_PULSE = true
return true end }))
update_hand_text({delay = 0}, {mult = G.GAME.hands[hand].mult, StatusText = true})
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.9, func = function()
play_sound('tarot1')
if card then card:juice_up(0.8, 0.5) end
return true end }))
update_hand_text({delay = 0}, {chips = G.GAME.hands[hand].chips, StatusText = true})
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.9, func = function()
play_sound('tarot1')
if card then card:juice_up(0.8, 0.5) end
G.TAROT_INTERRUPT_PULSE = nil
return true end }))
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.9, delay = 0}, {level=G.GAME.hands[hand].level})
delay(1.3)
end
]]
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = (function() check_for_unlock{type = 'upgrade_hand', hand = hand, level = G.GAME.hands[hand].level} return true end)
}))
end```
assuming this is it
is the entire function commented out besides that final part
Or is there stuff before the commented out part
is there stuff before --[[
yes
is it too long
amount = amount or 1
SMODS.upgrade_poker_hands({
hands = hand,
func = function(base, hand, parameter)
return base + G.GAME.hands[hand]['l_' .. parameter] * amount
end,
level_up = amount,
from = card,
instant = instant
})```
talking about this before it
can you redownload latest smids
Smods
It seems the issue was fixed 7 days ago
Wait no
I misread
The issue was brought 7 days ago
Assuming passing nil as a hand is an intended use
if I cahnge the nils to anything it still crashes
I'll probably push it into the repo I got going let the main guy I got coding take a look later lol
is there a a list of hands as like a local thing
Maybe that's waht it's looking for a list of hands
I put poker_hands in thought it worked but still crashed
Cant you just do
SMODS.upgrade_poker_hands({level_up = -1}) instead of calling level_up?
Idk if its this one or smart_level_up I forgot the difference between the two
it worked
Neat
I love sucessful blind support
it seems passing nil to it is not intended
just a side effect of it using the upgrade_poker_hands function
with some friends
I saw the twitch blind mod
and liked the idea
but wish chat could be more interactive with fucking with ur game
still very early but it's functional
btw is there a good way to look for stuff like this
I tried the wiki couldn't find this mentioned anywere
or is it just trial and error and looking for the functions in lovely dumps
hm
how would i check if somebody selected a card in a pack
somebody?? i meant the player
Utils funcs from smods can be found in utils.lua, tho very rarely they're in other files
a better way to word this would be how would i check when the pack is supposed to end and go back to the regular shop
context.ending_booster iirc
cool
really wish the wiki was more documented
especially when me dumb
that function specifically was mentioned in a discussion in the smods github repo
Everyone wants the wiki to be better but nobody wants to write the wiki 😅
YOU do it
One singular line saying "idk check vanillaremade"
i wonder how many outdated jokes there are in the oldest shitpost mods by now
Is it possible to determine average color of card with shader?
what do u guys think so far of this mod
forgot to show off the soul and wheel additions
but they are both trolls
wheel never procs and soul just says pranked
the twitch commands are about midway through
still very unfinished but it'll get there eventually
Any fun suggestions for commands?
How are you reading the chat?
From the code my friend made it uses irc connection
Nut shell you put ur name into the box in the configuration menu
And it looks for keywords in ur chat
irc instead of websocket you say
I guess it's websocket
I think he mentioned that to
I dunno
I didn't make that part of the code
How he implemented wss in lua then
Does your mod has repo? I want to look at this part specifically
Pretty sure works similar to how the twitch blinds mod was made
i wonder who made twitch blinds

Ur mod was the inspiration lol
I just wanted it to have more abilities to screw with the streamer
And yeah it does use socket connection
Just checked
I'll have to ask them when I get the chance
The repo will be public once I feel like it's good enough for people to use
UI is ass for where u put ur name in and not even sure how rate limits will handle
Mod idea is similar to that one Mario 64 ROM had where people in chat could type a command to mess with everything in-game
But trying to implement jokes that could help battle against chat
It's just throwing shit in rn with no real balancing
what does the soul copy have that makes it different from the original soul
Troll.joker
When u use it just say pranked and plays a fart sound
so it's a fake soul
Essentially yeah
Not sure if I want it to appear in spectrals or make it a command
Either or seems funny
if i extend the SMODS:Joker class, will the new class be considered a Joker, or a separate Type with Joker as its base? tbh because of the lack of documentation i dont understand the :extend function that well
or like will it be just a joker with some more features, and be considered a joker by the game, so it will appear as a joker in the shop and collection, or will it be a different type of object that just behaves like a joker
or am i getting something wrong about this
when you extend you copy everything the Joker class have
and you can overwrite stuff
Joker itself extends from Center
so i make a joker just with some changes?
Depends on what you overwrite
But if, let's say you wanted to have jokers that all have the same calculate function
You could extend Joker and overwrite calculate only, then use the new class to make jokers
then if i make a joker with that new class the calculate function will execute code from both the class definition and the joker itself
no, you're overwriting, so only the calculate function defined last would run
oof
what you can do is make the calculate function in the new class use a different function within the object inside
so for each joker you create with the new class you'd define like my_calculate = function blah blah then inside the calculate you'd call self.my_calculate blah blah
when you call extend you'd do
MOD_OBJECT.Something = SMODS.Joker:extend {
calculate = function(self, card, context)
-- your generic joker code
self:my_calculate(card, context)
end
}
MOD_OBJECT.Something {
my_calculate = function(self, card, context)
-- specific joker code
end
}
glad to help
how would one get a joker to draw cards into your hand?
SMODS.draw_cards(number)
would this screw up the timing of other jokers if i used it here
i. should put an actual number
what you did wont either
m
i dont remember if draw_cards has events in it
required_params = {
'key',
'loc_txt',
'lvl_costs',
},
inject = function() end
})```
what is line 288
also I don't recommend saving things to the SMODS table, make your own
Line 288 is just SMODS.Leveler {
Also the thing being saved to the SMODS table is a result of me not knowing what to do and just doing random things it was saved to my own table before
is this loaded after the first piece of code
Thx that was the issue
I suspected that the file might not be loaded i didint realise that would be the issue with it being loaded after lol
how do i get the index of highlighted cards in reference to their position in the whole hand?
loop through the whole hand and check its position
is there a flag that detects if a card is highlighted?
card.highlighted
what would i put in if i wanted to emplace a specific tarot card?
i have this for a random tarot, would i need to change 'Tarot' to be the specific name?
yeah i figured it was gonna be somewhere in there
thank you
do i have to use add_card or can i use emplace?
remove create_card, emplace and add_to_deck and justuse SMODS.add_card instead
what's the difference?
it's one line
you dont have to do nil, nil, nil, etc
and it gets any smods fixes in the future if there are any
i see, do i still need consumeable_buffer?
yes, if it's during scoring
and then if i just wanted a random tarot i could use SMODS.add_card('Tarot') ?
SMODS.add_card { set = 'Tarot' }
ah ok
thank you thank you
now here's smth strange
the trigger order between these is wrong despite them having, at least from what i can tell in vremade, the same blind_setting context
cartomancer uses an event inside an event
ah
ok im looking at showman in the vremade and im a little lost
im assuming SMODS.showman is a steamodded-specific function to allow showman-like effects
yes
so find card checks to see if you have showman? and then what defines what can appear multiple times specifically?
yes, SMODS.showman runs once for every card that can be spawned and if it returns true then it can repeat
is it a specific effect that makes that card appear in multiples or does the card have that by default
the card has an effect on itself that causes it to appear in multiples, but it's not on by default
you can use it's own in_pool function for that
return true, { allow_duplicates = true } when the effect is active
yes
that will be on at all times tho
ig a G.GAME variable could be used
set by the joker def
or Actually
why don't you just use SMODS.find_card
ah, in the in_pool?
in_pool = function () return true, { allow_duplicates = next(SMODS.find_card("YOUR_JOKER_KEY")) } end
like this i would think
if your joker is found (currently obtained) it will be the value of allow_duplicates
it is truthy and as such duplicates should be allowed
ahh smart
nope, table needs to be second argument
you need return true, { allow_duplicates = ... }
ngl you should ping the guy i don't think they're actively checking chat
thats not what they want unless i misread
what that code does is allow duplicates if you have at least one of the joker
oh i thought it was like an activated effect not a passive
Any idea how to give a joker a custom rarity that would not join the regular or legendary joker pools but can be only be summoned by either a consumable or a joker event/effect? Doesn't have to be the exact trigger, just that it would be seperate from every other joker pools
SMODS.Rarity
Yea you can make your own rarity and set the weight to 0 (I think it is by default)
Thank you very much
god i wish there was an easier way to see if this works besides rerolling 200 times
change_shop_size(gained)
devious things can be done with this function
can i input that into debugplus?
yes
gained is however many more cards you want
in shop
don't put too many though lmao
command didnt work
oh yeah thats an eval
if you didn't know
thats just a function thats available to use in code
i have shop size at a good number so
ok after 285 rerolls im just gonna assume i have the key wrong
do i need to add the j_ and mod prefixes to the key?
it takes a while
yes
so it should...
does the mod prefix having underscores in it affect it at all
i don't know why it would
would it affect the same shop it's bought from?
yes
or do i go to a new shop
add a print to the in_pool to see what next(SMODS.find_card(..)) outputs
what do i replace .. with
its printing nil rn on one reroll
then the key is probably wrong
wait do i need to move return true to the bottom?
the key would be j\_[mod prefix]\_[joker key], yeah?
can i see the whole code for the joker
local silly_band = SMODS.Joker {
key = "silly_band",
atlas = "jokers",
pos = {
x = 9,
y = 0
},
unlocked = true,
discovered = false,
rarity = 2, -- Uncommon
cost = 6,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
in_pool = function(self, args)
print(next(SMODS.find_card("j_j_o_y_silly_band")))
return true,
{ allow_duplicates = next(SMODS.find_card("j_j_o_y_silly_band")) }
end
}
silly_band.config = {
extra = {
xmult = 1.5,
xmult_per_copy = 1.5
}
}
silly_band.loc_vars = function(self, info_queue, card)
local config = card.ability.extra
return {
vars = {
config.xmult_per_copy,
config.xmult
}
}
end
silly_band.calculate = function(self, card, context)
local config = card.ability.extra
if G.jokers then
local copy_count = 0
for _, joker in ipairs(G.jokers.cards) do
if joker.label == card.label then
copy_count = copy_count + 1
end
end
config.xmult = config.xmult_per_copy * copy_count
end
if context.joker_main then return { xmult = config.xmult } end
end
we're still working on getting all this stuff into the SMODS.Joker so ignore that
can you get the joker and do eval SMODS.find_card("j_j_o_y_silly_band") in debugplus
also hover it and do eval dp.hovered.config.center.key
returns j_o_y_silly_band
only that?
yes
not j_j_o_y_silly_band?
nope
smods might be removing the j_?
i would tell you to remove the underscores but then you will conflict with my mod :3
the underscores in the prefix was not my decision
hooray!
thanks yall for your patience
It’s because when it goes to add the type prefix it already sees j_ so it assumes it’s already prefixed
man i wish it was easier to keep track of when i need certain prefixes and when its added automatically
it's almost always needed except when defining a new object
How would I make it so if money was gained, I can modify that value to increase or decrease to it?
Bunco has 2 jokers that do this but it uses it's own custom context.
Hook ease_dollars
hook? (unfamiliar with hook)
OH
is it possible to make a blind directly contribute towards the final score? I'm trying to make a blind that gives X100 Mult (just to test stuff out, the value is irrelevant) after all other scoring concludes
I don't want to go ahead and try to make it before learning it's not as simple as I hope it is
if context.final_scoring_step then return {xmult = 100} end
context.money_altered iirc
it's new
I still don't really get how it works
local temp_payout_flag = false
if context.before and (next(context.poker_hands['bm_Tanyao']) or next(context.poker_hands['bm_Pure Double Chi'])) then
temp_payout_flag = true
return {
message = 'One Han!',
colour = G.C.RED
}
elseif context.round_eval then
if temp_payout_flag then
add_round_eval_row({dollars = 1, bonus = true, name='name'})
end
end
end```
temp payout flag will never be true when you check for it
You reset it to false every time the function is run
so i found it :>
is context.amount something i check like standard context, or something i can adjust like context.other_card?
you cant change it no
okay, this is extremely helpful!
fixed, I assume I need all the variables of this?
add_round_eval_row({dollars = ret, bonus = true, name='joker'..i, pitch = pitch, card = _card})
a bit harder since this is not in a joker object
I wonder if the calc dollar bonus function works in mod objects
i didnt add it but i dont see why it cant be
does anyone know why my hover ui is doing this
i have 2 very very similar elements, the first one works, the second does not, and i dont know why
will send some code snippets in a sec
hover func set for the one that works and doesnt respectively
and both hover functions look like this, just with different uiboxes and positioning
function G.FUNCS.hover_upgrade_blind(e)
if not e.parent or not e.parent.states then return end
if (e.states.hover.is or e.parent.states.hover.is) and (e.created_on_pause == G.SETTINGS.paused) and not e.parent.children.alert then
e.parent.children.alert = UIBox {
definition = create_UIBox_hover_upgraded(),
config = { align = "tm", offset = { x = 0, y = -0.1 },
major = e.parent,
instance_type = 'POPUP' },
}
play_sound('paper1', math.random() * 0.1 + 0.55, 0.42)
play_sound('tarot2', math.random() * 0.1 + 0.55, 0.09)
e.parent.children.alert.states.collide.can = false
elseif e.parent.children.alert and
((not e.states.collide.is and not e.parent.states.collide.is) or (e.created_on_pause ~= G.SETTINGS.paused)) then
e.parent.children.alert:remove()
e.parent.children.alert = nil
end
end
nvm i guess i just had to do some more paranoia checks
going with a different implementation- instantiating a special tag that will peform the payout (that way I can rename the row to whatever I want and control the rewards a bit better)
getting this crash```lua
SMODS.current_mod.calculate = function(self, context)
if context.before and next(context.poker_hands['bm_Tanyao']) then
G.E_MANAGER:add_event(Event({
func = function()
add_tag(Tag('tag_bm_tanyao'))
play_sound('generic1', 0.9 + math.random() * 0.1, 0.8)
play_sound('holo1', 1.2 + math.random() * 0.1, 0.4)
return true
end
}))
end
end
SMODS.Tag {
key = "tanyao",
pos = {
x = 2,
y = 1
},
config = {
dollars = 25
},
loc_vars = function(self, info_queue, tag)
return {
vars = {tag.config.dollars}
}
end,
apply = function(self, tag, context)
if context.type == 'eval' then
tag:yep('+', G.C.GOLD, function()
return true
end)
tag.triggered = true
return {
dollars = tag.config.dollars,
pos = tag.pos,
tag = tag
}
end
end
}
game crashes during round eval/redeeming tag
oh wait it might be condition missing
hai i need help figuring out a specific joker
this is da code
i cant find anything on vanillaremade that helps me turn the face cards into twos
also it costing $100 is bc i wanted to prevent myself from buying it LMAO thats not the actual price trust me
when do you want it to change?
it functions identically to pareidolia
except it counts every face card as a two
(me when i use defaced + wee joker)
oh count as a two, not actually change them
yeah
we don't have quantum rank support
you can do a load of jank patching but it wont work with other mods
local oldcardgetid = Card.get_id
function Card:get_id()
if next(SMODS.find_card('j_modprefix_key')) and not SMODS.has_no_rank(self) and SMODS.Ranks[self.base.value].face then
return 2
end
return oldcardgetid(self)
end
quantum ranks are next week
:o oooo
that snippet will make it no longer count as whatever it actually is
no wonder i was struggling with this lmao
so i have to change the ability of the joker then 😔
No, quantum ranks is still possible.
where do i insert this code then
It would replace the Card:is_face hook.
how do i make a hook again 😭
oh wait
i have to put it outside the joker
lol
i replace "j_modprefix_key" with "j_hatch_key" right
hatch being my mod prefix
Yes, and you would replace key with the key of the joker.
It would be j_hatch_Defaced not j_hatch_defaced
oh odd
idk why i wrote the key like that lol
ive never done that before
hmmm, so... it kinda works? it does trigger wee, however...
- its still affected by the plant
- it returns a standard amount rather than the 2 chips its supposed to
both points are intentional parts of how standard "quantum ranks" should behave, in that the card simultaneously counts as a King and a 2
Hook Card:is_face and check if the joker is present and return false
how would i go about making separate messages between this joker taking money and scaling mult?
hi, I have decided to learn how to mod, I have been following a guide on youtube by someone called "doomie" .
after a bit of following the guide I have had to open my game and see the new mod in the game, but I couldnt find it in the mods tab, nor could I find the joker in the collection.
can anyone please help me a bit figuring out what the problem is?
return {
dollars = ...,
extra = {
message = ...,
colour = ...,
etc
}
}
why isn't the context.after triggering
calculate = function(self, card, context)
-- Start Retriggering
if context.before then
local hasAce = false
local has4 = false
for _, v in pairs(context.full_hand) do
has4 = has4 or v:get_id() == 4
hasAce = hasAce or v:get_id() == 14
end
if has4 and hasAce then
card.ability.extra.trigger = true
return { message = localize("elle_41_activate"), colour = G.C.BLUE }
end
end
-- Retrigger
if card.ability.extra.trigger then
local ret = SMODS.blueprint_effect(card, G.jokers.cards[#G.jokers.cards], context)
if ret then ret.colour = G.C.BLUE end
return ret
end
-- Stop Retriggering
if context.after then
card.ability.extra.trigger = false
end
end```
may i see what you have
is card.ability.extra.trigger true
then it returns before it gets there
as of now the code is this:
--- STEAMODDED HEADER
--- MOD_NAME: Example Joker
--- MOD_ID: EXAMPLEJOKER
--- MOD_AUTHOR: [elial1]
--- MOD_DESCRIPTION: An example mod on how to create Jokers.
--- PREFIX: xmpl
------------MOD CODE -------------------------
SMODS.Atlas{
key = 'Jokers', --atlas key
path = 'Jokers.png', --atlas' path in (yourMod)/assets/1x or (yourMod)/assets/2x
px = 71, --width of one card
py = 95 -- height of one card
}
SMODS.Joker{
key = 'derek', --joker key
loc_txt = { -- local text
name = 'Derek',
text = {
'When Blind is selected,',
'create a {C:attention}Joker{}',
'{X:mult,C:white}X#1#{} Mult'
}
}
}
------------MOD CODE END----------------------
I also have an assets file with 2 photos
but I didnt really get deep into that one
where do you have this in your folders
also the video is really outdaed and i would recommend checking out newer stuff
%appdata%/balatro/mods/try1/
I dont really know thats just a video my friend who managed to create a mod sent me
Don’t you need a .json file? Or is it just convenient
If so does tomer have one
old smods used a header which is still supported but deprecated
I'm not aware of a .json file
i have no idea what the problem might be
check the first question here and see if following this helps https://github.com/nh6574/VanillaRemade/wiki
I suppose old header is good for small mods, still sets up bad habits tho
it also doesnt have newer configs
thank you very much!
sadly I do have to go now so I'll try it out in a bit.
Maybe trying to make one could work?
A JSON file
the link i said recommends that yes
i think trying to add decksleeves is gonna make me grt a snyeurism
it says it works in the lsp
or in the case of cardsleeves, CardSleeves.Sleeve { ... }
as per the cardsleeves wiki
https://github.com/larswijn/CardSleeves/wiki/API-Documentation
https://github.com/larswijn/CardSleeves/wiki/Examples
hi meta how are u
hi n! doing pretty good, just got registered for my final semester of my bachelor's degree
now that stone-verhaul's released, i've got a new secret mod idea cooking up, and i'm gonna try to work on my art skills while high roller is still waiting on my smods pr to be closed
how are you?
totally understandable lmao
glad you're alright at least
is there a way to make a blind reward display custom text? I have a blind that is supposed to give $20, but it makes the blind really wide and look bad, so I'd just like to replace it with "$20" if that's possible
not without patching the ui as far as i see
ah ok, I still have very little experience with patching, but I'll see if there's anything I can figure out
search for 'ph_blind_reward' in the code to find the places the reward is used
idk if there are others
ok thanks, I'll have a look
should i hook the functions of cards i take ownership of or will it still run the base function if i define a new one
I am trying to figure out how to implement the code of the Arm blind, where decreases poker hands, but only with even poker hands, like pair, two of a pair, and four a kind
but turning into a joker
which already quite complicated in my limited coding experience
calculate = function(self, blind, context)
if not blind.disabled then
if context.debuff_hand then
blind.triggered = false
if G.GAME.hands[context.scoring_name].level > 1 then
blind.triggered = true
if not context.check then
return {
level_up = -1
I know this is the arm but how I turn that into a Joker ability not a blind
it will not still run the base function, you'll need to hook it or just rewrite the code in your redefined version
gotcha 👍
how many hooks can i make before i run out of memory challenge
use context.before for the timing
during context.before, check if #context.scoring_hand (the length of the scoring hand) is even, and if it is (and the played hand's level is over 1) then you should be able to return level_up = -1 just like the blind does
Let me see if I get this straight
calculate = function(self, card, context)
if context.debuff_hand_then and
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() <= 10 and
context.other_card:get_id() >= 0 and
context.other_card:get_id() % 2 == 0 then
return {
hmm something like this?
???
i said context.before, not context.individual
and you need to check if #context.scoring_hand % 2 == 0, not if a card's individual rank is even or odd
Ok let me try again
sorry for being infuriatingly slow
calculate = context.before (self, card, context)
right then
#context.scoring_hand % 2 == 0
if context.debuff_hand_then and
or the other way around?
calculate = function(self, card, context)
if context.before then
if #context.scoring_hand % 2 == 0 then
return { level_up = -1 }
end
end
end
note that this will also level down high cards played with 2 and 4 cards if you have splash
Thank you very much that very interesting that it will do that, I need to get better codding this
ok it didn't like it
key = "png.joker",
blueprint_compat = true,
rarity = 1,
cost = 4,
text = {
'Increase hand size by 2,'
atlas = 'png.Joker'
pos = { x = 0, y = 0 },
config = { extra = { h_size = 2 } },
calculate = function(self, card, context)
if context.before then
if #context.scoring_hand % 2 == 0 then
return { level_up = -1 }
end
end
end
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_size } }
end,
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(card.ability.extra.h_size)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size)
end}
What did I position wrong
you can wrap a code block in two sets of three tick marks (this character: `) to format it like code, that helps make it easier to read
like this
anyway without the crash i can't say for sure, but you appear to be missing a closing bracket after the text
and a comma after the atlas
and a comma after the calculate function's end
see thank you for teaching me that
so wrap like this
key = "png.joker",
blueprint_compat = true,
rarity = 1,
cost = 4,
text = {
'Increase hand size by 2,'
atlas = 'png.Joker'
pos = { x = 0, y = 0 },
config = { extra = { h_size = 2 } },
calculate = function(self, card, context)
if context.before then
if #context.scoring_hand % 2 == 0 then
return { level_up = -1 }
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_size } }
end,
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(card.ability.extra.h_size)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size)
end} ```
not the quote mark ', the tick mark `
if you have a qwerty keyboard it's probably to the left of the 1 key
yea this is an issue with how you set up in the joker in general, not my calculate code
i assume you have a line that's just SMODS.Joker { before the first line you sent here?
the missing comma after the atlas and the missing closing bracket for the text are a good place to start
ok
key = "png.joker",
blueprint_compat = true,
rarity = 1,
cost = 4,
text = {
'Increase hand size by 2',
}
atlas = 'png.Joker',
pos = { x = 0, y = 0 },
config = { extra = { h_size = 2 } },
calculate = function(self, card, context)
if context.before then
if #context.scoring_hand % 2 == 0 then
return { level_up = -1 }
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_size } }
end,
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(card.ability.extra.h_size)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size)
end,}```
Better?
almost
you also need a comma after the closing bracket for text that you just added
this new error
key = "png.joker",
blueprint_compat = true,
rarity = 1,
cost = 4,
text = {
'Increase hand size by 2',
},
atlas = 'png.Joker',
pos = { x = 0, y = 0 },
config = { extra = { h_size = 2 } },
calculate = function(self, card, context)
if context.before then
if #context.scoring_hand % 2 == 0 then
return { level_up = -1 }
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_size } }
end,
add_to_deck = function(self, card, from_debuff)
G.hand:change_size(card.ability.extra.h_size)
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.h_size)
end,}```
oop wait I see now
you need two more ends after the return statement in the calculate function
omg that was nightmare to calculate
thanks you that insane
I should be able to use this code for my other even and odd jokers
It disables the cards being stationary if I use Chicot or Luchador, but not when defeated. why won't it move when defeated? What am I missing?
when it is disabled it skips the calculate because of the first condition but when it's defeated it doesn't, thus the global gets set to true again
Ah.
its not a good idea to set stuff in calculate without a strict context check
though what exactly needs to be fixed in this case
setting the global to true in a strict context check
like in setting_blind or something
Is it possible to reset the effect of a tarot card after the end of a blind? I assume I can hook the end of blind function but I'm not sure what that is or if I can do this in the use function of a tarot card without a hook
What's the context for self being drawn? I'm trying to do enhancement that copies other card's rank and suit, but when I change original while copy isn't in hand it does not sync so I want to sync when copy is being drawn
Or maybe a way of card being triggered when its not in hand?
i mean context.hand_drawn and context.other_drawn look like the places to start
if context.hand_drawn and (function() local passed = false for k, v in pairs(context.hand_drawn) do if v == card then passed = true end end return passed end)()
how can i make my class that is extended from SMODS.Joker class appear in the collection/be treated as a joker by the game?
using set='Joker' and obj_table = SMODS.Jokers doesnt seem to do it
Hi everyone, is there a way to make discarded cards go back in deck ? For a joker or for a boss, I only need one of them (please ping me)
idk exactly, but maybe use/make a context for when a card is discarded and use that to move it to the deck zone or after every discard Check the area where cards outside of the deck and scoring are kept (if it exists idk probably) and put all cards there into the deck area
thats my best guess, but as i said idk exactly
but i think theres a context for discarding cards cuz trading card has to use something thats a good place to strat
Hmmm yes that could work
G.FUNCS.draw_from_discard_to_deck()
Thanks !
It works! :3
Anyone who's set up Cryptid crossmod know how to make it only load if Cryptid itself is loaded, rather than Cryptlib?
if next(SMODS.find_mod('Cryptid'))
nevermind, found the CryptLibNoCryptid variable to check for
Good point. Thought it slipped bythat, but I'm realizing I just failed to use that set up properly at some point, haha
(It worked, thanks ! ✨)
How do i make card.config.variable (Added externally) not reset on exit to menu? When I load run it just resets to nil
You put it in card.ability.variable instead.
Are there any issues with x chips crashing on the latest smods
Proper support for this is coming in the next smods version
ah, seems it's Cryptlib/Cryptid related
forgot I had that enabled after fixing a compatibility bug
I'm trying to make a clean flip animation, just like tarot cards in vanilla.
People are talking a lot about Vanilla Remade for understanding, but I can't manage to figure it out.. Could someone help me and try to explain me how to make a tarot-like animation on a card ? (pls ping me)
(for example, what is "mod_conv" ?)
mod_conv is an argument you can put onto a tarot consumable, and takes the key of an enhancement. Every tarot card that turns cards into an enhanced cards shares code, so they just check to see if the mod_conv field is given
What type of card are you trying to make?
no, no, mod_conv is a field and just takes a key, it's not a function you call
Can you give a bit more details on what you're trying to do? Are you just adding a tarot that creates your modded enhancement?
I'm trying to make a modded consumable to enhance 2 cards into a modded enhancement, just like The Magician or The Empress
and I struggle on the animation part
Ah, yeah. I can still explain how the flip animation works, but you won't need it
config = {max_highlighted = 2, mod_conv = 'm_modprefix_key'}
What you're missing is that the code already has a built-in way to just make that happen. The reason there's seemingly no code in those vanilla remade tarots is because there's a default format that those tarots need, and they just do it automatically. You only need to make sure there's a correct mod_conv field and max_highlighted field in their config table
Where max_highlighted is the amount of cards it works on, and mod_conv is the key for your enhancement
Vanilla Remade is a very good tool, but just looking at the code will only give you reference, not explanation, yeah, haha
This is a brilliant explanation Ice
vanilla remade's hanged man crashed when i tried to use it but other than that yeah its pretty solid
The vanilla remade wiki is also very handy to check out, btw, but I see that there's no explanation of how to use mod_conv to just have that functionality immediately accessible
vanillaremade includes the code to change the enhancements manually with animations btw
It's the block that's commented out, no? I think eyes sometimes glaze over that a bit, haha, but it's good its in there
yeah
It worked perfectly, thanks
works fine for me
goddamnit, UI moment
how do i change the atlas position of the sprite when it triggers?
or i guess, what variable would i reference
card.children.center:set_sprite_pos({x = x, y = y})
thank you
always set z value to integer.max_value! i will be the last one to render on top i win
not sire what the lua? equivalent is of max ont
damn hes so right
theres like two lua max values
theres math.maxinteger which is the largest before float loses whole number precision (iirc) and math.huge which is infinity
i mean kind of i think but it just automatically switches between them
there is a type function but it just returns "number" for both
pretty much yeah
its just kind of always a float
the distinction doesnt matter much outside of vscode which will show the exact value of known integers but not display the values of other numbers
can number be used as a boolean?
0 is true?
yeah
😭
it would kinda be annoying if it wasnt
tbh
since often values will be set as x = x or some number
so if 0 acts as false there that would be very inconvenient
hm i see
quite different language than i’m used to
i mostly do c and java for context
So I am using Joker Forge and I want my Joker to destroy all Jokers with the Economy Type, add their sell value and store their functions inside my Joker. Is it possible to make this using Joker Forge? And if it is then how can I do it?
Doesn't seem like the Joker types are present in the editor.
wdym by joker types
i assume the wiki types
which
arent a thing code wise
so this isnt possible to make in general, joker forge or not
at least not at the moment
i think jokerforge lets you define types they just dont do anything
could be wrong though
no im thinking of something else
hold on
its not type its "effect" apparently
but you can see it as nil here implying sometimes its not nil
oh
like the unused vanilla thing
theres probably a good reason you cant check it since i dont think every vanilla joker even has that
what are all of the jokers in the base game that use mod_mult
i could do something a biit more hacky
by just replacing mod_mult if its from a vanilla joker
what are you trying to do?
ok so
this won't modify the message that follows
it will modify the amount added though
hardcoded messages moment...
yea :P
💔
because the automatic messages are an SMODS thing afaik
well i can't erase every message sent through from a vanlla joker
even if it has mult in it because of scaling jokers
Are there any hardcoded messages for mult scoring?
No, right?
Oops, didn't mean to reply there
I have some code in Kino that just turns every mod_mult into mult, so it's passed to the smods system
I've never encountered issues stemming from that
But I could for sure be missing something
anything that uses mod stuff to avoid the default message wont like that
in which case you can limit it to vanilla jokers
which i think my code does, but i'm not sure
i haven't touched it in aaaages, haha
their fault for not using the api method for that
ok but what if their mod was awesome and not lame...
and there was some use cases where mod_mult is awesome..
it's part of a bigger hook in my code, but I just disable the vanilla messages this way. I don't check for source mod, which I'm gonna add for safety, but it's been rare enough that I've not ever noticed or have had reports of any issues coming from it. It's just code that's part of a function Card.calculate_joker(self,context) hook
there is an ever so slight distinction between chips and chip_mod
I'm not aware of it the difference propagates across to the mult versions, I haven't bothered to check
I'm trying to patch in a custom string to the dictionary
b_crop_custom_reward="$20"
but when I call for it it just returns "ERROR"
I tested it by calling for one of the already existing entries and it works fine, so it's something to do with this
does the prefix matter?
what do you mean patch in a custom string?
sorry if I'm not using the right terminology, I mean I'm adding a new entry to the dictionary so it can be called by the localize function
don't know why it broke the lines up like that
How's your dictionary set up? It might be easier to help if we have some code snippets!
oh can you create your own dictionary? I was patching it into the one in Balatro's source code
didn't know you could make your own
how would I go about that
I did try and use my own localization file initially but I didn't know how to make it work
for context I'm trying to change the blind reward text for a specific boss blind
oh wait I see it in the wiki
ok I guess I'll try do that
though what's the difference between dictionary and v_dictionary? should I use one over the other?
v_ is for entries with variables (#1# etc)
ah okay, the normal one should suffice
why does my game not like this gradient... it crashes because compare number when nil whenever its displayed
the [i] ones are numbers
oh sorry i misread the color
i didnt see it was rarity and i thought you were indexing a color
Smods is luckily set up in such a way that you don't often need patching, unless you're trying to get in-between some code! It's definitely a good tool, but if you're considering using a lovely patch, you'll most likely be able to do the same thing without it. Though there are exceptions
actually isnt G.C.RARITY[4] just G.C.PURPLE
no
can you copy it here so i can test
Ok thanks for the advice, I'm still learning all this along the way (I've never coded in my life but this is making me learn stuff) and I'm really glad there's so many cool people to help
wait nvm i realized im a fucking idiot
i forgot
to do SMODS.Gradient
😭
my bad gang
So are you trying to add a new text entry to overwrite a specific blind, or is it a whole new blind that you're adding?
I'm adding a new blind (The Crop) which I've already made work, I'm just trying to make the blind reward text (which is usually a string of dollar signs) for that specific blind into something different
its gimmick is that you lose $10 every hand played, but the reward is $20, so it encourages builds that can beat it in one hand
Oh, I've never seen a modded blind mess with the payout there! I'd have to look into the code to see how you'd set that up, as I'm not sure Blinds have a build in way to change that 🤔 I see why you were looking into patches, haha
I've seen people ask the question in here before but they went unanswered
its hardcoded to repeat the $ symbol

